@mlightcad/mtext-renderer 0.9.3 → 0.9.4

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.
@@ -285,9 +285,9 @@ var t1 = jh((O) => {
285
285
  yield this.x, yield this.y;
286
286
  }
287
287
  }
288
- class Et {
288
+ class Bt {
289
289
  constructor(e, t, r, i, s, a, o, h, c) {
290
- Et.prototype.isMatrix3 = !0, this.elements = [
290
+ Bt.prototype.isMatrix3 = !0, this.elements = [
291
291
  1,
292
292
  0,
293
293
  0,
@@ -468,7 +468,7 @@ var t1 = jh((O) => {
468
468
  return new this.constructor().fromArray(this.elements);
469
469
  }
470
470
  }
471
- const ri = /* @__PURE__ */ new Et();
471
+ const ri = /* @__PURE__ */ new Bt();
472
472
  function Kh(n) {
473
473
  for (let e = n.length - 1; e >= 0; --e)
474
474
  if (n[e] >= 65535) return !0;
@@ -477,7 +477,7 @@ var t1 = jh((O) => {
477
477
  function Ys(n) {
478
478
  return document.createElementNS("http://www.w3.org/1999/xhtml", n);
479
479
  }
480
- const Zs = /* @__PURE__ */ new Et().set(
480
+ const Zs = /* @__PURE__ */ new Bt().set(
481
481
  0.4123908,
482
482
  0.3575843,
483
483
  0.1804808,
@@ -487,7 +487,7 @@ var t1 = jh((O) => {
487
487
  0.0193308,
488
488
  0.1191948,
489
489
  0.9505322
490
- ), Js = /* @__PURE__ */ new Et().set(
490
+ ), Js = /* @__PURE__ */ new Bt().set(
491
491
  3.2409699,
492
492
  -1.5373832,
493
493
  -0.4986108,
@@ -582,7 +582,7 @@ var t1 = jh((O) => {
582
582
  function hr(n) {
583
583
  return n < 31308e-7 ? n * 12.92 : 1.055 * Math.pow(n, 0.41666) - 0.055;
584
584
  }
585
- let Zt;
585
+ let Jt;
586
586
  class tc {
587
587
  static getDataURL(e) {
588
588
  if (/^data:/i.test(e.src) || typeof HTMLCanvasElement > "u")
@@ -591,9 +591,9 @@ var t1 = jh((O) => {
591
591
  if (e instanceof HTMLCanvasElement)
592
592
  t = e;
593
593
  else {
594
- Zt === void 0 && (Zt = Ys("canvas")), Zt.width = e.width, Zt.height = e.height;
595
- const r = Zt.getContext("2d");
596
- e instanceof ImageData ? r.putImageData(e, 0, 0) : r.drawImage(e, 0, 0, e.width, e.height), t = Zt;
594
+ Jt === void 0 && (Jt = Ys("canvas")), Jt.width = e.width, Jt.height = e.height;
595
+ const r = Jt.getContext("2d");
596
+ e instanceof ImageData ? r.putImageData(e, 0, 0) : r.drawImage(e, 0, 0, e.width, e.height), t = Jt;
597
597
  }
598
598
  return t.width > 2048 || t.height > 2048 ? (console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons", e), t.toDataURL("image/jpeg", 0.6)) : t.toDataURL("image/png");
599
599
  }
@@ -658,9 +658,9 @@ var t1 = jh((O) => {
658
658
  } : (console.warn("THREE.Texture: Unable to serialize Texture."), {});
659
659
  }
660
660
  let ic = 0;
661
- class Ht extends Yn {
662
- constructor(e = Ht.DEFAULT_IMAGE, t = Ht.DEFAULT_MAPPING, r = 1001, i = 1001, s = 1006, a = 1008, o = 1023, h = 1009, c = Ht.DEFAULT_ANISOTROPY, u = Ro) {
663
- super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: ic++ }), this.uuid = gr(), this.name = "", this.source = new nc(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = r, this.wrapT = i, this.magFilter = s, this.minFilter = a, this.anisotropy = c, this.format = o, this.internalFormat = null, this.type = h, this.offset = new V(0, 0), this.repeat = new V(1, 1), this.center = new V(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new Et(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = u, this.userData = {}, this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.pmremVersion = 0;
661
+ class Wt extends Yn {
662
+ constructor(e = Wt.DEFAULT_IMAGE, t = Wt.DEFAULT_MAPPING, r = 1001, i = 1001, s = 1006, a = 1008, o = 1023, h = 1009, c = Wt.DEFAULT_ANISOTROPY, u = Ro) {
663
+ super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: ic++ }), this.uuid = gr(), this.name = "", this.source = new nc(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = r, this.wrapT = i, this.magFilter = s, this.minFilter = a, this.anisotropy = c, this.format = o, this.internalFormat = null, this.type = h, this.offset = new V(0, 0), this.repeat = new V(1, 1), this.center = new V(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new Bt(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = u, this.userData = {}, this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.pmremVersion = 0;
664
664
  }
665
665
  get image() {
666
666
  return this.source.data;
@@ -749,9 +749,9 @@ var t1 = jh((O) => {
749
749
  e === !0 && this.pmremVersion++;
750
750
  }
751
751
  }
752
- Ht.DEFAULT_IMAGE = null;
753
- Ht.DEFAULT_MAPPING = 300;
754
- Ht.DEFAULT_ANISOTROPY = 1;
752
+ Wt.DEFAULT_IMAGE = null;
753
+ Wt.DEFAULT_MAPPING = 300;
754
+ Wt.DEFAULT_ANISOTROPY = 1;
755
755
  class qr {
756
756
  constructor(e = 0, t = 0, r = 0, i = 1) {
757
757
  qr.prototype.isVector4 = !0, this.x = e, this.y = t, this.z = r, this.w = i;
@@ -958,7 +958,7 @@ var t1 = jh((O) => {
958
958
  yield this.x, yield this.y, yield this.z, yield this.w;
959
959
  }
960
960
  }
961
- class Bt {
961
+ class _t {
962
962
  constructor(e = 0, t = 0, r = 0, i = 1) {
963
963
  this.isQuaternion = !0, this._x = e, this._y = t, this._z = r, this._w = i;
964
964
  }
@@ -1435,7 +1435,7 @@ var t1 = jh((O) => {
1435
1435
  yield this.x, yield this.y, yield this.z;
1436
1436
  }
1437
1437
  }
1438
- const ii = /* @__PURE__ */ new A(), $s = /* @__PURE__ */ new Bt();
1438
+ const ii = /* @__PURE__ */ new A(), $s = /* @__PURE__ */ new _t();
1439
1439
  class Ae {
1440
1440
  constructor(e = new A(1 / 0, 1 / 0, 1 / 0), t = new A(-1 / 0, -1 / 0, -1 / 0)) {
1441
1441
  this.isBox3 = !0, this.min = e, this.max = t;
@@ -1537,7 +1537,7 @@ var t1 = jh((O) => {
1537
1537
  intersectsTriangle(e) {
1538
1538
  if (this.isEmpty())
1539
1539
  return !1;
1540
- this.getCenter(wr), sn.subVectors(this.max, wr), Jt.subVectors(e.a, wr), $t.subVectors(e.b, wr), jt.subVectors(e.c, wr), yt.subVectors($t, Jt), mt.subVectors(jt, $t), Lt.subVectors(Jt, jt);
1540
+ this.getCenter(wr), sn.subVectors(this.max, wr), $t.subVectors(e.a, wr), jt.subVectors(e.b, wr), Qt.subVectors(e.c, wr), yt.subVectors(jt, $t), mt.subVectors(Qt, jt), Ut.subVectors($t, Qt);
1541
1541
  let t = [
1542
1542
  0,
1543
1543
  -yt.z,
@@ -1546,28 +1546,28 @@ var t1 = jh((O) => {
1546
1546
  -mt.z,
1547
1547
  mt.y,
1548
1548
  0,
1549
- -Lt.z,
1550
- Lt.y,
1549
+ -Ut.z,
1550
+ Ut.y,
1551
1551
  yt.z,
1552
1552
  0,
1553
1553
  -yt.x,
1554
1554
  mt.z,
1555
1555
  0,
1556
1556
  -mt.x,
1557
- Lt.z,
1557
+ Ut.z,
1558
1558
  0,
1559
- -Lt.x,
1559
+ -Ut.x,
1560
1560
  -yt.y,
1561
1561
  yt.x,
1562
1562
  0,
1563
1563
  -mt.y,
1564
1564
  mt.x,
1565
1565
  0,
1566
- -Lt.y,
1567
- Lt.x,
1566
+ -Ut.y,
1567
+ Ut.x,
1568
1568
  0
1569
1569
  ];
1570
- return !si(t, Jt, $t, jt, sn) || (t = [1, 0, 0, 0, 1, 0, 0, 0, 1], !si(t, Jt, $t, jt, sn)) ? !1 : (an.crossVectors(yt, mt), t = [an.x, an.y, an.z], si(t, Jt, $t, jt, sn));
1570
+ return !si(t, $t, jt, Qt, sn) || (t = [1, 0, 0, 0, 1, 0, 0, 0, 1], !si(t, $t, jt, Qt, sn)) ? !1 : (an.crossVectors(yt, mt), t = [an.x, an.y, an.z], si(t, $t, jt, Qt, sn));
1571
1571
  }
1572
1572
  clampPoint(e, t) {
1573
1573
  return t.copy(e).clamp(this.min, this.max);
@@ -1603,11 +1603,11 @@ var t1 = jh((O) => {
1603
1603
  /* @__PURE__ */ new A(),
1604
1604
  /* @__PURE__ */ new A(),
1605
1605
  /* @__PURE__ */ new A()
1606
- ], ze = /* @__PURE__ */ new A(), nn = /* @__PURE__ */ new Ae(), Jt = /* @__PURE__ */ new A(), $t = /* @__PURE__ */ new A(), jt = /* @__PURE__ */ new A(), yt = /* @__PURE__ */ new A(), mt = /* @__PURE__ */ new A(), Lt = /* @__PURE__ */ new A(), wr = /* @__PURE__ */ new A(), sn = /* @__PURE__ */ new A(), an = /* @__PURE__ */ new A(), Ut = /* @__PURE__ */ new A();
1606
+ ], ze = /* @__PURE__ */ new A(), nn = /* @__PURE__ */ new Ae(), $t = /* @__PURE__ */ new A(), jt = /* @__PURE__ */ new A(), Qt = /* @__PURE__ */ new A(), yt = /* @__PURE__ */ new A(), mt = /* @__PURE__ */ new A(), Ut = /* @__PURE__ */ new A(), wr = /* @__PURE__ */ new A(), sn = /* @__PURE__ */ new A(), an = /* @__PURE__ */ new A(), Rt = /* @__PURE__ */ new A();
1607
1607
  function si(n, e, t, r, i) {
1608
1608
  for (let s = 0, a = n.length - 3; s <= a; s += 3) {
1609
- Ut.fromArray(n, s);
1610
- const o = i.x * Math.abs(Ut.x) + i.y * Math.abs(Ut.y) + i.z * Math.abs(Ut.z), h = e.dot(Ut), c = t.dot(Ut), u = r.dot(Ut);
1609
+ Rt.fromArray(n, s);
1610
+ const o = i.x * Math.abs(Rt.x) + i.y * Math.abs(Rt.y) + i.z * Math.abs(Rt.z), h = e.dot(Rt), c = t.dot(Rt), u = r.dot(Rt);
1611
1611
  if (Math.max(-Math.max(h, c, u), Math.min(h, c, u)) > o)
1612
1612
  return !1;
1613
1613
  }
@@ -1904,7 +1904,7 @@ var t1 = jh((O) => {
1904
1904
  ), this;
1905
1905
  }
1906
1906
  extractRotation(e) {
1907
- const t = this.elements, r = e.elements, i = 1 / Qt.setFromMatrixColumn(e, 0).length(), s = 1 / Qt.setFromMatrixColumn(e, 1).length(), a = 1 / Qt.setFromMatrixColumn(e, 2).length();
1907
+ const t = this.elements, r = e.elements, i = 1 / Kt.setFromMatrixColumn(e, 0).length(), s = 1 / Kt.setFromMatrixColumn(e, 1).length(), a = 1 / Kt.setFromMatrixColumn(e, 2).length();
1908
1908
  return t[0] = r[0] * i, t[1] = r[1] * i, t[2] = r[2] * i, t[3] = 0, t[4] = r[4] * s, t[5] = r[5] * s, t[6] = r[6] * s, t[7] = 0, t[8] = r[8] * a, t[9] = r[9] * a, t[10] = r[10] * a, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
1909
1909
  }
1910
1910
  makeRotationFromEuler(e) {
@@ -2145,8 +2145,8 @@ var t1 = jh((O) => {
2145
2145
  }
2146
2146
  decompose(e, t, r) {
2147
2147
  const i = this.elements;
2148
- let s = Qt.set(i[0], i[1], i[2]).length();
2149
- const a = Qt.set(i[4], i[5], i[6]).length(), o = Qt.set(i[8], i[9], i[10]).length();
2148
+ let s = Kt.set(i[0], i[1], i[2]).length();
2149
+ const a = Kt.set(i[4], i[5], i[6]).length(), o = Kt.set(i[8], i[9], i[10]).length();
2150
2150
  this.determinant() < 0 && (s = -s), e.x = i[12], e.y = i[13], e.z = i[14], Ne.copy(this);
2151
2151
  const c = 1 / s, u = 1 / a, f = 1 / o;
2152
2152
  return Ne.elements[0] *= c, Ne.elements[1] *= c, Ne.elements[2] *= c, Ne.elements[4] *= u, Ne.elements[5] *= u, Ne.elements[6] *= u, Ne.elements[8] *= f, Ne.elements[9] *= f, Ne.elements[10] *= f, t.setFromRotationMatrix(Ne), r.x = s, r.y = a, r.z = o, this;
@@ -2189,7 +2189,7 @@ var t1 = jh((O) => {
2189
2189
  return e[t] = r[0], e[t + 1] = r[1], e[t + 2] = r[2], e[t + 3] = r[3], e[t + 4] = r[4], e[t + 5] = r[5], e[t + 6] = r[6], e[t + 7] = r[7], e[t + 8] = r[8], e[t + 9] = r[9], e[t + 10] = r[10], e[t + 11] = r[11], e[t + 12] = r[12], e[t + 13] = r[13], e[t + 14] = r[14], e[t + 15] = r[15], e;
2190
2190
  }
2191
2191
  }
2192
- const Qt = /* @__PURE__ */ new A(), Ne = /* @__PURE__ */ new be(), ac = /* @__PURE__ */ new A(0, 0, 0), oc = /* @__PURE__ */ new A(1, 1, 1), xt = /* @__PURE__ */ new A(), cn = /* @__PURE__ */ new A(), Te = /* @__PURE__ */ new A(), js = /* @__PURE__ */ new be(), Qs = /* @__PURE__ */ new Bt();
2192
+ const Kt = /* @__PURE__ */ new A(), Ne = /* @__PURE__ */ new be(), ac = /* @__PURE__ */ new A(0, 0, 0), oc = /* @__PURE__ */ new A(1, 1, 1), xt = /* @__PURE__ */ new A(), cn = /* @__PURE__ */ new A(), Te = /* @__PURE__ */ new A(), js = /* @__PURE__ */ new be(), Qs = /* @__PURE__ */ new _t();
2193
2193
  class Vr {
2194
2194
  constructor(e = 0, t = 0, r = 0, i = Vr.DEFAULT_ORDER) {
2195
2195
  this.isEuler = !0, this._x = e, this._y = t, this._z = r, this._order = i;
@@ -2311,11 +2311,11 @@ var t1 = jh((O) => {
2311
2311
  }
2312
2312
  }
2313
2313
  let cc = 0;
2314
- const Ks = /* @__PURE__ */ new A(), Kt = /* @__PURE__ */ new Bt(), at = /* @__PURE__ */ new be(), un = /* @__PURE__ */ new A(), Fr = /* @__PURE__ */ new A(), uc = /* @__PURE__ */ new A(), lc = /* @__PURE__ */ new Bt(), ea = /* @__PURE__ */ new A(1, 0, 0), ta = /* @__PURE__ */ new A(0, 1, 0), ra = /* @__PURE__ */ new A(0, 0, 1), na = { type: "added" }, fc = { type: "removed" }, er = { type: "childadded", child: null }, ui = { type: "childremoved", child: null };
2315
- class De extends Yn {
2314
+ const Ks = /* @__PURE__ */ new A(), er = /* @__PURE__ */ new _t(), at = /* @__PURE__ */ new be(), un = /* @__PURE__ */ new A(), Fr = /* @__PURE__ */ new A(), uc = /* @__PURE__ */ new A(), lc = /* @__PURE__ */ new _t(), ea = /* @__PURE__ */ new A(1, 0, 0), ta = /* @__PURE__ */ new A(0, 1, 0), ra = /* @__PURE__ */ new A(0, 0, 1), na = { type: "added" }, fc = { type: "removed" }, tr = { type: "childadded", child: null }, ui = { type: "childremoved", child: null };
2315
+ class Me extends Yn {
2316
2316
  constructor() {
2317
- super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: cc++ }), this.uuid = gr(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = De.DEFAULT_UP.clone();
2318
- const e = new A(), t = new Vr(), r = new Bt(), i = new A(1, 1, 1);
2317
+ super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: cc++ }), this.uuid = gr(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = Me.DEFAULT_UP.clone();
2318
+ const e = new A(), t = new Vr(), r = new _t(), i = new A(1, 1, 1);
2319
2319
  function s() {
2320
2320
  r.setFromEuler(t, !1);
2321
2321
  }
@@ -2347,9 +2347,9 @@ var t1 = jh((O) => {
2347
2347
  value: new be()
2348
2348
  },
2349
2349
  normalMatrix: {
2350
- value: new Et()
2350
+ value: new Bt()
2351
2351
  }
2352
- }), this.matrix = new be(), this.matrixWorld = new be(), this.matrixAutoUpdate = De.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = De.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new hc(), this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.animations = [], this.userData = {};
2352
+ }), this.matrix = new be(), this.matrixWorld = new be(), this.matrixAutoUpdate = Me.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = Me.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new hc(), this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.animations = [], this.userData = {};
2353
2353
  }
2354
2354
  onBeforeShadow() {
2355
2355
  }
@@ -2378,10 +2378,10 @@ var t1 = jh((O) => {
2378
2378
  this.quaternion.copy(e);
2379
2379
  }
2380
2380
  rotateOnAxis(e, t) {
2381
- return Kt.setFromAxisAngle(e, t), this.quaternion.multiply(Kt), this;
2381
+ return er.setFromAxisAngle(e, t), this.quaternion.multiply(er), this;
2382
2382
  }
2383
2383
  rotateOnWorldAxis(e, t) {
2384
- return Kt.setFromAxisAngle(e, t), this.quaternion.premultiply(Kt), this;
2384
+ return er.setFromAxisAngle(e, t), this.quaternion.premultiply(er), this;
2385
2385
  }
2386
2386
  rotateX(e) {
2387
2387
  return this.rotateOnAxis(ea, e);
@@ -2413,7 +2413,7 @@ var t1 = jh((O) => {
2413
2413
  lookAt(e, t, r) {
2414
2414
  e.isVector3 ? un.copy(e) : un.set(e, t, r);
2415
2415
  const i = this.parent;
2416
- this.updateWorldMatrix(!0, !1), Fr.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? at.lookAt(Fr, un, this.up) : at.lookAt(un, Fr, this.up), this.quaternion.setFromRotationMatrix(at), i && (at.extractRotation(i.matrixWorld), Kt.setFromRotationMatrix(at), this.quaternion.premultiply(Kt.invert()));
2416
+ this.updateWorldMatrix(!0, !1), Fr.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? at.lookAt(Fr, un, this.up) : at.lookAt(un, Fr, this.up), this.quaternion.setFromRotationMatrix(at), i && (at.extractRotation(i.matrixWorld), er.setFromRotationMatrix(at), this.quaternion.premultiply(er.invert()));
2417
2417
  }
2418
2418
  add(e) {
2419
2419
  if (arguments.length > 1) {
@@ -2421,7 +2421,7 @@ var t1 = jh((O) => {
2421
2421
  this.add(arguments[t]);
2422
2422
  return this;
2423
2423
  }
2424
- return e === this ? (console.error("THREE.Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(na), er.child = e, this.dispatchEvent(er), er.child = null) : console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.", e), this);
2424
+ return e === this ? (console.error("THREE.Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(na), tr.child = e, this.dispatchEvent(tr), tr.child = null) : console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.", e), this);
2425
2425
  }
2426
2426
  remove(e) {
2427
2427
  if (arguments.length > 1) {
@@ -2440,7 +2440,7 @@ var t1 = jh((O) => {
2440
2440
  return this.remove(...this.children);
2441
2441
  }
2442
2442
  attach(e) {
2443
- return this.updateWorldMatrix(!0, !1), at.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), at.multiply(e.parent.matrixWorld)), e.applyMatrix4(at), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(na), er.child = e, this.dispatchEvent(er), er.child = null, this;
2443
+ return this.updateWorldMatrix(!0, !1), at.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), at.multiply(e.parent.matrixWorld)), e.applyMatrix4(at), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(na), tr.child = e, this.dispatchEvent(tr), tr.child = null, this;
2444
2444
  }
2445
2445
  getObjectById(e) {
2446
2446
  return this.getObjectByProperty("id", e);
@@ -2609,10 +2609,10 @@ var t1 = jh((O) => {
2609
2609
  return this;
2610
2610
  }
2611
2611
  }
2612
- De.DEFAULT_UP = /* @__PURE__ */ new A(0, 1, 0);
2613
- De.DEFAULT_MATRIX_AUTO_UPDATE = !0;
2614
- De.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
2615
- const Ge = /* @__PURE__ */ new A(), ot = /* @__PURE__ */ new A(), li = /* @__PURE__ */ new A(), ht = /* @__PURE__ */ new A(), tr = /* @__PURE__ */ new A(), rr = /* @__PURE__ */ new A(), ia = /* @__PURE__ */ new A(), fi = /* @__PURE__ */ new A(), pi = /* @__PURE__ */ new A(), di = /* @__PURE__ */ new A(), gi = /* @__PURE__ */ new qr(), yi = /* @__PURE__ */ new qr(), mi = /* @__PURE__ */ new qr();
2612
+ Me.DEFAULT_UP = /* @__PURE__ */ new A(0, 1, 0);
2613
+ Me.DEFAULT_MATRIX_AUTO_UPDATE = !0;
2614
+ Me.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
2615
+ const Ge = /* @__PURE__ */ new A(), ot = /* @__PURE__ */ new A(), li = /* @__PURE__ */ new A(), ht = /* @__PURE__ */ new A(), rr = /* @__PURE__ */ new A(), nr = /* @__PURE__ */ new A(), ia = /* @__PURE__ */ new A(), fi = /* @__PURE__ */ new A(), pi = /* @__PURE__ */ new A(), di = /* @__PURE__ */ new A(), gi = /* @__PURE__ */ new qr(), yi = /* @__PURE__ */ new qr(), mi = /* @__PURE__ */ new qr();
2616
2616
  class qe {
2617
2617
  constructor(e = new A(), t = new A(), r = new A()) {
2618
2618
  this.a = e, this.b = t, this.c = r;
@@ -2689,29 +2689,29 @@ var t1 = jh((O) => {
2689
2689
  closestPointToPoint(e, t) {
2690
2690
  const r = this.a, i = this.b, s = this.c;
2691
2691
  let a, o;
2692
- tr.subVectors(i, r), rr.subVectors(s, r), fi.subVectors(e, r);
2693
- const h = tr.dot(fi), c = rr.dot(fi);
2692
+ rr.subVectors(i, r), nr.subVectors(s, r), fi.subVectors(e, r);
2693
+ const h = rr.dot(fi), c = nr.dot(fi);
2694
2694
  if (h <= 0 && c <= 0)
2695
2695
  return t.copy(r);
2696
2696
  pi.subVectors(e, i);
2697
- const u = tr.dot(pi), f = rr.dot(pi);
2697
+ const u = rr.dot(pi), f = nr.dot(pi);
2698
2698
  if (u >= 0 && f <= u)
2699
2699
  return t.copy(i);
2700
2700
  const l = h * f - u * c;
2701
2701
  if (l <= 0 && h >= 0 && u <= 0)
2702
- return a = h / (h - u), t.copy(r).addScaledVector(tr, a);
2702
+ return a = h / (h - u), t.copy(r).addScaledVector(rr, a);
2703
2703
  di.subVectors(e, s);
2704
- const p = tr.dot(di), g = rr.dot(di);
2704
+ const p = rr.dot(di), g = nr.dot(di);
2705
2705
  if (g >= 0 && p <= g)
2706
2706
  return t.copy(s);
2707
2707
  const m = p * c - h * g;
2708
2708
  if (m <= 0 && c >= 0 && g <= 0)
2709
- return o = c / (c - g), t.copy(r).addScaledVector(rr, o);
2709
+ return o = c / (c - g), t.copy(r).addScaledVector(nr, o);
2710
2710
  const x = u * g - p * f;
2711
2711
  if (x <= 0 && f - u >= 0 && p - g >= 0)
2712
2712
  return ia.subVectors(s, i), o = (f - u) / (f - u + (p - g)), t.copy(i).addScaledVector(ia, o);
2713
2713
  const v = 1 / (x + m + l);
2714
- return a = m * v, o = l * v, t.copy(r).addScaledVector(tr, a).addScaledVector(rr, o);
2714
+ return a = m * v, o = l * v, t.copy(r).addScaledVector(rr, a).addScaledVector(nr, o);
2715
2715
  }
2716
2716
  equals(e) {
2717
2717
  return e.a.equals(this.a) && e.b.equals(this.b) && e.c.equals(this.c);
@@ -3301,14 +3301,14 @@ var t1 = jh((O) => {
3301
3301
  super(new Uint32Array(e), t, r);
3302
3302
  }
3303
3303
  }
3304
- class Wt extends Ve {
3304
+ class qt extends Ve {
3305
3305
  constructor(e, t, r) {
3306
3306
  super(new Float32Array(e), t, r);
3307
3307
  }
3308
3308
  }
3309
3309
  let yc = 0;
3310
- const Be = /* @__PURE__ */ new be(), xi = /* @__PURE__ */ new De(), nr = /* @__PURE__ */ new A(), Ce = /* @__PURE__ */ new Ae(), Tr = /* @__PURE__ */ new Ae(), ge = /* @__PURE__ */ new A();
3311
- class Ue extends Yn {
3310
+ const _e = /* @__PURE__ */ new be(), xi = /* @__PURE__ */ new Me(), ir = /* @__PURE__ */ new A(), Ce = /* @__PURE__ */ new Ae(), Tr = /* @__PURE__ */ new Ae(), ge = /* @__PURE__ */ new A();
3311
+ class Re extends Yn {
3312
3312
  constructor() {
3313
3313
  super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: yc++ }), this.uuid = gr(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
3314
3314
  }
@@ -3354,35 +3354,35 @@ var t1 = jh((O) => {
3354
3354
  t !== void 0 && (t.applyMatrix4(e), t.needsUpdate = !0);
3355
3355
  const r = this.attributes.normal;
3356
3356
  if (r !== void 0) {
3357
- const s = new Et().getNormalMatrix(e);
3357
+ const s = new Bt().getNormalMatrix(e);
3358
3358
  r.applyNormalMatrix(s), r.needsUpdate = !0;
3359
3359
  }
3360
3360
  const i = this.attributes.tangent;
3361
3361
  return i !== void 0 && (i.transformDirection(e), i.needsUpdate = !0), this.boundingBox !== null && this.computeBoundingBox(), this.boundingSphere !== null && this.computeBoundingSphere(), this;
3362
3362
  }
3363
3363
  applyQuaternion(e) {
3364
- return Be.makeRotationFromQuaternion(e), this.applyMatrix4(Be), this;
3364
+ return _e.makeRotationFromQuaternion(e), this.applyMatrix4(_e), this;
3365
3365
  }
3366
3366
  rotateX(e) {
3367
- return Be.makeRotationX(e), this.applyMatrix4(Be), this;
3367
+ return _e.makeRotationX(e), this.applyMatrix4(_e), this;
3368
3368
  }
3369
3369
  rotateY(e) {
3370
- return Be.makeRotationY(e), this.applyMatrix4(Be), this;
3370
+ return _e.makeRotationY(e), this.applyMatrix4(_e), this;
3371
3371
  }
3372
3372
  rotateZ(e) {
3373
- return Be.makeRotationZ(e), this.applyMatrix4(Be), this;
3373
+ return _e.makeRotationZ(e), this.applyMatrix4(_e), this;
3374
3374
  }
3375
3375
  translate(e, t, r) {
3376
- return Be.makeTranslation(e, t, r), this.applyMatrix4(Be), this;
3376
+ return _e.makeTranslation(e, t, r), this.applyMatrix4(_e), this;
3377
3377
  }
3378
3378
  scale(e, t, r) {
3379
- return Be.makeScale(e, t, r), this.applyMatrix4(Be), this;
3379
+ return _e.makeScale(e, t, r), this.applyMatrix4(_e), this;
3380
3380
  }
3381
3381
  lookAt(e) {
3382
3382
  return xi.lookAt(e), xi.updateMatrix(), this.applyMatrix4(xi.matrix), this;
3383
3383
  }
3384
3384
  center() {
3385
- return this.computeBoundingBox(), this.boundingBox.getCenter(nr).negate(), this.translate(nr.x, nr.y, nr.z), this;
3385
+ return this.computeBoundingBox(), this.boundingBox.getCenter(ir).negate(), this.translate(ir.x, ir.y, ir.z), this;
3386
3386
  }
3387
3387
  setFromPoints(e) {
3388
3388
  const t = this.getAttribute("position");
@@ -3392,7 +3392,7 @@ var t1 = jh((O) => {
3392
3392
  const a = e[i];
3393
3393
  r.push(a.x, a.y, a.z || 0);
3394
3394
  }
3395
- this.setAttribute("position", new Wt(r, 3));
3395
+ this.setAttribute("position", new qt(r, 3));
3396
3396
  } else {
3397
3397
  const r = Math.min(e.length, t.count);
3398
3398
  for (let i = 0; i < r; i++) {
@@ -3445,7 +3445,7 @@ var t1 = jh((O) => {
3445
3445
  for (let s = 0, a = t.length; s < a; s++) {
3446
3446
  const o = t[s], h = this.morphTargetsRelative;
3447
3447
  for (let c = 0, u = o.count; c < u; c++)
3448
- ge.fromBufferAttribute(o, c), h && (nr.fromBufferAttribute(e, c), ge.add(nr)), i = Math.max(i, r.distanceToSquared(ge));
3448
+ ge.fromBufferAttribute(o, c), h && (ir.fromBufferAttribute(e, c), ge.add(ir)), i = Math.max(i, r.distanceToSquared(ge));
3449
3449
  }
3450
3450
  this.boundingSphere.radius = Math.sqrt(i), isNaN(this.boundingSphere.radius) && console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this);
3451
3451
  }
@@ -3534,7 +3534,7 @@ var t1 = jh((O) => {
3534
3534
  }
3535
3535
  if (this.index === null)
3536
3536
  return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."), this;
3537
- const t = new Ue(), r = this.index.array, i = this.attributes;
3537
+ const t = new Re(), r = this.index.array, i = this.attributes;
3538
3538
  for (const o in i) {
3539
3539
  const h = i[o], c = e(h, r);
3540
3540
  t.setAttribute(o, c);
@@ -3636,9 +3636,9 @@ var t1 = jh((O) => {
3636
3636
  this.dispatchEvent({ type: "dispose" });
3637
3637
  }
3638
3638
  }
3639
- const sa = /* @__PURE__ */ new be(), Rt = /* @__PURE__ */ new Do(), pn = /* @__PURE__ */ new xs(), aa = /* @__PURE__ */ new A(), dn = /* @__PURE__ */ new A(), gn = /* @__PURE__ */ new A(), yn = /* @__PURE__ */ new A(), bi = /* @__PURE__ */ new A(), mn = /* @__PURE__ */ new A(), oa = /* @__PURE__ */ new A(), vn = /* @__PURE__ */ new A();
3640
- class Dn extends De {
3641
- constructor(e = new Ue(), t = new zo()) {
3639
+ const sa = /* @__PURE__ */ new be(), Dt = /* @__PURE__ */ new Do(), pn = /* @__PURE__ */ new xs(), aa = /* @__PURE__ */ new A(), dn = /* @__PURE__ */ new A(), gn = /* @__PURE__ */ new A(), yn = /* @__PURE__ */ new A(), bi = /* @__PURE__ */ new A(), mn = /* @__PURE__ */ new A(), oa = /* @__PURE__ */ new A(), vn = /* @__PURE__ */ new A();
3640
+ class Dn extends Me {
3641
+ constructor(e = new Re(), t = new zo()) {
3642
3642
  super(), this.isMesh = !0, this.type = "Mesh", this.geometry = e, this.material = t, this.updateMorphTargets();
3643
3643
  }
3644
3644
  copy(e, t) {
@@ -3673,7 +3673,7 @@ var t1 = jh((O) => {
3673
3673
  }
3674
3674
  raycast(e, t) {
3675
3675
  const r = this.geometry, i = this.material, s = this.matrixWorld;
3676
- i !== void 0 && (r.boundingSphere === null && r.computeBoundingSphere(), pn.copy(r.boundingSphere), pn.applyMatrix4(s), Rt.copy(e.ray).recast(e.near), !(pn.containsPoint(Rt.origin) === !1 && (Rt.intersectSphere(pn, aa) === null || Rt.origin.distanceToSquared(aa) > (e.far - e.near) ** 2)) && (sa.copy(s).invert(), Rt.copy(e.ray).applyMatrix4(sa), !(r.boundingBox !== null && Rt.intersectsBox(r.boundingBox) === !1) && this._computeIntersections(e, t, Rt)));
3676
+ i !== void 0 && (r.boundingSphere === null && r.computeBoundingSphere(), pn.copy(r.boundingSphere), pn.applyMatrix4(s), Dt.copy(e.ray).recast(e.near), !(pn.containsPoint(Dt.origin) === !1 && (Dt.intersectSphere(pn, aa) === null || Dt.origin.distanceToSquared(aa) > (e.far - e.near) ** 2)) && (sa.copy(s).invert(), Dt.copy(e.ray).applyMatrix4(sa), !(r.boundingBox !== null && Dt.intersectsBox(r.boundingBox) === !1) && this._computeIntersections(e, t, Dt)));
3677
3677
  }
3678
3678
  _computeIntersections(e, t, r) {
3679
3679
  let i;
@@ -3749,8 +3749,8 @@ var t1 = jh((O) => {
3749
3749
  }
3750
3750
  }
3751
3751
  const In = /* @__PURE__ */ new A(), Pn = /* @__PURE__ */ new A(), ha = /* @__PURE__ */ new be(), Cr = /* @__PURE__ */ new Do(), bn = /* @__PURE__ */ new xs(), wi = /* @__PURE__ */ new A(), ca = /* @__PURE__ */ new A();
3752
- class bs extends De {
3753
- constructor(e = new Ue(), t = new No()) {
3752
+ class bs extends Me {
3753
+ constructor(e = new Re(), t = new No()) {
3754
3754
  super(), this.isLine = !0, this.type = "Line", this.geometry = e, this.material = t, this.updateMorphTargets();
3755
3755
  }
3756
3756
  copy(e, t) {
@@ -3762,7 +3762,7 @@ var t1 = jh((O) => {
3762
3762
  const t = e.attributes.position, r = [0];
3763
3763
  for (let i = 1, s = t.count; i < s; i++)
3764
3764
  In.fromBufferAttribute(t, i - 1), Pn.fromBufferAttribute(t, i), r[i] = r[i - 1], r[i] += In.distanceTo(Pn);
3765
- e.setAttribute("lineDistance", new Wt(r, 1));
3765
+ e.setAttribute("lineDistance", new qt(r, 1));
3766
3766
  } else
3767
3767
  console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");
3768
3768
  return this;
@@ -3837,13 +3837,13 @@ var t1 = jh((O) => {
3837
3837
  const t = e.attributes.position, r = [];
3838
3838
  for (let i = 0, s = t.count; i < s; i += 2)
3839
3839
  ua.fromBufferAttribute(t, i), la.fromBufferAttribute(t, i + 1), r[i] = i === 0 ? 0 : r[i - 1], r[i + 1] = r[i] + ua.distanceTo(la);
3840
- e.setAttribute("lineDistance", new Wt(r, 1));
3840
+ e.setAttribute("lineDistance", new qt(r, 1));
3841
3841
  } else
3842
3842
  console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");
3843
3843
  return this;
3844
3844
  }
3845
3845
  }
3846
- class fa extends De {
3846
+ class fa extends Me {
3847
3847
  constructor() {
3848
3848
  super(), this.isGroup = !0, this.type = "Group";
3849
3849
  }
@@ -4562,7 +4562,7 @@ var t1 = jh((O) => {
4562
4562
  for (s = t - r; s >= e; s -= r) a = ga(s, n[s], n[s + 1], a);
4563
4563
  return a && Zn(a, a.next) && (Pr(a), a = a.next), a;
4564
4564
  }
4565
- function Vt(n, e) {
4565
+ function Xt(n, e) {
4566
4566
  if (!n) return n;
4567
4567
  e || (e = n);
4568
4568
  let t = n, r;
@@ -4585,7 +4585,7 @@ var t1 = jh((O) => {
4585
4585
  continue;
4586
4586
  }
4587
4587
  if (n = c, n === o) {
4588
- a ? a === 1 ? (n = Rc(Vt(n), e, t), Dr(n, e, t, r, i, s, 2)) : a === 2 && Dc(n, e, t, r, i, s) : Dr(Vt(n), e, t, r, i, s, 1);
4588
+ a ? a === 1 ? (n = Rc(Xt(n), e, t), Dr(n, e, t, r, i, s, 2)) : a === 2 && Dc(n, e, t, r, i, s) : Dr(Xt(n), e, t, r, i, s, 1);
4589
4589
  break;
4590
4590
  }
4591
4591
  }
@@ -4626,7 +4626,7 @@ var t1 = jh((O) => {
4626
4626
  const i = r.prev, s = r.next.next;
4627
4627
  !Zn(i, s) && Wo(i, r, r.next, s) && Ir(i, s) && Ir(s, i) && (e.push(i.i / t | 0), e.push(r.i / t | 0), e.push(s.i / t | 0), Pr(r), Pr(r.next), r = n = s), r = r.next;
4628
4628
  } while (r !== n);
4629
- return Vt(r);
4629
+ return Xt(r);
4630
4630
  }
4631
4631
  function Dc(n, e, t, r, i, s) {
4632
4632
  let a = n;
@@ -4635,7 +4635,7 @@ var t1 = jh((O) => {
4635
4635
  for (; o !== a.prev; ) {
4636
4636
  if (a.i !== o.i && Vc(a, o)) {
4637
4637
  let h = qo(a, o);
4638
- a = Vt(a, a.next), h = Vt(h, h.next), Dr(a, e, t, r, i, s, 0), Dr(h, e, t, r, i, s, 0);
4638
+ a = Xt(a, a.next), h = Xt(h, h.next), Dr(a, e, t, r, i, s, 0), Dr(h, e, t, r, i, s, 0);
4639
4639
  return;
4640
4640
  }
4641
4641
  o = o.next;
@@ -4660,7 +4660,7 @@ var t1 = jh((O) => {
4660
4660
  if (!t)
4661
4661
  return e;
4662
4662
  const r = qo(t, n);
4663
- return Vt(r, r.next), Vt(t, t.next);
4663
+ return Xt(r, r.next), Xt(t, t.next);
4664
4664
  }
4665
4665
  function Nc(n, e) {
4666
4666
  let t = e, r = -1 / 0, i;
@@ -4780,7 +4780,7 @@ var t1 = jh((O) => {
4780
4780
  i += (n[a] - n[s]) * (n[s + 1] + n[a + 1]), a = s;
4781
4781
  return i;
4782
4782
  }
4783
- class kt {
4783
+ class At {
4784
4784
  // calculate area of the contour polygon
4785
4785
  static area(e) {
4786
4786
  const t = e.length;
@@ -4790,7 +4790,7 @@ var t1 = jh((O) => {
4790
4790
  return r * 0.5;
4791
4791
  }
4792
4792
  static isClockWise(e) {
4793
- return kt.area(e) < 0;
4793
+ return At.area(e) < 0;
4794
4794
  }
4795
4795
  static triangulateShape(e, t) {
4796
4796
  const r = [], i = [], s = [];
@@ -4813,7 +4813,7 @@ var t1 = jh((O) => {
4813
4813
  for (let t = 0; t < e.length; t++)
4814
4814
  n.push(e[t].x), n.push(e[t].y);
4815
4815
  }
4816
- class ur extends Ue {
4816
+ class ur extends Re {
4817
4817
  constructor(e = new cr([new V(0, 0.5), new V(-0.5, -0.5), new V(0.5, -0.5)]), t = 12) {
4818
4818
  super(), this.type = "ShapeGeometry", this.parameters = {
4819
4819
  shapes: e,
@@ -4826,17 +4826,17 @@ var t1 = jh((O) => {
4826
4826
  else
4827
4827
  for (let u = 0; u < e.length; u++)
4828
4828
  c(e[u]), this.addGroup(o, h, u), o += h, h = 0;
4829
- this.setIndex(r), this.setAttribute("position", new Wt(i, 3)), this.setAttribute("normal", new Wt(s, 3)), this.setAttribute("uv", new Wt(a, 2));
4829
+ this.setIndex(r), this.setAttribute("position", new qt(i, 3)), this.setAttribute("normal", new qt(s, 3)), this.setAttribute("uv", new qt(a, 2));
4830
4830
  function c(u) {
4831
4831
  const f = i.length / 3, l = u.extractPoints(t);
4832
4832
  let p = l.shape;
4833
4833
  const g = l.holes;
4834
- kt.isClockWise(p) === !1 && (p = p.reverse());
4834
+ At.isClockWise(p) === !1 && (p = p.reverse());
4835
4835
  for (let x = 0, v = g.length; x < v; x++) {
4836
4836
  const w = g[x];
4837
- kt.isClockWise(w) === !0 && (g[x] = w.reverse());
4837
+ At.isClockWise(w) === !0 && (g[x] = w.reverse());
4838
4838
  }
4839
- const m = kt.triangulateShape(p, g);
4839
+ const m = At.triangulateShape(p, g);
4840
4840
  for (let x = 0, v = g.length; x < v; x++) {
4841
4841
  const w = g[x];
4842
4842
  p = p.concat(w);
@@ -5119,7 +5119,7 @@ var t1 = jh((O) => {
5119
5119
  }
5120
5120
  return S;
5121
5121
  }
5122
- const i = kt.isClockWise, s = this.subPaths;
5122
+ const i = At.isClockWise, s = this.subPaths;
5123
5123
  if (s.length === 0) return [];
5124
5124
  let a, o, h;
5125
5125
  const c = [];
@@ -5260,7 +5260,7 @@ var t1 = jh((O) => {
5260
5260
  const i = () => {
5261
5261
  n.removeEventListener("success", s), n.removeEventListener("error", a);
5262
5262
  }, s = () => {
5263
- t(qt(n.result)), i();
5263
+ t(Vt(n.result)), i();
5264
5264
  }, a = () => {
5265
5265
  r(n.error), i();
5266
5266
  };
@@ -5291,7 +5291,7 @@ var t1 = jh((O) => {
5291
5291
  if (e === "store")
5292
5292
  return t.objectStoreNames[1] ? void 0 : t.objectStore(t.objectStoreNames[0]);
5293
5293
  }
5294
- return qt(n[e]);
5294
+ return Vt(n[e]);
5295
5295
  },
5296
5296
  set(n, e, t) {
5297
5297
  return n[e] = t, !0;
@@ -5305,15 +5305,15 @@ var t1 = jh((O) => {
5305
5305
  }
5306
5306
  function su(n) {
5307
5307
  return ru().includes(n) ? function(...e) {
5308
- return n.apply(os(this), e), qt(this.request);
5308
+ return n.apply(os(this), e), Vt(this.request);
5309
5309
  } : function(...e) {
5310
- return qt(n.apply(os(this), e));
5310
+ return Vt(n.apply(os(this), e));
5311
5311
  };
5312
5312
  }
5313
5313
  function au(n) {
5314
5314
  return typeof n == "function" ? su(n) : (n instanceof IDBTransaction && iu(n), is(n, tu()) ? new Proxy(n, as) : n);
5315
5315
  }
5316
- function qt(n) {
5316
+ function Vt(n) {
5317
5317
  if (n instanceof IDBRequest)
5318
5318
  return nu(n);
5319
5319
  if (Ci.has(n))
@@ -5323,9 +5323,9 @@ var t1 = jh((O) => {
5323
5323
  }
5324
5324
  const os = (n) => Jn.get(n);
5325
5325
  function ou(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
5326
- const a = indexedDB.open(n, e), o = qt(a);
5326
+ const a = indexedDB.open(n, e), o = Vt(a);
5327
5327
  return r && a.addEventListener("upgradeneeded", (h) => {
5328
- r(qt(a.result), h.oldVersion, h.newVersion, qt(a.transaction), h);
5328
+ r(Vt(a.result), h.oldVersion, h.newVersion, Vt(a.transaction), h);
5329
5329
  }), t && a.addEventListener("blocked", (h) => t(
5330
5330
  // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
5331
5331
  h.oldVersion,
@@ -5394,14 +5394,14 @@ var t1 = jh((O) => {
5394
5394
  return Fa(e, t) || n.has(e, t);
5395
5395
  }
5396
5396
  }));
5397
- const Pt = {
5397
+ const Nt = {
5398
5398
  fonts: "fonts"
5399
5399
  }, Ai = [
5400
5400
  {
5401
5401
  version: 1,
5402
5402
  stores: [
5403
5403
  {
5404
- name: Pt.fonts,
5404
+ name: Nt.fonts,
5405
5405
  keyPath: "name"
5406
5406
  }
5407
5407
  ]
@@ -5410,7 +5410,7 @@ var t1 = jh((O) => {
5410
5410
  version: 2,
5411
5411
  stores: [
5412
5412
  {
5413
- name: Pt.fonts,
5413
+ name: Nt.fonts,
5414
5414
  keyPath: "name"
5415
5415
  }
5416
5416
  ]
@@ -5433,7 +5433,7 @@ var t1 = jh((O) => {
5433
5433
  * @param fontData The font data to store
5434
5434
  */
5435
5435
  async set(e, t) {
5436
- await (await this.getDatabase()).put(Pt.fonts, { ...t, name: e });
5436
+ await (await this.getDatabase()).put(Nt.fonts, { ...t, name: e });
5437
5437
  }
5438
5438
  /**
5439
5439
  * Gets a font from the cache
@@ -5441,27 +5441,27 @@ var t1 = jh((O) => {
5441
5441
  * @returns The font data if found, undefined otherwise
5442
5442
  */
5443
5443
  async get(e) {
5444
- return await (await this.getDatabase()).get(Pt.fonts, e);
5444
+ return await (await this.getDatabase()).get(Nt.fonts, e);
5445
5445
  }
5446
5446
  /**
5447
5447
  * Deletes a font from the cache
5448
5448
  * @param fileName The font file name (key)
5449
5449
  */
5450
5450
  async delete(e) {
5451
- await (await this.getDatabase()).delete(Pt.fonts, e);
5451
+ await (await this.getDatabase()).delete(Nt.fonts, e);
5452
5452
  }
5453
5453
  /**
5454
5454
  * Gets all fonts from the cache
5455
5455
  * @returns An array of all font data in the cache
5456
5456
  */
5457
5457
  async getAll() {
5458
- return await (await this.getDatabase()).getAll(Pt.fonts);
5458
+ return await (await this.getDatabase()).getAll(Nt.fonts);
5459
5459
  }
5460
5460
  /**
5461
5461
  * Clears all fonts from the cache
5462
5462
  */
5463
5463
  async clear() {
5464
- await (await this.getDatabase()).clear(Pt.fonts);
5464
+ await (await this.getDatabase()).clear(Nt.fonts);
5465
5465
  }
5466
5466
  /**
5467
5467
  * Checks if a font exists in the cache
@@ -6032,25 +6032,25 @@ var t1 = jh((O) => {
6032
6032
  Fs[28] = 0;
6033
6033
  Ts[28] = 258;
6034
6034
  var Su = wu;
6035
- function ir(n, e, t, r, i) {
6035
+ function sr(n, e, t, r, i) {
6036
6036
  return Math.pow(1 - i, 3) * n + 3 * Math.pow(1 - i, 2) * i * e + 3 * (1 - i) * Math.pow(i, 2) * t + Math.pow(i, 3) * r;
6037
6037
  }
6038
- function _t() {
6038
+ function Ot() {
6039
6039
  this.x1 = Number.NaN, this.y1 = Number.NaN, this.x2 = Number.NaN, this.y2 = Number.NaN;
6040
6040
  }
6041
- _t.prototype.isEmpty = function() {
6041
+ Ot.prototype.isEmpty = function() {
6042
6042
  return isNaN(this.x1) || isNaN(this.y1) || isNaN(this.x2) || isNaN(this.y2);
6043
6043
  };
6044
- _t.prototype.addPoint = function(n, e) {
6044
+ Ot.prototype.addPoint = function(n, e) {
6045
6045
  typeof n == "number" && ((isNaN(this.x1) || isNaN(this.x2)) && (this.x1 = n, this.x2 = n), n < this.x1 && (this.x1 = n), n > this.x2 && (this.x2 = n)), typeof e == "number" && ((isNaN(this.y1) || isNaN(this.y2)) && (this.y1 = e, this.y2 = e), e < this.y1 && (this.y1 = e), e > this.y2 && (this.y2 = e));
6046
6046
  };
6047
- _t.prototype.addX = function(n) {
6047
+ Ot.prototype.addX = function(n) {
6048
6048
  this.addPoint(n, null);
6049
6049
  };
6050
- _t.prototype.addY = function(n) {
6050
+ Ot.prototype.addY = function(n) {
6051
6051
  this.addPoint(null, n);
6052
6052
  };
6053
- _t.prototype.addBezier = function(n, e, t, r, i, s, a, o) {
6053
+ Ot.prototype.addBezier = function(n, e, t, r, i, s, a, o) {
6054
6054
  var h = [n, e], c = [t, r], u = [i, s], f = [a, o];
6055
6055
  this.addPoint(n, e), this.addPoint(a, o);
6056
6056
  for (var l = 0; l <= 1; l++) {
@@ -6059,19 +6059,19 @@ var t1 = jh((O) => {
6059
6059
  if (p === 0)
6060
6060
  continue;
6061
6061
  var x = -m / p;
6062
- 0 < x && x < 1 && (l === 0 && this.addX(ir(h[l], c[l], u[l], f[l], x)), l === 1 && this.addY(ir(h[l], c[l], u[l], f[l], x)));
6062
+ 0 < x && x < 1 && (l === 0 && this.addX(sr(h[l], c[l], u[l], f[l], x)), l === 1 && this.addY(sr(h[l], c[l], u[l], f[l], x)));
6063
6063
  continue;
6064
6064
  }
6065
6065
  var v = Math.pow(p, 2) - 4 * m * g;
6066
6066
  if (!(v < 0)) {
6067
6067
  var w = (-p + Math.sqrt(v)) / (2 * g);
6068
- 0 < w && w < 1 && (l === 0 && this.addX(ir(h[l], c[l], u[l], f[l], w)), l === 1 && this.addY(ir(h[l], c[l], u[l], f[l], w)));
6068
+ 0 < w && w < 1 && (l === 0 && this.addX(sr(h[l], c[l], u[l], f[l], w)), l === 1 && this.addY(sr(h[l], c[l], u[l], f[l], w)));
6069
6069
  var b = (-p - Math.sqrt(v)) / (2 * g);
6070
- 0 < b && b < 1 && (l === 0 && this.addX(ir(h[l], c[l], u[l], f[l], b)), l === 1 && this.addY(ir(h[l], c[l], u[l], f[l], b)));
6070
+ 0 < b && b < 1 && (l === 0 && this.addX(sr(h[l], c[l], u[l], f[l], b)), l === 1 && this.addY(sr(h[l], c[l], u[l], f[l], b)));
6071
6071
  }
6072
6072
  }
6073
6073
  };
6074
- _t.prototype.addQuad = function(n, e, t, r, i, s) {
6074
+ Ot.prototype.addQuad = function(n, e, t, r, i, s) {
6075
6075
  var a = n + 0.6666666666666666 * (t - n), o = e + 2 / 3 * (r - e), h = a + 1 / 3 * (i - n), c = o + 1 / 3 * (s - e);
6076
6076
  this.addBezier(n, e, a, o, h, c, i, s);
6077
6077
  };
@@ -6120,7 +6120,7 @@ var t1 = jh((O) => {
6120
6120
  de.prototype.extend = function(n) {
6121
6121
  if (n.commands)
6122
6122
  n = n.commands;
6123
- else if (n instanceof _t) {
6123
+ else if (n instanceof Ot) {
6124
6124
  var e = n;
6125
6125
  this.moveTo(e.x1, e.y1), this.lineTo(e.x2, e.y1), this.lineTo(e.x2, e.y2), this.lineTo(e.x1, e.y2), this.close();
6126
6126
  return;
@@ -6128,7 +6128,7 @@ var t1 = jh((O) => {
6128
6128
  Array.prototype.push.apply(this.commands, n);
6129
6129
  };
6130
6130
  de.prototype.getBoundingBox = function() {
6131
- for (var n = new _t(), e = 0, t = 0, r = 0, i = 0, s = 0; s < this.commands.length; s++) {
6131
+ for (var n = new Ot(), e = 0, t = 0, r = 0, i = 0, s = 0; s < this.commands.length; s++) {
6132
6132
  var a = this.commands[s];
6133
6133
  switch (a.type) {
6134
6134
  case "M":
@@ -8048,7 +8048,7 @@ var t1 = jh((O) => {
8048
8048
  "Yacutesmall",
8049
8049
  "Thornsmall",
8050
8050
  "Ydieresissmall"
8051
- ], zt = [
8051
+ ], Gt = [
8052
8052
  ".notdef",
8053
8053
  ".null",
8054
8054
  "nonmarkingreturn",
@@ -8337,17 +8337,17 @@ var t1 = jh((O) => {
8337
8337
  function ks(n) {
8338
8338
  switch (n.version) {
8339
8339
  case 1:
8340
- this.names = zt.slice();
8340
+ this.names = Gt.slice();
8341
8341
  break;
8342
8342
  case 2:
8343
8343
  this.names = new Array(n.numberOfGlyphs);
8344
8344
  for (var e = 0; e < n.numberOfGlyphs; e++)
8345
- n.glyphNameIndex[e] < zt.length ? this.names[e] = zt[n.glyphNameIndex[e]] : this.names[e] = n.names[n.glyphNameIndex[e] - zt.length];
8345
+ n.glyphNameIndex[e] < Gt.length ? this.names[e] = Gt[n.glyphNameIndex[e]] : this.names[e] = n.names[n.glyphNameIndex[e] - Gt.length];
8346
8346
  break;
8347
8347
  case 2.5:
8348
8348
  this.names = new Array(n.numberOfGlyphs);
8349
8349
  for (var t = 0; t < n.numberOfGlyphs; t++)
8350
- this.names[t] = zt[t + n.glyphNameIndex[t]];
8350
+ this.names[t] = Gt[t + n.glyphNameIndex[t]];
8351
8351
  break;
8352
8352
  case 3:
8353
8353
  this.names = [];
@@ -8386,7 +8386,7 @@ var t1 = jh((O) => {
8386
8386
  function qu(n, e, t, r, i) {
8387
8387
  n.beginPath(), n.moveTo(e, t), n.lineTo(r, i), n.stroke();
8388
8388
  }
8389
- var Dt = { line: qu };
8389
+ var It = { line: qu };
8390
8390
  function Vu(n, e) {
8391
8391
  var t = e || new de();
8392
8392
  return {
@@ -8483,9 +8483,9 @@ var t1 = jh((O) => {
8483
8483
  };
8484
8484
  Ie.prototype.drawMetrics = function(n, e, t, r) {
8485
8485
  var i;
8486
- e = e !== void 0 ? e : 0, t = t !== void 0 ? t : 0, r = r !== void 0 ? r : 24, i = 1 / this.path.unitsPerEm * r, n.lineWidth = 1, n.strokeStyle = "black", Dt.line(n, e, -1e4, e, 1e4), Dt.line(n, -1e4, t, 1e4, t);
8486
+ e = e !== void 0 ? e : 0, t = t !== void 0 ? t : 0, r = r !== void 0 ? r : 24, i = 1 / this.path.unitsPerEm * r, n.lineWidth = 1, n.strokeStyle = "black", It.line(n, e, -1e4, e, 1e4), It.line(n, -1e4, t, 1e4, t);
8487
8487
  var s = this.xMin || 0, a = this.yMin || 0, o = this.xMax || 0, h = this.yMax || 0, c = this.advanceWidth || 0;
8488
- n.strokeStyle = "blue", Dt.line(n, e + s * i, -1e4, e + s * i, 1e4), Dt.line(n, e + o * i, -1e4, e + o * i, 1e4), Dt.line(n, -1e4, t + -a * i, 1e4, t + -a * i), Dt.line(n, -1e4, t + -h * i, 1e4, t + -h * i), n.strokeStyle = "green", Dt.line(n, e + c * i, -1e4, e + c * i, 1e4);
8488
+ n.strokeStyle = "blue", It.line(n, e + s * i, -1e4, e + s * i, 1e4), It.line(n, e + o * i, -1e4, e + o * i, 1e4), It.line(n, -1e4, t + -a * i, 1e4, t + -a * i), It.line(n, -1e4, t + -h * i, 1e4, t + -h * i), n.strokeStyle = "green", It.line(n, e + c * i, -1e4, e + c * i, 1e4);
8489
8489
  };
8490
8490
  function Mn(n, e, t) {
8491
8491
  Object.defineProperty(n, e, {
@@ -10356,7 +10356,7 @@ var t1 = jh((O) => {
10356
10356
  var t = {}, r = new z.Parser(n, e);
10357
10357
  switch (t.version = r.parseVersion(), t.italicAngle = r.parseFixed(), t.underlinePosition = r.parseShort(), t.underlineThickness = r.parseShort(), t.isFixedPitch = r.parseULong(), t.minMemType42 = r.parseULong(), t.maxMemType42 = r.parseULong(), t.minMemType1 = r.parseULong(), t.maxMemType1 = r.parseULong(), t.version) {
10358
10358
  case 1:
10359
- t.names = zt.slice();
10359
+ t.names = Gt.slice();
10360
10360
  break;
10361
10361
  case 2:
10362
10362
  t.numberOfGlyphs = r.parseUShort(), t.glyphNameIndex = new Array(t.numberOfGlyphs);
@@ -10364,7 +10364,7 @@ var t1 = jh((O) => {
10364
10364
  t.glyphNameIndex[i] = r.parseUShort();
10365
10365
  t.names = [];
10366
10366
  for (var s = 0; s < t.numberOfGlyphs; s++)
10367
- if (t.glyphNameIndex[s] >= zt.length) {
10367
+ if (t.glyphNameIndex[s] >= Gt.length) {
10368
10368
  var a = r.parseChar();
10369
10369
  t.names.push(r.parseString(a));
10370
10370
  }
@@ -10810,14 +10810,14 @@ var t1 = jh((O) => {
10810
10810
  fontBBox: [0, b.yMin, b.ascender, b.advanceWidthMax]
10811
10811
  }), W = n.metas && Object.keys(n.metas).length > 0 ? Bh.make(n.metas) : void 0, $ = [S, C, _, E, re, D, ne, ae, B];
10812
10812
  ie && $.push(ie), n.tables.gsub && $.push(Eh.make(n.tables.gsub)), W && $.push(W);
10813
- for (var Yt = _h($), Qr = Yt.encode(), Kr = Ms(Qr), xr = Yt.fields, en = !1, gt = 0; gt < xr.length; gt += 1)
10813
+ for (var Zt = _h($), Qr = Zt.encode(), Kr = Ms(Qr), xr = Zt.fields, en = !1, gt = 0; gt < xr.length; gt += 1)
10814
10814
  if (xr[gt].name === "head table") {
10815
10815
  xr[gt].value.checkSumAdjustment = 2981146554 - Kr, en = !0;
10816
10816
  break;
10817
10817
  }
10818
10818
  if (!en)
10819
10819
  throw new Error("Could not find head table with checkSum to adjust.");
10820
- return Yt;
10820
+ return Zt;
10821
10821
  }
10822
10822
  var Vl = { make: _h, fontToTable: ql, computeCheckSum: Ms };
10823
10823
  function Bi(n, e) {
@@ -11098,7 +11098,7 @@ var t1 = jh((O) => {
11098
11098
  if (this.font.tables.gpos)
11099
11099
  return this.getLookupTables(n, e, "kern", 2);
11100
11100
  };
11101
- function Me(n) {
11101
+ function Ee(n) {
11102
11102
  Xr.call(this, n, "gsub");
11103
11103
  }
11104
11104
  function Xl(n, e) {
@@ -11119,8 +11119,8 @@ var t1 = jh((O) => {
11119
11119
  if (t)
11120
11120
  return r.push(t), t;
11121
11121
  }
11122
- Me.prototype = Xr.prototype;
11123
- Me.prototype.createDefaultTable = function() {
11122
+ Ee.prototype = Xr.prototype;
11123
+ Ee.prototype.createDefaultTable = function() {
11124
11124
  return {
11125
11125
  version: 1,
11126
11126
  scripts: [{
@@ -11134,7 +11134,7 @@ var t1 = jh((O) => {
11134
11134
  lookups: []
11135
11135
  };
11136
11136
  };
11137
- Me.prototype.getSingle = function(n, e, t) {
11137
+ Ee.prototype.getSingle = function(n, e, t) {
11138
11138
  for (var r = [], i = this.getLookupTables(e, t, n, 1), s = 0; s < i.length; s++)
11139
11139
  for (var a = i[s].subtables, o = 0; o < a.length; o++) {
11140
11140
  var h = a[o], c = this.expandCoverage(h.coverage), u = void 0;
@@ -11152,7 +11152,7 @@ var t1 = jh((O) => {
11152
11152
  }
11153
11153
  return r;
11154
11154
  };
11155
- Me.prototype.getMultiple = function(n, e, t) {
11155
+ Ee.prototype.getMultiple = function(n, e, t) {
11156
11156
  for (var r = [], i = this.getLookupTables(e, t, n, 2), s = 0; s < i.length; s++)
11157
11157
  for (var a = i[s].subtables, o = 0; o < a.length; o++) {
11158
11158
  var h = a[o], c = this.expandCoverage(h.coverage), u = void 0;
@@ -11163,14 +11163,14 @@ var t1 = jh((O) => {
11163
11163
  }
11164
11164
  return r;
11165
11165
  };
11166
- Me.prototype.getAlternates = function(n, e, t) {
11166
+ Ee.prototype.getAlternates = function(n, e, t) {
11167
11167
  for (var r = [], i = this.getLookupTables(e, t, n, 3), s = 0; s < i.length; s++)
11168
11168
  for (var a = i[s].subtables, o = 0; o < a.length; o++)
11169
11169
  for (var h = a[o], c = this.expandCoverage(h.coverage), u = h.alternateSets, f = 0; f < c.length; f++)
11170
11170
  r.push({ sub: c[f], by: u[f] });
11171
11171
  return r;
11172
11172
  };
11173
- Me.prototype.getLigatures = function(n, e, t) {
11173
+ Ee.prototype.getLigatures = function(n, e, t) {
11174
11174
  for (var r = [], i = this.getLookupTables(e, t, n, 4), s = 0; s < i.length; s++)
11175
11175
  for (var a = i[s].subtables, o = 0; o < a.length; o++)
11176
11176
  for (var h = a[o], c = this.expandCoverage(h.coverage), u = h.ligatureSets, f = 0; f < c.length; f++)
@@ -11183,7 +11183,7 @@ var t1 = jh((O) => {
11183
11183
  }
11184
11184
  return r;
11185
11185
  };
11186
- Me.prototype.addSingle = function(n, e, t, r) {
11186
+ Ee.prototype.addSingle = function(n, e, t, r) {
11187
11187
  var i = this.getLookupTables(t, r, n, 1, !0)[0], s = Es(i, 2, {
11188
11188
  // lookup type 1 subtable, format 2, coverage format 1
11189
11189
  substFormat: 2,
@@ -11194,7 +11194,7 @@ var t1 = jh((O) => {
11194
11194
  var a = e.sub, o = this.binSearch(s.coverage.glyphs, a);
11195
11195
  o < 0 && (o = -1 - o, s.coverage.glyphs.splice(o, 0, a), s.substitute.splice(o, 0, 0)), s.substitute[o] = e.by;
11196
11196
  };
11197
- Me.prototype.addMultiple = function(n, e, t, r) {
11197
+ Ee.prototype.addMultiple = function(n, e, t, r) {
11198
11198
  H.assert(e.by instanceof Array && e.by.length > 1, 'Multiple: "by" must be an array of two or more ids');
11199
11199
  var i = this.getLookupTables(t, r, n, 2, !0)[0], s = Es(i, 1, {
11200
11200
  // lookup type 2 subtable, format 1, coverage format 1
@@ -11206,7 +11206,7 @@ var t1 = jh((O) => {
11206
11206
  var a = e.sub, o = this.binSearch(s.coverage.glyphs, a);
11207
11207
  o < 0 && (o = -1 - o, s.coverage.glyphs.splice(o, 0, a), s.sequences.splice(o, 0, 0)), s.sequences[o] = e.by;
11208
11208
  };
11209
- Me.prototype.addAlternate = function(n, e, t, r) {
11209
+ Ee.prototype.addAlternate = function(n, e, t, r) {
11210
11210
  var i = this.getLookupTables(t, r, n, 3, !0)[0], s = Es(i, 1, {
11211
11211
  // lookup type 3 subtable, format 1, coverage format 1
11212
11212
  substFormat: 1,
@@ -11217,7 +11217,7 @@ var t1 = jh((O) => {
11217
11217
  var a = e.sub, o = this.binSearch(s.coverage.glyphs, a);
11218
11218
  o < 0 && (o = -1 - o, s.coverage.glyphs.splice(o, 0, a), s.alternateSets.splice(o, 0, 0)), s.alternateSets[o] = e.by;
11219
11219
  };
11220
- Me.prototype.addLigature = function(n, e, t, r) {
11220
+ Ee.prototype.addLigature = function(n, e, t, r) {
11221
11221
  var i = this.getLookupTables(t, r, n, 4, !0)[0], s = i.subtables[0];
11222
11222
  s || (s = {
11223
11223
  // lookup type 4 subtable, format 1, coverage format 1
@@ -11237,7 +11237,7 @@ var t1 = jh((O) => {
11237
11237
  } else
11238
11238
  c = -1 - c, s.coverage.glyphs.splice(c, 0, a), s.ligatureSets.splice(c, 0, [h]);
11239
11239
  };
11240
- Me.prototype.getFeature = function(n, e, t) {
11240
+ Ee.prototype.getFeature = function(n, e, t) {
11241
11241
  if (/ss\d\d/.test(n))
11242
11242
  return this.getSingle(n, e, t);
11243
11243
  switch (n) {
@@ -11254,7 +11254,7 @@ var t1 = jh((O) => {
11254
11254
  return this.getMultiple(n, e, t);
11255
11255
  }
11256
11256
  };
11257
- Me.prototype.add = function(n, e, t, r) {
11257
+ Ee.prototype.add = function(n, e, t, r) {
11258
11258
  if (/ss\d\d/.test(n))
11259
11259
  return this.addSingle(n, e, t, r);
11260
11260
  switch (n) {
@@ -11425,7 +11425,7 @@ var t1 = jh((O) => {
11425
11425
  function Ql(n, e, t, r, i) {
11426
11426
  return i.lowMemory ? jl(n, e, t, r) : $l(n, e, t, r);
11427
11427
  }
11428
- var Rh = { getPath: Lh, parse: Ql }, Dh, Xt, Ih, ms;
11428
+ var Rh = { getPath: Lh, parse: Ql }, Dh, Yt, Ih, ms;
11429
11429
  function Ph(n) {
11430
11430
  this.font = n, this.getCommands = function(e) {
11431
11431
  return Rh.getPath(e).commands;
@@ -11633,7 +11633,7 @@ var t1 = jh((O) => {
11633
11633
  // minimum distance
11634
11634
  autoFlip: !0
11635
11635
  };
11636
- function Tt(n, e) {
11636
+ function Ct(n, e) {
11637
11637
  switch (this.env = n, this.stack = [], this.prog = e, n) {
11638
11638
  case "glyf":
11639
11639
  this.zp0 = this.zp1 = this.zp2 = 1, this.rp0 = this.rp1 = this.rp2 = 0;
@@ -11649,15 +11649,15 @@ var t1 = jh((O) => {
11649
11649
  if (!r || r.ppem !== e) {
11650
11650
  var i = this._fpgmState;
11651
11651
  if (!i) {
11652
- Tt.prototype = sf, i = this._fpgmState = new Tt("fpgm", t.tables.fpgm), i.funcs = [], i.font = t, O.DEBUG && (console.log("---EXEC FPGM---"), i.step = -1);
11652
+ Ct.prototype = sf, i = this._fpgmState = new Ct("fpgm", t.tables.fpgm), i.funcs = [], i.font = t, O.DEBUG && (console.log("---EXEC FPGM---"), i.step = -1);
11653
11653
  try {
11654
- Xt(i);
11654
+ Yt(i);
11655
11655
  } catch (c) {
11656
11656
  console.log("Hinting error in FPGM:" + c), this._errorState = 3;
11657
11657
  return;
11658
11658
  }
11659
11659
  }
11660
- Tt.prototype = i, r = this._prepState = new Tt("prep", t.tables.prep), r.ppem = e;
11660
+ Ct.prototype = i, r = this._prepState = new Ct("prep", t.tables.prep), r.ppem = e;
11661
11661
  var s = t.tables.cvt;
11662
11662
  if (s)
11663
11663
  for (var a = r.cvt = new Array(s.length), o = e / t.unitsPerEm, h = 0; h < s.length; h++)
@@ -11666,7 +11666,7 @@ var t1 = jh((O) => {
11666
11666
  r.cvt = [];
11667
11667
  O.DEBUG && (console.log("---EXEC PREP---"), r.step = -1);
11668
11668
  try {
11669
- Xt(r);
11669
+ Yt(r);
11670
11670
  } catch (c) {
11671
11671
  this._errorState < 2 && console.log("Hinting error in PREP:" + c), this._errorState = 2;
11672
11672
  }
@@ -11682,14 +11682,14 @@ var t1 = jh((O) => {
11682
11682
  };
11683
11683
  Ih = function(n, e) {
11684
11684
  var t = e.ppem / e.font.unitsPerEm, r = t, i = n.components, s, a, o;
11685
- if (Tt.prototype = e, !i)
11686
- o = new Tt("glyf", n.instructions), O.DEBUG && (console.log("---EXEC GLYPH---"), o.step = -1), ms(n, o, t, r), a = o.gZone;
11685
+ if (Ct.prototype = e, !i)
11686
+ o = new Ct("glyf", n.instructions), O.DEBUG && (console.log("---EXEC GLYPH---"), o.step = -1), ms(n, o, t, r), a = o.gZone;
11687
11687
  else {
11688
11688
  var h = e.font;
11689
11689
  a = [], s = [];
11690
11690
  for (var c = 0; c < i.length; c++) {
11691
11691
  var u = i[c], f = h.glyphs.get(u.glyphIndex);
11692
- o = new Tt("glyf", f.instructions), O.DEBUG && (console.log("---EXEC COMP " + c + "---"), o.step = -1), ms(f, o, t, r);
11692
+ o = new Ct("glyf", f.instructions), O.DEBUG && (console.log("---EXEC COMP " + c + "---"), o.step = -1), ms(f, o, t, r);
11693
11693
  for (var l = Math.round(u.dx * t), p = Math.round(u.dy * r), g = o.gZone, m = o.contours, x = 0; x < g.length; x++) {
11694
11694
  var v = g[x];
11695
11695
  v.xTouched = v.yTouched = !1, v.xo = v.x = v.x + l, v.yo = v.y = v.y + p;
@@ -11699,10 +11699,10 @@ var t1 = jh((O) => {
11699
11699
  for (var b = 0; b < m.length; b++)
11700
11700
  s.push(m[b] + w);
11701
11701
  }
11702
- n.instructions && !o.inhibitGridFit && (o = new Tt("glyf", n.instructions), o.gZone = o.z0 = o.z1 = o.z2 = a, o.contours = s, a.push(
11702
+ n.instructions && !o.inhibitGridFit && (o = new Ct("glyf", n.instructions), o.gZone = o.z0 = o.z1 = o.z2 = a, o.contours = s, a.push(
11703
11703
  new dt(0, 0),
11704
11704
  new dt(Math.round(n.advanceWidth * t), 0)
11705
- ), O.DEBUG && (console.log("---EXEC COMPOSITE---"), o.step = -1), Xt(o), a.length -= 2);
11705
+ ), O.DEBUG && (console.log("---EXEC COMPOSITE---"), o.step = -1), Yt(o), a.length -= 2);
11706
11706
  }
11707
11707
  return a;
11708
11708
  };
@@ -11725,14 +11725,14 @@ var t1 = jh((O) => {
11725
11725
  if (a.push(
11726
11726
  new dt(0, 0),
11727
11727
  new dt(Math.round(n.advanceWidth * t), 0)
11728
- ), Xt(e), a.length -= 2, O.DEBUG) {
11728
+ ), Yt(e), a.length -= 2, O.DEBUG) {
11729
11729
  console.log("FINISHED GLYPH", e.stack);
11730
11730
  for (var g = 0; g < s; g++)
11731
11731
  console.log(g, a[g].x, a[g].y);
11732
11732
  }
11733
11733
  }
11734
11734
  };
11735
- Xt = function(n) {
11735
+ Yt = function(n) {
11736
11736
  var e = n.prog;
11737
11737
  if (e) {
11738
11738
  var t = e.length, r;
@@ -11924,7 +11924,7 @@ var t1 = jh((O) => {
11924
11924
  var i = n.ip, s = n.prog;
11925
11925
  n.prog = n.funcs[t];
11926
11926
  for (var a = 0; a < r; a++)
11927
- Xt(n), O.DEBUG && console.log(
11927
+ Yt(n), O.DEBUG && console.log(
11928
11928
  ++n.step,
11929
11929
  a + 1 < r ? "next loopcall" : "done loopcall",
11930
11930
  a
@@ -11935,7 +11935,7 @@ var t1 = jh((O) => {
11935
11935
  var e = n.stack.pop();
11936
11936
  O.DEBUG && console.log(n.step, "CALL[]", e);
11937
11937
  var t = n.ip, r = n.prog;
11938
- n.prog = n.funcs[e], Xt(n), n.ip = t, n.prog = r, O.DEBUG && console.log(++n.step, "returning from", e);
11938
+ n.prog = n.funcs[e], Yt(n), n.ip = t, n.prog = r, O.DEBUG && console.log(++n.step, "returning from", e);
11939
11939
  }
11940
11940
  function Of(n) {
11941
11941
  var e = n.stack, t = e.pop();
@@ -13174,13 +13174,13 @@ var t1 = jh((O) => {
13174
13174
  }
13175
13175
  return this.dispatch("end", [this.tokens]), this.tokens;
13176
13176
  };
13177
- function At(n) {
13177
+ function Mt(n) {
13178
13178
  return /[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(n);
13179
13179
  }
13180
13180
  function Hh(n) {
13181
13181
  return /[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(n);
13182
13182
  }
13183
- function Mt(n) {
13183
+ function Et(n) {
13184
13184
  return /[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(n);
13185
13185
  }
13186
13186
  function Un(n) {
@@ -13189,10 +13189,10 @@ var t1 = jh((O) => {
13189
13189
  function _0(n) {
13190
13190
  return /\s/.test(n);
13191
13191
  }
13192
- function Ee(n) {
13192
+ function Be(n) {
13193
13193
  this.font = n, this.features = {};
13194
13194
  }
13195
- function Nt(n) {
13195
+ function Ht(n) {
13196
13196
  this.id = n.id, this.tag = n.tag, this.substitution = n.substitution;
13197
13197
  }
13198
13198
  function $r(n, e) {
@@ -13245,13 +13245,13 @@ var t1 = jh((O) => {
13245
13245
  var i = e.inputCoverage.length - 1;
13246
13246
  if (n.lookahead.length < e.lookaheadCoverage.length)
13247
13247
  return [];
13248
- for (var s = n.lookahead.slice(i); s.length && Mt(s[0].char); )
13248
+ for (var s = n.lookahead.slice(i); s.length && Et(s[0].char); )
13249
13249
  s.shift();
13250
13250
  var a = new Ye(s, 0), o = Ri(
13251
13251
  e.lookaheadCoverage,
13252
13252
  a
13253
13253
  ), h = [].concat(n.backtrack);
13254
- for (h.reverse(); h.length && Mt(h[0].char); )
13254
+ for (h.reverse(); h.length && Et(h[0].char); )
13255
13255
  h.shift();
13256
13256
  if (h.length < e.backtrackCoverage.length)
13257
13257
  return [];
@@ -13291,7 +13291,7 @@ var t1 = jh((O) => {
13291
13291
  var t = $r(n, e.coverage);
13292
13292
  return t === -1 ? null : e.sequences[t];
13293
13293
  }
13294
- Ee.prototype.getDefaultScriptFeaturesIndexes = function() {
13294
+ Be.prototype.getDefaultScriptFeaturesIndexes = function() {
13295
13295
  for (var n = this.font.tables.gsub.scripts, e = 0; e < n.length; e++) {
13296
13296
  var t = n[e];
13297
13297
  if (t.tag === "DFLT")
@@ -13299,7 +13299,7 @@ var t1 = jh((O) => {
13299
13299
  }
13300
13300
  return [];
13301
13301
  };
13302
- Ee.prototype.getScriptFeaturesIndexes = function(n) {
13302
+ Be.prototype.getScriptFeaturesIndexes = function(n) {
13303
13303
  var e = this.font.tables;
13304
13304
  if (!e.gsub)
13305
13305
  return [];
@@ -13321,14 +13321,14 @@ var t1 = jh((O) => {
13321
13321
  }
13322
13322
  return this.getDefaultScriptFeaturesIndexes();
13323
13323
  };
13324
- Ee.prototype.mapTagsToFeatures = function(n, e) {
13324
+ Be.prototype.mapTagsToFeatures = function(n, e) {
13325
13325
  for (var t = {}, r = 0; r < n.length; r++) {
13326
13326
  var i = n[r].tag, s = n[r].feature;
13327
13327
  t[i] = s;
13328
13328
  }
13329
13329
  this.features[e].tags = t;
13330
13330
  };
13331
- Ee.prototype.getScriptFeatures = function(n) {
13331
+ Be.prototype.getScriptFeatures = function(n) {
13332
13332
  var e = this.features[n];
13333
13333
  if (this.features.hasOwnProperty(n))
13334
13334
  return e;
@@ -13340,11 +13340,11 @@ var t1 = jh((O) => {
13340
13340
  return r.features[i];
13341
13341
  }), this.features[n] = e, this.mapTagsToFeatures(e, n), e;
13342
13342
  };
13343
- Ee.prototype.getSubstitutionType = function(n, e) {
13343
+ Be.prototype.getSubstitutionType = function(n, e) {
13344
13344
  var t = n.lookupType.toString(), r = e.substFormat.toString();
13345
13345
  return t + r;
13346
13346
  };
13347
- Ee.prototype.getLookupMethod = function(n, e) {
13347
+ Be.prototype.getLookupMethod = function(n, e) {
13348
13348
  var t = this, r = this.getSubstitutionType(n, e);
13349
13349
  switch (r) {
13350
13350
  case "11":
@@ -13388,7 +13388,7 @@ var t1 = jh((O) => {
13388
13388
  );
13389
13389
  }
13390
13390
  };
13391
- Ee.prototype.lookupFeature = function(n) {
13391
+ Be.prototype.lookupFeature = function(n) {
13392
13392
  var e = n.contextParams, t = e.index, r = this.getFeature({
13393
13393
  tag: n.tag,
13394
13394
  script: n.script
@@ -13402,35 +13402,35 @@ var t1 = jh((O) => {
13402
13402
  var u = h[c], f = this.getSubstitutionType(o, u), l = this.getLookupMethod(o, u), p = void 0;
13403
13403
  switch (f) {
13404
13404
  case "11":
13405
- p = l(e.current), p && s.splice(t, 1, new Nt({
13405
+ p = l(e.current), p && s.splice(t, 1, new Ht({
13406
13406
  id: 11,
13407
13407
  tag: n.tag,
13408
13408
  substitution: p
13409
13409
  }));
13410
13410
  break;
13411
13411
  case "12":
13412
- p = l(e.current), p && s.splice(t, 1, new Nt({
13412
+ p = l(e.current), p && s.splice(t, 1, new Ht({
13413
13413
  id: 12,
13414
13414
  tag: n.tag,
13415
13415
  substitution: p
13416
13416
  }));
13417
13417
  break;
13418
13418
  case "63":
13419
- p = l(e), Array.isArray(p) && p.length && s.splice(t, 1, new Nt({
13419
+ p = l(e), Array.isArray(p) && p.length && s.splice(t, 1, new Ht({
13420
13420
  id: 63,
13421
13421
  tag: n.tag,
13422
13422
  substitution: p
13423
13423
  }));
13424
13424
  break;
13425
13425
  case "41":
13426
- p = l(e), p && s.splice(t, 1, new Nt({
13426
+ p = l(e), p && s.splice(t, 1, new Ht({
13427
13427
  id: 41,
13428
13428
  tag: n.tag,
13429
13429
  substitution: p
13430
13430
  }));
13431
13431
  break;
13432
13432
  case "21":
13433
- p = l(e.current), p && s.splice(t, 1, new Nt({
13433
+ p = l(e.current), p && s.splice(t, 1, new Ht({
13434
13434
  id: 21,
13435
13435
  tag: n.tag,
13436
13436
  substitution: p
@@ -13441,7 +13441,7 @@ var t1 = jh((O) => {
13441
13441
  }
13442
13442
  return s.length ? s : null;
13443
13443
  };
13444
- Ee.prototype.supports = function(n) {
13444
+ Be.prototype.supports = function(n) {
13445
13445
  if (!n.script)
13446
13446
  return !1;
13447
13447
  this.getScriptFeatures(n.script);
@@ -13453,17 +13453,17 @@ var t1 = jh((O) => {
13453
13453
  });
13454
13454
  return e && t;
13455
13455
  };
13456
- Ee.prototype.getLookupSubtables = function(n) {
13456
+ Be.prototype.getLookupSubtables = function(n) {
13457
13457
  return n.subtables || null;
13458
13458
  };
13459
- Ee.prototype.getLookupByIndex = function(n) {
13459
+ Be.prototype.getLookupByIndex = function(n) {
13460
13460
  var e = this.font.tables.gsub.lookups;
13461
13461
  return e[n] || null;
13462
13462
  };
13463
- Ee.prototype.getFeatureLookups = function(n) {
13463
+ Be.prototype.getFeatureLookups = function(n) {
13464
13464
  return n.lookupListIndexes.map(this.getLookupByIndex.bind(this));
13465
13465
  };
13466
- Ee.prototype.getFeature = function(e) {
13466
+ Be.prototype.getFeature = function(e) {
13467
13467
  if (!this.font)
13468
13468
  return { FAIL: "No font was found" };
13469
13469
  this.features.hasOwnProperty(e.script) || this.getScriptFeatures(e.script);
@@ -13474,8 +13474,8 @@ var t1 = jh((O) => {
13474
13474
  var e = n.current, t = n.get(-1);
13475
13475
  return (
13476
13476
  // ? arabic first char
13477
- t === null && At(e) || // ? arabic char preceded with a non arabic char
13478
- !At(t) && At(e)
13477
+ t === null && Mt(e) || // ? arabic char preceded with a non arabic char
13478
+ !Mt(t) && Mt(e)
13479
13479
  );
13480
13480
  }
13481
13481
  function P0(n) {
@@ -13483,7 +13483,7 @@ var t1 = jh((O) => {
13483
13483
  return (
13484
13484
  // ? last arabic char
13485
13485
  e === null || // ? next char is not arabic
13486
- !At(e)
13486
+ !Mt(e)
13487
13487
  );
13488
13488
  }
13489
13489
  var z0 = {
@@ -13494,7 +13494,7 @@ var t1 = jh((O) => {
13494
13494
  var e = n.current, t = n.get(-1);
13495
13495
  return (
13496
13496
  // ? an arabic char preceded with a non arabic char
13497
- (At(e) || Mt(e)) && !At(t)
13497
+ (Mt(e) || Et(e)) && !Mt(t)
13498
13498
  );
13499
13499
  }
13500
13500
  function G0(n) {
@@ -13502,7 +13502,7 @@ var t1 = jh((O) => {
13502
13502
  switch (!0) {
13503
13503
  case e === null:
13504
13504
  return !0;
13505
- case (!At(e) && !Mt(e)):
13505
+ case (!Mt(e) && !Et(e)):
13506
13506
  var t = _0(e);
13507
13507
  if (!t)
13508
13508
  return !0;
@@ -13510,7 +13510,7 @@ var t1 = jh((O) => {
13510
13510
  var r = !1;
13511
13511
  if (r = n.lookahead.some(
13512
13512
  function(i) {
13513
- return At(i) || Mt(i);
13513
+ return Mt(i) || Et(i);
13514
13514
  }
13515
13515
  ), !r)
13516
13516
  return !0;
@@ -13549,11 +13549,11 @@ var t1 = jh((O) => {
13549
13549
  41: X0
13550
13550
  };
13551
13551
  function _s(n, e, t) {
13552
- n instanceof Nt && oo[n.id] && oo[n.id](n, e, t);
13552
+ n instanceof Ht && oo[n.id] && oo[n.id](n, e, t);
13553
13553
  }
13554
13554
  function Y0(n) {
13555
13555
  for (var e = [].concat(n.backtrack), t = e.length - 1; t >= 0; t--) {
13556
- var r = e[t], i = Hh(r), s = Mt(r);
13556
+ var r = e[t], i = Hh(r), s = Et(r);
13557
13557
  if (!i && !s)
13558
13558
  return !0;
13559
13559
  if (i)
@@ -13565,7 +13565,7 @@ var t1 = jh((O) => {
13565
13565
  if (Hh(n.current))
13566
13566
  return !1;
13567
13567
  for (var e = 0; e < n.lookahead.length; e++) {
13568
- var t = n.lookahead[e], r = Mt(t);
13568
+ var t = n.lookahead[e], r = Et(t);
13569
13569
  if (!r)
13570
13570
  return !0;
13571
13571
  }
@@ -13590,7 +13590,7 @@ var t1 = jh((O) => {
13590
13590
  0
13591
13591
  );
13592
13592
  i.forEach(function(o, h) {
13593
- if (!Mt(o.char)) {
13593
+ if (!Et(o.char)) {
13594
13594
  s.setCurrentIndex(h), a.setCurrentIndex(h);
13595
13595
  var c = 0;
13596
13596
  Y0(a) && (c |= 1), Z0(a) && (c |= 2);
@@ -13615,7 +13615,7 @@ var t1 = jh((O) => {
13615
13615
  if (f instanceof Error)
13616
13616
  return console.info(f.message);
13617
13617
  f.forEach(function(l, p) {
13618
- l instanceof Nt && (_s(l, i, p), s.context[p] = l.substitution);
13618
+ l instanceof Ht && (_s(l, i, p), s.context[p] = l.substitution);
13619
13619
  });
13620
13620
  }
13621
13621
  }
@@ -13732,7 +13732,7 @@ var t1 = jh((O) => {
13732
13732
  throw new Error(
13733
13733
  "No valid font was provided to apply features"
13734
13734
  );
13735
- this.query || (this.query = new Ee(n));
13735
+ this.query || (this.query = new Be(n));
13736
13736
  for (var t = 0; t < e.length; t++) {
13737
13737
  var r = e[t];
13738
13738
  this.query.supports({ script: r.script }) && this.registerFeatures(r.script, r.tags);
@@ -13829,7 +13829,7 @@ var t1 = jh((O) => {
13829
13829
  usWidthClass: n.widthClass || this.usWidthClasses.MEDIUM,
13830
13830
  fsSelection: n.fsSelection || this.fsSelectionValues.REGULAR
13831
13831
  }, n.tables.os2)
13832
- })), this.supported = !0, this.glyphs = new rt.GlyphSet(this, n.glyphs || []), this.encoding = new oh(this), this.position = new Yr(this), this.substitution = new Me(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
13832
+ })), this.supported = !0, this.glyphs = new rt.GlyphSet(this, n.glyphs || []), this.encoding = new oh(this), this.position = new Yr(this), this.substitution = new Ee(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
13833
13833
  get: function() {
13834
13834
  if (this._hinting)
13835
13835
  return this._hinting;
@@ -14452,7 +14452,7 @@ var t1 = jh((O) => {
14452
14452
  return i;
14453
14453
  }
14454
14454
  function lo(n, e = !1) {
14455
- const t = n[0].index !== null, r = new Set(Object.keys(n[0].attributes)), i = new Set(Object.keys(n[0].morphAttributes)), s = {}, a = {}, o = n[0].morphTargetsRelative, h = new Ue();
14455
+ const t = n[0].index !== null, r = new Set(Object.keys(n[0].attributes)), i = new Set(Object.keys(n[0].morphAttributes)), s = {}, a = {}, o = n[0].morphTargetsRelative, h = new Re();
14456
14456
  let c = 0;
14457
14457
  for (let u = 0; u < n.length; ++u) {
14458
14458
  const f = n[u];
@@ -14806,7 +14806,7 @@ var t1 = jh((O) => {
14806
14806
  let i = null, s = 1 / 0;
14807
14807
  for (let a = 0; a < e; a++)
14808
14808
  if (r !== a && n[r].every((o) => zp(o, n[a]))) {
14809
- const o = Math.abs(kt.area(n[a]));
14809
+ const o = Math.abs(At.area(n[a]));
14810
14810
  o < s && (s = o, i = a);
14811
14811
  }
14812
14812
  t[r] = i;
@@ -14865,7 +14865,7 @@ var t1 = jh((O) => {
14865
14865
  return e;
14866
14866
  }
14867
14867
  function go(n, e) {
14868
- const t = kt.area(n.getPoints(32)) > 0, r = e === t ? n.curves.slice() : Wp(n.curves), i = new cr();
14868
+ const t = At.area(n.getPoints(32)) > 0, r = e === t ? n.curves.slice() : Wp(n.curves), i = new cr();
14869
14869
  return i.curves.push(...r), i;
14870
14870
  }
14871
14871
  function qp(n, e = 32) {
@@ -15244,7 +15244,7 @@ var t1 = jh((O) => {
15244
15244
  return t.trim();
15245
15245
  }
15246
15246
  }
15247
- const Re = 10, Zp = [13, 10, 0];
15247
+ const De = 10, Zp = [13, 10, 0];
15248
15248
  class Jp {
15249
15249
  parse(e) {
15250
15250
  try {
@@ -15270,8 +15270,8 @@ var t1 = jh((O) => {
15270
15270
  info: "",
15271
15271
  baseUp: 8,
15272
15272
  baseDown: 2,
15273
- height: Re,
15274
- width: Re,
15273
+ height: De,
15274
+ width: De,
15275
15275
  orientation: "horizontal",
15276
15276
  isExtended: !1
15277
15277
  };
@@ -15292,8 +15292,8 @@ var t1 = jh((O) => {
15292
15292
  info: "Failed to parse font file",
15293
15293
  baseUp: 8,
15294
15294
  baseDown: 2,
15295
- height: Re,
15296
- width: Re,
15295
+ height: De,
15296
+ width: De,
15297
15297
  orientation: "horizontal",
15298
15298
  isExtended: !1
15299
15299
  };
@@ -15327,8 +15327,8 @@ var t1 = jh((O) => {
15327
15327
  info: "",
15328
15328
  baseUp: 8,
15329
15329
  baseDown: 2,
15330
- height: Re,
15331
- width: Re,
15330
+ height: De,
15331
+ width: De,
15332
15332
  orientation: "horizontal",
15333
15333
  isExtended: !1
15334
15334
  };
@@ -15349,8 +15349,8 @@ var t1 = jh((O) => {
15349
15349
  info: "Failed to parse font file",
15350
15350
  baseUp: 8,
15351
15351
  baseDown: 2,
15352
- height: Re,
15353
- width: Re,
15352
+ height: De,
15353
+ width: De,
15354
15354
  orientation: "horizontal",
15355
15355
  isExtended: !1
15356
15356
  };
@@ -15402,8 +15402,8 @@ var t1 = jh((O) => {
15402
15402
  info: "",
15403
15403
  baseUp: 8,
15404
15404
  baseDown: 2,
15405
- height: Re,
15406
- width: Re,
15405
+ height: De,
15406
+ width: De,
15407
15407
  orientation: "horizontal",
15408
15408
  isExtended: !1
15409
15409
  };
@@ -15437,8 +15437,8 @@ var t1 = jh((O) => {
15437
15437
  info: "Failed to parse font file",
15438
15438
  baseUp: 8,
15439
15439
  baseDown: 2,
15440
- height: Re,
15441
- width: Re,
15440
+ height: De,
15441
+ width: De,
15442
15442
  orientation: "horizontal",
15443
15443
  isExtended: !1
15444
15444
  };
@@ -16206,11 +16206,11 @@ var t1 = jh((O) => {
16206
16206
  Qn.byteLength = ad;
16207
16207
  Qn.toByteArray = hd;
16208
16208
  Qn.fromByteArray = ld;
16209
- var et = [], _e = [], id = typeof Uint8Array < "u" ? Uint8Array : Array, Ii = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
16210
- for (var sr = 0, sd = Ii.length; sr < sd; ++sr)
16211
- et[sr] = Ii[sr], _e[Ii.charCodeAt(sr)] = sr;
16212
- _e[45] = 62;
16213
- _e[95] = 63;
16209
+ var et = [], Oe = [], id = typeof Uint8Array < "u" ? Uint8Array : Array, Ii = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
16210
+ for (var ar = 0, sd = Ii.length; ar < sd; ++ar)
16211
+ et[ar] = Ii[ar], Oe[Ii.charCodeAt(ar)] = ar;
16212
+ Oe[45] = 62;
16213
+ Oe[95] = 63;
16214
16214
  function Vh(n) {
16215
16215
  var e = n.length;
16216
16216
  if (e % 4 > 0)
@@ -16230,8 +16230,8 @@ var t1 = jh((O) => {
16230
16230
  function hd(n) {
16231
16231
  var e, t = Vh(n), r = t[0], i = t[1], s = new id(od(n, r, i)), a = 0, o = i > 0 ? r - 4 : r, h;
16232
16232
  for (h = 0; h < o; h += 4)
16233
- e = _e[n.charCodeAt(h)] << 18 | _e[n.charCodeAt(h + 1)] << 12 | _e[n.charCodeAt(h + 2)] << 6 | _e[n.charCodeAt(h + 3)], s[a++] = e >> 16 & 255, s[a++] = e >> 8 & 255, s[a++] = e & 255;
16234
- return i === 2 && (e = _e[n.charCodeAt(h)] << 2 | _e[n.charCodeAt(h + 1)] >> 4, s[a++] = e & 255), i === 1 && (e = _e[n.charCodeAt(h)] << 10 | _e[n.charCodeAt(h + 1)] << 4 | _e[n.charCodeAt(h + 2)] >> 2, s[a++] = e >> 8 & 255, s[a++] = e & 255), s;
16233
+ e = Oe[n.charCodeAt(h)] << 18 | Oe[n.charCodeAt(h + 1)] << 12 | Oe[n.charCodeAt(h + 2)] << 6 | Oe[n.charCodeAt(h + 3)], s[a++] = e >> 16 & 255, s[a++] = e >> 8 & 255, s[a++] = e & 255;
16234
+ return i === 2 && (e = Oe[n.charCodeAt(h)] << 2 | Oe[n.charCodeAt(h + 1)] >> 4, s[a++] = e & 255), i === 1 && (e = Oe[n.charCodeAt(h)] << 10 | Oe[n.charCodeAt(h + 1)] << 4 | Oe[n.charCodeAt(h + 2)] >> 2, s[a++] = e >> 8 & 255, s[a++] = e & 255), s;
16235
16235
  }
16236
16236
  function cd(n) {
16237
16237
  return et[n >> 18 & 63] + et[n >> 12 & 63] + et[n >> 6 & 63] + et[n & 63];
@@ -16910,12 +16910,12 @@ var t1 = jh((O) => {
16910
16910
  }, o.prototype.writeInt32BE = function(d, y, T) {
16911
16911
  return d = +d, y = y >>> 0, T || $(this, d, y, 4, 2147483647, -2147483648), d < 0 && (d = 4294967295 + d + 1), this[y] = d >>> 24, this[y + 1] = d >>> 16, this[y + 2] = d >>> 8, this[y + 3] = d & 255, y + 4;
16912
16912
  };
16913
- function Yt(F, d, y, T, k, L) {
16913
+ function Zt(F, d, y, T, k, L) {
16914
16914
  if (y + T > F.length) throw new RangeError("Index out of range");
16915
16915
  if (y < 0) throw new RangeError("Index out of range");
16916
16916
  }
16917
16917
  function Qr(F, d, y, T, k) {
16918
- return d = +d, y = y >>> 0, k || Yt(F, d, y, 4), t.write(F, d, y, T, 23, 4), y + 4;
16918
+ return d = +d, y = y >>> 0, k || Zt(F, d, y, 4), t.write(F, d, y, T, 23, 4), y + 4;
16919
16919
  }
16920
16920
  o.prototype.writeFloatLE = function(d, y, T) {
16921
16921
  return Qr(this, d, y, !0, T);
@@ -16923,7 +16923,7 @@ var t1 = jh((O) => {
16923
16923
  return Qr(this, d, y, !1, T);
16924
16924
  };
16925
16925
  function Kr(F, d, y, T, k) {
16926
- return d = +d, y = y >>> 0, k || Yt(F, d, y, 8), t.write(F, d, y, T, 52, 8), y + 8;
16926
+ return d = +d, y = y >>> 0, k || Zt(F, d, y, 8), t.write(F, d, y, T, 52, 8), y + 8;
16927
16927
  }
16928
16928
  o.prototype.writeDoubleLE = function(d, y, T) {
16929
16929
  return Kr(this, d, y, !0, T);
@@ -17060,13 +17060,13 @@ var t1 = jh((O) => {
17060
17060
  return d;
17061
17061
  }();
17062
17062
  })(Ls);
17063
- var Rn = Ls, fr = Rn.Buffer, Oe = {}, Le;
17064
- for (Le in Rn)
17065
- Rn.hasOwnProperty(Le) && (Le === "SlowBuffer" || Le === "Buffer" || (Oe[Le] = Rn[Le]));
17066
- var pr = Oe.Buffer = {};
17067
- for (Le in fr)
17068
- fr.hasOwnProperty(Le) && (Le === "allocUnsafe" || Le === "allocUnsafeSlow" || (pr[Le] = fr[Le]));
17069
- Oe.Buffer.prototype = fr.prototype;
17063
+ var Rn = Ls, fr = Rn.Buffer, Le = {}, Ue;
17064
+ for (Ue in Rn)
17065
+ Rn.hasOwnProperty(Ue) && (Ue === "SlowBuffer" || Ue === "Buffer" || (Le[Ue] = Rn[Ue]));
17066
+ var pr = Le.Buffer = {};
17067
+ for (Ue in fr)
17068
+ fr.hasOwnProperty(Ue) && (Ue === "allocUnsafe" || Ue === "allocUnsafeSlow" || (pr[Ue] = fr[Ue]));
17069
+ Le.Buffer.prototype = fr.prototype;
17070
17070
  (!pr.from || pr.from === Uint8Array.from) && (pr.from = function(n, e, t) {
17071
17071
  if (typeof n == "number")
17072
17072
  throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof n);
@@ -17082,15 +17082,15 @@ var t1 = jh((O) => {
17082
17082
  var r = fr(n);
17083
17083
  return !e || e.length === 0 ? r.fill(0) : typeof t == "string" ? r.fill(e, t) : r.fill(e), r;
17084
17084
  });
17085
- if (!Oe.kStringMaxLength)
17085
+ if (!Le.kStringMaxLength)
17086
17086
  try {
17087
- Oe.kStringMaxLength = process.binding("buffer").kStringMaxLength;
17087
+ Le.kStringMaxLength = process.binding("buffer").kStringMaxLength;
17088
17088
  } catch {
17089
17089
  }
17090
- Oe.constants || (Oe.constants = {
17091
- MAX_LENGTH: Oe.kMaxLength
17092
- }, Oe.kStringMaxLength && (Oe.constants.MAX_STRING_LENGTH = Oe.kStringMaxLength));
17093
- var Ot = Oe, Rs = {}, Xh = "\uFEFF";
17090
+ Le.constants || (Le.constants = {
17091
+ MAX_LENGTH: Le.kMaxLength
17092
+ }, Le.kStringMaxLength && (Le.constants.MAX_STRING_LENGTH = Le.kStringMaxLength));
17093
+ var Lt = Le, Rs = {}, Xh = "\uFEFF";
17094
17094
  Rs.PrependBOM = Ds;
17095
17095
  function Ds(n, e) {
17096
17096
  this.encoder = n, this.addBOM = !0;
@@ -17313,7 +17313,7 @@ var t1 = jh((O) => {
17313
17313
  function yd() {
17314
17314
  if (xo) return Ni;
17315
17315
  xo = 1;
17316
- var n = Ot.Buffer;
17316
+ var n = Lt.Buffer;
17317
17317
  Ni = {
17318
17318
  // Encodings
17319
17319
  utf8: { type: "_internal", bomAware: !0 },
@@ -17400,7 +17400,7 @@ var t1 = jh((O) => {
17400
17400
  function md() {
17401
17401
  if (bo) return ut;
17402
17402
  bo = 1;
17403
- var n = Ot.Buffer;
17403
+ var n = Lt.Buffer;
17404
17404
  ut._utf32 = e;
17405
17405
  function e(c, u) {
17406
17406
  this.iconv = u, this.bomAware = !0, this.isLE = c.isLE;
@@ -17519,7 +17519,7 @@ var t1 = jh((O) => {
17519
17519
  function vd() {
17520
17520
  if (wo) return _n;
17521
17521
  wo = 1;
17522
- var n = Ot.Buffer;
17522
+ var n = Lt.Buffer;
17523
17523
  _n.utf16be = e;
17524
17524
  function e() {
17525
17525
  }
@@ -17605,7 +17605,7 @@ var t1 = jh((O) => {
17605
17605
  function xd() {
17606
17606
  if (So) return Ar;
17607
17607
  So = 1;
17608
- var n = Ot.Buffer;
17608
+ var n = Lt.Buffer;
17609
17609
  Ar.utf7 = e, Ar.unicode11utf7 = "utf7";
17610
17610
  function e(m, x) {
17611
17611
  this.iconv = x;
@@ -17701,7 +17701,7 @@ var t1 = jh((O) => {
17701
17701
  function bd() {
17702
17702
  if (Fo) return Gi;
17703
17703
  Fo = 1;
17704
- var n = Ot.Buffer;
17704
+ var n = Lt.Buffer;
17705
17705
  Gi._sbcs = e;
17706
17706
  function e(i, s) {
17707
17707
  if (!i)
@@ -18347,7 +18347,7 @@ var t1 = jh((O) => {
18347
18347
  function Fd() {
18348
18348
  if (ko) return qi;
18349
18349
  ko = 1;
18350
- var n = Ot.Buffer;
18350
+ var n = Lt.Buffer;
18351
18351
  qi._dbcs = h;
18352
18352
  for (var e = -1, t = -2, r = -10, i = -1e3, s = new Array(256), a = -1, o = 0; o < 256; o++)
18353
18353
  s[o] = e;
@@ -27119,7 +27119,7 @@ var t1 = jh((O) => {
27119
27119
  function Ld() {
27120
27120
  if (_o) return Yi;
27121
27121
  _o = 1;
27122
- var n = Ot.Buffer;
27122
+ var n = Lt.Buffer;
27123
27123
  return Yi = function(e) {
27124
27124
  var t = e.Transform;
27125
27125
  function r(s, a) {
@@ -27190,7 +27190,7 @@ var t1 = jh((O) => {
27190
27190
  default: Ud
27191
27191
  }, Symbol.toStringTag, { value: "Module" })), Dd = /* @__PURE__ */ nd(Rd);
27192
27192
  (function(n) {
27193
- var e = Ot.Buffer, t = Rs, r = Yh, i = n.exports;
27193
+ var e = Lt.Buffer, t = Rs, r = Yh, i = n.exports;
27194
27194
  i.encodings = null, i.defaultCharUnicode = "�", i.defaultCharSingleByte = "?", i.encode = function(o, h, c) {
27195
27195
  o = "" + (o || "");
27196
27196
  var u = i.getEncoder(h, c), f = u.write(o), l = u.end();
@@ -27290,7 +27290,7 @@ var t1 = jh((O) => {
27290
27290
  if (e == null) {
27291
27291
  const t = this.shape.polylines, r = [], i = [];
27292
27292
  let s = 0;
27293
- e = new Ue();
27293
+ e = new Re();
27294
27294
  for (let a = 0; a < t.length; a++) {
27295
27295
  const o = t[a];
27296
27296
  for (let h = 0; h < o.length; h++) {
@@ -27300,7 +27300,7 @@ var t1 = jh((O) => {
27300
27300
  }
27301
27301
  e.setAttribute(
27302
27302
  "position",
27303
- new Wt(r, 3)
27303
+ new qt(r, 3)
27304
27304
  ), e.setIndex(i);
27305
27305
  }
27306
27306
  return e;
@@ -27396,7 +27396,7 @@ var t1 = jh((O) => {
27396
27396
  return e.charCodeAt(0);
27397
27397
  }
27398
27398
  }
27399
- class Ct {
27399
+ class kt {
27400
27400
  constructor() {
27401
27401
  }
27402
27402
  /**
@@ -27404,7 +27404,7 @@ var t1 = jh((O) => {
27404
27404
  * @returns The FontFactory instance
27405
27405
  */
27406
27406
  static get instance() {
27407
- return Ct._instance || (Ct._instance = new Ct()), Ct._instance;
27407
+ return kt._instance || (kt._instance = new kt()), kt._instance;
27408
27408
  }
27409
27409
  /**
27410
27410
  * Creates a font instance based on the provided font data.
@@ -27628,12 +27628,12 @@ var t1 = jh((O) => {
27628
27628
  return;
27629
27629
  const s = await Or.instance.get(i);
27630
27630
  if (s) {
27631
- const a = Ct.instance.createFont(s);
27631
+ const a = kt.instance.createFont(s);
27632
27632
  this.loadedFontMap.set(i, a);
27633
27633
  } else {
27634
27634
  const a = await this.loader.loadAsync(e.url);
27635
27635
  r.data = a;
27636
- const o = Ct.instance.createFont(r);
27636
+ const o = kt.instance.createFont(r);
27637
27637
  o && (e.name.forEach((h) => o.names.add(h)), this.loadedFontMap.set(i, o), this.enableFontCache && await Or.instance.set(i, r));
27638
27638
  }
27639
27639
  this.events.fontLoaded.dispatch({
@@ -27660,7 +27660,7 @@ var t1 = jh((O) => {
27660
27660
  const { name: r } = t;
27661
27661
  if (this.fileNames && !this.fileNames.includes(r))
27662
27662
  continue;
27663
- const i = Ct.instance.createFont(t);
27663
+ const i = kt.instance.createFont(t);
27664
27664
  this.loadedFontMap.set(r, i);
27665
27665
  }
27666
27666
  }
@@ -27809,7 +27809,7 @@ var t1 = jh((O) => {
27809
27809
  return e.isByLayer && e.layer ? `layer_${e.layer}_${e.color}` : `entity_${e.color}`;
27810
27810
  }
27811
27811
  }
27812
- var ar = /* @__PURE__ */ ((n) => (n[n.NONE = 0] = "NONE", n[n.WORD = 1] = "WORD", n[n.STACK = 2] = "STACK", n[n.SPACE = 3] = "SPACE", n[n.NBSP = 4] = "NBSP", n[n.TABULATOR = 5] = "TABULATOR", n[n.NEW_PARAGRAPH = 6] = "NEW_PARAGRAPH", n[n.NEW_COLUMN = 7] = "NEW_COLUMN", n[n.WRAP_AT_DIMLINE = 8] = "WRAP_AT_DIMLINE", n[n.PROPERTIES_CHANGED = 9] = "PROPERTIES_CHANGED", n))(ar || {}), Mr = /* @__PURE__ */ ((n) => (n[n.BOTTOM = 0] = "BOTTOM", n[n.MIDDLE = 1] = "MIDDLE", n[n.TOP = 2] = "TOP", n))(Mr || {}), We = /* @__PURE__ */ ((n) => (n[n.DEFAULT = 0] = "DEFAULT", n[n.LEFT = 1] = "LEFT", n[n.RIGHT = 2] = "RIGHT", n[n.CENTER = 3] = "CENTER", n[n.JUSTIFIED = 4] = "JUSTIFIED", n[n.DISTRIBUTED = 5] = "DISTRIBUTED", n))(We || {});
27812
+ var zt = /* @__PURE__ */ ((n) => (n[n.NONE = 0] = "NONE", n[n.WORD = 1] = "WORD", n[n.STACK = 2] = "STACK", n[n.SPACE = 3] = "SPACE", n[n.NBSP = 4] = "NBSP", n[n.TABULATOR = 5] = "TABULATOR", n[n.NEW_PARAGRAPH = 6] = "NEW_PARAGRAPH", n[n.NEW_COLUMN = 7] = "NEW_COLUMN", n[n.WRAP_AT_DIMLINE = 8] = "WRAP_AT_DIMLINE", n[n.PROPERTIES_CHANGED = 9] = "PROPERTIES_CHANGED", n))(zt || {}), Mr = /* @__PURE__ */ ((n) => (n[n.BOTTOM = 0] = "BOTTOM", n[n.MIDDLE = 1] = "MIDDLE", n[n.TOP = 2] = "TOP", n))(Mr || {}), We = /* @__PURE__ */ ((n) => (n[n.DEFAULT = 0] = "DEFAULT", n[n.LEFT = 1] = "LEFT", n[n.RIGHT = 2] = "RIGHT", n[n.CENTER = 3] = "CENTER", n[n.JUSTIFIED = 4] = "JUSTIFIED", n[n.DISTRIBUTED = 5] = "DISTRIBUTED", n))(We || {});
27813
27813
  const Hd = {
27814
27814
  c: "Ø",
27815
27815
  d: "°",
@@ -28870,7 +28870,7 @@ var t1 = jh((O) => {
28870
28870
  this.type = e, this.ctx = t, this.data = r;
28871
28871
  }
28872
28872
  }
28873
- var Gt = /* @__PURE__ */ ((n) => (n[n.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", n[n.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", n[n.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", n[n.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", n[n.BY_STYLE = 5] = "BY_STYLE", n))(Gt || {}), fe = /* @__PURE__ */ ((n) => (n.CHAR = "CHAR", n.NEW_PARAGRAPH = "NEW_PARAGRAPH", n.STACK = "STACK", n))(fe || {});
28873
+ var Tt = /* @__PURE__ */ ((n) => (n[n.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", n[n.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", n[n.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", n[n.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", n[n.BY_STYLE = 5] = "BY_STYLE", n))(Tt || {}), fe = /* @__PURE__ */ ((n) => (n.CHAR = "CHAR", n.NEW_PARAGRAPH = "NEW_PARAGRAPH", n.STACK = "STACK", n))(fe || {});
28874
28874
  const vs = "";
28875
28875
  function Yd(n) {
28876
28876
  if (!(!n || [
@@ -29206,85 +29206,93 @@ var t1 = jh((O) => {
29206
29206
  */
29207
29207
  processText(e) {
29208
29208
  this._lastCharBoxTarget = void 0;
29209
- const t = [], r = [], i = [], s = [], a = new fa();
29210
- for (const o of e)
29211
- if (o.type === ar.NEW_PARAGRAPH)
29209
+ const t = [], r = [], i = [], s = [];
29210
+ let a;
29211
+ const o = new fa();
29212
+ for (const h of e)
29213
+ if (a = h.type, h.type === zt.NEW_PARAGRAPH)
29212
29214
  this.startNewParagraph(
29213
29215
  t,
29214
29216
  r,
29215
29217
  i,
29216
29218
  s,
29217
- a
29219
+ o
29218
29220
  );
29219
- else if (o.type === ar.WORD) {
29220
- const h = o.data;
29221
- Array.isArray(h) ? h.forEach(
29222
- (c) => this.processWord(
29223
- c,
29221
+ else if (h.type === zt.WORD) {
29222
+ const c = h.data;
29223
+ Array.isArray(c) ? c.forEach(
29224
+ (u) => this.processWord(
29225
+ u,
29224
29226
  t,
29225
29227
  r,
29226
29228
  i,
29227
29229
  s
29228
29230
  )
29229
- ) : typeof h == "string" && h.length > 0 && this.processWord(
29230
- h,
29231
+ ) : typeof c == "string" && c.length > 0 && this.processWord(
29232
+ c,
29231
29233
  t,
29232
29234
  r,
29233
29235
  i,
29234
29236
  s
29235
29237
  );
29236
- } else if (o.type === ar.SPACE)
29238
+ } else if (h.type === zt.SPACE)
29237
29239
  this.processBlank(i, s);
29238
- else if (o.type === ar.PROPERTIES_CHANGED) {
29240
+ else if (h.type === zt.PROPERTIES_CHANGED) {
29239
29241
  this.processGeometries(
29240
29242
  t,
29241
29243
  r,
29242
29244
  i,
29243
29245
  s,
29244
- a
29246
+ o
29245
29247
  );
29246
- const h = o.data;
29247
- if (h.command === void 0)
29248
- for (; this._contextStack.length > h.depth; )
29248
+ const c = h.data;
29249
+ if (c.command === void 0)
29250
+ for (; this._contextStack.length > c.depth; )
29249
29251
  this._currentContext = this._contextStack.pop();
29250
29252
  else {
29251
- for (; this._contextStack.length < h.depth; )
29253
+ for (; this._contextStack.length < c.depth; )
29252
29254
  this._contextStack.push(this._currentContext.clone());
29253
- this.processFormat(h);
29255
+ this.processFormat(c);
29254
29256
  }
29255
- } else if (o.type === ar.STACK) {
29257
+ } else if (h.type === zt.STACK) {
29256
29258
  this.processGeometries(
29257
29259
  t,
29258
29260
  r,
29259
29261
  i,
29260
29262
  s,
29261
- a
29263
+ o
29262
29264
  );
29263
- const h = o.data;
29265
+ const c = h.data;
29264
29266
  this.processStack(
29265
- h,
29267
+ c,
29266
29268
  t,
29267
29269
  r,
29268
29270
  i,
29269
29271
  s
29270
29272
  );
29271
- const c = h[2] === "^" ? fe.CHAR : fe.STACK;
29273
+ const u = c[2] === "^" ? fe.CHAR : fe.STACK;
29272
29274
  this.processGeometries(
29273
29275
  t,
29274
29276
  r,
29275
29277
  i,
29276
29278
  s,
29277
- a,
29278
- c
29279
+ o,
29280
+ u
29279
29281
  );
29280
29282
  }
29281
- return (t.length > 0 || r.length > 0) && this.processGeometries(
29283
+ return a === zt.NEW_PARAGRAPH && this.recordLineBreak(i, s), t.length > 0 || r.length > 0 ? this.processGeometries(
29282
29284
  t,
29283
29285
  r,
29284
29286
  i,
29285
29287
  s,
29286
- a
29287
- ), this.processLastLine(), a;
29288
+ o
29289
+ ) : (i.length > 0 || s.length > 0) && this.processGeometries(
29290
+ t,
29291
+ r,
29292
+ i,
29293
+ s,
29294
+ o
29295
+ ), this.processLastLine(), o;
29288
29296
  }
29289
29297
  processGeometries(e, t, r, i, s, a = fe.CHAR) {
29290
29298
  if (e.length > 0 || t.length > 0) {
@@ -29296,6 +29304,9 @@ var t1 = jh((O) => {
29296
29304
  a
29297
29305
  );
29298
29306
  s.add(o), this._currentLineObjects.push(o), e.length = 0, t.length = 0, r.length = 0, i.length = 0;
29307
+ } else if (r.length > 0 || i.length > 0) {
29308
+ const o = new Me();
29309
+ o.userData.bboxIntersectionCheck = !0, o.userData.charBoxType = a, o.userData.charBoxes = [...r, ...i], s.add(o), this._currentLineObjects.push(o), r.length = 0, i.length = 0;
29299
29310
  }
29300
29311
  }
29301
29312
  processWord(e, t, r, i, s) {
@@ -29397,7 +29408,7 @@ var t1 = jh((O) => {
29397
29408
  N
29398
29409
  );
29399
29410
  if (t.push(...E), r.push(...B), i.push(...D), s.push(...N), h === "/" || h === "#") {
29400
- const G = new Ue(), K = new Float32Array([
29411
+ const G = new Re(), K = new Float32Array([
29401
29412
  c,
29402
29413
  u - this.currentFontSize * 0.8 + this.defaultFontSize * On,
29403
29414
  0,
@@ -29444,7 +29455,7 @@ var t1 = jh((O) => {
29444
29455
  }
29445
29456
  processBlank(e, t) {
29446
29457
  if (this._options.collectCharBoxes !== !1) {
29447
- const r = this._hOffset, i = this.flowDirection == Gt.BOTTOM_TO_TOP ? this._vOffset : this._vOffset - this.defaultFontSize, s = new Ae(
29458
+ const r = this._hOffset, i = this.flowDirection == Tt.BOTTOM_TO_TOP ? this._vOffset : this._vOffset - this.defaultFontSize, s = new Ae(
29448
29459
  new A(r, i, 0),
29449
29460
  new A(
29450
29461
  r + this._currentContext.blankWidth,
@@ -29468,7 +29479,10 @@ var t1 = jh((O) => {
29468
29479
  }
29469
29480
  recordLineBreak(e, t) {
29470
29481
  if (this._options.collectCharBoxes === !1 || !e || !t) return;
29471
- const r = new A(this._hOffset, this._vOffset, 0), i = new Ae(r.clone(), r.clone());
29482
+ const r = this.flowDirection == Tt.BOTTOM_TO_TOP ? this._vOffset : this._vOffset - this.defaultFontSize, i = new Ae(
29483
+ new A(this._hOffset, r, 0),
29484
+ new A(this._hOffset, r + this.currentLineHeight, 0)
29485
+ );
29472
29486
  this.resolveCharBoxTarget(e, t) === "mesh" ? e.push({
29473
29487
  type: fe.NEW_PARAGRAPH,
29474
29488
  box: i,
@@ -29516,7 +29530,7 @@ var t1 = jh((O) => {
29516
29530
  }
29517
29531
  const c = this.fontManager.getFontType(this.currentFont);
29518
29532
  this._currentContext.bold && c === "mesh" && o.scale(1.06, 1.06, 1), this.hOffset > (this.maxLineWidth || 1 / 0) && this.startNewLine(i, s);
29519
- const u = this.hOffset, f = this.flowDirection == Gt.BOTTOM_TO_TOP ? this.vOffset : this.vOffset - this.defaultFontSize, l = a.width * this.currentWidthFactor, p = this.currentFontSize;
29533
+ const u = this.hOffset, f = this.flowDirection == Tt.BOTTOM_TO_TOP ? this.vOffset : this.vOffset - this.defaultFontSize, l = a.width * this.currentWidthFactor, p = this.currentFontSize;
29520
29534
  if (o.translate(u, f, 0), this.currentHorizontalAlignment == We.DISTRIBUTED ? this._hOffset += a.width * this.currentWidthFactor : this._hOffset += a.width * this.currentWordSpace * this.currentWidthFactor, t.push(o), this._lineHasRenderableChar = !0, this._options.collectCharBoxes !== !1) {
29521
29535
  o.userData.char = e, o.boundingBox || o.computeBoundingBox();
29522
29536
  const x = new Ae().copy(o.boundingBox);
@@ -29534,7 +29548,7 @@ var t1 = jh((O) => {
29534
29548
  }
29535
29549
  const g = p * 0.05, m = 1e-3;
29536
29550
  if (this._currentContext.underline) {
29537
- const x = new Ue(), v = f - g;
29551
+ const x = new Re(), v = f - g;
29538
29552
  x.setAttribute(
29539
29553
  "position",
29540
29554
  new Ve(
@@ -29551,7 +29565,7 @@ var t1 = jh((O) => {
29551
29565
  ), x.setIndex(null), x.userData = { isDecoration: !0 }, r.push(x);
29552
29566
  }
29553
29567
  if (this._currentContext.overline) {
29554
- const x = new Ue(), v = f + p + g;
29568
+ const x = new Re(), v = f + p + g;
29555
29569
  x.setAttribute(
29556
29570
  "position",
29557
29571
  new Ve(
@@ -29568,7 +29582,7 @@ var t1 = jh((O) => {
29568
29582
  ), x.setIndex(null), x.userData = { isDecoration: !0 }, r.push(x);
29569
29583
  }
29570
29584
  if (this._currentContext.strikeThrough) {
29571
- const x = new Ue(), v = f + p / 2 - p * 0.2;
29585
+ const x = new Re(), v = f + p / 2 - p * 0.2;
29572
29586
  x.setAttribute(
29573
29587
  "position",
29574
29588
  new Ve(
@@ -29629,12 +29643,12 @@ var t1 = jh((O) => {
29629
29643
  this.recordLineBreak(e, t), this.advanceToNextLine();
29630
29644
  }
29631
29645
  advanceToNextLine() {
29632
- this._hOffset = 0, this._lineHasRenderableChar ? this._pendingEmptyLineFontSizeAdjust = void 0 : this._pendingEmptyLineFontSizeAdjust = this.currentFontSize, this.flowDirection == Gt.BOTTOM_TO_TOP ? this._vOffset += this.currentLineHeight : this._vOffset -= this.currentLineHeight, this._lineCount++, this.processAlignment(), this._currentLineObjects = [], this._lineCount == 2 ? this._totalHeight = this.currentMaxFontSize : this._totalHeight = this._totalHeight + this.currentLineHeight, this._maxFontSize = 0, this._lineHasRenderableChar = !1;
29646
+ this._hOffset = 0, this._lineHasRenderableChar ? this._pendingEmptyLineFontSizeAdjust = void 0 : this._pendingEmptyLineFontSizeAdjust = this.currentFontSize, this.flowDirection == Tt.BOTTOM_TO_TOP ? this._vOffset += this.currentLineHeight : this._vOffset -= this.currentLineHeight, this._lineCount++, this.processAlignment(), this._currentLineObjects = [], this._lineCount == 2 ? this._totalHeight = this.currentMaxFontSize : this._totalHeight = this._totalHeight + this.currentLineHeight, this._maxFontSize = 0, this._lineHasRenderableChar = !1;
29633
29647
  }
29634
29648
  applyPendingEmptyLineYAdjust() {
29635
29649
  if (this._pendingEmptyLineFontSizeAdjust === void 0) return;
29636
29650
  const e = this.currentFontSize - this._pendingEmptyLineFontSizeAdjust;
29637
- e !== 0 && (this.flowDirection == Gt.BOTTOM_TO_TOP ? this._vOffset += e : this._vOffset -= e), this._pendingEmptyLineFontSizeAdjust = void 0;
29651
+ e !== 0 && (this.flowDirection == Tt.BOTTOM_TO_TOP ? this._vOffset += e : this._vOffset -= e), this._pendingEmptyLineFontSizeAdjust = void 0;
29638
29652
  }
29639
29653
  resolveCharBoxTarget(e, t) {
29640
29654
  return this._lastCharBoxTarget ? this._lastCharBoxTarget : e.length > 0 && t.length === 0 ? "mesh" : t.length > 0 && e.length === 0 ? "line" : this.fontManager.getFontType(this.currentFont) === "mesh" ? "mesh" : "line";
@@ -29748,8 +29762,8 @@ var t1 = jh((O) => {
29748
29762
  this.calcuateLineParams(e);
29749
29763
  }
29750
29764
  }
29751
- const $i = /* @__PURE__ */ new A(), It = /* @__PURE__ */ new A(), ji = /* @__PURE__ */ new A(), Qi = /* @__PURE__ */ new Bt(), Ki = /* @__PURE__ */ new be(), Oo = /* @__PURE__ */ new be(), Lo = /* @__PURE__ */ new A(1, 0, 0);
29752
- class Gs extends De {
29765
+ const $i = /* @__PURE__ */ new A(), Pt = /* @__PURE__ */ new A(), ji = /* @__PURE__ */ new A(), Qi = /* @__PURE__ */ new _t(), Ki = /* @__PURE__ */ new be(), Oo = /* @__PURE__ */ new be(), Lo = /* @__PURE__ */ new A(1, 0, 0);
29766
+ class Gs extends Me {
29753
29767
  /**
29754
29768
  * Extracts all unique font names used in an MText string.
29755
29769
  * This function searches for font commands in the format \f{fontname}| or \f{fontname}; and returns a set of unique font names.
@@ -29903,24 +29917,34 @@ var t1 = jh((O) => {
29903
29917
  const { object: r, height: i } = this.createMTextGroup(e, t);
29904
29918
  if (!r)
29905
29919
  return;
29906
- r.matrix.decompose(It, Qi, ji), e.position && (It.x += e.position.x, It.y += e.position.y, r.matrix.compose(It, Qi, ji));
29920
+ r.matrix.decompose(Pt, Qi, ji), e.position && (Pt.x += e.position.x, Pt.y += e.position.y, r.matrix.compose(Pt, Qi, ji));
29907
29921
  const s = e.width, a = this.calculateAnchorPoint(
29908
29922
  s,
29909
29923
  i,
29910
29924
  e.attachmentPoint,
29911
29925
  e.drawingDirection
29912
- );
29913
- r.traverse((c) => {
29914
- "geometry" in c && c.geometry.translate(a.x, a.y, 0), c.layers.enableAll();
29926
+ ), o = (u) => {
29927
+ if (!u || u.length === 0) return;
29928
+ const f = new A(a.x, a.y, 0), l = (p) => {
29929
+ var g;
29930
+ (g = p.box) == null || g.translate(f), p.children && p.children.length > 0 && p.children.forEach(l);
29931
+ };
29932
+ u.forEach(l);
29933
+ };
29934
+ r.traverse((u) => {
29935
+ var f;
29936
+ "geometry" in u ? u.geometry.translate(a.x, a.y, 0) : o(
29937
+ (f = u.userData) == null ? void 0 : f.charBoxes
29938
+ ), u.layers.enableAll();
29915
29939
  });
29916
- let o = e.rotation || 0;
29940
+ let h = e.rotation || 0;
29917
29941
  if (e.directionVector) {
29918
- const c = e.directionVector, u = new A(c.x, c.y, c.z), f = u.clone().cross(Lo), l = Lo.angleTo(u);
29919
- o = f.z > 0 ? -l : l;
29942
+ const u = e.directionVector, f = new A(u.x, u.y, u.z), l = f.clone().cross(Lo), p = Lo.angleTo(f);
29943
+ h = l.z > 0 ? -p : p;
29920
29944
  }
29921
- r.matrix.compose(It, Qi, ji);
29922
- const h = e.position ? It.clone().sub(e.position) : It;
29923
- return Ki.makeTranslation(-h.x, -h.y, 0), Oo.makeRotationZ(o), r.matrix.multiply(Ki), r.matrix.multiply(Oo), r.matrix.multiply(Ki.invert()), r.matrix.decompose(r.position, r.quaternion, r.scale), r;
29945
+ r.matrix.compose(Pt, Qi, ji);
29946
+ const c = e.position ? Pt.clone().sub(e.position) : Pt;
29947
+ return Ki.makeTranslation(-c.x, -c.y, 0), Oo.makeRotationZ(h), r.matrix.multiply(Ki), r.matrix.multiply(Oo), r.matrix.multiply(Ki.invert()), r.matrix.decompose(r.position, r.quaternion, r.scale), r;
29924
29948
  }
29925
29949
  /**
29926
29950
  * Creates a group of text elements from MText data.
@@ -29938,7 +29962,7 @@ var t1 = jh((O) => {
29938
29962
  e.width && e.attachmentPoint && ([1, 4, 7].includes(e.attachmentPoint) ? i = We.LEFT : [2, 5, 8].includes(e.attachmentPoint) ? i = We.CENTER : [3, 6, 9].includes(e.attachmentPoint) && (i = We.RIGHT));
29939
29963
  let s = Mr.BOTTOM;
29940
29964
  e.attachmentPoint && ([1, 2, 3].includes(e.attachmentPoint) ? s = Mr.TOP : [4, 5, 6].includes(e.attachmentPoint) ? s = Mr.MIDDLE : [7, 8, 9].includes(e.attachmentPoint) && (s = Mr.BOTTOM));
29941
- const a = e.height || 0, o = e.lineSpaceFactor || 0.3, h = e.drawingDirection ?? Gt.LEFT_TO_RIGHT, c = {
29965
+ const a = e.height || 0, o = e.lineSpaceFactor || 0.3, h = e.drawingDirection ?? Tt.LEFT_TO_RIGHT, c = {
29942
29966
  fontSize: a,
29943
29967
  widthFactor: e.widthFactor ?? 1,
29944
29968
  lineSpaceFactor: o,
@@ -30008,7 +30032,7 @@ var t1 = jh((O) => {
30008
30032
  s -= e, a += t;
30009
30033
  break;
30010
30034
  }
30011
- return i == Gt.BOTTOM_TO_TOP && (a -= t), { x: s, y: a };
30035
+ return i == Tt.BOTTOM_TO_TOP && (a -= t), { x: s, y: a };
30012
30036
  }
30013
30037
  /**
30014
30038
  * Recursively calculates bounding boxes for an object and its children.
@@ -30149,7 +30173,7 @@ var t1 = jh((O) => {
30149
30173
  }
30150
30174
  });
30151
30175
  function Kd(n) {
30152
- const e = n.matrixWorld.clone(), t = new A(), r = new Bt(), i = new A();
30176
+ const e = n.matrixWorld.clone(), t = new A(), r = new _t(), i = new A();
30153
30177
  e.decompose(t, r, i);
30154
30178
  const s = n.box.clone();
30155
30179
  s.applyMatrix4(e);
@@ -30194,8 +30218,8 @@ var t1 = jh((O) => {
30194
30218
  return n.traverse((r) => {
30195
30219
  if (r instanceof Dn || r instanceof bs) {
30196
30220
  const i = r.geometry, s = r.material;
30197
- if (i instanceof Ue) {
30198
- const a = r.matrixWorld.clone(), o = new A(), h = new Bt(), c = new A();
30221
+ if (i instanceof Re) {
30222
+ const a = r.matrixWorld.clone(), o = new A(), h = new _t(), c = new A();
30199
30223
  a.decompose(o, h, c);
30200
30224
  const u = {};
30201
30225
  i.attributes && Object.keys(i.attributes).forEach((g) => {