svg-path-commander 2.1.7 → 2.1.8

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
1
  var Qe = Object.defineProperty;
2
2
  var Ze = (e, t, s) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
3
  var b = (e, t, s) => Ze(e, typeof t != "symbol" ? t + "" : t, s);
4
- var De = Object.defineProperty, Oe = (e, t, s) => t in e ? De(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, j = (e, t, s) => Oe(e, typeof t != "symbol" ? t + "" : t, s);
4
+ var De = Object.defineProperty, Oe = (e, t, s) => t in e ? De(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, S = (e, t, s) => Oe(e, typeof t != "symbol" ? t + "" : t, s);
5
5
  const Be = {
6
6
  a: 1,
7
7
  b: 0,
@@ -48,11 +48,11 @@ const Be = {
48
48
  y,
49
49
  m,
50
50
  g,
51
- d,
51
+ A,
52
52
  M,
53
- w
53
+ N
54
54
  ] = s;
55
- t.m11 = r, t.a = r, t.m21 = l, t.c = l, t.m31 = f, t.m41 = g, t.e = g, t.m12 = n, t.b = n, t.m22 = c, t.d = c, t.m32 = h, t.m42 = d, t.f = d, t.m13 = i, t.m23 = a, t.m33 = y, t.m43 = M, t.m14 = o, t.m24 = u, t.m34 = m, t.m44 = w;
55
+ t.m11 = r, t.a = r, t.m21 = l, t.c = l, t.m31 = f, t.m41 = g, t.e = g, t.m12 = n, t.b = n, t.m22 = c, t.d = c, t.m32 = h, t.m42 = A, t.f = A, t.m13 = i, t.m23 = a, t.m33 = y, t.m43 = M, t.m14 = o, t.m24 = u, t.m34 = m, t.m44 = N;
56
56
  } else if (s.length === 6) {
57
57
  const [r, n, i, o, l, c] = s;
58
58
  t.m11 = r, t.a = r, t.m12 = n, t.b = n, t.m21 = i, t.c = i, t.m22 = o, t.d = o, t.m41 = l, t.e = l, t.m42 = c, t.f = c;
@@ -123,12 +123,12 @@ const Be = {
123
123
  if (i === "skewX" || i === "skewY")
124
124
  s = s[i](c);
125
125
  else {
126
- const m = i.replace(/[XYZ]/, ""), g = i.replace(m, ""), d = ["X", "Y", "Z"].indexOf(g), M = m === "scale" ? 1 : 0, w = [
127
- d === 0 ? c : M,
128
- d === 1 ? c : M,
129
- d === 2 ? c : M
126
+ const m = i.replace(/[XYZ]/, ""), g = i.replace(m, ""), A = ["X", "Y", "Z"].indexOf(g), M = m === "scale" ? 1 : 0, N = [
127
+ A === 0 ? c : M,
128
+ A === 1 ? c : M,
129
+ A === 2 ? c : M
130
130
  ];
131
- s = s[m](...w);
131
+ s = s[m](...N);
132
132
  }
133
133
  else
134
134
  throw TypeError(r);
@@ -156,20 +156,20 @@ const Be = {
156
156
  }, re = (e, t, s) => {
157
157
  const r = new C(), n = Math.PI / 180, i = e * n, o = t * n, l = s * n, c = Math.cos(i), a = -Math.sin(i), u = Math.cos(o), f = -Math.sin(o), h = Math.cos(l), y = -Math.sin(l), m = u * h, g = -u * y;
158
158
  r.m11 = m, r.a = m, r.m12 = g, r.b = g, r.m13 = f;
159
- const d = a * f * h + c * y;
160
- r.m21 = d, r.c = d;
159
+ const A = a * f * h + c * y;
160
+ r.m21 = A, r.c = A;
161
161
  const M = c * h - a * f * y;
162
162
  return r.m22 = M, r.d = M, r.m23 = -a * u, r.m31 = a * y - c * f * h, r.m32 = a * h + c * f * y, r.m33 = c * u, r;
163
163
  }, ie = (e, t, s, r) => {
164
164
  const n = new C(), i = Math.sqrt(e * e + t * t + s * s);
165
165
  if (i === 0)
166
166
  return n;
167
- const o = e / i, l = t / i, c = s / i, a = r * (Math.PI / 360), u = Math.sin(a), f = Math.cos(a), h = u * u, y = o * o, m = l * l, g = c * c, d = 1 - 2 * (m + g) * h;
168
- n.m11 = d, n.a = d;
167
+ const o = e / i, l = t / i, c = s / i, a = r * (Math.PI / 360), u = Math.sin(a), f = Math.cos(a), h = u * u, y = o * o, m = l * l, g = c * c, A = 1 - 2 * (m + g) * h;
168
+ n.m11 = A, n.a = A;
169
169
  const M = 2 * (o * l * h + c * u * f);
170
170
  n.m12 = M, n.b = M, n.m13 = 2 * (o * c * h - l * u * f);
171
- const w = 2 * (l * o * h - c * u * f);
172
- n.m21 = w, n.c = w;
171
+ const N = 2 * (l * o * h - c * u * f);
172
+ n.m21 = N, n.c = N;
173
173
  const x = 1 - 2 * (g + y) * h;
174
174
  return n.m22 = x, n.d = x, n.m23 = 2 * (l * c * h + o * u * f), n.m31 = 2 * (c * o * h + l * u * f), n.m32 = 2 * (c * l * h - o * u * f), n.m33 = 1 - 2 * (y + m) * h, n;
175
175
  }, oe = (e, t, s) => {
@@ -186,8 +186,8 @@ const Be = {
186
186
  s.m12 = n, s.b = n;
187
187
  }
188
188
  return s;
189
- }, ce = (e) => At(e, 0), le = (e) => At(0, e), _ = (e, t) => {
190
- const s = t.m11 * e.m11 + t.m12 * e.m21 + t.m13 * e.m31 + t.m14 * e.m41, r = t.m11 * e.m12 + t.m12 * e.m22 + t.m13 * e.m32 + t.m14 * e.m42, n = t.m11 * e.m13 + t.m12 * e.m23 + t.m13 * e.m33 + t.m14 * e.m43, i = t.m11 * e.m14 + t.m12 * e.m24 + t.m13 * e.m34 + t.m14 * e.m44, o = t.m21 * e.m11 + t.m22 * e.m21 + t.m23 * e.m31 + t.m24 * e.m41, l = t.m21 * e.m12 + t.m22 * e.m22 + t.m23 * e.m32 + t.m24 * e.m42, c = t.m21 * e.m13 + t.m22 * e.m23 + t.m23 * e.m33 + t.m24 * e.m43, a = t.m21 * e.m14 + t.m22 * e.m24 + t.m23 * e.m34 + t.m24 * e.m44, u = t.m31 * e.m11 + t.m32 * e.m21 + t.m33 * e.m31 + t.m34 * e.m41, f = t.m31 * e.m12 + t.m32 * e.m22 + t.m33 * e.m32 + t.m34 * e.m42, h = t.m31 * e.m13 + t.m32 * e.m23 + t.m33 * e.m33 + t.m34 * e.m43, y = t.m31 * e.m14 + t.m32 * e.m24 + t.m33 * e.m34 + t.m34 * e.m44, m = t.m41 * e.m11 + t.m42 * e.m21 + t.m43 * e.m31 + t.m44 * e.m41, g = t.m41 * e.m12 + t.m42 * e.m22 + t.m43 * e.m32 + t.m44 * e.m42, d = t.m41 * e.m13 + t.m42 * e.m23 + t.m43 * e.m33 + t.m44 * e.m43, M = t.m41 * e.m14 + t.m42 * e.m24 + t.m43 * e.m34 + t.m44 * e.m44;
189
+ }, ce = (e) => At(e, 0), le = (e) => At(0, e), U = (e, t) => {
190
+ const s = t.m11 * e.m11 + t.m12 * e.m21 + t.m13 * e.m31 + t.m14 * e.m41, r = t.m11 * e.m12 + t.m12 * e.m22 + t.m13 * e.m32 + t.m14 * e.m42, n = t.m11 * e.m13 + t.m12 * e.m23 + t.m13 * e.m33 + t.m14 * e.m43, i = t.m11 * e.m14 + t.m12 * e.m24 + t.m13 * e.m34 + t.m14 * e.m44, o = t.m21 * e.m11 + t.m22 * e.m21 + t.m23 * e.m31 + t.m24 * e.m41, l = t.m21 * e.m12 + t.m22 * e.m22 + t.m23 * e.m32 + t.m24 * e.m42, c = t.m21 * e.m13 + t.m22 * e.m23 + t.m23 * e.m33 + t.m24 * e.m43, a = t.m21 * e.m14 + t.m22 * e.m24 + t.m23 * e.m34 + t.m24 * e.m44, u = t.m31 * e.m11 + t.m32 * e.m21 + t.m33 * e.m31 + t.m34 * e.m41, f = t.m31 * e.m12 + t.m32 * e.m22 + t.m33 * e.m32 + t.m34 * e.m42, h = t.m31 * e.m13 + t.m32 * e.m23 + t.m33 * e.m33 + t.m34 * e.m43, y = t.m31 * e.m14 + t.m32 * e.m24 + t.m33 * e.m34 + t.m34 * e.m44, m = t.m41 * e.m11 + t.m42 * e.m21 + t.m43 * e.m31 + t.m44 * e.m41, g = t.m41 * e.m12 + t.m42 * e.m22 + t.m43 * e.m32 + t.m44 * e.m42, A = t.m41 * e.m13 + t.m42 * e.m23 + t.m43 * e.m33 + t.m44 * e.m43, M = t.m41 * e.m14 + t.m42 * e.m24 + t.m43 * e.m34 + t.m44 * e.m44;
191
191
  return lt([
192
192
  s,
193
193
  r,
@@ -203,7 +203,7 @@ const Be = {
203
203
  y,
204
204
  m,
205
205
  g,
206
- d,
206
+ A,
207
207
  M
208
208
  ]);
209
209
  };
@@ -312,7 +312,7 @@ class C {
312
312
  * @return The resulted matrix.
313
313
  */
314
314
  multiply(t) {
315
- return _(this, t);
315
+ return U(this, t);
316
316
  }
317
317
  /**
318
318
  * The translate method returns a new matrix which is this matrix post
@@ -328,7 +328,7 @@ class C {
328
328
  translate(t, s, r) {
329
329
  const n = t;
330
330
  let i = s, o = r;
331
- return typeof i > "u" && (i = 0), typeof o > "u" && (o = 0), _(this, se(n, i, o));
331
+ return typeof i > "u" && (i = 0), typeof o > "u" && (o = 0), U(this, se(n, i, o));
332
332
  }
333
333
  /**
334
334
  * The scale method returns a new matrix which is this matrix post multiplied by
@@ -344,7 +344,7 @@ class C {
344
344
  scale(t, s, r) {
345
345
  const n = t;
346
346
  let i = s, o = r;
347
- return typeof i > "u" && (i = t), typeof o > "u" && (o = 1), _(this, oe(n, i, o));
347
+ return typeof i > "u" && (i = t), typeof o > "u" && (o = 1), U(this, oe(n, i, o));
348
348
  }
349
349
  /**
350
350
  * The rotate method returns a new matrix which is this matrix post multiplied
@@ -360,7 +360,7 @@ class C {
360
360
  */
361
361
  rotate(t, s, r) {
362
362
  let n = t, i = s || 0, o = r || 0;
363
- return typeof t == "number" && typeof s > "u" && typeof r > "u" && (o = n, n = 0, i = 0), _(this, re(n, i, o));
363
+ return typeof t == "number" && typeof s > "u" && typeof r > "u" && (o = n, n = 0, i = 0), U(this, re(n, i, o));
364
364
  }
365
365
  /**
366
366
  * The rotateAxisAngle method returns a new matrix which is this matrix post
@@ -377,7 +377,7 @@ class C {
377
377
  rotateAxisAngle(t, s, r, n) {
378
378
  if ([t, s, r, n].some((i) => Number.isNaN(+i)))
379
379
  throw new TypeError("CSSMatrix: expecting 4 values");
380
- return _(this, ie(t, s, r, n));
380
+ return U(this, ie(t, s, r, n));
381
381
  }
382
382
  /**
383
383
  * Specifies a skew transformation along the `x-axis` by the given angle.
@@ -387,7 +387,7 @@ class C {
387
387
  * @return The resulted matrix
388
388
  */
389
389
  skewX(t) {
390
- return _(this, ce(t));
390
+ return U(this, ce(t));
391
391
  }
392
392
  /**
393
393
  * Specifies a skew transformation along the `y-axis` by the given angle.
@@ -397,7 +397,7 @@ class C {
397
397
  * @return The resulted matrix
398
398
  */
399
399
  skewY(t) {
400
- return _(this, le(t));
400
+ return U(this, le(t));
401
401
  }
402
402
  /**
403
403
  * Specifies a skew transformation along both the `x-axis` and `y-axis`.
@@ -408,7 +408,7 @@ class C {
408
408
  * @return The resulted matrix
409
409
  */
410
410
  skew(t, s) {
411
- return _(this, At(t, s));
411
+ return U(this, At(t, s));
412
412
  }
413
413
  /**
414
414
  * Transforms a specified vector using the matrix, returning a new
@@ -431,7 +431,7 @@ class C {
431
431
  };
432
432
  }
433
433
  }
434
- j(C, "Translate", se), j(C, "Rotate", re), j(C, "RotateAxisAngle", ie), j(C, "Scale", oe), j(C, "SkewX", ce), j(C, "SkewY", le), j(C, "Skew", At), j(C, "Multiply", _), j(C, "fromArray", lt), j(C, "fromMatrix", ee), j(C, "fromString", ne), j(C, "toArray", zt), j(C, "isCompatibleArray", Gt), j(C, "isCompatibleObject", te);
434
+ S(C, "Translate", se), S(C, "Rotate", re), S(C, "RotateAxisAngle", ie), S(C, "Scale", oe), S(C, "SkewX", ce), S(C, "SkewY", le), S(C, "Skew", At), S(C, "Multiply", U), S(C, "fromArray", lt), S(C, "fromMatrix", ee), S(C, "fromString", ne), S(C, "toArray", zt), S(C, "isCompatibleArray", Gt), S(C, "isCompatibleObject", te);
435
435
  const V = {
436
436
  origin: [0, 0, 0],
437
437
  round: 4
@@ -460,7 +460,7 @@ const V = {
460
460
  )
461
461
  ), !!tt[s]); )
462
462
  ;
463
- }, S = "SVGPathCommander Error", ae = (e) => {
463
+ }, Z = "SVGPathCommander Error", ae = (e) => {
464
464
  const { index: t, pathValue: s } = e, r = s.charCodeAt(t);
465
465
  if (r === 48) {
466
466
  e.param = 0, e.index += 1;
@@ -470,42 +470,42 @@ const V = {
470
470
  e.param = 1, e.index += 1;
471
471
  return;
472
472
  }
473
- e.err = `${S}: invalid Arc flag "${s[t]}", expecting 0 or 1 at index ${t}`;
474
- }, U = (e) => e >= 48 && e <= 57, J = "Invalid path value", ue = (e) => {
473
+ e.err = `${Z}: invalid Arc flag "${s[t]}", expecting 0 or 1 at index ${t}`;
474
+ }, J = (e) => e >= 48 && e <= 57, K = "Invalid path value", ue = (e) => {
475
475
  const { max: t, pathValue: s, index: r } = e;
476
476
  let n = r, i = !1, o = !1, l = !1, c = !1, a;
477
477
  if (n >= t) {
478
- e.err = `${S}: ${J} at index ${n}, "pathValue" is missing param`;
478
+ e.err = `${Z}: ${K} at index ${n}, "pathValue" is missing param`;
479
479
  return;
480
480
  }
481
- if (a = s.charCodeAt(n), (a === 43 || a === 45) && (n += 1, a = s.charCodeAt(n)), !U(a) && a !== 46) {
482
- e.err = `${S}: ${J} at index ${n}, "${s[n]}" is not a number`;
481
+ if (a = s.charCodeAt(n), (a === 43 || a === 45) && (n += 1, a = s.charCodeAt(n)), !J(a) && a !== 46) {
482
+ e.err = `${Z}: ${K} at index ${n}, "${s[n]}" is not a number`;
483
483
  return;
484
484
  }
485
485
  if (a !== 46) {
486
- if (i = a === 48, n += 1, a = s.charCodeAt(n), i && n < t && a && U(a)) {
487
- e.err = `${S}: ${J} at index ${r}, "${s[r]}" illegal number`;
486
+ if (i = a === 48, n += 1, a = s.charCodeAt(n), i && n < t && a && J(a)) {
487
+ e.err = `${Z}: ${K} at index ${r}, "${s[r]}" illegal number`;
488
488
  return;
489
489
  }
490
- for (; n < t && U(s.charCodeAt(n)); )
490
+ for (; n < t && J(s.charCodeAt(n)); )
491
491
  n += 1, o = !0;
492
492
  a = s.charCodeAt(n);
493
493
  }
494
494
  if (a === 46) {
495
- for (c = !0, n += 1; U(s.charCodeAt(n)); )
495
+ for (c = !0, n += 1; J(s.charCodeAt(n)); )
496
496
  n += 1, l = !0;
497
497
  a = s.charCodeAt(n);
498
498
  }
499
499
  if (a === 101 || a === 69) {
500
500
  if (c && !o && !l) {
501
- e.err = `${S}: ${J} at index ${n}, "${s[n]}" invalid float exponent`;
501
+ e.err = `${Z}: ${K} at index ${n}, "${s[n]}" invalid float exponent`;
502
502
  return;
503
503
  }
504
- if (n += 1, a = s.charCodeAt(n), (a === 43 || a === 45) && (n += 1), n < t && U(s.charCodeAt(n)))
505
- for (; n < t && U(s.charCodeAt(n)); )
504
+ if (n += 1, a = s.charCodeAt(n), (a === 43 || a === 45) && (n += 1), n < t && J(s.charCodeAt(n)))
505
+ for (; n < t && J(s.charCodeAt(n)); )
506
506
  n += 1;
507
507
  else {
508
- e.err = `${S}: ${J} at index ${n}, "${s[n]}" invalid integer exponent`;
508
+ e.err = `${Z}: ${K} at index ${n}, "${s[n]}" invalid integer exponent`;
509
509
  return;
510
510
  }
511
511
  }
@@ -560,7 +560,7 @@ const V = {
560
560
  default:
561
561
  return !1;
562
562
  }
563
- }, he = (e) => U(e) || e === 43 || e === 45 || e === 46, ye = (e) => (e | 32) === 97, ge = (e) => {
563
+ }, he = (e) => J(e) || e === 43 || e === 45 || e === 46, ye = (e) => (e | 32) === 97, ge = (e) => {
564
564
  switch (e | 32) {
565
565
  case 109:
566
566
  case 77:
@@ -572,12 +572,12 @@ const V = {
572
572
  var c;
573
573
  const { max: t, pathValue: s, index: r, segments: n } = e, i = s.charCodeAt(r), o = tt[s[r].toLowerCase()];
574
574
  if (e.segmentStart = r, !fe(i)) {
575
- e.err = `${S}: ${J} "${s[r]}" is not a path command at index ${r}`;
575
+ e.err = `${Z}: ${K} "${s[r]}" is not a path command at index ${r}`;
576
576
  return;
577
577
  }
578
578
  const l = n[n.length - 1];
579
579
  if (!ge(i) && ((c = l == null ? void 0 : l[0]) == null ? void 0 : c.toLocaleLowerCase()) === "z") {
580
- e.err = `${S}: ${J} "${s[r]}" is not a MoveTo path command at index ${r}`;
580
+ e.err = `${Z}: ${K} "${s[r]}" is not a MoveTo path command at index ${r}`;
581
581
  return;
582
582
  }
583
583
  if (e.index += 1, et(e), e.data = [], !o) {
@@ -600,13 +600,15 @@ class Ot {
600
600
  this.segments = [], this.pathValue = t, this.max = t.length, this.index = 0, this.param = 0, this.segmentStart = 0, this.data = [], this.err = "";
601
601
  }
602
602
  }
603
- const Q = (e) => {
603
+ const D = (e) => {
604
604
  if (typeof e != "string")
605
605
  return e.slice(0);
606
606
  const t = new Ot(e);
607
607
  for (et(t); t.index < t.max && !t.err.length; )
608
608
  Dt(t);
609
- if (t != null && t.err.length)
609
+ if (!t.err.length)
610
+ t.segments.length && (t.segments[0][0] = "M");
611
+ else
610
612
  throw TypeError(t.err);
611
613
  return t.segments;
612
614
  }, at = (e, t, s, r) => {
@@ -639,7 +641,7 @@ const Q = (e) => {
639
641
  l.push(e[a] + (a % 2 ? s : r));
640
642
  return [i].concat(l);
641
643
  }
642
- }, Z = (e, t) => {
644
+ }, O = (e, t) => {
643
645
  let s = e.length, r, n = "M", i = "M", o = !1, l = 0, c = 0, a = 0, u = 0, f = 0;
644
646
  for (let h = 0; h < s; h += 1) {
645
647
  r = e[h], [n] = r, f = r.length, i = n.toUpperCase(), o = i !== n;
@@ -650,8 +652,8 @@ const Q = (e) => {
650
652
  }
651
653
  return e;
652
654
  }, ht = (e) => {
653
- const t = Q(e);
654
- return Z(t, at);
655
+ const t = D(e);
656
+ return O(t, at);
655
657
  }, Bt = (e, t, s, r) => {
656
658
  const [n] = e, i = n.toLowerCase();
657
659
  if (t === 0 || n === i) return e;
@@ -683,48 +685,48 @@ const Q = (e) => {
683
685
  return [i].concat(l);
684
686
  }
685
687
  }, Kt = (e) => {
686
- const t = Q(e);
687
- return Z(t, Bt);
688
+ const t = D(e);
689
+ return O(t, Bt);
688
690
  }, st = (e, t, s) => {
689
691
  const { sin: r, cos: n } = Math, i = e * n(s) - t * r(s), o = e * r(s) + t * n(s);
690
692
  return { x: i, y: o };
691
693
  }, Mt = (e, t, s, r, n, i, o, l, c, a) => {
692
694
  let u = e, f = t, h = s, y = r, m = l, g = c;
693
- const d = Math.PI * 120 / 180, M = Math.PI / 180 * (+n || 0);
694
- let w = [], x, p, L, T, I;
695
+ const A = Math.PI * 120 / 180, M = Math.PI / 180 * (+n || 0);
696
+ let N = [], x, p, w, T, k;
695
697
  if (a)
696
- [p, L, T, I] = a;
698
+ [p, w, T, k] = a;
697
699
  else {
698
700
  x = st(u, f, -M), u = x.x, f = x.y, x = st(m, g, -M), m = x.x, g = x.y;
699
- const v = (u - m) / 2, O = (f - g) / 2;
700
- let X = v * v / (h * h) + O * O / (y * y);
701
- X > 1 && (X = Math.sqrt(X), h *= X, y *= X);
702
- const Ct = h * h, $t = y * y, Jt = (i === o ? -1 : 1) * Math.sqrt(
701
+ const $ = (u - m) / 2, j = (f - g) / 2;
702
+ let q = $ * $ / (h * h) + j * j / (y * y);
703
+ q > 1 && (q = Math.sqrt(q), h *= q, y *= q);
704
+ const vt = h * h, $t = y * y, Jt = (i === o ? -1 : 1) * Math.sqrt(
703
705
  Math.abs(
704
- (Ct * $t - Ct * O * O - $t * v * v) / (Ct * O * O + $t * v * v)
706
+ (vt * $t - vt * j * j - $t * $ * $) / (vt * j * j + $t * $ * $)
705
707
  )
706
708
  );
707
- T = Jt * h * O / y + (u + m) / 2, I = Jt * -y * v / h + (f + g) / 2, p = Math.asin(((f - I) / y * 10 ** 9 >> 0) / 10 ** 9), L = Math.asin(((g - I) / y * 10 ** 9 >> 0) / 10 ** 9), p = u < T ? Math.PI - p : p, L = m < T ? Math.PI - L : L, p < 0 && (p = Math.PI * 2 + p), L < 0 && (L = Math.PI * 2 + L), o && p > L && (p -= Math.PI * 2), !o && L > p && (L -= Math.PI * 2);
708
- }
709
- let R = L - p;
710
- if (Math.abs(R) > d) {
711
- const v = L, O = m, X = g;
712
- L = p + d * (o && L > p ? 1 : -1), m = T + h * Math.cos(L), g = I + y * Math.sin(L), w = Mt(m, g, h, y, n, 0, o, O, X, [
713
- L,
714
- v,
709
+ T = Jt * h * j / y + (u + m) / 2, k = Jt * -y * $ / h + (f + g) / 2, p = Math.asin(((f - k) / y * 10 ** 9 >> 0) / 10 ** 9), w = Math.asin(((g - k) / y * 10 ** 9 >> 0) / 10 ** 9), p = u < T ? Math.PI - p : p, w = m < T ? Math.PI - w : w, p < 0 && (p = Math.PI * 2 + p), w < 0 && (w = Math.PI * 2 + w), o && p > w && (p -= Math.PI * 2), !o && w > p && (w -= Math.PI * 2);
710
+ }
711
+ let I = w - p;
712
+ if (Math.abs(I) > A) {
713
+ const $ = w, j = m, q = g;
714
+ w = p + A * (o && w > p ? 1 : -1), m = T + h * Math.cos(w), g = k + y * Math.sin(w), N = Mt(m, g, h, y, n, 0, o, j, q, [
715
+ w,
716
+ $,
715
717
  T,
716
- I
718
+ k
717
719
  ]);
718
720
  }
719
- R = L - p;
720
- const P = Math.cos(p), z = Math.sin(p), D = Math.cos(L), K = Math.sin(L), q = Math.tan(R / 4), N = 4 / 3 * h * q, $ = 4 / 3 * y * q, E = [u, f], B = [u + N * z, f - $ * P], F = [m + N * K, g - $ * D], G = [m, g];
721
- if (B[0] = 2 * E[0] - B[0], B[1] = 2 * E[1] - B[1], a)
722
- return [B[0], B[1], F[0], F[1], G[0], G[1]].concat(w);
723
- w = [B[0], B[1], F[0], F[1], G[0], G[1]].concat(w);
724
- const W = [];
725
- for (let v = 0, O = w.length; v < O; v += 1)
726
- W[v] = v % 2 ? st(w[v - 1], w[v], M).y : st(w[v], w[v + 1], M).x;
727
- return W;
721
+ I = w - p;
722
+ const z = Math.cos(p), v = Math.sin(p), B = Math.cos(w), W = Math.sin(w), E = Math.tan(I / 4), L = 4 / 3 * h * E, R = 4 / 3 * y * E, H = [u, f], Q = [u + L * v, f - R * z], _ = [m + L * W, g - R * B], G = [m, g];
723
+ if (Q[0] = 2 * H[0] - Q[0], Q[1] = 2 * H[1] - Q[1], a)
724
+ return [Q[0], Q[1], _[0], _[1], G[0], G[1]].concat(N);
725
+ N = [Q[0], Q[1], _[0], _[1], G[0], G[1]].concat(N);
726
+ const X = [];
727
+ for (let $ = 0, j = N.length; $ < j; $ += 1)
728
+ X[$] = $ % 2 ? st(N[$ - 1], N[$], M).y : st(N[$], N[$ + 1], M).x;
729
+ return X;
728
730
  }, xe = (e, t, s, r, n, i) => {
729
731
  const o = 0.3333333333333333, l = 2 / 3;
730
732
  return [
@@ -740,11 +742,11 @@ const Q = (e) => {
740
742
  i
741
743
  // x,y
742
744
  ];
743
- }, H = (e, t, s) => {
745
+ }, F = (e, t, s) => {
744
746
  const [r, n] = e, [i, o] = t;
745
747
  return [r + (i - r) * s, n + (o - n) * s];
746
748
  }, Pt = (e, t, s, r) => {
747
- const n = H([e, t], [s, r], 0.3333333333333333), i = H([e, t], [s, r], 2 / 3);
749
+ const n = F([e, t], [s, r], 0.3333333333333333), i = F([e, t], [s, r], 2 / 3);
748
750
  return [n[0], n[1], i[0], i[1], s, r];
749
751
  }, pe = (e, t) => {
750
752
  const [s] = e, r = e.slice(1).map(Number), [n, i] = r, { x1: o, y1: l, x: c, y: a } = t;
@@ -829,8 +831,8 @@ const Q = (e) => {
829
831
  qx: null,
830
832
  qy: null
831
833
  }, yt = (e) => {
832
- const t = { ...ut }, s = Q(e);
833
- return Z(s, (r, n, i, o) => {
834
+ const t = { ...ut }, s = D(e);
835
+ return O(s, (r, n, i, o) => {
834
836
  t.x = i, t.y = o;
835
837
  const l = Nt(r, t);
836
838
  let c = pe(l, t);
@@ -842,7 +844,7 @@ const Q = (e) => {
842
844
  const u = c.length;
843
845
  return t.x1 = +c[u - 2], t.y1 = +c[u - 1], t.x2 = +c[u - 4] || t.x1, t.y2 = +c[u - 3] || t.y1, c;
844
846
  });
845
- }, k = (e, t) => {
847
+ }, P = (e, t) => {
846
848
  const s = t >= 1 ? 10 ** t : 1;
847
849
  return t > 0 ? Math.round(e * s) / s : Math.round(e);
848
850
  }, kt = (e, t) => {
@@ -861,7 +863,7 @@ const Q = (e) => {
861
863
  let a = 0;
862
864
  const u = c.length;
863
865
  for (; a < u; )
864
- i += k(c[a], r), a !== u - 1 && (i += " "), a += 1;
866
+ i += P(c[a], r), a !== u - 1 && (i += " "), a += 1;
865
867
  }
866
868
  }
867
869
  return i;
@@ -876,7 +878,7 @@ const Q = (e) => {
876
878
  else if (n >= o)
877
879
  i = { x: s, y: r };
878
880
  else {
879
- const [l, c] = H([e, t], [s, r], n / o);
881
+ const [l, c] = F([e, t], [s, r], n / o);
880
882
  i = { x: l, y: c };
881
883
  }
882
884
  }
@@ -913,34 +915,34 @@ const Q = (e) => {
913
915
  endAngle: 0,
914
916
  center: { x: (l + e) / 2, y: (c + t) / 2 }
915
917
  };
916
- const w = (e - l) / 2, x = (t - c) / 2, p = {
917
- x: f(M) * w + u(M) * x,
918
- y: -u(M) * w + f(M) * x
919
- }, L = p.x ** 2 / m ** 2 + p.y ** 2 / g ** 2;
920
- L > 1 && (m *= h(L), g *= h(L));
921
- const T = m ** 2 * g ** 2 - m ** 2 * p.y ** 2 - g ** 2 * p.x ** 2, I = m ** 2 * p.y ** 2 + g ** 2 * p.x ** 2;
922
- let R = T / I;
923
- R = R < 0 ? 0 : R;
924
- const P = (i !== o ? 1 : -1) * h(R), z = {
925
- x: P * (m * p.y / g),
926
- y: P * (-(g * p.x) / m)
927
- }, D = {
928
- x: f(M) * z.x - u(M) * z.y + (e + l) / 2,
929
- y: u(M) * z.x + f(M) * z.y + (t + c) / 2
930
- }, K = {
931
- x: (p.x - z.x) / m,
932
- y: (p.y - z.y) / g
933
- }, q = Et({ x: 1, y: 0 }, K), N = {
934
- x: (-p.x - z.x) / m,
935
- y: (-p.y - z.y) / g
918
+ const N = (e - l) / 2, x = (t - c) / 2, p = {
919
+ x: f(M) * N + u(M) * x,
920
+ y: -u(M) * N + f(M) * x
921
+ }, w = p.x ** 2 / m ** 2 + p.y ** 2 / g ** 2;
922
+ w > 1 && (m *= h(w), g *= h(w));
923
+ const T = m ** 2 * g ** 2 - m ** 2 * p.y ** 2 - g ** 2 * p.x ** 2, k = m ** 2 * p.y ** 2 + g ** 2 * p.x ** 2;
924
+ let I = T / k;
925
+ I = I < 0 ? 0 : I;
926
+ const z = (i !== o ? 1 : -1) * h(I), v = {
927
+ x: z * (m * p.y / g),
928
+ y: z * (-(g * p.x) / m)
929
+ }, B = {
930
+ x: f(M) * v.x - u(M) * v.y + (e + l) / 2,
931
+ y: u(M) * v.x + f(M) * v.y + (t + c) / 2
932
+ }, W = {
933
+ x: (p.x - v.x) / m,
934
+ y: (p.y - v.y) / g
935
+ }, E = Et({ x: 1, y: 0 }, W), L = {
936
+ x: (-p.x - v.x) / m,
937
+ y: (-p.y - v.y) / g
936
938
  };
937
- let $ = Et(K, N);
938
- !o && $ > 0 ? $ -= 2 * y : o && $ < 0 && ($ += 2 * y), $ %= 2 * y;
939
- const E = q + $;
939
+ let R = Et(W, L);
940
+ !o && R > 0 ? R -= 2 * y : o && R < 0 && (R += 2 * y), R %= 2 * y;
941
+ const H = E + R;
940
942
  return {
941
- center: D,
942
- startAngle: q,
943
- endAngle: E,
943
+ center: B,
944
+ startAngle: E,
945
+ endAngle: H,
944
946
  rx: m,
945
947
  ry: g
946
948
  };
@@ -971,20 +973,20 @@ const Q = (e) => {
971
973
  c
972
974
  );
973
975
  if (typeof a == "number") {
974
- const d = Ft(h, y, g - m);
976
+ const A = Ft(h, y, g - m);
975
977
  if (a <= 0)
976
978
  u = { x: e, y: t };
977
- else if (a >= d)
979
+ else if (a >= A)
978
980
  u = { x: l, y: c };
979
981
  else {
980
982
  if (e === l && t === c)
981
983
  return { x: l, y: c };
982
984
  if (h === 0 || y === 0)
983
985
  return Ht(e, t, l, c, a);
984
- const { PI: M, cos: w, sin: x } = Math, p = g - m, T = (n % 360 + 360) % 360 * (M / 180), I = m + p * (a / d), R = h * w(I), P = y * x(I);
986
+ const { PI: M, cos: N, sin: x } = Math, p = g - m, T = (n % 360 + 360) % 360 * (M / 180), k = m + p * (a / A), I = h * N(k), z = y * x(k);
985
987
  u = {
986
- x: w(T) * R - x(T) * P + f.x,
987
- y: x(T) * R + w(T) * P + f.y
988
+ x: N(T) * I - x(T) * z + f.x,
989
+ y: x(T) * I + N(T) * z + f.y
988
990
  };
989
991
  }
990
992
  }
@@ -1000,26 +1002,26 @@ const Q = (e) => {
1000
1002
  o,
1001
1003
  l,
1002
1004
  c
1003
- ), m = y - h, { min: g, max: d, tan: M, atan2: w, PI: x } = Math, { x: p, y: L } = a, T = n * x / 180, I = M(T), R = w(-f * I, u), P = R, z = R + x, D = w(f, u * I), K = D + x;
1004
- let q = g(e, l), N = d(e, l), $ = g(t, c), E = d(t, c);
1005
- const B = y - m * 1e-3, F = Y(p, L, u, f, T, B), G = y - m * 0.999, W = Y(p, L, u, f, T, G);
1006
- if (F[0] > N || W[0] > N) {
1007
- const v = Y(p, L, u, f, T, P);
1008
- q = g(q, v[0]), $ = g($, v[1]), N = d(N, v[0]), E = d(E, v[1]);
1009
- }
1010
- if (F[0] < q || W[0] < q) {
1011
- const v = Y(p, L, u, f, T, z);
1012
- q = g(q, v[0]), $ = g($, v[1]), N = d(N, v[0]), E = d(E, v[1]);
1013
- }
1014
- if (F[1] < $ || W[1] < $) {
1015
- const v = Y(p, L, u, f, T, K);
1016
- q = g(q, v[0]), $ = g($, v[1]), N = d(N, v[0]), E = d(E, v[1]);
1017
- }
1018
- if (F[1] > E || W[1] > E) {
1019
- const v = Y(p, L, u, f, T, D);
1020
- q = g(q, v[0]), $ = g($, v[1]), N = d(N, v[0]), E = d(E, v[1]);
1021
- }
1022
- return [q, $, N, E];
1005
+ ), m = y - h, { min: g, max: A, tan: M, atan2: N, PI: x } = Math, { x: p, y: w } = a, T = n * x / 180, k = M(T), I = N(-f * k, u), z = I, v = I + x, B = N(f, u * k), W = B + x, E = [l], L = [c];
1006
+ let R = g(e, l), H = A(e, l), Q = g(t, c), _ = A(t, c);
1007
+ const G = y - m * 1e-5, X = Y(p, w, u, f, T, G), $ = y - m * 0.99999, j = Y(p, w, u, f, T, $);
1008
+ if (X[0] > H || j[0] > H) {
1009
+ const q = Y(p, w, u, f, T, z);
1010
+ E.push(q[0]), L.push(q[1]);
1011
+ }
1012
+ if (X[0] < R || j[0] < R) {
1013
+ const q = Y(p, w, u, f, T, v);
1014
+ E.push(q[0]), L.push(q[1]);
1015
+ }
1016
+ if (X[1] < Q || j[1] < Q) {
1017
+ const q = Y(p, w, u, f, T, W);
1018
+ E.push(q[0]), L.push(q[1]);
1019
+ }
1020
+ if (X[1] > _ || j[1] > _) {
1021
+ const q = Y(p, w, u, f, T, B);
1022
+ E.push(q[0]), L.push(q[1]);
1023
+ }
1024
+ return R = g.apply([], E), Q = g.apply([], L), H = A.apply([], E), _ = A.apply([], L), [R, Q, H, _];
1023
1025
  }, He = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1024
1026
  __proto__: null,
1025
1027
  angleBetween: Et,
@@ -1133,7 +1135,7 @@ const Q = (e) => {
1133
1135
  });
1134
1136
  const s = Me(t);
1135
1137
  return Le((r) => Ne(s[0], r));
1136
- }, ve = 1e-8, gt = ([e, t, s]) => {
1138
+ }, Te = 1e-8, gt = ([e, t, s]) => {
1137
1139
  const r = Math.min(e, s), n = Math.max(e, s);
1138
1140
  if (t >= e ? s >= t : s <= t)
1139
1141
  return [r, n];
@@ -1141,7 +1143,7 @@ const Q = (e) => {
1141
1143
  return i < r ? [i, n] : [r, i];
1142
1144
  }, jt = ([e, t, s, r]) => {
1143
1145
  const n = e - 3 * t + 3 * s - r;
1144
- if (Math.abs(n) < ve)
1146
+ if (Math.abs(n) < Te)
1145
1147
  return e === r && e === t ? [e, r] : gt([e, -0.5 * e + 1.5 * t, e - 3 * t + 3 * s]);
1146
1148
  const i = -e * s + e * r - t * s - t * r + t * t + s * s;
1147
1149
  if (i <= 0)
@@ -1155,18 +1157,18 @@ const Q = (e) => {
1155
1157
  h < l && (l = h), h > c && (c = h);
1156
1158
  }
1157
1159
  return [l, c];
1158
- }, Te = ([e, t, s, r, n, i, o, l], c) => {
1160
+ }, Ce = ([e, t, s, r, n, i, o, l], c) => {
1159
1161
  const a = 1 - c;
1160
1162
  return {
1161
1163
  x: a ** 3 * e + 3 * a ** 2 * c * s + 3 * a * c ** 2 * n + c ** 3 * o,
1162
1164
  y: a ** 3 * t + 3 * a ** 2 * c * r + 3 * a * c ** 2 * i + c ** 3 * l
1163
1165
  };
1164
- }, xt = (e, t, s, r, n, i, o, l) => mt([e, t, s, r, n, i, o, l]), Ce = (e, t, s, r, n, i, o, l, c) => {
1166
+ }, xt = (e, t, s, r, n, i, o, l) => mt([e, t, s, r, n, i, o, l]), ve = (e, t, s, r, n, i, o, l, c) => {
1165
1167
  const a = typeof c == "number";
1166
1168
  let u = { x: e, y: t };
1167
1169
  if (a) {
1168
1170
  const f = mt([e, t, s, r, n, i, o, l]);
1169
- c <= 0 || (c >= f ? u = { x: o, y: l } : u = Te(
1171
+ c <= 0 || (c >= f ? u = { x: o, y: l } : u = Ce(
1170
1172
  [e, t, s, r, n, i, o, l],
1171
1173
  c / f
1172
1174
  ));
@@ -1202,8 +1204,8 @@ const Q = (e) => {
1202
1204
  r = n, n = e[s], i += r[1] * n[0] - r[0] * n[1];
1203
1205
  return i / 2;
1204
1206
  }, _e = (e) => e.reduce((t, s, r) => r ? t + wt(e[r - 1], s) : 0, 0), bt = 1e-5, ot = (e) => {
1205
- const t = Q(e), s = { ...ut };
1206
- return Z(t, (r, n, i, o) => {
1207
+ const t = D(e), s = { ...ut };
1208
+ return O(t, (r, n, i, o) => {
1207
1209
  s.x = i, s.y = o;
1208
1210
  const l = Nt(r, s), c = l.length;
1209
1211
  return s.x1 = +l[c - 2], s.y1 = +l[c - 1], s.x2 = +l[c - 4] || s.x1, s.y2 = +l[c - 3] || s.y1, l;
@@ -1213,8 +1215,8 @@ const Q = (e) => {
1213
1215
  let r = !1, n = [], i = "M", o = 0, l = 0, [c, a] = s[0].slice(1);
1214
1216
  const u = typeof t == "number";
1215
1217
  let f = { x: c, y: a }, h = 0, y = f, m = 0;
1216
- return !u || t < bt ? f : (Z(s, (g, d, M, w) => {
1217
- if ([i] = g, r = i === "M", n = r ? n : [M, w].concat(g.slice(1)), r ? ([, c, a] = g, f = { x: c, y: a }, h = 0) : i === "L" ? (f = Ht(
1218
+ return !u || t < bt ? f : (O(s, (g, A, M, N) => {
1219
+ if ([i] = g, r = i === "M", n = r ? n : [M, N].concat(g.slice(1)), r ? ([, c, a] = g, f = { x: c, y: a }, h = 0) : i === "L" ? (f = Ht(
1218
1220
  n[0],
1219
1221
  n[1],
1220
1222
  n[2],
@@ -1241,7 +1243,7 @@ const Q = (e) => {
1241
1243
  n[6],
1242
1244
  n[7],
1243
1245
  n[8]
1244
- )) : i === "C" ? (f = Ce(
1246
+ )) : i === "C" ? (f = ve(
1245
1247
  n[0],
1246
1248
  n[1],
1247
1249
  n[2],
@@ -1275,19 +1277,19 @@ const Q = (e) => {
1275
1277
  n[3],
1276
1278
  n[4],
1277
1279
  n[5]
1278
- )) : i === "Z" && (n = [M, w, c, a], f = { x: c, y: a }, h = it(n[0], n[1], n[2], n[3])), [o, l] = n.slice(-2), m < t)
1280
+ )) : i === "Z" && (n = [M, N, c, a], f = { x: c, y: a }, h = it(n[0], n[1], n[2], n[3])), [o, l] = n.slice(-2), m < t)
1279
1281
  y = f;
1280
1282
  else
1281
1283
  return !1;
1282
1284
  m += h;
1283
1285
  }), t > m - bt ? { x: o, y: l } : y);
1284
1286
  }, nt = (e) => {
1285
- const t = Q(e);
1287
+ const t = D(e);
1286
1288
  let s = 0, r = 0, n = 0, i = 0, o = 0, l = 0, c = "M", a = 0, u = 0, f = 0;
1287
- return Z(t, (h, y, m, g) => {
1289
+ return O(t, (h, y, m, g) => {
1288
1290
  [c] = h;
1289
- const d = c.toUpperCase(), w = d !== c ? at(h, y, m, g) : h.slice(0), x = d === "V" ? ["L", m, w[1]] : d === "H" ? ["L", w[1], g] : w;
1290
- if ([c] = x, "TQ".includes(d) || (o = 0, l = 0), c === "M")
1291
+ const A = c.toUpperCase(), N = A !== c ? at(h, y, m, g) : h.slice(0), x = A === "V" ? ["L", m, N[1]] : A === "H" ? ["L", N[1], g] : N;
1292
+ if ([c] = x, "TQ".includes(A) || (o = 0, l = 0), c === "M")
1291
1293
  [, a, u] = x;
1292
1294
  else if (c === "L")
1293
1295
  f += it(
@@ -1309,12 +1311,12 @@ const Q = (e) => {
1309
1311
  x[7]
1310
1312
  );
1311
1313
  else if (c === "S") {
1312
- const p = s * 2 - n, L = r * 2 - i;
1314
+ const p = s * 2 - n, w = r * 2 - i;
1313
1315
  f += xt(
1314
1316
  m,
1315
1317
  g,
1316
1318
  p,
1317
- L,
1319
+ w,
1318
1320
  x[1],
1319
1321
  x[2],
1320
1322
  x[3],
@@ -1347,7 +1349,7 @@ const Q = (e) => {
1347
1349
  [s, r] = c === "Z" ? [a, u] : x.slice(-2), [n, i] = c === "C" ? [x[3], x[4]] : c === "S" ? [x[1], x[2]] : [s, r];
1348
1350
  }), f;
1349
1351
  }, Ut = (e, t) => {
1350
- const s = Q(e);
1352
+ const s = D(e);
1351
1353
  let r = s.slice(0), n = nt(r), i = r.length - 1, o = 0, l = 0, c = s[0];
1352
1354
  if (i <= 0 || !t || !Number.isFinite(t))
1353
1355
  return {
@@ -1374,21 +1376,21 @@ const Q = (e) => {
1374
1376
  return a.find(
1375
1377
  ({ lengthAtSegment: u }) => u <= t
1376
1378
  );
1377
- }, vt = (e, t) => {
1378
- const s = Q(e), r = ot(s), n = nt(r), i = (p) => {
1379
- const L = p.x - t.x, T = p.y - t.y;
1380
- return L * L + T * T;
1379
+ }, Tt = (e, t) => {
1380
+ const s = D(e), r = ot(s), n = nt(r), i = (p) => {
1381
+ const w = p.x - t.x, T = p.y - t.y;
1382
+ return w * w + T * T;
1381
1383
  };
1382
1384
  let o = 8, l, c = { x: 0, y: 0 }, a = 0, u = 0, f = 1 / 0;
1383
1385
  for (let p = 0; p <= n; p += o)
1384
1386
  l = rt(r, p), a = i(l), a < f && (c = l, u = p, f = a);
1385
1387
  o /= 2;
1386
- let h, y, m = 0, g = 0, d = 0, M = 0;
1387
- for (; o > 1e-6 && (m = u - o, h = rt(r, m), d = i(h), g = u + o, y = rt(r, g), M = i(y), m >= 0 && d < f ? (c = h, u = m, f = d) : g <= n && M < f ? (c = y, u = g, f = M) : o /= 2, !(o < 1e-5)); )
1388
+ let h, y, m = 0, g = 0, A = 0, M = 0;
1389
+ for (; o > 1e-6 && (m = u - o, h = rt(r, m), A = i(h), g = u + o, y = rt(r, g), M = i(y), m >= 0 && A < f ? (c = h, u = m, f = A) : g <= n && M < f ? (c = y, u = g, f = M) : o /= 2, !(o < 1e-5)); )
1388
1390
  ;
1389
- const w = Ut(s, u), x = Math.sqrt(f);
1390
- return { closest: c, distance: x, segment: w };
1391
- }, Ue = (e, t) => vt(e, t).closest, Je = (e, t, s, r, n, i, o, l) => 3 * ((l - t) * (s + n) - (o - e) * (r + i) + r * (e - n) - s * (t - i) + l * (n + e / 3) - o * (i + t / 3)) / 20, qe = (e) => {
1391
+ const N = Ut(s, u), x = Math.sqrt(f);
1392
+ return { closest: c, distance: x, segment: N };
1393
+ }, Ue = (e, t) => Tt(e, t).closest, Je = (e, t, s, r, n, i, o, l) => 3 * ((l - t) * (s + n) - (o - e) * (r + i) + r * (e - n) - s * (t - i) + l * (n + e / 3) - o * (i + t / 3)) / 20, qe = (e) => {
1392
1394
  let t = 0, s = 0, r = 0;
1393
1395
  return yt(e).map((n) => {
1394
1396
  switch (n[0]) {
@@ -1420,93 +1422,93 @@ const Q = (e) => {
1420
1422
  cy: 0,
1421
1423
  cz: 0
1422
1424
  };
1423
- const t = Q(e);
1425
+ const t = D(e);
1424
1426
  let s = "M", r = 0, n = 0;
1425
1427
  const { max: i, min: o } = Math;
1426
- let l = 1 / 0, c = 1 / 0, a = -1 / 0, u = -1 / 0, f = 0, h = 0, y = 0, m = 0, g = 0, d = 0, M = 0, w = 0, x = 0, p = 0;
1427
- Z(t, (I, R, P, z) => {
1428
- [s] = I;
1429
- const D = s.toUpperCase(), q = D !== s ? at(I, R, P, z) : I.slice(0), N = D === "V" ? ["L", P, q[1]] : D === "H" ? ["L", q[1], z] : q;
1430
- if ([s] = N, "TQ".includes(D) || (x = 0, p = 0), s === "M")
1431
- [, r, n] = N, f = r, h = n, y = r, m = n;
1428
+ let l = 1 / 0, c = 1 / 0, a = -1 / 0, u = -1 / 0, f = 0, h = 0, y = 0, m = 0, g = 0, A = 0, M = 0, N = 0, x = 0, p = 0;
1429
+ O(t, (k, I, z, v) => {
1430
+ [s] = k;
1431
+ const B = s.toUpperCase(), E = B !== s ? at(k, I, z, v) : k.slice(0), L = B === "V" ? ["L", z, E[1]] : B === "H" ? ["L", E[1], v] : E;
1432
+ if ([s] = L, "TQ".includes(B) || (x = 0, p = 0), s === "M")
1433
+ [, r, n] = L, f = r, h = n, y = r, m = n;
1432
1434
  else if (s === "L")
1433
1435
  [f, h, y, m] = It(
1434
- P,
1435
1436
  z,
1436
- N[1],
1437
- N[2]
1437
+ v,
1438
+ L[1],
1439
+ L[2]
1438
1440
  );
1439
1441
  else if (s === "A")
1440
1442
  [f, h, y, m] = de(
1441
- P,
1442
1443
  z,
1443
- N[1],
1444
- N[2],
1445
- N[3],
1446
- N[4],
1447
- N[5],
1448
- N[6],
1449
- N[7]
1444
+ v,
1445
+ L[1],
1446
+ L[2],
1447
+ L[3],
1448
+ L[4],
1449
+ L[5],
1450
+ L[6],
1451
+ L[7]
1450
1452
  );
1451
1453
  else if (s === "S") {
1452
- const $ = g * 2 - M, E = d * 2 - w;
1454
+ const R = g * 2 - M, H = A * 2 - N;
1453
1455
  [f, h, y, m] = St(
1454
- P,
1455
1456
  z,
1456
- $,
1457
- E,
1458
- N[1],
1459
- N[2],
1460
- N[3],
1461
- N[4]
1457
+ v,
1458
+ R,
1459
+ H,
1460
+ L[1],
1461
+ L[2],
1462
+ L[3],
1463
+ L[4]
1462
1464
  );
1463
1465
  } else s === "C" ? [f, h, y, m] = St(
1464
- P,
1465
1466
  z,
1466
- N[1],
1467
- N[2],
1468
- N[3],
1469
- N[4],
1470
- N[5],
1471
- N[6]
1472
- ) : s === "T" ? (x = g * 2 - x, p = d * 2 - p, [f, h, y, m] = Qt(
1473
- P,
1467
+ v,
1468
+ L[1],
1469
+ L[2],
1470
+ L[3],
1471
+ L[4],
1472
+ L[5],
1473
+ L[6]
1474
+ ) : s === "T" ? (x = g * 2 - x, p = A * 2 - p, [f, h, y, m] = Qt(
1474
1475
  z,
1476
+ v,
1475
1477
  x,
1476
1478
  p,
1477
- N[1],
1478
- N[2]
1479
- )) : s === "Q" ? (x = N[1], p = N[2], [f, h, y, m] = Qt(
1480
- P,
1479
+ L[1],
1480
+ L[2]
1481
+ )) : s === "Q" ? (x = L[1], p = L[2], [f, h, y, m] = Qt(
1481
1482
  z,
1482
- N[1],
1483
- N[2],
1484
- N[3],
1485
- N[4]
1486
- )) : s === "Z" && ([f, h, y, m] = It(P, z, r, n));
1487
- l = o(f, l), c = o(h, c), a = i(y, a), u = i(m, u), [g, d] = s === "Z" ? [r, n] : N.slice(-2), [M, w] = s === "C" ? [N[3], N[4]] : s === "S" ? [N[1], N[2]] : [g, d];
1483
+ v,
1484
+ L[1],
1485
+ L[2],
1486
+ L[3],
1487
+ L[4]
1488
+ )) : s === "Z" && ([f, h, y, m] = It(z, v, r, n));
1489
+ l = o(f, l), c = o(h, c), a = i(y, a), u = i(m, u), [g, A] = s === "Z" ? [r, n] : L.slice(-2), [M, N] = s === "C" ? [L[3], L[4]] : s === "S" ? [L[1], L[2]] : [g, A];
1488
1490
  });
1489
- const L = a - l, T = u - c;
1491
+ const w = a - l, T = u - c;
1490
1492
  return {
1491
- width: L,
1493
+ width: w,
1492
1494
  height: T,
1493
1495
  x: l,
1494
1496
  y: c,
1495
1497
  x2: a,
1496
1498
  y2: u,
1497
- cx: l + L / 2,
1499
+ cx: l + w / 2,
1498
1500
  cy: c + T / 2,
1499
1501
  // an estimated guess
1500
- cz: Math.max(L, T) + Math.min(L, T) / 2
1502
+ cz: Math.max(w, T) + Math.min(w, T) / 2
1501
1503
  };
1502
- }, We = (e, t) => Ut(e, t).segment, Xe = (e, t) => vt(e, t).segment, Tt = (e) => Array.isArray(e) && e.every((t) => {
1504
+ }, We = (e, t) => Ut(e, t).segment, Xe = (e, t) => Tt(e, t).segment, Ct = (e) => Array.isArray(e) && e.every((t) => {
1503
1505
  const s = t[0].toLowerCase();
1504
1506
  return tt[s] === t.length - 1 && "achlmqstvz".includes(s) && t.slice(1).every(Number.isFinite);
1505
- }) && e.length > 0, Pe = (e) => Tt(e) && // `isPathArray` also checks if it's `Array`
1507
+ }) && e.length > 0, Pe = (e) => Ct(e) && // `isPathArray` also checks if it's `Array`
1506
1508
  e.every(([t]) => t === t.toUpperCase()), ke = (e) => Pe(e) && e.every(([t]) => "ACLMQZ".includes(t)), Ye = (e) => ke(e) && e.every(([t]) => "MC".includes(t)), Ve = (e, t) => {
1507
- const { distance: s } = vt(e, t);
1509
+ const { distance: s } = Tt(e, t);
1508
1510
  return Math.abs(s) < bt;
1509
- }, Ge = (e) => Tt(e) && // `isPathArray` checks if it's `Array`
1511
+ }, Ge = (e) => Ct(e) && // `isPathArray` checks if it's `Array`
1510
1512
  e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1511
1513
  if (typeof e != "string" || !e.length)
1512
1514
  return !1;
@@ -1565,22 +1567,22 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1565
1567
  }, Re = (e) => {
1566
1568
  const t = Object.keys(ct), s = Ee(e), r = s ? e.tagName : null;
1567
1569
  if (r && [...t, "path"].every((c) => r !== c))
1568
- throw TypeError(`${S}: "${r}" is not SVGElement`);
1570
+ throw TypeError(`${Z}: "${r}" is not SVGElement`);
1569
1571
  const n = s ? r : e.type, i = ct[n], o = { type: n };
1570
1572
  s ? i.forEach((c) => {
1571
1573
  o[c] = e.getAttribute(c);
1572
1574
  }) : Object.assign(o, e);
1573
1575
  let l = [];
1574
- return n === "circle" ? l = nn(o) : n === "ellipse" ? l = sn(o) : ["polyline", "polygon"].includes(n) ? l = en(o) : n === "rect" ? l = rn(o) : n === "line" ? l = tn(o) : ["glyph", "path"].includes(n) && (l = Q(
1576
+ return n === "circle" ? l = nn(o) : n === "ellipse" ? l = sn(o) : ["polyline", "polygon"].includes(n) ? l = en(o) : n === "rect" ? l = rn(o) : n === "line" ? l = tn(o) : ["glyph", "path"].includes(n) && (l = D(
1575
1577
  s ? e.getAttribute("d") || /* istanbul ignore next @preserve */
1576
1578
  "" : e.d || ""
1577
- )), Tt(l) && l.length ? l : !1;
1579
+ )), Ct(l) && l.length ? l : !1;
1578
1580
  }, on = (e, t, s) => {
1579
1581
  const r = s || document, n = Object.keys(ct), i = Ee(e), o = i ? e.tagName : null;
1580
1582
  if (o === "path")
1581
- throw TypeError(`${S}: "${o}" is already SVGPathElement`);
1583
+ throw TypeError(`${Z}: "${o}" is already SVGPathElement`);
1582
1584
  if (o && n.every((m) => o !== m))
1583
- throw TypeError(`${S}: "${o}" is not SVGElement`);
1585
+ throw TypeError(`${Z}: "${o}" is not SVGElement`);
1584
1586
  const l = r.createElementNS("http://www.w3.org/2000/svg", "path"), c = i ? o : e.type, a = ct[c], u = { type: c }, f = V.round, h = Re(e), y = h && h.length ? kt(h, f) : "";
1585
1587
  return i ? (a.forEach((m) => {
1586
1588
  u[m] = e.getAttribute(m);
@@ -1604,15 +1606,15 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1604
1606
  const [n] = e, { round: i } = V, o = typeof i == "number" ? i : (
1605
1607
  /* istanbul ignore next */
1606
1608
  4
1607
- ), l = t.slice(1), { x1: c, y1: a, x2: u, y2: f, x: h, y } = s, [m, g] = l.slice(-2), d = e;
1609
+ ), l = t.slice(1), { x1: c, y1: a, x2: u, y2: f, x: h, y } = s, [m, g] = l.slice(-2), A = e;
1608
1610
  if ("TQ".includes(n) || (s.qx = null, s.qy = null), n === "L") {
1609
- if (k(h, o) === k(m, o))
1611
+ if (P(h, o) === P(m, o))
1610
1612
  return ["V", g];
1611
- if (k(y, o) === k(g, o))
1613
+ if (P(y, o) === P(g, o))
1612
1614
  return ["H", m];
1613
1615
  } else if (n === "C") {
1614
- const [M, w] = l;
1615
- if (s.x1 = M, s.y1 = w, "CS".includes(r) && (k(M, o) === k(c * 2 - u, o) && k(w, o) === k(a * 2 - f, o) || k(c, o) === k(u * 2 - h, o) && k(a, o) === k(f * 2 - y, o)))
1616
+ const [M, N] = l;
1617
+ if (s.x1 = M, s.y1 = N, "CS".includes(r) && (P(M, o) === P(c * 2 - u, o) && P(N, o) === P(a * 2 - f, o) || P(c, o) === P(u * 2 - h, o) && P(a, o) === P(f * 2 - y, o)))
1616
1618
  return [
1617
1619
  "S",
1618
1620
  l[2],
@@ -1621,14 +1623,14 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1621
1623
  l[5]
1622
1624
  ];
1623
1625
  } else if (n === "Q") {
1624
- const [M, w] = l;
1625
- if (s.qx = M, s.qy = w, "QT".includes(r) && k(M, o) === k(c * 2 - u, o) && k(w, o) === k(a * 2 - f, o))
1626
+ const [M, N] = l;
1627
+ if (s.qx = M, s.qy = N, "QT".includes(r) && P(M, o) === P(c * 2 - u, o) && P(N, o) === P(a * 2 - f, o))
1626
1628
  return ["T", l[2], l[3]];
1627
1629
  }
1628
- return d;
1630
+ return A;
1629
1631
  }, dt = (e, t) => {
1630
1632
  const s = e.slice(1).map(
1631
- (r) => k(r, t)
1633
+ (r) => P(r, t)
1632
1634
  );
1633
1635
  return [e[0]].concat(s);
1634
1636
  }, Xt = (e, t) => {
@@ -1637,7 +1639,7 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1637
1639
  2
1638
1640
  ), n = { ...ut }, i = [];
1639
1641
  let o = "M", l = "Z";
1640
- return Z(s, (c, a, u, f) => {
1642
+ return O(s, (c, a, u, f) => {
1641
1643
  n.x = u, n.y = f;
1642
1644
  const h = Nt(c, n);
1643
1645
  let y = c;
@@ -1648,8 +1650,8 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1648
1650
  h,
1649
1651
  n,
1650
1652
  l
1651
- ), d = dt(g, r), M = d.join(""), w = Bt(g, a, u, f), x = dt(w, r), p = x.join("");
1652
- y = M.length < p.length ? d : x;
1653
+ ), A = dt(g, r), M = A.join(""), N = Bt(g, a, u, f), x = dt(N, r), p = x.join("");
1654
+ y = M.length < p.length ? A : x;
1653
1655
  }
1654
1656
  const m = h.length;
1655
1657
  return n.x1 = +h[m - 2], n.y1 = +h[m - 1], n.x2 = +h[m - 4] || n.x1, n.y2 = +h[m - 3] || n.y1, y;
@@ -1672,15 +1674,15 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1672
1674
  t.map((s) => ["C"].concat(s.slice(2)))
1673
1675
  );
1674
1676
  }, ft = (e) => {
1675
- const t = ht(e), s = ot(t), r = t.length, n = t[r - 1][0] === "Z", i = Z(t, (o, l) => {
1677
+ const t = ht(e), s = ot(t), r = t.length, n = t[r - 1][0] === "Z", i = O(t, (o, l) => {
1676
1678
  const c = s[l], a = l && t[l - 1], u = a && a[0], f = t[l + 1], h = f && f[0], [y] = o, [m, g] = s[l ? l - 1 : r - 1].slice(-2);
1677
- let d = o;
1679
+ let A = o;
1678
1680
  switch (y) {
1679
1681
  case "M":
1680
- d = n ? ["Z"] : [y, m, g];
1682
+ A = n ? ["Z"] : [y, m, g];
1681
1683
  break;
1682
1684
  case "A":
1683
- d = [
1685
+ A = [
1684
1686
  y,
1685
1687
  o[1],
1686
1688
  o[2],
@@ -1692,7 +1694,7 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1692
1694
  ];
1693
1695
  break;
1694
1696
  case "C":
1695
- f && h === "S" ? d = ["S", o[1], o[2], m, g] : d = [
1697
+ f && h === "S" ? A = ["S", o[1], o[2], m, g] : A = [
1696
1698
  y,
1697
1699
  o[3],
1698
1700
  o[4],
@@ -1703,7 +1705,7 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1703
1705
  ];
1704
1706
  break;
1705
1707
  case "S":
1706
- u && "CS".includes(u) && (!f || h !== "S") ? d = [
1708
+ u && "CS".includes(u) && (!f || h !== "S") ? A = [
1707
1709
  "C",
1708
1710
  c[3],
1709
1711
  c[4],
@@ -1711,7 +1713,7 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1711
1713
  c[2],
1712
1714
  m,
1713
1715
  g
1714
- ] : d = [
1716
+ ] : A = [
1715
1717
  y,
1716
1718
  c[1],
1717
1719
  c[2],
@@ -1720,34 +1722,34 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1720
1722
  ];
1721
1723
  break;
1722
1724
  case "Q":
1723
- f && h === "T" ? d = ["T", m, g] : d = [y, o[1], o[2], m, g];
1725
+ f && h === "T" ? A = ["T", m, g] : A = [y, o[1], o[2], m, g];
1724
1726
  break;
1725
1727
  case "T":
1726
- u && "QT".includes(u) && (!f || h !== "T") ? d = [
1728
+ u && "QT".includes(u) && (!f || h !== "T") ? A = [
1727
1729
  "Q",
1728
1730
  c[1],
1729
1731
  c[2],
1730
1732
  m,
1731
1733
  g
1732
- ] : d = [y, m, g];
1734
+ ] : A = [y, m, g];
1733
1735
  break;
1734
1736
  case "Z":
1735
- d = ["M", m, g];
1737
+ A = ["M", m, g];
1736
1738
  break;
1737
1739
  case "H":
1738
- d = [y, m];
1740
+ A = [y, m];
1739
1741
  break;
1740
1742
  case "V":
1741
- d = [y, g];
1743
+ A = [y, g];
1742
1744
  break;
1743
1745
  default:
1744
- d = [y].concat(
1746
+ A = [y].concat(
1745
1747
  o.slice(1, -2),
1746
1748
  m,
1747
1749
  g
1748
1750
  );
1749
1751
  }
1750
- return d;
1752
+ return A;
1751
1753
  });
1752
1754
  return n ? i.reverse() : [i[0]].concat(i.slice(1).reverse());
1753
1755
  }, an = (e, t) => {
@@ -1755,9 +1757,9 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1755
1757
  return s = t === "off" || typeof t == "number" && t >= 0 ? t : typeof s == "number" && s >= 0 ? s : (
1756
1758
  /* istanbul ignore next @preserve */
1757
1759
  "off"
1758
- ), s === "off" ? e.slice(0) : Z(e, (r) => dt(r, s));
1760
+ ), s === "off" ? e.slice(0) : O(e, (r) => dt(r, s));
1759
1761
  }, un = (e, t = 0.5) => {
1760
- const s = t, r = e.slice(0, 2), n = e.slice(2, 4), i = e.slice(4, 6), o = e.slice(6, 8), l = H(r, n, s), c = H(n, i, s), a = H(i, o, s), u = H(l, c, s), f = H(c, a, s), h = H(u, f, s);
1762
+ const s = t, r = e.slice(0, 2), n = e.slice(2, 4), i = e.slice(4, 6), o = e.slice(6, 8), l = F(r, n, s), c = F(n, i, s), a = F(i, o, s), u = F(l, c, s), f = F(c, a, s), h = F(u, f, s);
1761
1763
  return [
1762
1764
  ["C", l[0], l[1], u[0], u[1], h[0], h[1]],
1763
1765
  ["C", f[0], f[1], a[0], a[1], o[0], o[1]]
@@ -1778,18 +1780,18 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1778
1780
  }), t;
1779
1781
  }, Vt = (e, t) => {
1780
1782
  let s = 0, r = 0, n = 0, i = 0, o = 0, l = 0, c = "M";
1781
- const a = Q(e), u = t && Object.keys(t);
1783
+ const a = D(e), u = t && Object.keys(t);
1782
1784
  if (!t || u && !u.length)
1783
1785
  return a.slice(0);
1784
1786
  t.origin || Object.assign(t, { origin: V.origin });
1785
1787
  const f = t.origin, h = je(t);
1786
- return h.isIdentity ? a.slice(0) : Z(a, (y, m, g, d) => {
1788
+ return h.isIdentity ? a.slice(0) : O(a, (y, m, g, A) => {
1787
1789
  [c] = y;
1788
- const M = c.toUpperCase(), x = M !== c ? at(y, m, g, d) : y.slice(0);
1790
+ const M = c.toUpperCase(), x = M !== c ? at(y, m, g, A) : y.slice(0);
1789
1791
  let p = M === "A" ? ["C"].concat(
1790
1792
  Mt(
1791
1793
  g,
1792
- d,
1794
+ A,
1793
1795
  x[1],
1794
1796
  x[2],
1795
1797
  x[3],
@@ -1798,10 +1800,10 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1798
1800
  x[6],
1799
1801
  x[7]
1800
1802
  )
1801
- ) : M === "V" ? ["L", g, x[1]] : M === "H" ? ["L", x[1], d] : x;
1803
+ ) : M === "V" ? ["L", g, x[1]] : M === "H" ? ["L", x[1], A] : x;
1802
1804
  c = p[0];
1803
- const L = c === "C" && p.length > 7, T = L ? p.slice(0, 7) : p.slice(0);
1804
- if (L && (a.splice(
1805
+ const w = c === "C" && p.length > 7, T = w ? p.slice(0, 7) : p.slice(0);
1806
+ if (w && (a.splice(
1805
1807
  m + 1,
1806
1808
  0,
1807
1809
  ["C"].concat(
@@ -1822,7 +1824,7 @@ e.slice(1).every(([t]) => t === t.toLowerCase()), Ie = (e) => {
1822
1824
  return s = n, r = i, p;
1823
1825
  });
1824
1826
  };
1825
- class A {
1827
+ class d {
1826
1828
  /**
1827
1829
  * @constructor
1828
1830
  * @param pathValue the path string
@@ -1832,9 +1834,9 @@ class A {
1832
1834
  const r = s || {}, n = typeof t > "u";
1833
1835
  if (n || !t.length)
1834
1836
  throw TypeError(
1835
- `${S}: "pathValue" is ${n ? "undefined" : "empty"}`
1837
+ `${Z}: "pathValue" is ${n ? "undefined" : "empty"}`
1836
1838
  );
1837
- this.segments = Q(t);
1839
+ this.segments = D(t);
1838
1840
  const { round: i, origin: o } = r;
1839
1841
  let l;
1840
1842
  Number.isInteger(i) || i === "off" ? l = i : l = V.round;
@@ -2013,7 +2015,7 @@ class A {
2013
2015
  Object.keys(this).forEach((t) => delete this[t]);
2014
2016
  }
2015
2017
  }
2016
- b(A, "CSSMatrix", C), b(A, "pathToAbsolute", ht), b(A, "pathToRelative", Kt), b(A, "pathToCurve", yt), b(A, "pathToString", kt), b(A, "arcTools", He), b(A, "bezierTools", {
2018
+ b(d, "CSSMatrix", C), b(d, "pathToAbsolute", ht), b(d, "pathToRelative", Kt), b(d, "pathToCurve", yt), b(d, "pathToString", kt), b(d, "arcTools", He), b(d, "bezierTools", {
2017
2019
  Cvalues: Ae,
2018
2020
  Tvalues: Rt,
2019
2021
  minmaxC: jt,
@@ -2023,23 +2025,23 @@ b(A, "CSSMatrix", C), b(A, "pathToAbsolute", ht), b(A, "pathToRelative", Kt), b(
2023
2025
  calculateBezier: we,
2024
2026
  computeBezier: Ne,
2025
2027
  deriveBezier: Me,
2026
- CBEZIER_MINMAX_EPSILON: ve
2027
- }), b(A, "cubicTools", {
2028
+ CBEZIER_MINMAX_EPSILON: Te
2029
+ }), b(d, "cubicTools", {
2028
2030
  getCubicLength: xt,
2029
2031
  getCubicBBox: St,
2030
- getPointAtCubicLength: Ce,
2031
- getPointAtCubicSegmentLength: Te
2032
- }), b(A, "lineTools", {
2032
+ getPointAtCubicLength: ve,
2033
+ getPointAtCubicSegmentLength: Ce
2034
+ }), b(d, "lineTools", {
2033
2035
  getPointAtLineLength: Ht,
2034
2036
  getLineBBox: It,
2035
2037
  getLineLength: it
2036
- }), b(A, "quadTools", {
2038
+ }), b(d, "quadTools", {
2037
2039
  getPointAtQuadSegmentLength: $e,
2038
2040
  getQuadLength: pt,
2039
2041
  getQuadBBox: Qt,
2040
2042
  getPointAtQuadLength: ze
2041
- }), b(A, "polygonTools", { polygonArea: Fe, polygonLength: _e }), b(A, "distanceSquareRoot", wt), b(A, "distanceEpsilon", bt), b(A, "midPoint", H), b(A, "rotateVector", st), b(A, "roundTo", k), b(A, "finalizeSegment", qt), b(A, "invalidPathValue", J), b(A, "isArcCommand", ye), b(A, "isDigit", U), b(A, "isDigitStart", he), b(A, "isMoveCommand", ge), b(A, "isPathCommand", fe), b(A, "isSpace", me), b(A, "paramsCount", tt), b(A, "paramsParser", ut), b(A, "pathParser", Ot), b(A, "scanFlag", ae), b(A, "scanParam", ue), b(A, "scanSegment", Dt), b(A, "skipSpaces", et), b(A, "getPathBBox", Wt), b(A, "getPathArea", qe), b(A, "getTotalLength", nt), b(A, "getDrawDirection", Ke), b(A, "getPointAtLength", rt), b(A, "getPropertiesAtLength", Ut), b(A, "getPropertiesAtPoint", vt), b(A, "getClosestPoint", Ue), b(A, "getSegmentOfPoint", Xe), b(A, "getSegmentAtLength", We), b(A, "isPointInStroke", Ve), b(A, "isValidPath", Ie), b(A, "isPathArray", Tt), b(A, "isAbsoluteArray", Pe), b(A, "isRelativeArray", Ge), b(A, "isCurveArray", Ye), b(A, "isNormalizedArray", ke), b(A, "shapeToPath", on), b(A, "shapeToPathArray", Re), b(A, "shapeParams", ct), b(A, "parsePathString", Q), b(A, "absolutizeSegment", at), b(A, "arcToCubic", Mt), b(A, "getSVGMatrix", je), b(A, "iterate", Z), b(A, "lineToCubic", Pt), b(A, "normalizePath", ot), b(A, "normalizeSegment", Nt), b(A, "optimizePath", Xt), b(A, "projection2d", Zt), b(A, "quadToCubic", xe), b(A, "relativizeSegment", Bt), b(A, "reverseCurve", ln), b(A, "reversePath", ft), b(A, "roundPath", an), b(A, "roundSegment", dt), b(A, "segmentToCubic", pe), b(A, "shortenSegment", Se), b(A, "splitCubic", un), b(A, "splitPath", Yt), b(A, "transformPath", Vt);
2043
+ }), b(d, "polygonTools", { polygonArea: Fe, polygonLength: _e }), b(d, "distanceSquareRoot", wt), b(d, "distanceEpsilon", bt), b(d, "midPoint", F), b(d, "rotateVector", st), b(d, "roundTo", P), b(d, "finalizeSegment", qt), b(d, "invalidPathValue", K), b(d, "isArcCommand", ye), b(d, "isDigit", J), b(d, "isDigitStart", he), b(d, "isMoveCommand", ge), b(d, "isPathCommand", fe), b(d, "isSpace", me), b(d, "paramsCount", tt), b(d, "paramsParser", ut), b(d, "pathParser", Ot), b(d, "scanFlag", ae), b(d, "scanParam", ue), b(d, "scanSegment", Dt), b(d, "skipSpaces", et), b(d, "getPathBBox", Wt), b(d, "getPathArea", qe), b(d, "getTotalLength", nt), b(d, "getDrawDirection", Ke), b(d, "getPointAtLength", rt), b(d, "getPropertiesAtLength", Ut), b(d, "getPropertiesAtPoint", Tt), b(d, "getClosestPoint", Ue), b(d, "getSegmentOfPoint", Xe), b(d, "getSegmentAtLength", We), b(d, "isPointInStroke", Ve), b(d, "isValidPath", Ie), b(d, "isPathArray", Ct), b(d, "isAbsoluteArray", Pe), b(d, "isRelativeArray", Ge), b(d, "isCurveArray", Ye), b(d, "isNormalizedArray", ke), b(d, "shapeToPath", on), b(d, "shapeToPathArray", Re), b(d, "shapeParams", ct), b(d, "parsePathString", D), b(d, "absolutizeSegment", at), b(d, "arcToCubic", Mt), b(d, "getSVGMatrix", je), b(d, "iterate", O), b(d, "lineToCubic", Pt), b(d, "normalizePath", ot), b(d, "normalizeSegment", Nt), b(d, "optimizePath", Xt), b(d, "projection2d", Zt), b(d, "quadToCubic", xe), b(d, "relativizeSegment", Bt), b(d, "reverseCurve", ln), b(d, "reversePath", ft), b(d, "roundPath", an), b(d, "roundSegment", dt), b(d, "segmentToCubic", pe), b(d, "shortenSegment", Se), b(d, "splitCubic", un), b(d, "splitPath", Yt), b(d, "transformPath", Vt);
2042
2044
  export {
2043
- A as default
2045
+ d as default
2044
2046
  };
2045
2047
  //# sourceMappingURL=svg-path-commander.mjs.map