presenter 0.8.2 → 0.8.3

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.
@@ -1,7 +1,7 @@
1
- var zt = Object.defineProperty;
2
- var Ut = (n, e, t) => e in n ? zt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var k = (n, e, t) => Ut(n, typeof e != "symbol" ? e + "" : e, t);
4
- const f0 = {
1
+ var $0 = Object.defineProperty;
2
+ var X0 = (n, e, t) => e in n ? $0(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var k = (n, e, t) => X0(n, typeof e != "symbol" ? e + "" : e, t);
4
+ const ft = {
5
5
  /** Represents an animated change in an object's properties. */
6
6
  ANIMATE: "Animate",
7
7
  /** Represents a pause in the animation timeline. */
@@ -9,52 +9,52 @@ const f0 = {
9
9
  /** Represents an immediate update to an object's properties without animation. */
10
10
  UPDATE: "Update"
11
11
  };
12
- function Yt(n) {
12
+ function G0(n) {
13
13
  return n * n * n;
14
14
  }
15
- function Ht(n) {
15
+ function W0(n) {
16
16
  return --n * n * n + 1;
17
17
  }
18
- function Xt(n) {
18
+ function Z0(n) {
19
19
  return ((n *= 2) <= 1 ? n * n * n : (n -= 2) * n * n + 2) / 2;
20
20
  }
21
- var J0 = 1.70158;
21
+ var e0 = 1.70158;
22
22
  (function n(e) {
23
23
  e = +e;
24
24
  function t(o) {
25
25
  return (o = +o) * o * (e * (o - 1) + o);
26
26
  }
27
27
  return t.overshoot = n, t;
28
- })(J0);
28
+ })(e0);
29
29
  (function n(e) {
30
30
  e = +e;
31
31
  function t(o) {
32
32
  return --o * o * ((o + 1) * e + o) + 1;
33
33
  }
34
34
  return t.overshoot = n, t;
35
- })(J0);
36
- var $t = (function n(e) {
35
+ })(e0);
36
+ var V0 = (function n(e) {
37
37
  e = +e;
38
38
  function t(o) {
39
39
  return ((o *= 2) < 1 ? o * o * ((e + 1) * o - e) : (o -= 2) * o * ((e + 1) * o + e) + 2) / 2;
40
40
  }
41
41
  return t.overshoot = n, t;
42
- })(J0);
43
- const tt = {
42
+ })(e0);
43
+ const n0 = {
44
44
  LINEAR: (n) => n,
45
- CUBIC: Xt,
46
- CUBIC_IN: Yt,
47
- CUBIC_OUT: Ht,
48
- BACK_IN_OUT: $t.overshoot(0.8)
49
- }, Gt = tt.LINEAR;
50
- function et(n, e, t = {}) {
45
+ CUBIC: Z0,
46
+ CUBIC_IN: G0,
47
+ CUBIC_OUT: W0,
48
+ BACK_IN_OUT: V0.overshoot(0.8)
49
+ }, K0 = n0.LINEAR;
50
+ function r0(n, e, t = {}) {
51
51
  return {
52
- type: f0.ANIMATE,
52
+ type: ft.ANIMATE,
53
53
  object: n,
54
54
  props: e,
55
55
  delay: 0,
56
56
  duration: 1e3,
57
- easing: Gt,
57
+ easing: K0,
58
58
  block: !1,
59
59
  interpolators: null,
60
60
  isKey: !1,
@@ -62,23 +62,23 @@ function et(n, e, t = {}) {
62
62
  ...typeof t == "number" ? { duration: t } : t
63
63
  };
64
64
  }
65
- function pn(n, e = {}) {
66
- return et(n, { opacity: 1 }, {
65
+ function wn(n, e = {}) {
66
+ return r0(n, { opacity: 1 }, {
67
67
  duration: 500,
68
- easing: tt.CUBIC,
68
+ easing: n0.CUBIC,
69
69
  ...typeof e == "number" ? { duration: e } : e
70
70
  });
71
71
  }
72
- function dn(n, e = {}) {
73
- return et(n, { opacity: 0 }, {
72
+ function mn(n, e = {}) {
73
+ return r0(n, { opacity: 0 }, {
74
74
  duration: 500,
75
- easing: tt.CUBIC,
75
+ easing: n0.CUBIC,
76
76
  ...typeof e == "number" ? { duration: e } : e
77
77
  });
78
78
  }
79
- function Ct(n, e, t = {}) {
79
+ function I0(n, e, t = {}) {
80
80
  return {
81
- type: f0.UPDATE,
81
+ type: ft.UPDATE,
82
82
  isKey: !1,
83
83
  object: n,
84
84
  props: e,
@@ -86,13 +86,13 @@ function Ct(n, e, t = {}) {
86
86
  ...t
87
87
  };
88
88
  }
89
- function xn(n) {
90
- return Ct(n, { opacity: 0 });
89
+ function bn(n) {
90
+ return I0(n, { opacity: 0 });
91
91
  }
92
- function yn(n) {
93
- return Ct(n, { opacity: 1 });
92
+ function An(n) {
93
+ return I0(n, { opacity: 1 });
94
94
  }
95
- const o0 = {
95
+ const ot = {
96
96
  TOP_LEFT: "TopLeft",
97
97
  TOP: "Top",
98
98
  TOP_RIGHT: "TopRight",
@@ -102,8 +102,8 @@ const o0 = {
102
102
  BOTTOM_LEFT: "BottomLeft",
103
103
  BOTTOM: "Bottom",
104
104
  BOTTOM_RIGHT: "BottomRight"
105
- }, h0 = o0.TOP_LEFT;
106
- function $(n, e = 0, t = 0, o = 1) {
105
+ }, ht = ot.TOP_LEFT;
106
+ function W(n, e = 0, t = 0, o = 1) {
107
107
  if (typeof n == "string") {
108
108
  const i = n.replace("#", ""), a = parseInt(i, 16);
109
109
  return isNaN(a) ? (console.warn("Invalid hex color format:", n), Q) : i.length === 6 ? {
@@ -132,18 +132,18 @@ function $(n, e = 0, t = 0, o = 1) {
132
132
  ...n
133
133
  };
134
134
  }
135
- $.BLACK = $(0, 0, 0);
136
- $.BLUE = $(0, 0, 255);
137
- $.GREEN = $(0, 255, 0);
138
- $.RED = $(255, 0, 0);
139
- $.TRANSPARENT = $(0, 0, 0, 0);
140
- $.WHITE = $(255, 255, 255);
135
+ W.BLACK = W(0, 0, 0);
136
+ W.BLUE = W(0, 0, 255);
137
+ W.GREEN = W(0, 255, 0);
138
+ W.RED = W(255, 0, 0);
139
+ W.TRANSPARENT = W(0, 0, 0, 0);
140
+ W.WHITE = W(255, 255, 255);
141
141
  const Q = { red: 0, green: 0, blue: 0, alpha: 1 };
142
- function St(n = null) {
142
+ function _0(n = null) {
143
143
  return {
144
144
  content: null,
145
145
  setup: null,
146
- anchor: o0.TOP_LEFT,
146
+ anchor: ot.TOP_LEFT,
147
147
  height: 0,
148
148
  width: 0,
149
149
  x: 0,
@@ -151,30 +151,30 @@ function St(n = null) {
151
151
  ...n
152
152
  };
153
153
  }
154
- function Et(n, e = null) {
154
+ function O0(n, e = null) {
155
155
  return n.alpha * (e ?? 1);
156
156
  }
157
- function S0(n, e = null) {
158
- const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(Et(n, e) * 255);
157
+ function Et(n, e = null) {
158
+ const { red: t, green: o, blue: i } = n, a = t << 16 | o << 8 | i, s = Math.round(O0(n, e) * 255);
159
159
  return `#${a.toString(16).padStart(6, "0")}${s !== 255 ? s.toString(16).padStart(2, "0") : ""}`;
160
160
  }
161
- function vn(n = null) {
161
+ function Mn(n = null) {
162
162
  const {
163
163
  url: e = "https://wikipedia.org/",
164
- backgroundColor: t = $.TRANSPARENT,
164
+ backgroundColor: t = W.TRANSPARENT,
165
165
  strokeColor: o = Q,
166
166
  strokeWidth: i = 0,
167
167
  pointerEvents: a = "auto",
168
168
  scale: s = 1,
169
- anchor: r = h0,
169
+ anchor: r = ht,
170
170
  height: h = 1e3,
171
171
  width: c = 1e3,
172
172
  x: f = 0,
173
173
  y: d = 0
174
174
  } = n || {}, l = document.createElement("iframe");
175
- l.src = e, l.style.backgroundColor = S0(t), l.style.border = i > 0 ? `${i}px solid ${S0(o)}` : "none", l.style.pointerEvents = a;
175
+ l.src = e, l.style.backgroundColor = Et(t), l.style.border = i > 0 ? `${i}px solid ${Et(o)}` : "none", l.style.pointerEvents = a;
176
176
  const u = (100 / s).toFixed(3) + "%";
177
- return l.style.height = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.width = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left", St({
177
+ return l.style.height = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.width = i === 0 ? u : `calc(${u} - ${i * 2}px)`, l.style.transform = `scale(${s})`, l.style.transformOrigin = "top left", _0({
178
178
  content: l,
179
179
  anchor: r,
180
180
  height: h,
@@ -183,19 +183,19 @@ function vn(n = null) {
183
183
  y: d
184
184
  });
185
185
  }
186
- const x0 = {
186
+ const xt = {
187
187
  LEFT: "left",
188
188
  CENTER: "center",
189
189
  RIGHT: "right"
190
- }, Wt = x0.LEFT;
191
- function s0(n, e) {
190
+ }, Q0 = xt.LEFT;
191
+ function st(n, e) {
192
192
  throw new Error("Unexpected value: " + n);
193
193
  }
194
- function wn(n = null) {
194
+ function Ln(n = null) {
195
195
  const {
196
- alignment: e = x0.LEFT,
196
+ alignment: e = xt.LEFT,
197
197
  scale: t = 1,
198
- anchor: o = h0,
198
+ anchor: o = ht,
199
199
  height: i = 1e3,
200
200
  width: a = 1e3,
201
201
  x: s = 0,
@@ -204,17 +204,17 @@ function wn(n = null) {
204
204
  function h(c) {
205
205
  const f = document.createElement("video");
206
206
  switch (f.autoplay = !0, f.style.transform = `scale(${t})`, e) {
207
- case x0.LEFT:
207
+ case xt.LEFT:
208
208
  f.style.transformOrigin = "top left";
209
209
  break;
210
- case x0.CENTER:
210
+ case xt.CENTER:
211
211
  f.style.transformOrigin = "top center";
212
212
  break;
213
- case x0.RIGHT:
213
+ case xt.RIGHT:
214
214
  f.style.transformOrigin = "top right";
215
215
  break;
216
216
  default:
217
- s0(e);
217
+ st(e);
218
218
  }
219
219
  c.appendChild(f);
220
220
  const d = {
@@ -234,7 +234,7 @@ function wn(n = null) {
234
234
  f.srcObject.getTracks().forEach((u) => u.stop()), f.style.display = "none", f.srcObject = null;
235
235
  };
236
236
  }
237
- return St({
237
+ return _0({
238
238
  content: null,
239
239
  setup: h,
240
240
  anchor: o,
@@ -258,16 +258,16 @@ const U = {
258
258
  SVG: "SVG",
259
259
  TEXT: "Text"
260
260
  };
261
- function l0(n) {
261
+ function lt(n) {
262
262
  return {
263
263
  objectType: U.SLIDE_OBJECT,
264
264
  opacity: 1,
265
265
  ...n
266
266
  };
267
267
  }
268
- function mn(n = null) {
268
+ function Tn(n = null) {
269
269
  const { arrowheadSize: e, width: t = 10, ...o } = n || {}, i = e ?? t * 4;
270
- return l0({
270
+ return lt({
271
271
  objectType: U.ARROW,
272
272
  arrowheadSize: i,
273
273
  color: Q,
@@ -283,25 +283,25 @@ function mn(n = null) {
283
283
  ...o
284
284
  });
285
285
  }
286
- const Zt = 50;
287
- function An(n = null) {
288
- return l0({
286
+ const J0 = 50;
287
+ function Cn(n = null) {
288
+ return lt({
289
289
  objectType: U.CIRCLE,
290
- anchor: h0,
290
+ anchor: ht,
291
291
  strokeColor: Q,
292
292
  strokeWidth: 0,
293
293
  drawn: 1,
294
294
  fillColor: Q,
295
- radius: Zt,
295
+ radius: J0,
296
296
  x: 0,
297
297
  y: 0,
298
298
  ...n
299
299
  });
300
300
  }
301
- function st(n, e = null) {
302
- return l0({
301
+ function h0(n, e = null) {
302
+ return lt({
303
303
  objectType: U.GROUP,
304
- anchor: h0,
304
+ anchor: ht,
305
305
  height: 0,
306
306
  objects: n,
307
307
  previewColor: null,
@@ -323,9 +323,9 @@ function st(n, e = null) {
323
323
  ...e
324
324
  });
325
325
  }
326
- function bn(n) {
326
+ function Pn(n) {
327
327
  const {
328
- anchor: e = h0,
328
+ anchor: e = ht,
329
329
  cols: t = 1,
330
330
  rows: o = 1,
331
331
  gapX: i = 0,
@@ -338,23 +338,23 @@ function bn(n) {
338
338
  objects: d = () => null
339
339
  } = n, l = [], u = [];
340
340
  let m = 0, y = 0;
341
- for (let T = 0; T < o; T++) {
342
- const S = [];
341
+ for (let E = 0; E < o; E++) {
342
+ const L = [];
343
343
  m = 0;
344
- let P = 0;
345
- for (let E = 0; E < t; E++) {
346
- const C = d(T, E), O = typeof r == "function" ? r(T, E) : r, R = typeof h == "function" ? h(T, E) : h;
347
- S.push(C), C != null && u.push(
348
- st([C], {
344
+ let C = 0;
345
+ for (let S = 0; S < t; S++) {
346
+ const T = d(E, S), I = typeof r == "function" ? r(E, S) : r, N = typeof h == "function" ? h(E, S) : h;
347
+ L.push(T), T != null && u.push(
348
+ h0([T], {
349
349
  x: m,
350
350
  y
351
351
  })
352
- ), m += O + i, P = Math.max(P, R);
352
+ ), m += I + i, C = Math.max(C, N);
353
353
  }
354
- l.push(S), y += P + a;
354
+ l.push(L), y += C + a;
355
355
  }
356
356
  return {
357
- grid: st(u, {
357
+ grid: h0(u, {
358
358
  x: c,
359
359
  y: f,
360
360
  height: y - a,
@@ -365,10 +365,10 @@ function bn(n) {
365
365
  objects: l
366
366
  };
367
367
  }
368
- function Mn(n = null) {
369
- return l0({
368
+ function En(n = null) {
369
+ return lt({
370
370
  objectType: U.IMAGE,
371
- anchor: h0,
371
+ anchor: ht,
372
372
  cornerRadius: 0,
373
373
  height: 100,
374
374
  imageId: "",
@@ -379,8 +379,8 @@ function Mn(n = null) {
379
379
  ...n
380
380
  });
381
381
  }
382
- function Ln(n = null) {
383
- return l0({
382
+ function Sn(n = null) {
383
+ return lt({
384
384
  objectType: U.LINE,
385
385
  color: Q,
386
386
  drawn: 1,
@@ -394,10 +394,10 @@ function Ln(n = null) {
394
394
  ...n
395
395
  });
396
396
  }
397
- function Tn(n, e = null) {
398
- return l0({
397
+ function kn(n, e = null) {
398
+ return lt({
399
399
  objectType: U.MASK,
400
- anchor: h0,
400
+ anchor: ht,
401
401
  height: 100,
402
402
  objects: n,
403
403
  preview: !1,
@@ -407,52 +407,52 @@ function Tn(n, e = null) {
407
407
  ...e
408
408
  });
409
409
  }
410
- var Vt = Object.defineProperty, _ = (n, e) => Vt(n, "name", { value: e, configurable: !0 }), P0 = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, Kt = /([astvzqmhlc])([^astvzqmhlc]*)/gi, Qt = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, Jt = _((n) => {
411
- const e = (n && n.length > 0 ? n : "M0,0").match(Kt);
410
+ var te = Object.defineProperty, O = (n, e) => te(n, "name", { value: e, configurable: !0 }), Ct = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, ee = /([astvzqmhlc])([^astvzqmhlc]*)/gi, ne = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi, re = O((n) => {
411
+ const e = (n && n.length > 0 ? n : "M0,0").match(ee);
412
412
  if (!e) throw new Error(`No path elements found in string ${n}`);
413
413
  return e.reduce((t, o) => {
414
- let i = o.charAt(0), a = i.toLowerCase(), s = te(o.substring(1));
414
+ let i = o.charAt(0), a = i.toLowerCase(), s = ie(o.substring(1));
415
415
  if (a === "m" && s.length > 2 && (t.push([i, ...s.splice(0, 2)]), a = "l", i = i === "m" ? "l" : "L"), a.toLowerCase() === "a" && (s.length === 5 || s.length === 6)) {
416
416
  const r = o.substring(1).trim().split(" ");
417
417
  s = [Number(r[0]), Number(r[1]), Number(r[2]), Number(r[3].charAt(0)), Number(r[3].charAt(1)), Number(r[3].substring(2)), Number(r[4])];
418
418
  }
419
419
  for (; s.length >= 0; ) {
420
- if (s.length === P0[a]) {
421
- t.push([i, ...s.splice(0, P0[a])]);
420
+ if (s.length === Ct[a]) {
421
+ t.push([i, ...s.splice(0, Ct[a])]);
422
422
  break;
423
423
  }
424
- if (s.length < P0[a]) throw new Error(`Malformed path data: "${i}" must have ${P0[a]} elements and has ${s.length}: ${o}`);
425
- t.push([i, ...s.splice(0, P0[a])]);
424
+ if (s.length < Ct[a]) throw new Error(`Malformed path data: "${i}" must have ${Ct[a]} elements and has ${s.length}: ${o}`);
425
+ t.push([i, ...s.splice(0, Ct[a])]);
426
426
  }
427
427
  return t;
428
428
  }, []);
429
- }, "default"), te = _((n) => {
430
- const e = n.match(Qt);
429
+ }, "default"), ie = O((n) => {
430
+ const e = n.match(ne);
431
431
  return e ? e.map(Number) : [];
432
- }, "parseValues"), w0, J = (w0 = class {
432
+ }, "parseValues"), wt, J = (wt = class {
433
433
  constructor(e, t, o, i) {
434
434
  k(this, "x0");
435
435
  k(this, "x1");
436
436
  k(this, "y0");
437
437
  k(this, "y1");
438
- k(this, "getTotalLength", _(() => Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), "getTotalLength"));
439
- k(this, "getPointAtLength", _((e) => {
438
+ k(this, "getTotalLength", O(() => Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), "getTotalLength"));
439
+ k(this, "getPointAtLength", O((e) => {
440
440
  let t = e / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
441
441
  t = Number.isNaN(t) ? 1 : t;
442
442
  const o = (this.x1 - this.x0) * t, i = (this.y1 - this.y0) * t;
443
443
  return { x: this.x0 + o, y: this.y0 + i };
444
444
  }, "getPointAtLength"));
445
- k(this, "getTangentAtLength", _((e) => {
445
+ k(this, "getTangentAtLength", O((e) => {
446
446
  const t = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
447
447
  return { x: (this.x1 - this.x0) / t, y: (this.y1 - this.y0) / t };
448
448
  }, "getTangentAtLength"));
449
- k(this, "getPropertiesAtLength", _((e) => {
449
+ k(this, "getPropertiesAtLength", O((e) => {
450
450
  const t = this.getPointAtLength(e), o = this.getTangentAtLength(e);
451
451
  return { x: t.x, y: t.y, tangentX: o.x, tangentY: o.y };
452
452
  }, "getPropertiesAtLength"));
453
453
  this.x0 = e, this.x1 = t, this.y0 = o, this.y1 = i;
454
454
  }
455
- }, _(w0, "LinearPosition"), w0), m0, at = (m0 = class {
455
+ }, O(wt, "LinearPosition"), wt), mt, l0 = (mt = class {
456
456
  constructor(e, t, o, i, a, s, r, h, c) {
457
457
  k(this, "x0");
458
458
  k(this, "y0");
@@ -464,13 +464,13 @@ var Vt = Object.defineProperty, _ = (n, e) => Vt(n, "name", { value: e, configur
464
464
  k(this, "x1");
465
465
  k(this, "y1");
466
466
  k(this, "length");
467
- k(this, "getTotalLength", _(() => this.length, "getTotalLength"));
468
- k(this, "getPointAtLength", _((e) => {
467
+ k(this, "getTotalLength", O(() => this.length, "getTotalLength"));
468
+ k(this, "getPointAtLength", O((e) => {
469
469
  e < 0 ? e = 0 : e > this.length && (e = this.length);
470
- const t = ht({ x: this.x0, y: this.y0 }, this.rx, this.ry, this.xAxisRotate, this.LargeArcFlag, this.SweepFlag, { x: this.x1, y: this.y1 }, e / this.length);
470
+ const t = c0({ x: this.x0, y: this.y0 }, this.rx, this.ry, this.xAxisRotate, this.LargeArcFlag, this.SweepFlag, { x: this.x1, y: this.y1 }, e / this.length);
471
471
  return { x: t.x, y: t.y };
472
472
  }, "getPointAtLength"));
473
- k(this, "getTangentAtLength", _((e) => {
473
+ k(this, "getTangentAtLength", O((e) => {
474
474
  e < 0 ? e = 0 : e > this.length && (e = this.length);
475
475
  const t = 0.05, o = this.getPointAtLength(e);
476
476
  let i;
@@ -478,74 +478,74 @@ var Vt = Object.defineProperty, _ = (n, e) => Vt(n, "name", { value: e, configur
478
478
  const a = i.x - o.x, s = i.y - o.y, r = Math.sqrt(a * a + s * s);
479
479
  return e < this.length - t ? { x: -a / r, y: -s / r } : { x: a / r, y: s / r };
480
480
  }, "getTangentAtLength"));
481
- k(this, "getPropertiesAtLength", _((e) => {
481
+ k(this, "getPropertiesAtLength", O((e) => {
482
482
  const t = this.getTangentAtLength(e), o = this.getPointAtLength(e);
483
483
  return { x: o.x, y: o.y, tangentX: t.x, tangentY: t.y };
484
484
  }, "getPropertiesAtLength"));
485
485
  this.x0 = e, this.y0 = t, this.rx = o, this.ry = i, this.xAxisRotate = a, this.LargeArcFlag = s, this.SweepFlag = r, this.x1 = h, this.y1 = c;
486
- const f = ee(300, function(d) {
487
- return ht({ x: e, y: t }, o, i, a, s, r, { x: h, y: c }, d);
486
+ const f = oe(300, function(d) {
487
+ return c0({ x: e, y: t }, o, i, a, s, r, { x: h, y: c }, d);
488
488
  });
489
489
  this.length = f.arcLength;
490
490
  }
491
- }, _(m0, "Arc"), m0), ht = _((n, e, t, o, i, a, s, r) => {
492
- e = Math.abs(e), t = Math.abs(t), o = ne(o, 360);
493
- const h = re(o);
491
+ }, O(mt, "Arc"), mt), c0 = O((n, e, t, o, i, a, s, r) => {
492
+ e = Math.abs(e), t = Math.abs(t), o = se(o, 360);
493
+ const h = ae(o);
494
494
  if (n.x === s.x && n.y === s.y) return { x: n.x, y: n.y, ellipticalArcAngle: 0 };
495
495
  if (e === 0 || t === 0) return { x: 0, y: 0, ellipticalArcAngle: 0 };
496
496
  const c = (n.x - s.x) / 2, f = (n.y - s.y) / 2, d = { x: Math.cos(h) * c + Math.sin(h) * f, y: -Math.sin(h) * c + Math.cos(h) * f }, l = Math.pow(d.x, 2) / Math.pow(e, 2) + Math.pow(d.y, 2) / Math.pow(t, 2);
497
497
  l > 1 && (e = Math.sqrt(l) * e, t = Math.sqrt(l) * t);
498
498
  let u = (Math.pow(e, 2) * Math.pow(t, 2) - Math.pow(e, 2) * Math.pow(d.y, 2) - Math.pow(t, 2) * Math.pow(d.x, 2)) / (Math.pow(e, 2) * Math.pow(d.y, 2) + Math.pow(t, 2) * Math.pow(d.x, 2));
499
499
  u = u < 0 ? 0 : u;
500
- const m = (i !== a ? 1 : -1) * Math.sqrt(u), y = m * (e * d.y / t), M = m * (-t * d.x / e), T = { x: Math.cos(h) * y - Math.sin(h) * M + (n.x + s.x) / 2, y: Math.sin(h) * y + Math.cos(h) * M + (n.y + s.y) / 2 }, S = { x: (d.x - y) / e, y: (d.y - M) / t }, P = ct({ x: 1, y: 0 }, S);
501
- let E = ct(S, { x: (-d.x - y) / e, y: (-d.y - M) / t });
502
- !a && E > 0 ? E -= 2 * Math.PI : a && E < 0 && (E += 2 * Math.PI), E %= 2 * Math.PI;
503
- const C = P + E * r, O = e * Math.cos(C), R = t * Math.sin(C);
504
- return { x: Math.cos(h) * O - Math.sin(h) * R + T.x, y: Math.sin(h) * O + Math.cos(h) * R + T.y, ellipticalArcStartAngle: P, ellipticalArcEndAngle: P + E, ellipticalArcAngle: C, ellipticalArcCenter: T, resultantRx: e, resultantRy: t };
505
- }, "pointOnEllipticalArc"), ee = _((n, e) => {
500
+ const m = (i !== a ? 1 : -1) * Math.sqrt(u), y = m * (e * d.y / t), M = m * (-t * d.x / e), E = { x: Math.cos(h) * y - Math.sin(h) * M + (n.x + s.x) / 2, y: Math.sin(h) * y + Math.cos(h) * M + (n.y + s.y) / 2 }, L = { x: (d.x - y) / e, y: (d.y - M) / t }, C = f0({ x: 1, y: 0 }, L);
501
+ let S = f0(L, { x: (-d.x - y) / e, y: (-d.y - M) / t });
502
+ !a && S > 0 ? S -= 2 * Math.PI : a && S < 0 && (S += 2 * Math.PI), S %= 2 * Math.PI;
503
+ const T = C + S * r, I = e * Math.cos(T), N = t * Math.sin(T);
504
+ return { x: Math.cos(h) * I - Math.sin(h) * N + E.x, y: Math.sin(h) * I + Math.cos(h) * N + E.y, ellipticalArcStartAngle: C, ellipticalArcEndAngle: C + S, ellipticalArcAngle: T, ellipticalArcCenter: E, resultantRx: e, resultantRy: t };
505
+ }, "pointOnEllipticalArc"), oe = O((n, e) => {
506
506
  n = n ?? 500;
507
507
  let t = 0;
508
508
  const o = [], i = [];
509
509
  let a, s = e(0);
510
510
  for (let r = 0; r < n; r++) {
511
- const h = ie(r * (1 / n), 0, 1);
512
- a = e(h), t += lt(s, a), i.push([s, a]), o.push({ t: h, arcLength: t }), s = a;
511
+ const h = he(r * (1 / n), 0, 1);
512
+ a = e(h), t += u0(s, a), i.push([s, a]), o.push({ t: h, arcLength: t }), s = a;
513
513
  }
514
- return a = e(1), i.push([s, a]), t += lt(s, a), o.push({ t: 1, arcLength: t }), { arcLength: t, arcLengthMap: o, approximationLines: i };
515
- }, "approximateArcLengthOfCurve"), ne = _((n, e) => (n % e + e) % e, "mod"), re = _((n) => n * (Math.PI / 180), "toRadians"), lt = _((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), ie = _((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), ct = _((n, e) => {
514
+ return a = e(1), i.push([s, a]), t += u0(s, a), o.push({ t: 1, arcLength: t }), { arcLength: t, arcLengthMap: o, approximationLines: i };
515
+ }, "approximateArcLengthOfCurve"), se = O((n, e) => (n % e + e) % e, "mod"), ae = O((n) => n * (Math.PI / 180), "toRadians"), u0 = O((n, e) => Math.sqrt(Math.pow(e.x - n.x, 2) + Math.pow(e.y - n.y, 2)), "distance"), he = O((n, e, t) => Math.min(Math.max(n, e), t), "clamp"), f0 = O((n, e) => {
516
516
  const t = n.x * e.x + n.y * e.y, o = Math.sqrt((Math.pow(n.x, 2) + Math.pow(n.y, 2)) * (Math.pow(e.x, 2) + Math.pow(e.y, 2)));
517
517
  return (n.x * e.y - n.y * e.x < 0 ? -1 : 1) * Math.acos(t / o);
518
- }, "angleBetween"), oe = [[], [], [-0.5773502691896257, 0.5773502691896258], [0, -0.7745966692414833, 0.7745966692414833], [-0.33998104358485626, 0.33998104358485626, -0.8611363115940526, 0.8611363115940526], [0, -0.5384693101056831, 0.5384693101056831, -0.906179845938664, 0.906179845938664], [0.6612093864662645, -0.6612093864662645, -0.2386191860831969, 0.2386191860831969, -0.932469514203152, 0.932469514203152], [0, 0.4058451513773972, -0.4058451513773972, -0.7415311855993945, 0.7415311855993945, -0.9491079123427585, 0.9491079123427585], [-0.1834346424956498, 0.1834346424956498, -0.525532409916329, 0.525532409916329, -0.7966664774136267, 0.7966664774136267, -0.9602898564975363, 0.9602898564975363], [0, -0.8360311073266358, 0.8360311073266358, -0.9681602395076261, 0.9681602395076261, -0.3242534234038089, 0.3242534234038089, -0.6133714327005904, 0.6133714327005904], [-0.14887433898163122, 0.14887433898163122, -0.4333953941292472, 0.4333953941292472, -0.6794095682990244, 0.6794095682990244, -0.8650633666889845, 0.8650633666889845, -0.9739065285171717, 0.9739065285171717], [0, -0.26954315595234496, 0.26954315595234496, -0.5190961292068118, 0.5190961292068118, -0.7301520055740494, 0.7301520055740494, -0.8870625997680953, 0.8870625997680953, -0.978228658146057, 0.978228658146057], [-0.1252334085114689, 0.1252334085114689, -0.3678314989981802, 0.3678314989981802, -0.5873179542866175, 0.5873179542866175, -0.7699026741943047, 0.7699026741943047, -0.9041172563704749, 0.9041172563704749, -0.9815606342467192, 0.9815606342467192], [0, -0.2304583159551348, 0.2304583159551348, -0.44849275103644687, 0.44849275103644687, -0.6423493394403402, 0.6423493394403402, -0.8015780907333099, 0.8015780907333099, -0.9175983992229779, 0.9175983992229779, -0.9841830547185881, 0.9841830547185881], [-0.10805494870734367, 0.10805494870734367, -0.31911236892788974, 0.31911236892788974, -0.5152486363581541, 0.5152486363581541, -0.6872929048116855, 0.6872929048116855, -0.827201315069765, 0.827201315069765, -0.9284348836635735, 0.9284348836635735, -0.9862838086968123, 0.9862838086968123], [0, -0.20119409399743451, 0.20119409399743451, -0.3941513470775634, 0.3941513470775634, -0.5709721726085388, 0.5709721726085388, -0.7244177313601701, 0.7244177313601701, -0.8482065834104272, 0.8482065834104272, -0.937273392400706, 0.937273392400706, -0.9879925180204854, 0.9879925180204854], [-0.09501250983763744, 0.09501250983763744, -0.2816035507792589, 0.2816035507792589, -0.45801677765722737, 0.45801677765722737, -0.6178762444026438, 0.6178762444026438, -0.755404408355003, 0.755404408355003, -0.8656312023878318, 0.8656312023878318, -0.9445750230732326, 0.9445750230732326, -0.9894009349916499, 0.9894009349916499], [0, -0.17848418149584785, 0.17848418149584785, -0.3512317634538763, 0.3512317634538763, -0.5126905370864769, 0.5126905370864769, -0.6576711592166907, 0.6576711592166907, -0.7815140038968014, 0.7815140038968014, -0.8802391537269859, 0.8802391537269859, -0.9506755217687678, 0.9506755217687678, -0.9905754753144174, 0.9905754753144174], [-0.0847750130417353, 0.0847750130417353, -0.2518862256915055, 0.2518862256915055, -0.41175116146284263, 0.41175116146284263, -0.5597708310739475, 0.5597708310739475, -0.6916870430603532, 0.6916870430603532, -0.8037049589725231, 0.8037049589725231, -0.8926024664975557, 0.8926024664975557, -0.9558239495713977, 0.9558239495713977, -0.9915651684209309, 0.9915651684209309], [0, -0.16035864564022537, 0.16035864564022537, -0.31656409996362983, 0.31656409996362983, -0.46457074137596094, 0.46457074137596094, -0.600545304661681, 0.600545304661681, -0.7209661773352294, 0.7209661773352294, -0.8227146565371428, 0.8227146565371428, -0.9031559036148179, 0.9031559036148179, -0.96020815213483, 0.96020815213483, -0.9924068438435844, 0.9924068438435844], [-0.07652652113349734, 0.07652652113349734, -0.22778585114164507, 0.22778585114164507, -0.37370608871541955, 0.37370608871541955, -0.5108670019508271, 0.5108670019508271, -0.636053680726515, 0.636053680726515, -0.7463319064601508, 0.7463319064601508, -0.8391169718222188, 0.8391169718222188, -0.912234428251326, 0.912234428251326, -0.9639719272779138, 0.9639719272779138, -0.9931285991850949, 0.9931285991850949], [0, -0.1455618541608951, 0.1455618541608951, -0.2880213168024011, 0.2880213168024011, -0.4243421202074388, 0.4243421202074388, -0.5516188358872198, 0.5516188358872198, -0.6671388041974123, 0.6671388041974123, -0.7684399634756779, 0.7684399634756779, -0.8533633645833173, 0.8533633645833173, -0.9200993341504008, 0.9200993341504008, -0.9672268385663063, 0.9672268385663063, -0.9937521706203895, 0.9937521706203895], [-0.06973927331972223, 0.06973927331972223, -0.20786042668822127, 0.20786042668822127, -0.34193582089208424, 0.34193582089208424, -0.469355837986757, 0.469355837986757, -0.5876404035069116, 0.5876404035069116, -0.6944872631866827, 0.6944872631866827, -0.7878168059792081, 0.7878168059792081, -0.8658125777203002, 0.8658125777203002, -0.926956772187174, 0.926956772187174, -0.9700604978354287, 0.9700604978354287, -0.9942945854823992, 0.9942945854823992], [0, -0.1332568242984661, 0.1332568242984661, -0.26413568097034495, 0.26413568097034495, -0.3903010380302908, 0.3903010380302908, -0.5095014778460075, 0.5095014778460075, -0.6196098757636461, 0.6196098757636461, -0.7186613631319502, 0.7186613631319502, -0.8048884016188399, 0.8048884016188399, -0.8767523582704416, 0.8767523582704416, -0.9329710868260161, 0.9329710868260161, -0.9725424712181152, 0.9725424712181152, -0.9947693349975522, 0.9947693349975522], [-0.06405689286260563, 0.06405689286260563, -0.1911188674736163, 0.1911188674736163, -0.3150426796961634, 0.3150426796961634, -0.4337935076260451, 0.4337935076260451, -0.5454214713888396, 0.5454214713888396, -0.6480936519369755, 0.6480936519369755, -0.7401241915785544, 0.7401241915785544, -0.820001985973903, 0.820001985973903, -0.8864155270044011, 0.8864155270044011, -0.9382745520027328, 0.9382745520027328, -0.9747285559713095, 0.9747285559713095, -0.9951872199970213, 0.9951872199970213]], se = [[], [], [1, 1], [0.8888888888888888, 0.5555555555555556, 0.5555555555555556], [0.6521451548625461, 0.6521451548625461, 0.34785484513745385, 0.34785484513745385], [0.5688888888888889, 0.47862867049936647, 0.47862867049936647, 0.23692688505618908, 0.23692688505618908], [0.3607615730481386, 0.3607615730481386, 0.46791393457269104, 0.46791393457269104, 0.17132449237917036, 0.17132449237917036], [0.4179591836734694, 0.3818300505051189, 0.3818300505051189, 0.27970539148927664, 0.27970539148927664, 0.1294849661688697, 0.1294849661688697], [0.362683783378362, 0.362683783378362, 0.31370664587788727, 0.31370664587788727, 0.22238103445337448, 0.22238103445337448, 0.10122853629037626, 0.10122853629037626], [0.3302393550012598, 0.1806481606948574, 0.1806481606948574, 0.08127438836157441, 0.08127438836157441, 0.31234707704000286, 0.31234707704000286, 0.26061069640293544, 0.26061069640293544], [0.29552422471475287, 0.29552422471475287, 0.26926671930999635, 0.26926671930999635, 0.21908636251598204, 0.21908636251598204, 0.1494513491505806, 0.1494513491505806, 0.06667134430868814, 0.06667134430868814], [0.2729250867779006, 0.26280454451024665, 0.26280454451024665, 0.23319376459199048, 0.23319376459199048, 0.18629021092773426, 0.18629021092773426, 0.1255803694649046, 0.1255803694649046, 0.05566856711617366, 0.05566856711617366], [0.24914704581340277, 0.24914704581340277, 0.2334925365383548, 0.2334925365383548, 0.20316742672306592, 0.20316742672306592, 0.16007832854334622, 0.16007832854334622, 0.10693932599531843, 0.10693932599531843, 0.04717533638651183, 0.04717533638651183], [0.2325515532308739, 0.22628318026289723, 0.22628318026289723, 0.2078160475368885, 0.2078160475368885, 0.17814598076194574, 0.17814598076194574, 0.13887351021978725, 0.13887351021978725, 0.09212149983772845, 0.09212149983772845, 0.04048400476531588, 0.04048400476531588], [0.2152638534631578, 0.2152638534631578, 0.2051984637212956, 0.2051984637212956, 0.18553839747793782, 0.18553839747793782, 0.15720316715819355, 0.15720316715819355, 0.12151857068790319, 0.12151857068790319, 0.08015808715976021, 0.08015808715976021, 0.03511946033175186, 0.03511946033175186], [0.2025782419255613, 0.19843148532711158, 0.19843148532711158, 0.1861610000155622, 0.1861610000155622, 0.16626920581699392, 0.16626920581699392, 0.13957067792615432, 0.13957067792615432, 0.10715922046717194, 0.10715922046717194, 0.07036604748810812, 0.07036604748810812, 0.03075324199611727, 0.03075324199611727], [0.1894506104550685, 0.1894506104550685, 0.18260341504492358, 0.18260341504492358, 0.16915651939500254, 0.16915651939500254, 0.14959598881657674, 0.14959598881657674, 0.12462897125553388, 0.12462897125553388, 0.09515851168249279, 0.09515851168249279, 0.062253523938647894, 0.062253523938647894, 0.027152459411754096, 0.027152459411754096], [0.17944647035620653, 0.17656270536699264, 0.17656270536699264, 0.16800410215645004, 0.16800410215645004, 0.15404576107681028, 0.15404576107681028, 0.13513636846852548, 0.13513636846852548, 0.11188384719340397, 0.11188384719340397, 0.08503614831717918, 0.08503614831717918, 0.0554595293739872, 0.0554595293739872, 0.02414830286854793, 0.02414830286854793], [0.1691423829631436, 0.1691423829631436, 0.16427648374583273, 0.16427648374583273, 0.15468467512626524, 0.15468467512626524, 0.14064291467065065, 0.14064291467065065, 0.12255520671147846, 0.12255520671147846, 0.10094204410628717, 0.10094204410628717, 0.07642573025488905, 0.07642573025488905, 0.0497145488949698, 0.0497145488949698, 0.02161601352648331, 0.02161601352648331], [0.1610544498487837, 0.15896884339395434, 0.15896884339395434, 0.15276604206585967, 0.15276604206585967, 0.1426067021736066, 0.1426067021736066, 0.12875396253933621, 0.12875396253933621, 0.11156664554733399, 0.11156664554733399, 0.09149002162245, 0.09149002162245, 0.06904454273764123, 0.06904454273764123, 0.0448142267656996, 0.0448142267656996, 0.019461788229726478, 0.019461788229726478], [0.15275338713072584, 0.15275338713072584, 0.14917298647260374, 0.14917298647260374, 0.14209610931838204, 0.14209610931838204, 0.13168863844917664, 0.13168863844917664, 0.11819453196151841, 0.11819453196151841, 0.10193011981724044, 0.10193011981724044, 0.08327674157670475, 0.08327674157670475, 0.06267204833410907, 0.06267204833410907, 0.04060142980038694, 0.04060142980038694, 0.017614007139152118, 0.017614007139152118], [0.14608113364969041, 0.14452440398997005, 0.14452440398997005, 0.13988739479107315, 0.13988739479107315, 0.13226893863333747, 0.13226893863333747, 0.12183141605372853, 0.12183141605372853, 0.10879729916714838, 0.10879729916714838, 0.09344442345603386, 0.09344442345603386, 0.0761001136283793, 0.0761001136283793, 0.057134425426857205, 0.057134425426857205, 0.036953789770852494, 0.036953789770852494, 0.016017228257774335, 0.016017228257774335], [0.13925187285563198, 0.13925187285563198, 0.13654149834601517, 0.13654149834601517, 0.13117350478706238, 0.13117350478706238, 0.12325237681051242, 0.12325237681051242, 0.11293229608053922, 0.11293229608053922, 0.10041414444288096, 0.10041414444288096, 0.08594160621706773, 0.08594160621706773, 0.06979646842452049, 0.06979646842452049, 0.052293335152683286, 0.052293335152683286, 0.03377490158481415, 0.03377490158481415, 0.0146279952982722, 0.0146279952982722], [0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771], [0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]], ae = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], he = _((n, e, t) => ({ x: (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], y: (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3] }), "cubicPoint"), le = _((n, e, t) => kt([3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])], [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])], t), "cubicDerivative"), ce = _((n, e, t) => {
518
+ }, "angleBetween"), le = [[], [], [-0.5773502691896257, 0.5773502691896258], [0, -0.7745966692414833, 0.7745966692414833], [-0.33998104358485626, 0.33998104358485626, -0.8611363115940526, 0.8611363115940526], [0, -0.5384693101056831, 0.5384693101056831, -0.906179845938664, 0.906179845938664], [0.6612093864662645, -0.6612093864662645, -0.2386191860831969, 0.2386191860831969, -0.932469514203152, 0.932469514203152], [0, 0.4058451513773972, -0.4058451513773972, -0.7415311855993945, 0.7415311855993945, -0.9491079123427585, 0.9491079123427585], [-0.1834346424956498, 0.1834346424956498, -0.525532409916329, 0.525532409916329, -0.7966664774136267, 0.7966664774136267, -0.9602898564975363, 0.9602898564975363], [0, -0.8360311073266358, 0.8360311073266358, -0.9681602395076261, 0.9681602395076261, -0.3242534234038089, 0.3242534234038089, -0.6133714327005904, 0.6133714327005904], [-0.14887433898163122, 0.14887433898163122, -0.4333953941292472, 0.4333953941292472, -0.6794095682990244, 0.6794095682990244, -0.8650633666889845, 0.8650633666889845, -0.9739065285171717, 0.9739065285171717], [0, -0.26954315595234496, 0.26954315595234496, -0.5190961292068118, 0.5190961292068118, -0.7301520055740494, 0.7301520055740494, -0.8870625997680953, 0.8870625997680953, -0.978228658146057, 0.978228658146057], [-0.1252334085114689, 0.1252334085114689, -0.3678314989981802, 0.3678314989981802, -0.5873179542866175, 0.5873179542866175, -0.7699026741943047, 0.7699026741943047, -0.9041172563704749, 0.9041172563704749, -0.9815606342467192, 0.9815606342467192], [0, -0.2304583159551348, 0.2304583159551348, -0.44849275103644687, 0.44849275103644687, -0.6423493394403402, 0.6423493394403402, -0.8015780907333099, 0.8015780907333099, -0.9175983992229779, 0.9175983992229779, -0.9841830547185881, 0.9841830547185881], [-0.10805494870734367, 0.10805494870734367, -0.31911236892788974, 0.31911236892788974, -0.5152486363581541, 0.5152486363581541, -0.6872929048116855, 0.6872929048116855, -0.827201315069765, 0.827201315069765, -0.9284348836635735, 0.9284348836635735, -0.9862838086968123, 0.9862838086968123], [0, -0.20119409399743451, 0.20119409399743451, -0.3941513470775634, 0.3941513470775634, -0.5709721726085388, 0.5709721726085388, -0.7244177313601701, 0.7244177313601701, -0.8482065834104272, 0.8482065834104272, -0.937273392400706, 0.937273392400706, -0.9879925180204854, 0.9879925180204854], [-0.09501250983763744, 0.09501250983763744, -0.2816035507792589, 0.2816035507792589, -0.45801677765722737, 0.45801677765722737, -0.6178762444026438, 0.6178762444026438, -0.755404408355003, 0.755404408355003, -0.8656312023878318, 0.8656312023878318, -0.9445750230732326, 0.9445750230732326, -0.9894009349916499, 0.9894009349916499], [0, -0.17848418149584785, 0.17848418149584785, -0.3512317634538763, 0.3512317634538763, -0.5126905370864769, 0.5126905370864769, -0.6576711592166907, 0.6576711592166907, -0.7815140038968014, 0.7815140038968014, -0.8802391537269859, 0.8802391537269859, -0.9506755217687678, 0.9506755217687678, -0.9905754753144174, 0.9905754753144174], [-0.0847750130417353, 0.0847750130417353, -0.2518862256915055, 0.2518862256915055, -0.41175116146284263, 0.41175116146284263, -0.5597708310739475, 0.5597708310739475, -0.6916870430603532, 0.6916870430603532, -0.8037049589725231, 0.8037049589725231, -0.8926024664975557, 0.8926024664975557, -0.9558239495713977, 0.9558239495713977, -0.9915651684209309, 0.9915651684209309], [0, -0.16035864564022537, 0.16035864564022537, -0.31656409996362983, 0.31656409996362983, -0.46457074137596094, 0.46457074137596094, -0.600545304661681, 0.600545304661681, -0.7209661773352294, 0.7209661773352294, -0.8227146565371428, 0.8227146565371428, -0.9031559036148179, 0.9031559036148179, -0.96020815213483, 0.96020815213483, -0.9924068438435844, 0.9924068438435844], [-0.07652652113349734, 0.07652652113349734, -0.22778585114164507, 0.22778585114164507, -0.37370608871541955, 0.37370608871541955, -0.5108670019508271, 0.5108670019508271, -0.636053680726515, 0.636053680726515, -0.7463319064601508, 0.7463319064601508, -0.8391169718222188, 0.8391169718222188, -0.912234428251326, 0.912234428251326, -0.9639719272779138, 0.9639719272779138, -0.9931285991850949, 0.9931285991850949], [0, -0.1455618541608951, 0.1455618541608951, -0.2880213168024011, 0.2880213168024011, -0.4243421202074388, 0.4243421202074388, -0.5516188358872198, 0.5516188358872198, -0.6671388041974123, 0.6671388041974123, -0.7684399634756779, 0.7684399634756779, -0.8533633645833173, 0.8533633645833173, -0.9200993341504008, 0.9200993341504008, -0.9672268385663063, 0.9672268385663063, -0.9937521706203895, 0.9937521706203895], [-0.06973927331972223, 0.06973927331972223, -0.20786042668822127, 0.20786042668822127, -0.34193582089208424, 0.34193582089208424, -0.469355837986757, 0.469355837986757, -0.5876404035069116, 0.5876404035069116, -0.6944872631866827, 0.6944872631866827, -0.7878168059792081, 0.7878168059792081, -0.8658125777203002, 0.8658125777203002, -0.926956772187174, 0.926956772187174, -0.9700604978354287, 0.9700604978354287, -0.9942945854823992, 0.9942945854823992], [0, -0.1332568242984661, 0.1332568242984661, -0.26413568097034495, 0.26413568097034495, -0.3903010380302908, 0.3903010380302908, -0.5095014778460075, 0.5095014778460075, -0.6196098757636461, 0.6196098757636461, -0.7186613631319502, 0.7186613631319502, -0.8048884016188399, 0.8048884016188399, -0.8767523582704416, 0.8767523582704416, -0.9329710868260161, 0.9329710868260161, -0.9725424712181152, 0.9725424712181152, -0.9947693349975522, 0.9947693349975522], [-0.06405689286260563, 0.06405689286260563, -0.1911188674736163, 0.1911188674736163, -0.3150426796961634, 0.3150426796961634, -0.4337935076260451, 0.4337935076260451, -0.5454214713888396, 0.5454214713888396, -0.6480936519369755, 0.6480936519369755, -0.7401241915785544, 0.7401241915785544, -0.820001985973903, 0.820001985973903, -0.8864155270044011, 0.8864155270044011, -0.9382745520027328, 0.9382745520027328, -0.9747285559713095, 0.9747285559713095, -0.9951872199970213, 0.9951872199970213]], ce = [[], [], [1, 1], [0.8888888888888888, 0.5555555555555556, 0.5555555555555556], [0.6521451548625461, 0.6521451548625461, 0.34785484513745385, 0.34785484513745385], [0.5688888888888889, 0.47862867049936647, 0.47862867049936647, 0.23692688505618908, 0.23692688505618908], [0.3607615730481386, 0.3607615730481386, 0.46791393457269104, 0.46791393457269104, 0.17132449237917036, 0.17132449237917036], [0.4179591836734694, 0.3818300505051189, 0.3818300505051189, 0.27970539148927664, 0.27970539148927664, 0.1294849661688697, 0.1294849661688697], [0.362683783378362, 0.362683783378362, 0.31370664587788727, 0.31370664587788727, 0.22238103445337448, 0.22238103445337448, 0.10122853629037626, 0.10122853629037626], [0.3302393550012598, 0.1806481606948574, 0.1806481606948574, 0.08127438836157441, 0.08127438836157441, 0.31234707704000286, 0.31234707704000286, 0.26061069640293544, 0.26061069640293544], [0.29552422471475287, 0.29552422471475287, 0.26926671930999635, 0.26926671930999635, 0.21908636251598204, 0.21908636251598204, 0.1494513491505806, 0.1494513491505806, 0.06667134430868814, 0.06667134430868814], [0.2729250867779006, 0.26280454451024665, 0.26280454451024665, 0.23319376459199048, 0.23319376459199048, 0.18629021092773426, 0.18629021092773426, 0.1255803694649046, 0.1255803694649046, 0.05566856711617366, 0.05566856711617366], [0.24914704581340277, 0.24914704581340277, 0.2334925365383548, 0.2334925365383548, 0.20316742672306592, 0.20316742672306592, 0.16007832854334622, 0.16007832854334622, 0.10693932599531843, 0.10693932599531843, 0.04717533638651183, 0.04717533638651183], [0.2325515532308739, 0.22628318026289723, 0.22628318026289723, 0.2078160475368885, 0.2078160475368885, 0.17814598076194574, 0.17814598076194574, 0.13887351021978725, 0.13887351021978725, 0.09212149983772845, 0.09212149983772845, 0.04048400476531588, 0.04048400476531588], [0.2152638534631578, 0.2152638534631578, 0.2051984637212956, 0.2051984637212956, 0.18553839747793782, 0.18553839747793782, 0.15720316715819355, 0.15720316715819355, 0.12151857068790319, 0.12151857068790319, 0.08015808715976021, 0.08015808715976021, 0.03511946033175186, 0.03511946033175186], [0.2025782419255613, 0.19843148532711158, 0.19843148532711158, 0.1861610000155622, 0.1861610000155622, 0.16626920581699392, 0.16626920581699392, 0.13957067792615432, 0.13957067792615432, 0.10715922046717194, 0.10715922046717194, 0.07036604748810812, 0.07036604748810812, 0.03075324199611727, 0.03075324199611727], [0.1894506104550685, 0.1894506104550685, 0.18260341504492358, 0.18260341504492358, 0.16915651939500254, 0.16915651939500254, 0.14959598881657674, 0.14959598881657674, 0.12462897125553388, 0.12462897125553388, 0.09515851168249279, 0.09515851168249279, 0.062253523938647894, 0.062253523938647894, 0.027152459411754096, 0.027152459411754096], [0.17944647035620653, 0.17656270536699264, 0.17656270536699264, 0.16800410215645004, 0.16800410215645004, 0.15404576107681028, 0.15404576107681028, 0.13513636846852548, 0.13513636846852548, 0.11188384719340397, 0.11188384719340397, 0.08503614831717918, 0.08503614831717918, 0.0554595293739872, 0.0554595293739872, 0.02414830286854793, 0.02414830286854793], [0.1691423829631436, 0.1691423829631436, 0.16427648374583273, 0.16427648374583273, 0.15468467512626524, 0.15468467512626524, 0.14064291467065065, 0.14064291467065065, 0.12255520671147846, 0.12255520671147846, 0.10094204410628717, 0.10094204410628717, 0.07642573025488905, 0.07642573025488905, 0.0497145488949698, 0.0497145488949698, 0.02161601352648331, 0.02161601352648331], [0.1610544498487837, 0.15896884339395434, 0.15896884339395434, 0.15276604206585967, 0.15276604206585967, 0.1426067021736066, 0.1426067021736066, 0.12875396253933621, 0.12875396253933621, 0.11156664554733399, 0.11156664554733399, 0.09149002162245, 0.09149002162245, 0.06904454273764123, 0.06904454273764123, 0.0448142267656996, 0.0448142267656996, 0.019461788229726478, 0.019461788229726478], [0.15275338713072584, 0.15275338713072584, 0.14917298647260374, 0.14917298647260374, 0.14209610931838204, 0.14209610931838204, 0.13168863844917664, 0.13168863844917664, 0.11819453196151841, 0.11819453196151841, 0.10193011981724044, 0.10193011981724044, 0.08327674157670475, 0.08327674157670475, 0.06267204833410907, 0.06267204833410907, 0.04060142980038694, 0.04060142980038694, 0.017614007139152118, 0.017614007139152118], [0.14608113364969041, 0.14452440398997005, 0.14452440398997005, 0.13988739479107315, 0.13988739479107315, 0.13226893863333747, 0.13226893863333747, 0.12183141605372853, 0.12183141605372853, 0.10879729916714838, 0.10879729916714838, 0.09344442345603386, 0.09344442345603386, 0.0761001136283793, 0.0761001136283793, 0.057134425426857205, 0.057134425426857205, 0.036953789770852494, 0.036953789770852494, 0.016017228257774335, 0.016017228257774335], [0.13925187285563198, 0.13925187285563198, 0.13654149834601517, 0.13654149834601517, 0.13117350478706238, 0.13117350478706238, 0.12325237681051242, 0.12325237681051242, 0.11293229608053922, 0.11293229608053922, 0.10041414444288096, 0.10041414444288096, 0.08594160621706773, 0.08594160621706773, 0.06979646842452049, 0.06979646842452049, 0.052293335152683286, 0.052293335152683286, 0.03377490158481415, 0.03377490158481415, 0.0146279952982722, 0.0146279952982722], [0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771], [0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]], ue = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], fe = O((n, e, t) => ({ x: (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], y: (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3] }), "cubicPoint"), ge = O((n, e, t) => F0([3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])], [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])], t), "cubicDerivative"), pe = O((n, e, t) => {
519
519
  let o, i;
520
520
  const a = t / 2;
521
521
  o = 0;
522
- for (let s = 0; s < 20; s++) i = a * oe[20][s] + a, o += se[20][s] * It(n, e, i);
522
+ for (let s = 0; s < 20; s++) i = a * le[20][s] + a, o += ce[20][s] * R0(n, e, i);
523
523
  return a * o;
524
- }, "getCubicArcLength"), kt = _((n, e, t) => ({ x: (1 - t) * (1 - t) * n[0] + 2 * (1 - t) * t * n[1] + t * t * n[2], y: (1 - t) * (1 - t) * e[0] + 2 * (1 - t) * t * e[1] + t * t * e[2] }), "quadraticPoint"), ue = _((n, e, t) => {
524
+ }, "getCubicArcLength"), F0 = O((n, e, t) => ({ x: (1 - t) * (1 - t) * n[0] + 2 * (1 - t) * t * n[1] + t * t * n[2], y: (1 - t) * (1 - t) * e[0] + 2 * (1 - t) * t * e[1] + t * t * e[2] }), "quadraticPoint"), de = O((n, e, t) => {
525
525
  t === void 0 && (t = 1);
526
526
  const o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), h = 4 * (o * a + i * s), c = a * a + s * s;
527
527
  if (r === 0) return t * Math.sqrt(Math.pow(n[2] - n[0], 2) + Math.pow(e[2] - e[0], 2));
528
528
  const f = h / (2 * r), d = t + f, l = c / r - f * f, u = d * d + l > 0 ? Math.sqrt(d * d + l) : 0, m = f * f + l > 0 ? Math.sqrt(f * f + l) : 0, y = f + Math.sqrt(f * f + l) !== 0 && (d + u) / (f + m) !== 0 ? l * Math.log(Math.abs((d + u) / (f + m))) : 0;
529
529
  return Math.sqrt(r) / 2 * (d * u - f * m + y);
530
- }, "getQuadraticArcLength"), fe = _((n, e, t) => ({ x: 2 * (1 - t) * (n[1] - n[0]) + 2 * t * (n[2] - n[1]), y: 2 * (1 - t) * (e[1] - e[0]) + 2 * t * (e[2] - e[1]) }), "quadraticDerivative");
531
- function It(n, e, t) {
532
- const o = G0(1, t, n), i = G0(1, t, e), a = o * o + i * i;
530
+ }, "getQuadraticArcLength"), xe = O((n, e, t) => ({ x: 2 * (1 - t) * (n[1] - n[0]) + 2 * t * (n[2] - n[1]), y: 2 * (1 - t) * (e[1] - e[0]) + 2 * t * (e[2] - e[1]) }), "quadraticDerivative");
531
+ function R0(n, e, t) {
532
+ const o = Zt(1, t, n), i = Zt(1, t, e), a = o * o + i * i;
533
533
  return Math.sqrt(a);
534
534
  }
535
- _(It, "BFunc");
536
- var G0 = _((n, e, t) => {
535
+ O(R0, "BFunc");
536
+ var Zt = O((n, e, t) => {
537
537
  const o = t.length - 1;
538
538
  let i, a;
539
539
  if (o === 0) return 0;
540
540
  if (n === 0) {
541
541
  a = 0;
542
- for (let s = 0; s <= o; s++) a += ae[o][s] * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
542
+ for (let s = 0; s <= o; s++) a += ue[o][s] * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
543
543
  return a;
544
544
  }
545
545
  i = new Array(o);
546
546
  for (let s = 0; s < o; s++) i[s] = o * (t[s + 1] - t[s]);
547
- return G0(n - 1, e, i);
548
- }, "getDerivative"), R0 = _((n, e, t) => {
547
+ return Zt(n - 1, e, i);
548
+ }, "getDerivative"), Nt = O((n, e, t) => {
549
549
  let o = 1, i = n / e, a = (n - t(i)) / e, s = 0;
550
550
  for (; o > 1e-3; ) {
551
551
  const r = t(i + a), h = Math.abs(n - r) / e;
@@ -557,7 +557,7 @@ var G0 = _((n, e, t) => {
557
557
  if (s++, s > 500) break;
558
558
  }
559
559
  return i;
560
- }, "t2length"), A0, c0 = (A0 = class {
560
+ }, "t2length"), bt, ct = (bt = class {
561
561
  constructor(e, t, o, i, a, s, r, h) {
562
562
  k(this, "a");
563
563
  k(this, "b");
@@ -567,59 +567,59 @@ var G0 = _((n, e, t) => {
567
567
  k(this, "getArcLength");
568
568
  k(this, "getPoint");
569
569
  k(this, "getDerivative");
570
- k(this, "getTotalLength", _(() => this.length, "getTotalLength"));
571
- k(this, "getPointAtLength", _((e) => {
572
- const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = R0(e, this.length, (a) => this.getArcLength(t, o, a));
570
+ k(this, "getTotalLength", O(() => this.length, "getTotalLength"));
571
+ k(this, "getPointAtLength", O((e) => {
572
+ const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Nt(e, this.length, (a) => this.getArcLength(t, o, a));
573
573
  return this.getPoint(t, o, i);
574
574
  }, "getPointAtLength"));
575
- k(this, "getTangentAtLength", _((e) => {
576
- const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = R0(e, this.length, (h) => this.getArcLength(t, o, h)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
575
+ k(this, "getTangentAtLength", O((e) => {
576
+ const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Nt(e, this.length, (h) => this.getArcLength(t, o, h)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
577
577
  let r;
578
578
  return r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 }, r;
579
579
  }, "getTangentAtLength"));
580
- k(this, "getPropertiesAtLength", _((e) => {
581
- const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = R0(e, this.length, (c) => this.getArcLength(t, o, c)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
580
+ k(this, "getPropertiesAtLength", O((e) => {
581
+ const t = [this.a.x, this.b.x, this.c.x, this.d.x], o = [this.a.y, this.b.y, this.c.y, this.d.y], i = Nt(e, this.length, (c) => this.getArcLength(t, o, c)), a = this.getDerivative(t, o, i), s = Math.sqrt(a.x * a.x + a.y * a.y);
582
582
  let r;
583
583
  r = s > 0 ? { x: a.x / s, y: a.y / s } : { x: 0, y: 0 };
584
584
  const h = this.getPoint(t, o, i);
585
585
  return { x: h.x, y: h.y, tangentX: r.x, tangentY: r.y };
586
586
  }, "getPropertiesAtLength"));
587
- k(this, "getC", _(() => this.c, "getC"));
588
- k(this, "getD", _(() => this.d, "getD"));
589
- this.a = { x: e, y: t }, this.b = { x: o, y: i }, this.c = { x: a, y: s }, r !== void 0 && h !== void 0 ? (this.getArcLength = ce, this.getPoint = he, this.getDerivative = le, this.d = { x: r, y: h }) : (this.getArcLength = ue, this.getPoint = kt, this.getDerivative = fe, this.d = { x: 0, y: 0 }), this.length = this.getArcLength([this.a.x, this.b.x, this.c.x, this.d.x], [this.a.y, this.b.y, this.c.y, this.d.y], 1);
587
+ k(this, "getC", O(() => this.c, "getC"));
588
+ k(this, "getD", O(() => this.d, "getD"));
589
+ this.a = { x: e, y: t }, this.b = { x: o, y: i }, this.c = { x: a, y: s }, r !== void 0 && h !== void 0 ? (this.getArcLength = pe, this.getPoint = fe, this.getDerivative = ge, this.d = { x: r, y: h }) : (this.getArcLength = de, this.getPoint = F0, this.getDerivative = xe, this.d = { x: 0, y: 0 }), this.length = this.getArcLength([this.a.x, this.b.x, this.c.x, this.d.x], [this.a.y, this.b.y, this.c.y, this.d.y], 1);
590
590
  }
591
- }, _(A0, "Bezier"), A0), b0, ge = (b0 = class {
591
+ }, O(bt, "Bezier"), bt), At, ye = (At = class {
592
592
  constructor(e) {
593
593
  k(this, "length", 0);
594
594
  k(this, "partial_lengths", []);
595
595
  k(this, "functions", []);
596
596
  k(this, "initial_point", null);
597
- k(this, "getPartAtLength", _((e) => {
597
+ k(this, "getPartAtLength", O((e) => {
598
598
  e < 0 ? e = 0 : e > this.length && (e = this.length);
599
599
  let t = this.partial_lengths.length - 1;
600
600
  for (; this.partial_lengths[t] >= e && t > 0; ) t--;
601
601
  return t++, { fraction: e - this.partial_lengths[t - 1], i: t };
602
602
  }, "getPartAtLength"));
603
- k(this, "getTotalLength", _(() => this.length, "getTotalLength"));
604
- k(this, "getPointAtLength", _((e) => {
603
+ k(this, "getTotalLength", O(() => this.length, "getTotalLength"));
604
+ k(this, "getPointAtLength", O((e) => {
605
605
  const t = this.getPartAtLength(e), o = this.functions[t.i];
606
606
  if (o) return o.getPointAtLength(t.fraction);
607
607
  if (this.initial_point) return this.initial_point;
608
608
  throw new Error("Wrong function at this part.");
609
609
  }, "getPointAtLength"));
610
- k(this, "getTangentAtLength", _((e) => {
610
+ k(this, "getTangentAtLength", O((e) => {
611
611
  const t = this.getPartAtLength(e), o = this.functions[t.i];
612
612
  if (o) return o.getTangentAtLength(t.fraction);
613
613
  if (this.initial_point) return { x: 0, y: 0 };
614
614
  throw new Error("Wrong function at this part.");
615
615
  }, "getTangentAtLength"));
616
- k(this, "getPropertiesAtLength", _((e) => {
616
+ k(this, "getPropertiesAtLength", O((e) => {
617
617
  const t = this.getPartAtLength(e), o = this.functions[t.i];
618
618
  if (o) return o.getPropertiesAtLength(t.fraction);
619
619
  if (this.initial_point) return { x: this.initial_point.x, y: this.initial_point.y, tangentX: 0, tangentY: 0 };
620
620
  throw new Error("Wrong function at this part.");
621
621
  }, "getPropertiesAtLength"));
622
- k(this, "getParts", _(() => {
622
+ k(this, "getParts", O(() => {
623
623
  const e = [];
624
624
  for (let t = 0; t < this.functions.length; t++) if (this.functions[t] !== null) {
625
625
  this.functions[t] = this.functions[t];
@@ -628,7 +628,7 @@ var G0 = _((n, e, t) => {
628
628
  }
629
629
  return e;
630
630
  }, "getParts"));
631
- const t = Array.isArray(e) ? e : Jt(e);
631
+ const t = Array.isArray(e) ? e : re(e);
632
632
  let o, i = [0, 0], a = [0, 0], s = [0, 0];
633
633
  for (let r = 0; r < t.length; r++) {
634
634
  if (t[r][0] === "M") i = [t[r][1], t[r][2]], s = [i[0], i[1]], this.functions.push(null), r === 0 && (this.initial_point = { x: t[r][1], y: t[r][2] });
@@ -640,83 +640,83 @@ var G0 = _((n, e, t) => {
640
640
  else if (t[r][0] === "V") this.length += Math.abs(i[1] - t[r][1]), this.functions.push(new J(i[0], i[0], i[1], t[r][1])), i[1] = t[r][1];
641
641
  else if (t[r][0] === "v") this.length += Math.abs(t[r][1]), this.functions.push(new J(i[0], i[0], i[1], i[1] + t[r][1])), i[1] = t[r][1] + i[1];
642
642
  else if (t[r][0] === "z" || t[r][0] === "Z") this.length += Math.sqrt(Math.pow(s[0] - i[0], 2) + Math.pow(s[1] - i[1], 2)), this.functions.push(new J(i[0], s[0], i[1], s[1])), i = [s[0], s[1]];
643
- else if (t[r][0] === "C") o = new c0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4], t[r][5], t[r][6]), this.length += o.getTotalLength(), i = [t[r][5], t[r][6]], this.functions.push(o);
644
- else if (t[r][0] === "c") o = new c0(i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4], i[0] + t[r][5], i[1] + t[r][6]), o.getTotalLength() > 0 ? (this.length += o.getTotalLength(), this.functions.push(o), i = [t[r][5] + i[0], t[r][6] + i[1]]) : this.functions.push(new J(i[0], i[0], i[1], i[1]));
643
+ else if (t[r][0] === "C") o = new ct(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4], t[r][5], t[r][6]), this.length += o.getTotalLength(), i = [t[r][5], t[r][6]], this.functions.push(o);
644
+ else if (t[r][0] === "c") o = new ct(i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4], i[0] + t[r][5], i[1] + t[r][6]), o.getTotalLength() > 0 ? (this.length += o.getTotalLength(), this.functions.push(o), i = [t[r][5] + i[0], t[r][6] + i[1]]) : this.functions.push(new J(i[0], i[0], i[1], i[1]));
645
645
  else if (t[r][0] === "S") {
646
646
  if (r > 0 && ["C", "c", "S", "s"].indexOf(t[r - 1][0]) > -1) {
647
647
  if (o) {
648
648
  const h = o.getC();
649
- o = new c0(i[0], i[1], 2 * i[0] - h.x, 2 * i[1] - h.y, t[r][1], t[r][2], t[r][3], t[r][4]);
649
+ o = new ct(i[0], i[1], 2 * i[0] - h.x, 2 * i[1] - h.y, t[r][1], t[r][2], t[r][3], t[r][4]);
650
650
  }
651
- } else o = new c0(i[0], i[1], i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4]);
651
+ } else o = new ct(i[0], i[1], i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4]);
652
652
  o && (this.length += o.getTotalLength(), i = [t[r][3], t[r][4]], this.functions.push(o));
653
653
  } else if (t[r][0] === "s") {
654
654
  if (r > 0 && ["C", "c", "S", "s"].indexOf(t[r - 1][0]) > -1) {
655
655
  if (o) {
656
656
  const h = o.getC(), c = o.getD();
657
- o = new c0(i[0], i[1], i[0] + c.x - h.x, i[1] + c.y - h.y, i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4]);
657
+ o = new ct(i[0], i[1], i[0] + c.x - h.x, i[1] + c.y - h.y, i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4]);
658
658
  }
659
- } else o = new c0(i[0], i[1], i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4]);
659
+ } else o = new ct(i[0], i[1], i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4]);
660
660
  o && (this.length += o.getTotalLength(), i = [t[r][3] + i[0], t[r][4] + i[1]], this.functions.push(o));
661
661
  } else if (t[r][0] === "Q") {
662
662
  if (i[0] === t[r][1] && i[1] === t[r][2]) {
663
663
  const h = new J(t[r][1], t[r][3], t[r][2], t[r][4]);
664
664
  this.length += h.getTotalLength(), this.functions.push(h);
665
- } else o = new c0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
665
+ } else o = new ct(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
666
666
  i = [t[r][3], t[r][4]], a = [t[r][1], t[r][2]];
667
667
  } else if (t[r][0] === "q") {
668
- if (t[r][1] !== 0 || t[r][2] !== 0) o = new c0(i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
668
+ if (t[r][1] !== 0 || t[r][2] !== 0) o = new ct(i[0], i[1], i[0] + t[r][1], i[1] + t[r][2], i[0] + t[r][3], i[1] + t[r][4], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
669
669
  else {
670
670
  const h = new J(i[0] + t[r][1], i[0] + t[r][3], i[1] + t[r][2], i[1] + t[r][4]);
671
671
  this.length += h.getTotalLength(), this.functions.push(h);
672
672
  }
673
673
  a = [i[0] + t[r][1], i[1] + t[r][2]], i = [t[r][3] + i[0], t[r][4] + i[1]];
674
674
  } else if (t[r][0] === "T") {
675
- if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new c0(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], t[r][1], t[r][2], void 0, void 0), this.functions.push(o), this.length += o.getTotalLength();
675
+ if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new ct(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], t[r][1], t[r][2], void 0, void 0), this.functions.push(o), this.length += o.getTotalLength();
676
676
  else {
677
677
  const h = new J(i[0], t[r][1], i[1], t[r][2]);
678
678
  this.functions.push(h), this.length += h.getTotalLength();
679
679
  }
680
680
  a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [t[r][1], t[r][2]];
681
681
  } else if (t[r][0] === "t") {
682
- if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new c0(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], i[0] + t[r][1], i[1] + t[r][2], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
682
+ if (r > 0 && ["Q", "q", "T", "t"].indexOf(t[r - 1][0]) > -1) o = new ct(i[0], i[1], 2 * i[0] - a[0], 2 * i[1] - a[1], i[0] + t[r][1], i[1] + t[r][2], void 0, void 0), this.length += o.getTotalLength(), this.functions.push(o);
683
683
  else {
684
684
  const h = new J(i[0], i[0] + t[r][1], i[1], i[1] + t[r][2]);
685
685
  this.length += h.getTotalLength(), this.functions.push(h);
686
686
  }
687
687
  a = [2 * i[0] - a[0], 2 * i[1] - a[1]], i = [t[r][1] + i[0], t[r][2] + i[1]];
688
688
  } else if (t[r][0] === "A") {
689
- const h = new at(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, t[r][6], t[r][7]);
689
+ const h = new l0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, t[r][6], t[r][7]);
690
690
  this.length += h.getTotalLength(), i = [t[r][6], t[r][7]], this.functions.push(h);
691
691
  } else if (t[r][0] === "a") {
692
- const h = new at(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, i[0] + t[r][6], i[1] + t[r][7]);
692
+ const h = new l0(i[0], i[1], t[r][1], t[r][2], t[r][3], t[r][4] === 1, t[r][5] === 1, i[0] + t[r][6], i[1] + t[r][7]);
693
693
  this.length += h.getTotalLength(), i = [i[0] + t[r][6], i[1] + t[r][7]], this.functions.push(h);
694
694
  }
695
695
  this.partial_lengths.push(this.length);
696
696
  }
697
697
  }
698
- }, _(b0, "SVGPathProperties"), b0), M0, W0 = (M0 = class {
698
+ }, O(At, "SVGPathProperties"), At), Mt, Vt = (Mt = class {
699
699
  constructor(e) {
700
700
  k(this, "inst");
701
- k(this, "getTotalLength", _(() => this.inst.getTotalLength(), "getTotalLength"));
702
- k(this, "getPointAtLength", _((e) => this.inst.getPointAtLength(e), "getPointAtLength"));
703
- k(this, "getTangentAtLength", _((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
704
- k(this, "getPropertiesAtLength", _((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
705
- k(this, "getParts", _(() => this.inst.getParts(), "getParts"));
706
- if (this.inst = new ge(e), !(this instanceof W0)) return new W0(e);
707
- }
708
- }, _(M0, "_svgPathProperties"), M0);
709
- function pe(n = $.BLACK) {
701
+ k(this, "getTotalLength", O(() => this.inst.getTotalLength(), "getTotalLength"));
702
+ k(this, "getPointAtLength", O((e) => this.inst.getPointAtLength(e), "getPointAtLength"));
703
+ k(this, "getTangentAtLength", O((e) => this.inst.getTangentAtLength(e), "getTangentAtLength"));
704
+ k(this, "getPropertiesAtLength", O((e) => this.inst.getPropertiesAtLength(e), "getPropertiesAtLength"));
705
+ k(this, "getParts", O(() => this.inst.getParts(), "getParts"));
706
+ if (this.inst = new ye(e), !(this instanceof Vt)) return new Vt(e);
707
+ }
708
+ }, O(Mt, "_svgPathProperties"), Mt);
709
+ function ve(n = W.BLACK) {
710
710
  return { ...n, alpha: 0 };
711
711
  }
712
- function Pn(n = null) {
713
- const { path: e, height: t = 100, width: o = 100, viewboxHeight: i, viewboxWidth: a, ...s } = n ?? {}, r = e ?? "M 0 0 L 100 100", c = new W0(r).getTotalLength();
714
- return l0({
712
+ function In(n = null) {
713
+ const { path: e, height: t = 100, width: o = 100, viewboxHeight: i, viewboxWidth: a, ...s } = n ?? {}, r = e ?? "M 0 0 L 100 100", c = new Vt(r).getTotalLength();
714
+ return lt({
715
715
  objectType: U.PATH,
716
- anchor: h0,
716
+ anchor: ht,
717
717
  strokeColor: Q,
718
718
  drawn: 1,
719
- fillColor: pe(),
719
+ fillColor: ve(),
720
720
  isRounded: !1,
721
721
  height: t,
722
722
  path: r,
@@ -730,8 +730,8 @@ function Pn(n = null) {
730
730
  ...s
731
731
  });
732
732
  }
733
- function Cn(n = null) {
734
- return l0({
733
+ function _n(n = null) {
734
+ return lt({
735
735
  objectType: U.POLYGON,
736
736
  strokeColor: Q,
737
737
  strokeWidth: 0,
@@ -745,10 +745,10 @@ function Cn(n = null) {
745
745
  ...n
746
746
  });
747
747
  }
748
- function Sn(n = null) {
749
- return l0({
748
+ function On(n = null) {
749
+ return lt({
750
750
  objectType: U.RECTANGLE,
751
- anchor: h0,
751
+ anchor: ht,
752
752
  strokeColor: Q,
753
753
  strokeWidth: 0,
754
754
  drawn: 1,
@@ -761,10 +761,10 @@ function Sn(n = null) {
761
761
  ...n
762
762
  });
763
763
  }
764
- function En(n = null) {
765
- return l0({
764
+ function Fn(n = null) {
765
+ return lt({
766
766
  objectType: U.SVG,
767
- anchor: h0,
767
+ anchor: ht,
768
768
  height: 100,
769
769
  svg: "",
770
770
  width: 100,
@@ -773,11 +773,11 @@ function En(n = null) {
773
773
  ...n
774
774
  });
775
775
  }
776
- const de = {
776
+ const we = {
777
777
  NORMAL: "normal",
778
778
  ITALIC: "italic",
779
779
  OBLIQUE: "oblique"
780
- }, xe = de.NORMAL, ye = {
780
+ }, me = we.NORMAL, be = {
781
781
  THIN: 100,
782
782
  EXTRA_LIGHT: 200,
783
783
  LIGHT: 300,
@@ -787,132 +787,217 @@ const de = {
787
787
  BOLD: 700,
788
788
  EXTRA_BOLD: 800,
789
789
  BLACK: 900
790
- }, ve = ye.NORMAL, we = {
790
+ }, Ae = be.NORMAL, Me = {
791
791
  color: Q,
792
792
  fontFamily: "sans-serif",
793
793
  fontSize: 100,
794
- fontStyle: xe,
795
- fontWeight: ve,
794
+ fontStyle: me,
795
+ fontWeight: Ae,
796
796
  ligatures: !1,
797
797
  subscript: !1,
798
798
  superscript: !1
799
799
  };
800
- function _t(n) {
800
+ function N0(n) {
801
801
  return typeof n == "string" ? [[{ text: n }]] : n.map((e) => e.map((t) => typeof t == "string" ? { text: t } : t));
802
802
  }
803
- function me(n) {
804
- return _t(n).reduce(
803
+ function Le(n) {
804
+ return N0(n).reduce(
805
805
  (t, o) => t + o.reduce((i, a) => i + a.text.length, 0),
806
806
  0
807
807
  );
808
808
  }
809
- function Ae(n = "", e = null) {
810
- return l0({
809
+ function Te(n = "", e = null) {
810
+ return lt({
811
811
  objectType: U.TEXT,
812
- alignment: Wt,
813
- anchor: h0,
812
+ alignment: Q0,
813
+ anchor: ht,
814
814
  length: null,
815
815
  lineSpacing: 1,
816
816
  text: n,
817
817
  x: 0,
818
818
  y: 0,
819
- ...we,
819
+ ...Me,
820
820
  ...e
821
821
  });
822
822
  }
823
- Ae.writeOn = (n, e = {}) => et(
823
+ Te.writeOn = (n, e = {}) => r0(
824
824
  n,
825
825
  {
826
- length: me(n.text)
826
+ length: Le(n.text)
827
827
  },
828
828
  e
829
829
  );
830
- let Z = null;
831
- function be({ presentation: n, onNavigateToSlide: e }) {
832
- if (Z !== null && !Z.closed) {
833
- Z.focus();
834
- return;
830
+ let R = null, It = null;
831
+ function Ce({
832
+ presentation: n,
833
+ onNavigateToSlide: e,
834
+ onNext: t
835
+ }) {
836
+ if (R !== null && !R.closed)
837
+ return R.focus(), It;
838
+ if (R = window.open("", "Navigator", "width=1100,height=680,left=20,top=50"), R === null)
839
+ return console.error("Failed to open navigator window."), null;
840
+ const o = Pe(n, e, t);
841
+ return It = o, R.document.title = n.title, R.document.body.replaceChildren(o.element), R.addEventListener("keyup", (i) => {
842
+ (i.key === "Escape" || i.key === "`") && (R == null || R.close(), R = null, It = null);
843
+ }), It;
844
+ }
845
+ function Pe(n, e, t) {
846
+ const o = (R == null ? void 0 : R.document) ?? document, i = o.createElement("div");
847
+ i.style.boxSizing = "border-box", i.style.display = "grid", i.style.gridTemplateColumns = "260px 1fr", i.style.gap = "18px", i.style.height = "100vh", i.style.overflow = "hidden", i.style.padding = "18px", i.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif', i.style.backgroundColor = "#f5f6f8", i.style.color = "#1f2937", o.body.style.margin = "0", o.body.style.overflow = "hidden";
848
+ const a = o.createElement("div");
849
+ a.style.display = "flex", a.style.flexDirection = "column", a.style.gap = "8px", a.style.minHeight = "0", a.style.overflowY = "auto", a.style.paddingRight = "4px";
850
+ const s = o.createElement("div");
851
+ s.style.display = "flex", s.style.flexDirection = "column", s.style.gap = "14px", s.style.minHeight = "0", s.style.minWidth = "0", s.style.overflow = "hidden";
852
+ const r = o.createElement("div");
853
+ r.style.display = "flex", r.style.gap = "14px", r.style.alignItems = "center", r.style.flexWrap = "wrap", r.style.fontSize = "13px", r.style.color = "#4b5563";
854
+ const h = o.createElement("div");
855
+ h.style.display = "flex", h.style.gap = "14px", h.style.flex = "1 1 auto", h.style.minHeight = "0", h.style.minWidth = "0", h.style.overflow = "hidden";
856
+ const c = g0("Current", n), f = g0("Next", n);
857
+ f.container.style.cursor = "pointer", f.container.addEventListener("click", t);
858
+ const d = n.slides.map((L, C) => {
859
+ const S = Ee(L, C);
860
+ return S.style.cursor = "pointer", S.addEventListener("click", (T) => {
861
+ T.shiftKey && (R == null || R.close()), e(C);
862
+ }), a.appendChild(S), S;
863
+ }), l = Bt("Slides", a, !0), u = Bt("Current", c.container, !0), m = Bt("Next", f.container, !0), y = () => {
864
+ const L = u.input.checked && m.input.checked && E();
865
+ i.style.gridTemplateColumns = l.input.checked ? "260px 1fr" : "1fr", h.style.flexDirection = L ? "column" : "row", c.container.style.flex = "1 1 0", f.container.style.flex = "1 1 0", requestAnimationFrame(() => {
866
+ c.resize(), f.resize();
867
+ });
868
+ };
869
+ l.input.addEventListener("change", y), u.input.addEventListener("change", y), m.input.addEventListener("change", y), R == null || R.addEventListener("resize", y), r.appendChild(l.element), r.appendChild(u.element), r.appendChild(m.element), h.appendChild(c.container), h.appendChild(f.container), s.appendChild(r), s.appendChild(h), i.appendChild(a), i.appendChild(s);
870
+ function M(L, C, S, T) {
871
+ d.forEach((I, N) => {
872
+ const G = N === L;
873
+ I.style.backgroundColor = G ? "#dbeafe" : "#ffffff", I.style.borderColor = G ? "#60a5fa" : "#e5e7eb", I.style.color = G ? "#1e3a8a" : "#1f2937";
874
+ }), c.label.textContent = p0(n, L, C), f.label.textContent = p0(n, S, T), Se(d[L], a), y();
875
+ }
876
+ function E() {
877
+ const L = R;
878
+ if (L === null)
879
+ return !1;
880
+ const C = l.input.checked ? 278 : 0, S = L.innerWidth - 36 - C, T = L.innerHeight - 36 - r.offsetHeight - 14;
881
+ return S <= 0 || T <= 0 ? !1 : S / T < 1.1;
835
882
  }
836
- if (Z = window.open("", "Navigator", "width=300,height=500,left=20,top=50"), Z === null) {
837
- console.error("Failed to open navigator window.");
838
- return;
883
+ return {
884
+ element: i,
885
+ currentCanvas: c.canvas,
886
+ nextCanvas: f.canvas,
887
+ currentLabel: c.label,
888
+ nextLabel: f.label,
889
+ isOpen: () => R !== null && !R.closed,
890
+ update: M
891
+ };
892
+ }
893
+ function Ee(n, e) {
894
+ const t = (R == null ? void 0 : R.document) ?? document, o = t.createElement("div");
895
+ o.style.display = "flex", o.style.alignItems = "center", o.style.gap = "10px", o.style.padding = "8px 10px", o.style.backgroundColor = "#ffffff", o.style.border = "1px solid #e5e7eb", o.style.borderRadius = "6px", o.style.boxShadow = "0 1px 2px rgba(15, 23, 42, 0.06)", o.style.fontSize = "14px", o.style.lineHeight = "1", o.style.userSelect = "none";
896
+ const i = t.createElement("div");
897
+ i.textContent = `${e + 1}`, i.style.minWidth = "24px", i.style.fontWeight = "700", i.style.color = "#6b7280";
898
+ const a = t.createElement("div");
899
+ return a.textContent = n.title.length > 0 ? n.title : `Slide ${e + 1}`, a.style.overflow = "hidden", a.style.textOverflow = "ellipsis", a.style.whiteSpace = "nowrap", o.appendChild(i), o.appendChild(a), o;
900
+ }
901
+ function g0(n, e) {
902
+ var f;
903
+ const t = (R == null ? void 0 : R.document) ?? document, o = t.createElement("div");
904
+ o.style.display = "flex", o.style.alignItems = "center", o.style.flexDirection = "column", o.style.minHeight = "0", o.style.minWidth = "0";
905
+ const i = t.createElement("div");
906
+ i.textContent = n, i.style.marginBottom = "4px", i.style.fontSize = "12px", i.style.fontWeight = "700", i.style.textAlign = "center", i.style.textTransform = "uppercase", i.style.color = "#6b7280";
907
+ const a = t.createElement("div");
908
+ a.style.marginBottom = "6px", a.style.fontSize = "14px", a.style.fontWeight = "600", a.style.textAlign = "center";
909
+ const s = t.createElement("div");
910
+ s.style.flex = "1 1 auto", s.style.display = "flex", s.style.alignItems = "flex-start", s.style.justifyContent = "center", s.style.minHeight = "0", s.style.width = "100%", s.style.overflow = "hidden";
911
+ const r = t.createElement("canvas");
912
+ r.style.display = "block", r.style.width = "0", r.style.height = "0";
913
+ function h() {
914
+ const d = s.clientWidth, l = s.clientHeight;
915
+ if (d <= 0 || l <= 0)
916
+ return;
917
+ const u = e.size.width / e.size.height, m = Math.min(d, l * u), y = m / u;
918
+ r.style.width = `${m}px`, r.style.height = `${y}px`;
839
919
  }
840
- const t = Me(n, e);
841
- Z.document.title = n.title, Z.document.body.appendChild(t), Z.addEventListener("keyup", (o) => {
842
- (o.key === "Escape" || o.key === "`") && (Z == null || Z.close(), Z = null);
843
- });
920
+ const c = (f = t.defaultView) == null ? void 0 : f.ResizeObserver;
921
+ return c !== void 0 && new c(h).observe(s), R == null || R.addEventListener("resize", h), s.appendChild(r), o.appendChild(i), o.appendChild(a), o.appendChild(s), { container: o, label: a, canvas: r, resize: h };
844
922
  }
845
- function Me(n, e) {
846
- const t = document.createElement("div");
847
- return t.style.fontFamily = "Arial, sans-serif", n.slides.forEach((o, i) => {
848
- const a = Le(o, i);
849
- a.style.cursor = "pointer", a.addEventListener("click", (s) => {
850
- s.shiftKey && (Z == null || Z.close()), e(i);
851
- }), t.appendChild(a);
852
- }), t;
853
- }
854
- function Le(n, e) {
855
- const t = document.createElement("div");
856
- return t.style.marginBottom = "8px", t.style.padding = "8px", t.style.backgroundColor = "#eceed7", t.style.borderRadius = "4px", t.style.userSelect = "none", t.innerHTML = `${e + 1}: ` + (n.title.length > 0 ? n.title : `Slide ${e + 1}`), t;
923
+ function Bt(n, e, t) {
924
+ const o = (R == null ? void 0 : R.document) ?? document, i = e.style.display || "block", a = o.createElement("label");
925
+ a.style.display = "inline-flex", a.style.alignItems = "center", a.style.gap = "6px", a.style.userSelect = "none";
926
+ const s = o.createElement("input");
927
+ return s.type = "checkbox", s.checked = t, s.addEventListener("change", () => {
928
+ e.style.display = s.checked ? i : "none";
929
+ }), a.appendChild(s), a.appendChild(o.createTextNode(n)), { element: a, input: s };
857
930
  }
858
- function a0(n = null) {
931
+ function p0(n, e, t) {
932
+ if (e === null)
933
+ return "End of presentation";
934
+ const o = n.slides[e];
935
+ return o === void 0 ? "No slide" : `Slide ${e + 1} of ${n.slides.length}, Build ${t + 1} of ${o.animations.length + 1}`;
936
+ }
937
+ function Se(n, e) {
938
+ if (n === void 0)
939
+ return;
940
+ const t = n.offsetTop, o = t + n.offsetHeight, i = e.scrollTop, a = i + e.clientHeight;
941
+ (t < i || o > a) && n.scrollIntoView({ block: "nearest" });
942
+ }
943
+ function at(n = null) {
859
944
  return {
860
945
  height: 0,
861
946
  width: 0,
862
947
  ...n
863
948
  };
864
949
  }
865
- const Te = a0({ width: 0, height: 0 });
866
- function Pe(n = null) {
950
+ const ke = at({ width: 0, height: 0 });
951
+ function Ie(n = null) {
867
952
  return {
868
- backgroundColor: $.WHITE,
953
+ backgroundColor: W.WHITE,
869
954
  slides: [],
870
955
  title: "Presentation",
871
- size: a0({ width: 3840, height: 2160 }),
956
+ size: at({ width: 3840, height: 2160 }),
872
957
  resources: {
873
958
  images: {}
874
959
  },
875
960
  ...n
876
961
  };
877
962
  }
878
- function Ce(n) {
963
+ function _e(n) {
879
964
  const e = Array.isArray(n) ? n : [n];
880
965
  let t = 0, o = 0;
881
966
  for (const i of e)
882
967
  switch (i.type) {
883
- case f0.PAUSE:
968
+ case ft.PAUSE:
884
969
  t += i.duration;
885
970
  break;
886
- case f0.ANIMATE:
971
+ case ft.ANIMATE:
887
972
  o = Math.max(o, t + i.delay + i.duration), i.block && (t += i.delay + i.duration);
888
973
  break;
889
- case f0.UPDATE:
974
+ case ft.UPDATE:
890
975
  break;
891
976
  default:
892
- s0(i);
977
+ st(i);
893
978
  }
894
979
  return o;
895
980
  }
896
- function nt(n, e = null) {
897
- const { red: t, green: o, blue: i } = n, a = Et(n, e);
981
+ function i0(n, e = null) {
982
+ const { red: t, green: o, blue: i } = n, a = O0(n, e);
898
983
  return `rgba(${t}, ${o}, ${i}, ${a})`;
899
984
  }
900
- function Se(n) {
985
+ function Oe(n) {
901
986
  return n === document.body;
902
987
  }
903
- function Ee(n, e) {
988
+ function Fe(n, e) {
904
989
  const t = document.createElement("div");
905
- if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", Se(e)) {
990
+ if (t.style.width = "100%", t.style.aspectRatio = `${n.size.width} / ${n.size.height}`, t.style.position = "relative", Oe(e)) {
906
991
  t.style.top = "50%", t.style.transform = "translateY(-50%)", t.style.marginLeft = "auto", t.style.marginRight = "auto", t.style.overflowY = "clip", document.title = n.title, document.documentElement.style.height = "100%", document.body.style.margin = "0", document.body.style.height = "100%", document.body.style.width = "100%", document.body.style.backgroundColor = "#000000";
907
992
  const o = n.size.height / n.size.width;
908
- ut(t, o), window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change", () => ut(t, o));
993
+ d0(t, o), window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change", () => d0(t, o));
909
994
  }
910
995
  return t;
911
996
  }
912
- function ut(n, e) {
997
+ function d0(n, e) {
913
998
  window.innerHeight / window.innerWidth > e ? (n.style.width = "100%", n.style.height = "auto") : (n.style.width = "auto", n.style.height = "100%");
914
999
  }
915
- const ke = {
1000
+ const Re = {
916
1001
  check: (n) => typeof n == "object" && n !== null && typeof n.red == "number" && typeof n.green == "number" && typeof n.blue == "number" && typeof n.alpha == "number",
917
1002
  interpolate: (n, e, t) => ({
918
1003
  red: Math.round(n.red + (e.red - n.red) * t),
@@ -920,23 +1005,23 @@ const ke = {
920
1005
  blue: Math.round(n.blue + (e.blue - n.blue) * t),
921
1006
  alpha: n.alpha + (e.alpha - n.alpha) * t
922
1007
  })
923
- }, Ie = {
1008
+ }, Ne = {
924
1009
  check: (n) => !0,
925
1010
  interpolate: (n, e) => e
926
- }, _e = {
1011
+ }, Be = {
927
1012
  check: (n) => typeof n == "number",
928
1013
  interpolate: (n, e, t) => n + (e - n) * t
929
- }, ft = [
930
- _e,
931
- ke,
932
- Ie
1014
+ }, x0 = [
1015
+ Be,
1016
+ Re,
1017
+ Ne
933
1018
  ];
934
- function Oe(n, e, t, o = null) {
1019
+ function qe(n, e, t, o = null) {
935
1020
  if (t === 0)
936
1021
  return n;
937
1022
  if (t === 1)
938
1023
  return { ...n, ...e };
939
- const i = o != null ? [...o, ...ft] : ft, a = {};
1024
+ const i = o != null ? [...o, ...x0] : x0, a = {};
940
1025
  for (const s in e) {
941
1026
  const r = n[s], h = e[s];
942
1027
  for (const c of i)
@@ -951,7 +1036,7 @@ function Oe(n, e, t, o = null) {
951
1036
  }
952
1037
  return { ...n, ...a };
953
1038
  }
954
- function gt(n, e, t = null) {
1039
+ function y0(n, e, t = null) {
955
1040
  if (e === null)
956
1041
  return;
957
1042
  const o = Array.isArray(e) ? e : [e];
@@ -960,7 +1045,7 @@ function gt(n, e, t = null) {
960
1045
  if (t !== null && i > t)
961
1046
  break;
962
1047
  switch (a.type) {
963
- case f0.ANIMATE: {
1048
+ case ft.ANIMATE: {
964
1049
  const s = n.get(a.object);
965
1050
  if (s === void 0)
966
1051
  break;
@@ -973,7 +1058,7 @@ function gt(n, e, t = null) {
973
1058
  );
974
1059
  n.set(a.object, {
975
1060
  ...s,
976
- ...Oe(
1061
+ ...qe(
977
1062
  s,
978
1063
  a.props,
979
1064
  a.easing(h),
@@ -982,7 +1067,7 @@ function gt(n, e, t = null) {
982
1067
  }), a.block && (i += a.delay + a.duration);
983
1068
  break;
984
1069
  }
985
- case f0.UPDATE: {
1070
+ case ft.UPDATE: {
986
1071
  const s = n.get(a.object);
987
1072
  if (s === void 0)
988
1073
  break;
@@ -992,18 +1077,18 @@ function gt(n, e, t = null) {
992
1077
  });
993
1078
  break;
994
1079
  }
995
- case f0.PAUSE:
1080
+ case ft.PAUSE:
996
1081
  i += a.duration;
997
1082
  break;
998
1083
  default:
999
- s0(a);
1084
+ st(a);
1000
1085
  }
1001
1086
  }
1002
1087
  }
1003
- function Ot(n) {
1088
+ function B0(n) {
1004
1089
  return "objects" in n ? n.objects.filter((e) => "objectType" in e) : [];
1005
1090
  }
1006
- function Fe({
1091
+ function De({
1007
1092
  slide: n,
1008
1093
  buildIndex: e,
1009
1094
  buildTime: t
@@ -1011,7 +1096,7 @@ function Fe({
1011
1096
  const o = /* @__PURE__ */ new Map();
1012
1097
  function i(s) {
1013
1098
  o.set(s, s);
1014
- for (const r of Ot(s))
1099
+ for (const r of B0(s))
1015
1100
  i(r);
1016
1101
  }
1017
1102
  for (const s of n.objects)
@@ -1019,22 +1104,22 @@ function Fe({
1019
1104
  const a = t === null ? e : e - 1;
1020
1105
  for (let s = 0; s < a; s++) {
1021
1106
  const r = n.animations[s] ?? null;
1022
- gt(o, r);
1107
+ y0(o, r);
1023
1108
  }
1024
1109
  if (t !== null && e > 0) {
1025
1110
  const s = n.animations[e - 1] ?? null;
1026
- gt(o, s, t);
1111
+ y0(o, s, t);
1027
1112
  }
1028
1113
  return o;
1029
1114
  }
1030
- function Re(n) {
1115
+ function ze(n) {
1031
1116
  const e = {};
1032
1117
  function t(o) {
1033
1118
  if (o.objectType === U.SVG) {
1034
1119
  const a = o.svg;
1035
1120
  a !== void 0 && a.length > 0 && (e[a] = a);
1036
1121
  }
1037
- const i = Ot(o);
1122
+ const i = B0(o);
1038
1123
  for (const a of i)
1039
1124
  t(a);
1040
1125
  }
@@ -1043,7 +1128,7 @@ function Re(n) {
1043
1128
  t(i);
1044
1129
  return e;
1045
1130
  }
1046
- function Ne(n) {
1131
+ function je(n) {
1047
1132
  var o;
1048
1133
  const { slides: e } = n, t = {
1049
1134
  // First build of first slide
@@ -1061,20 +1146,20 @@ function Ne(n) {
1061
1146
  if (a === void 0)
1062
1147
  continue;
1063
1148
  const s = a.shortcut;
1064
- N0(t, s, i, 0);
1149
+ qt(t, s, i, 0);
1065
1150
  for (let r = 0; r < a.animations.length; r++) {
1066
1151
  const h = a.animations[r];
1067
1152
  if (h !== void 0)
1068
1153
  if (Array.isArray(h))
1069
1154
  for (const c of h)
1070
- N0(t, c.shortcut, i, r + 1);
1155
+ qt(t, c.shortcut, i, r + 1);
1071
1156
  else
1072
- N0(t, h.shortcut, i, r + 1);
1157
+ qt(t, h.shortcut, i, r + 1);
1073
1158
  }
1074
1159
  }
1075
1160
  return t;
1076
1161
  }
1077
- function N0(n, e, t, o) {
1162
+ function qt(n, e, t, o) {
1078
1163
  if (e !== null)
1079
1164
  if (Array.isArray(e))
1080
1165
  for (const i of e)
@@ -1082,8 +1167,8 @@ function N0(n, e, t, o) {
1082
1167
  else
1083
1168
  n[e] = { slideIndex: t, buildIndex: o };
1084
1169
  }
1085
- function Be(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }) {
1086
- t.shortcuts = Ne(n), e.addEventListener("mousemove", () => {
1170
+ function He(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigator: s }) {
1171
+ t.shortcuts = je(n), e.addEventListener("mousemove", () => {
1087
1172
  e.style.cursor = "auto";
1088
1173
  }), e.addEventListener("keyup", (r) => {
1089
1174
  if (r.code === "Escape") {
@@ -1118,38 +1203,38 @@ function Be(n, e, t, { onNext: o, onPrevious: i, onRenderSlide: a, onShowNavigat
1118
1203
  }
1119
1204
  });
1120
1205
  }
1121
- const d0 = "presenterState";
1122
- function qe(n, e) {
1123
- const t = localStorage.getItem(d0);
1206
+ const dt = "presenterState";
1207
+ function Ue(n, e) {
1208
+ const t = localStorage.getItem(dt);
1124
1209
  if (t === null)
1125
1210
  return null;
1126
1211
  if (e === null)
1127
- return localStorage.removeItem(d0), null;
1212
+ return localStorage.removeItem(dt), null;
1128
1213
  let o;
1129
1214
  try {
1130
1215
  o = JSON.parse(t);
1131
1216
  } catch (c) {
1132
- return console.error("Failed to parse presentation state from localStorage:", c), localStorage.removeItem(d0), null;
1217
+ return console.error("Failed to parse presentation state from localStorage:", c), localStorage.removeItem(dt), null;
1133
1218
  }
1134
1219
  const { title: i, timestamp: a } = o;
1135
1220
  let { slideIndex: s, buildIndex: r } = o;
1136
1221
  if (typeof i != "string" || typeof s != "number" || typeof r != "number" || typeof a != "number" || i !== n.title || Date.now() - a > 1e3 * 60 * e)
1137
- return localStorage.removeItem(d0), null;
1222
+ return localStorage.removeItem(dt), null;
1138
1223
  s > n.slides.length - 1 && (s = n.slides.length - 1, r = 0);
1139
1224
  const h = n.slides[s];
1140
- return h === void 0 ? (localStorage.removeItem(d0), null) : (r > h.animations.length && (r = h.animations.length), {
1225
+ return h === void 0 ? (localStorage.removeItem(dt), null) : (r > h.animations.length && (r = h.animations.length), {
1141
1226
  title: i,
1142
1227
  slideIndex: s,
1143
1228
  buildIndex: r
1144
1229
  });
1145
1230
  }
1146
- function De({ title: n, slideIndex: e, buildIndex: t }) {
1231
+ function Ye({ title: n, slideIndex: e, buildIndex: t }) {
1147
1232
  localStorage.setItem(
1148
- d0,
1233
+ dt,
1149
1234
  JSON.stringify({ title: n, slideIndex: e, buildIndex: t, timestamp: Date.now() })
1150
1235
  );
1151
1236
  }
1152
- const pt = Object.freeze({
1237
+ const v0 = Object.freeze({
1153
1238
  canvas: null,
1154
1239
  extrasContainer: null,
1155
1240
  mountedExtrasCleanups: [],
@@ -1166,45 +1251,45 @@ const pt = Object.freeze({
1166
1251
  Browser: "browser",
1167
1252
  Node: "node"
1168
1253
  };
1169
- function je(n, e) {
1254
+ function $e(n, e) {
1170
1255
  e.context.clearRect(0, 0, n.width, n.height);
1171
1256
  }
1172
- function ze(n) {
1257
+ function Xe(n) {
1173
1258
  const e = document.createElement("canvas");
1174
1259
  return e.setAttribute("width", n.width.toString()), e.setAttribute("height", n.height.toString()), e.style.position = "absolute", e.style.width = "100%", e;
1175
1260
  }
1176
- const g0 = {
1261
+ const gt = {
1177
1262
  Browser: "browser",
1178
1263
  Node: "node"
1179
1264
  };
1180
- function Ue(n) {
1265
+ function Ge(n) {
1181
1266
  const e = new Path2D(n);
1182
1267
  return {
1183
- type: g0.Browser,
1268
+ type: gt.Browser,
1184
1269
  path: e
1185
1270
  };
1186
1271
  }
1187
- function Ye(n) {
1188
- const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, f = { x: i, y: a }, d = Math.atan2(f.y - c.y, f.x - c.x), l = { x: c.x + (f.x - c.x) / 2, y: c.y + (f.y - c.y) / 2 }, u = f.x - c.x, m = f.y - c.y, M = Math.hypot(u, m) * e, T = Math.cos(d), S = Math.sin(d), P = h ? { x: l.x - T * M / 2, y: l.y - S * M / 2 } : c, E = h ? { x: l.x + T * M / 2, y: l.y + S * M / 2 } : { x: c.x + T * M, y: c.y + S * M }, C = r ? Math.PI / 6 : Math.PI / 4.5, O = M < s * 2 ? M / 2 : s, R = {
1189
- x: E.x - O * Math.cos(d - C),
1190
- y: E.y - O * Math.sin(d - C)
1272
+ function We(n) {
1273
+ const { drawn: e, startX: t, startY: o, endX: i, endY: a, arrowheadSize: s, isArrowheadFilled: r, isDrawnFromCenter: h } = n, c = { x: t, y: o }, f = { x: i, y: a }, d = Math.atan2(f.y - c.y, f.x - c.x), l = { x: c.x + (f.x - c.x) / 2, y: c.y + (f.y - c.y) / 2 }, u = f.x - c.x, m = f.y - c.y, M = Math.hypot(u, m) * e, E = Math.cos(d), L = Math.sin(d), C = h ? { x: l.x - E * M / 2, y: l.y - L * M / 2 } : c, S = h ? { x: l.x + E * M / 2, y: l.y + L * M / 2 } : { x: c.x + E * M, y: c.y + L * M }, T = r ? Math.PI / 6 : Math.PI / 4.5, I = M < s * 2 ? M / 2 : s, N = {
1274
+ x: S.x - I * Math.cos(d - T),
1275
+ y: S.y - I * Math.sin(d - T)
1191
1276
  }, G = {
1192
- x: E.x - O * Math.cos(d + C),
1193
- y: E.y - O * Math.sin(d + C)
1194
- }, z = {
1195
- x: P.x + O * Math.cos(d - C),
1196
- y: P.y + O * Math.sin(d - C)
1277
+ x: S.x - I * Math.cos(d + T),
1278
+ y: S.y - I * Math.sin(d + T)
1197
1279
  }, H = {
1198
- x: P.x + O * Math.cos(d + C),
1199
- y: P.y + O * Math.sin(d + C)
1280
+ x: C.x + I * Math.cos(d - T),
1281
+ y: C.y + I * Math.sin(d - T)
1282
+ }, $ = {
1283
+ x: C.x + I * Math.cos(d + T),
1284
+ y: C.y + I * Math.sin(d + T)
1200
1285
  };
1201
1286
  return {
1202
- arrowPoints: [P, E],
1203
- arrowheadPoints: [R, E, G],
1204
- doubledArrowheadPoints: [z, P, H]
1287
+ arrowPoints: [C, S],
1288
+ arrowheadPoints: [N, S, G],
1289
+ doubledArrowheadPoints: [H, C, $]
1205
1290
  };
1206
1291
  }
1207
- function y0({
1292
+ function yt({
1208
1293
  ctx: n,
1209
1294
  color: e,
1210
1295
  drawn: t = null,
@@ -1226,39 +1311,39 @@ function y0({
1226
1311
  ]) : n.context.setLineDash([f, c - f]);
1227
1312
  } else
1228
1313
  n.context.setLineDash([]);
1229
- if (n.context.lineWidth = h, n.context.strokeStyle = S0(e, a), n.context.lineCap = i ? "round" : "butt", s === void 0) {
1314
+ if (n.context.lineWidth = h, n.context.strokeStyle = Et(e, a), n.context.lineCap = i ? "round" : "butt", s === void 0) {
1230
1315
  n.context.stroke();
1231
1316
  return;
1232
1317
  }
1233
1318
  switch (n.type) {
1234
1319
  case V.Browser:
1235
- s.type === g0.Browser ? n.context.stroke(s.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1320
+ s.type === gt.Browser ? n.context.stroke(s.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1236
1321
  break;
1237
1322
  case V.Node:
1238
- s.type === g0.Node ? n.context.stroke(s.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1323
+ s.type === gt.Node ? n.context.stroke(s.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1239
1324
  break;
1240
1325
  default:
1241
- s0(n);
1326
+ st(n);
1242
1327
  }
1243
1328
  }
1244
1329
  }
1245
- function v0({ ctx: n, path: e, color: t, opacity: o = null }) {
1246
- if (n.context.fillStyle = nt(t, o), e === void 0) {
1330
+ function vt({ ctx: n, path: e, color: t, opacity: o = null }) {
1331
+ if (n.context.fillStyle = i0(t, o), e === void 0) {
1247
1332
  n.context.fill();
1248
1333
  return;
1249
1334
  }
1250
1335
  switch (n.type) {
1251
1336
  case V.Browser:
1252
- e.type === g0.Browser ? n.context.fill(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1337
+ e.type === gt.Browser ? n.context.fill(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1253
1338
  break;
1254
1339
  case V.Node:
1255
- e.type === g0.Node ? n.context.fill(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1340
+ e.type === gt.Node ? n.context.fill(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1256
1341
  break;
1257
1342
  default:
1258
- s0(n);
1343
+ st(n);
1259
1344
  }
1260
1345
  }
1261
- function B0(n, e) {
1346
+ function Dt(n, e) {
1262
1347
  const t = e(), o = n[0];
1263
1348
  if (o === void 0)
1264
1349
  return { path: t, length: 0 };
@@ -1273,7 +1358,7 @@ function B0(n, e) {
1273
1358
  }
1274
1359
  return { path: t, length: i };
1275
1360
  }
1276
- const He = ({
1361
+ const Ze = ({
1277
1362
  ctx: n,
1278
1363
  object: e,
1279
1364
  opacity: t,
@@ -1282,35 +1367,35 @@ const He = ({
1282
1367
  const i = e.opacity * t;
1283
1368
  if (i === 0 || e.drawn === 0)
1284
1369
  return;
1285
- const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = Ye(e), { path: h } = B0(a, o), { path: c } = B0(s, o);
1286
- if (y0({
1370
+ const { arrowPoints: a, arrowheadPoints: s, doubledArrowheadPoints: r } = We(e), { path: h } = Dt(a, o), { path: c } = Dt(s, o);
1371
+ if (yt({
1287
1372
  color: e.color,
1288
1373
  ctx: n,
1289
1374
  path: h,
1290
1375
  opacity: i,
1291
1376
  width: e.width
1292
- }), e.isArrowheadFilled && (c.path.closePath(), v0({
1377
+ }), e.isArrowheadFilled && (c.path.closePath(), vt({
1293
1378
  ctx: n,
1294
1379
  path: c,
1295
1380
  color: e.color,
1296
1381
  opacity: i
1297
- })), y0({
1382
+ })), yt({
1298
1383
  color: e.color,
1299
1384
  ctx: n,
1300
1385
  path: c,
1301
1386
  opacity: i,
1302
1387
  width: e.width
1303
1388
  }), e.isArrowheadDoubled) {
1304
- const { path: f } = B0(
1389
+ const { path: f } = Dt(
1305
1390
  r,
1306
1391
  o
1307
1392
  );
1308
- e.isArrowheadFilled && (f.path.closePath(), v0({
1393
+ e.isArrowheadFilled && (f.path.closePath(), vt({
1309
1394
  ctx: n,
1310
1395
  path: f,
1311
1396
  color: e.color,
1312
1397
  opacity: i
1313
- })), y0({
1398
+ })), yt({
1314
1399
  color: e.color,
1315
1400
  ctx: n,
1316
1401
  path: f,
@@ -1319,32 +1404,32 @@ const He = ({
1319
1404
  });
1320
1405
  }
1321
1406
  };
1322
- function Xe(n, e) {
1407
+ function Ve(n, e) {
1323
1408
  const t = n.radius - n.strokeWidth / 2;
1324
1409
  if (t <= 0)
1325
1410
  return;
1326
1411
  const o = e(), i = -Math.PI / 2;
1327
1412
  return o.path.arc(n.x, n.y, t, i, i + 2 * Math.PI), o;
1328
1413
  }
1329
- function $e(n, e) {
1414
+ function Ke(n, e) {
1330
1415
  const t = e(), o = -Math.PI / 2;
1331
1416
  t.path.arc(n.x, n.y, n.radius, o, o + 2 * Math.PI);
1332
1417
  const i = 2 * Math.PI * n.radius;
1333
1418
  return { path: t, length: i };
1334
1419
  }
1335
- function Ft(n, e) {
1420
+ function q0(n, e) {
1336
1421
  switch (n.type) {
1337
1422
  case V.Browser:
1338
- e.type === g0.Browser ? n.context.clip(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1423
+ e.type === gt.Browser ? n.context.clip(e.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1339
1424
  break;
1340
1425
  case V.Node:
1341
- e.type === g0.Node ? n.context.clip(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1426
+ e.type === gt.Node ? n.context.clip(e.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1342
1427
  break;
1343
1428
  default:
1344
- s0(n);
1429
+ st(n);
1345
1430
  }
1346
1431
  }
1347
- const Ge = ({
1432
+ const Qe = ({
1348
1433
  ctx: n,
1349
1434
  object: e,
1350
1435
  opacity: t,
@@ -1353,13 +1438,13 @@ const Ge = ({
1353
1438
  const i = e.opacity * t;
1354
1439
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1355
1440
  return;
1356
- const { path: a, length: s } = $e(e, o);
1441
+ const { path: a, length: s } = Ke(e, o);
1357
1442
  if (i < 1 && e.strokeWidth > 0) {
1358
- const r = Xe(e, o);
1359
- r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
1443
+ const r = Ve(e, o);
1444
+ r !== void 0 && (n.context.save(), q0(n, r), vt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
1360
1445
  } else
1361
- v0({ ctx: n, path: a, color: e.fillColor, opacity: i });
1362
- y0({
1446
+ vt({ ctx: n, path: a, color: e.fillColor, opacity: i });
1447
+ yt({
1363
1448
  color: e.strokeColor,
1364
1449
  ctx: n,
1365
1450
  drawn: e.drawn,
@@ -1376,77 +1461,77 @@ function X(n = null) {
1376
1461
  ...n
1377
1462
  };
1378
1463
  }
1379
- const We = X();
1380
- function u0(n = null) {
1464
+ const Je = X();
1465
+ function ut(n = null) {
1381
1466
  return {
1382
- origin: We,
1383
- size: Te,
1467
+ origin: Je,
1468
+ size: ke,
1384
1469
  ...n
1385
1470
  };
1386
1471
  }
1387
- u0();
1388
- function p0(n, e, t) {
1472
+ ut();
1473
+ function pt(n, e, t) {
1389
1474
  const { x: o, y: i } = n, { width: a, height: s } = t;
1390
1475
  switch (e) {
1391
- case o0.TOP_LEFT:
1392
- return u0({
1476
+ case ot.TOP_LEFT:
1477
+ return ut({
1393
1478
  origin: X({ x: o, y: i }),
1394
1479
  size: t
1395
1480
  });
1396
- case o0.TOP:
1397
- return u0({
1481
+ case ot.TOP:
1482
+ return ut({
1398
1483
  origin: X({ x: o - a / 2, y: i }),
1399
1484
  size: t
1400
1485
  });
1401
- case o0.TOP_RIGHT:
1402
- return u0({
1486
+ case ot.TOP_RIGHT:
1487
+ return ut({
1403
1488
  origin: X({ x: o - a, y: i }),
1404
1489
  size: t
1405
1490
  });
1406
- case o0.LEFT:
1407
- return u0({
1491
+ case ot.LEFT:
1492
+ return ut({
1408
1493
  origin: X({ x: o, y: i - s / 2 }),
1409
1494
  size: t
1410
1495
  });
1411
- case o0.CENTER:
1412
- return u0({
1496
+ case ot.CENTER:
1497
+ return ut({
1413
1498
  origin: X({ x: o - a / 2, y: i - s / 2 }),
1414
1499
  size: t
1415
1500
  });
1416
- case o0.RIGHT:
1417
- return u0({
1501
+ case ot.RIGHT:
1502
+ return ut({
1418
1503
  origin: X({ x: o - a, y: i - s / 2 }),
1419
1504
  size: t
1420
1505
  });
1421
- case o0.BOTTOM_LEFT:
1422
- return u0({
1506
+ case ot.BOTTOM_LEFT:
1507
+ return ut({
1423
1508
  origin: X({ x: o, y: i - s }),
1424
1509
  size: t
1425
1510
  });
1426
- case o0.BOTTOM:
1427
- return u0({
1511
+ case ot.BOTTOM:
1512
+ return ut({
1428
1513
  origin: X({ x: o - a / 2, y: i - s }),
1429
1514
  size: t
1430
1515
  });
1431
- case o0.BOTTOM_RIGHT:
1432
- return u0({
1516
+ case ot.BOTTOM_RIGHT:
1517
+ return ut({
1433
1518
  origin: X({ x: o - a, y: i - s }),
1434
1519
  size: t
1435
1520
  });
1436
1521
  default:
1437
- s0(e);
1522
+ st(e);
1438
1523
  }
1439
1524
  }
1440
- const Ze = ({
1525
+ const t1 = ({
1441
1526
  ctx: n,
1442
1527
  object: e,
1443
1528
  renderObject: t,
1444
1529
  opacity: o
1445
1530
  }) => {
1446
- const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s = p0(
1531
+ const i = e.scale * e.scaleX, a = e.scale * e.scaleY, s = pt(
1447
1532
  X({ x: e.x, y: e.y }),
1448
1533
  e.anchor,
1449
- a0({
1534
+ at({
1450
1535
  width: e.width * Math.abs(i),
1451
1536
  height: e.height * Math.abs(a)
1452
1537
  })
@@ -1462,10 +1547,10 @@ const Ze = ({
1462
1547
  ), n.context.translate(-f, -d);
1463
1548
  for (const m of e.objects)
1464
1549
  t(m, o * e.opacity);
1465
- e.previewColor !== null && (n.context.fillStyle = S0(e.previewColor), n.context.fillRect(0, 0, e.width, e.height)), e.rotateOriginPreviewSize > 0 && (n.context.fillStyle = "red", n.context.beginPath(), n.context.arc(h, c, e.rotateOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), e.skewOriginPreviewSize > 0 && (n.context.fillStyle = "blue", n.context.beginPath(), n.context.arc(f, d, e.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
1550
+ e.previewColor !== null && (n.context.fillStyle = Et(e.previewColor), n.context.fillRect(0, 0, e.width, e.height)), e.rotateOriginPreviewSize > 0 && (n.context.fillStyle = "red", n.context.beginPath(), n.context.arc(h, c, e.rotateOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), e.skewOriginPreviewSize > 0 && (n.context.fillStyle = "blue", n.context.beginPath(), n.context.arc(f, d, e.skewOriginPreviewSize, 0, 2 * Math.PI), n.context.fill()), n.context.restore();
1466
1551
  }
1467
1552
  };
1468
- function rt(n, e, t, o, i = 0) {
1553
+ function o0(n, e, t, o, i = 0) {
1469
1554
  const a = o();
1470
1555
  a.path.moveTo(n.x + t, n.y), a.path.lineTo(n.x + e.width - t, n.y), a.path.arcTo(
1471
1556
  n.x + e.width,
@@ -1489,24 +1574,24 @@ function rt(n, e, t, o, i = 0) {
1489
1574
  const s = 2 * (e.width + e.height - 4 * t) + 2 * Math.PI * t + i;
1490
1575
  return { path: a, length: s };
1491
1576
  }
1492
- const E0 = {
1577
+ const St = {
1493
1578
  Browser: "browser",
1494
1579
  Node: "node"
1495
- }, Ve = ({
1580
+ }, e1 = ({
1496
1581
  ctx: n,
1497
1582
  imageById: e,
1498
1583
  object: t,
1499
1584
  opacity: o,
1500
1585
  createPath2D: i
1501
1586
  }) => {
1502
- const a = p0(
1587
+ const a = pt(
1503
1588
  X({ x: t.x, y: t.y }),
1504
1589
  t.anchor,
1505
- a0({ width: t.width, height: t.height })
1590
+ at({ width: t.width, height: t.height })
1506
1591
  ), s = e[t.imageId];
1507
1592
  if (s !== void 0) {
1508
1593
  if (n.context.save(), t.cornerRadius > 0) {
1509
- const r = rt(
1594
+ const r = o0(
1510
1595
  a.origin,
1511
1596
  a.size,
1512
1597
  t.cornerRadius,
@@ -1514,18 +1599,18 @@ const E0 = {
1514
1599
  );
1515
1600
  switch (n.type) {
1516
1601
  case V.Browser:
1517
- r.path.type === g0.Browser ? n.context.clip(r.path.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1602
+ r.path.type === gt.Browser ? n.context.clip(r.path.path) : console.warn("Attempted to use Node Path2D in Browser Canvas context");
1518
1603
  break;
1519
1604
  case V.Node:
1520
- r.path.type === g0.Node ? n.context.clip(r.path.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1605
+ r.path.type === gt.Node ? n.context.clip(r.path.path) : console.warn("Attempted to use Browser Path2D in Node Canvas context");
1521
1606
  break;
1522
1607
  default:
1523
- s0(n);
1608
+ st(n);
1524
1609
  }
1525
1610
  }
1526
1611
  switch (n.context.globalAlpha = o * t.opacity, n.context.imageSmoothingEnabled = t.smooth, n.type) {
1527
1612
  case V.Browser:
1528
- s.type === E0.Browser ? n.context.drawImage(
1613
+ s.type === St.Browser ? n.context.drawImage(
1529
1614
  s.image,
1530
1615
  a.origin.x,
1531
1616
  a.origin.y,
@@ -1534,7 +1619,7 @@ const E0 = {
1534
1619
  ) : console.warn("Attempted to use Node Image in Browser Canvas context");
1535
1620
  break;
1536
1621
  case V.Node:
1537
- s.type === E0.Node ? n.context.drawImage(
1622
+ s.type === St.Node ? n.context.drawImage(
1538
1623
  s.image,
1539
1624
  a.origin.x,
1540
1625
  a.origin.y,
@@ -1543,18 +1628,18 @@ const E0 = {
1543
1628
  ) : console.warn("Attempted to use Browser Image in Node Canvas context");
1544
1629
  break;
1545
1630
  default:
1546
- s0(n);
1631
+ st(n);
1547
1632
  }
1548
1633
  n.context.restore();
1549
1634
  }
1550
1635
  };
1551
- function Ke(n, e) {
1636
+ function n1(n, e) {
1552
1637
  const t = e();
1553
1638
  t.path.moveTo(n.startX, n.startY), t.path.lineTo(n.endX, n.endY);
1554
1639
  const o = Math.hypot(n.endX - n.startX, n.endY - n.startY);
1555
1640
  return { path: t, length: o };
1556
1641
  }
1557
- const Qe = ({
1642
+ const r1 = ({
1558
1643
  ctx: n,
1559
1644
  object: e,
1560
1645
  opacity: t,
@@ -1563,8 +1648,8 @@ const Qe = ({
1563
1648
  const i = e.opacity * t;
1564
1649
  if (i === 0 || e.drawn === 0)
1565
1650
  return;
1566
- const { path: a, length: s } = Ke(e, o);
1567
- y0({
1651
+ const { path: a, length: s } = n1(e, o);
1652
+ yt({
1568
1653
  color: e.color,
1569
1654
  ctx: n,
1570
1655
  drawn: e.drawn,
@@ -1575,23 +1660,23 @@ const Qe = ({
1575
1660
  opacity: i,
1576
1661
  width: e.width
1577
1662
  });
1578
- }, Je = ({
1663
+ }, i1 = ({
1579
1664
  ctx: n,
1580
1665
  object: e,
1581
1666
  opacity: t,
1582
1667
  renderObject: o
1583
1668
  }) => {
1584
1669
  n.context.save();
1585
- const i = p0(
1670
+ const i = pt(
1586
1671
  X({ x: e.x, y: e.y }),
1587
1672
  e.anchor,
1588
- a0({ width: e.width, height: e.height })
1673
+ at({ width: e.width, height: e.height })
1589
1674
  );
1590
- e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = S0($.RED), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.stroke()), n.context.beginPath(), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.closePath(), n.context.clip();
1675
+ e.preview && (n.context.lineWidth = 4, n.context.strokeStyle = Et(W.RED), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.stroke()), n.context.beginPath(), n.context.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), n.context.closePath(), n.context.clip();
1591
1676
  for (const a of e.objects)
1592
1677
  o(a, t * e.opacity);
1593
1678
  n.context.restore();
1594
- }, t1 = ({
1679
+ }, o1 = ({
1595
1680
  ctx: n,
1596
1681
  object: e,
1597
1682
  opacity: t,
@@ -1600,17 +1685,17 @@ const Qe = ({
1600
1685
  const i = e.opacity * t;
1601
1686
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1602
1687
  return;
1603
- const { origin: a } = p0(
1688
+ const { origin: a } = pt(
1604
1689
  X({ x: e.x, y: e.y }),
1605
1690
  e.anchor,
1606
- a0({ width: e.width, height: e.height })
1691
+ at({ width: e.width, height: e.height })
1607
1692
  ), s = o(e.path);
1608
- n.context.save(), n.context.translate(a.x, a.y), n.context.scale(e.width / e.viewboxWidth, e.height / e.viewboxHeight), v0({
1693
+ n.context.save(), n.context.translate(a.x, a.y), n.context.scale(e.width / e.viewboxWidth, e.height / e.viewboxHeight), vt({
1609
1694
  ctx: n,
1610
1695
  path: s,
1611
1696
  color: e.fillColor,
1612
1697
  opacity: i
1613
- }), y0({
1698
+ }), yt({
1614
1699
  color: e.strokeColor,
1615
1700
  ctx: n,
1616
1701
  drawn: e.drawn,
@@ -1621,7 +1706,7 @@ const Qe = ({
1621
1706
  width: e.strokeWidth
1622
1707
  }), n.context.restore();
1623
1708
  };
1624
- function e1(n, e) {
1709
+ function s1(n, e) {
1625
1710
  const t = e(), o = n.points, i = o[0];
1626
1711
  if (i === void 0)
1627
1712
  return { path: t, length: 0 };
@@ -1642,7 +1727,7 @@ function e1(n, e) {
1642
1727
  );
1643
1728
  return a += r, { path: t, length: a };
1644
1729
  }
1645
- const n1 = ({
1730
+ const a1 = ({
1646
1731
  ctx: n,
1647
1732
  object: e,
1648
1733
  opacity: t,
@@ -1651,13 +1736,13 @@ const n1 = ({
1651
1736
  const i = e.opacity * t;
1652
1737
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1653
1738
  return;
1654
- const { path: a, length: s } = e1(e, o);
1655
- v0({
1739
+ const { path: a, length: s } = s1(e, o);
1740
+ vt({
1656
1741
  ctx: n,
1657
1742
  path: a,
1658
1743
  color: e.fillColor,
1659
1744
  opacity: i
1660
- }), y0({
1745
+ }), yt({
1661
1746
  color: e.strokeColor,
1662
1747
  ctx: n,
1663
1748
  drawn: e.drawn,
@@ -1667,34 +1752,34 @@ const n1 = ({
1667
1752
  width: e.strokeWidth
1668
1753
  });
1669
1754
  };
1670
- function r1(n, e) {
1671
- const t = n.strokeWidth / 2, { origin: o, size: i } = p0(
1755
+ function h1(n, e) {
1756
+ const t = n.strokeWidth / 2, { origin: o, size: i } = pt(
1672
1757
  X({ x: n.x, y: n.y }),
1673
1758
  n.anchor,
1674
- a0({ width: n.width, height: n.height })
1759
+ at({ width: n.width, height: n.height })
1675
1760
  ), a = i.width - n.strokeWidth, s = i.height - n.strokeWidth;
1676
1761
  if (a <= 0 || s <= 0)
1677
1762
  return;
1678
- const r = X({ x: o.x + t, y: o.y + t }), h = a0({ width: a, height: s }), c = Math.max(
1763
+ const r = X({ x: o.x + t, y: o.y + t }), h = at({ width: a, height: s }), c = Math.max(
1679
1764
  0,
1680
1765
  Math.min(n.cornerRadius - t, Math.min(a, s) / 2)
1681
1766
  );
1682
1767
  if (c > 0)
1683
- return rt(r, h, c, e).path;
1768
+ return o0(r, h, c, e).path;
1684
1769
  const f = e();
1685
1770
  return f.path.moveTo(r.x, r.y), f.path.lineTo(r.x + a, r.y), f.path.lineTo(r.x + a, r.y + s), f.path.lineTo(r.x, r.y + s), f.path.closePath(), f;
1686
1771
  }
1687
- function i1(n, e) {
1688
- const { origin: t, size: o } = p0(
1772
+ function l1(n, e) {
1773
+ const { origin: t, size: o } = pt(
1689
1774
  X({ x: n.x, y: n.y }),
1690
1775
  n.anchor,
1691
- a0({ width: n.width, height: n.height })
1776
+ at({ width: n.width, height: n.height })
1692
1777
  ), i = Math.max(
1693
1778
  0,
1694
1779
  Math.min(n.cornerRadius, Math.min(o.width, o.height) / 2)
1695
1780
  ), a = Math.min(n.strokeWidth * 2, o.width - i);
1696
1781
  if (i > 0)
1697
- return rt(t, o, i, e, a);
1782
+ return o0(t, o, i, e, a);
1698
1783
  {
1699
1784
  const s = e();
1700
1785
  s.path.moveTo(t.x, t.y), s.path.lineTo(t.x + o.width, t.y), s.path.lineTo(t.x + o.width, t.y + o.height), s.path.lineTo(t.x, t.y + o.height), s.path.lineTo(t.x, t.y), s.path.lineTo(t.x + a, t.y);
@@ -1702,7 +1787,7 @@ function i1(n, e) {
1702
1787
  return { path: s, length: r };
1703
1788
  }
1704
1789
  }
1705
- const o1 = ({
1790
+ const c1 = ({
1706
1791
  ctx: n,
1707
1792
  object: e,
1708
1793
  opacity: t,
@@ -1711,13 +1796,13 @@ const o1 = ({
1711
1796
  const i = e.opacity * t;
1712
1797
  if (i === 0 || e.drawn === 0 && e.fillColor.alpha === 0)
1713
1798
  return;
1714
- const { path: a, length: s } = i1(e, o);
1799
+ const { path: a, length: s } = l1(e, o);
1715
1800
  if (i < 1 && e.strokeWidth > 0) {
1716
- const r = r1(e, o);
1717
- r !== void 0 && (n.context.save(), Ft(n, r), v0({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
1801
+ const r = h1(e, o);
1802
+ r !== void 0 && (n.context.save(), q0(n, r), vt({ ctx: n, path: a, color: e.fillColor, opacity: i }), n.context.restore());
1718
1803
  } else
1719
- v0({ ctx: n, path: a, color: e.fillColor, opacity: i });
1720
- y0({
1804
+ vt({ ctx: n, path: a, color: e.fillColor, opacity: i });
1805
+ yt({
1721
1806
  color: e.strokeColor,
1722
1807
  ctx: n,
1723
1808
  drawn: e.drawn,
@@ -1726,7 +1811,7 @@ const o1 = ({
1726
1811
  opacity: i,
1727
1812
  width: e.strokeWidth
1728
1813
  });
1729
- }, s1 = ({
1814
+ }, u1 = ({
1730
1815
  ctx: n,
1731
1816
  imageById: e,
1732
1817
  object: t,
@@ -1738,14 +1823,14 @@ const o1 = ({
1738
1823
  const a = e[t.svg];
1739
1824
  if (a === void 0)
1740
1825
  return;
1741
- const s = p0(
1826
+ const s = pt(
1742
1827
  X({ x: t.x, y: t.y }),
1743
1828
  t.anchor,
1744
- a0({ width: t.width, height: t.height })
1829
+ at({ width: t.width, height: t.height })
1745
1830
  );
1746
1831
  switch (n.context.save(), n.context.globalAlpha = i, n.type) {
1747
1832
  case V.Browser:
1748
- a.type === E0.Browser && n.context.drawImage(
1833
+ a.type === St.Browser && n.context.drawImage(
1749
1834
  a.image,
1750
1835
  s.origin.x,
1751
1836
  s.origin.y,
@@ -1754,7 +1839,7 @@ const o1 = ({
1754
1839
  );
1755
1840
  break;
1756
1841
  case V.Node:
1757
- a.type === E0.Node && n.context.drawImage(
1842
+ a.type === St.Node && n.context.drawImage(
1758
1843
  a.image,
1759
1844
  s.origin.x,
1760
1845
  s.origin.y,
@@ -1763,11 +1848,11 @@ const o1 = ({
1763
1848
  );
1764
1849
  break;
1765
1850
  default:
1766
- s0(n);
1851
+ st(n);
1767
1852
  }
1768
1853
  n.context.restore();
1769
1854
  };
1770
- function a1(n) {
1855
+ function f1(n) {
1771
1856
  return {
1772
1857
  color: n.color,
1773
1858
  fontFamily: n.fontFamily,
@@ -1779,7 +1864,7 @@ function a1(n) {
1779
1864
  superscript: n.superscript
1780
1865
  };
1781
1866
  }
1782
- function h1(n, e = 1) {
1867
+ function g1(n, e = 1) {
1783
1868
  const t = Math.max(...n.map((a) => a.reduce((s, r) => s + r.width, 0)));
1784
1869
  let o = 0, i = 0;
1785
1870
  for (let a = 0; a < n.length; a++) {
@@ -1794,8 +1879,8 @@ function h1(n, e = 1) {
1794
1879
  width: t
1795
1880
  };
1796
1881
  }
1797
- const l1 = 0.7, c1 = 0.3;
1798
- function Rt(n) {
1882
+ const p1 = 0.7, d1 = 0.3;
1883
+ function D0(n) {
1799
1884
  const e = n.superscript, t = n.subscript && !e;
1800
1885
  return !e && !t ? {
1801
1886
  baselineShift: 0,
@@ -1803,30 +1888,30 @@ function Rt(n) {
1803
1888
  isSubscript: !1,
1804
1889
  isSuperscript: !1
1805
1890
  } : {
1806
- baselineShift: n.fontSize * c1 * (e ? -1 : 1),
1807
- fontSize: n.fontSize * l1,
1891
+ baselineShift: n.fontSize * d1 * (e ? -1 : 1),
1892
+ fontSize: n.fontSize * p1,
1808
1893
  isSubscript: t,
1809
1894
  isSuperscript: e
1810
1895
  };
1811
1896
  }
1812
- function u1(n) {
1897
+ function x1(n) {
1813
1898
  return {
1814
1899
  width: n.width,
1815
1900
  height: n.fontBoundingBoxAscent
1816
1901
  };
1817
1902
  }
1818
- function Nt(n, e, t = 1) {
1819
- const o = Rt(e);
1820
- n.context.fillStyle = nt(e.color, t), n.context.font = `${e.fontStyle} ${e.fontWeight} ${o.fontSize}px ${e.fontFamily}`, n.type === V.Browser ? n.context.textRendering = e.ligatures ? "optimizeLegibility" : "optimizeSpeed" : n.context.fontVariant = e.ligatures ? "common-ligatures" : "no-common-ligatures";
1903
+ function z0(n, e, t = 1) {
1904
+ const o = D0(e);
1905
+ n.context.fillStyle = i0(e.color, t), n.context.font = `${e.fontStyle} ${e.fontWeight} ${o.fontSize}px ${e.fontFamily}`, n.type === V.Browser ? n.context.textRendering = e.ligatures ? "optimizeLegibility" : "optimizeSpeed" : n.context.fontVariant = e.ligatures ? "common-ligatures" : "no-common-ligatures";
1821
1906
  }
1822
- function f1(n, e, t) {
1907
+ function y1(n, e, t) {
1823
1908
  const o = [];
1824
1909
  for (const i of n) {
1825
1910
  const a = [];
1826
1911
  for (const s of i) {
1827
1912
  const { text: r, ...h } = s, c = { ...e, ...h };
1828
- Nt(t, c);
1829
- const f = t.context.measureText(r), d = u1(f), { baselineShift: l } = Rt(c), u = d.height + Math.max(0, -l), m = Math.max(0, l);
1913
+ z0(t, c);
1914
+ const f = t.context.measureText(r), d = x1(f), { baselineShift: l } = D0(c), u = d.height + Math.max(0, -l), m = Math.max(0, l);
1830
1915
  a.push({
1831
1916
  ...d,
1832
1917
  baselineShift: l,
@@ -1839,11 +1924,11 @@ function f1(n, e, t) {
1839
1924
  }
1840
1925
  return o;
1841
1926
  }
1842
- const g1 = ({ ctx: n, object: e, opacity: t }) => {
1927
+ const v1 = ({ ctx: n, object: e, opacity: t }) => {
1843
1928
  const o = e.opacity * t;
1844
1929
  if (o === 0)
1845
1930
  return;
1846
- const { length: i } = e, a = _t(e.text), s = a1(e), r = f1(a, s, n), h = h1(r, e.lineSpacing), c = p0(X({ x: e.x, y: e.y }), e.anchor, h);
1931
+ const { length: i } = e, a = N0(e.text), s = f1(e), r = y1(a, s, n), h = g1(r, e.lineSpacing), c = pt(X({ x: e.x, y: e.y }), e.anchor, h);
1847
1932
  let f = c.origin.x, d = c.origin.y, l = 0, u = 0;
1848
1933
  for (let m = 0; m < a.length; m++) {
1849
1934
  const y = a[m], M = r[m];
@@ -1851,69 +1936,69 @@ const g1 = ({ ctx: n, object: e, opacity: t }) => {
1851
1936
  console.error("Could not determine text units or sizes for line");
1852
1937
  continue;
1853
1938
  }
1854
- const T = M.reduce((O, R) => O + R.width, 0), S = M.length === 0 ? u : M.reduce((O, R) => Math.max(O, R.top), 0), P = M.length === 0 ? 0 : M.reduce((O, R) => Math.max(O, R.bottom), 0), E = S + P;
1939
+ const E = M.reduce((I, N) => I + N.width, 0), L = M.length === 0 ? u : M.reduce((I, N) => Math.max(I, N.top), 0), C = M.length === 0 ? 0 : M.reduce((I, N) => Math.max(I, N.bottom), 0), S = L + C;
1855
1940
  switch (e.alignment) {
1856
- case x0.LEFT:
1941
+ case xt.LEFT:
1857
1942
  f = c.origin.x;
1858
1943
  break;
1859
- case x0.CENTER:
1860
- f = c.origin.x + (c.size.width - T) / 2;
1944
+ case xt.CENTER:
1945
+ f = c.origin.x + (c.size.width - E) / 2;
1861
1946
  break;
1862
- case x0.RIGHT:
1863
- f = c.origin.x + (c.size.width - T);
1947
+ case xt.RIGHT:
1948
+ f = c.origin.x + (c.size.width - E);
1864
1949
  break;
1865
1950
  default:
1866
- s0(e.alignment);
1951
+ st(e.alignment);
1867
1952
  break;
1868
1953
  }
1869
1954
  d += u * (e.lineSpacing - 1);
1870
- const C = d + S;
1871
- u = E;
1872
- for (let O = 0; O < y.length && !(i !== null && l >= i); O++) {
1873
- const R = y[O], G = M[O];
1874
- if (R == null || G == null) {
1955
+ const T = d + L;
1956
+ u = S;
1957
+ for (let I = 0; I < y.length && !(i !== null && l >= i); I++) {
1958
+ const N = y[I], G = M[I];
1959
+ if (N == null || G == null) {
1875
1960
  console.error("Could not determine text unit or size for unit");
1876
1961
  continue;
1877
1962
  }
1878
- const { text: z, ...H } = R;
1879
- let t0;
1880
- if (i !== null && l + z.length > i) {
1963
+ const { text: H, ...$ } = N;
1964
+ let tt;
1965
+ if (i !== null && l + H.length > i) {
1881
1966
  const K = i - l;
1882
- t0 = z.slice(0, K);
1967
+ tt = H.slice(0, K);
1883
1968
  }
1884
- const e0 = t0 ?? z;
1885
- l += e0.length;
1886
- const n0 = { ...s, ...H };
1887
- Nt(n, n0, o), n.context.fillText(e0, f, C + G.baselineShift), f += G.width;
1969
+ const et = tt ?? H;
1970
+ l += et.length;
1971
+ const nt = { ...s, ...$ };
1972
+ z0(n, nt, o), n.context.fillText(et, f, T + G.baselineShift), f += G.width;
1888
1973
  }
1889
- d += E;
1890
- }
1891
- }, p1 = {
1892
- [U.ARROW]: He,
1893
- [U.CIRCLE]: Ge,
1894
- [U.GROUP]: Ze,
1895
- [U.IMAGE]: Ve,
1896
- [U.LINE]: Qe,
1897
- [U.MASK]: Je,
1898
- [U.PATH]: t1,
1899
- [U.POLYGON]: n1,
1900
- [U.RECTANGLE]: o1,
1974
+ d += S;
1975
+ }
1976
+ }, w1 = {
1977
+ [U.ARROW]: Ze,
1978
+ [U.CIRCLE]: Qe,
1979
+ [U.GROUP]: t1,
1980
+ [U.IMAGE]: e1,
1981
+ [U.LINE]: r1,
1982
+ [U.MASK]: i1,
1983
+ [U.PATH]: o1,
1984
+ [U.POLYGON]: a1,
1985
+ [U.RECTANGLE]: c1,
1901
1986
  [U.SLIDE_OBJECT]: () => {
1902
1987
  },
1903
- [U.SVG]: s1,
1904
- [U.TEXT]: g1
1988
+ [U.SVG]: u1,
1989
+ [U.TEXT]: v1
1905
1990
  };
1906
- function d1(n) {
1991
+ function m1(n) {
1907
1992
  const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
1908
1993
  return e.setAttribute("viewBox", `0 0 ${n.width} ${n.height}`), e.style.backgroundColor = "transparent", e.style.position = "absolute", e.style.width = "100%", e;
1909
1994
  }
1910
- function x1(n, e) {
1995
+ function b1(n, e) {
1911
1996
  if (n === null)
1912
1997
  return null;
1913
- const t = p0(
1998
+ const t = pt(
1914
1999
  X({ x: e.x, y: e.y }),
1915
2000
  e.anchor,
1916
- a0({ width: e.width, height: e.height })
2001
+ at({ width: e.width, height: e.height })
1917
2002
  ), o = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
1918
2003
  o.setAttribute("x", t.origin.x.toString()), o.setAttribute("y", t.origin.y.toString()), o.setAttribute("width", e.width.toString()), o.setAttribute("height", e.height.toString());
1919
2004
  const i = e.content;
@@ -1927,7 +2012,7 @@ function x1(n, e) {
1927
2012
  a !== null && a(), n.removeChild(o);
1928
2013
  };
1929
2014
  }
1930
- async function y1(n) {
2015
+ async function A1(n) {
1931
2016
  if (Object.keys(n).length === 0)
1932
2017
  return {};
1933
2018
  const e = {}, t = (i) => new Promise((a, s) => {
@@ -1940,7 +2025,7 @@ async function y1(n) {
1940
2025
  }), o = Object.entries(n).map(async ([i, a]) => {
1941
2026
  const s = await t(a);
1942
2027
  e[i] = {
1943
- type: E0.Browser,
2028
+ type: St.Browser,
1944
2029
  image: s
1945
2030
  };
1946
2031
  });
@@ -1951,35 +2036,36 @@ async function y1(n) {
1951
2036
  }
1952
2037
  return e;
1953
2038
  }
1954
- class kn {
2039
+ class Rn {
1955
2040
  constructor(e) {
2041
+ this.navigator = null;
1956
2042
  const { objectRenderers: t, scale: o = 1, ...i } = e;
1957
2043
  this.props = {
1958
- presentation: Pe(),
2044
+ presentation: Ie(),
1959
2045
  element: document.body,
1960
2046
  objectRenderers: {
1961
- ...p1,
2047
+ ...w1,
1962
2048
  ...t
1963
2049
  },
1964
2050
  cacheDurationMinutes: 15,
1965
- scale: v1(o),
2051
+ scale: M1(o),
1966
2052
  ...i
1967
- }, this.state = { ...pt };
2053
+ }, this.state = { ...v0 };
1968
2054
  }
1969
2055
  /** Starts the presentation. */
1970
2056
  async present() {
1971
- const { presentation: e, element: t, scale: o } = this.props, i = ze(e.size), a = d1(e.size);
2057
+ const { presentation: e, element: t, scale: o } = this.props, i = Xe(e.size), a = m1(e.size);
1972
2058
  a.style.transformOrigin = "center center", a.style.transform = `scale(${o})`, this.state = {
1973
- ...pt,
1974
- imageById: await y1({
2059
+ ...v0,
2060
+ imageById: await A1({
1975
2061
  ...e.resources.images,
1976
- ...Re(e)
2062
+ ...ze(e)
1977
2063
  }),
1978
2064
  canvas: i,
1979
2065
  extrasContainer: a
1980
2066
  };
1981
- const s = Ee(e, t);
1982
- Be(e, t, this.state.shortcutState, {
2067
+ const s = Fe(e, t);
2068
+ He(e, t, this.state.shortcutState, {
1983
2069
  onNext: (h) => this.next(h),
1984
2070
  onPrevious: (h) => this.previous(h),
1985
2071
  onRenderSlide: (h, c) => {
@@ -1988,62 +2074,94 @@ class kn {
1988
2074
  buildIndex: this.state.buildIndex
1989
2075
  }, this.renderSlide(h ?? this.state.slideIndex, c);
1990
2076
  },
1991
- onShowNavigator: () => be({
1992
- presentation: e,
1993
- onNavigateToSlide: (h) => this.renderSlide(h)
1994
- })
2077
+ onShowNavigator: () => {
2078
+ this.navigator = Ce({
2079
+ presentation: e,
2080
+ onNavigateToSlide: (h) => this.renderSlide(h),
2081
+ onNext: () => this.next()
2082
+ }), this.updateNavigator();
2083
+ }
1995
2084
  }), t.replaceChildren(), s.appendChild(i), s.appendChild(a), t.appendChild(s);
1996
- const r = qe(e, this.props.cacheDurationMinutes);
2085
+ const r = Ue(e, this.props.cacheDurationMinutes);
1997
2086
  r !== null ? this.renderSlide(r.slideIndex, r.buildIndex) : this.renderSlide(0);
1998
2087
  }
1999
2088
  renderSlide(e, t = 0, o = null) {
2000
- const { objectRenderers: i, presentation: a, scale: s } = this.props, { canvas: r, imageById: h } = this.state, c = this.state.slideIndex !== e;
2001
- this.state.slideIndex = e, this.state.buildIndex = t, o === null && De({ title: a.title, slideIndex: e, buildIndex: t });
2002
- const f = a.slides[e];
2003
- if (f === void 0 || r === null)
2004
- return;
2005
- if (c || this.state.mountedExtrasCleanups.length === 0 && f.extras.length > 0) {
2006
- for (const M of this.state.mountedExtrasCleanups)
2007
- M();
2008
- this.state.mountedExtrasCleanups = [];
2009
- for (const M of f.extras) {
2010
- const T = x1(this.state.extrasContainer, M);
2011
- T !== null && this.state.mountedExtrasCleanups.push(T);
2089
+ const { presentation: i } = this.props, { canvas: a } = this.state, s = this.state.slideIndex !== e;
2090
+ this.state.slideIndex = e, this.state.buildIndex = t, o === null && Ye({ title: i.title, slideIndex: e, buildIndex: t });
2091
+ const r = i.slides[e];
2092
+ if (!(r === void 0 || a === null)) {
2093
+ if (s || this.state.mountedExtrasCleanups.length === 0 && r.extras.length > 0) {
2094
+ for (const h of this.state.mountedExtrasCleanups)
2095
+ h();
2096
+ this.state.mountedExtrasCleanups = [];
2097
+ for (const h of r.extras) {
2098
+ const c = b1(this.state.extrasContainer, h);
2099
+ c !== null && this.state.mountedExtrasCleanups.push(c);
2100
+ }
2012
2101
  }
2102
+ this.renderCanvas(a, e, t, o, this.props.scale), o === null && this.updateNavigator();
2013
2103
  }
2014
- const d = r.getContext("2d");
2015
- if (d === null)
2104
+ }
2105
+ renderCanvas(e, t, o = 0, i = null, a = 1) {
2106
+ const { objectRenderers: s, presentation: r } = this.props, { imageById: h } = this.state;
2107
+ e.width = r.size.width, e.height = r.size.height;
2108
+ const c = e.getContext("2d");
2109
+ if (c === null)
2016
2110
  return;
2017
- const l = {
2111
+ const f = {
2018
2112
  type: V.Browser,
2019
- context: d
2113
+ context: c
2020
2114
  };
2021
- je(r, l);
2022
- const u = Fe({
2023
- slide: f,
2024
- buildIndex: t,
2025
- buildTime: o
2115
+ $e(e, f);
2116
+ const d = r.slides[t];
2117
+ if (d === void 0)
2118
+ return;
2119
+ const l = De({
2120
+ slide: d,
2121
+ buildIndex: o,
2122
+ buildTime: i
2026
2123
  });
2027
- l.context.fillStyle = nt(a.backgroundColor), l.context.fillRect(0, 0, r.width, r.height);
2028
- function m(M, T) {
2029
- const S = i[M.objectType], P = u.get(M);
2030
- S === void 0 || P === void 0 || S({
2031
- ctx: l,
2124
+ f.context.fillStyle = i0(r.backgroundColor), f.context.fillRect(0, 0, e.width, e.height);
2125
+ function u(y, M) {
2126
+ const E = s[y.objectType], L = l.get(y);
2127
+ E === void 0 || L === void 0 || E({
2128
+ ctx: f,
2032
2129
  imageById: h,
2033
- object: P,
2034
- opacity: T,
2035
- renderObject: m,
2036
- createPath2D: Ue
2130
+ object: L,
2131
+ opacity: M,
2132
+ renderObject: u,
2133
+ createPath2D: Ge
2037
2134
  });
2038
2135
  }
2039
- const y = s !== 1;
2040
- y && (l.context.save(), l.context.translate(
2041
- r.width * (1 - s) / 2,
2042
- r.height * (1 - s) / 2
2043
- ), l.context.scale(s, s));
2044
- for (const M of f.objects)
2045
- m(M, 1);
2046
- y && l.context.restore();
2136
+ const m = a !== 1;
2137
+ m && (f.context.save(), f.context.translate(
2138
+ e.width * (1 - a) / 2,
2139
+ e.height * (1 - a) / 2
2140
+ ), f.context.scale(a, a));
2141
+ for (const y of d.objects)
2142
+ u(y, 1);
2143
+ m && f.context.restore();
2144
+ }
2145
+ updateNavigator() {
2146
+ const { navigator: e } = this;
2147
+ if (e === null)
2148
+ return;
2149
+ if (!e.isOpen()) {
2150
+ this.navigator = null;
2151
+ return;
2152
+ }
2153
+ const { slideIndex: t, buildIndex: o } = this.state, i = this.getNextSlideBuild(t, o);
2154
+ e.update(t, o, i.slideIndex, i.buildIndex), this.renderCanvas(e.currentCanvas, t, o), i.slideIndex === null ? this.renderEndCanvas(e.nextCanvas) : this.renderCanvas(e.nextCanvas, i.slideIndex, i.buildIndex);
2155
+ }
2156
+ getNextSlideBuild(e, t) {
2157
+ const { presentation: o } = this.props, i = o.slides[e];
2158
+ return i === void 0 ? { slideIndex: e, buildIndex: t } : t < i.animations.length ? { slideIndex: e, buildIndex: t + 1 } : e + 1 < o.slides.length ? { slideIndex: e + 1, buildIndex: 0 } : { slideIndex: null, buildIndex: 0 };
2159
+ }
2160
+ renderEndCanvas(e) {
2161
+ const { presentation: t } = this.props;
2162
+ e.width = t.size.width, e.height = t.size.height;
2163
+ const o = e.getContext("2d");
2164
+ o !== null && (o.fillStyle = "#000000", o.fillRect(0, 0, e.width, e.height));
2047
2165
  }
2048
2166
  next(e = !1) {
2049
2167
  const { presentation: t } = this.props, { currentAnimationId: o, slideIndex: i, buildIndex: a } = this.state;
@@ -2053,7 +2171,7 @@ class kn {
2053
2171
  return;
2054
2172
  const r = s.animations[a];
2055
2173
  if (r !== void 0 && !e) {
2056
- const h = performance.now(), c = Ce(r), f = (d) => {
2174
+ const h = performance.now(), c = _e(r), f = (d) => {
2057
2175
  const l = d - h;
2058
2176
  l < c ? (this.renderSlide(i, a + 1, l), this.state.currentAnimationId = requestAnimationFrame(f)) : this.renderSlide(i, a + 1, null);
2059
2177
  };
@@ -2079,20 +2197,20 @@ class kn {
2079
2197
  return t > 0 || e > 0;
2080
2198
  }
2081
2199
  }
2082
- function v1(n) {
2200
+ function M1(n) {
2083
2201
  return n <= 0 || n > 1 ? (console.warn(
2084
2202
  `BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`
2085
2203
  ), 1) : n;
2086
2204
  }
2087
- function In(n = 1e3) {
2205
+ function Nn(n = 1e3) {
2088
2206
  return {
2089
- type: f0.PAUSE,
2207
+ type: ft.PAUSE,
2090
2208
  isKey: !1,
2091
2209
  duration: n,
2092
2210
  shortcut: null
2093
2211
  };
2094
2212
  }
2095
- function _n(n = null) {
2213
+ function Bn(n = null) {
2096
2214
  return {
2097
2215
  objects: [],
2098
2216
  animations: [],
@@ -2105,32 +2223,32 @@ function _n(n = null) {
2105
2223
  ...n
2106
2224
  };
2107
2225
  }
2108
- function On(n, e = {}) {
2226
+ function qn(n, e = {}) {
2109
2227
  return {
2110
2228
  ...e,
2111
2229
  text: n
2112
2230
  };
2113
2231
  }
2114
- function Fn(n = $.BLACK) {
2232
+ function Dn(n = W.BLACK) {
2115
2233
  return { ...n, alpha: 1 };
2116
2234
  }
2117
- function w1(n) {
2235
+ function L1(n) {
2118
2236
  for (var e = -1, t = n.length, o, i = n[t - 1], a = 0; ++e < t; )
2119
2237
  o = i, i = n[e], a += o[1] * i[0] - o[0] * i[1];
2120
2238
  return a / 2;
2121
2239
  }
2122
- function m1(n) {
2240
+ function T1(n) {
2123
2241
  for (var e = -1, t = n.length, o = n[t - 1], i, a, s = o[0], r = o[1], h = 0; ++e < t; )
2124
2242
  i = s, a = r, o = n[e], s = o[0], r = o[1], i -= s, a -= r, h += Math.sqrt(i * i + a * a);
2125
2243
  return h;
2126
2244
  }
2127
- function A1(n) {
2245
+ function C1(n) {
2128
2246
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
2129
2247
  }
2130
- var q0, dt;
2131
- function b1() {
2132
- if (dt) return q0;
2133
- dt = 1;
2248
+ var zt, w0;
2249
+ function P1() {
2250
+ if (w0) return zt;
2251
+ w0 = 1;
2134
2252
  var n = { a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0 }, e = [
2135
2253
  5760,
2136
2254
  6158,
@@ -2204,35 +2322,35 @@ function b1() {
2204
2322
  u.err = "SvgPath: arc flag can be 0 or 1 only (at pos " + u.index + ")";
2205
2323
  }
2206
2324
  function f(u) {
2207
- var m = u.index, y = m, M = u.max, T = !1, S = !1, P = !1, E = !1, C;
2325
+ var m = u.index, y = m, M = u.max, E = !1, L = !1, C = !1, S = !1, T;
2208
2326
  if (y >= M) {
2209
2327
  u.err = "SvgPath: missed param (at pos " + y + ")";
2210
2328
  return;
2211
2329
  }
2212
- if (C = u.path.charCodeAt(y), (C === 43 || C === 45) && (y++, C = y < M ? u.path.charCodeAt(y) : 0), !a(C) && C !== 46) {
2330
+ if (T = u.path.charCodeAt(y), (T === 43 || T === 45) && (y++, T = y < M ? u.path.charCodeAt(y) : 0), !a(T) && T !== 46) {
2213
2331
  u.err = "SvgPath: param should start with 0..9 or `.` (at pos " + y + ")";
2214
2332
  return;
2215
2333
  }
2216
- if (C !== 46) {
2217
- if (T = C === 48, y++, C = y < M ? u.path.charCodeAt(y) : 0, T && y < M && C && a(C)) {
2334
+ if (T !== 46) {
2335
+ if (E = T === 48, y++, T = y < M ? u.path.charCodeAt(y) : 0, E && y < M && T && a(T)) {
2218
2336
  u.err = "SvgPath: numbers started with `0` such as `09` are illegal (at pos " + m + ")";
2219
2337
  return;
2220
2338
  }
2221
2339
  for (; y < M && a(u.path.charCodeAt(y)); )
2222
- y++, S = !0;
2223
- C = y < M ? u.path.charCodeAt(y) : 0;
2340
+ y++, L = !0;
2341
+ T = y < M ? u.path.charCodeAt(y) : 0;
2224
2342
  }
2225
- if (C === 46) {
2226
- for (E = !0, y++; a(u.path.charCodeAt(y)); )
2227
- y++, P = !0;
2228
- C = y < M ? u.path.charCodeAt(y) : 0;
2343
+ if (T === 46) {
2344
+ for (S = !0, y++; a(u.path.charCodeAt(y)); )
2345
+ y++, C = !0;
2346
+ T = y < M ? u.path.charCodeAt(y) : 0;
2229
2347
  }
2230
- if (C === 101 || C === 69) {
2231
- if (E && !S && !P) {
2348
+ if (T === 101 || T === 69) {
2349
+ if (S && !L && !C) {
2232
2350
  u.err = "SvgPath: invalid float exponent (at pos " + y + ")";
2233
2351
  return;
2234
2352
  }
2235
- if (y++, C = y < M ? u.path.charCodeAt(y) : 0, (C === 43 || C === 45) && y++, y < M && a(u.path.charCodeAt(y)))
2353
+ if (y++, T = y < M ? u.path.charCodeAt(y) : 0, (T === 43 || T === 45) && y++, y < M && a(u.path.charCodeAt(y)))
2236
2354
  for (; y < M && a(u.path.charCodeAt(y)); )
2237
2355
  y++;
2238
2356
  else {
@@ -2253,29 +2371,29 @@ function b1() {
2253
2371
  ;
2254
2372
  }
2255
2373
  function l(u) {
2256
- var m = u.max, y, M, T, S, P;
2374
+ var m = u.max, y, M, E, L, C;
2257
2375
  if (u.segmentStart = u.index, y = u.path.charCodeAt(u.index), M = i(y), !o(y)) {
2258
2376
  u.err = "SvgPath: bad command " + u.path[u.index] + " (at pos " + u.index + ")";
2259
2377
  return;
2260
2378
  }
2261
- if (S = n[u.path[u.index].toLowerCase()], u.index++, h(u), u.data = [], !S) {
2379
+ if (L = n[u.path[u.index].toLowerCase()], u.index++, h(u), u.data = [], !L) {
2262
2380
  d(u);
2263
2381
  return;
2264
2382
  }
2265
- for (T = !1; ; ) {
2266
- for (P = S; P > 0; P--) {
2267
- if (M && (P === 3 || P === 4) ? c(u) : f(u), u.err.length) {
2383
+ for (E = !1; ; ) {
2384
+ for (C = L; C > 0; C--) {
2385
+ if (M && (C === 3 || C === 4) ? c(u) : f(u), u.err.length) {
2268
2386
  d(u);
2269
2387
  return;
2270
2388
  }
2271
- u.data.push(u.param), h(u), T = !1, u.index < m && u.path.charCodeAt(u.index) === 44 && (u.index++, h(u), T = !0);
2389
+ u.data.push(u.param), h(u), E = !1, u.index < m && u.path.charCodeAt(u.index) === 44 && (u.index++, h(u), E = !0);
2272
2390
  }
2273
- if (!T && (u.index >= u.max || !s(u.path.charCodeAt(u.index))))
2391
+ if (!E && (u.index >= u.max || !s(u.path.charCodeAt(u.index))))
2274
2392
  break;
2275
2393
  }
2276
2394
  d(u);
2277
2395
  }
2278
- return q0 = function(m) {
2396
+ return zt = function(m) {
2279
2397
  var y = new r(m), M = y.max;
2280
2398
  for (h(y); y.index < M && !y.err.length; )
2281
2399
  l(y);
@@ -2283,12 +2401,12 @@ function b1() {
2283
2401
  err: y.err,
2284
2402
  segments: y.result
2285
2403
  };
2286
- }, q0;
2404
+ }, zt;
2287
2405
  }
2288
- var D0, xt;
2289
- function Bt() {
2290
- if (xt) return D0;
2291
- xt = 1;
2406
+ var jt, m0;
2407
+ function j0() {
2408
+ if (m0) return jt;
2409
+ m0 = 1;
2292
2410
  function n(t, o) {
2293
2411
  return [
2294
2412
  t[0] * o[0] + t[2] * o[1],
@@ -2333,13 +2451,13 @@ function Bt() {
2333
2451
  t * a[0] + o * a[2] + (i ? 0 : a[4]),
2334
2452
  t * a[1] + o * a[3] + (i ? 0 : a[5])
2335
2453
  ]) : [t, o];
2336
- }, D0 = e, D0;
2454
+ }, jt = e, jt;
2337
2455
  }
2338
- var j0, yt;
2339
- function M1() {
2340
- if (yt) return j0;
2341
- yt = 1;
2342
- var n = Bt(), e = {
2456
+ var Ht, b0;
2457
+ function E1() {
2458
+ if (b0) return Ht;
2459
+ b0 = 1;
2460
+ var n = j0(), e = {
2343
2461
  matrix: !0,
2344
2462
  scale: !0,
2345
2463
  rotate: !0,
@@ -2347,7 +2465,7 @@ function M1() {
2347
2465
  skewX: !0,
2348
2466
  skewY: !0
2349
2467
  }, t = /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/, o = /[\s,]+/;
2350
- return j0 = function(a) {
2468
+ return Ht = function(a) {
2351
2469
  var s = new n(), r, h;
2352
2470
  return a.split(t).forEach(function(c) {
2353
2471
  if (c.length) {
@@ -2379,55 +2497,55 @@ function M1() {
2379
2497
  }
2380
2498
  }
2381
2499
  }), s;
2382
- }, j0;
2500
+ }, Ht;
2383
2501
  }
2384
- var z0, vt;
2385
- function L1() {
2386
- if (vt) return z0;
2387
- vt = 1;
2502
+ var Ut, A0;
2503
+ function S1() {
2504
+ if (A0) return Ut;
2505
+ A0 = 1;
2388
2506
  var n = Math.PI * 2;
2389
2507
  function e(i, a, s, r) {
2390
2508
  var h = i * r - a * s < 0 ? -1 : 1, c = i * s + a * r;
2391
2509
  return c > 1 && (c = 1), c < -1 && (c = -1), h * Math.acos(c);
2392
2510
  }
2393
2511
  function t(i, a, s, r, h, c, f, d, l, u) {
2394
- var m = u * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + u * (a - r) / 2, M = f * f, T = d * d, S = m * m, P = y * y, E = M * T - M * P - T * S;
2395
- E < 0 && (E = 0), E /= M * P + T * S, E = Math.sqrt(E) * (h === c ? -1 : 1);
2396
- var C = E * f / d * y, O = E * -d / f * m, R = u * C - l * O + (i + s) / 2, G = l * C + u * O + (a + r) / 2, z = (m - C) / f, H = (y - O) / d, t0 = (-m - C) / f, e0 = (-y - O) / d, n0 = e(1, 0, z, H), K = e(z, H, t0, e0);
2397
- return c === 0 && K > 0 && (K -= n), c === 1 && K < 0 && (K += n), [R, G, n0, K];
2512
+ var m = u * (i - s) / 2 + l * (a - r) / 2, y = -l * (i - s) / 2 + u * (a - r) / 2, M = f * f, E = d * d, L = m * m, C = y * y, S = M * E - M * C - E * L;
2513
+ S < 0 && (S = 0), S /= M * C + E * L, S = Math.sqrt(S) * (h === c ? -1 : 1);
2514
+ var T = S * f / d * y, I = S * -d / f * m, N = u * T - l * I + (i + s) / 2, G = l * T + u * I + (a + r) / 2, H = (m - T) / f, $ = (y - I) / d, tt = (-m - T) / f, et = (-y - I) / d, nt = e(1, 0, H, $), K = e(H, $, tt, et);
2515
+ return c === 0 && K > 0 && (K -= n), c === 1 && K < 0 && (K += n), [N, G, nt, K];
2398
2516
  }
2399
2517
  function o(i, a) {
2400
2518
  var s = 1.3333333333333333 * Math.tan(a / 4), r = Math.cos(i), h = Math.sin(i), c = Math.cos(i + a), f = Math.sin(i + a);
2401
2519
  return [r, h, r - h * s, h + r * s, c + f * s, f - c * s, c, f];
2402
2520
  }
2403
- return z0 = function(a, s, r, h, c, f, d, l, u) {
2404
- var m = Math.sin(u * n / 360), y = Math.cos(u * n / 360), M = y * (a - r) / 2 + m * (s - h) / 2, T = -m * (a - r) / 2 + y * (s - h) / 2;
2405
- if (M === 0 && T === 0)
2521
+ return Ut = function(a, s, r, h, c, f, d, l, u) {
2522
+ var m = Math.sin(u * n / 360), y = Math.cos(u * n / 360), M = y * (a - r) / 2 + m * (s - h) / 2, E = -m * (a - r) / 2 + y * (s - h) / 2;
2523
+ if (M === 0 && E === 0)
2406
2524
  return [];
2407
2525
  if (d === 0 || l === 0)
2408
2526
  return [];
2409
2527
  d = Math.abs(d), l = Math.abs(l);
2410
- var S = M * M / (d * d) + T * T / (l * l);
2411
- S > 1 && (d *= Math.sqrt(S), l *= Math.sqrt(S));
2412
- var P = t(a, s, r, h, c, f, d, l, m, y), E = [], C = P[2], O = P[3], R = Math.max(Math.ceil(Math.abs(O) / (n / 4)), 1);
2413
- O /= R;
2414
- for (var G = 0; G < R; G++)
2415
- E.push(o(C, O)), C += O;
2416
- return E.map(function(z) {
2417
- for (var H = 0; H < z.length; H += 2) {
2418
- var t0 = z[H + 0], e0 = z[H + 1];
2419
- t0 *= d, e0 *= l;
2420
- var n0 = y * t0 - m * e0, K = m * t0 + y * e0;
2421
- z[H + 0] = n0 + P[0], z[H + 1] = K + P[1];
2528
+ var L = M * M / (d * d) + E * E / (l * l);
2529
+ L > 1 && (d *= Math.sqrt(L), l *= Math.sqrt(L));
2530
+ var C = t(a, s, r, h, c, f, d, l, m, y), S = [], T = C[2], I = C[3], N = Math.max(Math.ceil(Math.abs(I) / (n / 4)), 1);
2531
+ I /= N;
2532
+ for (var G = 0; G < N; G++)
2533
+ S.push(o(T, I)), T += I;
2534
+ return S.map(function(H) {
2535
+ for (var $ = 0; $ < H.length; $ += 2) {
2536
+ var tt = H[$ + 0], et = H[$ + 1];
2537
+ tt *= d, et *= l;
2538
+ var nt = y * tt - m * et, K = m * tt + y * et;
2539
+ H[$ + 0] = nt + C[0], H[$ + 1] = K + C[1];
2422
2540
  }
2423
- return z;
2541
+ return H;
2424
2542
  });
2425
- }, z0;
2543
+ }, Ut;
2426
2544
  }
2427
- var U0, wt;
2428
- function T1() {
2429
- if (wt) return U0;
2430
- wt = 1;
2545
+ var Yt, M0;
2546
+ function k1() {
2547
+ if (M0) return Yt;
2548
+ M0 = 1;
2431
2549
  var n = 1e-10, e = Math.PI / 180;
2432
2550
  function t(o, i, a) {
2433
2551
  if (!(this instanceof t))
@@ -2451,13 +2569,13 @@ function T1() {
2451
2569
  ) * 180 / Math.PI, this.ax >= 0 ? (this.rx = Math.sqrt(l), this.ry = Math.sqrt(u)) : (this.ax += 90, this.rx = Math.sqrt(u), this.ry = Math.sqrt(l)), this;
2452
2570
  }, t.prototype.isDegenerate = function() {
2453
2571
  return this.rx < n * this.ry || this.ry < n * this.rx;
2454
- }, U0 = t, U0;
2572
+ }, Yt = t, Yt;
2455
2573
  }
2456
- var Y0, mt;
2457
- function P1() {
2458
- if (mt) return Y0;
2459
- mt = 1;
2460
- var n = b1(), e = M1(), t = Bt(), o = L1(), i = T1();
2574
+ var $t, L0;
2575
+ function I1() {
2576
+ if (L0) return $t;
2577
+ L0 = 1;
2578
+ var n = P1(), e = E1(), t = j0(), o = S1(), i = k1();
2461
2579
  function a(s) {
2462
2580
  if (!(this instanceof a))
2463
2581
  return new a(s);
@@ -2495,12 +2613,12 @@ function P1() {
2495
2613
  break;
2496
2614
  case "a":
2497
2615
  case "A":
2498
- var T = s.toArray(), S = i(c[1], c[2], c[3]).transform(T);
2499
- if (T[0] * T[3] - T[1] * T[2] < 0 && (c[5] = c[5] ? "0" : "1"), u = s.calc(c[6], c[7], c[0] === "a"), c[0] === "A" && c[6] === d && c[7] === l || c[0] === "a" && c[6] === 0 && c[7] === 0) {
2616
+ var E = s.toArray(), L = i(c[1], c[2], c[3]).transform(E);
2617
+ if (E[0] * E[3] - E[1] * E[2] < 0 && (c[5] = c[5] ? "0" : "1"), u = s.calc(c[6], c[7], c[0] === "a"), c[0] === "A" && c[6] === d && c[7] === l || c[0] === "a" && c[6] === 0 && c[7] === 0) {
2500
2618
  m = [c[0] === "a" ? "l" : "L", u[0], u[1]];
2501
2619
  break;
2502
2620
  }
2503
- S.isDegenerate() ? m = [c[0] === "a" ? "l" : "L", u[0], u[1]] : m = [c[0], S.rx, S.ry, S.ax, c[4], c[5], u[0], u[1]];
2621
+ L.isDegenerate() ? m = [c[0] === "a" ? "l" : "L", u[0], u[1]] : m = [c[0], L.rx, L.ry, L.ax, c[4], c[5], u[0], u[1]];
2504
2622
  break;
2505
2623
  case "m":
2506
2624
  M = f > 0, u = s.calc(c[1], c[2], M), m = ["m", u[0], u[1]];
@@ -2582,40 +2700,40 @@ function P1() {
2582
2700
  }
2583
2701
  }), this;
2584
2702
  }, a.prototype.iterate = function(s, r) {
2585
- var h = this.segments, c = {}, f = !1, d = 0, l = 0, u = 0, m = 0, y, M, T;
2586
- if (r || this.__evaluateStack(), h.forEach(function(S, P) {
2587
- var E = s(S, P, d, l);
2588
- Array.isArray(E) && (c[P] = E, f = !0);
2589
- var C = S[0] === S[0].toLowerCase();
2590
- switch (S[0]) {
2703
+ var h = this.segments, c = {}, f = !1, d = 0, l = 0, u = 0, m = 0, y, M, E;
2704
+ if (r || this.__evaluateStack(), h.forEach(function(L, C) {
2705
+ var S = s(L, C, d, l);
2706
+ Array.isArray(S) && (c[C] = S, f = !0);
2707
+ var T = L[0] === L[0].toLowerCase();
2708
+ switch (L[0]) {
2591
2709
  case "m":
2592
2710
  case "M":
2593
- d = S[1] + (C ? d : 0), l = S[2] + (C ? l : 0), u = d, m = l;
2711
+ d = L[1] + (T ? d : 0), l = L[2] + (T ? l : 0), u = d, m = l;
2594
2712
  return;
2595
2713
  case "h":
2596
2714
  case "H":
2597
- d = S[1] + (C ? d : 0);
2715
+ d = L[1] + (T ? d : 0);
2598
2716
  return;
2599
2717
  case "v":
2600
2718
  case "V":
2601
- l = S[1] + (C ? l : 0);
2719
+ l = L[1] + (T ? l : 0);
2602
2720
  return;
2603
2721
  case "z":
2604
2722
  case "Z":
2605
2723
  d = u, l = m;
2606
2724
  return;
2607
2725
  default:
2608
- d = S[S.length - 2] + (C ? d : 0), l = S[S.length - 1] + (C ? l : 0);
2726
+ d = L[L.length - 2] + (T ? d : 0), l = L[L.length - 1] + (T ? l : 0);
2609
2727
  }
2610
2728
  }), !f)
2611
2729
  return this;
2612
- for (T = [], y = 0; y < h.length; y++)
2730
+ for (E = [], y = 0; y < h.length; y++)
2613
2731
  if (typeof c[y] < "u")
2614
2732
  for (M = 0; M < c[y].length; M++)
2615
- T.push(c[y][M]);
2733
+ E.push(c[y][M]);
2616
2734
  else
2617
- T.push(h[y]);
2618
- return this.segments = T, this;
2735
+ E.push(h[y]);
2736
+ return this.segments = E, this;
2619
2737
  }, a.prototype.abs = function() {
2620
2738
  return this.iterate(function(s, r, h, c) {
2621
2739
  var f = s[0], d = f.toUpperCase(), l;
@@ -2658,15 +2776,15 @@ function P1() {
2658
2776
  }, a.prototype.unshort = function() {
2659
2777
  var s = this.segments, r, h, c, f, d;
2660
2778
  return this.iterate(function(l, u, m, y) {
2661
- var M = l[0], T = M.toUpperCase(), S;
2662
- u && (T === "T" ? (S = M === "t", c = s[u - 1], c[0] === "Q" ? (r = c[1] - m, h = c[2] - y) : c[0] === "q" ? (r = c[1] - c[3], h = c[2] - c[4]) : (r = 0, h = 0), f = -r, d = -h, S || (f += m, d += y), s[u] = [
2663
- S ? "q" : "Q",
2779
+ var M = l[0], E = M.toUpperCase(), L;
2780
+ u && (E === "T" ? (L = M === "t", c = s[u - 1], c[0] === "Q" ? (r = c[1] - m, h = c[2] - y) : c[0] === "q" ? (r = c[1] - c[3], h = c[2] - c[4]) : (r = 0, h = 0), f = -r, d = -h, L || (f += m, d += y), s[u] = [
2781
+ L ? "q" : "Q",
2664
2782
  f,
2665
2783
  d,
2666
2784
  l[1],
2667
2785
  l[2]
2668
- ]) : T === "S" && (S = M === "s", c = s[u - 1], c[0] === "C" ? (r = c[3] - m, h = c[4] - y) : c[0] === "c" ? (r = c[3] - c[5], h = c[4] - c[6]) : (r = 0, h = 0), f = -r, d = -h, S || (f += m, d += y), s[u] = [
2669
- S ? "c" : "C",
2786
+ ]) : E === "S" && (L = M === "s", c = s[u - 1], c[0] === "C" ? (r = c[3] - m, h = c[4] - y) : c[0] === "c" ? (r = c[3] - c[5], h = c[4] - c[6]) : (r = 0, h = 0), f = -r, d = -h, L || (f += m, d += y), s[u] = [
2787
+ L ? "c" : "C",
2670
2788
  f,
2671
2789
  d,
2672
2790
  l[1],
@@ -2675,41 +2793,41 @@ function P1() {
2675
2793
  l[4]
2676
2794
  ]));
2677
2795
  }), this;
2678
- }, Y0 = a, Y0;
2796
+ }, $t = a, $t;
2679
2797
  }
2680
- var H0, At;
2681
- function C1() {
2682
- return At || (At = 1, H0 = P1()), H0;
2798
+ var Xt, T0;
2799
+ function _1() {
2800
+ return T0 || (T0 = 1, Xt = I1()), Xt;
2683
2801
  }
2684
- var S1 = C1();
2685
- const E1 = /* @__PURE__ */ A1(S1);
2686
- var X0 = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, k1 = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
2687
- function I1(n) {
2802
+ var O1 = _1();
2803
+ const F1 = /* @__PURE__ */ C1(O1);
2804
+ var Gt = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, R1 = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
2805
+ function N1(n) {
2688
2806
  var e = [];
2689
- return n.replace(k1, function(t, o, i) {
2807
+ return n.replace(R1, function(t, o, i) {
2690
2808
  var a = o.toLowerCase();
2691
- for (i = O1(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
2692
- if (i.length === X0[a])
2809
+ for (i = q1(i), a === "m" && i.length > 2 && (e.push([o].concat(i.splice(0, 2))), a = "l", o = o === "m" ? "l" : "L"); i.length >= 0; ) {
2810
+ if (i.length === Gt[a])
2693
2811
  return i.unshift(o), e.push(i);
2694
- if (i.length < X0[a])
2812
+ if (i.length < Gt[a])
2695
2813
  throw new Error("malformed path data");
2696
- e.push([o].concat(i.splice(0, X0[a])));
2814
+ e.push([o].concat(i.splice(0, Gt[a])));
2697
2815
  }
2698
2816
  }), e;
2699
2817
  }
2700
- var _1 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
2701
- function O1(n) {
2702
- var e = n.match(_1);
2818
+ var B1 = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
2819
+ function q1(n) {
2820
+ var e = n.match(B1);
2703
2821
  return e ? e.map(Number) : [];
2704
2822
  }
2705
- function i0(n, e, t, o, i, a, s, r) {
2706
- return new Z0(n, e, t, o, i, a, s, r);
2823
+ function it(n, e, t, o, i, a, s, r) {
2824
+ return new Kt(n, e, t, o, i, a, s, r);
2707
2825
  }
2708
- function Z0(n, e, t, o, i, a, s, r) {
2709
- this.a = { x: n, y: e }, this.b = { x: t, y: o }, this.c = { x: i, y: a }, this.d = { x: s, y: r }, s != null && r !== null && r !== void 0 ? (this.getArcLength = Y1, this.getPoint = N1, this.getDerivative = R1) : (this.getArcLength = B1, this.getPoint = qt, this.getDerivative = F1), this.init();
2826
+ function Kt(n, e, t, o, i, a, s, r) {
2827
+ this.a = { x: n, y: e }, this.b = { x: t, y: o }, this.c = { x: i, y: a }, this.d = { x: s, y: r }, s != null && r !== null && r !== void 0 ? (this.getArcLength = W1, this.getPoint = j1, this.getDerivative = z1) : (this.getArcLength = H1, this.getPoint = H0, this.getDerivative = D1), this.init();
2710
2828
  }
2711
- Z0.prototype = {
2712
- constructor: Z0,
2829
+ Kt.prototype = {
2830
+ constructor: Kt,
2713
2831
  init: function() {
2714
2832
  this.length = this.getArcLength(
2715
2833
  [this.a.x, this.b.x, this.c.x, this.d.x],
@@ -2720,7 +2838,7 @@ Z0.prototype = {
2720
2838
  return this.length;
2721
2839
  },
2722
2840
  getPointAtLength: function(n) {
2723
- var e = $0(
2841
+ var e = Wt(
2724
2842
  n,
2725
2843
  this.length,
2726
2844
  this.getArcLength,
@@ -2734,7 +2852,7 @@ Z0.prototype = {
2734
2852
  );
2735
2853
  },
2736
2854
  getTangentAtLength: function(n) {
2737
- var e = $0(
2855
+ var e = Wt(
2738
2856
  n,
2739
2857
  this.length,
2740
2858
  this.getArcLength,
@@ -2748,7 +2866,7 @@ Z0.prototype = {
2748
2866
  return o > 0 ? i = { x: t.x / o, y: t.y / o } : i = { x: 0, y: 0 }, i;
2749
2867
  },
2750
2868
  getPropertiesAtLength: function(n) {
2751
- var e = $0(
2869
+ var e = Wt(
2752
2870
  n,
2753
2871
  this.length,
2754
2872
  this.getArcLength,
@@ -2768,36 +2886,36 @@ Z0.prototype = {
2768
2886
  return { x: a.x, y: a.y, tangentX: i.x, tangentY: i.y };
2769
2887
  }
2770
2888
  };
2771
- function F1(n, e, t) {
2889
+ function D1(n, e, t) {
2772
2890
  return {
2773
2891
  x: (1 - t) * 2 * (n[1] - n[0]) + t * 2 * (n[2] - n[1]),
2774
2892
  y: (1 - t) * 2 * (e[1] - e[0]) + t * 2 * (e[2] - e[1])
2775
2893
  };
2776
2894
  }
2777
- function R1(n, e, t) {
2778
- var o = qt(
2895
+ function z1(n, e, t) {
2896
+ var o = H0(
2779
2897
  [3 * (n[1] - n[0]), 3 * (n[2] - n[1]), 3 * (n[3] - n[2])],
2780
2898
  [3 * (e[1] - e[0]), 3 * (e[2] - e[1]), 3 * (e[3] - e[2])],
2781
2899
  t
2782
2900
  );
2783
2901
  return o;
2784
2902
  }
2785
- function $0(n, e, t, o, i) {
2903
+ function Wt(n, e, t, o, i) {
2786
2904
  for (var a = 1, s = n / e, r = (n - t(o, i, s)) / e; a > 1e-3; ) {
2787
2905
  var h = t(o, i, s + r), c = t(o, i, s - r), f = Math.abs(n - h) / e, d = Math.abs(n - c) / e;
2788
2906
  f < a ? (a = f, s += r) : d < a ? (a = d, s -= r) : r /= 2;
2789
2907
  }
2790
2908
  return s;
2791
2909
  }
2792
- function qt(n, e, t) {
2910
+ function H0(n, e, t) {
2793
2911
  var o = (1 - t) * (1 - t) * n[0] + 2 * (1 - t) * t * n[1] + t * t * n[2], i = (1 - t) * (1 - t) * e[0] + 2 * (1 - t) * t * e[1] + t * t * e[2];
2794
2912
  return { x: o, y: i };
2795
2913
  }
2796
- function N1(n, e, t) {
2914
+ function j1(n, e, t) {
2797
2915
  var o = (1 - t) * (1 - t) * (1 - t) * n[0] + 3 * (1 - t) * (1 - t) * t * n[1] + 3 * (1 - t) * t * t * n[2] + t * t * t * n[3], i = (1 - t) * (1 - t) * (1 - t) * e[0] + 3 * (1 - t) * (1 - t) * t * e[1] + 3 * (1 - t) * t * t * e[2] + t * t * t * e[3];
2798
2916
  return { x: o, y: i };
2799
2917
  }
2800
- function B1(n, e, t) {
2918
+ function H1(n, e, t) {
2801
2919
  t === void 0 && (t = 1);
2802
2920
  var o = n[0] - 2 * n[1] + n[2], i = e[0] - 2 * e[1] + e[2], a = 2 * n[1] - 2 * n[0], s = 2 * e[1] - 2 * e[0], r = 4 * (o * o + i * i), h = 4 * (o * a + i * s), c = a * a + s * s;
2803
2921
  if (r === 0)
@@ -2807,7 +2925,7 @@ function B1(n, e, t) {
2807
2925
  (l + Math.sqrt(l * l + u)) / (f + Math.sqrt(f * f + u))
2808
2926
  )));
2809
2927
  }
2810
- var q1 = [
2928
+ var U1 = [
2811
2929
  [],
2812
2930
  [],
2813
2931
  [-0.5773502691896257, 0.5773502691896257],
@@ -2833,7 +2951,7 @@ var q1 = [
2833
2951
  [-0.06973927331972223, 0.06973927331972223, -0.20786042668822127, 0.20786042668822127, -0.34193582089208424, 0.34193582089208424, -0.469355837986757, 0.469355837986757, -0.5876404035069116, 0.5876404035069116, -0.6944872631866827, 0.6944872631866827, -0.7878168059792081, 0.7878168059792081, -0.8658125777203002, 0.8658125777203002, -0.926956772187174, 0.926956772187174, -0.9700604978354287, 0.9700604978354287, -0.9942945854823992, 0.9942945854823992],
2834
2952
  [0, -0.1332568242984661, 0.1332568242984661, -0.26413568097034495, 0.26413568097034495, -0.3903010380302908, 0.3903010380302908, -0.5095014778460075, 0.5095014778460075, -0.6196098757636461, 0.6196098757636461, -0.7186613631319502, 0.7186613631319502, -0.8048884016188399, 0.8048884016188399, -0.8767523582704416, 0.8767523582704416, -0.9329710868260161, 0.9329710868260161, -0.9725424712181152, 0.9725424712181152, -0.9947693349975522, 0.9947693349975522],
2835
2953
  [-0.06405689286260563, 0.06405689286260563, -0.1911188674736163, 0.1911188674736163, -0.3150426796961634, 0.3150426796961634, -0.4337935076260451, 0.4337935076260451, -0.5454214713888396, 0.5454214713888396, -0.6480936519369755, 0.6480936519369755, -0.7401241915785544, 0.7401241915785544, -0.820001985973903, 0.820001985973903, -0.8864155270044011, 0.8864155270044011, -0.9382745520027328, 0.9382745520027328, -0.9747285559713095, 0.9747285559713095, -0.9951872199970213, 0.9951872199970213]
2836
- ], D1 = [
2954
+ ], Y1 = [
2837
2955
  [],
2838
2956
  [],
2839
2957
  [1, 1],
@@ -2859,53 +2977,53 @@ var q1 = [
2859
2977
  [0.13925187285563198, 0.13925187285563198, 0.13654149834601517, 0.13654149834601517, 0.13117350478706238, 0.13117350478706238, 0.12325237681051242, 0.12325237681051242, 0.11293229608053922, 0.11293229608053922, 0.10041414444288096, 0.10041414444288096, 0.08594160621706773, 0.08594160621706773, 0.06979646842452049, 0.06979646842452049, 0.052293335152683286, 0.052293335152683286, 0.03377490158481415, 0.03377490158481415, 0.0146279952982722, 0.0146279952982722],
2860
2978
  [0.13365457218610619, 0.1324620394046966, 0.1324620394046966, 0.12890572218808216, 0.12890572218808216, 0.12304908430672953, 0.12304908430672953, 0.11499664022241136, 0.11499664022241136, 0.10489209146454141, 0.10489209146454141, 0.09291576606003515, 0.09291576606003515, 0.07928141177671895, 0.07928141177671895, 0.06423242140852585, 0.06423242140852585, 0.04803767173108467, 0.04803767173108467, 0.030988005856979445, 0.030988005856979445, 0.013411859487141771, 0.013411859487141771],
2861
2979
  [0.12793819534675216, 0.12793819534675216, 0.1258374563468283, 0.1258374563468283, 0.12167047292780339, 0.12167047292780339, 0.1155056680537256, 0.1155056680537256, 0.10744427011596563, 0.10744427011596563, 0.09761865210411388, 0.09761865210411388, 0.08619016153195327, 0.08619016153195327, 0.0733464814110803, 0.0733464814110803, 0.05929858491543678, 0.05929858491543678, 0.04427743881741981, 0.04427743881741981, 0.028531388628933663, 0.028531388628933663, 0.0123412297999872, 0.0123412297999872]
2862
- ], j1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
2863
- function z1(n, e) {
2864
- return j1[n][e];
2980
+ ], $1 = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];
2981
+ function X1(n, e) {
2982
+ return $1[n][e];
2865
2983
  }
2866
- function V0(n, e, t) {
2984
+ function Qt(n, e, t) {
2867
2985
  var o = t.length - 1, i, a, s;
2868
2986
  if (o === 0)
2869
2987
  return 0;
2870
2988
  if (n === 0) {
2871
2989
  for (a = 0, s = 0; s <= o; s++)
2872
- a += z1(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
2990
+ a += X1(o, s) * Math.pow(1 - e, o - s) * Math.pow(e, s) * t[s];
2873
2991
  return a;
2874
2992
  } else {
2875
2993
  for (i = new Array(o), s = 0; s < o; s++)
2876
2994
  i[s] = o * (t[s + 1] - t[s]);
2877
- return V0(n - 1, e, i);
2995
+ return Qt(n - 1, e, i);
2878
2996
  }
2879
2997
  }
2880
- function U1(n, e, t) {
2881
- var o = V0(1, t, n), i = V0(1, t, e), a = o * o + i * i;
2998
+ function G1(n, e, t) {
2999
+ var o = Qt(1, t, n), i = Qt(1, t, e), a = o * o + i * i;
2882
3000
  return Math.sqrt(a);
2883
3001
  }
2884
- function Y1(n, e, t) {
3002
+ function W1(n, e, t) {
2885
3003
  var o, i, a, s;
2886
3004
  t === void 0 && (t = 1);
2887
3005
  var r = 20;
2888
3006
  for (o = t / 2, i = 0, a = 0; a < r; a++)
2889
- s = o * q1[r][a] + o, i += D1[r][a] * U1(n, e, s);
3007
+ s = o * U1[r][a] + o, i += Y1[r][a] * G1(n, e, s);
2890
3008
  return o * i;
2891
3009
  }
2892
- var C0 = Math.PI * 2;
2893
- function bt(n, e, t, o) {
3010
+ var Pt = Math.PI * 2;
3011
+ function C0(n, e, t, o) {
2894
3012
  var i = n * o - e * t < 0 ? -1 : 1, a = n * t + e * o;
2895
3013
  return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
2896
3014
  }
2897
- function H1(n, e, t, o, i, a, s, r, h, c) {
3015
+ function Z1(n, e, t, o, i, a, s, r, h, c) {
2898
3016
  var f = c * (n - t) / 2 + h * (e - o) / 2, d = -h * (n - t) / 2 + c * (e - o) / 2, l = s * s, u = r * r, m = f * f, y = d * d, M = l * u - l * y - u * m;
2899
3017
  M < 0 && (M = 0), M /= l * y + u * m, M = Math.sqrt(M) * (i === a ? -1 : 1);
2900
- var T = M * s / r * d, S = M * -r / s * f, P = c * T - h * S + (n + t) / 2, E = h * T + c * S + (e + o) / 2, C = (f - T) / s, O = (d - S) / r, R = (-f - T) / s, G = (-d - S) / r, z = bt(1, 0, C, O), H = bt(C, O, R, G);
2901
- return a === 0 && H > 0 && (H -= C0), a === 1 && H < 0 && (H += C0), [P, E, z, H];
3018
+ var E = M * s / r * d, L = M * -r / s * f, C = c * E - h * L + (n + t) / 2, S = h * E + c * L + (e + o) / 2, T = (f - E) / s, I = (d - L) / r, N = (-f - E) / s, G = (-d - L) / r, H = C0(1, 0, T, I), $ = C0(T, I, N, G);
3019
+ return a === 0 && $ > 0 && ($ -= Pt), a === 1 && $ < 0 && ($ += Pt), [C, S, H, $];
2902
3020
  }
2903
- function X1(n, e) {
3021
+ function V1(n, e) {
2904
3022
  var t = 1.3333333333333333 * Math.tan(e / 4), o = Math.cos(n), i = Math.sin(n), a = Math.cos(n + e), s = Math.sin(n + e);
2905
3023
  return [o, i, o - i * t, i + o * t, a + s * t, s - a * t, a, s];
2906
3024
  }
2907
- function $1(n, e, t, o, i, a, s, r, h) {
2908
- var c = Math.sin(i * C0 / 360), f = Math.cos(i * C0 / 360), d = f * (n - r) / 2 + c * (e - h) / 2, l = -c * (n - r) / 2 + f * (e - h) / 2;
3025
+ function K1(n, e, t, o, i, a, s, r, h) {
3026
+ var c = Math.sin(i * Pt / 360), f = Math.cos(i * Pt / 360), d = f * (n - r) / 2 + c * (e - h) / 2, l = -c * (n - r) / 2 + f * (e - h) / 2;
2909
3027
  if (d === 0 && l === 0)
2910
3028
  return [];
2911
3029
  if (t === 0 || o === 0)
@@ -2913,32 +3031,32 @@ function $1(n, e, t, o, i, a, s, r, h) {
2913
3031
  t = Math.abs(t), o = Math.abs(o);
2914
3032
  var u = d * d / (t * t) + l * l / (o * o);
2915
3033
  u > 1 && (t *= Math.sqrt(u), o *= Math.sqrt(u));
2916
- var m = H1(n, e, r, h, a, s, t, o, c, f), y = [], M = m[2], T = m[3], S = Math.max(Math.ceil(Math.abs(T) / (C0 / 4)), 1);
2917
- T /= S;
2918
- for (var P = 0; P < S; P++)
2919
- y.push(X1(M, T)), M += T;
2920
- return y.map(function(E) {
2921
- for (var C = 0; C < E.length; C += 2) {
2922
- var O = E[C + 0], R = E[C + 1];
2923
- O *= t, R *= o;
2924
- var G = f * O - c * R, z = c * O + f * R;
2925
- E[C + 0] = G + m[0], E[C + 1] = z + m[1];
3034
+ var m = Z1(n, e, r, h, a, s, t, o, c, f), y = [], M = m[2], E = m[3], L = Math.max(Math.ceil(Math.abs(E) / (Pt / 4)), 1);
3035
+ E /= L;
3036
+ for (var C = 0; C < L; C++)
3037
+ y.push(V1(M, E)), M += E;
3038
+ return y.map(function(S) {
3039
+ for (var T = 0; T < S.length; T += 2) {
3040
+ var I = S[T + 0], N = S[T + 1];
3041
+ I *= t, N *= o;
3042
+ var G = f * I - c * N, H = c * I + f * N;
3043
+ S[T + 0] = G + m[0], S[T + 1] = H + m[1];
2926
3044
  }
2927
- return E;
3045
+ return S;
2928
3046
  });
2929
3047
  }
2930
- function Mt(n, e, t, o, i, a, s, r, h) {
2931
- return new K0(n, e, t, o, i, a, s, r, h);
3048
+ function P0(n, e, t, o, i, a, s, r, h) {
3049
+ return new Jt(n, e, t, o, i, a, s, r, h);
2932
3050
  }
2933
- function K0(n, e, t, o, i, a, s, r, h) {
2934
- var c = 0, f = [], d = [], l = $1(n, e, t, o, i, a, s, r, h);
3051
+ function Jt(n, e, t, o, i, a, s, r, h) {
3052
+ var c = 0, f = [], d = [], l = K1(n, e, t, o, i, a, s, r, h);
2935
3053
  l.forEach(function(u) {
2936
- var m = new i0(u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7]), y = m.getTotalLength();
3054
+ var m = new it(u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7]), y = m.getTotalLength();
2937
3055
  c += y, f.push(y), d.push(m);
2938
3056
  }), this.length = c, this.partialLengths = f, this.curves = d;
2939
3057
  }
2940
- K0.prototype = {
2941
- constructor: K0,
3058
+ Jt.prototype = {
3059
+ constructor: Jt,
2942
3060
  init: function() {
2943
3061
  },
2944
3062
  getTotalLength: function() {
@@ -2967,34 +3085,34 @@ K0.prototype = {
2967
3085
  return { x: t.x, y: t.y, tangentX: e.x, tangentY: e.y };
2968
3086
  }
2969
3087
  };
2970
- function r0(n, e, t, o) {
2971
- return new k0(n, e, t, o);
3088
+ function rt(n, e, t, o) {
3089
+ return new kt(n, e, t, o);
2972
3090
  }
2973
- function k0(n, e, t, o) {
3091
+ function kt(n, e, t, o) {
2974
3092
  this.x0 = n, this.x1 = e, this.y0 = t, this.y1 = o;
2975
3093
  }
2976
- k0.prototype.getTotalLength = function() {
3094
+ kt.prototype.getTotalLength = function() {
2977
3095
  return Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2));
2978
3096
  };
2979
- k0.prototype.getPointAtLength = function(n) {
3097
+ kt.prototype.getPointAtLength = function(n) {
2980
3098
  var e = n / Math.sqrt(Math.pow(this.x0 - this.x1, 2) + Math.pow(this.y0 - this.y1, 2)), t = (this.x1 - this.x0) * e, o = (this.y1 - this.y0) * e;
2981
3099
  return { x: this.x0 + t, y: this.y0 + o };
2982
3100
  };
2983
- k0.prototype.getTangentAtLength = function() {
3101
+ kt.prototype.getTangentAtLength = function() {
2984
3102
  var n = Math.sqrt((this.x1 - this.x0) * (this.x1 - this.x0) + (this.y1 - this.y0) * (this.y1 - this.y0));
2985
3103
  return { x: (this.x1 - this.x0) / n, y: (this.y1 - this.y0) / n };
2986
3104
  };
2987
- k0.prototype.getPropertiesAtLength = function(n) {
3105
+ kt.prototype.getPropertiesAtLength = function(n) {
2988
3106
  var e = this.getPointAtLength(n), t = this.getTangentAtLength();
2989
3107
  return { x: e.x, y: e.y, tangentX: t.x, tangentY: t.y };
2990
3108
  };
2991
- function G1(n) {
3109
+ function Q1(n) {
2992
3110
  var e = 0, t = [], o = [];
2993
3111
  function i(s) {
2994
3112
  if (!s)
2995
3113
  return null;
2996
- for (var r = I1(s), h = [0, 0], c = [0, 0], f, d, l = 0; l < r.length; l++)
2997
- r[l][0] === "M" ? (h = [r[l][1], r[l][2]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "L" ? (e = e + Math.sqrt(Math.pow(h[0] - r[l][1], 2) + Math.pow(h[1] - r[l][2], 2)), o.push(new r0(h[0], r[l][1], h[1], r[l][2])), h = [r[l][1], r[l][2]]) : r[l][0] === "l" ? (e = e + Math.sqrt(Math.pow(r[l][1], 2) + Math.pow(r[l][2], 2)), o.push(new r0(h[0], r[l][1] + h[0], h[1], r[l][2] + h[1])), h = [r[l][1] + h[0], r[l][2] + h[1]]) : r[l][0] === "H" ? (e = e + Math.abs(h[0] - r[l][1]), o.push(new r0(h[0], r[l][1], h[1], h[1])), h[0] = r[l][1]) : r[l][0] === "h" ? (e = e + Math.abs(r[l][1]), o.push(new r0(h[0], h[0] + r[l][1], h[1], h[1])), h[0] = r[l][1] + h[0]) : r[l][0] === "V" ? (e = e + Math.abs(h[1] - r[l][1]), o.push(new r0(h[0], h[0], h[1], r[l][1])), h[1] = r[l][1]) : r[l][0] === "v" ? (e = e + Math.abs(r[l][1]), o.push(new r0(h[0], h[0], h[1], h[1] + r[l][1])), h[1] = r[l][1] + h[1]) : r[l][0] === "z" || r[l][0] === "Z" ? (e = e + Math.sqrt(Math.pow(d[0] - h[0], 2) + Math.pow(d[1] - h[1], 2)), o.push(new r0(h[0], d[0], h[1], d[1])), h = [d[0], d[1]]) : r[l][0] === "C" ? (f = new i0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6]), e = e + f.getTotalLength(), h = [r[l][5], r[l][6]], o.push(f)) : r[l][0] === "c" ? (f = new i0(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4], h[0] + r[l][5], h[1] + r[l][6]), e = e + f.getTotalLength(), h = [r[l][5] + h[0], r[l][6] + h[1]], o.push(f)) : r[l][0] === "S" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new i0(h[0], h[1], 2 * h[0] - r[l - 1][r[l - 1].length - 4], 2 * h[1] - r[l - 1][r[l - 1].length - 3], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new i0(h[0], h[1], h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]), e = e + f.getTotalLength(), h = [r[l][3], r[l][4]], o.push(f)) : r[l][0] === "s" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new i0(h[0], h[1], h[0] + f.d.x - f.c.x, h[1] + f.d.y - f.c.y, h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]) : f = new i0(h[0], h[1], h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + f.getTotalLength(), h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(f)) : r[l][0] === "Q" ? (h[0] != r[l][1] && h[1] != r[l][2] ? f = new i0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new r0(r[l][1], r[l][3], r[l][2], r[l][4]), e = e + f.getTotalLength(), o.push(f), h = [r[l][3], r[l][4]], c = [r[l][1], r[l][2]]) : r[l][0] === "q" ? (r[l][1] == 0 && r[l][2] == 0 ? f = new r0(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : f = new i0(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + f.getTotalLength(), c = [h[0] + r[l][1], h[1] + r[l][2]], h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(f)) : r[l][0] === "T" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? f = new i0(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : f = new r0(h[0], r[l][1], h[1], r[l][2]), o.push(f), e = e + f.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1], r[l][2]]) : r[l][0] === "t" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? f = new i0(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], h[0] + r[l][1], h[1] + r[l][2]) : f = new r0(h[0], h[0] + r[l][1], h[1], h[1] + r[l][2]), e = e + f.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1] + h[0], r[l][2] + h[0]], o.push(f)) : r[l][0] === "A" ? (f = new Mt(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6], r[l][7]), e = e + f.getTotalLength(), h = [r[l][6], r[l][7]], o.push(f)) : r[l][0] === "a" && (f = new Mt(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], h[0] + r[l][6], h[1] + r[l][7]), e = e + f.getTotalLength(), h = [h[0] + r[l][6], h[1] + r[l][7]], o.push(f)), t.push(e);
3114
+ for (var r = N1(s), h = [0, 0], c = [0, 0], f, d, l = 0; l < r.length; l++)
3115
+ r[l][0] === "M" ? (h = [r[l][1], r[l][2]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "m" ? (h = [r[l][1] + h[0], r[l][2] + h[1]], d = [h[0], h[1]], o.push(null)) : r[l][0] === "L" ? (e = e + Math.sqrt(Math.pow(h[0] - r[l][1], 2) + Math.pow(h[1] - r[l][2], 2)), o.push(new rt(h[0], r[l][1], h[1], r[l][2])), h = [r[l][1], r[l][2]]) : r[l][0] === "l" ? (e = e + Math.sqrt(Math.pow(r[l][1], 2) + Math.pow(r[l][2], 2)), o.push(new rt(h[0], r[l][1] + h[0], h[1], r[l][2] + h[1])), h = [r[l][1] + h[0], r[l][2] + h[1]]) : r[l][0] === "H" ? (e = e + Math.abs(h[0] - r[l][1]), o.push(new rt(h[0], r[l][1], h[1], h[1])), h[0] = r[l][1]) : r[l][0] === "h" ? (e = e + Math.abs(r[l][1]), o.push(new rt(h[0], h[0] + r[l][1], h[1], h[1])), h[0] = r[l][1] + h[0]) : r[l][0] === "V" ? (e = e + Math.abs(h[1] - r[l][1]), o.push(new rt(h[0], h[0], h[1], r[l][1])), h[1] = r[l][1]) : r[l][0] === "v" ? (e = e + Math.abs(r[l][1]), o.push(new rt(h[0], h[0], h[1], h[1] + r[l][1])), h[1] = r[l][1] + h[1]) : r[l][0] === "z" || r[l][0] === "Z" ? (e = e + Math.sqrt(Math.pow(d[0] - h[0], 2) + Math.pow(d[1] - h[1], 2)), o.push(new rt(h[0], d[0], h[1], d[1])), h = [d[0], d[1]]) : r[l][0] === "C" ? (f = new it(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6]), e = e + f.getTotalLength(), h = [r[l][5], r[l][6]], o.push(f)) : r[l][0] === "c" ? (f = new it(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4], h[0] + r[l][5], h[1] + r[l][6]), e = e + f.getTotalLength(), h = [r[l][5] + h[0], r[l][6] + h[1]], o.push(f)) : r[l][0] === "S" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new it(h[0], h[1], 2 * h[0] - r[l - 1][r[l - 1].length - 4], 2 * h[1] - r[l - 1][r[l - 1].length - 3], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new it(h[0], h[1], h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]), e = e + f.getTotalLength(), h = [r[l][3], r[l][4]], o.push(f)) : r[l][0] === "s" ? (l > 0 && ["C", "c", "S", "s"].indexOf(r[l - 1][0]) > -1 ? f = new it(h[0], h[1], h[0] + f.d.x - f.c.x, h[1] + f.d.y - f.c.y, h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]) : f = new it(h[0], h[1], h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + f.getTotalLength(), h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(f)) : r[l][0] === "Q" ? (h[0] != r[l][1] && h[1] != r[l][2] ? f = new it(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4]) : f = new rt(r[l][1], r[l][3], r[l][2], r[l][4]), e = e + f.getTotalLength(), o.push(f), h = [r[l][3], r[l][4]], c = [r[l][1], r[l][2]]) : r[l][0] === "q" ? (r[l][1] == 0 && r[l][2] == 0 ? f = new rt(h[0] + r[l][1], h[0] + r[l][3], h[1] + r[l][2], h[1] + r[l][4]) : f = new it(h[0], h[1], h[0] + r[l][1], h[1] + r[l][2], h[0] + r[l][3], h[1] + r[l][4]), e = e + f.getTotalLength(), c = [h[0] + r[l][1], h[1] + r[l][2]], h = [r[l][3] + h[0], r[l][4] + h[1]], o.push(f)) : r[l][0] === "T" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? f = new it(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], r[l][1], r[l][2]) : f = new rt(h[0], r[l][1], h[1], r[l][2]), o.push(f), e = e + f.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1], r[l][2]]) : r[l][0] === "t" ? (l > 0 && ["Q", "q", "T", "t"].indexOf(r[l - 1][0]) > -1 ? f = new it(h[0], h[1], 2 * h[0] - c[0], 2 * h[1] - c[1], h[0] + r[l][1], h[1] + r[l][2]) : f = new rt(h[0], h[0] + r[l][1], h[1], h[1] + r[l][2]), e = e + f.getTotalLength(), c = [2 * h[0] - c[0], 2 * h[1] - c[1]], h = [r[l][1] + h[0], r[l][2] + h[0]], o.push(f)) : r[l][0] === "A" ? (f = new P0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], r[l][6], r[l][7]), e = e + f.getTotalLength(), h = [r[l][6], r[l][7]], o.push(f)) : r[l][0] === "a" && (f = new P0(h[0], h[1], r[l][1], r[l][2], r[l][3], r[l][4], r[l][5], h[0] + r[l][6], h[1] + r[l][7]), e = e + f.getTotalLength(), h = [h[0] + r[l][6], h[1] + r[l][7]], o.push(f)), t.push(e);
2998
3116
  return i;
2999
3117
  }
3000
3118
  i.getTotalLength = function() {
@@ -3017,49 +3135,49 @@ function G1(n) {
3017
3135
  };
3018
3136
  return i(n);
3019
3137
  }
3020
- function O0(n, e) {
3138
+ function Ft(n, e) {
3021
3139
  return Math.sqrt((n[0] - e[0]) * (n[0] - e[0]) + (n[1] - e[1]) * (n[1] - e[1]));
3022
3140
  }
3023
- function Dt(n, e, t) {
3141
+ function U0(n, e, t) {
3024
3142
  return [n[0] + (e[0] - n[0]) * t, n[1] + (e[1] - n[1]) * t];
3025
3143
  }
3026
- function W1(n, e) {
3027
- return O0(n, e) < 1e-9;
3144
+ function J1(n, e) {
3145
+ return Ft(n, e) < 1e-9;
3028
3146
  }
3029
- function Z1(n, e, t) {
3030
- let o = n.map((i, a) => V1(i, e[a]));
3147
+ function tn(n, e, t) {
3148
+ let o = n.map((i, a) => en(i, e[a]));
3031
3149
  return function(i) {
3032
3150
  let a = o.map((s) => s(i));
3033
- return t ? J1(a) : a;
3151
+ return t ? on(a) : a;
3034
3152
  };
3035
3153
  }
3036
- function V1(n, e) {
3154
+ function en(n, e) {
3037
3155
  return function(t) {
3038
3156
  return n.map((o, i) => o + t * (e[i] - o));
3039
3157
  };
3040
3158
  }
3041
- function _0(n) {
3159
+ function Ot(n) {
3042
3160
  return typeof n == "number" && isFinite(n);
3043
3161
  }
3044
- const Q0 = `All shapes must be supplied as arrays of [x, y] points or an SVG path string (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).
3162
+ const t0 = `All shapes must be supplied as arrays of [x, y] points or an SVG path string (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).
3045
3163
  Example valid ways of supplying a shape would be:
3046
3164
  [[0, 0], [10, 0], [10, 10]]
3047
3165
  "M0,0 L10,0 L10,10Z"
3048
3166
  `;
3049
- function K1(n) {
3050
- return new E1(n).abs();
3167
+ function nn(n) {
3168
+ return new F1(n).abs();
3051
3169
  }
3052
- function Q1(n) {
3170
+ function rn(n) {
3053
3171
  return n.toString().split("M").map((e, t) => (e = e.trim(), t && e ? "M" + e : e)).filter((e) => e);
3054
3172
  }
3055
- function J1(n) {
3173
+ function on(n) {
3056
3174
  return "M" + n.join("L") + "Z";
3057
3175
  }
3058
- function tn(n, e) {
3059
- let t = K1(n);
3060
- return en(t) || nn(t, e);
3176
+ function sn(n, e) {
3177
+ let t = nn(n);
3178
+ return an(t) || hn(t, e);
3061
3179
  }
3062
- function en(n) {
3180
+ function an(n) {
3063
3181
  let e = n.segments || [], t = [];
3064
3182
  if (!e.length || e[0][0] !== "M")
3065
3183
  return !1;
@@ -3078,11 +3196,11 @@ function en(n) {
3078
3196
  }
3079
3197
  return t.length ? { ring: t } : !1;
3080
3198
  }
3081
- function nn(n, e) {
3082
- let t = Q1(n)[0], o = [], i, a, s = 3;
3199
+ function hn(n, e) {
3200
+ let t = rn(n)[0], o = [], i, a, s = 3;
3083
3201
  if (!t)
3084
- throw new TypeError(Q0);
3085
- a = rn(t), i = a.getTotalLength(), e && _0(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
3202
+ throw new TypeError(t0);
3203
+ a = ln(t), i = a.getTotalLength(), e && Ot(e) && e > 0 && (s = Math.max(s, Math.ceil(i / e)));
3086
3204
  for (let r = 0; r < s; r++) {
3087
3205
  let h = a.getPointAtLength(i * r / s);
3088
3206
  o.push([h.x, h.y]);
@@ -3092,115 +3210,115 @@ function nn(n, e) {
3092
3210
  skipBisect: !0
3093
3211
  };
3094
3212
  }
3095
- function rn(n) {
3213
+ function ln(n) {
3096
3214
  if (typeof window < "u" && window && window.document)
3097
3215
  try {
3098
3216
  let e = window.document.createElementNS("http://www.w3.org/2000/svg", "path");
3099
3217
  return e.setAttributeNS(null, "d", n), e;
3100
3218
  } catch {
3101
3219
  }
3102
- return G1(n);
3220
+ return Q1(n);
3103
3221
  }
3104
- function Lt(n, e) {
3105
- const t = n.length + e, o = m1(n) / e;
3222
+ function E0(n, e) {
3223
+ const t = n.length + e, o = T1(n) / e;
3106
3224
  let i = 0, a = 0, s = o / 2;
3107
3225
  for (; n.length < t; ) {
3108
- let r = n[i], h = n[(i + 1) % n.length], c = O0(r, h);
3226
+ let r = n[i], h = n[(i + 1) % n.length], c = Ft(r, h);
3109
3227
  if (s <= a + c) {
3110
- n.splice(i + 1, 0, c ? Dt(r, h, (s - a) / c) : r.slice(0)), s += o;
3228
+ n.splice(i + 1, 0, c ? U0(r, h, (s - a) / c) : r.slice(0)), s += o;
3111
3229
  continue;
3112
3230
  }
3113
3231
  a += c, i++;
3114
3232
  }
3115
3233
  }
3116
- function on(n, e = 1 / 0) {
3234
+ function cn(n, e = 1 / 0) {
3117
3235
  for (let t = 0; t < n.length; t++) {
3118
3236
  let o = n[t], i = t === n.length - 1 ? n[0] : n[t + 1];
3119
- for (; O0(o, i) > e; )
3120
- i = Dt(o, i, 0.5), n.splice(t + 1, 0, i);
3237
+ for (; Ft(o, i) > e; )
3238
+ i = U0(o, i, 0.5), n.splice(t + 1, 0, i);
3121
3239
  }
3122
3240
  }
3123
- function Tt(n, e) {
3241
+ function S0(n, e) {
3124
3242
  let t, o, i;
3125
3243
  if (typeof n == "string") {
3126
- let a = tn(n, e);
3244
+ let a = sn(n, e);
3127
3245
  n = a.ring, i = a.skipBisect;
3128
3246
  } else if (!Array.isArray(n))
3129
- throw new TypeError(Q0);
3130
- if (t = n.slice(0), !sn(t))
3131
- throw new TypeError(Q0);
3132
- return t.length > 1 && W1(t[0], t[t.length - 1]) && t.pop(), o = w1(t), o > 0 && t.reverse(), !i && e && _0(e) && e > 0 && on(t, e), t;
3247
+ throw new TypeError(t0);
3248
+ if (t = n.slice(0), !un(t))
3249
+ throw new TypeError(t0);
3250
+ return t.length > 1 && J1(t[0], t[t.length - 1]) && t.pop(), o = L1(t), o > 0 && t.reverse(), !i && e && Ot(e) && e > 0 && cn(t, e), t;
3133
3251
  }
3134
- function sn(n) {
3252
+ function un(n) {
3135
3253
  return n.every(function(e) {
3136
- return Array.isArray(e) && e.length >= 2 && _0(e[0]) && _0(e[1]);
3254
+ return Array.isArray(e) && e.length >= 2 && Ot(e[0]) && Ot(e[1]);
3137
3255
  });
3138
3256
  }
3139
- function an(n, e) {
3257
+ function fn(n, e) {
3140
3258
  let t = n.length, o = 1 / 0, i, a, s;
3141
3259
  for (let r = 0; r < t; r++)
3142
3260
  a = 0, e.forEach(function(h, c) {
3143
- let f = O0(n[(r + c) % t], h);
3261
+ let f = Ft(n[(r + c) % t], h);
3144
3262
  a += f * f;
3145
3263
  }), a < o && (o = a, i = r);
3146
3264
  i && (s = n.splice(0, i), n.splice(n.length, 0, ...s));
3147
3265
  }
3148
- function hn(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
3149
- let i = Tt(n, t), a = Tt(e, t), s = ln(i, a, o);
3266
+ function gn(n, e, { maxSegmentLength: t = 10, string: o = !0 } = {}) {
3267
+ let i = S0(n, t), a = S0(e, t), s = pn(i, a, o);
3150
3268
  return !o || typeof n != "string" && typeof e != "string" ? s : (r) => r < 1e-4 && typeof n == "string" ? n : 1 - r < 1e-4 && typeof e == "string" ? e : s(r);
3151
3269
  }
3152
- function ln(n, e, t) {
3270
+ function pn(n, e, t) {
3153
3271
  let o;
3154
- return o = n.length - e.length, Lt(n, o < 0 ? o * -1 : 0), Lt(e, o > 0 ? o : 0), an(n, e), Z1(n, e, t);
3272
+ return o = n.length - e.length, E0(n, o < 0 ? o * -1 : 0), E0(e, o > 0 ? o : 0), fn(n, e), tn(n, e, t);
3155
3273
  }
3156
- var I0 = { exports: {} }, Pt;
3157
- function cn() {
3158
- if (Pt) return I0.exports;
3159
- Pt = 1, I0.exports = n, I0.exports.default = n;
3274
+ var _t = { exports: {} }, k0;
3275
+ function dn() {
3276
+ if (k0) return _t.exports;
3277
+ k0 = 1, _t.exports = n, _t.exports.default = n;
3160
3278
  function n(g, x, p) {
3161
3279
  p = p || 2;
3162
- var v = x && x.length, w = v ? x[0] * p : g.length, A = e(g, 0, w, p, !0), b = [];
3163
- if (!A || A.next === A.prev) return b;
3164
- var L, F, I, Y, D, N, W;
3165
- if (v && (A = h(g, x, A, p)), g.length > 80 * p) {
3166
- L = I = g[0], F = Y = g[1];
3280
+ var v = x && x.length, w = v ? x[0] * p : g.length, b = e(g, 0, w, p, !0), A = [];
3281
+ if (!b || b.next === b.prev) return A;
3282
+ var P, F, _, Y, z, B, Z;
3283
+ if (v && (b = h(g, x, b, p)), g.length > 80 * p) {
3284
+ P = _ = g[0], F = Y = g[1];
3167
3285
  for (var j = p; j < w; j += p)
3168
- D = g[j], N = g[j + 1], D < L && (L = D), N < F && (F = N), D > I && (I = D), N > Y && (Y = N);
3169
- W = Math.max(I - L, Y - F), W = W !== 0 ? 32767 / W : 0;
3286
+ z = g[j], B = g[j + 1], z < P && (P = z), B < F && (F = B), z > _ && (_ = z), B > Y && (Y = B);
3287
+ Z = Math.max(_ - P, Y - F), Z = Z !== 0 ? 32767 / Z : 0;
3170
3288
  }
3171
- return o(A, b, p, L, F, W, 0), b;
3289
+ return o(b, A, p, P, F, Z, 0), A;
3172
3290
  }
3173
3291
  function e(g, x, p, v, w) {
3174
- var A, b;
3175
- if (w === F0(g, x, p, v) > 0)
3176
- for (A = x; A < p; A += v) b = e0(A, g[A], g[A + 1], b);
3292
+ var b, A;
3293
+ if (w === Rt(g, x, p, v) > 0)
3294
+ for (b = x; b < p; b += v) A = et(b, g[b], g[b + 1], A);
3177
3295
  else
3178
- for (A = p - v; A >= x; A -= v) b = e0(A, g[A], g[A + 1], b);
3179
- return b && E(b, b.next) && (n0(b), b = b.next), b;
3296
+ for (b = p - v; b >= x; b -= v) A = et(b, g[b], g[b + 1], A);
3297
+ return A && S(A, A.next) && (nt(A), A = A.next), A;
3180
3298
  }
3181
3299
  function t(g, x) {
3182
3300
  if (!g) return g;
3183
3301
  x || (x = g);
3184
3302
  var p = g, v;
3185
3303
  do
3186
- if (v = !1, !p.steiner && (E(p, p.next) || P(p.prev, p, p.next) === 0)) {
3187
- if (n0(p), p = x = p.prev, p === p.next) break;
3304
+ if (v = !1, !p.steiner && (S(p, p.next) || C(p.prev, p, p.next) === 0)) {
3305
+ if (nt(p), p = x = p.prev, p === p.next) break;
3188
3306
  v = !0;
3189
3307
  } else
3190
3308
  p = p.next;
3191
3309
  while (v || p !== x);
3192
3310
  return x;
3193
3311
  }
3194
- function o(g, x, p, v, w, A, b) {
3312
+ function o(g, x, p, v, w, b, A) {
3195
3313
  if (g) {
3196
- !b && A && u(g, v, w, A);
3197
- for (var L = g, F, I; g.prev !== g.next; ) {
3198
- if (F = g.prev, I = g.next, A ? a(g, v, w, A) : i(g)) {
3199
- x.push(F.i / p | 0), x.push(g.i / p | 0), x.push(I.i / p | 0), n0(g), g = I.next, L = I.next;
3314
+ !A && b && u(g, v, w, b);
3315
+ for (var P = g, F, _; g.prev !== g.next; ) {
3316
+ if (F = g.prev, _ = g.next, b ? a(g, v, w, b) : i(g)) {
3317
+ x.push(F.i / p | 0), x.push(g.i / p | 0), x.push(_.i / p | 0), nt(g), g = _.next, P = _.next;
3200
3318
  continue;
3201
3319
  }
3202
- if (g = I, g === L) {
3203
- b ? b === 1 ? (g = s(t(g), x, p), o(g, x, p, v, w, A, 2)) : b === 2 && r(g, x, p, v, w, A) : o(t(g), x, p, v, w, A, 1);
3320
+ if (g = _, g === P) {
3321
+ A ? A === 1 ? (g = s(t(g), x, p), o(g, x, p, v, w, b, 2)) : A === 2 && r(g, x, p, v, w, b) : o(t(g), x, p, v, w, b, 1);
3204
3322
  break;
3205
3323
  }
3206
3324
  }
@@ -3208,58 +3326,58 @@ function cn() {
3208
3326
  }
3209
3327
  function i(g) {
3210
3328
  var x = g.prev, p = g, v = g.next;
3211
- if (P(x, p, v) >= 0) return !1;
3212
- for (var w = x.x, A = p.x, b = v.x, L = x.y, F = p.y, I = v.y, Y = w < A ? w < b ? w : b : A < b ? A : b, D = L < F ? L < I ? L : I : F < I ? F : I, N = w > A ? w > b ? w : b : A > b ? A : b, W = L > F ? L > I ? L : I : F > I ? F : I, j = v.next; j !== x; ) {
3213
- if (j.x >= Y && j.x <= N && j.y >= D && j.y <= W && T(w, L, A, F, b, I, j.x, j.y) && P(j.prev, j, j.next) >= 0) return !1;
3329
+ if (C(x, p, v) >= 0) return !1;
3330
+ for (var w = x.x, b = p.x, A = v.x, P = x.y, F = p.y, _ = v.y, Y = w < b ? w < A ? w : A : b < A ? b : A, z = P < F ? P < _ ? P : _ : F < _ ? F : _, B = w > b ? w > A ? w : A : b > A ? b : A, Z = P > F ? P > _ ? P : _ : F > _ ? F : _, j = v.next; j !== x; ) {
3331
+ if (j.x >= Y && j.x <= B && j.y >= z && j.y <= Z && E(w, P, b, F, A, _, j.x, j.y) && C(j.prev, j, j.next) >= 0) return !1;
3214
3332
  j = j.next;
3215
3333
  }
3216
3334
  return !0;
3217
3335
  }
3218
3336
  function a(g, x, p, v) {
3219
- var w = g.prev, A = g, b = g.next;
3220
- if (P(w, A, b) >= 0) return !1;
3221
- for (var L = w.x, F = A.x, I = b.x, Y = w.y, D = A.y, N = b.y, W = L < F ? L < I ? L : I : F < I ? F : I, j = Y < D ? Y < N ? Y : N : D < N ? D : N, L0 = L > F ? L > I ? L : I : F > I ? F : I, T0 = Y > D ? Y > N ? Y : N : D > N ? D : N, it = y(W, j, x, p, v), ot = y(L0, T0, x, p, v), B = g.prevZ, q = g.nextZ; B && B.z >= it && q && q.z <= ot; ) {
3222
- if (B.x >= W && B.x <= L0 && B.y >= j && B.y <= T0 && B !== w && B !== b && T(L, Y, F, D, I, N, B.x, B.y) && P(B.prev, B, B.next) >= 0 || (B = B.prevZ, q.x >= W && q.x <= L0 && q.y >= j && q.y <= T0 && q !== w && q !== b && T(L, Y, F, D, I, N, q.x, q.y) && P(q.prev, q, q.next) >= 0)) return !1;
3223
- q = q.nextZ;
3337
+ var w = g.prev, b = g, A = g.next;
3338
+ if (C(w, b, A) >= 0) return !1;
3339
+ for (var P = w.x, F = b.x, _ = A.x, Y = w.y, z = b.y, B = A.y, Z = P < F ? P < _ ? P : _ : F < _ ? F : _, j = Y < z ? Y < B ? Y : B : z < B ? z : B, Lt = P > F ? P > _ ? P : _ : F > _ ? F : _, Tt = Y > z ? Y > B ? Y : B : z > B ? z : B, s0 = y(Z, j, x, p, v), a0 = y(Lt, Tt, x, p, v), q = g.prevZ, D = g.nextZ; q && q.z >= s0 && D && D.z <= a0; ) {
3340
+ if (q.x >= Z && q.x <= Lt && q.y >= j && q.y <= Tt && q !== w && q !== A && E(P, Y, F, z, _, B, q.x, q.y) && C(q.prev, q, q.next) >= 0 || (q = q.prevZ, D.x >= Z && D.x <= Lt && D.y >= j && D.y <= Tt && D !== w && D !== A && E(P, Y, F, z, _, B, D.x, D.y) && C(D.prev, D, D.next) >= 0)) return !1;
3341
+ D = D.nextZ;
3224
3342
  }
3225
- for (; B && B.z >= it; ) {
3226
- if (B.x >= W && B.x <= L0 && B.y >= j && B.y <= T0 && B !== w && B !== b && T(L, Y, F, D, I, N, B.x, B.y) && P(B.prev, B, B.next) >= 0) return !1;
3227
- B = B.prevZ;
3343
+ for (; q && q.z >= s0; ) {
3344
+ if (q.x >= Z && q.x <= Lt && q.y >= j && q.y <= Tt && q !== w && q !== A && E(P, Y, F, z, _, B, q.x, q.y) && C(q.prev, q, q.next) >= 0) return !1;
3345
+ q = q.prevZ;
3228
3346
  }
3229
- for (; q && q.z <= ot; ) {
3230
- if (q.x >= W && q.x <= L0 && q.y >= j && q.y <= T0 && q !== w && q !== b && T(L, Y, F, D, I, N, q.x, q.y) && P(q.prev, q, q.next) >= 0) return !1;
3231
- q = q.nextZ;
3347
+ for (; D && D.z <= a0; ) {
3348
+ if (D.x >= Z && D.x <= Lt && D.y >= j && D.y <= Tt && D !== w && D !== A && E(P, Y, F, z, _, B, D.x, D.y) && C(D.prev, D, D.next) >= 0) return !1;
3349
+ D = D.nextZ;
3232
3350
  }
3233
3351
  return !0;
3234
3352
  }
3235
3353
  function s(g, x, p) {
3236
3354
  var v = g;
3237
3355
  do {
3238
- var w = v.prev, A = v.next.next;
3239
- !E(w, A) && C(w, v, v.next, A) && z(w, A) && z(A, w) && (x.push(w.i / p | 0), x.push(v.i / p | 0), x.push(A.i / p | 0), n0(v), n0(v.next), v = g = A), v = v.next;
3356
+ var w = v.prev, b = v.next.next;
3357
+ !S(w, b) && T(w, v, v.next, b) && H(w, b) && H(b, w) && (x.push(w.i / p | 0), x.push(v.i / p | 0), x.push(b.i / p | 0), nt(v), nt(v.next), v = g = b), v = v.next;
3240
3358
  } while (v !== g);
3241
3359
  return t(v);
3242
3360
  }
3243
- function r(g, x, p, v, w, A) {
3244
- var b = g;
3361
+ function r(g, x, p, v, w, b) {
3362
+ var A = g;
3245
3363
  do {
3246
- for (var L = b.next.next; L !== b.prev; ) {
3247
- if (b.i !== L.i && S(b, L)) {
3248
- var F = t0(b, L);
3249
- b = t(b, b.next), F = t(F, F.next), o(b, x, p, v, w, A, 0), o(F, x, p, v, w, A, 0);
3364
+ for (var P = A.next.next; P !== A.prev; ) {
3365
+ if (A.i !== P.i && L(A, P)) {
3366
+ var F = tt(A, P);
3367
+ A = t(A, A.next), F = t(F, F.next), o(A, x, p, v, w, b, 0), o(F, x, p, v, w, b, 0);
3250
3368
  return;
3251
3369
  }
3252
- L = L.next;
3370
+ P = P.next;
3253
3371
  }
3254
- b = b.next;
3255
- } while (b !== g);
3372
+ A = A.next;
3373
+ } while (A !== g);
3256
3374
  }
3257
3375
  function h(g, x, p, v) {
3258
- var w = [], A, b, L, F, I;
3259
- for (A = 0, b = x.length; A < b; A++)
3260
- L = x[A] * v, F = A < b - 1 ? x[A + 1] * v : g.length, I = e(g, L, F, v, !1), I === I.next && (I.steiner = !0), w.push(M(I));
3261
- for (w.sort(c), A = 0; A < w.length; A++)
3262
- p = f(w[A], p);
3376
+ var w = [], b, A, P, F, _;
3377
+ for (b = 0, A = x.length; b < A; b++)
3378
+ P = x[b] * v, F = b < A - 1 ? x[b + 1] * v : g.length, _ = e(g, P, F, v, !1), _ === _.next && (_.steiner = !0), w.push(M(_));
3379
+ for (w.sort(c), b = 0; b < w.length; b++)
3380
+ p = f(w[b], p);
3263
3381
  return p;
3264
3382
  }
3265
3383
  function c(g, x) {
@@ -3269,29 +3387,29 @@ function cn() {
3269
3387
  var p = d(g, x);
3270
3388
  if (!p)
3271
3389
  return x;
3272
- var v = t0(p, g);
3390
+ var v = tt(p, g);
3273
3391
  return t(v, v.next), t(p, p.next);
3274
3392
  }
3275
3393
  function d(g, x) {
3276
- var p = x, v = g.x, w = g.y, A = -1 / 0, b;
3394
+ var p = x, v = g.x, w = g.y, b = -1 / 0, A;
3277
3395
  do {
3278
3396
  if (w <= p.y && w >= p.next.y && p.next.y !== p.y) {
3279
- var L = p.x + (w - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
3280
- if (L <= v && L > A && (A = L, b = p.x < p.next.x ? p : p.next, L === v))
3281
- return b;
3397
+ var P = p.x + (w - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
3398
+ if (P <= v && P > b && (b = P, A = p.x < p.next.x ? p : p.next, P === v))
3399
+ return A;
3282
3400
  }
3283
3401
  p = p.next;
3284
3402
  } while (p !== x);
3285
- if (!b) return null;
3286
- var F = b, I = b.x, Y = b.y, D = 1 / 0, N;
3287
- p = b;
3403
+ if (!A) return null;
3404
+ var F = A, _ = A.x, Y = A.y, z = 1 / 0, B;
3405
+ p = A;
3288
3406
  do
3289
- v >= p.x && p.x >= I && v !== p.x && T(w < Y ? v : A, w, I, Y, w < Y ? A : v, w, p.x, p.y) && (N = Math.abs(w - p.y) / (v - p.x), z(p, g) && (N < D || N === D && (p.x > b.x || p.x === b.x && l(b, p))) && (b = p, D = N)), p = p.next;
3407
+ v >= p.x && p.x >= _ && v !== p.x && E(w < Y ? v : b, w, _, Y, w < Y ? b : v, w, p.x, p.y) && (B = Math.abs(w - p.y) / (v - p.x), H(p, g) && (B < z || B === z && (p.x > A.x || p.x === A.x && l(A, p))) && (A = p, z = B)), p = p.next;
3290
3408
  while (p !== F);
3291
- return b;
3409
+ return A;
3292
3410
  }
3293
3411
  function l(g, x) {
3294
- return P(g.prev, g, x.prev) < 0 && P(x.next, g, g.next) < 0;
3412
+ return C(g.prev, g, x.prev) < 0 && C(x.next, g, g.next) < 0;
3295
3413
  }
3296
3414
  function u(g, x, p, v) {
3297
3415
  var w = g;
@@ -3301,17 +3419,17 @@ function cn() {
3301
3419
  w.prevZ.nextZ = null, w.prevZ = null, m(w);
3302
3420
  }
3303
3421
  function m(g) {
3304
- var x, p, v, w, A, b, L, F, I = 1;
3422
+ var x, p, v, w, b, A, P, F, _ = 1;
3305
3423
  do {
3306
- for (p = g, g = null, A = null, b = 0; p; ) {
3307
- for (b++, v = p, L = 0, x = 0; x < I && (L++, v = v.nextZ, !!v); x++)
3424
+ for (p = g, g = null, b = null, A = 0; p; ) {
3425
+ for (A++, v = p, P = 0, x = 0; x < _ && (P++, v = v.nextZ, !!v); x++)
3308
3426
  ;
3309
- for (F = I; L > 0 || F > 0 && v; )
3310
- L !== 0 && (F === 0 || !v || p.z <= v.z) ? (w = p, p = p.nextZ, L--) : (w = v, v = v.nextZ, F--), A ? A.nextZ = w : g = w, w.prevZ = A, A = w;
3427
+ for (F = _; P > 0 || F > 0 && v; )
3428
+ P !== 0 && (F === 0 || !v || p.z <= v.z) ? (w = p, p = p.nextZ, P--) : (w = v, v = v.nextZ, F--), b ? b.nextZ = w : g = w, w.prevZ = b, b = w;
3311
3429
  p = v;
3312
3430
  }
3313
- A.nextZ = null, I *= 2;
3314
- } while (b > 1);
3431
+ b.nextZ = null, _ *= 2;
3432
+ } while (A > 1);
3315
3433
  return g;
3316
3434
  }
3317
3435
  function y(g, x, p, v, w) {
@@ -3324,99 +3442,99 @@ function cn() {
3324
3442
  while (x !== g);
3325
3443
  return p;
3326
3444
  }
3327
- function T(g, x, p, v, w, A, b, L) {
3328
- return (w - b) * (x - L) >= (g - b) * (A - L) && (g - b) * (v - L) >= (p - b) * (x - L) && (p - b) * (A - L) >= (w - b) * (v - L);
3445
+ function E(g, x, p, v, w, b, A, P) {
3446
+ return (w - A) * (x - P) >= (g - A) * (b - P) && (g - A) * (v - P) >= (p - A) * (x - P) && (p - A) * (b - P) >= (w - A) * (v - P);
3329
3447
  }
3330
- function S(g, x) {
3448
+ function L(g, x) {
3331
3449
  return g.next.i !== x.i && g.prev.i !== x.i && !G(g, x) && // dones't intersect other edges
3332
- (z(g, x) && z(x, g) && H(g, x) && // locally visible
3333
- (P(g.prev, g, x.prev) || P(g, x.prev, x)) || // does not create opposite-facing sectors
3334
- E(g, x) && P(g.prev, g, g.next) > 0 && P(x.prev, x, x.next) > 0);
3450
+ (H(g, x) && H(x, g) && $(g, x) && // locally visible
3451
+ (C(g.prev, g, x.prev) || C(g, x.prev, x)) || // does not create opposite-facing sectors
3452
+ S(g, x) && C(g.prev, g, g.next) > 0 && C(x.prev, x, x.next) > 0);
3335
3453
  }
3336
- function P(g, x, p) {
3454
+ function C(g, x, p) {
3337
3455
  return (x.y - g.y) * (p.x - x.x) - (x.x - g.x) * (p.y - x.y);
3338
3456
  }
3339
- function E(g, x) {
3457
+ function S(g, x) {
3340
3458
  return g.x === x.x && g.y === x.y;
3341
3459
  }
3342
- function C(g, x, p, v) {
3343
- var w = R(P(g, x, p)), A = R(P(g, x, v)), b = R(P(p, v, g)), L = R(P(p, v, x));
3344
- return !!(w !== A && b !== L || w === 0 && O(g, p, x) || A === 0 && O(g, v, x) || b === 0 && O(p, g, v) || L === 0 && O(p, x, v));
3460
+ function T(g, x, p, v) {
3461
+ var w = N(C(g, x, p)), b = N(C(g, x, v)), A = N(C(p, v, g)), P = N(C(p, v, x));
3462
+ return !!(w !== b && A !== P || w === 0 && I(g, p, x) || b === 0 && I(g, v, x) || A === 0 && I(p, g, v) || P === 0 && I(p, x, v));
3345
3463
  }
3346
- function O(g, x, p) {
3464
+ function I(g, x, p) {
3347
3465
  return x.x <= Math.max(g.x, p.x) && x.x >= Math.min(g.x, p.x) && x.y <= Math.max(g.y, p.y) && x.y >= Math.min(g.y, p.y);
3348
3466
  }
3349
- function R(g) {
3467
+ function N(g) {
3350
3468
  return g > 0 ? 1 : g < 0 ? -1 : 0;
3351
3469
  }
3352
3470
  function G(g, x) {
3353
3471
  var p = g;
3354
3472
  do {
3355
- if (p.i !== g.i && p.next.i !== g.i && p.i !== x.i && p.next.i !== x.i && C(p, p.next, g, x)) return !0;
3473
+ if (p.i !== g.i && p.next.i !== g.i && p.i !== x.i && p.next.i !== x.i && T(p, p.next, g, x)) return !0;
3356
3474
  p = p.next;
3357
3475
  } while (p !== g);
3358
3476
  return !1;
3359
3477
  }
3360
- function z(g, x) {
3361
- return P(g.prev, g, g.next) < 0 ? P(g, x, g.next) >= 0 && P(g, g.prev, x) >= 0 : P(g, x, g.prev) < 0 || P(g, g.next, x) < 0;
3362
- }
3363
3478
  function H(g, x) {
3364
- var p = g, v = !1, w = (g.x + x.x) / 2, A = (g.y + x.y) / 2;
3479
+ return C(g.prev, g, g.next) < 0 ? C(g, x, g.next) >= 0 && C(g, g.prev, x) >= 0 : C(g, x, g.prev) < 0 || C(g, g.next, x) < 0;
3480
+ }
3481
+ function $(g, x) {
3482
+ var p = g, v = !1, w = (g.x + x.x) / 2, b = (g.y + x.y) / 2;
3365
3483
  do
3366
- p.y > A != p.next.y > A && p.next.y !== p.y && w < (p.next.x - p.x) * (A - p.y) / (p.next.y - p.y) + p.x && (v = !v), p = p.next;
3484
+ p.y > b != p.next.y > b && p.next.y !== p.y && w < (p.next.x - p.x) * (b - p.y) / (p.next.y - p.y) + p.x && (v = !v), p = p.next;
3367
3485
  while (p !== g);
3368
3486
  return v;
3369
3487
  }
3370
- function t0(g, x) {
3371
- var p = new K(g.i, g.x, g.y), v = new K(x.i, x.x, x.y), w = g.next, A = x.prev;
3372
- return g.next = x, x.prev = g, p.next = w, w.prev = p, v.next = p, p.prev = v, A.next = v, v.prev = A, v;
3488
+ function tt(g, x) {
3489
+ var p = new K(g.i, g.x, g.y), v = new K(x.i, x.x, x.y), w = g.next, b = x.prev;
3490
+ return g.next = x, x.prev = g, p.next = w, w.prev = p, v.next = p, p.prev = v, b.next = v, v.prev = b, v;
3373
3491
  }
3374
- function e0(g, x, p, v) {
3492
+ function et(g, x, p, v) {
3375
3493
  var w = new K(g, x, p);
3376
3494
  return v ? (w.next = v.next, w.prev = v, v.next.prev = w, v.next = w) : (w.prev = w, w.next = w), w;
3377
3495
  }
3378
- function n0(g) {
3496
+ function nt(g) {
3379
3497
  g.next.prev = g.prev, g.prev.next = g.next, g.prevZ && (g.prevZ.nextZ = g.nextZ), g.nextZ && (g.nextZ.prevZ = g.prevZ);
3380
3498
  }
3381
3499
  function K(g, x, p) {
3382
3500
  this.i = g, this.x = x, this.y = p, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1;
3383
3501
  }
3384
3502
  n.deviation = function(g, x, p, v) {
3385
- var w = x && x.length, A = w ? x[0] * p : g.length, b = Math.abs(F0(g, 0, A, p));
3503
+ var w = x && x.length, b = w ? x[0] * p : g.length, A = Math.abs(Rt(g, 0, b, p));
3386
3504
  if (w)
3387
- for (var L = 0, F = x.length; L < F; L++) {
3388
- var I = x[L] * p, Y = L < F - 1 ? x[L + 1] * p : g.length;
3389
- b -= Math.abs(F0(g, I, Y, p));
3505
+ for (var P = 0, F = x.length; P < F; P++) {
3506
+ var _ = x[P] * p, Y = P < F - 1 ? x[P + 1] * p : g.length;
3507
+ A -= Math.abs(Rt(g, _, Y, p));
3390
3508
  }
3391
- var D = 0;
3392
- for (L = 0; L < v.length; L += 3) {
3393
- var N = v[L] * p, W = v[L + 1] * p, j = v[L + 2] * p;
3394
- D += Math.abs(
3395
- (g[N] - g[j]) * (g[W + 1] - g[N + 1]) - (g[N] - g[W]) * (g[j + 1] - g[N + 1])
3509
+ var z = 0;
3510
+ for (P = 0; P < v.length; P += 3) {
3511
+ var B = v[P] * p, Z = v[P + 1] * p, j = v[P + 2] * p;
3512
+ z += Math.abs(
3513
+ (g[B] - g[j]) * (g[Z + 1] - g[B + 1]) - (g[B] - g[Z]) * (g[j + 1] - g[B + 1])
3396
3514
  );
3397
3515
  }
3398
- return b === 0 && D === 0 ? 0 : Math.abs((D - b) / b);
3516
+ return A === 0 && z === 0 ? 0 : Math.abs((z - A) / A);
3399
3517
  };
3400
- function F0(g, x, p, v) {
3401
- for (var w = 0, A = x, b = p - v; A < p; A += v)
3402
- w += (g[b] - g[A]) * (g[A + 1] + g[b + 1]), b = A;
3518
+ function Rt(g, x, p, v) {
3519
+ for (var w = 0, b = x, A = p - v; b < p; b += v)
3520
+ w += (g[A] - g[b]) * (g[b + 1] + g[A + 1]), A = b;
3403
3521
  return w;
3404
3522
  }
3405
3523
  return n.flatten = function(g) {
3406
3524
  for (var x = g[0][0].length, p = { vertices: [], holes: [], dimensions: x }, v = 0, w = 0; w < g.length; w++) {
3407
- for (var A = 0; A < g[w].length; A++)
3408
- for (var b = 0; b < x; b++) p.vertices.push(g[w][A][b]);
3525
+ for (var b = 0; b < g[w].length; b++)
3526
+ for (var A = 0; A < x; A++) p.vertices.push(g[w][b][A]);
3409
3527
  w > 0 && (v += g[w - 1].length, p.holes.push(v));
3410
3528
  }
3411
3529
  return p;
3412
- }, I0.exports;
3530
+ }, _t.exports;
3413
3531
  }
3414
- cn();
3415
- function jt(n, e) {
3532
+ dn();
3533
+ function Y0(n, e) {
3416
3534
  return n < e ? -1 : n > e ? 1 : n >= e ? 0 : NaN;
3417
3535
  }
3418
- function un(n) {
3419
- return n.length === 1 && (n = fn(n)), {
3536
+ function xn(n) {
3537
+ return n.length === 1 && (n = yn(n)), {
3420
3538
  left: function(e, t, o, i) {
3421
3539
  for (o == null && (o = 0), i == null && (i = e.length); o < i; ) {
3422
3540
  var a = o + i >>> 1;
@@ -3433,20 +3551,20 @@ function un(n) {
3433
3551
  }
3434
3552
  };
3435
3553
  }
3436
- function fn(n) {
3554
+ function yn(n) {
3437
3555
  return function(e, t) {
3438
- return jt(n(e), t);
3556
+ return Y0(n(e), t);
3439
3557
  };
3440
3558
  }
3441
- un(jt);
3442
- function Rn(n, e, t = 3) {
3443
- const o = hn(n, e, { maxSegmentLength: t });
3559
+ xn(Y0);
3560
+ function zn(n, e, t = 3) {
3561
+ const o = gn(n, e, { maxSegmentLength: t });
3444
3562
  return {
3445
3563
  check: (i) => typeof i == "string",
3446
3564
  interpolate: (i, a, s) => o(s)
3447
3565
  };
3448
3566
  }
3449
- function Nn(n) {
3567
+ function jn(n) {
3450
3568
  const e = (o) => n.width * o, t = (o) => n.height * o;
3451
3569
  return {
3452
3570
  scaleX: e,
@@ -3457,7 +3575,7 @@ function Nn(n) {
3457
3575
  })
3458
3576
  };
3459
3577
  }
3460
- function Bn(n) {
3578
+ function Hn(n) {
3461
3579
  const e = [];
3462
3580
  if (n.isAllKey) {
3463
3581
  for (let t = 0; t <= n.animations.length; t++)
@@ -3469,49 +3587,49 @@ function Bn(n) {
3469
3587
  }), n.isEndKey && e[e.length - 1] !== n.animations.length && e.push(n.animations.length), e;
3470
3588
  }
3471
3589
  export {
3472
- x0 as Alignment,
3473
- o0 as Anchor,
3474
- et as Animate,
3475
- mn as Arrow,
3476
- kn as BrowserCanvasRenderer,
3477
- An as Circle,
3478
- $ as Color,
3479
- tt as Easing,
3480
- pn as FadeIn,
3481
- dn as FadeOut,
3482
- de as FontStyle,
3483
- ye as FontWeight,
3484
- bn as Grid,
3485
- st as Group,
3486
- xn as Hide,
3487
- vn as IFrame,
3488
- Mn as Image,
3489
- Ln as Line,
3490
- Tn as Mask,
3590
+ xt as Alignment,
3591
+ ot as Anchor,
3592
+ r0 as Animate,
3593
+ Tn as Arrow,
3594
+ Rn as BrowserCanvasRenderer,
3595
+ Cn as Circle,
3596
+ W as Color,
3597
+ n0 as Easing,
3598
+ wn as FadeIn,
3599
+ mn as FadeOut,
3600
+ we as FontStyle,
3601
+ be as FontWeight,
3602
+ Pn as Grid,
3603
+ h0 as Group,
3604
+ bn as Hide,
3605
+ Mn as IFrame,
3606
+ En as Image,
3607
+ Sn as Line,
3608
+ kn as Mask,
3491
3609
  U as ObjectType,
3492
- Fn as Opaque,
3493
- Pn as Path,
3494
- In as Pause,
3495
- Cn as Polygon,
3610
+ Dn as Opaque,
3611
+ In as Path,
3612
+ Nn as Pause,
3613
+ _n as Polygon,
3496
3614
  X as Position,
3497
- Pe as Presentation,
3498
- Sn as Rectangle,
3499
- En as SVG,
3500
- wn as ScreenCapture,
3501
- yn as Show,
3502
- a0 as Size,
3503
- _n as Slide,
3504
- l0 as SlideObject,
3505
- St as SlideWebExtra,
3506
- Ae as Text,
3507
- On as TextUnit,
3508
- pe as Transparent,
3509
- Ct as Update,
3510
- Bn as getKeySlideBuildIndices,
3511
- Nn as getSizingFunctions,
3512
- Rn as getSmoothPathInterpolator,
3513
- me as getTextContentLength,
3514
- ke as interpolateColor,
3515
- _e as interpolateNumber
3615
+ Ie as Presentation,
3616
+ On as Rectangle,
3617
+ Fn as SVG,
3618
+ Ln as ScreenCapture,
3619
+ An as Show,
3620
+ at as Size,
3621
+ Bn as Slide,
3622
+ lt as SlideObject,
3623
+ _0 as SlideWebExtra,
3624
+ Te as Text,
3625
+ qn as TextUnit,
3626
+ ve as Transparent,
3627
+ I0 as Update,
3628
+ Hn as getKeySlideBuildIndices,
3629
+ jn as getSizingFunctions,
3630
+ zn as getSmoothPathInterpolator,
3631
+ Le as getTextContentLength,
3632
+ Re as interpolateColor,
3633
+ Be as interpolateNumber
3516
3634
  };
3517
3635
  //# sourceMappingURL=presenter.mjs.map