@mlightcad/mtext-renderer 0.4.9 → 0.4.10

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.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as L from "three";
2
- import { ShapePath as Sa, ExtrudeGeometry as ka, BufferGeometry as ut, BufferAttribute as Fa } from "three";
3
- class yr {
2
+ import { ShapePath as ka, ExtrudeGeometry as Fa, BufferGeometry as ut, BufferAttribute as Ta } from "three";
3
+ class xr {
4
4
  constructor() {
5
5
  this.listeners = [];
6
6
  }
@@ -34,7 +34,7 @@ class yr {
34
34
  n.call(null, e, ...r);
35
35
  }
36
36
  }
37
- class Ta {
37
+ class wa {
38
38
  constructor() {
39
39
  this.cache = /* @__PURE__ */ new Map();
40
40
  }
@@ -90,9 +90,9 @@ class Ta {
90
90
  return `${e}_${r}`;
91
91
  }
92
92
  }
93
- class Sn {
93
+ class kn {
94
94
  constructor() {
95
- this.unsupportedChars = {}, this.cache = new Ta();
95
+ this.unsupportedChars = {}, this.cache = new wa();
96
96
  }
97
97
  /**
98
98
  * Records an unsupported character in the font.
@@ -103,7 +103,7 @@ class Sn {
103
103
  this.unsupportedChars[e] || (this.unsupportedChars[e] = 0), this.unsupportedChars[e]++;
104
104
  }
105
105
  }
106
- class kn extends L.Shape {
106
+ class Fn extends L.Shape {
107
107
  /**
108
108
  * Creates a new instance of BaseTextShape
109
109
  * @param char - The character this shape represents */
@@ -112,9 +112,9 @@ class kn extends L.Shape {
112
112
  }
113
113
  }
114
114
  const Ht = (t, e) => e.some((r) => t instanceof r);
115
- let xr, br;
116
- function wa() {
117
- return xr || (xr = [
115
+ let br, Sr;
116
+ function Ca() {
117
+ return br || (br = [
118
118
  IDBDatabase,
119
119
  IDBObjectStore,
120
120
  IDBIndex,
@@ -122,15 +122,15 @@ function wa() {
122
122
  IDBTransaction
123
123
  ]);
124
124
  }
125
- function Ca() {
126
- return br || (br = [
125
+ function Ea() {
126
+ return Sr || (Sr = [
127
127
  IDBCursor.prototype.advance,
128
128
  IDBCursor.prototype.continue,
129
129
  IDBCursor.prototype.continuePrimaryKey
130
130
  ]);
131
131
  }
132
132
  const zt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap();
133
- function Ea(t) {
133
+ function Oa(t) {
134
134
  const e = new Promise((r, n) => {
135
135
  const a = () => {
136
136
  t.removeEventListener("success", s), t.removeEventListener("error", i);
@@ -143,7 +143,7 @@ function Ea(t) {
143
143
  });
144
144
  return mt.set(e, t), e;
145
145
  }
146
- function Oa(t) {
146
+ function Ua(t) {
147
147
  if (zt.has(t))
148
148
  return;
149
149
  const e = new Promise((r, n) => {
@@ -175,29 +175,29 @@ let Wt = {
175
175
  return t instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in t;
176
176
  }
177
177
  };
178
- function Fn(t) {
178
+ function Tn(t) {
179
179
  Wt = t(Wt);
180
180
  }
181
- function Ua(t) {
182
- return Ca().includes(t) ? function(...e) {
181
+ function La(t) {
182
+ return Ea().includes(t) ? function(...e) {
183
183
  return t.apply(Vt(this), e), Re(this.request);
184
184
  } : function(...e) {
185
185
  return Re(t.apply(Vt(this), e));
186
186
  };
187
187
  }
188
- function La(t) {
189
- return typeof t == "function" ? Ua(t) : (t instanceof IDBTransaction && Oa(t), Ht(t, wa()) ? new Proxy(t, Wt) : t);
188
+ function Ra(t) {
189
+ return typeof t == "function" ? La(t) : (t instanceof IDBTransaction && Ua(t), Ht(t, Ca()) ? new Proxy(t, Wt) : t);
190
190
  }
191
191
  function Re(t) {
192
192
  if (t instanceof IDBRequest)
193
- return Ea(t);
193
+ return Oa(t);
194
194
  if (kt.has(t))
195
195
  return kt.get(t);
196
- const e = La(t);
196
+ const e = Ra(t);
197
197
  return e !== t && (kt.set(t, e), mt.set(e, t)), e;
198
198
  }
199
199
  const Vt = (t) => mt.get(t);
200
- function Ra(t, e, { blocked: r, upgrade: n, blocking: a, terminated: s } = {}) {
200
+ function Aa(t, e, { blocked: r, upgrade: n, blocking: a, terminated: s } = {}) {
201
201
  const i = indexedDB.open(t, e), o = Re(i);
202
202
  return n && i.addEventListener("upgradeneeded", (u) => {
203
203
  n(Re(i.result), u.oldVersion, u.newVersion, Re(i.transaction), u);
@@ -211,16 +211,16 @@ function Ra(t, e, { blocked: r, upgrade: n, blocking: a, terminated: s } = {}) {
211
211
  }).catch(() => {
212
212
  }), o;
213
213
  }
214
- const Aa = ["get", "getKey", "getAll", "getAllKeys", "count"], Ma = ["put", "add", "delete", "clear"], Ft = /* @__PURE__ */ new Map();
215
- function Sr(t, e) {
214
+ const Ma = ["get", "getKey", "getAll", "getAllKeys", "count"], Pa = ["put", "add", "delete", "clear"], Ft = /* @__PURE__ */ new Map();
215
+ function kr(t, e) {
216
216
  if (!(t instanceof IDBDatabase && !(e in t) && typeof e == "string"))
217
217
  return;
218
218
  if (Ft.get(e))
219
219
  return Ft.get(e);
220
- const r = e.replace(/FromIndex$/, ""), n = e !== r, a = Ma.includes(r);
220
+ const r = e.replace(/FromIndex$/, ""), n = e !== r, a = Pa.includes(r);
221
221
  if (
222
222
  // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
223
- !(r in (n ? IDBIndex : IDBObjectStore).prototype) || !(a || Aa.includes(r))
223
+ !(r in (n ? IDBIndex : IDBObjectStore).prototype) || !(a || Ma.includes(r))
224
224
  )
225
225
  return;
226
226
  const s = async function(i, ...o) {
@@ -233,18 +233,18 @@ function Sr(t, e) {
233
233
  };
234
234
  return Ft.set(e, s), s;
235
235
  }
236
- Fn((t) => ({
236
+ Tn((t) => ({
237
237
  ...t,
238
- get: (e, r, n) => Sr(e, r) || t.get(e, r, n),
239
- has: (e, r) => !!Sr(e, r) || t.has(e, r)
238
+ get: (e, r, n) => kr(e, r) || t.get(e, r, n),
239
+ has: (e, r) => !!kr(e, r) || t.has(e, r)
240
240
  }));
241
- const Pa = ["continue", "continuePrimaryKey", "advance"], kr = {}, qt = /* @__PURE__ */ new WeakMap(), Tn = /* @__PURE__ */ new WeakMap(), Ba = {
241
+ const Ba = ["continue", "continuePrimaryKey", "advance"], Fr = {}, qt = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), Da = {
242
242
  get(t, e) {
243
- if (!Pa.includes(e))
243
+ if (!Ba.includes(e))
244
244
  return t[e];
245
- let r = kr[e];
246
- return r || (r = kr[e] = function(...n) {
247
- qt.set(this, Tn.get(this)[e](...n));
245
+ let r = Fr[e];
246
+ return r || (r = Fr[e] = function(...n) {
247
+ qt.set(this, wn.get(this)[e](...n));
248
248
  }), r;
249
249
  }
250
250
  };
@@ -253,20 +253,20 @@ async function* Ia(...t) {
253
253
  if (e instanceof IDBCursor || (e = await e.openCursor(...t)), !e)
254
254
  return;
255
255
  e = e;
256
- const r = new Proxy(e, Ba);
257
- for (Tn.set(r, e), mt.set(r, Vt(e)); e; )
256
+ const r = new Proxy(e, Da);
257
+ for (wn.set(r, e), mt.set(r, Vt(e)); e; )
258
258
  yield r, e = await (qt.get(r) || e.continue()), qt.delete(r);
259
259
  }
260
- function Fr(t, e) {
260
+ function Tr(t, e) {
261
261
  return e === Symbol.asyncIterator && Ht(t, [IDBIndex, IDBObjectStore, IDBCursor]) || e === "iterate" && Ht(t, [IDBIndex, IDBObjectStore]);
262
262
  }
263
- Fn((t) => ({
263
+ Tn((t) => ({
264
264
  ...t,
265
265
  get(e, r, n) {
266
- return Fr(e, r) ? Ia : t.get(e, r, n);
266
+ return Tr(e, r) ? Ia : t.get(e, r, n);
267
267
  },
268
268
  has(e, r) {
269
- return Fr(e, r) || t.has(e, r);
269
+ return Tr(e, r) || t.has(e, r);
270
270
  }
271
271
  }));
272
272
  const Pe = {
@@ -361,7 +361,7 @@ const Pe = {
361
361
  async getDatabase() {
362
362
  if (this.isClosing)
363
363
  throw new Error("Cannot perform operation while database is closing");
364
- return this.db ? this.db : (this.db = await Ra(
364
+ return this.db ? this.db : (this.db = await Aa(
365
365
  ee.DATABASE_NAME,
366
366
  ee.DATABASE_VERSION,
367
367
  {
@@ -402,14 +402,14 @@ const Pe = {
402
402
  };
403
403
  ee.DATABASE_NAME = "mlightcad", ee.DATABASE_VERSION = Tt[Tt.length - 1].version;
404
404
  let ze = ee;
405
- const Da = (t) => t.substring(t.lastIndexOf(".") + 1), wn = (t) => t.split("/").pop(), Tr = (t) => {
406
- const e = wn(t);
405
+ const Ga = (t) => t.substring(t.lastIndexOf(".") + 1), Cn = (t) => t.split("/").pop(), wr = (t) => {
406
+ const e = Cn(t);
407
407
  if (e) {
408
408
  const r = e.lastIndexOf(".");
409
409
  return r === -1 ? e : e.substring(0, r);
410
410
  }
411
411
  return t;
412
- }, Ga = [
412
+ }, Na = [
413
413
  0,
414
414
  16711680,
415
415
  16776960,
@@ -667,19 +667,19 @@ const Da = (t) => t.substring(t.lastIndexOf(".") + 1), wn = (t) => t.split("/").
667
667
  14079702,
668
668
  16777215,
669
669
  0
670
- ], Na = (t) => Ga[t];
671
- let _a = class {
670
+ ], _a = (t) => Na[t];
671
+ let Ha = class {
672
672
  constructor(e) {
673
673
  this.isFont = !0, this.type = "Font", this.data = e;
674
674
  }
675
675
  generateShapes(e, r = 100) {
676
- const n = [], a = Ha(e, r, this.data);
676
+ const n = [], a = za(e, r, this.data);
677
677
  for (let s = 0, i = a.length; s < i; s++)
678
678
  n.push(...a[s].toShapes());
679
679
  return n;
680
680
  }
681
681
  };
682
- function Ha(t, e, r) {
682
+ function za(t, e, r) {
683
683
  const n = Array.from(t), a = e / r.resolution, s = (r.boundingBox.yMax - r.boundingBox.yMin + r.underlineThickness) * a, i = [];
684
684
  let o = 0, u = 0;
685
685
  for (let l = 0; l < n.length; l++) {
@@ -688,19 +688,19 @@ function Ha(t, e, r) {
688
688
  `)
689
689
  o = 0, u -= s;
690
690
  else {
691
- const f = za(h, a, o, u, r);
691
+ const f = Wa(h, a, o, u, r);
692
692
  o += f.offsetX, i.push(f.path);
693
693
  }
694
694
  }
695
695
  return i;
696
696
  }
697
- function za(t, e, r, n, a) {
697
+ function Wa(t, e, r, n, a) {
698
698
  const s = a.glyphs[t] || a.glyphs["?"];
699
699
  if (!s) {
700
700
  console.error('THREE.Font: character "' + t + '" does not exists in font family ' + a.familyName + ".");
701
701
  return;
702
702
  }
703
- const i = new Sa();
703
+ const i = new ka();
704
704
  let o, u, l, h, f, c, p, d;
705
705
  if (s.o) {
706
706
  const v = s._cachedOutline || (s._cachedOutline = s.o.split(" "));
@@ -749,14 +749,14 @@ String.prototype.codePointAt || function() {
749
749
  writable: !0
750
750
  }) : String.prototype.codePointAt = e;
751
751
  }();
752
- var rr = 0, Cn = -3;
752
+ var rr = 0, En = -3;
753
753
  function Ve() {
754
754
  this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
755
755
  }
756
- function Wa(t, e) {
756
+ function Va(t, e) {
757
757
  this.source = t, this.sourceIndex = 0, this.tag = 0, this.bitcount = 0, this.dest = e, this.destLen = 0, this.ltree = new Ve(), this.dtree = new Ve();
758
758
  }
759
- var En = new Ve(), On = new Ve(), nr = new Uint8Array(30), ar = new Uint16Array(30), Un = new Uint8Array(30), Ln = new Uint16Array(30), Va = new Uint8Array([
759
+ var On = new Ve(), Un = new Ve(), nr = new Uint8Array(30), ar = new Uint16Array(30), Ln = new Uint8Array(30), Rn = new Uint16Array(30), qa = new Uint8Array([
760
760
  16,
761
761
  17,
762
762
  18,
@@ -776,8 +776,8 @@ var En = new Ve(), On = new Ve(), nr = new Uint8Array(30), ar = new Uint16Array(
776
776
  14,
777
777
  1,
778
778
  15
779
- ]), wr = new Ve(), ce = new Uint8Array(320);
780
- function Rn(t, e, r, n) {
779
+ ]), Cr = new Ve(), ce = new Uint8Array(320);
780
+ function An(t, e, r, n) {
781
781
  var a, s;
782
782
  for (a = 0; a < r; ++a)
783
783
  t[a] = 0;
@@ -786,7 +786,7 @@ function Rn(t, e, r, n) {
786
786
  for (s = n, a = 0; a < 30; ++a)
787
787
  e[a] = s, s += 1 << t[a];
788
788
  }
789
- function qa(t, e) {
789
+ function Xa(t, e) {
790
790
  var r;
791
791
  for (r = 0; r < 7; ++r)
792
792
  t.table[r] = 0;
@@ -803,7 +803,7 @@ function qa(t, e) {
803
803
  for (e.table[5] = 32, r = 0; r < 32; ++r)
804
804
  e.trans[r] = r;
805
805
  }
806
- var Cr = new Uint16Array(16);
806
+ var Er = new Uint16Array(16);
807
807
  function wt(t, e, r, n) {
808
808
  var a, s;
809
809
  for (a = 0; a < 16; ++a)
@@ -811,11 +811,11 @@ function wt(t, e, r, n) {
811
811
  for (a = 0; a < n; ++a)
812
812
  t.table[e[r + a]]++;
813
813
  for (t.table[0] = 0, s = 0, a = 0; a < 16; ++a)
814
- Cr[a] = s, s += t.table[a];
814
+ Er[a] = s, s += t.table[a];
815
815
  for (a = 0; a < n; ++a)
816
- e[r + a] && (t.trans[Cr[e[r + a]]++] = a);
816
+ e[r + a] && (t.trans[Er[e[r + a]]++] = a);
817
817
  }
818
- function Xa(t) {
818
+ function Ya(t) {
819
819
  t.bitcount-- || (t.tag = t.source[t.sourceIndex++], t.bitcount = 7);
820
820
  var e = t.tag & 1;
821
821
  return t.tag >>>= 1, e;
@@ -837,16 +837,16 @@ function Xt(t, e) {
837
837
  while (n >= 0);
838
838
  return t.tag = s, t.bitcount -= a, e.trans[r + n];
839
839
  }
840
- function Ya(t, e, r) {
840
+ function Za(t, e, r) {
841
841
  var n, a, s, i, o, u;
842
842
  for (n = fe(t, 5, 257), a = fe(t, 5, 1), s = fe(t, 4, 4), i = 0; i < 19; ++i)
843
843
  ce[i] = 0;
844
844
  for (i = 0; i < s; ++i) {
845
845
  var l = fe(t, 3, 0);
846
- ce[Va[i]] = l;
846
+ ce[qa[i]] = l;
847
847
  }
848
- for (wt(wr, ce, 0, 19), o = 0; o < n + a; ) {
849
- var h = Xt(t, wr);
848
+ for (wt(Cr, ce, 0, 19), o = 0; o < n + a; ) {
849
+ var h = Xt(t, Cr);
850
850
  switch (h) {
851
851
  case 16:
852
852
  var f = ce[o - 1];
@@ -868,7 +868,7 @@ function Ya(t, e, r) {
868
868
  }
869
869
  wt(e, ce, 0, n), wt(r, ce, n, a);
870
870
  }
871
- function Er(t, e, r) {
871
+ function Or(t, e, r) {
872
872
  for (; ; ) {
873
873
  var n = Xt(t, e);
874
874
  if (n === 256)
@@ -877,47 +877,47 @@ function Er(t, e, r) {
877
877
  t.dest[t.destLen++] = n;
878
878
  else {
879
879
  var a, s, i, o;
880
- for (n -= 257, a = fe(t, nr[n], ar[n]), s = Xt(t, r), i = t.destLen - fe(t, Un[s], Ln[s]), o = i; o < i + a; ++o)
880
+ for (n -= 257, a = fe(t, nr[n], ar[n]), s = Xt(t, r), i = t.destLen - fe(t, Ln[s], Rn[s]), o = i; o < i + a; ++o)
881
881
  t.dest[t.destLen++] = t.dest[o];
882
882
  }
883
883
  }
884
884
  }
885
- function Za(t) {
885
+ function ja(t) {
886
886
  for (var e, r, n; t.bitcount > 8; )
887
887
  t.sourceIndex--, t.bitcount -= 8;
888
888
  if (e = t.source[t.sourceIndex + 1], e = 256 * e + t.source[t.sourceIndex], r = t.source[t.sourceIndex + 3], r = 256 * r + t.source[t.sourceIndex + 2], e !== (~r & 65535))
889
- return Cn;
889
+ return En;
890
890
  for (t.sourceIndex += 4, n = e; n; --n)
891
891
  t.dest[t.destLen++] = t.source[t.sourceIndex++];
892
892
  return t.bitcount = 0, rr;
893
893
  }
894
- function ja(t, e) {
895
- var r = new Wa(t, e), n, a, s;
894
+ function Ka(t, e) {
895
+ var r = new Va(t, e), n, a, s;
896
896
  do {
897
- switch (n = Xa(r), a = fe(r, 2, 0), a) {
897
+ switch (n = Ya(r), a = fe(r, 2, 0), a) {
898
898
  case 0:
899
- s = Za(r);
899
+ s = ja(r);
900
900
  break;
901
901
  case 1:
902
- s = Er(r, En, On);
902
+ s = Or(r, On, Un);
903
903
  break;
904
904
  case 2:
905
- Ya(r, r.ltree, r.dtree), s = Er(r, r.ltree, r.dtree);
905
+ Za(r, r.ltree, r.dtree), s = Or(r, r.ltree, r.dtree);
906
906
  break;
907
907
  default:
908
- s = Cn;
908
+ s = En;
909
909
  }
910
910
  if (s !== rr)
911
911
  throw new Error("Data error");
912
912
  } while (!n);
913
913
  return r.destLen < r.dest.length ? typeof r.dest.slice == "function" ? r.dest.slice(0, r.destLen) : r.dest.subarray(0, r.destLen) : r.dest;
914
914
  }
915
- qa(En, On);
916
- Rn(nr, ar, 4, 3);
917
- Rn(Un, Ln, 2, 1);
915
+ Xa(On, Un);
916
+ An(nr, ar, 4, 3);
917
+ An(Ln, Rn, 2, 1);
918
918
  nr[28] = 0;
919
919
  ar[28] = 258;
920
- var Ka = ja;
920
+ var Qa = Ka;
921
921
  function Me(t, e, r, n, a) {
922
922
  return Math.pow(1 - a, 3) * t + 3 * Math.pow(1 - a, 2) * a * e + 3 * (1 - a) * Math.pow(a, 2) * r + Math.pow(a, 3) * n;
923
923
  }
@@ -1072,13 +1072,13 @@ V.prototype.toDOMElement = function(t) {
1072
1072
  var e = this.toPathData(t), r = document.createElementNS("http://www.w3.org/2000/svg", "path");
1073
1073
  return r.setAttribute("d", e), r;
1074
1074
  };
1075
- function An(t) {
1075
+ function Mn(t) {
1076
1076
  throw new Error(t);
1077
1077
  }
1078
- function Or(t, e) {
1079
- t || An(e);
1078
+ function Ur(t, e) {
1079
+ t || Mn(e);
1080
1080
  }
1081
- var U = { fail: An, argument: Or, assert: Or }, Ur = 32768, Lr = 2147483648, De = {}, k = {}, R = {};
1081
+ var U = { fail: Mn, argument: Ur, assert: Ur }, Lr = 32768, Rr = 2147483648, Ie = {}, k = {}, R = {};
1082
1082
  function le(t) {
1083
1083
  return function() {
1084
1084
  return t;
@@ -1106,7 +1106,7 @@ k.USHORT = function(t) {
1106
1106
  };
1107
1107
  R.USHORT = le(2);
1108
1108
  k.SHORT = function(t) {
1109
- return t >= Ur && (t = -(2 * Ur - t)), [t >> 8 & 255, t & 255];
1109
+ return t >= Lr && (t = -(2 * Lr - t)), [t >> 8 & 255, t & 255];
1110
1110
  };
1111
1111
  R.SHORT = le(2);
1112
1112
  k.UINT24 = function(t) {
@@ -1118,7 +1118,7 @@ k.ULONG = function(t) {
1118
1118
  };
1119
1119
  R.ULONG = le(4);
1120
1120
  k.LONG = function(t) {
1121
- return t >= Lr && (t = -(2 * Lr - t)), [t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, t & 255];
1121
+ return t >= Rr && (t = -(2 * Rr - t)), [t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, t & 255];
1122
1122
  };
1123
1123
  R.LONG = le(4);
1124
1124
  k.FIXED = k.ULONG;
@@ -1184,12 +1184,12 @@ k.NAME = k.CHARARRAY;
1184
1184
  R.NAME = R.CHARARRAY;
1185
1185
  k.STRING = k.CHARARRAY;
1186
1186
  R.STRING = R.CHARARRAY;
1187
- De.UTF8 = function(t, e, r) {
1187
+ Ie.UTF8 = function(t, e, r) {
1188
1188
  for (var n = [], a = r, s = 0; s < a; s++, e += 1)
1189
1189
  n[s] = t.getUint8(e);
1190
1190
  return String.fromCharCode.apply(null, n);
1191
1191
  };
1192
- De.UTF16 = function(t, e, r) {
1192
+ Ie.UTF16 = function(t, e, r) {
1193
1193
  for (var n = [], a = r / 2, s = 0; s < a; s++, e += 2)
1194
1194
  n[s] = t.getUint16(e);
1195
1195
  return String.fromCharCode.apply(null, n);
@@ -1246,7 +1246,7 @@ var Yt = {
1246
1246
  "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"
1247
1247
  )
1248
1248
  };
1249
- De.MACSTRING = function(t, e, r, n) {
1249
+ Ie.MACSTRING = function(t, e, r, n) {
1250
1250
  var a = Yt[n];
1251
1251
  if (a !== void 0) {
1252
1252
  for (var s = "", i = 0; i < r; i++) {
@@ -1256,7 +1256,7 @@ De.MACSTRING = function(t, e, r, n) {
1256
1256
  return s;
1257
1257
  }
1258
1258
  };
1259
- var nt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), at, Qa = function(t) {
1259
+ var nt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), at, $a = function(t) {
1260
1260
  if (!at) {
1261
1261
  at = {};
1262
1262
  for (var e in Yt)
@@ -1278,7 +1278,7 @@ var nt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), at, Qa =
1278
1278
  }
1279
1279
  };
1280
1280
  k.MACSTRING = function(t, e) {
1281
- var r = Qa(e);
1281
+ var r = $a(e);
1282
1282
  if (r !== void 0) {
1283
1283
  for (var n = [], a = 0; a < t.length; a++) {
1284
1284
  var s = t.charCodeAt(a);
@@ -1296,12 +1296,12 @@ R.MACSTRING = function(t, e) {
1296
1296
  function Zt(t) {
1297
1297
  return t >= -128 && t <= 127;
1298
1298
  }
1299
- function $a(t, e, r) {
1299
+ function Ja(t, e, r) {
1300
1300
  for (var n = 0, a = t.length; e < a && n < 64 && t[e] === 0; )
1301
1301
  ++e, ++n;
1302
1302
  return r.push(128 | n - 1), e;
1303
1303
  }
1304
- function Ja(t, e, r) {
1304
+ function es(t, e, r) {
1305
1305
  for (var n = 0, a = t.length, s = e; s < a && n < 64; ) {
1306
1306
  var i = t[s];
1307
1307
  if (!Zt(i) || i === 0 && s + 1 < a && t[s + 1] === 0)
@@ -1313,7 +1313,7 @@ function Ja(t, e, r) {
1313
1313
  r.push(t[o] + 256 & 255);
1314
1314
  return s;
1315
1315
  }
1316
- function es(t, e, r) {
1316
+ function ts(t, e, r) {
1317
1317
  for (var n = 0, a = t.length, s = e; s < a && n < 64; ) {
1318
1318
  var i = t[s];
1319
1319
  if (i === 0 || Zt(i) && s + 1 < a && Zt(t[s + 1]))
@@ -1330,7 +1330,7 @@ function es(t, e, r) {
1330
1330
  k.VARDELTAS = function(t) {
1331
1331
  for (var e = 0, r = []; e < t.length; ) {
1332
1332
  var n = t[e];
1333
- n === 0 ? e = $a(t, e, r) : n >= -128 && n <= 127 ? e = Ja(t, e, r) : e = es(t, e, r);
1333
+ n === 0 ? e = Ja(t, e, r) : n >= -128 && n <= 127 ? e = es(t, e, r) : e = ts(t, e, r);
1334
1334
  }
1335
1335
  return r;
1336
1336
  };
@@ -1570,43 +1570,43 @@ var F = {
1570
1570
  tableList: jt,
1571
1571
  recordList: Xe
1572
1572
  };
1573
- function Rr(t, e) {
1573
+ function Ar(t, e) {
1574
1574
  return t.getUint8(e);
1575
1575
  }
1576
1576
  function gt(t, e) {
1577
1577
  return t.getUint16(e, !1);
1578
1578
  }
1579
- function ts(t, e) {
1579
+ function rs(t, e) {
1580
1580
  return t.getInt16(e, !1);
1581
1581
  }
1582
1582
  function sr(t, e) {
1583
1583
  return t.getUint32(e, !1);
1584
1584
  }
1585
- function Mn(t, e) {
1585
+ function Pn(t, e) {
1586
1586
  var r = t.getInt16(e, !1), n = t.getUint16(e + 2, !1);
1587
1587
  return r + n / 65535;
1588
1588
  }
1589
- function rs(t, e) {
1589
+ function ns(t, e) {
1590
1590
  for (var r = "", n = e; n < e + 4; n += 1)
1591
1591
  r += String.fromCharCode(t.getInt8(n));
1592
1592
  return r;
1593
1593
  }
1594
- function ns(t, e, r) {
1594
+ function as(t, e, r) {
1595
1595
  for (var n = 0, a = 0; a < r; a += 1)
1596
1596
  n <<= 8, n += t.getUint8(e + a);
1597
1597
  return n;
1598
1598
  }
1599
- function as(t, e, r) {
1599
+ function ss(t, e, r) {
1600
1600
  for (var n = [], a = e; a < r; a += 1)
1601
1601
  n.push(t.getUint8(a));
1602
1602
  return n;
1603
1603
  }
1604
- function ss(t) {
1604
+ function is(t) {
1605
1605
  for (var e = "", r = 0; r < t.length; r += 1)
1606
1606
  e += String.fromCharCode(t[r]);
1607
1607
  return e;
1608
1608
  }
1609
- var is = {
1609
+ var os = {
1610
1610
  byte: 1,
1611
1611
  uShort: 2,
1612
1612
  short: 2,
@@ -1648,7 +1648,7 @@ g.prototype.parseULong = function() {
1648
1648
  };
1649
1649
  g.prototype.parseOffset32 = g.prototype.parseULong;
1650
1650
  g.prototype.parseFixed = function() {
1651
- var t = Mn(this.data, this.offset + this.relativeOffset);
1651
+ var t = Pn(this.data, this.offset + this.relativeOffset);
1652
1652
  return this.relativeOffset += 4, t;
1653
1653
  };
1654
1654
  g.prototype.parseString = function(t) {
@@ -1670,7 +1670,7 @@ g.prototype.parseVersion = function(t) {
1670
1670
  return this.relativeOffset += 4, t === void 0 && (t = 4096), e + r / t / 10;
1671
1671
  };
1672
1672
  g.prototype.skip = function(t, e) {
1673
- e === void 0 && (e = 1), this.relativeOffset += is[t] * e;
1673
+ e === void 0 && (e = 1), this.relativeOffset += os[t] * e;
1674
1674
  };
1675
1675
  g.prototype.parseULongList = function(t) {
1676
1676
  t === void 0 && (t = this.parseULong());
@@ -1853,7 +1853,7 @@ g.uLongList = g.prototype.parseULongList;
1853
1853
  g.struct = g.prototype.parseStruct;
1854
1854
  g.coverage = g.prototype.parseCoverage;
1855
1855
  g.classDef = g.prototype.parseClassDef;
1856
- var Ar = {
1856
+ var Mr = {
1857
1857
  reserved: g.uShort,
1858
1858
  reqFeatureIndex: g.uShort,
1859
1859
  featureIndexes: g.uShortList
@@ -1862,10 +1862,10 @@ g.prototype.parseScriptList = function() {
1862
1862
  return this.parsePointer(g.recordList({
1863
1863
  tag: g.tag,
1864
1864
  script: g.pointer({
1865
- defaultLangSys: g.pointer(Ar),
1865
+ defaultLangSys: g.pointer(Mr),
1866
1866
  langSysRecords: g.recordList({
1867
1867
  tag: g.tag,
1868
- langSys: g.pointer(Ar)
1868
+ langSys: g.pointer(Mr)
1869
1869
  })
1870
1870
  })
1871
1871
  })) || [];
@@ -1904,20 +1904,20 @@ g.prototype.parseFeatureVariationsList = function() {
1904
1904
  }) || [];
1905
1905
  };
1906
1906
  var E = {
1907
- getByte: Rr,
1908
- getCard8: Rr,
1907
+ getByte: Ar,
1908
+ getCard8: Ar,
1909
1909
  getUShort: gt,
1910
1910
  getCard16: gt,
1911
- getShort: ts,
1911
+ getShort: rs,
1912
1912
  getULong: sr,
1913
- getFixed: Mn,
1914
- getTag: rs,
1915
- getOffset: ns,
1916
- getBytes: as,
1917
- bytesToString: ss,
1913
+ getFixed: Pn,
1914
+ getTag: ns,
1915
+ getOffset: as,
1916
+ getBytes: ss,
1917
+ bytesToString: is,
1918
1918
  Parser: g
1919
1919
  };
1920
- function os(t, e) {
1920
+ function us(t, e) {
1921
1921
  e.parseUShort(), t.length = e.parseULong(), t.language = e.parseULong();
1922
1922
  var r;
1923
1923
  t.groupCount = r = e.parseULong(), t.glyphIndexMap = {};
@@ -1925,7 +1925,7 @@ function os(t, e) {
1925
1925
  for (var a = e.parseULong(), s = e.parseULong(), i = e.parseULong(), o = a; o <= s; o += 1)
1926
1926
  t.glyphIndexMap[o] = i, i++;
1927
1927
  }
1928
- function us(t, e, r, n, a) {
1928
+ function ls(t, e, r, n, a) {
1929
1929
  t.length = e.parseUShort(), t.language = e.parseUShort();
1930
1930
  var s;
1931
1931
  t.segCount = s = e.parseUShort() >> 1, e.skip("uShort", 3), t.glyphIndexMap = {};
@@ -1933,7 +1933,7 @@ function us(t, e, r, n, a) {
1933
1933
  for (var c = void 0, p = i.parseUShort(), d = o.parseUShort(), v = u.parseShort(), y = l.parseUShort(), m = d; m <= p; m += 1)
1934
1934
  y !== 0 ? (h = l.offset + l.relativeOffset - 2, h += y, h += (m - d) * 2, c = E.getUShort(r, h), c !== 0 && (c = c + v & 65535)) : c = m + v & 65535, t.glyphIndexMap[m] = c;
1935
1935
  }
1936
- function ls(t, e) {
1936
+ function hs(t, e) {
1937
1937
  var r = {};
1938
1938
  r.version = E.getUShort(t, e), U.argument(r.version === 0, "cmap table version should be 0."), r.numTables = E.getUShort(t, e + 2);
1939
1939
  for (var n = -1, a = r.numTables - 1; a >= 0; a -= 1) {
@@ -1947,14 +1947,14 @@ function ls(t, e) {
1947
1947
  throw new Error("No valid cmap sub-tables found.");
1948
1948
  var o = new E.Parser(t, e + n);
1949
1949
  if (r.format = o.parseUShort(), r.format === 12)
1950
- os(r, o);
1950
+ us(r, o);
1951
1951
  else if (r.format === 4)
1952
- us(r, o, t, e, n);
1952
+ ls(r, o, t, e, n);
1953
1953
  else
1954
1954
  throw new Error("Only format 4 and 12 cmap tables are supported (found format " + r.format + ").");
1955
1955
  return r;
1956
1956
  }
1957
- function hs(t, e, r) {
1957
+ function cs(t, e, r) {
1958
1958
  t.segments.push({
1959
1959
  end: e,
1960
1960
  start: e,
@@ -1963,7 +1963,7 @@ function hs(t, e, r) {
1963
1963
  glyphIndex: r
1964
1964
  });
1965
1965
  }
1966
- function cs(t) {
1966
+ function fs(t) {
1967
1967
  t.segments.push({
1968
1968
  end: 65535,
1969
1969
  start: 65535,
@@ -1971,7 +1971,7 @@ function cs(t) {
1971
1971
  offset: 0
1972
1972
  });
1973
1973
  }
1974
- function fs(t) {
1974
+ function ps(t) {
1975
1975
  var e = !0, r;
1976
1976
  for (r = t.length - 1; r > 0; r -= 1) {
1977
1977
  var n = t.get(r);
@@ -2007,12 +2007,12 @@ function fs(t) {
2007
2007
  var s = new F.Table("cmap", a);
2008
2008
  for (s.segments = [], r = 0; r < t.length; r += 1) {
2009
2009
  for (var i = t.get(r), o = 0; o < i.unicodes.length; o += 1)
2010
- hs(s, i.unicodes[o], r);
2010
+ cs(s, i.unicodes[o], r);
2011
2011
  s.segments = s.segments.sort(function(b, x) {
2012
2012
  return b.start - x.start;
2013
2013
  });
2014
2014
  }
2015
- cs(s);
2015
+ fs(s);
2016
2016
  var u = s.segments.length, l = 0, h = [], f = [], c = [], p = [], d = [], v = [];
2017
2017
  for (r = 0; r < u; r += 1) {
2018
2018
  var y = s.segments[r];
@@ -2033,7 +2033,7 @@ function fs(t) {
2033
2033
  }
2034
2034
  return s;
2035
2035
  }
2036
- var Pn = { parse: ls, make: fs }, lt = [
2036
+ var Bn = { parse: hs, make: ps }, lt = [
2037
2037
  ".notdef",
2038
2038
  "space",
2039
2039
  "exclam",
@@ -2425,7 +2425,7 @@ var Pn = { parse: ls, make: fs }, lt = [
2425
2425
  "Regular",
2426
2426
  "Roman",
2427
2427
  "Semibold"
2428
- ], ps = [
2428
+ ], ds = [
2429
2429
  "",
2430
2430
  "",
2431
2431
  "",
@@ -2678,7 +2678,7 @@ var Pn = { parse: ls, make: fs }, lt = [
2678
2678
  "oslash",
2679
2679
  "oe",
2680
2680
  "germandbls"
2681
- ], ds = [
2681
+ ], gs = [
2682
2682
  "",
2683
2683
  "",
2684
2684
  "",
@@ -3194,10 +3194,10 @@ var Pn = { parse: ls, make: fs }, lt = [
3194
3194
  "ccaron",
3195
3195
  "dcroat"
3196
3196
  ];
3197
- function Bn(t) {
3197
+ function Dn(t) {
3198
3198
  this.font = t;
3199
3199
  }
3200
- Bn.prototype.charToGlyphIndex = function(t) {
3200
+ Dn.prototype.charToGlyphIndex = function(t) {
3201
3201
  var e = t.codePointAt(0), r = this.font.glyphs;
3202
3202
  if (r) {
3203
3203
  for (var n = 0; n < r.length; n += 1)
@@ -3249,7 +3249,7 @@ ir.prototype.nameToGlyphIndex = function(t) {
3249
3249
  ir.prototype.glyphIndexToName = function(t) {
3250
3250
  return this.names[t];
3251
3251
  };
3252
- function gs(t) {
3252
+ function vs(t) {
3253
3253
  for (var e, r = t.tables.cmap.glyphIndexMap, n = Object.keys(r), a = 0; a < n.length; a += 1) {
3254
3254
  var s = n[a], i = r[s];
3255
3255
  e = t.glyphs.get(i), e.addUnicode(parseInt(s));
@@ -3257,7 +3257,7 @@ function gs(t) {
3257
3257
  for (var o = 0; o < t.glyphs.length; o += 1)
3258
3258
  e = t.glyphs.get(o), t.cffEncoding ? t.isCIDFont ? e.name = "gid" + o : e.name = t.cffEncoding.charset[o] : t.glyphNames.names && (e.name = t.glyphNames.glyphIndexToName(o));
3259
3259
  }
3260
- function vs(t) {
3260
+ function ms(t) {
3261
3261
  t._IndexToUnicodeMap = {};
3262
3262
  for (var e = t.tables.cmap.glyphIndexMap, r = Object.keys(e), n = 0; n < r.length; n += 1) {
3263
3263
  var a = r[n], s = e[a];
@@ -3266,14 +3266,14 @@ function vs(t) {
3266
3266
  } : t._IndexToUnicodeMap[s].unicodes.push(parseInt(a));
3267
3267
  }
3268
3268
  }
3269
- function ms(t, e) {
3270
- e.lowMemory ? vs(t) : gs(t);
3269
+ function ys(t, e) {
3270
+ e.lowMemory ? ms(t) : vs(t);
3271
3271
  }
3272
- function ys(t, e, r, n, a) {
3272
+ function xs(t, e, r, n, a) {
3273
3273
  t.beginPath(), t.moveTo(e, r), t.lineTo(n, a), t.stroke();
3274
3274
  }
3275
- var Ce = { line: ys };
3276
- function xs(t, e) {
3275
+ var Ce = { line: xs };
3276
+ function bs(t, e) {
3277
3277
  var r = e || new V();
3278
3278
  return {
3279
3279
  configurable: !0,
@@ -3289,7 +3289,7 @@ function ae(t) {
3289
3289
  this.bindConstructorValues(t);
3290
3290
  }
3291
3291
  ae.prototype.bindConstructorValues = function(t) {
3292
- this.index = t.index || 0, this.name = t.name || null, this.unicode = t.unicode || void 0, this.unicodes = t.unicodes || t.unicode !== void 0 ? [t.unicode] : [], "xMin" in t && (this.xMin = t.xMin), "yMin" in t && (this.yMin = t.yMin), "xMax" in t && (this.xMax = t.xMax), "yMax" in t && (this.yMax = t.yMax), "advanceWidth" in t && (this.advanceWidth = t.advanceWidth), Object.defineProperty(this, "path", xs(this, t.path));
3292
+ this.index = t.index || 0, this.name = t.name || null, this.unicode = t.unicode || void 0, this.unicodes = t.unicodes || t.unicode !== void 0 ? [t.unicode] : [], "xMin" in t && (this.xMin = t.xMin), "yMin" in t && (this.yMin = t.yMin), "xMax" in t && (this.xMax = t.xMax), "yMax" in t && (this.yMax = t.yMax), "advanceWidth" in t && (this.advanceWidth = t.advanceWidth), Object.defineProperty(this, "path", bs(this, t.path));
3293
3293
  };
3294
3294
  ae.prototype.addUnicode = function(t) {
3295
3295
  this.unicodes.length === 0 && (this.unicode = t), this.unicodes.push(t);
@@ -3408,10 +3408,10 @@ or.prototype.get = function(t) {
3408
3408
  or.prototype.push = function(t, e) {
3409
3409
  this.glyphs[t] = e, this.length++;
3410
3410
  };
3411
- function bs(t, e) {
3411
+ function Ss(t, e) {
3412
3412
  return new ae({ index: e, font: t });
3413
3413
  }
3414
- function Ss(t, e, r, n, a, s) {
3414
+ function ks(t, e, r, n, a, s) {
3415
3415
  return function() {
3416
3416
  var i = new ae({ index: e, font: t });
3417
3417
  return i.path = function() {
@@ -3421,7 +3421,7 @@ function Ss(t, e, r, n, a, s) {
3421
3421
  }, it(i, "xMin", "_xMin"), it(i, "xMax", "_xMax"), it(i, "yMin", "_yMin"), it(i, "yMax", "_yMax"), i;
3422
3422
  };
3423
3423
  }
3424
- function ks(t, e, r, n) {
3424
+ function Fs(t, e, r, n) {
3425
3425
  return function() {
3426
3426
  var a = new ae({ index: e, font: t });
3427
3427
  return a.path = function() {
@@ -3430,15 +3430,15 @@ function ks(t, e, r, n) {
3430
3430
  }, a;
3431
3431
  };
3432
3432
  }
3433
- var de = { GlyphSet: or, glyphLoader: bs, ttfGlyphLoader: Ss, cffGlyphLoader: ks };
3434
- function Dn(t, e) {
3433
+ var de = { GlyphSet: or, glyphLoader: Ss, ttfGlyphLoader: ks, cffGlyphLoader: Fs };
3434
+ function Gn(t, e) {
3435
3435
  if (t === e)
3436
3436
  return !0;
3437
3437
  if (Array.isArray(t) && Array.isArray(e)) {
3438
3438
  if (t.length !== e.length)
3439
3439
  return !1;
3440
3440
  for (var r = 0; r < t.length; r += 1)
3441
- if (!Dn(t[r], e[r]))
3441
+ if (!Gn(t[r], e[r]))
3442
3442
  return !1;
3443
3443
  return !0;
3444
3444
  } else
@@ -3464,7 +3464,7 @@ function xe(t, e, r) {
3464
3464
  }
3465
3465
  return { objects: a, startOffset: e, endOffset: o };
3466
3466
  }
3467
- function Fs(t, e) {
3467
+ function Ts(t, e) {
3468
3468
  var r = [], n = E.getCard16(t, e), a, s;
3469
3469
  if (n !== 0) {
3470
3470
  var i = E.getByte(t, e + 2);
@@ -3476,7 +3476,7 @@ function Fs(t, e) {
3476
3476
  s = e + 2;
3477
3477
  return { offsets: r, startOffset: e, endOffset: s };
3478
3478
  }
3479
- function Ts(t, e, r, n, a) {
3479
+ function ws(t, e, r, n, a) {
3480
3480
  var s = E.getCard16(r, n), i = 0;
3481
3481
  if (s !== 0) {
3482
3482
  var o = E.getByte(r, n + 2);
@@ -3485,7 +3485,7 @@ function Ts(t, e, r, n, a) {
3485
3485
  var u = E.getBytes(r, i + e[t], i + e[t + 1]);
3486
3486
  return u;
3487
3487
  }
3488
- function ws(t) {
3488
+ function Cs(t) {
3489
3489
  for (var e = "", r = 15, n = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"]; ; ) {
3490
3490
  var a = t.parseByte(), s = a >> 4, i = a & 15;
3491
3491
  if (s === r || (e += n[s], i === r))
@@ -3494,14 +3494,14 @@ function ws(t) {
3494
3494
  }
3495
3495
  return parseFloat(e);
3496
3496
  }
3497
- function Cs(t, e) {
3497
+ function Es(t, e) {
3498
3498
  var r, n, a, s;
3499
3499
  if (e === 28)
3500
3500
  return r = t.parseByte(), n = t.parseByte(), r << 8 | n;
3501
3501
  if (e === 29)
3502
3502
  return r = t.parseByte(), n = t.parseByte(), a = t.parseByte(), s = t.parseByte(), r << 24 | n << 16 | a << 8 | s;
3503
3503
  if (e === 30)
3504
- return ws(t);
3504
+ return Cs(t);
3505
3505
  if (e >= 32 && e <= 246)
3506
3506
  return e - 139;
3507
3507
  if (e >= 247 && e <= 250)
@@ -3510,7 +3510,7 @@ function Cs(t, e) {
3510
3510
  return r = t.parseByte(), -(e - 251) * 256 - r - 108;
3511
3511
  throw new Error("Invalid b0 " + e);
3512
3512
  }
3513
- function Es(t) {
3513
+ function Os(t) {
3514
3514
  for (var e = {}, r = 0; r < t.length; r += 1) {
3515
3515
  var n = t[r][0], a = t[r][1], s = void 0;
3516
3516
  if (a.length === 1 ? s = a[0] : s = a, e.hasOwnProperty(n) && !isNaN(e[n]))
@@ -3519,19 +3519,19 @@ function Es(t) {
3519
3519
  }
3520
3520
  return e;
3521
3521
  }
3522
- function Gn(t, e, r) {
3522
+ function Nn(t, e, r) {
3523
3523
  e = e !== void 0 ? e : 0;
3524
3524
  var n = new E.Parser(t, e), a = [], s = [];
3525
3525
  for (r = r !== void 0 ? r : t.length; n.relativeOffset < r; ) {
3526
3526
  var i = n.parseByte();
3527
- i <= 21 ? (i === 12 && (i = 1200 + n.parseByte()), a.push([i, s]), s = []) : s.push(Cs(n, i));
3527
+ i <= 21 ? (i === 12 && (i = 1200 + n.parseByte()), a.push([i, s]), s = []) : s.push(Es(n, i));
3528
3528
  }
3529
- return Es(a);
3529
+ return Os(a);
3530
3530
  }
3531
3531
  function We(t, e) {
3532
3532
  return e <= 390 ? e = lt[e] : e = t[e - 391], e;
3533
3533
  }
3534
- function Nn(t, e, r) {
3534
+ function _n(t, e, r) {
3535
3535
  for (var n = {}, a, s = 0; s < e.length; s += 1) {
3536
3536
  var i = e[s];
3537
3537
  if (Array.isArray(i.type)) {
@@ -3545,11 +3545,11 @@ function Nn(t, e, r) {
3545
3545
  }
3546
3546
  return n;
3547
3547
  }
3548
- function Os(t, e) {
3548
+ function Us(t, e) {
3549
3549
  var r = {};
3550
3550
  return r.formatMajor = E.getCard8(t, e), r.formatMinor = E.getCard8(t, e + 1), r.size = E.getCard8(t, e + 2), r.offsetSize = E.getCard8(t, e + 3), r.startOffset = e, r.endOffset = e + 4, r;
3551
3551
  }
3552
- var _n = [
3552
+ var Hn = [
3553
3553
  { name: "version", op: 0, type: "SID" },
3554
3554
  { name: "notice", op: 1, type: "SID" },
3555
3555
  { name: "copyright", op: 1200, type: "SID" },
@@ -3585,26 +3585,26 @@ var _n = [
3585
3585
  { name: "fdArray", op: 1236, type: "offset" },
3586
3586
  { name: "fdSelect", op: 1237, type: "offset" },
3587
3587
  { name: "fontName", op: 1238, type: "SID" }
3588
- ], Hn = [
3588
+ ], zn = [
3589
3589
  { name: "subrs", op: 19, type: "offset", value: 0 },
3590
3590
  { name: "defaultWidthX", op: 20, type: "number", value: 0 },
3591
3591
  { name: "nominalWidthX", op: 21, type: "number", value: 0 }
3592
3592
  ];
3593
- function Us(t, e) {
3594
- var r = Gn(t, 0, t.byteLength);
3595
- return Nn(r, _n, e);
3593
+ function Ls(t, e) {
3594
+ var r = Nn(t, 0, t.byteLength);
3595
+ return _n(r, Hn, e);
3596
3596
  }
3597
- function zn(t, e, r, n) {
3598
- var a = Gn(t, e, r);
3599
- return Nn(a, Hn, n);
3597
+ function Wn(t, e, r, n) {
3598
+ var a = Nn(t, e, r);
3599
+ return _n(a, zn, n);
3600
3600
  }
3601
- function Mr(t, e, r, n) {
3601
+ function Pr(t, e, r, n) {
3602
3602
  for (var a = [], s = 0; s < r.length; s += 1) {
3603
- var i = new DataView(new Uint8Array(r[s]).buffer), o = Us(i, n);
3603
+ var i = new DataView(new Uint8Array(r[s]).buffer), o = Ls(i, n);
3604
3604
  o._subrs = [], o._subrsBias = 0, o._defaultWidthX = 0, o._nominalWidthX = 0;
3605
3605
  var u = o.private[0], l = o.private[1];
3606
3606
  if (u !== 0 && l !== 0) {
3607
- var h = zn(t, l + e, u, n);
3607
+ var h = Wn(t, l + e, u, n);
3608
3608
  if (o._defaultWidthX = h.defaultWidthX, o._nominalWidthX = h.nominalWidthX, h.subrs !== 0) {
3609
3609
  var f = l + h.subrs, c = xe(t, f + e);
3610
3610
  o._subrs = c.objects, o._subrsBias = Kt(o._subrs);
@@ -3615,7 +3615,7 @@ function Mr(t, e, r, n) {
3615
3615
  }
3616
3616
  return a;
3617
3617
  }
3618
- function Ls(t, e, r, n) {
3618
+ function Rs(t, e, r, n) {
3619
3619
  var a, s, i = new E.Parser(t, e);
3620
3620
  r -= 1;
3621
3621
  var o = [".notdef"], u = i.parseCard8();
@@ -3638,7 +3638,7 @@ function Ls(t, e, r, n) {
3638
3638
  throw new Error("Unknown charset format " + u);
3639
3639
  return o;
3640
3640
  }
3641
- function Rs(t, e, r) {
3641
+ function As(t, e, r) {
3642
3642
  var n, a = {}, s = new E.Parser(t, e), i = s.parseCard8();
3643
3643
  if (i === 0)
3644
3644
  for (var o = s.parseCard8(), u = 0; u < o; u += 1)
@@ -3653,7 +3653,7 @@ function Rs(t, e, r) {
3653
3653
  throw new Error("Unknown encoding format " + i);
3654
3654
  return new vt(a, r);
3655
3655
  }
3656
- function Pr(t, e, r) {
3656
+ function Br(t, e, r) {
3657
3657
  var n, a, s, i, o = new V(), u = [], l = 0, h = !1, f = !1, c = 0, p = 0, d, v, y, m;
3658
3658
  if (t.isCIDFont) {
3659
3659
  var b = t.tables.cff.topDict._fdSelect[e.index], x = t.tables.cff.topDict._fdArray[b];
@@ -3669,7 +3669,7 @@ function Pr(t, e, r) {
3669
3669
  w = u.length % 2 !== 0, w && !h && (T = u.shift() + m), l += u.length >> 1, u.length = 0, h = !0;
3670
3670
  }
3671
3671
  function O(w) {
3672
- for (var M, N, K, $, Y, I, _, D, W, Z, q, Q, B = 0; B < w.length; ) {
3672
+ for (var M, N, K, $, Y, D, _, I, W, Z, q, Q, B = 0; B < w.length; ) {
3673
3673
  var j = w[B];
3674
3674
  switch (B += 1, j) {
3675
3675
  case 1:
@@ -3698,23 +3698,23 @@ function Pr(t, e, r) {
3698
3698
  n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), c = s + u.shift(), p = i + u.shift(), o.curveTo(n, a, s, i, c, p);
3699
3699
  break;
3700
3700
  case 10:
3701
- Y = u.pop() + v, I = d[Y], I && O(I);
3701
+ Y = u.pop() + v, D = d[Y], D && O(D);
3702
3702
  break;
3703
3703
  case 11:
3704
3704
  return;
3705
3705
  case 12:
3706
3706
  switch (j = w[B], B += 1, j) {
3707
3707
  case 35:
3708
- n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(), D = i + u.shift(), W = _ + u.shift(), Z = D + u.shift(), q = W + u.shift(), Q = Z + u.shift(), c = q + u.shift(), p = Q + u.shift(), u.shift(), o.curveTo(n, a, s, i, _, D), o.curveTo(W, Z, q, Q, c, p);
3708
+ n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(), I = i + u.shift(), W = _ + u.shift(), Z = I + u.shift(), q = W + u.shift(), Q = Z + u.shift(), c = q + u.shift(), p = Q + u.shift(), u.shift(), o.curveTo(n, a, s, i, _, I), o.curveTo(W, Z, q, Q, c, p);
3709
3709
  break;
3710
3710
  case 34:
3711
- n = c + u.shift(), a = p, s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(), D = i, W = _ + u.shift(), Z = i, q = W + u.shift(), Q = p, c = q + u.shift(), o.curveTo(n, a, s, i, _, D), o.curveTo(W, Z, q, Q, c, p);
3711
+ n = c + u.shift(), a = p, s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(), I = i, W = _ + u.shift(), Z = i, q = W + u.shift(), Q = p, c = q + u.shift(), o.curveTo(n, a, s, i, _, I), o.curveTo(W, Z, q, Q, c, p);
3712
3712
  break;
3713
3713
  case 36:
3714
- n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(), D = i, W = _ + u.shift(), Z = i, q = W + u.shift(), Q = Z + u.shift(), c = q + u.shift(), o.curveTo(n, a, s, i, _, D), o.curveTo(W, Z, q, Q, c, p);
3714
+ n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(), I = i, W = _ + u.shift(), Z = i, q = W + u.shift(), Q = Z + u.shift(), c = q + u.shift(), o.curveTo(n, a, s, i, _, I), o.curveTo(W, Z, q, Q, c, p);
3715
3715
  break;
3716
3716
  case 37:
3717
- n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(), D = i + u.shift(), W = _ + u.shift(), Z = D + u.shift(), q = W + u.shift(), Q = Z + u.shift(), Math.abs(q - c) > Math.abs(Q - p) ? c = q + u.shift() : p = Q + u.shift(), o.curveTo(n, a, s, i, _, D), o.curveTo(W, Z, q, Q, c, p);
3717
+ n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(), I = i + u.shift(), W = _ + u.shift(), Z = I + u.shift(), q = W + u.shift(), Q = Z + u.shift(), Math.abs(q - c) > Math.abs(Q - p) ? c = q + u.shift() : p = Q + u.shift(), o.curveTo(n, a, s, i, _, I), o.curveTo(W, Z, q, Q, c, p);
3718
3718
  break;
3719
3719
  default:
3720
3720
  console.log("Glyph " + e.index + ": unknown operator 1200" + j), u.length = 0;
@@ -3761,7 +3761,7 @@ function Pr(t, e, r) {
3761
3761
  M = w[B], N = w[B + 1], u.push((M << 24 | N << 16) >> 16), B += 2;
3762
3762
  break;
3763
3763
  case 29:
3764
- Y = u.pop() + t.gsubrsBias, I = t.gsubrs[Y], I && O(I);
3764
+ Y = u.pop() + t.gsubrsBias, D = t.gsubrs[Y], D && O(D);
3765
3765
  break;
3766
3766
  case 30:
3767
3767
  for (; u.length > 0 && (n = c, a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), c = s + u.shift(), p = i + (u.length === 1 ? u.shift() : 0), o.curveTo(n, a, s, i, c, p), u.length !== 0); )
@@ -3778,7 +3778,7 @@ function Pr(t, e, r) {
3778
3778
  }
3779
3779
  return O(r), e.advanceWidth = T, o;
3780
3780
  }
3781
- function As(t, e, r, n) {
3781
+ function Ms(t, e, r, n) {
3782
3782
  var a = [], s, i = new E.Parser(t, e), o = i.parseCard8();
3783
3783
  if (o === 0)
3784
3784
  for (var u = 0; u < r; u++) {
@@ -3805,11 +3805,11 @@ function As(t, e, r, n) {
3805
3805
  throw new Error("CFF Table CID Font FDSelect table has unsupported format " + o);
3806
3806
  return a;
3807
3807
  }
3808
- function Ms(t, e, r, n) {
3808
+ function Ps(t, e, r, n) {
3809
3809
  r.tables.cff = {};
3810
- var a = Os(t, e), s = xe(t, a.endOffset, E.bytesToString), i = xe(t, s.endOffset), o = xe(t, i.endOffset, E.bytesToString), u = xe(t, o.endOffset);
3810
+ var a = Us(t, e), s = xe(t, a.endOffset, E.bytesToString), i = xe(t, s.endOffset), o = xe(t, i.endOffset, E.bytesToString), u = xe(t, o.endOffset);
3811
3811
  r.gsubrs = u.objects, r.gsubrsBias = Kt(r.gsubrs);
3812
- var l = Mr(t, e, i.objects, o.objects);
3812
+ var l = Pr(t, e, i.objects, o.objects);
3813
3813
  if (l.length !== 1)
3814
3814
  throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = " + l.length);
3815
3815
  var h = l[0];
@@ -3818,34 +3818,34 @@ function Ms(t, e, r, n) {
3818
3818
  if (f === 0 || c === 0)
3819
3819
  throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
3820
3820
  f += e;
3821
- var p = xe(t, f), d = Mr(t, e, p.objects, o.objects);
3822
- h._fdArray = d, c += e, h._fdSelect = As(t, c, r.numGlyphs, d.length);
3821
+ var p = xe(t, f), d = Pr(t, e, p.objects, o.objects);
3822
+ h._fdArray = d, c += e, h._fdSelect = Ms(t, c, r.numGlyphs, d.length);
3823
3823
  }
3824
- var v = e + h.private[1], y = zn(t, v, h.private[0], o.objects);
3824
+ var v = e + h.private[1], y = Wn(t, v, h.private[0], o.objects);
3825
3825
  if (r.defaultWidthX = y.defaultWidthX, r.nominalWidthX = y.nominalWidthX, y.subrs !== 0) {
3826
3826
  var m = v + y.subrs, b = xe(t, m);
3827
3827
  r.subrs = b.objects, r.subrsBias = Kt(r.subrs);
3828
3828
  } else
3829
3829
  r.subrs = [], r.subrsBias = 0;
3830
3830
  var x;
3831
- n.lowMemory ? (x = Fs(t, e + h.charStrings), r.nGlyphs = x.offsets.length) : (x = xe(t, e + h.charStrings), r.nGlyphs = x.objects.length);
3832
- var T = Ls(t, e + h.charset, r.nGlyphs, o.objects);
3833
- if (h.encoding === 0 ? r.cffEncoding = new vt(ps, T) : h.encoding === 1 ? r.cffEncoding = new vt(ds, T) : r.cffEncoding = Rs(t, e + h.encoding, T), r.encoding = r.encoding || r.cffEncoding, r.glyphs = new de.GlyphSet(r), n.lowMemory)
3831
+ n.lowMemory ? (x = Ts(t, e + h.charStrings), r.nGlyphs = x.offsets.length) : (x = xe(t, e + h.charStrings), r.nGlyphs = x.objects.length);
3832
+ var T = Rs(t, e + h.charset, r.nGlyphs, o.objects);
3833
+ if (h.encoding === 0 ? r.cffEncoding = new vt(ds, T) : h.encoding === 1 ? r.cffEncoding = new vt(gs, T) : r.cffEncoding = As(t, e + h.encoding, T), r.encoding = r.encoding || r.cffEncoding, r.glyphs = new de.GlyphSet(r), n.lowMemory)
3834
3834
  r._push = function(O) {
3835
- var w = Ts(O, x.offsets, t, e + h.charStrings);
3836
- r.glyphs.push(O, de.cffGlyphLoader(r, O, Pr, w));
3835
+ var w = ws(O, x.offsets, t, e + h.charStrings);
3836
+ r.glyphs.push(O, de.cffGlyphLoader(r, O, Br, w));
3837
3837
  };
3838
3838
  else
3839
3839
  for (var S = 0; S < r.nGlyphs; S += 1) {
3840
3840
  var A = x.objects[S];
3841
- r.glyphs.push(S, de.cffGlyphLoader(r, S, Pr, A));
3841
+ r.glyphs.push(S, de.cffGlyphLoader(r, S, Br, A));
3842
3842
  }
3843
3843
  }
3844
- function Wn(t, e) {
3844
+ function Vn(t, e) {
3845
3845
  var r, n = lt.indexOf(t);
3846
3846
  return n >= 0 && (r = n), n = e.indexOf(t), n >= 0 ? r = n + lt.length : (r = lt.length + e.length, e.push(t)), r;
3847
3847
  }
3848
- function Ps() {
3848
+ function Bs() {
3849
3849
  return new F.Record("Header", [
3850
3850
  { name: "major", type: "Card8", value: 1 },
3851
3851
  { name: "minor", type: "Card8", value: 0 },
@@ -3853,7 +3853,7 @@ function Ps() {
3853
3853
  { name: "major", type: "Card8", value: 1 }
3854
3854
  ]);
3855
3855
  }
3856
- function Bs(t) {
3856
+ function Ds(t) {
3857
3857
  var e = new F.Record("Name INDEX", [
3858
3858
  { name: "names", type: "INDEX", value: [] }
3859
3859
  ]);
@@ -3862,18 +3862,18 @@ function Bs(t) {
3862
3862
  e.names.push({ name: "name_" + r, type: "NAME", value: t[r] });
3863
3863
  return e;
3864
3864
  }
3865
- function Vn(t, e, r) {
3865
+ function qn(t, e, r) {
3866
3866
  for (var n = {}, a = 0; a < t.length; a += 1) {
3867
3867
  var s = t[a], i = e[s.name];
3868
- i !== void 0 && !Dn(i, s.value) && (s.type === "SID" && (i = Wn(i, r)), n[s.op] = { name: s.name, type: s.type, value: i });
3868
+ i !== void 0 && !Gn(i, s.value) && (s.type === "SID" && (i = Vn(i, r)), n[s.op] = { name: s.name, type: s.type, value: i });
3869
3869
  }
3870
3870
  return n;
3871
3871
  }
3872
- function Br(t, e) {
3872
+ function Dr(t, e) {
3873
3873
  var r = new F.Record("Top DICT", [
3874
3874
  { name: "dict", type: "DICT", value: {} }
3875
3875
  ]);
3876
- return r.dict = Vn(_n, t, e), r;
3876
+ return r.dict = qn(Hn, t, e), r;
3877
3877
  }
3878
3878
  function Ir(t) {
3879
3879
  var e = new F.Record("Top DICT INDEX", [
@@ -3890,21 +3890,21 @@ function Is(t) {
3890
3890
  e.strings.push({ name: "string_" + r, type: "STRING", value: t[r] });
3891
3891
  return e;
3892
3892
  }
3893
- function Ds() {
3893
+ function Gs() {
3894
3894
  return new F.Record("Global Subr INDEX", [
3895
3895
  { name: "subrs", type: "INDEX", value: [] }
3896
3896
  ]);
3897
3897
  }
3898
- function Gs(t, e) {
3898
+ function Ns(t, e) {
3899
3899
  for (var r = new F.Record("Charsets", [
3900
3900
  { name: "format", type: "Card8", value: 0 }
3901
3901
  ]), n = 0; n < t.length; n += 1) {
3902
- var a = t[n], s = Wn(a, e);
3902
+ var a = t[n], s = Vn(a, e);
3903
3903
  r.fields.push({ name: "glyph_" + n, type: "SID", value: s });
3904
3904
  }
3905
3905
  return r;
3906
3906
  }
3907
- function Ns(t) {
3907
+ function _s(t) {
3908
3908
  var e = [], r = t.path;
3909
3909
  e.push({ name: "width", type: "NUMBER", value: t.advanceWidth });
3910
3910
  for (var n = 0, a = 0, s = 0; s < r.commands.length; s += 1) {
@@ -3932,22 +3932,22 @@ function Ns(t) {
3932
3932
  }
3933
3933
  return e.push({ name: "endchar", type: "OP", value: 14 }), e;
3934
3934
  }
3935
- function _s(t) {
3935
+ function Hs(t) {
3936
3936
  for (var e = new F.Record("CharStrings INDEX", [
3937
3937
  { name: "charStrings", type: "INDEX", value: [] }
3938
3938
  ]), r = 0; r < t.length; r += 1) {
3939
- var n = t.get(r), a = Ns(n);
3939
+ var n = t.get(r), a = _s(n);
3940
3940
  e.charStrings.push({ name: n.name, type: "CHARSTRING", value: a });
3941
3941
  }
3942
3942
  return e;
3943
3943
  }
3944
- function Hs(t, e) {
3944
+ function zs(t, e) {
3945
3945
  var r = new F.Record("Private DICT", [
3946
3946
  { name: "dict", type: "DICT", value: {} }
3947
3947
  ]);
3948
- return r.dict = Vn(Hn, t, e), r;
3948
+ return r.dict = qn(zn, t, e), r;
3949
3949
  }
3950
- function zs(t, e) {
3950
+ function Ws(t, e) {
3951
3951
  for (var r = new F.Table("CFF ", [
3952
3952
  { name: "header", type: "RECORD" },
3953
3953
  { name: "nameIndex", type: "RECORD" },
@@ -3971,18 +3971,18 @@ function zs(t, e) {
3971
3971
  }, s = {}, i = [], o, u = 1; u < t.length; u += 1)
3972
3972
  o = t.get(u), i.push(o.name);
3973
3973
  var l = [];
3974
- r.header = Ps(), r.nameIndex = Bs([e.postScriptName]);
3975
- var h = Br(a, l);
3976
- r.topDictIndex = Ir(h), r.globalSubrIndex = Ds(), r.charsets = Gs(i, l), r.charStringsIndex = _s(t), r.privateDict = Hs(s, l), r.stringIndex = Is(l);
3974
+ r.header = Bs(), r.nameIndex = Ds([e.postScriptName]);
3975
+ var h = Dr(a, l);
3976
+ r.topDictIndex = Ir(h), r.globalSubrIndex = Gs(), r.charsets = Ns(i, l), r.charStringsIndex = Hs(t), r.privateDict = zs(s, l), r.stringIndex = Is(l);
3977
3977
  var f = r.header.sizeOf() + r.nameIndex.sizeOf() + r.topDictIndex.sizeOf() + r.stringIndex.sizeOf() + r.globalSubrIndex.sizeOf();
3978
- return a.charset = f, a.encoding = 0, a.charStrings = a.charset + r.charsets.sizeOf(), a.private[1] = a.charStrings + r.charStringsIndex.sizeOf(), h = Br(a, l), r.topDictIndex = Ir(h), r;
3978
+ return a.charset = f, a.encoding = 0, a.charStrings = a.charset + r.charsets.sizeOf(), a.private[1] = a.charStrings + r.charStringsIndex.sizeOf(), h = Dr(a, l), r.topDictIndex = Ir(h), r;
3979
3979
  }
3980
- var qn = { parse: Ms, make: zs };
3981
- function Ws(t, e) {
3980
+ var Xn = { parse: Ps, make: Ws };
3981
+ function Vs(t, e) {
3982
3982
  var r = {}, n = new E.Parser(t, e);
3983
3983
  return r.version = n.parseVersion(), r.fontRevision = Math.round(n.parseFixed() * 1e3) / 1e3, r.checkSumAdjustment = n.parseULong(), r.magicNumber = n.parseULong(), U.argument(r.magicNumber === 1594834165, "Font header has wrong magic number."), r.flags = n.parseUShort(), r.unitsPerEm = n.parseUShort(), r.created = n.parseLongDateTime(), r.modified = n.parseLongDateTime(), r.xMin = n.parseShort(), r.yMin = n.parseShort(), r.xMax = n.parseShort(), r.yMax = n.parseShort(), r.macStyle = n.parseUShort(), r.lowestRecPPEM = n.parseUShort(), r.fontDirectionHint = n.parseShort(), r.indexToLocFormat = n.parseShort(), r.glyphDataFormat = n.parseShort(), r;
3984
3984
  }
3985
- function Vs(t) {
3985
+ function qs(t) {
3986
3986
  var e = Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3) + 2082844800, r = e;
3987
3987
  return t.createdTimestamp && (r = t.createdTimestamp + 2082844800), new F.Table("head", [
3988
3988
  { name: "version", type: "FIXED", value: 65536 },
@@ -4004,12 +4004,12 @@ function Vs(t) {
4004
4004
  { name: "glyphDataFormat", type: "SHORT", value: 0 }
4005
4005
  ], t);
4006
4006
  }
4007
- var Xn = { parse: Ws, make: Vs };
4008
- function qs(t, e) {
4007
+ var Yn = { parse: Vs, make: qs };
4008
+ function Xs(t, e) {
4009
4009
  var r = {}, n = new E.Parser(t, e);
4010
4010
  return r.version = n.parseVersion(), r.ascender = n.parseShort(), r.descender = n.parseShort(), r.lineGap = n.parseShort(), r.advanceWidthMax = n.parseUShort(), r.minLeftSideBearing = n.parseShort(), r.minRightSideBearing = n.parseShort(), r.xMaxExtent = n.parseShort(), r.caretSlopeRise = n.parseShort(), r.caretSlopeRun = n.parseShort(), r.caretOffset = n.parseShort(), n.relativeOffset += 8, r.metricDataFormat = n.parseShort(), r.numberOfHMetrics = n.parseUShort(), r;
4011
4011
  }
4012
- function Xs(t) {
4012
+ function Ys(t) {
4013
4013
  return new F.Table("hhea", [
4014
4014
  { name: "version", type: "FIXED", value: 65536 },
4015
4015
  { name: "ascender", type: "FWORD", value: 0 },
@@ -4030,15 +4030,15 @@ function Xs(t) {
4030
4030
  { name: "numberOfHMetrics", type: "USHORT", value: 0 }
4031
4031
  ], t);
4032
4032
  }
4033
- var Yn = { parse: qs, make: Xs };
4034
- function Ys(t, e, r, n, a) {
4033
+ var Zn = { parse: Xs, make: Ys };
4034
+ function Zs(t, e, r, n, a) {
4035
4035
  for (var s, i, o = new E.Parser(t, e), u = 0; u < n; u += 1) {
4036
4036
  u < r && (s = o.parseUShort(), i = o.parseShort());
4037
4037
  var l = a.get(u);
4038
4038
  l.advanceWidth = s, l.leftSideBearing = i;
4039
4039
  }
4040
4040
  }
4041
- function Zs(t, e, r, n, a) {
4041
+ function js(t, e, r, n, a) {
4042
4042
  t._hmtxTableData = {};
4043
4043
  for (var s, i, o = new E.Parser(e, r), u = 0; u < a; u += 1)
4044
4044
  u < n && (s = o.parseUShort(), i = o.parseShort()), t._hmtxTableData[u] = {
@@ -4046,18 +4046,18 @@ function Zs(t, e, r, n, a) {
4046
4046
  leftSideBearing: i
4047
4047
  };
4048
4048
  }
4049
- function js(t, e, r, n, a, s, i) {
4050
- i.lowMemory ? Zs(t, e, r, n, a) : Ys(e, r, n, a, s);
4049
+ function Ks(t, e, r, n, a, s, i) {
4050
+ i.lowMemory ? js(t, e, r, n, a) : Zs(e, r, n, a, s);
4051
4051
  }
4052
- function Ks(t) {
4052
+ function Qs(t) {
4053
4053
  for (var e = new F.Table("hmtx", []), r = 0; r < t.length; r += 1) {
4054
4054
  var n = t.get(r), a = n.advanceWidth || 0, s = n.leftSideBearing || 0;
4055
4055
  e.fields.push({ name: "advanceWidth_" + r, type: "USHORT", value: a }), e.fields.push({ name: "leftSideBearing_" + r, type: "SHORT", value: s });
4056
4056
  }
4057
4057
  return e;
4058
4058
  }
4059
- var Zn = { parse: js, make: Ks };
4060
- function Qs(t) {
4059
+ var jn = { parse: Ks, make: Qs };
4060
+ function $s(t) {
4061
4061
  for (var e = new F.Table("ltag", [
4062
4062
  { name: "version", type: "ULONG", value: 1 },
4063
4063
  { name: "flags", type: "ULONG", value: 0 },
@@ -4068,7 +4068,7 @@ function Qs(t) {
4068
4068
  }
4069
4069
  return e.fields.push({ name: "stringPool", type: "CHARARRAY", value: r }), e;
4070
4070
  }
4071
- function $s(t, e) {
4071
+ function Js(t, e) {
4072
4072
  var r = new E.Parser(t, e), n = r.parseULong();
4073
4073
  U.argument(n === 1, "Unsupported ltag table version."), r.skip("uLong", 1);
4074
4074
  for (var a = r.parseULong(), s = [], i = 0; i < a; i++) {
@@ -4078,18 +4078,18 @@ function $s(t, e) {
4078
4078
  }
4079
4079
  return s;
4080
4080
  }
4081
- var jn = { make: Qs, parse: $s };
4082
- function Js(t, e) {
4081
+ var Kn = { make: $s, parse: Js };
4082
+ function ei(t, e) {
4083
4083
  var r = {}, n = new E.Parser(t, e);
4084
4084
  return r.version = n.parseVersion(), r.numGlyphs = n.parseUShort(), r.version === 1 && (r.maxPoints = n.parseUShort(), r.maxContours = n.parseUShort(), r.maxCompositePoints = n.parseUShort(), r.maxCompositeContours = n.parseUShort(), r.maxZones = n.parseUShort(), r.maxTwilightPoints = n.parseUShort(), r.maxStorage = n.parseUShort(), r.maxFunctionDefs = n.parseUShort(), r.maxInstructionDefs = n.parseUShort(), r.maxStackElements = n.parseUShort(), r.maxSizeOfInstructions = n.parseUShort(), r.maxComponentElements = n.parseUShort(), r.maxComponentDepth = n.parseUShort()), r;
4085
4085
  }
4086
- function ei(t) {
4086
+ function ti(t) {
4087
4087
  return new F.Table("maxp", [
4088
4088
  { name: "version", type: "FIXED", value: 20480 },
4089
4089
  { name: "numGlyphs", type: "USHORT", value: t }
4090
4090
  ]);
4091
4091
  }
4092
- var Kn = { parse: Js, make: ei }, Qn = [
4092
+ var Qn = { parse: ei, make: ti }, $n = [
4093
4093
  "copyright",
4094
4094
  // 0
4095
4095
  "fontFamily",
@@ -4136,7 +4136,7 @@ var Kn = { parse: Js, make: ei }, Qn = [
4136
4136
  // 21
4137
4137
  "wwsSubfamily"
4138
4138
  // 22
4139
- ], $n = {
4139
+ ], Jn = {
4140
4140
  0: "en",
4141
4141
  1: "fr",
4142
4142
  2: "de",
@@ -4256,7 +4256,7 @@ var Kn = { parse: Js, make: ei }, Qn = [
4256
4256
  149: "kl",
4257
4257
  150: "az",
4258
4258
  151: "nn"
4259
- }, ti = {
4259
+ }, ri = {
4260
4260
  0: 0,
4261
4261
  // langEnglish → smRoman
4262
4262
  1: 0,
@@ -4495,7 +4495,7 @@ var Kn = { parse: Js, make: ei }, Qn = [
4495
4495
  // langAzerbaijanRoman → smRoman
4496
4496
  151: 0
4497
4497
  // langNynorsk → smRoman
4498
- }, Jn = {
4498
+ }, ea = {
4499
4499
  1078: "af",
4500
4500
  1052: "sq",
4501
4501
  1156: "gsw",
@@ -4709,7 +4709,7 @@ var Kn = { parse: Js, make: ei }, Qn = [
4709
4709
  1144: "ii",
4710
4710
  1130: "yo"
4711
4711
  };
4712
- function ri(t, e, r) {
4712
+ function ni(t, e, r) {
4713
4713
  switch (t) {
4714
4714
  case 0:
4715
4715
  if (e === 65535)
@@ -4718,12 +4718,12 @@ function ri(t, e, r) {
4718
4718
  return r[e];
4719
4719
  break;
4720
4720
  case 1:
4721
- return $n[e];
4722
- case 3:
4723
4721
  return Jn[e];
4722
+ case 3:
4723
+ return ea[e];
4724
4724
  }
4725
4725
  }
4726
- var Qt = "utf-16", ni = {
4726
+ var Qt = "utf-16", ai = {
4727
4727
  0: "macintosh",
4728
4728
  // smRoman
4729
4729
  1: "x-mac-japanese",
@@ -4782,7 +4782,7 @@ var Qt = "utf-16", ni = {
4782
4782
  // smVietnamese
4783
4783
  31: "x-mac-extarabic"
4784
4784
  // smExtArabic
4785
- }, ai = {
4785
+ }, si = {
4786
4786
  15: "x-mac-icelandic",
4787
4787
  // langIcelandic
4788
4788
  17: "x-mac-turkish",
@@ -4814,24 +4814,24 @@ var Qt = "utf-16", ni = {
4814
4814
  146: "x-mac-gaelic"
4815
4815
  // langIrishGaelicScript
4816
4816
  };
4817
- function ea(t, e, r) {
4817
+ function ta(t, e, r) {
4818
4818
  switch (t) {
4819
4819
  case 0:
4820
4820
  return Qt;
4821
4821
  case 1:
4822
- return ai[r] || ni[e];
4822
+ return si[r] || ai[e];
4823
4823
  case 3:
4824
4824
  if (e === 1 || e === 10)
4825
4825
  return Qt;
4826
4826
  break;
4827
4827
  }
4828
4828
  }
4829
- function si(t, e, r) {
4829
+ function ii(t, e, r) {
4830
4830
  for (var n = {}, a = new E.Parser(t, e), s = a.parseUShort(), i = a.parseUShort(), o = a.offset + a.parseUShort(), u = 0; u < i; u++) {
4831
- var l = a.parseUShort(), h = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = Qn[c] || c, d = a.parseUShort(), v = a.parseUShort(), y = ri(l, f, r), m = ea(l, h, f);
4831
+ var l = a.parseUShort(), h = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = $n[c] || c, d = a.parseUShort(), v = a.parseUShort(), y = ni(l, f, r), m = ta(l, h, f);
4832
4832
  if (m !== void 0 && y !== void 0) {
4833
4833
  var b = void 0;
4834
- if (m === Qt ? b = De.UTF16(t, o + v, d) : b = De.MACSTRING(t, o + v, d, m), b) {
4834
+ if (m === Qt ? b = Ie.UTF16(t, o + v, d) : b = Ie.MACSTRING(t, o + v, d, m), b) {
4835
4835
  var x = n[p];
4836
4836
  x === void 0 && (x = n[p] = {}), x[y] = b;
4837
4837
  }
@@ -4845,7 +4845,7 @@ function Ct(t) {
4845
4845
  e[t[r]] = parseInt(r);
4846
4846
  return e;
4847
4847
  }
4848
- function Dr(t, e, r, n, a, s) {
4848
+ function Gr(t, e, r, n, a, s) {
4849
4849
  return new F.Record("NameRecord", [
4850
4850
  { name: "platformID", type: "USHORT", value: t },
4851
4851
  { name: "encodingID", type: "USHORT", value: e },
@@ -4855,7 +4855,7 @@ function Dr(t, e, r, n, a, s) {
4855
4855
  { name: "offset", type: "USHORT", value: s }
4856
4856
  ]);
4857
4857
  }
4858
- function ii(t, e) {
4858
+ function oi(t, e) {
4859
4859
  var r = t.length, n = e.length - r + 1;
4860
4860
  e:
4861
4861
  for (var a = 0; a < n; a++)
@@ -4867,8 +4867,8 @@ function ii(t, e) {
4867
4867
  }
4868
4868
  return -1;
4869
4869
  }
4870
- function Gr(t, e) {
4871
- var r = ii(t, e);
4870
+ function Nr(t, e) {
4871
+ var r = oi(t, e);
4872
4872
  if (r < 0) {
4873
4873
  r = e.length;
4874
4874
  for (var n = 0, a = t.length; n < a; ++n)
@@ -4876,22 +4876,22 @@ function Gr(t, e) {
4876
4876
  }
4877
4877
  return r;
4878
4878
  }
4879
- function oi(t, e) {
4880
- var r, n = [], a = {}, s = Ct(Qn);
4879
+ function ui(t, e) {
4880
+ var r, n = [], a = {}, s = Ct($n);
4881
4881
  for (var i in t) {
4882
4882
  var o = s[i];
4883
4883
  if (o === void 0 && (o = i), r = parseInt(o), isNaN(r))
4884
4884
  throw new Error('Name table entry "' + i + '" does not exist, see nameTableNames for complete list.');
4885
4885
  a[r] = t[i], n.push(r);
4886
4886
  }
4887
- for (var u = Ct($n), l = Ct(Jn), h = [], f = [], c = 0; c < n.length; c++) {
4887
+ for (var u = Ct(Jn), l = Ct(ea), h = [], f = [], c = 0; c < n.length; c++) {
4888
4888
  r = n[c];
4889
4889
  var p = a[r];
4890
4890
  for (var d in p) {
4891
- var v = p[d], y = 1, m = u[d], b = ti[m], x = ea(y, b, m), T = k.MACSTRING(v, x);
4891
+ var v = p[d], y = 1, m = u[d], b = ri[m], x = ta(y, b, m), T = k.MACSTRING(v, x);
4892
4892
  T === void 0 && (y = 0, m = e.indexOf(d), m < 0 && (m = e.length, e.push(d)), b = 4, T = k.UTF16(v));
4893
- var S = Gr(T, f);
4894
- h.push(Dr(
4893
+ var S = Nr(T, f);
4894
+ h.push(Gr(
4895
4895
  y,
4896
4896
  b,
4897
4897
  m,
@@ -4901,8 +4901,8 @@ function oi(t, e) {
4901
4901
  ));
4902
4902
  var A = l[d];
4903
4903
  if (A !== void 0) {
4904
- var O = k.UTF16(v), w = Gr(O, f);
4905
- h.push(Dr(
4904
+ var O = k.UTF16(v), w = Nr(O, f);
4905
+ h.push(Gr(
4906
4906
  3,
4907
4907
  1,
4908
4908
  A,
@@ -4924,7 +4924,7 @@ function oi(t, e) {
4924
4924
  M.fields.push({ name: "record_" + N, type: "RECORD", value: h[N] });
4925
4925
  return M.fields.push({ name: "strings", type: "LITERAL", value: f }), M;
4926
4926
  }
4927
- var ta = { parse: si, make: oi }, $t = [
4927
+ var ra = { parse: ii, make: ui }, $t = [
4928
4928
  { begin: 0, end: 127 },
4929
4929
  // Basic Latin
4930
4930
  { begin: 128, end: 255 },
@@ -5172,7 +5172,7 @@ var ta = { parse: si, make: oi }, $t = [
5172
5172
  { begin: 127024, end: 127135 }
5173
5173
  // Domino Tiles
5174
5174
  ];
5175
- function ui(t) {
5175
+ function li(t) {
5176
5176
  for (var e = 0; e < $t.length; e += 1) {
5177
5177
  var r = $t[e];
5178
5178
  if (t >= r.begin && t < r.end)
@@ -5180,14 +5180,14 @@ function ui(t) {
5180
5180
  }
5181
5181
  return -1;
5182
5182
  }
5183
- function li(t, e) {
5183
+ function hi(t, e) {
5184
5184
  var r = {}, n = new E.Parser(t, e);
5185
5185
  r.version = n.parseUShort(), r.xAvgCharWidth = n.parseShort(), r.usWeightClass = n.parseUShort(), r.usWidthClass = n.parseUShort(), r.fsType = n.parseUShort(), r.ySubscriptXSize = n.parseShort(), r.ySubscriptYSize = n.parseShort(), r.ySubscriptXOffset = n.parseShort(), r.ySubscriptYOffset = n.parseShort(), r.ySuperscriptXSize = n.parseShort(), r.ySuperscriptYSize = n.parseShort(), r.ySuperscriptXOffset = n.parseShort(), r.ySuperscriptYOffset = n.parseShort(), r.yStrikeoutSize = n.parseShort(), r.yStrikeoutPosition = n.parseShort(), r.sFamilyClass = n.parseShort(), r.panose = [];
5186
5186
  for (var a = 0; a < 10; a++)
5187
5187
  r.panose[a] = n.parseByte();
5188
5188
  return r.ulUnicodeRange1 = n.parseULong(), r.ulUnicodeRange2 = n.parseULong(), r.ulUnicodeRange3 = n.parseULong(), r.ulUnicodeRange4 = n.parseULong(), r.achVendID = String.fromCharCode(n.parseByte(), n.parseByte(), n.parseByte(), n.parseByte()), r.fsSelection = n.parseUShort(), r.usFirstCharIndex = n.parseUShort(), r.usLastCharIndex = n.parseUShort(), r.sTypoAscender = n.parseShort(), r.sTypoDescender = n.parseShort(), r.sTypoLineGap = n.parseShort(), r.usWinAscent = n.parseUShort(), r.usWinDescent = n.parseUShort(), r.version >= 1 && (r.ulCodePageRange1 = n.parseULong(), r.ulCodePageRange2 = n.parseULong()), r.version >= 2 && (r.sxHeight = n.parseShort(), r.sCapHeight = n.parseShort(), r.usDefaultChar = n.parseUShort(), r.usBreakChar = n.parseUShort(), r.usMaxContent = n.parseUShort()), r;
5189
5189
  }
5190
- function hi(t) {
5190
+ function ci(t) {
5191
5191
  return new F.Table("OS/2", [
5192
5192
  { name: "version", type: "USHORT", value: 3 },
5193
5193
  { name: "xAvgCharWidth", type: "SHORT", value: 0 },
@@ -5237,8 +5237,8 @@ function hi(t) {
5237
5237
  { name: "usMaxContext", type: "USHORT", value: 0 }
5238
5238
  ], t);
5239
5239
  }
5240
- var Jt = { parse: li, make: hi, unicodeRanges: $t, getUnicodeRange: ui };
5241
- function ci(t, e) {
5240
+ var Jt = { parse: hi, make: ci, unicodeRanges: $t, getUnicodeRange: li };
5241
+ function fi(t, e) {
5242
5242
  var r = {}, n = new E.Parser(t, e);
5243
5243
  switch (r.version = n.parseVersion(), r.italicAngle = n.parseFixed(), r.underlinePosition = n.parseShort(), r.underlineThickness = n.parseShort(), r.isFixedPitch = n.parseULong(), r.minMemType42 = n.parseULong(), r.maxMemType42 = n.parseULong(), r.minMemType1 = n.parseULong(), r.maxMemType1 = n.parseULong(), r.version) {
5244
5244
  case 1:
@@ -5263,7 +5263,7 @@ function ci(t, e) {
5263
5263
  }
5264
5264
  return r;
5265
5265
  }
5266
- function fi() {
5266
+ function pi() {
5267
5267
  return new F.Table("post", [
5268
5268
  { name: "version", type: "FIXED", value: 196608 },
5269
5269
  { name: "italicAngle", type: "FIXED", value: 0 },
@@ -5276,7 +5276,7 @@ function fi() {
5276
5276
  { name: "maxMemType1", type: "ULONG", value: 0 }
5277
5277
  ]);
5278
5278
  }
5279
- var ra = { parse: ci, make: fi }, ie = new Array(9);
5279
+ var na = { parse: fi, make: pi }, ie = new Array(9);
5280
5280
  ie[1] = function() {
5281
5281
  var e = this.offset + this.relativeOffset, r = this.parseUShort();
5282
5282
  if (r === 1)
@@ -5322,7 +5322,7 @@ ie[4] = function() {
5322
5322
  })
5323
5323
  };
5324
5324
  };
5325
- var Ie = {
5325
+ var De = {
5326
5326
  sequenceIndex: g.uShort,
5327
5327
  lookupListIndex: g.uShort
5328
5328
  };
@@ -5336,7 +5336,7 @@ ie[5] = function() {
5336
5336
  var s = this.parseUShort(), i = this.parseUShort();
5337
5337
  return {
5338
5338
  input: this.parseUShortList(s - 1),
5339
- lookupRecords: this.parseRecordList(i, Ie)
5339
+ lookupRecords: this.parseRecordList(i, De)
5340
5340
  };
5341
5341
  })
5342
5342
  };
@@ -5349,7 +5349,7 @@ ie[5] = function() {
5349
5349
  var s = this.parseUShort(), i = this.parseUShort();
5350
5350
  return {
5351
5351
  classes: this.parseUShortList(s - 1),
5352
- lookupRecords: this.parseRecordList(i, Ie)
5352
+ lookupRecords: this.parseRecordList(i, De)
5353
5353
  };
5354
5354
  })
5355
5355
  };
@@ -5358,7 +5358,7 @@ ie[5] = function() {
5358
5358
  return {
5359
5359
  substFormat: r,
5360
5360
  coverages: this.parseList(n, g.pointer(g.coverage)),
5361
- lookupRecords: this.parseRecordList(a, Ie)
5361
+ lookupRecords: this.parseRecordList(a, De)
5362
5362
  };
5363
5363
  }
5364
5364
  U.assert(!1, "0x" + e.toString(16) + ": lookup type 5 format must be 1, 2 or 3.");
@@ -5374,7 +5374,7 @@ ie[6] = function() {
5374
5374
  backtrack: this.parseUShortList(),
5375
5375
  input: this.parseUShortList(this.parseShort() - 1),
5376
5376
  lookahead: this.parseUShortList(),
5377
- lookupRecords: this.parseRecordList(Ie)
5377
+ lookupRecords: this.parseRecordList(De)
5378
5378
  };
5379
5379
  })
5380
5380
  };
@@ -5390,7 +5390,7 @@ ie[6] = function() {
5390
5390
  backtrack: this.parseUShortList(),
5391
5391
  input: this.parseUShortList(this.parseShort() - 1),
5392
5392
  lookahead: this.parseUShortList(),
5393
- lookupRecords: this.parseRecordList(Ie)
5393
+ lookupRecords: this.parseRecordList(De)
5394
5394
  };
5395
5395
  })
5396
5396
  };
@@ -5400,7 +5400,7 @@ ie[6] = function() {
5400
5400
  backtrackCoverage: this.parseList(g.pointer(g.coverage)),
5401
5401
  inputCoverage: this.parseList(g.pointer(g.coverage)),
5402
5402
  lookaheadCoverage: this.parseList(g.pointer(g.coverage)),
5403
- lookupRecords: this.parseRecordList(Ie)
5403
+ lookupRecords: this.parseRecordList(De)
5404
5404
  };
5405
5405
  U.assert(!1, "0x" + e.toString(16) + ": lookup type 6 format must be 1, 2 or 3.");
5406
5406
  };
@@ -5424,7 +5424,7 @@ ie[8] = function() {
5424
5424
  substitutes: this.parseUShortList()
5425
5425
  };
5426
5426
  };
5427
- function pi(t, e) {
5427
+ function di(t, e) {
5428
5428
  e = e || 0;
5429
5429
  var r = new g(t, e), n = r.parseVersion(1);
5430
5430
  return U.argument(n === 1 || n === 1.1, "Unsupported GSUB table version."), n === 1 ? {
@@ -5514,7 +5514,7 @@ Ge[6] = function(e) {
5514
5514
  }
5515
5515
  U.assert(!1, "lookup type 6 format must be 1, 2 or 3.");
5516
5516
  };
5517
- function di(t) {
5517
+ function gi(t) {
5518
5518
  return new F.Table("GSUB", [
5519
5519
  { name: "version", type: "ULONG", value: 65536 },
5520
5520
  { name: "scripts", type: "TABLE", value: new F.ScriptList(t.scripts) },
@@ -5522,17 +5522,17 @@ function di(t) {
5522
5522
  { name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups, Ge) }
5523
5523
  ]);
5524
5524
  }
5525
- var na = { parse: pi, make: di };
5526
- function gi(t, e) {
5525
+ var aa = { parse: di, make: gi };
5526
+ function vi(t, e) {
5527
5527
  var r = new E.Parser(t, e), n = r.parseULong();
5528
5528
  U.argument(n === 1, "Unsupported META table version."), r.parseULong(), r.parseULong();
5529
5529
  for (var a = r.parseULong(), s = {}, i = 0; i < a; i++) {
5530
- var o = r.parseTag(), u = r.parseULong(), l = r.parseULong(), h = De.UTF8(t, e + u, l);
5530
+ var o = r.parseTag(), u = r.parseULong(), l = r.parseULong(), h = Ie.UTF8(t, e + u, l);
5531
5531
  s[o] = h;
5532
5532
  }
5533
5533
  return s;
5534
5534
  }
5535
- function vi(t) {
5535
+ function mi(t) {
5536
5536
  var e = Object.keys(t).length, r = "", n = 16 + e * 12, a = new F.Table("meta", [
5537
5537
  { name: "version", type: "ULONG", value: 1 },
5538
5538
  { name: "flags", type: "ULONG", value: 0 },
@@ -5545,8 +5545,8 @@ function vi(t) {
5545
5545
  }
5546
5546
  return a.fields.push({ name: "stringPool", type: "CHARARRAY", value: r }), a;
5547
5547
  }
5548
- var aa = { parse: gi, make: vi };
5549
- function Nr(t) {
5548
+ var sa = { parse: vi, make: mi };
5549
+ function _r(t) {
5550
5550
  return Math.log(t) / Math.log(2) | 0;
5551
5551
  }
5552
5552
  function ur(t) {
@@ -5556,7 +5556,7 @@ function ur(t) {
5556
5556
  e += (t[r] << 24) + (t[r + 1] << 16) + (t[r + 2] << 8) + t[r + 3];
5557
5557
  return e %= Math.pow(2, 32), e;
5558
5558
  }
5559
- function _r(t, e, r, n) {
5559
+ function Hr(t, e, r, n) {
5560
5560
  return new F.Record("Table Record", [
5561
5561
  { name: "tag", type: "TAG", value: t !== void 0 ? t : "" },
5562
5562
  { name: "checkSum", type: "ULONG", value: e !== void 0 ? e : 0 },
@@ -5564,7 +5564,7 @@ function _r(t, e, r, n) {
5564
5564
  { name: "length", type: "ULONG", value: n !== void 0 ? n : 0 }
5565
5565
  ]);
5566
5566
  }
5567
- function sa(t) {
5567
+ function ia(t) {
5568
5568
  var e = new F.Table("sfnt", [
5569
5569
  { name: "version", type: "TAG", value: "OTTO" },
5570
5570
  { name: "numTables", type: "USHORT", value: 0 },
@@ -5573,14 +5573,14 @@ function sa(t) {
5573
5573
  { name: "rangeShift", type: "USHORT", value: 0 }
5574
5574
  ]);
5575
5575
  e.tables = t, e.numTables = t.length;
5576
- var r = Math.pow(2, Nr(e.numTables));
5577
- e.searchRange = 16 * r, e.entrySelector = Nr(r), e.rangeShift = e.numTables * 16 - e.searchRange;
5578
- for (var n = [], a = [], s = e.sizeOf() + _r().sizeOf() * e.numTables; s % 4 !== 0; )
5576
+ var r = Math.pow(2, _r(e.numTables));
5577
+ e.searchRange = 16 * r, e.entrySelector = _r(r), e.rangeShift = e.numTables * 16 - e.searchRange;
5578
+ for (var n = [], a = [], s = e.sizeOf() + Hr().sizeOf() * e.numTables; s % 4 !== 0; )
5579
5579
  s += 1, a.push({ name: "padding", type: "BYTE", value: 0 });
5580
5580
  for (var i = 0; i < t.length; i += 1) {
5581
5581
  var o = t[i];
5582
5582
  U.argument(o.tableName.length === 4, "Table name" + o.tableName + " is invalid.");
5583
- var u = o.sizeOf(), l = _r(o.tableName, ur(o.encode()), s, u);
5583
+ var u = o.sizeOf(), l = Hr(o.tableName, ur(o.encode()), s, u);
5584
5584
  for (n.push({ name: l.tag + " Table Record", type: "RECORD", value: l }), a.push({ name: o.tableName + " table", type: "RECORD", value: o }), s += u, U.argument(!isNaN(s), "Something went wrong calculating the offset."); s % 4 !== 0; )
5585
5585
  s += 1, a.push({ name: "padding", type: "BYTE", value: 0 });
5586
5586
  }
@@ -5588,7 +5588,7 @@ function sa(t) {
5588
5588
  return h.value.tag > f.value.tag ? 1 : -1;
5589
5589
  }), e.fields = e.fields.concat(n), e.fields = e.fields.concat(a), e;
5590
5590
  }
5591
- function Hr(t, e, r) {
5591
+ function zr(t, e, r) {
5592
5592
  for (var n = 0; n < e.length; n += 1) {
5593
5593
  var a = t.charToGlyphIndex(e[n]);
5594
5594
  if (a > 0) {
@@ -5598,12 +5598,12 @@ function Hr(t, e, r) {
5598
5598
  }
5599
5599
  return r;
5600
5600
  }
5601
- function mi(t) {
5601
+ function yi(t) {
5602
5602
  for (var e = 0, r = 0; r < t.length; r += 1)
5603
5603
  e += t[r];
5604
5604
  return e / t.length;
5605
5605
  }
5606
- function yi(t) {
5606
+ function xi(t) {
5607
5607
  for (var e = [], r = [], n = [], a = [], s = [], i = [], o = [], u, l = 0, h = 0, f = 0, c = 0, p = 0, d = 0; d < t.glyphs.length; d += 1) {
5608
5608
  var v = t.glyphs.get(d), y = v.unicode | 0;
5609
5609
  if (isNaN(v.advanceWidth))
@@ -5631,13 +5631,13 @@ function yi(t) {
5631
5631
  xMax: Math.max.apply(null, n),
5632
5632
  yMax: Math.max.apply(null, a),
5633
5633
  advanceWidthMax: Math.max.apply(null, s),
5634
- advanceWidthAvg: mi(s),
5634
+ advanceWidthAvg: yi(s),
5635
5635
  minLeftSideBearing: Math.min.apply(null, i),
5636
5636
  maxLeftSideBearing: Math.max.apply(null, i),
5637
5637
  minRightSideBearing: Math.min.apply(null, o)
5638
5638
  };
5639
5639
  x.ascender = t.ascender, x.descender = t.descender;
5640
- var T = Xn.make({
5640
+ var T = Yn.make({
5641
5641
  flags: 3,
5642
5642
  // 00000011 (baseline for font at y=0; left sidebearing point at x=0)
5643
5643
  unitsPerEm: t.unitsPerEm,
@@ -5647,7 +5647,7 @@ function yi(t) {
5647
5647
  yMax: x.yMax,
5648
5648
  lowestRecPPEM: 3,
5649
5649
  createdTimestamp: t.createdTimestamp
5650
- }), S = Yn.make({
5650
+ }), S = Zn.make({
5651
5651
  ascender: x.ascender,
5652
5652
  descender: x.descender,
5653
5653
  advanceWidthMax: x.advanceWidthMax,
@@ -5655,7 +5655,7 @@ function yi(t) {
5655
5655
  minRightSideBearing: x.minRightSideBearing,
5656
5656
  xMaxExtent: x.maxLeftSideBearing + (x.xMax - x.xMin),
5657
5657
  numberOfHMetrics: t.glyphs.length
5658
- }), A = Kn.make(t.glyphs.length), O = Jt.make(Object.assign({
5658
+ }), A = Qn.make(t.glyphs.length), O = Jt.make(Object.assign({
5659
5659
  xAvgCharWidth: Math.round(x.advanceWidthAvg),
5660
5660
  usFirstCharIndex: u,
5661
5661
  usLastCharIndex: l,
@@ -5674,19 +5674,19 @@ function yi(t) {
5674
5674
  usWinDescent: Math.abs(x.yMin),
5675
5675
  ulCodePageRange1: 1,
5676
5676
  // FIXME: hard-code Latin 1 support for now
5677
- sxHeight: Hr(t, "xyvw", { yMax: Math.round(x.ascender / 2) }).yMax,
5678
- sCapHeight: Hr(t, "HIKLEFJMNTZBDPRAGOQSUVWXY", x).yMax,
5677
+ sxHeight: zr(t, "xyvw", { yMax: Math.round(x.ascender / 2) }).yMax,
5678
+ sCapHeight: zr(t, "HIKLEFJMNTZBDPRAGOQSUVWXY", x).yMax,
5679
5679
  usDefaultChar: t.hasChar(" ") ? 32 : 0,
5680
5680
  // Use space as the default character, if available.
5681
5681
  usBreakChar: t.hasChar(" ") ? 32 : 0
5682
5682
  // Use space as the break character, if available.
5683
- }, t.tables.os2)), w = Zn.make(t.glyphs), M = Pn.make(t.glyphs), N = t.getEnglishName("fontFamily"), K = t.getEnglishName("fontSubfamily"), $ = N + " " + K, Y = t.getEnglishName("postScriptName");
5683
+ }, t.tables.os2)), w = jn.make(t.glyphs), M = Bn.make(t.glyphs), N = t.getEnglishName("fontFamily"), K = t.getEnglishName("fontSubfamily"), $ = N + " " + K, Y = t.getEnglishName("postScriptName");
5684
5684
  Y || (Y = N.replace(/\s/g, "") + "-" + K);
5685
- var I = {};
5685
+ var D = {};
5686
5686
  for (var _ in t.names)
5687
- I[_] = t.names[_];
5688
- I.uniqueID || (I.uniqueID = { en: t.getEnglishName("manufacturer") + ":" + $ }), I.postScriptName || (I.postScriptName = { en: Y }), I.preferredFamily || (I.preferredFamily = t.names.fontFamily), I.preferredSubfamily || (I.preferredSubfamily = t.names.fontSubfamily);
5689
- var D = [], W = ta.make(I, D), Z = D.length > 0 ? jn.make(D) : void 0, q = ra.make(), Q = qn.make(t.glyphs, {
5687
+ D[_] = t.names[_];
5688
+ D.uniqueID || (D.uniqueID = { en: t.getEnglishName("manufacturer") + ":" + $ }), D.postScriptName || (D.postScriptName = { en: Y }), D.preferredFamily || (D.preferredFamily = t.names.fontFamily), D.preferredSubfamily || (D.preferredSubfamily = t.names.fontSubfamily);
5689
+ var I = [], W = ra.make(D, I), Z = I.length > 0 ? Kn.make(I) : void 0, q = na.make(), Q = Xn.make(t.glyphs, {
5690
5690
  version: t.getEnglishName("version"),
5691
5691
  fullName: $,
5692
5692
  familyName: N,
@@ -5694,18 +5694,18 @@ function yi(t) {
5694
5694
  postScriptName: Y,
5695
5695
  unitsPerEm: t.unitsPerEm,
5696
5696
  fontBBox: [0, x.yMin, x.ascender, x.advanceWidthMax]
5697
- }), B = t.metas && Object.keys(t.metas).length > 0 ? aa.make(t.metas) : void 0, j = [T, S, A, O, W, M, q, Q, w];
5698
- Z && j.push(Z), t.tables.gsub && j.push(na.make(t.tables.gsub)), B && j.push(B);
5699
- for (var bt = sa(j), xa = bt.encode(), ba = ur(xa), St = bt.fields, mr = !1, rt = 0; rt < St.length; rt += 1)
5697
+ }), B = t.metas && Object.keys(t.metas).length > 0 ? sa.make(t.metas) : void 0, j = [T, S, A, O, W, M, q, Q, w];
5698
+ Z && j.push(Z), t.tables.gsub && j.push(aa.make(t.tables.gsub)), B && j.push(B);
5699
+ for (var bt = ia(j), ba = bt.encode(), Sa = ur(ba), St = bt.fields, yr = !1, rt = 0; rt < St.length; rt += 1)
5700
5700
  if (St[rt].name === "head table") {
5701
- St[rt].value.checkSumAdjustment = 2981146554 - ba, mr = !0;
5701
+ St[rt].value.checkSumAdjustment = 2981146554 - Sa, yr = !0;
5702
5702
  break;
5703
5703
  }
5704
- if (!mr)
5704
+ if (!yr)
5705
5705
  throw new Error("Could not find head table with checkSum to adjust.");
5706
5706
  return bt;
5707
5707
  }
5708
- var xi = { make: sa, fontToTable: yi, computeCheckSum: ur };
5708
+ var bi = { make: ia, fontToTable: xi, computeCheckSum: ur };
5709
5709
  function Et(t, e) {
5710
5710
  for (var r = 0, n = t.length - 1; r <= n; ) {
5711
5711
  var a = r + n >>> 1, s = t[a].tag;
@@ -5715,7 +5715,7 @@ function Et(t, e) {
5715
5715
  }
5716
5716
  return -r - 1;
5717
5717
  }
5718
- function zr(t, e) {
5718
+ function Wr(t, e) {
5719
5719
  for (var r = 0, n = t.length - 1; r <= n; ) {
5720
5720
  var a = r + n >>> 1, s = t[a];
5721
5721
  if (s === e)
@@ -5724,7 +5724,7 @@ function zr(t, e) {
5724
5724
  }
5725
5725
  return -r - 1;
5726
5726
  }
5727
- function Wr(t, e) {
5727
+ function Vr(t, e) {
5728
5728
  for (var r, n = 0, a = t.length - 1; n <= a; ) {
5729
5729
  var s = n + a >>> 1;
5730
5730
  r = t[s];
@@ -5759,7 +5759,7 @@ Ke.prototype = {
5759
5759
  * @param {number} value
5760
5760
  * @return {number}
5761
5761
  */
5762
- binSearch: zr,
5762
+ binSearch: Wr,
5763
5763
  /**
5764
5764
  * Get or create the Layout table (GSUB, GPOS etc).
5765
5765
  * @param {boolean} create - Whether to create a new one.
@@ -5914,7 +5914,7 @@ Ke.prototype = {
5914
5914
  case 1:
5915
5915
  return t.startGlyph <= e && e < t.startGlyph + t.classes.length ? t.classes[e - t.startGlyph] : 0;
5916
5916
  case 2:
5917
- var r = Wr(t.ranges, e);
5917
+ var r = Vr(t.ranges, e);
5918
5918
  return r ? r.classId : 0;
5919
5919
  }
5920
5920
  },
@@ -5928,10 +5928,10 @@ Ke.prototype = {
5928
5928
  getCoverageIndex: function(t, e) {
5929
5929
  switch (t.format) {
5930
5930
  case 1:
5931
- var r = zr(t.glyphs, e);
5931
+ var r = Wr(t.glyphs, e);
5932
5932
  return r >= 0 ? r : -1;
5933
5933
  case 2:
5934
- var n = Wr(t.ranges, e);
5934
+ var n = Vr(t.ranges, e);
5935
5935
  return n ? n.index + e - n.start : -1;
5936
5936
  }
5937
5937
  },
@@ -5987,7 +5987,7 @@ Qe.prototype.getKerningTables = function(t, e) {
5987
5987
  function re(t) {
5988
5988
  Ke.call(this, t, "gsub");
5989
5989
  }
5990
- function bi(t, e) {
5990
+ function Si(t, e) {
5991
5991
  var r = t.length;
5992
5992
  if (r !== e.length)
5993
5993
  return !1;
@@ -6117,7 +6117,7 @@ re.prototype.addLigature = function(t, e, r, n) {
6117
6117
  }, l = this.binSearch(s.coverage.glyphs, i);
6118
6118
  if (l >= 0) {
6119
6119
  for (var h = s.ligatureSets[l], f = 0; f < h.length; f++)
6120
- if (bi(h[f].components, o))
6120
+ if (Si(h[f].components, o))
6121
6121
  return;
6122
6122
  h.push(u);
6123
6123
  } else
@@ -6155,10 +6155,10 @@ re.prototype.add = function(t, e, r, n) {
6155
6155
  return e.by instanceof Array ? this.addMultiple(t, e, r, n) : this.addLigature(t, e, r, n);
6156
6156
  }
6157
6157
  };
6158
- function Si() {
6158
+ function ki() {
6159
6159
  return typeof window < "u";
6160
6160
  }
6161
- function ki(t) {
6161
+ function Fi(t) {
6162
6162
  for (var e = new Buffer(t.byteLength), r = new Uint8Array(t), n = 0; n < e.length; ++n)
6163
6163
  e[n] = r[n];
6164
6164
  return e;
@@ -6167,11 +6167,11 @@ function _e(t, e) {
6167
6167
  if (!t)
6168
6168
  throw e;
6169
6169
  }
6170
- function Vr(t, e, r, n, a) {
6170
+ function qr(t, e, r, n, a) {
6171
6171
  var s;
6172
6172
  return (e & n) > 0 ? (s = t.parseByte(), e & a || (s = -s), s = r + s) : (e & a) > 0 ? s = r : s = r + t.parseShort(), s;
6173
6173
  }
6174
- function ia(t, e, r) {
6174
+ function oa(t, e, r) {
6175
6175
  var n = new E.Parser(e, r);
6176
6176
  t.numberOfContours = n.parseShort(), t._xMin = n.parseShort(), t._yMin = n.parseShort(), t._xMax = n.parseShort(), t._yMax = n.parseShort();
6177
6177
  var a, s;
@@ -6193,9 +6193,9 @@ function ia(t, e, r) {
6193
6193
  for (var v = 0; v < l; v += 1)
6194
6194
  s = a[v], d = {}, d.onCurve = !!(s & 1), d.lastPointOfContour = i.indexOf(v) >= 0, p.push(d);
6195
6195
  for (var y = 0, m = 0; m < l; m += 1)
6196
- s = a[m], d = p[m], d.x = Vr(n, s, y, 2, 16), y = d.x;
6196
+ s = a[m], d = p[m], d.x = qr(n, s, y, 2, 16), y = d.x;
6197
6197
  for (var b = 0, x = 0; x < l; x += 1)
6198
- s = a[x], d = p[x], d.y = Vr(n, s, b, 4, 32), b = d.y;
6198
+ s = a[x], d = p[x], d.y = qr(n, s, b, 4, 32), b = d.y;
6199
6199
  }
6200
6200
  t.points = p;
6201
6201
  } else
@@ -6236,18 +6236,18 @@ function Ot(t, e) {
6236
6236
  }
6237
6237
  return r;
6238
6238
  }
6239
- function Fi(t) {
6239
+ function Ti(t) {
6240
6240
  for (var e = [], r = [], n = 0; n < t.length; n += 1) {
6241
6241
  var a = t[n];
6242
6242
  r.push(a), a.lastPointOfContour && (e.push(r), r = []);
6243
6243
  }
6244
6244
  return U.argument(r.length === 0, "There are still points left in the current contour."), e;
6245
6245
  }
6246
- function oa(t) {
6246
+ function ua(t) {
6247
6247
  var e = new V();
6248
6248
  if (!t)
6249
6249
  return e;
6250
- for (var r = Fi(t), n = 0; n < r.length; ++n) {
6250
+ for (var r = Ti(t), n = 0; n < r.length; ++n) {
6251
6251
  var a = r[n], s = null, i = a[a.length - 1], o = a[0];
6252
6252
  if (i.onCurve)
6253
6253
  e.moveTo(i.x, i.y);
@@ -6268,7 +6268,7 @@ function oa(t) {
6268
6268
  }
6269
6269
  return e;
6270
6270
  }
6271
- function ua(t, e) {
6271
+ function la(t, e) {
6272
6272
  if (e.isComposite)
6273
6273
  for (var r = 0; r < e.components.length; r += 1) {
6274
6274
  var n = e.components[r], a = t.get(n.glyphIndex);
@@ -6292,50 +6292,50 @@ function ua(t, e) {
6292
6292
  e.points = e.points.concat(s);
6293
6293
  }
6294
6294
  }
6295
- return oa(e.points);
6295
+ return ua(e.points);
6296
6296
  }
6297
- function Ti(t, e, r, n) {
6297
+ function wi(t, e, r, n) {
6298
6298
  for (var a = new de.GlyphSet(n), s = 0; s < r.length - 1; s += 1) {
6299
6299
  var i = r[s], o = r[s + 1];
6300
- i !== o ? a.push(s, de.ttfGlyphLoader(n, s, ia, t, e + i, ua)) : a.push(s, de.glyphLoader(n, s));
6300
+ i !== o ? a.push(s, de.ttfGlyphLoader(n, s, oa, t, e + i, la)) : a.push(s, de.glyphLoader(n, s));
6301
6301
  }
6302
6302
  return a;
6303
6303
  }
6304
- function wi(t, e, r, n) {
6304
+ function Ci(t, e, r, n) {
6305
6305
  var a = new de.GlyphSet(n);
6306
6306
  return n._push = function(s) {
6307
6307
  var i = r[s], o = r[s + 1];
6308
- i !== o ? a.push(s, de.ttfGlyphLoader(n, s, ia, t, e + i, ua)) : a.push(s, de.glyphLoader(n, s));
6308
+ i !== o ? a.push(s, de.ttfGlyphLoader(n, s, oa, t, e + i, la)) : a.push(s, de.glyphLoader(n, s));
6309
6309
  }, a;
6310
6310
  }
6311
- function Ci(t, e, r, n, a) {
6312
- return a.lowMemory ? wi(t, e, r, n) : Ti(t, e, r, n);
6311
+ function Ei(t, e, r, n, a) {
6312
+ return a.lowMemory ? Ci(t, e, r, n) : wi(t, e, r, n);
6313
6313
  }
6314
- var la = { getPath: oa, parse: Ci }, ha, Ae, ca, er;
6315
- function fa(t) {
6314
+ var ha = { getPath: ua, parse: Ei }, ca, Ae, fa, er;
6315
+ function pa(t) {
6316
6316
  this.font = t, this.getCommands = function(e) {
6317
- return la.getPath(e).commands;
6317
+ return ha.getPath(e).commands;
6318
6318
  }, this._fpgmState = this._prepState = void 0, this._errorState = 0;
6319
6319
  }
6320
- function Ei(t) {
6320
+ function Oi(t) {
6321
6321
  return t;
6322
6322
  }
6323
- function pa(t) {
6323
+ function da(t) {
6324
6324
  return Math.sign(t) * Math.round(Math.abs(t));
6325
6325
  }
6326
- function Oi(t) {
6326
+ function Ui(t) {
6327
6327
  return Math.sign(t) * Math.round(Math.abs(t * 2)) / 2;
6328
6328
  }
6329
- function Ui(t) {
6329
+ function Li(t) {
6330
6330
  return Math.sign(t) * (Math.round(Math.abs(t) + 0.5) - 0.5);
6331
6331
  }
6332
- function Li(t) {
6332
+ function Ri(t) {
6333
6333
  return Math.sign(t) * Math.ceil(Math.abs(t));
6334
6334
  }
6335
- function Ri(t) {
6335
+ function Ai(t) {
6336
6336
  return Math.sign(t) * Math.floor(Math.abs(t));
6337
6337
  }
6338
- var da = function(t) {
6338
+ var ga = function(t) {
6339
6339
  var e = this.srPeriod, r = this.srPhase, n = this.srThreshold, a = 1;
6340
6340
  return t < 0 && (t = -t, a = -1), t += n - r, t = Math.trunc(t / e) * e, t += r, t < 0 ? r * a : t * a;
6341
6341
  }, pe = {
@@ -6508,7 +6508,7 @@ ve.prototype.prevTouched = function(t) {
6508
6508
  e = e.prevPointOnContour;
6509
6509
  return e;
6510
6510
  };
6511
- var Ye = Object.freeze(new ve(0, 0)), Ai = {
6511
+ var Ye = Object.freeze(new ve(0, 0)), Mi = {
6512
6512
  cvCutIn: 17 / 16,
6513
6513
  // control value cut in
6514
6514
  deltaBase: 9,
@@ -6524,10 +6524,10 @@ function be(t, e) {
6524
6524
  case "glyf":
6525
6525
  this.zp0 = this.zp1 = this.zp2 = 1, this.rp0 = this.rp1 = this.rp2 = 0;
6526
6526
  case "prep":
6527
- this.fv = this.pv = this.dpv = pe, this.round = pa;
6527
+ this.fv = this.pv = this.dpv = pe, this.round = da;
6528
6528
  }
6529
6529
  }
6530
- fa.prototype.exec = function(t, e) {
6530
+ pa.prototype.exec = function(t, e) {
6531
6531
  if (typeof e != "number")
6532
6532
  throw new Error("Point size is not a number!");
6533
6533
  if (!(this._errorState > 2)) {
@@ -6535,7 +6535,7 @@ fa.prototype.exec = function(t, e) {
6535
6535
  if (!n || n.ppem !== e) {
6536
6536
  var a = this._fpgmState;
6537
6537
  if (!a) {
6538
- be.prototype = Ai, a = this._fpgmState = new be("fpgm", r.tables.fpgm), a.funcs = [], a.font = r, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
6538
+ be.prototype = Mi, a = this._fpgmState = new be("fpgm", r.tables.fpgm), a.funcs = [], a.font = r, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
6539
6539
  try {
6540
6540
  Ae(a);
6541
6541
  } catch (l) {
@@ -6559,14 +6559,14 @@ fa.prototype.exec = function(t, e) {
6559
6559
  }
6560
6560
  if (!(this._errorState > 1))
6561
6561
  try {
6562
- return ca(t, n);
6562
+ return fa(t, n);
6563
6563
  } catch (l) {
6564
6564
  this._errorState < 1 && (console.log("Hinting error:" + l), console.log("Note: further hinting errors are silenced")), this._errorState = 1;
6565
6565
  return;
6566
6566
  }
6567
6567
  }
6568
6568
  };
6569
- ca = function(t, e) {
6569
+ fa = function(t, e) {
6570
6570
  var r = e.ppem / e.font.unitsPerEm, n = r, a = t.components, s, i, o;
6571
6571
  if (be.prototype = e, !a)
6572
6572
  o = new be("glyf", t.instructions), exports.DEBUG && (console.log("---EXEC GLYPH---"), o.step = -1), er(t, o, r, n), i = o.gZone;
@@ -6623,7 +6623,7 @@ Ae = function(t) {
6623
6623
  if (e) {
6624
6624
  var r = e.length, n;
6625
6625
  for (t.ip = 0; t.ip < r; t.ip++) {
6626
- if (exports.DEBUG && t.step++, n = ha[e[t.ip]], !n)
6626
+ if (exports.DEBUG && t.step++, n = ca[e[t.ip]], !n)
6627
6627
  throw new Error(
6628
6628
  "unknown instruction: 0x" + Number(e[t.ip]).toString(16)
6629
6629
  );
@@ -6635,7 +6635,7 @@ function yt(t) {
6635
6635
  for (var e = t.tZone = new Array(t.gZone.length), r = 0; r < e.length; r++)
6636
6636
  e[r] = new ve(0, 0);
6637
6637
  }
6638
- function ga(t, e) {
6638
+ function va(t, e) {
6639
6639
  var r = t.prog, n = t.ip, a = 1, s;
6640
6640
  do
6641
6641
  if (s = r[++n], s === 88)
@@ -6655,36 +6655,36 @@ function ga(t, e) {
6655
6655
  while (a > 0);
6656
6656
  t.ip = n;
6657
6657
  }
6658
- function qr(t, e) {
6658
+ function Xr(t, e) {
6659
6659
  exports.DEBUG && console.log(e.step, "SVTCA[" + t.axis + "]"), e.fv = e.pv = e.dpv = t;
6660
6660
  }
6661
- function Xr(t, e) {
6661
+ function Yr(t, e) {
6662
6662
  exports.DEBUG && console.log(e.step, "SPVTCA[" + t.axis + "]"), e.pv = e.dpv = t;
6663
6663
  }
6664
- function Yr(t, e) {
6664
+ function Zr(t, e) {
6665
6665
  exports.DEBUG && console.log(e.step, "SFVTCA[" + t.axis + "]"), e.fv = t;
6666
6666
  }
6667
- function Zr(t, e) {
6667
+ function jr(t, e) {
6668
6668
  var r = e.stack, n = r.pop(), a = r.pop(), s = e.z2[n], i = e.z1[a];
6669
6669
  exports.DEBUG && console.log("SPVTL[" + t + "]", n, a);
6670
6670
  var o, u;
6671
6671
  t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.pv = e.dpv = Je(o, u);
6672
6672
  }
6673
- function jr(t, e) {
6673
+ function Kr(t, e) {
6674
6674
  var r = e.stack, n = r.pop(), a = r.pop(), s = e.z2[n], i = e.z1[a];
6675
6675
  exports.DEBUG && console.log("SFVTL[" + t + "]", n, a);
6676
6676
  var o, u;
6677
6677
  t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.fv = Je(o, u);
6678
6678
  }
6679
- function Mi(t) {
6679
+ function Pi(t) {
6680
6680
  var e = t.stack, r = e.pop(), n = e.pop();
6681
6681
  exports.DEBUG && console.log(t.step, "SPVFS[]", r, n), t.pv = t.dpv = Je(n, r);
6682
6682
  }
6683
- function Pi(t) {
6683
+ function Bi(t) {
6684
6684
  var e = t.stack, r = e.pop(), n = e.pop();
6685
6685
  exports.DEBUG && console.log(t.step, "SPVFS[]", r, n), t.fv = Je(n, r);
6686
6686
  }
6687
- function Bi(t) {
6687
+ function Di(t) {
6688
6688
  var e = t.stack, r = t.pv;
6689
6689
  exports.DEBUG && console.log(t.step, "GPV[]"), e.push(r.x * 16384), e.push(r.y * 16384);
6690
6690
  }
@@ -6692,25 +6692,25 @@ function Ii(t) {
6692
6692
  var e = t.stack, r = t.fv;
6693
6693
  exports.DEBUG && console.log(t.step, "GFV[]"), e.push(r.x * 16384), e.push(r.y * 16384);
6694
6694
  }
6695
- function Di(t) {
6695
+ function Gi(t) {
6696
6696
  t.fv = t.pv, exports.DEBUG && console.log(t.step, "SFVTPV[]");
6697
6697
  }
6698
- function Gi(t) {
6698
+ function Ni(t) {
6699
6699
  var e = t.stack, r = e.pop(), n = e.pop(), a = e.pop(), s = e.pop(), i = e.pop(), o = t.z0, u = t.z1, l = o[r], h = o[n], f = u[a], c = u[s], p = t.z2[i];
6700
6700
  exports.DEBUG && console.log("ISECT[], ", r, n, a, s, i);
6701
6701
  var d = l.x, v = l.y, y = h.x, m = h.y, b = f.x, x = f.y, T = c.x, S = c.y, A = (d - y) * (x - S) - (v - m) * (b - T), O = d * m - v * y, w = b * S - x * T;
6702
6702
  p.x = (O * (b - T) - w * (d - y)) / A, p.y = (O * (x - S) - w * (v - m)) / A;
6703
6703
  }
6704
- function Ni(t) {
6704
+ function _i(t) {
6705
6705
  t.rp0 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP0[]", t.rp0);
6706
6706
  }
6707
- function _i(t) {
6707
+ function Hi(t) {
6708
6708
  t.rp1 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP1[]", t.rp1);
6709
6709
  }
6710
- function Hi(t) {
6710
+ function zi(t) {
6711
6711
  t.rp2 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP2[]", t.rp2);
6712
6712
  }
6713
- function zi(t) {
6713
+ function Wi(t) {
6714
6714
  var e = t.stack.pop();
6715
6715
  switch (exports.DEBUG && console.log(t.step, "SZP0[]", e), t.zp0 = e, e) {
6716
6716
  case 0:
@@ -6723,7 +6723,7 @@ function zi(t) {
6723
6723
  throw new Error("Invalid zone pointer");
6724
6724
  }
6725
6725
  }
6726
- function Wi(t) {
6726
+ function Vi(t) {
6727
6727
  var e = t.stack.pop();
6728
6728
  switch (exports.DEBUG && console.log(t.step, "SZP1[]", e), t.zp1 = e, e) {
6729
6729
  case 0:
@@ -6736,7 +6736,7 @@ function Wi(t) {
6736
6736
  throw new Error("Invalid zone pointer");
6737
6737
  }
6738
6738
  }
6739
- function Vi(t) {
6739
+ function qi(t) {
6740
6740
  var e = t.stack.pop();
6741
6741
  switch (exports.DEBUG && console.log(t.step, "SZP2[]", e), t.zp2 = e, e) {
6742
6742
  case 0:
@@ -6749,7 +6749,7 @@ function Vi(t) {
6749
6749
  throw new Error("Invalid zone pointer");
6750
6750
  }
6751
6751
  }
6752
- function qi(t) {
6752
+ function Xi(t) {
6753
6753
  var e = t.stack.pop();
6754
6754
  switch (exports.DEBUG && console.log(t.step, "SZPS[]", e), t.zp0 = t.zp1 = t.zp2 = e, e) {
6755
6755
  case 0:
@@ -6762,49 +6762,49 @@ function qi(t) {
6762
6762
  throw new Error("Invalid zone pointer");
6763
6763
  }
6764
6764
  }
6765
- function Xi(t) {
6766
- t.loop = t.stack.pop(), exports.DEBUG && console.log(t.step, "SLOOP[]", t.loop);
6767
- }
6768
6765
  function Yi(t) {
6769
- exports.DEBUG && console.log(t.step, "RTG[]"), t.round = pa;
6766
+ t.loop = t.stack.pop(), exports.DEBUG && console.log(t.step, "SLOOP[]", t.loop);
6770
6767
  }
6771
6768
  function Zi(t) {
6772
- exports.DEBUG && console.log(t.step, "RTHG[]"), t.round = Ui;
6769
+ exports.DEBUG && console.log(t.step, "RTG[]"), t.round = da;
6773
6770
  }
6774
6771
  function ji(t) {
6775
- var e = t.stack.pop();
6776
- exports.DEBUG && console.log(t.step, "SMD[]", e), t.minDis = e / 64;
6772
+ exports.DEBUG && console.log(t.step, "RTHG[]"), t.round = Li;
6777
6773
  }
6778
6774
  function Ki(t) {
6779
- exports.DEBUG && console.log(t.step, "ELSE[]"), ga(t, !1);
6775
+ var e = t.stack.pop();
6776
+ exports.DEBUG && console.log(t.step, "SMD[]", e), t.minDis = e / 64;
6780
6777
  }
6781
6778
  function Qi(t) {
6779
+ exports.DEBUG && console.log(t.step, "ELSE[]"), va(t, !1);
6780
+ }
6781
+ function $i(t) {
6782
6782
  var e = t.stack.pop();
6783
6783
  exports.DEBUG && console.log(t.step, "JMPR[]", e), t.ip += e - 1;
6784
6784
  }
6785
- function $i(t) {
6785
+ function Ji(t) {
6786
6786
  var e = t.stack.pop();
6787
6787
  exports.DEBUG && console.log(t.step, "SCVTCI[]", e), t.cvCutIn = e / 64;
6788
6788
  }
6789
- function Ji(t) {
6789
+ function eo(t) {
6790
6790
  var e = t.stack;
6791
6791
  exports.DEBUG && console.log(t.step, "DUP[]"), e.push(e[e.length - 1]);
6792
6792
  }
6793
6793
  function Ut(t) {
6794
6794
  exports.DEBUG && console.log(t.step, "POP[]"), t.stack.pop();
6795
6795
  }
6796
- function eo(t) {
6796
+ function to(t) {
6797
6797
  exports.DEBUG && console.log(t.step, "CLEAR[]"), t.stack.length = 0;
6798
6798
  }
6799
- function to(t) {
6799
+ function ro(t) {
6800
6800
  var e = t.stack, r = e.pop(), n = e.pop();
6801
6801
  exports.DEBUG && console.log(t.step, "SWAP[]"), e.push(r), e.push(n);
6802
6802
  }
6803
- function ro(t) {
6803
+ function no(t) {
6804
6804
  var e = t.stack;
6805
6805
  exports.DEBUG && console.log(t.step, "DEPTH[]"), e.push(e.length);
6806
6806
  }
6807
- function no(t) {
6807
+ function ao(t) {
6808
6808
  var e = t.stack, r = e.pop(), n = e.pop();
6809
6809
  exports.DEBUG && console.log(t.step, "LOOPCALL[]", r, n);
6810
6810
  var a = t.ip, s = t.prog;
@@ -6817,21 +6817,21 @@ function no(t) {
6817
6817
  );
6818
6818
  t.ip = a, t.prog = s;
6819
6819
  }
6820
- function ao(t) {
6820
+ function so(t) {
6821
6821
  var e = t.stack.pop();
6822
6822
  exports.DEBUG && console.log(t.step, "CALL[]", e);
6823
6823
  var r = t.ip, n = t.prog;
6824
6824
  t.prog = t.funcs[e], Ae(t), t.ip = r, t.prog = n, exports.DEBUG && console.log(++t.step, "returning from", e);
6825
6825
  }
6826
- function so(t) {
6826
+ function io(t) {
6827
6827
  var e = t.stack, r = e.pop();
6828
6828
  exports.DEBUG && console.log(t.step, "CINDEX[]", r), e.push(e[e.length - r]);
6829
6829
  }
6830
- function io(t) {
6830
+ function oo(t) {
6831
6831
  var e = t.stack, r = e.pop();
6832
6832
  exports.DEBUG && console.log(t.step, "MINDEX[]", r), e.push(e.splice(e.length - r, 1)[0]);
6833
6833
  }
6834
- function oo(t) {
6834
+ function uo(t) {
6835
6835
  if (t.env !== "fpgm")
6836
6836
  throw new Error("FDEF not allowed here");
6837
6837
  var e = t.stack, r = t.prog, n = t.ip, a = e.pop(), s = n;
@@ -6839,19 +6839,19 @@ function oo(t) {
6839
6839
  ;
6840
6840
  t.ip = n, t.funcs[a] = r.slice(s + 1, n);
6841
6841
  }
6842
- function Kr(t, e) {
6842
+ function Qr(t, e) {
6843
6843
  var r = e.stack.pop(), n = e.z0[r], a = e.fv, s = e.pv;
6844
6844
  exports.DEBUG && console.log(e.step, "MDAP[" + t + "]", r);
6845
6845
  var i = s.distance(n, Ye);
6846
6846
  t && (i = e.round(i)), a.setRelative(n, Ye, i, s), a.touch(n), e.rp0 = e.rp1 = r;
6847
6847
  }
6848
- function Qr(t, e) {
6848
+ function $r(t, e) {
6849
6849
  var r = e.z2, n = r.length - 2, a, s, i;
6850
6850
  exports.DEBUG && console.log(e.step, "IUP[" + t.axis + "]");
6851
6851
  for (var o = 0; o < n; o++)
6852
6852
  a = r[o], !t.touched(a) && (s = a.prevTouched(t), s !== a && (i = a.nextTouched(t), s === i && t.setRelative(a, a, t.distance(s, s, !1, !0), t, !0), t.interpolate(a, s, i, t)));
6853
6853
  }
6854
- function $r(t, e) {
6854
+ function Jr(t, e) {
6855
6855
  for (var r = e.stack, n = t ? e.rp1 : e.rp2, a = (t ? e.z0 : e.z1)[n], s = e.fv, i = e.pv, o = e.loop, u = e.z2; o--; ) {
6856
6856
  var l = r.pop(), h = u[l], f = i.distance(a, a, !1, !0);
6857
6857
  s.setRelative(h, h, f, i), s.touch(h), exports.DEBUG && console.log(
@@ -6862,7 +6862,7 @@ function $r(t, e) {
6862
6862
  }
6863
6863
  e.loop = 1;
6864
6864
  }
6865
- function Jr(t, e) {
6865
+ function en(t, e) {
6866
6866
  var r = e.stack, n = t ? e.rp1 : e.rp2, a = (t ? e.z0 : e.z1)[n], s = e.fv, i = e.pv, o = r.pop(), u = e.z2[e.contours[o]], l = u;
6867
6867
  exports.DEBUG && console.log(e.step, "SHC[" + t + "]", o);
6868
6868
  var h = i.distance(a, a, !1, !0);
@@ -6870,7 +6870,7 @@ function Jr(t, e) {
6870
6870
  l !== a && s.setRelative(l, l, h, i), l = l.nextPointOnContour;
6871
6871
  while (l !== u);
6872
6872
  }
6873
- function en(t, e) {
6873
+ function tn(t, e) {
6874
6874
  var r = e.stack, n = t ? e.rp1 : e.rp2, a = (t ? e.z0 : e.z1)[n], s = e.fv, i = e.pv, o = r.pop();
6875
6875
  exports.DEBUG && console.log(e.step, "SHZ[" + t + "]", o);
6876
6876
  var u;
@@ -6887,7 +6887,7 @@ function en(t, e) {
6887
6887
  for (var l, h = i.distance(a, a, !1, !0), f = u.length - 2, c = 0; c < f; c++)
6888
6888
  l = u[c], s.setRelative(l, l, h, i);
6889
6889
  }
6890
- function uo(t) {
6890
+ function lo(t) {
6891
6891
  for (var e = t.stack, r = t.loop, n = t.fv, a = e.pop() / 64, s = t.z2; r--; ) {
6892
6892
  var i = e.pop(), o = s[i];
6893
6893
  exports.DEBUG && console.log(
@@ -6899,7 +6899,7 @@ function uo(t) {
6899
6899
  }
6900
6900
  t.loop = 1;
6901
6901
  }
6902
- function lo(t) {
6902
+ function ho(t) {
6903
6903
  for (var e = t.stack, r = t.rp1, n = t.rp2, a = t.loop, s = t.z0[r], i = t.z1[n], o = t.fv, u = t.dpv, l = t.z2; a--; ) {
6904
6904
  var h = e.pop(), f = l[h];
6905
6905
  exports.DEBUG && console.log(
@@ -6913,11 +6913,11 @@ function lo(t) {
6913
6913
  }
6914
6914
  t.loop = 1;
6915
6915
  }
6916
- function tn(t, e) {
6916
+ function rn(t, e) {
6917
6917
  var r = e.stack, n = r.pop() / 64, a = r.pop(), s = e.z1[a], i = e.z0[e.rp0], o = e.fv, u = e.pv;
6918
6918
  o.setRelative(s, i, n, u), o.touch(s), exports.DEBUG && console.log(e.step, "MSIRP[" + t + "]", n, a), e.rp1 = e.rp0, e.rp2 = a, t && (e.rp0 = a);
6919
6919
  }
6920
- function ho(t) {
6920
+ function co(t) {
6921
6921
  for (var e = t.stack, r = t.rp0, n = t.z0[r], a = t.loop, s = t.fv, i = t.pv, o = t.z1; a--; ) {
6922
6922
  var u = e.pop(), l = o[u];
6923
6923
  exports.DEBUG && console.log(
@@ -6928,10 +6928,10 @@ function ho(t) {
6928
6928
  }
6929
6929
  t.loop = 1;
6930
6930
  }
6931
- function co(t) {
6932
- exports.DEBUG && console.log(t.step, "RTDG[]"), t.round = Oi;
6931
+ function fo(t) {
6932
+ exports.DEBUG && console.log(t.step, "RTDG[]"), t.round = Ui;
6933
6933
  }
6934
- function rn(t, e) {
6934
+ function nn(t, e) {
6935
6935
  var r = e.stack, n = r.pop(), a = r.pop(), s = e.z0[a], i = e.fv, o = e.pv, u = e.cvt[n];
6936
6936
  exports.DEBUG && console.log(
6937
6937
  e.step,
@@ -6945,14 +6945,14 @@ function rn(t, e) {
6945
6945
  var l = o.distance(s, Ye);
6946
6946
  t && (Math.abs(l - u) < e.cvCutIn && (l = u), l = e.round(l)), i.setRelative(s, Ye, l, o), e.zp0 === 0 && (s.xo = s.x, s.yo = s.y), i.touch(s), e.rp0 = e.rp1 = a;
6947
6947
  }
6948
- function fo(t) {
6948
+ function po(t) {
6949
6949
  var e = t.prog, r = t.ip, n = t.stack, a = e[++r];
6950
6950
  exports.DEBUG && console.log(t.step, "NPUSHB[]", a);
6951
6951
  for (var s = 0; s < a; s++)
6952
6952
  n.push(e[++r]);
6953
6953
  t.ip = r;
6954
6954
  }
6955
- function po(t) {
6955
+ function go(t) {
6956
6956
  var e = t.ip, r = t.prog, n = t.stack, a = r[++e];
6957
6957
  exports.DEBUG && console.log(t.step, "NPUSHW[]", a);
6958
6958
  for (var s = 0; s < a; s++) {
@@ -6961,88 +6961,88 @@ function po(t) {
6961
6961
  }
6962
6962
  t.ip = e;
6963
6963
  }
6964
- function go(t) {
6964
+ function vo(t) {
6965
6965
  var e = t.stack, r = t.store;
6966
6966
  r || (r = t.store = []);
6967
6967
  var n = e.pop(), a = e.pop();
6968
6968
  exports.DEBUG && console.log(t.step, "WS", n, a), r[a] = n;
6969
6969
  }
6970
- function vo(t) {
6970
+ function mo(t) {
6971
6971
  var e = t.stack, r = t.store, n = e.pop();
6972
6972
  exports.DEBUG && console.log(t.step, "RS", n);
6973
6973
  var a = r && r[n] || 0;
6974
6974
  e.push(a);
6975
6975
  }
6976
- function mo(t) {
6976
+ function yo(t) {
6977
6977
  var e = t.stack, r = e.pop(), n = e.pop();
6978
6978
  exports.DEBUG && console.log(t.step, "WCVTP", r, n), t.cvt[n] = r / 64;
6979
6979
  }
6980
- function yo(t) {
6980
+ function xo(t) {
6981
6981
  var e = t.stack, r = e.pop();
6982
6982
  exports.DEBUG && console.log(t.step, "RCVT", r), e.push(t.cvt[r] * 64);
6983
6983
  }
6984
- function nn(t, e) {
6984
+ function an(t, e) {
6985
6985
  var r = e.stack, n = r.pop(), a = e.z2[n];
6986
6986
  exports.DEBUG && console.log(e.step, "GC[" + t + "]", n), r.push(e.dpv.distance(a, Ye, t, !1) * 64);
6987
6987
  }
6988
- function an(t, e) {
6988
+ function sn(t, e) {
6989
6989
  var r = e.stack, n = r.pop(), a = r.pop(), s = e.z1[n], i = e.z0[a], o = e.dpv.distance(i, s, t, t);
6990
6990
  exports.DEBUG && console.log(e.step, "MD[" + t + "]", n, a, "->", o), e.stack.push(Math.round(o * 64));
6991
6991
  }
6992
- function xo(t) {
6992
+ function bo(t) {
6993
6993
  exports.DEBUG && console.log(t.step, "MPPEM[]"), t.stack.push(t.ppem);
6994
6994
  }
6995
- function bo(t) {
6995
+ function So(t) {
6996
6996
  exports.DEBUG && console.log(t.step, "FLIPON[]"), t.autoFlip = !0;
6997
6997
  }
6998
- function So(t) {
6998
+ function ko(t) {
6999
6999
  var e = t.stack, r = e.pop(), n = e.pop();
7000
7000
  exports.DEBUG && console.log(t.step, "LT[]", r, n), e.push(n < r ? 1 : 0);
7001
7001
  }
7002
- function ko(t) {
7002
+ function Fo(t) {
7003
7003
  var e = t.stack, r = e.pop(), n = e.pop();
7004
7004
  exports.DEBUG && console.log(t.step, "LTEQ[]", r, n), e.push(n <= r ? 1 : 0);
7005
7005
  }
7006
- function Fo(t) {
7006
+ function To(t) {
7007
7007
  var e = t.stack, r = e.pop(), n = e.pop();
7008
7008
  exports.DEBUG && console.log(t.step, "GT[]", r, n), e.push(n > r ? 1 : 0);
7009
7009
  }
7010
- function To(t) {
7010
+ function wo(t) {
7011
7011
  var e = t.stack, r = e.pop(), n = e.pop();
7012
7012
  exports.DEBUG && console.log(t.step, "GTEQ[]", r, n), e.push(n >= r ? 1 : 0);
7013
7013
  }
7014
- function wo(t) {
7014
+ function Co(t) {
7015
7015
  var e = t.stack, r = e.pop(), n = e.pop();
7016
7016
  exports.DEBUG && console.log(t.step, "EQ[]", r, n), e.push(r === n ? 1 : 0);
7017
7017
  }
7018
- function Co(t) {
7018
+ function Eo(t) {
7019
7019
  var e = t.stack, r = e.pop(), n = e.pop();
7020
7020
  exports.DEBUG && console.log(t.step, "NEQ[]", r, n), e.push(r !== n ? 1 : 0);
7021
7021
  }
7022
- function Eo(t) {
7022
+ function Oo(t) {
7023
7023
  var e = t.stack, r = e.pop();
7024
7024
  exports.DEBUG && console.log(t.step, "ODD[]", r), e.push(Math.trunc(r) % 2 ? 1 : 0);
7025
7025
  }
7026
- function Oo(t) {
7026
+ function Uo(t) {
7027
7027
  var e = t.stack, r = e.pop();
7028
7028
  exports.DEBUG && console.log(t.step, "EVEN[]", r), e.push(Math.trunc(r) % 2 ? 0 : 1);
7029
7029
  }
7030
- function Uo(t) {
7030
+ function Lo(t) {
7031
7031
  var e = t.stack.pop();
7032
- exports.DEBUG && console.log(t.step, "IF[]", e), e || (ga(t, !0), exports.DEBUG && console.log(t.step, "EIF[]"));
7032
+ exports.DEBUG && console.log(t.step, "IF[]", e), e || (va(t, !0), exports.DEBUG && console.log(t.step, "EIF[]"));
7033
7033
  }
7034
- function Lo(t) {
7034
+ function Ro(t) {
7035
7035
  exports.DEBUG && console.log(t.step, "EIF[]");
7036
7036
  }
7037
- function Ro(t) {
7037
+ function Ao(t) {
7038
7038
  var e = t.stack, r = e.pop(), n = e.pop();
7039
7039
  exports.DEBUG && console.log(t.step, "AND[]", r, n), e.push(r && n ? 1 : 0);
7040
7040
  }
7041
- function Ao(t) {
7041
+ function Mo(t) {
7042
7042
  var e = t.stack, r = e.pop(), n = e.pop();
7043
7043
  exports.DEBUG && console.log(t.step, "OR[]", r, n), e.push(r || n ? 1 : 0);
7044
7044
  }
7045
- function Mo(t) {
7045
+ function Po(t) {
7046
7046
  var e = t.stack, r = e.pop();
7047
7047
  exports.DEBUG && console.log(t.step, "NOT[]", r), e.push(r ? 0 : 1);
7048
7048
  }
@@ -7059,11 +7059,11 @@ function Lt(t, e) {
7059
7059
  }
7060
7060
  }
7061
7061
  }
7062
- function Po(t) {
7062
+ function Bo(t) {
7063
7063
  var e = t.stack, r = e.pop();
7064
7064
  exports.DEBUG && console.log(t.step, "SDB[]", r), t.deltaBase = r;
7065
7065
  }
7066
- function Bo(t) {
7066
+ function Do(t) {
7067
7067
  var e = t.stack, r = e.pop();
7068
7068
  exports.DEBUG && console.log(t.step, "SDS[]", r), t.deltaShift = Math.pow(0.5, r);
7069
7069
  }
@@ -7071,31 +7071,31 @@ function Io(t) {
7071
7071
  var e = t.stack, r = e.pop(), n = e.pop();
7072
7072
  exports.DEBUG && console.log(t.step, "ADD[]", r, n), e.push(n + r);
7073
7073
  }
7074
- function Do(t) {
7074
+ function Go(t) {
7075
7075
  var e = t.stack, r = e.pop(), n = e.pop();
7076
7076
  exports.DEBUG && console.log(t.step, "SUB[]", r, n), e.push(n - r);
7077
7077
  }
7078
- function Go(t) {
7078
+ function No(t) {
7079
7079
  var e = t.stack, r = e.pop(), n = e.pop();
7080
7080
  exports.DEBUG && console.log(t.step, "DIV[]", r, n), e.push(n * 64 / r);
7081
7081
  }
7082
- function No(t) {
7082
+ function _o(t) {
7083
7083
  var e = t.stack, r = e.pop(), n = e.pop();
7084
7084
  exports.DEBUG && console.log(t.step, "MUL[]", r, n), e.push(n * r / 64);
7085
7085
  }
7086
- function _o(t) {
7086
+ function Ho(t) {
7087
7087
  var e = t.stack, r = e.pop();
7088
7088
  exports.DEBUG && console.log(t.step, "ABS[]", r), e.push(Math.abs(r));
7089
7089
  }
7090
- function Ho(t) {
7090
+ function zo(t) {
7091
7091
  var e = t.stack, r = e.pop();
7092
7092
  exports.DEBUG && console.log(t.step, "NEG[]", r), e.push(-r);
7093
7093
  }
7094
- function zo(t) {
7094
+ function Wo(t) {
7095
7095
  var e = t.stack, r = e.pop();
7096
7096
  exports.DEBUG && console.log(t.step, "FLOOR[]", r), e.push(Math.floor(r / 64) * 64);
7097
7097
  }
7098
- function Wo(t) {
7098
+ function Vo(t) {
7099
7099
  var e = t.stack, r = e.pop();
7100
7100
  exports.DEBUG && console.log(t.step, "CEILING[]", r), e.push(Math.ceil(r / 64) * 64);
7101
7101
  }
@@ -7103,7 +7103,7 @@ function ot(t, e) {
7103
7103
  var r = e.stack, n = r.pop();
7104
7104
  exports.DEBUG && console.log(e.step, "ROUND[]"), r.push(e.round(n / 64) * 64);
7105
7105
  }
7106
- function Vo(t) {
7106
+ function qo(t) {
7107
7107
  var e = t.stack, r = e.pop(), n = e.pop();
7108
7108
  exports.DEBUG && console.log(t.step, "WCVTF[]", r, n), t.cvt[n] = r * t.ppem / t.font.unitsPerEm;
7109
7109
  }
@@ -7120,9 +7120,9 @@ function Rt(t, e) {
7120
7120
  }
7121
7121
  }
7122
7122
  }
7123
- function qo(t) {
7123
+ function Xo(t) {
7124
7124
  var e = t.stack.pop();
7125
- exports.DEBUG && console.log(t.step, "SROUND[]", e), t.round = da;
7125
+ exports.DEBUG && console.log(t.step, "SROUND[]", e), t.round = ga;
7126
7126
  var r;
7127
7127
  switch (e & 192) {
7128
7128
  case 0:
@@ -7155,9 +7155,9 @@ function qo(t) {
7155
7155
  }
7156
7156
  e &= 15, e === 0 ? t.srThreshold = 0 : t.srThreshold = (e / 8 - 0.5) * r;
7157
7157
  }
7158
- function Xo(t) {
7158
+ function Yo(t) {
7159
7159
  var e = t.stack.pop();
7160
- exports.DEBUG && console.log(t.step, "S45ROUND[]", e), t.round = da;
7160
+ exports.DEBUG && console.log(t.step, "S45ROUND[]", e), t.round = ga;
7161
7161
  var r;
7162
7162
  switch (e & 192) {
7163
7163
  case 0:
@@ -7190,46 +7190,46 @@ function Xo(t) {
7190
7190
  }
7191
7191
  e &= 15, e === 0 ? t.srThreshold = 0 : t.srThreshold = (e / 8 - 0.5) * r;
7192
7192
  }
7193
- function Yo(t) {
7194
- exports.DEBUG && console.log(t.step, "ROFF[]"), t.round = Ei;
7195
- }
7196
7193
  function Zo(t) {
7197
- exports.DEBUG && console.log(t.step, "RUTG[]"), t.round = Li;
7194
+ exports.DEBUG && console.log(t.step, "ROFF[]"), t.round = Oi;
7198
7195
  }
7199
7196
  function jo(t) {
7200
- exports.DEBUG && console.log(t.step, "RDTG[]"), t.round = Ri;
7197
+ exports.DEBUG && console.log(t.step, "RUTG[]"), t.round = Ri;
7201
7198
  }
7202
7199
  function Ko(t) {
7200
+ exports.DEBUG && console.log(t.step, "RDTG[]"), t.round = Ai;
7201
+ }
7202
+ function Qo(t) {
7203
7203
  var e = t.stack.pop();
7204
7204
  exports.DEBUG && console.log(t.step, "SCANCTRL[]", e);
7205
7205
  }
7206
- function sn(t, e) {
7206
+ function on(t, e) {
7207
7207
  var r = e.stack, n = r.pop(), a = r.pop(), s = e.z2[n], i = e.z1[a];
7208
7208
  exports.DEBUG && console.log(e.step, "SDPVTL[" + t + "]", n, a);
7209
7209
  var o, u;
7210
7210
  t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.dpv = Je(o, u);
7211
7211
  }
7212
- function Qo(t) {
7212
+ function $o(t) {
7213
7213
  var e = t.stack, r = e.pop(), n = 0;
7214
7214
  exports.DEBUG && console.log(t.step, "GETINFO[]", r), r & 1 && (n = 35), r & 32 && (n |= 4096), e.push(n);
7215
7215
  }
7216
- function $o(t) {
7216
+ function Jo(t) {
7217
7217
  var e = t.stack, r = e.pop(), n = e.pop(), a = e.pop();
7218
7218
  exports.DEBUG && console.log(t.step, "ROLL[]"), e.push(n), e.push(r), e.push(a);
7219
7219
  }
7220
- function Jo(t) {
7220
+ function eu(t) {
7221
7221
  var e = t.stack, r = e.pop(), n = e.pop();
7222
7222
  exports.DEBUG && console.log(t.step, "MAX[]", r, n), e.push(Math.max(n, r));
7223
7223
  }
7224
- function eu(t) {
7224
+ function tu(t) {
7225
7225
  var e = t.stack, r = e.pop(), n = e.pop();
7226
7226
  exports.DEBUG && console.log(t.step, "MIN[]", r, n), e.push(Math.min(n, r));
7227
7227
  }
7228
- function tu(t) {
7228
+ function ru(t) {
7229
7229
  var e = t.stack.pop();
7230
7230
  exports.DEBUG && console.log(t.step, "SCANTYPE[]", e);
7231
7231
  }
7232
- function ru(t) {
7232
+ function nu(t) {
7233
7233
  var e = t.stack.pop(), r = t.stack.pop();
7234
7234
  switch (exports.DEBUG && console.log(t.step, "INSTCTRL[]", e, r), e) {
7235
7235
  case 1:
@@ -7272,67 +7272,67 @@ function C(t, e, r, n, a, s) {
7272
7272
  ")"
7273
7273
  ), s.rp1 = s.rp0, s.rp2 = u, e && (s.rp0 = u);
7274
7274
  }
7275
- ha = [
7275
+ ca = [
7276
7276
  /* 0x00 */
7277
- qr.bind(void 0, ge),
7277
+ Xr.bind(void 0, ge),
7278
7278
  /* 0x01 */
7279
- qr.bind(void 0, pe),
7279
+ Xr.bind(void 0, pe),
7280
7280
  /* 0x02 */
7281
- Xr.bind(void 0, ge),
7281
+ Yr.bind(void 0, ge),
7282
7282
  /* 0x03 */
7283
- Xr.bind(void 0, pe),
7283
+ Yr.bind(void 0, pe),
7284
7284
  /* 0x04 */
7285
- Yr.bind(void 0, ge),
7285
+ Zr.bind(void 0, ge),
7286
7286
  /* 0x05 */
7287
- Yr.bind(void 0, pe),
7287
+ Zr.bind(void 0, pe),
7288
7288
  /* 0x06 */
7289
- Zr.bind(void 0, 0),
7289
+ jr.bind(void 0, 0),
7290
7290
  /* 0x07 */
7291
- Zr.bind(void 0, 1),
7291
+ jr.bind(void 0, 1),
7292
7292
  /* 0x08 */
7293
- jr.bind(void 0, 0),
7293
+ Kr.bind(void 0, 0),
7294
7294
  /* 0x09 */
7295
- jr.bind(void 0, 1),
7295
+ Kr.bind(void 0, 1),
7296
7296
  /* 0x0A */
7297
- Mi,
7298
- /* 0x0B */
7299
7297
  Pi,
7300
- /* 0x0C */
7298
+ /* 0x0B */
7301
7299
  Bi,
7300
+ /* 0x0C */
7301
+ Di,
7302
7302
  /* 0x0D */
7303
7303
  Ii,
7304
7304
  /* 0x0E */
7305
- Di,
7306
- /* 0x0F */
7307
7305
  Gi,
7308
- /* 0x10 */
7306
+ /* 0x0F */
7309
7307
  Ni,
7310
- /* 0x11 */
7308
+ /* 0x10 */
7311
7309
  _i,
7312
- /* 0x12 */
7310
+ /* 0x11 */
7313
7311
  Hi,
7314
- /* 0x13 */
7312
+ /* 0x12 */
7315
7313
  zi,
7316
- /* 0x14 */
7314
+ /* 0x13 */
7317
7315
  Wi,
7318
- /* 0x15 */
7316
+ /* 0x14 */
7319
7317
  Vi,
7320
- /* 0x16 */
7318
+ /* 0x15 */
7321
7319
  qi,
7322
- /* 0x17 */
7320
+ /* 0x16 */
7323
7321
  Xi,
7324
- /* 0x18 */
7322
+ /* 0x17 */
7325
7323
  Yi,
7326
- /* 0x19 */
7324
+ /* 0x18 */
7327
7325
  Zi,
7328
- /* 0x1A */
7326
+ /* 0x19 */
7329
7327
  ji,
7330
- /* 0x1B */
7328
+ /* 0x1A */
7331
7329
  Ki,
7332
- /* 0x1C */
7330
+ /* 0x1B */
7333
7331
  Qi,
7334
- /* 0x1D */
7332
+ /* 0x1C */
7335
7333
  $i,
7334
+ /* 0x1D */
7335
+ Ji,
7336
7336
  /* 0x1E */
7337
7337
  void 0,
7338
7338
  // TODO SSWCI
@@ -7340,19 +7340,19 @@ ha = [
7340
7340
  void 0,
7341
7341
  // TODO SSW
7342
7342
  /* 0x20 */
7343
- Ji,
7343
+ eo,
7344
7344
  /* 0x21 */
7345
7345
  Ut,
7346
7346
  /* 0x22 */
7347
- eo,
7348
- /* 0x23 */
7349
7347
  to,
7350
- /* 0x24 */
7348
+ /* 0x23 */
7351
7349
  ro,
7350
+ /* 0x24 */
7351
+ no,
7352
7352
  /* 0x25 */
7353
- so,
7354
- /* 0x26 */
7355
7353
  io,
7354
+ /* 0x26 */
7355
+ oo,
7356
7356
  /* 0x27 */
7357
7357
  void 0,
7358
7358
  // TODO ALIGNPTS
@@ -7362,80 +7362,80 @@ ha = [
7362
7362
  void 0,
7363
7363
  // TODO UTP
7364
7364
  /* 0x2A */
7365
- no,
7366
- /* 0x2B */
7367
7365
  ao,
7366
+ /* 0x2B */
7367
+ so,
7368
7368
  /* 0x2C */
7369
- oo,
7369
+ uo,
7370
7370
  /* 0x2D */
7371
7371
  void 0,
7372
7372
  // ENDF (eaten by FDEF)
7373
7373
  /* 0x2E */
7374
- Kr.bind(void 0, 0),
7374
+ Qr.bind(void 0, 0),
7375
7375
  /* 0x2F */
7376
- Kr.bind(void 0, 1),
7376
+ Qr.bind(void 0, 1),
7377
7377
  /* 0x30 */
7378
- Qr.bind(void 0, ge),
7378
+ $r.bind(void 0, ge),
7379
7379
  /* 0x31 */
7380
- Qr.bind(void 0, pe),
7380
+ $r.bind(void 0, pe),
7381
7381
  /* 0x32 */
7382
- $r.bind(void 0, 0),
7382
+ Jr.bind(void 0, 0),
7383
7383
  /* 0x33 */
7384
- $r.bind(void 0, 1),
7384
+ Jr.bind(void 0, 1),
7385
7385
  /* 0x34 */
7386
- Jr.bind(void 0, 0),
7386
+ en.bind(void 0, 0),
7387
7387
  /* 0x35 */
7388
- Jr.bind(void 0, 1),
7388
+ en.bind(void 0, 1),
7389
7389
  /* 0x36 */
7390
- en.bind(void 0, 0),
7390
+ tn.bind(void 0, 0),
7391
7391
  /* 0x37 */
7392
- en.bind(void 0, 1),
7392
+ tn.bind(void 0, 1),
7393
7393
  /* 0x38 */
7394
- uo,
7395
- /* 0x39 */
7396
7394
  lo,
7395
+ /* 0x39 */
7396
+ ho,
7397
7397
  /* 0x3A */
7398
- tn.bind(void 0, 0),
7398
+ rn.bind(void 0, 0),
7399
7399
  /* 0x3B */
7400
- tn.bind(void 0, 1),
7400
+ rn.bind(void 0, 1),
7401
7401
  /* 0x3C */
7402
- ho,
7403
- /* 0x3D */
7404
7402
  co,
7403
+ /* 0x3D */
7404
+ fo,
7405
7405
  /* 0x3E */
7406
- rn.bind(void 0, 0),
7406
+ nn.bind(void 0, 0),
7407
7407
  /* 0x3F */
7408
- rn.bind(void 0, 1),
7408
+ nn.bind(void 0, 1),
7409
7409
  /* 0x40 */
7410
- fo,
7411
- /* 0x41 */
7412
7410
  po,
7413
- /* 0x42 */
7411
+ /* 0x41 */
7414
7412
  go,
7415
- /* 0x43 */
7413
+ /* 0x42 */
7416
7414
  vo,
7417
- /* 0x44 */
7415
+ /* 0x43 */
7418
7416
  mo,
7419
- /* 0x45 */
7417
+ /* 0x44 */
7420
7418
  yo,
7419
+ /* 0x45 */
7420
+ xo,
7421
7421
  /* 0x46 */
7422
- nn.bind(void 0, 0),
7422
+ an.bind(void 0, 0),
7423
7423
  /* 0x47 */
7424
- nn.bind(void 0, 1),
7424
+ an.bind(void 0, 1),
7425
7425
  /* 0x48 */
7426
7426
  void 0,
7427
7427
  // TODO SCFS
7428
7428
  /* 0x49 */
7429
- an.bind(void 0, 0),
7429
+ sn.bind(void 0, 0),
7430
7430
  /* 0x4A */
7431
- an.bind(void 0, 1),
7431
+ sn.bind(void 0, 1),
7432
7432
  /* 0x4B */
7433
- xo,
7433
+ bo,
7434
7434
  /* 0x4C */
7435
7435
  void 0,
7436
7436
  // TODO MPS
7437
7437
  /* 0x4D */
7438
- bo,
7438
+ So,
7439
7439
  /* 0x4E */
7440
7440
  void 0,
7441
7441
  // TODO FLIPOFF
@@ -7443,53 +7443,53 @@ ha = [
7443
7443
  void 0,
7444
7444
  // TODO DEBUG
7445
7445
  /* 0x50 */
7446
- So,
7447
- /* 0x51 */
7448
7446
  ko,
7449
- /* 0x52 */
7447
+ /* 0x51 */
7450
7448
  Fo,
7451
- /* 0x53 */
7449
+ /* 0x52 */
7452
7450
  To,
7453
- /* 0x54 */
7451
+ /* 0x53 */
7454
7452
  wo,
7455
- /* 0x55 */
7453
+ /* 0x54 */
7456
7454
  Co,
7457
- /* 0x56 */
7455
+ /* 0x55 */
7458
7456
  Eo,
7459
- /* 0x57 */
7457
+ /* 0x56 */
7460
7458
  Oo,
7461
- /* 0x58 */
7459
+ /* 0x57 */
7462
7460
  Uo,
7463
- /* 0x59 */
7461
+ /* 0x58 */
7464
7462
  Lo,
7465
- /* 0x5A */
7463
+ /* 0x59 */
7466
7464
  Ro,
7467
- /* 0x5B */
7465
+ /* 0x5A */
7468
7466
  Ao,
7469
- /* 0x5C */
7467
+ /* 0x5B */
7470
7468
  Mo,
7469
+ /* 0x5C */
7470
+ Po,
7471
7471
  /* 0x5D */
7472
7472
  Lt.bind(void 0, 1),
7473
7473
  /* 0x5E */
7474
- Po,
7475
- /* 0x5F */
7476
7474
  Bo,
7475
+ /* 0x5F */
7476
+ Do,
7477
7477
  /* 0x60 */
7478
7478
  Io,
7479
7479
  /* 0x61 */
7480
- Do,
7481
- /* 0x62 */
7482
7480
  Go,
7483
- /* 0x63 */
7481
+ /* 0x62 */
7484
7482
  No,
7485
- /* 0x64 */
7483
+ /* 0x63 */
7486
7484
  _o,
7487
- /* 0x65 */
7485
+ /* 0x64 */
7488
7486
  Ho,
7489
- /* 0x66 */
7487
+ /* 0x65 */
7490
7488
  zo,
7491
- /* 0x67 */
7489
+ /* 0x66 */
7492
7490
  Wo,
7491
+ /* 0x67 */
7492
+ Vo,
7493
7493
  /* 0x68 */
7494
7494
  ot.bind(void 0, 0),
7495
7495
  /* 0x69 */
@@ -7511,7 +7511,7 @@ ha = [
7511
7511
  void 0,
7512
7512
  // TODO NROUND[ab]
7513
7513
  /* 0x70 */
7514
- Vo,
7514
+ qo,
7515
7515
  /* 0x71 */
7516
7516
  Lt.bind(void 0, 2),
7517
7517
  /* 0x72 */
@@ -7523,9 +7523,9 @@ ha = [
7523
7523
  /* 0x75 */
7524
7524
  Rt.bind(void 0, 3),
7525
7525
  /* 0x76 */
7526
- qo,
7527
- /* 0x77 */
7528
7526
  Xo,
7527
+ /* 0x77 */
7528
+ Yo,
7529
7529
  /* 0x78 */
7530
7530
  void 0,
7531
7531
  // TODO JROT[]
@@ -7533,13 +7533,13 @@ ha = [
7533
7533
  void 0,
7534
7534
  // TODO JROF[]
7535
7535
  /* 0x7A */
7536
- Yo,
7536
+ Zo,
7537
7537
  /* 0x7B */
7538
7538
  void 0,
7539
7539
  /* 0x7C */
7540
- Zo,
7541
- /* 0x7D */
7542
7540
  jo,
7541
+ /* 0x7D */
7542
+ Ko,
7543
7543
  /* 0x7E */
7544
7544
  Ut,
7545
7545
  // actually SANGW, supposed to do only a pop though
@@ -7560,26 +7560,26 @@ ha = [
7560
7560
  /* 0x84 */
7561
7561
  void 0,
7562
7562
  /* 0x85 */
7563
- Ko,
7563
+ Qo,
7564
7564
  /* 0x86 */
7565
- sn.bind(void 0, 0),
7565
+ on.bind(void 0, 0),
7566
7566
  /* 0x87 */
7567
- sn.bind(void 0, 1),
7567
+ on.bind(void 0, 1),
7568
7568
  /* 0x88 */
7569
- Qo,
7569
+ $o,
7570
7570
  /* 0x89 */
7571
7571
  void 0,
7572
7572
  // TODO IDEF
7573
7573
  /* 0x8A */
7574
- $o,
7575
- /* 0x8B */
7576
7574
  Jo,
7577
- /* 0x8C */
7575
+ /* 0x8B */
7578
7576
  eu,
7579
- /* 0x8D */
7577
+ /* 0x8C */
7580
7578
  tu,
7581
- /* 0x8E */
7579
+ /* 0x8D */
7582
7580
  ru,
7581
+ /* 0x8E */
7582
+ nu,
7583
7583
  /* 0x8F */
7584
7584
  void 0,
7585
7585
  /* 0x90 */
@@ -7813,7 +7813,7 @@ function Ne(t) {
7813
7813
  function hr(t, e, r) {
7814
7814
  this.contextName = r, this.startIndex = t, this.endOffset = e;
7815
7815
  }
7816
- function nu(t, e, r) {
7816
+ function au(t, e, r) {
7817
7817
  this.contextName = t, this.openRange = null, this.ranges = [], this.checkStart = e, this.checkEnd = r;
7818
7818
  }
7819
7819
  function oe(t, e) {
@@ -7822,7 +7822,7 @@ function oe(t, e) {
7822
7822
  function xt(t) {
7823
7823
  this.eventId = t, this.subscribers = [];
7824
7824
  }
7825
- function au(t) {
7825
+ function su(t) {
7826
7826
  var e = this, r = [
7827
7827
  "start",
7828
7828
  "end",
@@ -7861,7 +7861,7 @@ function au(t) {
7861
7861
  });
7862
7862
  }
7863
7863
  function G(t) {
7864
- this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], au.call(this, t);
7864
+ this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], su.call(this, t);
7865
7865
  }
7866
7866
  Ne.prototype.setState = function(t, e) {
7867
7867
  return this.state[t] = e, this.activeState = { key: t, value: this.state[t] }, this.activeState;
@@ -7999,7 +7999,7 @@ G.prototype.registerContextChecker = function(t, e, r) {
7999
7999
  return {
8000
8000
  FAIL: "missing context end check."
8001
8001
  };
8002
- var n = new nu(
8002
+ var n = new au(
8003
8003
  t,
8004
8004
  e,
8005
8005
  r
@@ -8063,7 +8063,7 @@ G.prototype.tokenize = function(t) {
8063
8063
  function Fe(t) {
8064
8064
  return /[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(t);
8065
8065
  }
8066
- function va(t) {
8066
+ function ma(t) {
8067
8067
  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(t);
8068
8068
  }
8069
8069
  function Te(t) {
@@ -8072,7 +8072,7 @@ function Te(t) {
8072
8072
  function ht(t) {
8073
8073
  return /[A-z]/.test(t);
8074
8074
  }
8075
- function su(t) {
8075
+ function iu(t) {
8076
8076
  return /\s/.test(t);
8077
8077
  }
8078
8078
  function ne(t) {
@@ -8101,11 +8101,11 @@ function et(t, e) {
8101
8101
  }
8102
8102
  return -1;
8103
8103
  }
8104
- function iu(t, e) {
8104
+ function ou(t, e) {
8105
8105
  var r = et(t, e.coverage);
8106
8106
  return r === -1 ? null : t + e.deltaGlyphId;
8107
8107
  }
8108
- function ou(t, e) {
8108
+ function uu(t, e) {
8109
8109
  var r = et(t, e.coverage);
8110
8110
  return r === -1 ? null : e.substitute[r];
8111
8111
  }
@@ -8118,7 +8118,7 @@ function At(t, e) {
8118
8118
  }
8119
8119
  return r.length !== t.length ? -1 : r;
8120
8120
  }
8121
- function uu(t, e) {
8121
+ function lu(t, e) {
8122
8122
  var r = e.inputCoverage.length + e.lookaheadCoverage.length + e.backtrackCoverage.length;
8123
8123
  if (t.context.length < r)
8124
8124
  return [];
@@ -8157,7 +8157,7 @@ function uu(t, e) {
8157
8157
  }
8158
8158
  return c;
8159
8159
  }
8160
- function lu(t, e) {
8160
+ function hu(t, e) {
8161
8161
  var r = t.current, n = et(r, e.coverage);
8162
8162
  if (n === -1)
8163
8163
  return null;
@@ -8173,7 +8173,7 @@ function lu(t, e) {
8173
8173
  }
8174
8174
  return null;
8175
8175
  }
8176
- function hu(t, e) {
8176
+ function cu(t, e) {
8177
8177
  var r = et(t, e.coverage);
8178
8178
  return r === -1 ? null : e.sequences[r];
8179
8179
  }
@@ -8235,35 +8235,35 @@ ne.prototype.getLookupMethod = function(t, e) {
8235
8235
  switch (n) {
8236
8236
  case "11":
8237
8237
  return function(a) {
8238
- return iu.apply(
8238
+ return ou.apply(
8239
8239
  r,
8240
8240
  [a, e]
8241
8241
  );
8242
8242
  };
8243
8243
  case "12":
8244
8244
  return function(a) {
8245
- return ou.apply(
8245
+ return uu.apply(
8246
8246
  r,
8247
8247
  [a, e]
8248
8248
  );
8249
8249
  };
8250
8250
  case "63":
8251
8251
  return function(a) {
8252
- return uu.apply(
8252
+ return lu.apply(
8253
8253
  r,
8254
8254
  [a, e]
8255
8255
  );
8256
8256
  };
8257
8257
  case "41":
8258
8258
  return function(a) {
8259
- return lu.apply(
8259
+ return hu.apply(
8260
8260
  r,
8261
8261
  [a, e]
8262
8262
  );
8263
8263
  };
8264
8264
  case "21":
8265
8265
  return function(a) {
8266
- return hu.apply(
8266
+ return cu.apply(
8267
8267
  r,
8268
8268
  [a, e]
8269
8269
  );
@@ -8356,7 +8356,7 @@ ne.prototype.getFeature = function(e) {
8356
8356
  var r = this.features[e.script];
8357
8357
  return r ? r.tags[e.tag] ? this.features[e.script].tags[e.tag] : null : { FAIL: "No feature for script " + e.script };
8358
8358
  };
8359
- function cu(t) {
8359
+ function fu(t) {
8360
8360
  var e = t.current, r = t.get(-1);
8361
8361
  return (
8362
8362
  // ? arabic first char
@@ -8364,7 +8364,7 @@ function cu(t) {
8364
8364
  !Fe(r) && Fe(e)
8365
8365
  );
8366
8366
  }
8367
- function fu(t) {
8367
+ function pu(t) {
8368
8368
  var e = t.get(1);
8369
8369
  return (
8370
8370
  // ? last arabic char
@@ -8372,24 +8372,24 @@ function fu(t) {
8372
8372
  !Fe(e)
8373
8373
  );
8374
8374
  }
8375
- var pu = {
8376
- startCheck: cu,
8377
- endCheck: fu
8375
+ var du = {
8376
+ startCheck: fu,
8377
+ endCheck: pu
8378
8378
  };
8379
- function du(t) {
8379
+ function gu(t) {
8380
8380
  var e = t.current, r = t.get(-1);
8381
8381
  return (
8382
8382
  // ? an arabic char preceded with a non arabic char
8383
8383
  (Fe(e) || Te(e)) && !Fe(r)
8384
8384
  );
8385
8385
  }
8386
- function gu(t) {
8386
+ function vu(t) {
8387
8387
  var e = t.get(1);
8388
8388
  switch (!0) {
8389
8389
  case e === null:
8390
8390
  return !0;
8391
8391
  case (!Fe(e) && !Te(e)):
8392
- var r = su(e);
8392
+ var r = iu(e);
8393
8393
  if (!r)
8394
8394
  return !0;
8395
8395
  if (r) {
@@ -8406,40 +8406,40 @@ function gu(t) {
8406
8406
  return !1;
8407
8407
  }
8408
8408
  }
8409
- var vu = {
8410
- startCheck: du,
8411
- endCheck: gu
8409
+ var mu = {
8410
+ startCheck: gu,
8411
+ endCheck: vu
8412
8412
  };
8413
- function mu(t, e, r) {
8414
- e[r].setState(t.tag, t.substitution);
8415
- }
8416
8413
  function yu(t, e, r) {
8417
8414
  e[r].setState(t.tag, t.substitution);
8418
8415
  }
8419
8416
  function xu(t, e, r) {
8417
+ e[r].setState(t.tag, t.substitution);
8418
+ }
8419
+ function bu(t, e, r) {
8420
8420
  t.substitution.forEach(function(n, a) {
8421
8421
  var s = e[r + a];
8422
8422
  s.setState(t.tag, n);
8423
8423
  });
8424
8424
  }
8425
- function bu(t, e, r) {
8425
+ function Su(t, e, r) {
8426
8426
  var n = e[r];
8427
8427
  n.setState(t.tag, t.substitution.ligGlyph);
8428
8428
  for (var a = t.substitution.components.length, s = 0; s < a; s++)
8429
8429
  n = e[r + s + 1], n.setState("deleted", !0);
8430
8430
  }
8431
- var on = {
8432
- 11: mu,
8433
- 12: yu,
8434
- 63: xu,
8435
- 41: bu
8431
+ var un = {
8432
+ 11: yu,
8433
+ 12: xu,
8434
+ 63: bu,
8435
+ 41: Su
8436
8436
  };
8437
8437
  function cr(t, e, r) {
8438
- t instanceof Le && on[t.id] && on[t.id](t, e, r);
8438
+ t instanceof Le && un[t.id] && un[t.id](t, e, r);
8439
8439
  }
8440
- function Su(t) {
8440
+ function ku(t) {
8441
8441
  for (var e = [].concat(t.backtrack), r = e.length - 1; r >= 0; r--) {
8442
- var n = e[r], a = va(n), s = Te(n);
8442
+ var n = e[r], a = ma(n), s = Te(n);
8443
8443
  if (!a && !s)
8444
8444
  return !0;
8445
8445
  if (a)
@@ -8447,8 +8447,8 @@ function Su(t) {
8447
8447
  }
8448
8448
  return !1;
8449
8449
  }
8450
- function ku(t) {
8451
- if (va(t.current))
8450
+ function Fu(t) {
8451
+ if (ma(t.current))
8452
8452
  return !1;
8453
8453
  for (var e = 0; e < t.lookahead.length; e++) {
8454
8454
  var r = t.lookahead[e], n = Te(r);
@@ -8457,7 +8457,7 @@ function ku(t) {
8457
8457
  }
8458
8458
  return !1;
8459
8459
  }
8460
- function Fu(t) {
8460
+ function Tu(t) {
8461
8461
  var e = this, r = "arab", n = this.featuresTags[r], a = this.tokenizer.getRangeTokens(t);
8462
8462
  if (a.length !== 1) {
8463
8463
  var s = new oe(
@@ -8479,7 +8479,7 @@ function Fu(t) {
8479
8479
  if (!Te(o.char)) {
8480
8480
  s.setCurrentIndex(u), i.setCurrentIndex(u);
8481
8481
  var l = 0;
8482
- Su(i) && (l |= 1), ku(i) && (l |= 2);
8482
+ ku(i) && (l |= 1), Fu(i) && (l |= 2);
8483
8483
  var h;
8484
8484
  switch (l) {
8485
8485
  case 1:
@@ -8508,14 +8508,14 @@ function Fu(t) {
8508
8508
  });
8509
8509
  }
8510
8510
  }
8511
- function un(t, e) {
8511
+ function ln(t, e) {
8512
8512
  var r = t.map(function(n) {
8513
8513
  return n.activeState.value;
8514
8514
  });
8515
8515
  return new oe(r, 0);
8516
8516
  }
8517
- function Tu(t) {
8518
- var e = this, r = "arab", n = this.tokenizer.getRangeTokens(t), a = un(n);
8517
+ function wu(t) {
8518
+ var e = this, r = "arab", n = this.tokenizer.getRangeTokens(t), a = ln(n);
8519
8519
  a.context.forEach(function(s, i) {
8520
8520
  a.setCurrentIndex(i);
8521
8521
  var o = e.query.lookupFeature({
@@ -8527,10 +8527,10 @@ function Tu(t) {
8527
8527
  function(u) {
8528
8528
  return cr(u, n, i);
8529
8529
  }
8530
- ), a = un(n));
8530
+ ), a = ln(n));
8531
8531
  });
8532
8532
  }
8533
- function wu(t) {
8533
+ function Cu(t) {
8534
8534
  var e = t.current, r = t.get(-1);
8535
8535
  return (
8536
8536
  // ? latin first char
@@ -8538,7 +8538,7 @@ function wu(t) {
8538
8538
  !ht(r) && ht(e)
8539
8539
  );
8540
8540
  }
8541
- function Cu(t) {
8541
+ function Eu(t) {
8542
8542
  var e = t.get(1);
8543
8543
  return (
8544
8544
  // ? last latin char
@@ -8546,18 +8546,18 @@ function Cu(t) {
8546
8546
  !ht(e)
8547
8547
  );
8548
8548
  }
8549
- var Eu = {
8550
- startCheck: wu,
8551
- endCheck: Cu
8549
+ var Ou = {
8550
+ startCheck: Cu,
8551
+ endCheck: Eu
8552
8552
  };
8553
- function ln(t, e) {
8553
+ function hn(t, e) {
8554
8554
  var r = t.map(function(n) {
8555
8555
  return n.activeState.value;
8556
8556
  });
8557
8557
  return new oe(r, 0);
8558
8558
  }
8559
- function Ou(t) {
8560
- var e = this, r = "latn", n = this.tokenizer.getRangeTokens(t), a = ln(n);
8559
+ function Uu(t) {
8560
+ var e = this, r = "latn", n = this.tokenizer.getRangeTokens(t), a = hn(n);
8561
8561
  a.context.forEach(function(s, i) {
8562
8562
  a.setCurrentIndex(i);
8563
8563
  var o = e.query.lookupFeature({
@@ -8569,7 +8569,7 @@ function Ou(t) {
8569
8569
  function(u) {
8570
8570
  return cr(u, n, i);
8571
8571
  }
8572
- ), a = ln(n));
8572
+ ), a = hn(n));
8573
8573
  });
8574
8574
  }
8575
8575
  function he(t) {
@@ -8579,9 +8579,9 @@ he.prototype.setText = function(t) {
8579
8579
  this.text = t;
8580
8580
  };
8581
8581
  he.prototype.contextChecks = {
8582
- latinWordCheck: Eu,
8583
- arabicWordCheck: pu,
8584
- arabicSentenceCheck: vu
8582
+ latinWordCheck: Ou,
8583
+ arabicWordCheck: du,
8584
+ arabicSentenceCheck: mu
8585
8585
  };
8586
8586
  function Mt(t) {
8587
8587
  var e = this.contextChecks[t + "Check"];
@@ -8591,10 +8591,10 @@ function Mt(t) {
8591
8591
  e.endCheck
8592
8592
  );
8593
8593
  }
8594
- function Uu() {
8594
+ function Lu() {
8595
8595
  return Mt.call(this, "latinWord"), Mt.call(this, "arabicWord"), Mt.call(this, "arabicSentence"), this.tokenizer.tokenize(this.text);
8596
8596
  }
8597
- function Lu() {
8597
+ function Ru() {
8598
8598
  var t = this, e = this.tokenizer.getContextRanges("arabicSentence");
8599
8599
  e.forEach(function(r) {
8600
8600
  var n = t.tokenizer.getRangeTokens(r);
@@ -8633,17 +8633,17 @@ function fr() {
8633
8633
  "glyphIndex modifier is required to apply arabic presentation features."
8634
8634
  );
8635
8635
  }
8636
- function Ru() {
8636
+ function Au() {
8637
8637
  var t = this, e = "arab";
8638
8638
  if (this.featuresTags.hasOwnProperty(e)) {
8639
8639
  fr.call(this);
8640
8640
  var r = this.tokenizer.getContextRanges("arabicWord");
8641
8641
  r.forEach(function(n) {
8642
- Fu.call(t, n);
8642
+ Tu.call(t, n);
8643
8643
  });
8644
8644
  }
8645
8645
  }
8646
- function Au() {
8646
+ function Mu() {
8647
8647
  var t = this, e = "arab";
8648
8648
  if (this.featuresTags.hasOwnProperty(e)) {
8649
8649
  var r = this.featuresTags[e];
@@ -8651,12 +8651,12 @@ function Au() {
8651
8651
  fr.call(this);
8652
8652
  var n = this.tokenizer.getContextRanges("arabicWord");
8653
8653
  n.forEach(function(a) {
8654
- Tu.call(t, a);
8654
+ wu.call(t, a);
8655
8655
  });
8656
8656
  }
8657
8657
  }
8658
8658
  }
8659
- function Mu() {
8659
+ function Pu() {
8660
8660
  var t = this, e = "latn";
8661
8661
  if (this.featuresTags.hasOwnProperty(e)) {
8662
8662
  var r = this.featuresTags[e];
@@ -8664,7 +8664,7 @@ function Mu() {
8664
8664
  fr.call(this);
8665
8665
  var n = this.tokenizer.getContextRanges("latinWord");
8666
8666
  n.forEach(function(a) {
8667
- Ou.call(t, a);
8667
+ Uu.call(t, a);
8668
8668
  });
8669
8669
  }
8670
8670
  }
@@ -8673,10 +8673,10 @@ he.prototype.checkContextReady = function(t) {
8673
8673
  return !!this.tokenizer.getContext(t);
8674
8674
  };
8675
8675
  he.prototype.applyFeaturesToContexts = function() {
8676
- this.checkContextReady("arabicWord") && (Ru.call(this), Au.call(this)), this.checkContextReady("latinWord") && Mu.call(this), this.checkContextReady("arabicSentence") && Lu.call(this);
8676
+ this.checkContextReady("arabicWord") && (Au.call(this), Mu.call(this)), this.checkContextReady("latinWord") && Pu.call(this), this.checkContextReady("arabicSentence") && Ru.call(this);
8677
8677
  };
8678
8678
  he.prototype.processText = function(t) {
8679
- (!this.text || this.text !== t) && (this.setText(t), Uu.call(this), this.applyFeaturesToContexts());
8679
+ (!this.text || this.text !== t) && (this.setText(t), Lu.call(this), this.applyFeaturesToContexts());
8680
8680
  };
8681
8681
  he.prototype.getBidiText = function(t) {
8682
8682
  return this.processText(t), this.tokenizer.getText();
@@ -8715,12 +8715,12 @@ function P(t) {
8715
8715
  usWidthClass: t.widthClass || this.usWidthClasses.MEDIUM,
8716
8716
  fsSelection: t.fsSelection || this.fsSelectionValues.REGULAR
8717
8717
  }, t.tables.os2)
8718
- })), this.supported = !0, this.glyphs = new de.GlyphSet(this, t.glyphs || []), this.encoding = new Bn(this), this.position = new Qe(this), this.substitution = new re(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
8718
+ })), this.supported = !0, this.glyphs = new de.GlyphSet(this, t.glyphs || []), this.encoding = new Dn(this), this.position = new Qe(this), this.substitution = new re(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
8719
8719
  get: function() {
8720
8720
  if (this._hinting)
8721
8721
  return this._hinting;
8722
8722
  if (this.outlinesFormat === "truetype")
8723
- return this._hinting = new fa(this);
8723
+ return this._hinting = new pa(this);
8724
8724
  }
8725
8725
  });
8726
8726
  }
@@ -8845,7 +8845,7 @@ P.prototype.validate = function() {
8845
8845
  r("fontFamily"), r("weightName"), r("manufacturer"), r("copyright"), r("version"), this.unitsPerEm > 0;
8846
8846
  };
8847
8847
  P.prototype.toTables = function() {
8848
- return xi.fontToTable(this);
8848
+ return bi.fontToTable(this);
8849
8849
  };
8850
8850
  P.prototype.toBuffer = function() {
8851
8851
  return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."), this.toArrayBuffer();
@@ -8859,7 +8859,7 @@ P.prototype.download = function(t) {
8859
8859
  var e = this.getEnglishName("fontFamily"), r = this.getEnglishName("fontSubfamily");
8860
8860
  t = t || e.replace(/\s/g, "") + "-" + r + ".otf";
8861
8861
  var n = this.toArrayBuffer();
8862
- if (Si())
8862
+ if (ki())
8863
8863
  if (window.URL = window.URL || window.webkitURL, window.URL) {
8864
8864
  var a = new DataView(n), s = new Blob([a], { type: "font/opentype" }), i = document.createElement("a");
8865
8865
  i.href = window.URL.createObjectURL(s), i.download = t;
@@ -8868,7 +8868,7 @@ P.prototype.download = function(t) {
8868
8868
  } else
8869
8869
  console.warn("Font file could not be downloaded. Try using a different browser.");
8870
8870
  else {
8871
- var u = require("fs"), l = ki(n);
8871
+ var u = require("fs"), l = Fi(n);
8872
8872
  u.writeFileSync(t, l);
8873
8873
  }
8874
8874
  };
@@ -8916,7 +8916,7 @@ P.prototype.usWeightClasses = {
8916
8916
  EXTRA_BOLD: 800,
8917
8917
  BLACK: 900
8918
8918
  };
8919
- function ma(t, e) {
8919
+ function ya(t, e) {
8920
8920
  var r = JSON.stringify(t), n = 256;
8921
8921
  for (var a in e) {
8922
8922
  var s = parseInt(a);
@@ -8928,8 +8928,8 @@ function ma(t, e) {
8928
8928
  }
8929
8929
  return e[n] = t, n;
8930
8930
  }
8931
- function Pu(t, e, r) {
8932
- var n = ma(e.name, r);
8931
+ function Bu(t, e, r) {
8932
+ var n = ya(e.name, r);
8933
8933
  return [
8934
8934
  { name: "tag_" + t, type: "TAG", value: e.tag },
8935
8935
  { name: "minValue_" + t, type: "FIXED", value: e.minValue << 16 },
@@ -8939,12 +8939,12 @@ function Pu(t, e, r) {
8939
8939
  { name: "nameID_" + t, type: "USHORT", value: n }
8940
8940
  ];
8941
8941
  }
8942
- function Bu(t, e, r) {
8942
+ function Du(t, e, r) {
8943
8943
  var n = {}, a = new E.Parser(t, e);
8944
8944
  return n.tag = a.parseTag(), n.minValue = a.parseFixed(), n.defaultValue = a.parseFixed(), n.maxValue = a.parseFixed(), a.skip("uShort", 1), n.name = r[a.parseUShort()] || {}, n;
8945
8945
  }
8946
8946
  function Iu(t, e, r, n) {
8947
- for (var a = ma(e.name, n), s = [
8947
+ for (var a = ya(e.name, n), s = [
8948
8948
  { name: "nameID_" + t, type: "USHORT", value: a },
8949
8949
  { name: "flags_" + t, type: "USHORT", value: 0 }
8950
8950
  ], i = 0; i < r.length; ++i) {
@@ -8957,14 +8957,14 @@ function Iu(t, e, r, n) {
8957
8957
  }
8958
8958
  return s;
8959
8959
  }
8960
- function Du(t, e, r, n) {
8960
+ function Gu(t, e, r, n) {
8961
8961
  var a = {}, s = new E.Parser(t, e);
8962
8962
  a.name = n[s.parseUShort()] || {}, s.skip("uShort", 1), a.coordinates = {};
8963
8963
  for (var i = 0; i < r.length; ++i)
8964
8964
  a.coordinates[r[i].tag] = s.parseFixed();
8965
8965
  return a;
8966
8966
  }
8967
- function Gu(t, e) {
8967
+ function Nu(t, e) {
8968
8968
  var r = new F.Table("fvar", [
8969
8969
  { name: "version", type: "ULONG", value: 65536 },
8970
8970
  { name: "offsetToData", type: "USHORT", value: 0 },
@@ -8976,28 +8976,28 @@ function Gu(t, e) {
8976
8976
  ]);
8977
8977
  r.offsetToData = r.sizeOf();
8978
8978
  for (var n = 0; n < t.axes.length; n++)
8979
- r.fields = r.fields.concat(Pu(n, t.axes[n], e));
8979
+ r.fields = r.fields.concat(Bu(n, t.axes[n], e));
8980
8980
  for (var a = 0; a < t.instances.length; a++)
8981
8981
  r.fields = r.fields.concat(Iu(a, t.instances[a], t.axes, e));
8982
8982
  return r;
8983
8983
  }
8984
- function Nu(t, e, r) {
8984
+ function _u(t, e, r) {
8985
8985
  var n = new E.Parser(t, e), a = n.parseULong();
8986
8986
  U.argument(a === 65536, "Unsupported fvar table version.");
8987
8987
  var s = n.parseOffset16();
8988
8988
  n.skip("uShort", 1);
8989
8989
  for (var i = n.parseUShort(), o = n.parseUShort(), u = n.parseUShort(), l = n.parseUShort(), h = [], f = 0; f < i; f++)
8990
- h.push(Bu(t, e + s + f * o, r));
8990
+ h.push(Du(t, e + s + f * o, r));
8991
8991
  for (var c = [], p = e + s + i * o, d = 0; d < u; d++)
8992
- c.push(Du(t, p + d * l, h, r));
8992
+ c.push(Gu(t, p + d * l, h, r));
8993
8993
  return { axes: h, instances: c };
8994
8994
  }
8995
- var _u = { make: Gu, parse: Nu }, Hu = function() {
8995
+ var Hu = { make: Nu, parse: _u }, zu = function() {
8996
8996
  return {
8997
8997
  coverage: this.parsePointer(g.coverage),
8998
8998
  attachPoints: this.parseList(g.pointer(g.uShortList))
8999
8999
  };
9000
- }, zu = function() {
9000
+ }, Wu = function() {
9001
9001
  var t = this.parseUShort();
9002
9002
  if (U.argument(
9003
9003
  t === 1 || t === 2 || t === 3,
@@ -9008,17 +9008,17 @@ var _u = { make: Gu, parse: Nu }, Hu = function() {
9008
9008
  return { pointindex: this.parseShort() };
9009
9009
  if (t === 3)
9010
9010
  return { coordinate: this.parseShort() };
9011
- }, Wu = function() {
9012
- return this.parseList(g.pointer(zu));
9013
9011
  }, Vu = function() {
9012
+ return this.parseList(g.pointer(Wu));
9013
+ }, qu = function() {
9014
9014
  return {
9015
9015
  coverage: this.parsePointer(g.coverage),
9016
- ligGlyphs: this.parseList(g.pointer(Wu))
9016
+ ligGlyphs: this.parseList(g.pointer(Vu))
9017
9017
  };
9018
- }, qu = function() {
9018
+ }, Xu = function() {
9019
9019
  return this.parseUShort(), this.parseList(g.pointer(g.coverage));
9020
9020
  };
9021
- function Xu(t, e) {
9021
+ function Yu(t, e) {
9022
9022
  e = e || 0;
9023
9023
  var r = new g(t, e), n = r.parseVersion(1);
9024
9024
  U.argument(
@@ -9028,13 +9028,13 @@ function Xu(t, e) {
9028
9028
  var a = {
9029
9029
  version: n,
9030
9030
  classDef: r.parsePointer(g.classDef),
9031
- attachList: r.parsePointer(Hu),
9032
- ligCaretList: r.parsePointer(Vu),
9031
+ attachList: r.parsePointer(zu),
9032
+ ligCaretList: r.parsePointer(qu),
9033
9033
  markAttachClassDef: r.parsePointer(g.classDef)
9034
9034
  };
9035
- return n >= 1.2 && (a.markGlyphSets = r.parsePointer(qu)), a;
9035
+ return n >= 1.2 && (a.markGlyphSets = r.parsePointer(Xu)), a;
9036
9036
  }
9037
- var Yu = { parse: Xu }, ue = new Array(10);
9037
+ var Zu = { parse: Yu }, ue = new Array(10);
9038
9038
  ue[1] = function() {
9039
9039
  var e = this.offset + this.relativeOffset, r = this.parseUShort();
9040
9040
  if (r === 1)
@@ -9112,7 +9112,7 @@ ue[8] = function() {
9112
9112
  ue[9] = function() {
9113
9113
  return { error: "GPOS Lookup 9 not supported" };
9114
9114
  };
9115
- function Zu(t, e) {
9115
+ function ju(t, e) {
9116
9116
  e = e || 0;
9117
9117
  var r = new g(t, e), n = r.parseVersion(1);
9118
9118
  return U.argument(n === 1 || n === 1.1, "Unsupported GPOS table version " + n), n === 1 ? {
@@ -9128,17 +9128,17 @@ function Zu(t, e) {
9128
9128
  variations: r.parseFeatureVariationsList()
9129
9129
  };
9130
9130
  }
9131
- var ju = new Array(10);
9132
- function Ku(t) {
9131
+ var Ku = new Array(10);
9132
+ function Qu(t) {
9133
9133
  return new F.Table("GPOS", [
9134
9134
  { name: "version", type: "ULONG", value: 65536 },
9135
9135
  { name: "scripts", type: "TABLE", value: new F.ScriptList(t.scripts) },
9136
9136
  { name: "features", type: "TABLE", value: new F.FeatureList(t.features) },
9137
- { name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups, ju) }
9137
+ { name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups, Ku) }
9138
9138
  ]);
9139
9139
  }
9140
- var Qu = { parse: Zu, make: Ku };
9141
- function $u(t) {
9140
+ var $u = { parse: ju, make: Qu };
9141
+ function Ju(t) {
9142
9142
  var e = {};
9143
9143
  t.skip("uShort");
9144
9144
  var r = t.parseUShort();
@@ -9151,7 +9151,7 @@ function $u(t) {
9151
9151
  }
9152
9152
  return e;
9153
9153
  }
9154
- function Ju(t) {
9154
+ function el(t) {
9155
9155
  var e = {};
9156
9156
  t.skip("uShort");
9157
9157
  var r = t.parseULong();
@@ -9167,31 +9167,31 @@ function Ju(t) {
9167
9167
  }
9168
9168
  return e;
9169
9169
  }
9170
- function el(t, e) {
9170
+ function tl(t, e) {
9171
9171
  var r = new E.Parser(t, e), n = r.parseUShort();
9172
9172
  if (n === 0)
9173
- return $u(r);
9174
- if (n === 1)
9175
9173
  return Ju(r);
9174
+ if (n === 1)
9175
+ return el(r);
9176
9176
  throw new Error("Unsupported kern table version (" + n + ").");
9177
9177
  }
9178
- var tl = { parse: el };
9179
- function rl(t, e, r, n) {
9178
+ var rl = { parse: tl };
9179
+ function nl(t, e, r, n) {
9180
9180
  for (var a = new E.Parser(t, e), s = n ? a.parseUShort : a.parseULong, i = [], o = 0; o < r + 1; o += 1) {
9181
9181
  var u = s.call(a);
9182
9182
  n && (u *= 2), i.push(u);
9183
9183
  }
9184
9184
  return i;
9185
9185
  }
9186
- var nl = { parse: rl };
9187
- function hn(t, e) {
9186
+ var al = { parse: nl };
9187
+ function cn(t, e) {
9188
9188
  for (var r = [], n = 12, a = 0; a < e; a += 1) {
9189
9189
  var s = E.getTag(t, n), i = E.getULong(t, n + 4), o = E.getULong(t, n + 8), u = E.getULong(t, n + 12);
9190
9190
  r.push({ tag: s, checksum: i, offset: o, length: u, compression: !1 }), n += 16;
9191
9191
  }
9192
9192
  return r;
9193
9193
  }
9194
- function al(t, e) {
9194
+ function sl(t, e) {
9195
9195
  for (var r = [], n = 44, a = 0; a < e; a += 1) {
9196
9196
  var s = E.getTag(t, n), i = E.getULong(t, n + 4), o = E.getULong(t, n + 8), u = E.getULong(t, n + 12), l = void 0;
9197
9197
  o < u ? l = "WOFF" : l = !1, r.push({
@@ -9207,20 +9207,20 @@ function al(t, e) {
9207
9207
  function H(t, e) {
9208
9208
  if (e.compression === "WOFF") {
9209
9209
  var r = new Uint8Array(t.buffer, e.offset + 2, e.compressedLength - 2), n = new Uint8Array(e.length);
9210
- if (Ka(r, n), n.byteLength !== e.length)
9210
+ if (Qa(r, n), n.byteLength !== e.length)
9211
9211
  throw new Error("Decompression error: " + e.tag + " decompressed length doesn't match recorded length");
9212
9212
  var a = new DataView(n.buffer, 0);
9213
9213
  return { data: a, offset: 0 };
9214
9214
  } else
9215
9215
  return { data: t, offset: e.offset };
9216
9216
  }
9217
- function sl(t, e) {
9217
+ function il(t, e) {
9218
9218
  e = e ?? {};
9219
9219
  var r, n, a = new P({ empty: !0 }), s = new DataView(t, 0), i, o = [], u = E.getTag(s, 0);
9220
9220
  if (u === "\0\0\0" || u === "true" || u === "typ1")
9221
- a.outlinesFormat = "truetype", i = E.getUShort(s, 4), o = hn(s, i);
9221
+ a.outlinesFormat = "truetype", i = E.getUShort(s, 4), o = cn(s, i);
9222
9222
  else if (u === "OTTO")
9223
- a.outlinesFormat = "cff", i = E.getUShort(s, 4), o = hn(s, i);
9223
+ a.outlinesFormat = "cff", i = E.getUShort(s, 4), o = cn(s, i);
9224
9224
  else if (u === "wOFF") {
9225
9225
  var l = E.getTag(s, 4);
9226
9226
  if (l === "\0\0\0")
@@ -9229,14 +9229,14 @@ function sl(t, e) {
9229
9229
  a.outlinesFormat = "cff";
9230
9230
  else
9231
9231
  throw new Error("Unsupported OpenType flavor " + u);
9232
- i = E.getUShort(s, 12), o = al(s, i);
9232
+ i = E.getUShort(s, 12), o = sl(s, i);
9233
9233
  } else
9234
9234
  throw new Error("Unsupported OpenType signature " + u);
9235
9235
  for (var h, f, c, p, d, v, y, m, b, x, T, S, A = 0; A < i; A += 1) {
9236
9236
  var O = o[A], w = void 0;
9237
9237
  switch (O.tag) {
9238
9238
  case "cmap":
9239
- w = H(s, O), a.tables.cmap = Pn.parse(w.data, w.offset), a.encoding = new In(a.tables.cmap);
9239
+ w = H(s, O), a.tables.cmap = Bn.parse(w.data, w.offset), a.encoding = new In(a.tables.cmap);
9240
9240
  break;
9241
9241
  case "cvt ":
9242
9242
  w = H(s, O), S = new E.Parser(w.data, w.offset), a.tables.cvt = S.parseShortList(O.length / 2);
@@ -9248,19 +9248,19 @@ function sl(t, e) {
9248
9248
  w = H(s, O), S = new E.Parser(w.data, w.offset), a.tables.fpgm = S.parseByteList(O.length);
9249
9249
  break;
9250
9250
  case "head":
9251
- w = H(s, O), a.tables.head = Xn.parse(w.data, w.offset), a.unitsPerEm = a.tables.head.unitsPerEm, r = a.tables.head.indexToLocFormat;
9251
+ w = H(s, O), a.tables.head = Yn.parse(w.data, w.offset), a.unitsPerEm = a.tables.head.unitsPerEm, r = a.tables.head.indexToLocFormat;
9252
9252
  break;
9253
9253
  case "hhea":
9254
- w = H(s, O), a.tables.hhea = Yn.parse(w.data, w.offset), a.ascender = a.tables.hhea.ascender, a.descender = a.tables.hhea.descender, a.numberOfHMetrics = a.tables.hhea.numberOfHMetrics;
9254
+ w = H(s, O), a.tables.hhea = Zn.parse(w.data, w.offset), a.ascender = a.tables.hhea.ascender, a.descender = a.tables.hhea.descender, a.numberOfHMetrics = a.tables.hhea.numberOfHMetrics;
9255
9255
  break;
9256
9256
  case "hmtx":
9257
9257
  y = O;
9258
9258
  break;
9259
9259
  case "ltag":
9260
- w = H(s, O), n = jn.parse(w.data, w.offset);
9260
+ w = H(s, O), n = Kn.parse(w.data, w.offset);
9261
9261
  break;
9262
9262
  case "maxp":
9263
- w = H(s, O), a.tables.maxp = Kn.parse(w.data, w.offset), a.numGlyphs = a.tables.maxp.numGlyphs;
9263
+ w = H(s, O), a.tables.maxp = Qn.parse(w.data, w.offset), a.numGlyphs = a.tables.maxp.numGlyphs;
9264
9264
  break;
9265
9265
  case "name":
9266
9266
  x = O;
@@ -9269,7 +9269,7 @@ function sl(t, e) {
9269
9269
  w = H(s, O), a.tables.os2 = Jt.parse(w.data, w.offset);
9270
9270
  break;
9271
9271
  case "post":
9272
- w = H(s, O), a.tables.post = ra.parse(w.data, w.offset), a.glyphNames = new ir(a.tables.post);
9272
+ w = H(s, O), a.tables.post = na.parse(w.data, w.offset), a.glyphNames = new ir(a.tables.post);
9273
9273
  break;
9274
9274
  case "prep":
9275
9275
  w = H(s, O), S = new E.Parser(w.data, w.offset), a.tables.prep = S.parseByteList(O.length);
@@ -9301,43 +9301,43 @@ function sl(t, e) {
9301
9301
  }
9302
9302
  }
9303
9303
  var M = H(s, x);
9304
- if (a.tables.name = ta.parse(M.data, M.offset, n), a.names = a.tables.name, c && b) {
9305
- var N = r === 0, K = H(s, b), $ = nl.parse(K.data, K.offset, a.numGlyphs, N), Y = H(s, c);
9306
- a.glyphs = la.parse(Y.data, Y.offset, $, a, e);
9304
+ if (a.tables.name = ra.parse(M.data, M.offset, n), a.names = a.tables.name, c && b) {
9305
+ var N = r === 0, K = H(s, b), $ = al.parse(K.data, K.offset, a.numGlyphs, N), Y = H(s, c);
9306
+ a.glyphs = ha.parse(Y.data, Y.offset, $, a, e);
9307
9307
  } else if (h) {
9308
- var I = H(s, h);
9309
- qn.parse(I.data, I.offset, a, e);
9308
+ var D = H(s, h);
9309
+ Xn.parse(D.data, D.offset, a, e);
9310
9310
  } else
9311
9311
  throw new Error("Font doesn't contain TrueType or CFF outlines.");
9312
9312
  var _ = H(s, y);
9313
- if (Zn.parse(a, _.data, _.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, e), ms(a, e), m) {
9314
- var D = H(s, m);
9315
- a.kerningPairs = tl.parse(D.data, D.offset);
9313
+ if (jn.parse(a, _.data, _.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, e), ys(a, e), m) {
9314
+ var I = H(s, m);
9315
+ a.kerningPairs = rl.parse(I.data, I.offset);
9316
9316
  } else
9317
9317
  a.kerningPairs = {};
9318
9318
  if (p) {
9319
9319
  var W = H(s, p);
9320
- a.tables.gdef = Yu.parse(W.data, W.offset);
9320
+ a.tables.gdef = Zu.parse(W.data, W.offset);
9321
9321
  }
9322
9322
  if (d) {
9323
9323
  var Z = H(s, d);
9324
- a.tables.gpos = Qu.parse(Z.data, Z.offset), a.position.init();
9324
+ a.tables.gpos = $u.parse(Z.data, Z.offset), a.position.init();
9325
9325
  }
9326
9326
  if (v) {
9327
9327
  var q = H(s, v);
9328
- a.tables.gsub = na.parse(q.data, q.offset);
9328
+ a.tables.gsub = aa.parse(q.data, q.offset);
9329
9329
  }
9330
9330
  if (f) {
9331
9331
  var Q = H(s, f);
9332
- a.tables.fvar = _u.parse(Q.data, Q.offset, a.names);
9332
+ a.tables.fvar = Hu.parse(Q.data, Q.offset, a.names);
9333
9333
  }
9334
9334
  if (T) {
9335
9335
  var B = H(s, T);
9336
- a.tables.meta = aa.parse(B.data, B.offset), a.metas = a.tables.meta;
9336
+ a.tables.meta = sa.parse(B.data, B.offset), a.metas = a.tables.meta;
9337
9337
  }
9338
9338
  return a;
9339
9339
  }
9340
- function il(t) {
9340
+ function ol(t) {
9341
9341
  return ((r, n) => {
9342
9342
  const a = Math.round, s = {}, i = r.encoding.cmap.glyphIndexMap, o = Object.keys(i), u = r.glyphs.glyphs[i[65]];
9343
9343
  let l = 1;
@@ -9373,9 +9373,9 @@ function il(t) {
9373
9373
  scaleFactor: l,
9374
9374
  original_font_information: r.tables.name
9375
9375
  };
9376
- })(sl(t));
9376
+ })(il(t));
9377
9377
  }
9378
- class ol extends ka {
9378
+ class ul extends Fa {
9379
9379
  constructor(e, r = {}) {
9380
9380
  const n = r.font;
9381
9381
  if (n === void 0)
@@ -9387,7 +9387,7 @@ class ol extends ka {
9387
9387
  this.type = "TextGeometry";
9388
9388
  }
9389
9389
  }
9390
- function cn(t, e = !1) {
9390
+ function fn(t, e = !1) {
9391
9391
  const r = t[0].index !== null, n = new Set(Object.keys(t[0].attributes)), a = new Set(Object.keys(t[0].morphAttributes)), s = {}, i = {}, o = t[0].morphTargetsRelative, u = new ut();
9392
9392
  let l = 0;
9393
9393
  for (let h = 0; h < t.length; ++h) {
@@ -9432,7 +9432,7 @@ function cn(t, e = !1) {
9432
9432
  u.setIndex(f);
9433
9433
  }
9434
9434
  for (const h in s) {
9435
- const f = fn(s[h]);
9435
+ const f = pn(s[h]);
9436
9436
  if (!f)
9437
9437
  return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + h + " attribute."), null;
9438
9438
  u.setAttribute(h, f);
@@ -9445,7 +9445,7 @@ function cn(t, e = !1) {
9445
9445
  const p = [];
9446
9446
  for (let v = 0; v < i[h].length; ++v)
9447
9447
  p.push(i[h][v][c]);
9448
- const d = fn(p);
9448
+ const d = pn(p);
9449
9449
  if (!d)
9450
9450
  return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + h + " morphAttribute."), null;
9451
9451
  u.morphAttributes[h].push(d);
@@ -9453,7 +9453,7 @@ function cn(t, e = !1) {
9453
9453
  }
9454
9454
  return u;
9455
9455
  }
9456
- function fn(t) {
9456
+ function pn(t) {
9457
9457
  let e, r, n, a = -1, s = 0;
9458
9458
  for (let l = 0; l < t.length; ++l) {
9459
9459
  const h = t[l];
@@ -9467,7 +9467,7 @@ function fn(t) {
9467
9467
  return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."), null;
9468
9468
  s += h.count * r;
9469
9469
  }
9470
- const i = new e(s), o = new Fa(i, r, n);
9470
+ const i = new e(s), o = new Ta(i, r, n);
9471
9471
  let u = 0;
9472
9472
  for (let l = 0; l < t.length; ++l) {
9473
9473
  const h = t[l];
@@ -9484,7 +9484,7 @@ function fn(t) {
9484
9484
  }
9485
9485
  return a !== void 0 && (o.gpuType = a), o;
9486
9486
  }
9487
- function ul(t, e = 1e-4) {
9487
+ function ll(t, e = 1e-4) {
9488
9488
  e = Math.max(e, Number.EPSILON);
9489
9489
  const r = {}, n = t.getIndex(), a = t.getAttribute("position"), s = n ? n.count : a.count;
9490
9490
  let i = 0;
@@ -9517,10 +9517,10 @@ function ul(t, e = 1e-4) {
9517
9517
  for (let S = 0, A = o.length; S < A; S++) {
9518
9518
  const O = o[S], w = t.getAttribute(O), M = t.morphAttributes[O], N = w.itemSize, K = u[O], $ = l[O];
9519
9519
  for (let Y = 0; Y < N; Y++) {
9520
- const I = f[Y], _ = c[Y];
9521
- if (K[_](i, w[I](x)), M)
9522
- for (let D = 0, W = M.length; D < W; D++)
9523
- $[D][_](i, M[D][I](x));
9520
+ const D = f[Y], _ = c[Y];
9521
+ if (K[_](i, w[D](x)), M)
9522
+ for (let I = 0, W = M.length; I < W; I++)
9523
+ $[I][_](i, M[I][D](x));
9524
9524
  }
9525
9525
  }
9526
9526
  r[T] = i, h.push(i), i++;
@@ -9545,7 +9545,7 @@ function ul(t, e = 1e-4) {
9545
9545
  }
9546
9546
  return m.setIndex(h), m;
9547
9547
  }
9548
- const vr = class vr {
9548
+ const mr = class mr {
9549
9549
  /**
9550
9550
  * Dummy replacement for `computeVertexNormals` that does nothing.
9551
9551
  */
@@ -9591,10 +9591,10 @@ const vr = class vr {
9591
9591
  }
9592
9592
  }
9593
9593
  };
9594
- vr.originalComputeVertexNormals = ut.prototype.computeVertexNormals;
9595
- let tr = vr;
9594
+ mr.originalComputeVertexNormals = ut.prototype.computeVertexNormals;
9595
+ let tr = mr;
9596
9596
  const Ee = new L.Vector2();
9597
- class pn extends kn {
9597
+ class dn extends Fn {
9598
9598
  constructor(e, r, n) {
9599
9599
  super(e), this.isFound = !1, this.fontSize = r, this.font = n, this.width = this.getCharWidth(e, r, n);
9600
9600
  }
@@ -9606,7 +9606,7 @@ class pn extends kn {
9606
9606
  toGeometry() {
9607
9607
  let e = this.font.cache.getGeometry(this.char, this.fontSize);
9608
9608
  return e == null && (e = tr.runWithoutNormals(() => {
9609
- const r = new ol(this.char, {
9609
+ const r = new ul(this.char, {
9610
9610
  font: this.font.font,
9611
9611
  depth: 0,
9612
9612
  size: this.fontSize,
@@ -9620,7 +9620,7 @@ class pn extends kn {
9620
9620
  generateSideWallUV: () => [Ee, Ee, Ee, Ee]
9621
9621
  }
9622
9622
  });
9623
- return r.hasAttribute("uv") && r.deleteAttribute("uv"), r.hasAttribute("normal") && r.deleteAttribute("normal"), ul(r, 1e-6);
9623
+ return r.hasAttribute("uv") && r.deleteAttribute("uv"), r.hasAttribute("normal") && r.deleteAttribute("normal"), ll(r, 1e-6);
9624
9624
  })), e;
9625
9625
  }
9626
9626
  /**
@@ -9635,13 +9635,13 @@ class pn extends kn {
9635
9635
  return a ? (this.isFound = !0, a.ha * r / n.data.resolution) : (this.isFound = !1, 0);
9636
9636
  }
9637
9637
  }
9638
- class dn extends Sn {
9638
+ class gn extends kn {
9639
9639
  /**
9640
9640
  * Creates a new instance of MeshFont.
9641
9641
  * @param data - Either a MeshFontData object containing font information or an ArrayBuffer containing raw font data
9642
9642
  */
9643
9643
  constructor(e) {
9644
- super(), this.type = "mesh", e instanceof ArrayBuffer ? this.data = il(e) : this.data = e, this.font = new _a(this.data);
9644
+ super(), this.type = "mesh", e instanceof ArrayBuffer ? this.data = ol(e) : this.data = e, this.font = new Ha(this.data);
9645
9645
  }
9646
9646
  /**
9647
9647
  * Return true if this font contains glyph of the specified character. Otherwise, return false.
@@ -9671,7 +9671,7 @@ class dn extends Sn {
9671
9671
  this.addUnsupportedChar(e);
9672
9672
  return;
9673
9673
  }
9674
- return new pn(e, r, this);
9674
+ return new dn(e, r, this);
9675
9675
  }
9676
9676
  /**
9677
9677
  * Gets the scale factor for this font.
@@ -9688,7 +9688,7 @@ class dn extends Sn {
9688
9688
  * @returns The shape data for the not found indicator
9689
9689
  */
9690
9690
  getNotFoundTextShape(e) {
9691
- return new pn("?", e, this);
9691
+ return new dn("?", e, this);
9692
9692
  }
9693
9693
  }
9694
9694
  class J {
@@ -9848,7 +9848,7 @@ class J {
9848
9848
  }
9849
9849
  }
9850
9850
  var te = /* @__PURE__ */ ((t) => (t.SHAPES = "shapes", t.BIGFONT = "bigfont", t.UNIFONT = "unifont", t))(te || {});
9851
- let ll = class {
9851
+ let hl = class {
9852
9852
  parse(e) {
9853
9853
  const r = this.parseHeader(e).split(" "), n = r[1].toLocaleLowerCase();
9854
9854
  if (!Object.values(te).includes(n))
@@ -9875,7 +9875,7 @@ let ll = class {
9875
9875
  return r.trim();
9876
9876
  }
9877
9877
  };
9878
- class hl {
9878
+ class cl {
9879
9879
  parse(e) {
9880
9880
  try {
9881
9881
  e.readBytes(4);
@@ -9927,7 +9927,7 @@ class hl {
9927
9927
  }
9928
9928
  }
9929
9929
  }
9930
- class cl {
9930
+ class fl {
9931
9931
  parse(e) {
9932
9932
  try {
9933
9933
  e.readInt16();
@@ -10012,7 +10012,7 @@ class cl {
10012
10012
  return r;
10013
10013
  }
10014
10014
  }
10015
- class fl {
10015
+ class pl {
10016
10016
  parse(e) {
10017
10017
  try {
10018
10018
  const r = e.readInt32();
@@ -10058,15 +10058,15 @@ class fl {
10058
10058
  }
10059
10059
  }
10060
10060
  }
10061
- class pl {
10061
+ class dl {
10062
10062
  static createParser(e) {
10063
10063
  switch (e) {
10064
10064
  case te.SHAPES:
10065
- return new hl();
10066
- case te.BIGFONT:
10067
10065
  return new cl();
10068
- case te.UNIFONT:
10066
+ case te.BIGFONT:
10069
10067
  return new fl();
10068
+ case te.UNIFONT:
10069
+ return new pl();
10070
10070
  default:
10071
10071
  throw new Error(`Unsupported font type: ${e}`);
10072
10072
  }
@@ -10172,7 +10172,7 @@ class z {
10172
10172
  return Math.sqrt(r * r + n * n);
10173
10173
  }
10174
10174
  }
10175
- const gn = Math.PI / 4;
10175
+ const vn = Math.PI / 4;
10176
10176
  class Ze {
10177
10177
  /**
10178
10178
  * Creates a bulge-defined arc
@@ -10218,8 +10218,8 @@ class Ze {
10218
10218
  const s = this.start.clone().add(r.clone().divide(2)), i = new z(-r.y, r.x);
10219
10219
  i.normalize(), i.multiply(Math.abs(this.radius * Math.cos(a / 2))), this.center = s.clone(), this.isClockwise ? this.center.subtract(i) : this.center.add(i), this.startAngle = Math.atan2(this.start.y - this.center.y, this.start.x - this.center.x), this.endAngle = Math.atan2(this.end.y - this.center.y, this.end.x - this.center.x), this.isClockwise ? this.endAngle >= this.startAngle && (this.endAngle -= 2 * Math.PI) : this.endAngle <= this.startAngle && (this.endAngle += 2 * Math.PI);
10220
10220
  } else if (e.center && e.radius !== void 0 && e.startOctant !== void 0 && e.octantCount !== void 0 && e.isClockwise !== void 0) {
10221
- this.center = e.center.clone(), this.radius = e.radius, this.isClockwise = e.isClockwise, this.startAngle = e.startOctant * gn;
10222
- const r = (e.octantCount === 0 ? 8 : e.octantCount) * gn;
10221
+ this.center = e.center.clone(), this.radius = e.radius, this.isClockwise = e.isClockwise, this.startAngle = e.startOctant * vn;
10222
+ const r = (e.octantCount === 0 ? 8 : e.octantCount) * vn;
10223
10223
  this.endAngle = this.startAngle + (this.isClockwise ? -r : r), this.start = this.center.clone().add(
10224
10224
  new z(
10225
10225
  this.radius * Math.cos(this.startAngle),
@@ -10256,7 +10256,7 @@ class Ze {
10256
10256
  ), r;
10257
10257
  }
10258
10258
  }
10259
- let Pt = class ya {
10259
+ let Pt = class xa {
10260
10260
  constructor(e, r = []) {
10261
10261
  this.lastPoint = e, this.polylines = r;
10262
10262
  }
@@ -10280,7 +10280,7 @@ let Pt = class ya {
10280
10280
  */
10281
10281
  offset(e, r = !0) {
10282
10282
  var n, a;
10283
- return r ? new ya(
10283
+ return r ? new xa(
10284
10284
  (n = this.lastPoint) == null ? void 0 : n.clone().add(e),
10285
10285
  this.polylines.map((s) => s.map((i) => i.clone().add(e)))
10286
10286
  ) : ((a = this.lastPoint) == null || a.add(e), this.polylines.forEach((s) => s.forEach((i) => i.add(e))), this);
@@ -10313,8 +10313,8 @@ let Pt = class ya {
10313
10313
  return `<svg width="100%" height="100%" viewBox="${s}" preserveAspectRatio="xMidYMid meet">${i}</svg>`;
10314
10314
  }
10315
10315
  };
10316
- const dl = Math.PI / 18, vn = 12;
10317
- let gl = class {
10316
+ const gl = Math.PI / 18, mn = 12;
10317
+ let vl = class {
10318
10318
  constructor(e) {
10319
10319
  this.shapeCache = /* @__PURE__ */ new Map(), this.shapeData = /* @__PURE__ */ new Map(), this.fontData = e;
10320
10320
  }
@@ -10340,11 +10340,11 @@ let gl = class {
10340
10340
  const s = this.fontData.content.data;
10341
10341
  let i;
10342
10342
  if (!this.shapeData.has(e) && s[e]) {
10343
- const o = s[e], u = vn / this.fontData.content.baseUp;
10343
+ const o = s[e], u = mn / this.fontData.content.baseUp;
10344
10344
  i = this.parseShape(o, u), this.shapeData.set(e, i);
10345
10345
  }
10346
10346
  if (this.shapeData.has(e)) {
10347
- const o = r / vn, u = this.shapeData.get(e);
10347
+ const o = r / mn, u = this.shapeData.get(e);
10348
10348
  i = new Pt(
10349
10349
  (n = u.lastPoint) == null ? void 0 : n.clone().multiply(o),
10350
10350
  u.polylines.map((l) => l.map((h) => h.clone().multiply(o)))
@@ -10548,7 +10548,7 @@ let gl = class {
10548
10548
  let c = h & 7;
10549
10549
  c === 0 && (c = 8), i !== 0 && c--;
10550
10550
  const p = Math.PI / 4;
10551
- let d = p * c, v = dl, y = 1;
10551
+ let d = p * c, v = gl, y = 1;
10552
10552
  h < 0 && (v = -v, d = -d, y = -1);
10553
10553
  let m = p * f, b = m + d;
10554
10554
  m += p * s / 256 * y, b += p * i / 256 * y;
@@ -10703,7 +10703,7 @@ let gl = class {
10703
10703
  return o.add(r), o;
10704
10704
  }
10705
10705
  };
10706
- class vl {
10706
+ class ml {
10707
10707
  /**
10708
10708
  * Creates a new ShxFont instance.
10709
10709
  * @param data - Either raw binary data of the SHX font file (ArrayBuffer) or pre-parsed font data (ShxFontData)
@@ -10711,14 +10711,14 @@ class vl {
10711
10711
  */
10712
10712
  constructor(e) {
10713
10713
  if (e instanceof ArrayBuffer) {
10714
- const r = new J(e), n = new ll().parse(r), a = pl.createParser(n.fontType).parse(r);
10714
+ const r = new J(e), n = new hl().parse(r), a = dl.createParser(n.fontType).parse(r);
10715
10715
  this.fontData = {
10716
10716
  header: n,
10717
10717
  content: a
10718
10718
  };
10719
10719
  } else
10720
10720
  this.fontData = e;
10721
- this.shapeParser = new gl(this.fontData);
10721
+ this.shapeParser = new vl(this.fontData);
10722
10722
  }
10723
10723
  /**
10724
10724
  * Return true if this font contains glyph of the specified character. Otherwise, return false.
@@ -10745,7 +10745,7 @@ class vl {
10745
10745
  this.shapeParser.release();
10746
10746
  }
10747
10747
  }
10748
- class pr extends kn {
10748
+ class pr extends Fn {
10749
10749
  /**
10750
10750
  * Creates a new instance of ShxTextShape
10751
10751
  * @param char - The character this shape represents
@@ -10791,9 +10791,9 @@ class pr extends kn {
10791
10791
  return e;
10792
10792
  }
10793
10793
  }
10794
- class mn extends Sn {
10794
+ class yn extends kn {
10795
10795
  constructor(e) {
10796
- super(), this.type = "shx", this.font = new vl(e), this.data = this.font.fontData;
10796
+ super(), this.type = "shx", this.font = new ml(e), this.data = this.font.fontData;
10797
10797
  }
10798
10798
  /**
10799
10799
  * Return true if this font contains glyph of the specified character. Otherwise, return false.
@@ -10874,9 +10874,9 @@ class Se {
10874
10874
  */
10875
10875
  createFont(e) {
10876
10876
  if (e.type === "shx")
10877
- return new mn(e.data);
10877
+ return new yn(e.data);
10878
10878
  if (e.type === "mesh")
10879
- return new dn(e.data);
10879
+ return new gn(e.data);
10880
10880
  throw new Error("Unsupported font data type");
10881
10881
  }
10882
10882
  /**
@@ -10889,11 +10889,11 @@ class Se {
10889
10889
  * @throws {Error} If the file type is not supported
10890
10890
  */
10891
10891
  createFontFromBuffer(e, r) {
10892
- const n = Da(e).toLowerCase();
10892
+ const n = Ga(e).toLowerCase();
10893
10893
  if (n === "shx")
10894
- return new mn(r);
10894
+ return new yn(r);
10895
10895
  if (["ttf", "otf", "woff"].includes(n))
10896
- return new dn(r);
10896
+ return new gn(r);
10897
10897
  throw new Error(`Unsupported font file type: ${n}`);
10898
10898
  }
10899
10899
  }
@@ -10901,10 +10901,10 @@ class ke {
10901
10901
  constructor() {
10902
10902
  this.fontMapping = {}, this.fontMap = /* @__PURE__ */ new Map(), this.unsupportedChars = {}, this.missedFonts = {}, this.enableFontCache = !0, this.defaultFont = "simsun", this.events = {
10903
10903
  /** Event triggered when a font cannot be found */
10904
- fontNotFound: new yr(),
10904
+ fontNotFound: new xr(),
10905
10905
  /** Event triggered when a font is successfully loaded */
10906
- fontLoaded: new yr()
10907
- }, this.loader = new L.FileLoader(), this.loader.setResponseType("arraybuffer"), this.fileNames = [], this.fontLoader = new ml();
10906
+ fontLoaded: new xr()
10907
+ }, this.loader = new L.FileLoader(), this.loader.setResponseType("arraybuffer"), this.fileNames = [], this.fontLoader = new yl();
10908
10908
  }
10909
10909
  /**
10910
10910
  * Gets the singleton instance of the FontManager
@@ -10936,13 +10936,20 @@ class ke {
10936
10936
  async getAvaiableFonts() {
10937
10937
  return await this.fontLoader.getAvaiableFonts();
10938
10938
  }
10939
+ /**
10940
+ * Loads the default font
10941
+ * @returns Promise that resolves to the font load statuses
10942
+ */
10943
+ async loadDefaultFont() {
10944
+ return await this.loadFontsByNames(this.defaultFont);
10945
+ }
10939
10946
  /**
10940
10947
  * Loads the specified fonts from font names
10941
10948
  * @param names - Font names to load.
10942
10949
  * @returns Promise that resolves to an array of font load statuses
10943
10950
  */
10944
10951
  async loadFontsByNames(e) {
10945
- return e = Array.isArray(e) ? e : [e], await this.fontLoader.load(e);
10952
+ return e = Array.isArray(e) ? e : [e], (await this.fontLoader.load(e))[0];
10946
10953
  }
10947
10954
  /**
10948
10955
  * Loads the specified fonts from URLs
@@ -10959,7 +10966,7 @@ class ke {
10959
10966
  const n = [];
10960
10967
  return await Promise.allSettled(r).then((a) => {
10961
10968
  a.forEach((s, i) => {
10962
- const o = s.status === "fulfilled", u = e[i], l = Tr(u.toLowerCase());
10969
+ const o = s.status === "fulfilled", u = e[i], l = wr(u.toLowerCase());
10963
10970
  n.push({
10964
10971
  fontName: l,
10965
10972
  url: u,
@@ -11075,10 +11082,10 @@ class ke {
11075
11082
  * @param url - The URL of the font file to load
11076
11083
  */
11077
11084
  async loadFont(e) {
11078
- const r = wn(e);
11085
+ const r = Cn(e);
11079
11086
  if (!r)
11080
11087
  throw new Error(`Invalid font url: ${e}`);
11081
- const n = Tr(e).toLowerCase(), a = await ze.instance.get(n);
11088
+ const n = wr(e).toLowerCase(), a = await ze.instance.get(n);
11082
11089
  if (a) {
11083
11090
  const s = Se.instance.createFont(a);
11084
11091
  this.fontMap.set(n, s);
@@ -11134,7 +11141,7 @@ class ke {
11134
11141
  return e == null ? (this.fontMap.clear(), !0) : this.fontMap.delete(e);
11135
11142
  }
11136
11143
  }
11137
- class ml {
11144
+ class yl {
11138
11145
  /**
11139
11146
  * Creates a new instance of DefaultFontLoader
11140
11147
  */
@@ -11207,11 +11214,11 @@ class ml {
11207
11214
  }
11208
11215
  }
11209
11216
  var Be = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.WORD = 1] = "WORD", t[t.STACK = 2] = "STACK", t[t.SPACE = 3] = "SPACE", t[t.NBSP = 4] = "NBSP", t[t.TABULATOR = 5] = "TABULATOR", t[t.NEW_PARAGRAPH = 6] = "NEW_PARAGRAPH", t[t.NEW_COLUMN = 7] = "NEW_COLUMN", t[t.WRAP_AT_DIMLINE = 8] = "WRAP_AT_DIMLINE", t[t.PROPERTIES_CHANGED = 9] = "PROPERTIES_CHANGED", t))(Be || {}), He = /* @__PURE__ */ ((t) => (t[t.BOTTOM = 0] = "BOTTOM", t[t.MIDDLE = 1] = "MIDDLE", t[t.TOP = 2] = "TOP", t))(He || {}), se = /* @__PURE__ */ ((t) => (t[t.DEFAULT = 0] = "DEFAULT", t[t.LEFT = 1] = "LEFT", t[t.RIGHT = 2] = "RIGHT", t[t.CENTER = 3] = "CENTER", t[t.JUSTIFIED = 4] = "JUSTIFIED", t[t.DISTRIBUTED = 5] = "DISTRIBUTED", t))(se || {});
11210
- const yl = {
11217
+ const xl = {
11211
11218
  c: "Ø",
11212
11219
  d: "°",
11213
11220
  p: "±"
11214
- }, xl = {
11221
+ }, bl = {
11215
11222
  l: 1,
11216
11223
  r: 2,
11217
11224
  c: 3,
@@ -11219,14 +11226,14 @@ const yl = {
11219
11226
  d: 5
11220
11227
  /* DISTRIBUTED */
11221
11228
  };
11222
- function bl(t, e = !1) {
11229
+ function Sl(t, e = !1) {
11223
11230
  const r = /* @__PURE__ */ new Set(), n = /\\[fF](.*?)[;|]/g;
11224
11231
  return [...t.matchAll(n)].forEach((a) => {
11225
11232
  let s = a[1].toLowerCase();
11226
11233
  e && (s = s.replace(/\.(ttf|otf|woff|shx)$/, "")), r.add(s);
11227
11234
  }), r;
11228
11235
  }
11229
- class Sl {
11236
+ class kl {
11230
11237
  /**
11231
11238
  * Creates a new ContextStack with an initial context.
11232
11239
  * @param initial The initial MTextContext to use as the base of the stack.
@@ -11278,7 +11285,7 @@ class Sl {
11278
11285
  this.stack[this.stack.length - 1] = e;
11279
11286
  }
11280
11287
  }
11281
- class kl {
11288
+ class Fl {
11282
11289
  /**
11283
11290
  * Creates a new MTextParser instance
11284
11291
  * @param content - The MText content to parse
@@ -11288,7 +11295,7 @@ class kl {
11288
11295
  constructor(e, r, n = {}) {
11289
11296
  this.continueStroke = !1, this.inStackContext = !1, this.scanner = new Bt(e);
11290
11297
  const a = r ?? new tt();
11291
- this.ctxStack = new Sl(a), this.yieldPropertyCommands = n.yieldPropertyCommands ?? !1, this.resetParagraphParameters = n.resetParagraphParameters ?? !1;
11298
+ this.ctxStack = new kl(a), this.yieldPropertyCommands = n.yieldPropertyCommands ?? !1, this.resetParagraphParameters = n.resetParagraphParameters ?? !1;
11292
11299
  }
11293
11300
  /**
11294
11301
  * Decode multi-byte character from hex code
@@ -11643,7 +11650,7 @@ class kl {
11643
11650
  break;
11644
11651
  case "q": {
11645
11652
  const l = r.get();
11646
- for (i = xl[l] || 0; r.peek() === ","; )
11653
+ for (i = bl[l] || 0; r.peek() === ","; )
11647
11654
  r.consume(1);
11648
11655
  break;
11649
11656
  }
@@ -11781,7 +11788,7 @@ class kl {
11781
11788
  continue;
11782
11789
  }
11783
11790
  if (o === "%" && this.scanner.peek(1) === "%") {
11784
- const l = this.scanner.peek(2).toLowerCase(), h = yl[l];
11791
+ const l = this.scanner.peek(2).toLowerCase(), h = xl[l];
11785
11792
  if (h) {
11786
11793
  this.scanner.consume(3), s += h;
11787
11794
  continue;
@@ -11840,15 +11847,15 @@ class kl {
11840
11847
  for (; ; ) {
11841
11848
  const [a, s] = n.call(this);
11842
11849
  if (a) {
11843
- if (yield new It(a, this.ctxStack.current.copy(), s), a === 6 && this.resetParagraphParameters) {
11850
+ if (yield new Dt(a, this.ctxStack.current.copy(), s), a === 6 && this.resetParagraphParameters) {
11844
11851
  const i = this.ctxStack.current, o = r(i);
11845
- this.yieldPropertyCommands && Object.keys(o).length > 0 && (yield new It(9, i.copy(), {
11852
+ this.yieldPropertyCommands && Object.keys(o).length > 0 && (yield new Dt(9, i.copy(), {
11846
11853
  command: void 0,
11847
11854
  changes: { paragraph: o },
11848
11855
  depth: this.ctxStack.depth
11849
11856
  }));
11850
11857
  }
11851
- e && (yield new It(e, this.ctxStack.current.copy(), null), e = null);
11858
+ e && (yield new Dt(e, this.ctxStack.current.copy(), null), e = null);
11852
11859
  } else
11853
11860
  break;
11854
11861
  }
@@ -12225,7 +12232,7 @@ class tt {
12225
12232
  return e._stroke = this._stroke, e.continueStroke = this.continueStroke, e.color = this.color.copy(), e.align = this.align, e.fontFace = { ...this.fontFace }, e._capHeight = { ...this._capHeight }, e._widthFactor = { ...this._widthFactor }, e._charTrackingFactor = { ...this._charTrackingFactor }, e.oblique = this.oblique, e.paragraph = { ...this.paragraph }, e;
12226
12233
  }
12227
12234
  }
12228
- class It {
12235
+ class Dt {
12229
12236
  /**
12230
12237
  * Create a new MText token
12231
12238
  * @param type - The token type
@@ -12236,8 +12243,8 @@ class It {
12236
12243
  this.type = e, this.ctx = r, this.data = n;
12237
12244
  }
12238
12245
  }
12239
- var je = /* @__PURE__ */ ((t) => (t[t.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", t[t.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", t[t.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", t[t.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", t[t.BY_STYLE = 5] = "BY_STYLE", t))(je || {}), Fl = /* @__PURE__ */ ((t) => (t[t.TopLeft = 1] = "TopLeft", t[t.TopCenter = 2] = "TopCenter", t[t.TopRight = 3] = "TopRight", t[t.MiddleLeft = 4] = "MiddleLeft", t[t.MiddleCenter = 5] = "MiddleCenter", t[t.MiddleRight = 6] = "MiddleRight", t[t.BottomLeft = 7] = "BottomLeft", t[t.BottomCenter = 8] = "BottomCenter", t[t.BottomRight = 9] = "BottomRight", t))(Fl || {});
12240
- const Tl = /* @__PURE__ */ new L.Vector3(), wl = 1.666666;
12246
+ var je = /* @__PURE__ */ ((t) => (t[t.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", t[t.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", t[t.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", t[t.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", t[t.BY_STYLE = 5] = "BY_STYLE", t))(je || {}), Tl = /* @__PURE__ */ ((t) => (t[t.TopLeft = 1] = "TopLeft", t[t.TopCenter = 2] = "TopCenter", t[t.TopRight = 3] = "TopRight", t[t.MiddleLeft = 4] = "MiddleLeft", t[t.MiddleCenter = 5] = "MiddleCenter", t[t.MiddleRight = 6] = "MiddleRight", t[t.BottomLeft = 7] = "BottomLeft", t[t.BottomCenter = 8] = "BottomCenter", t[t.BottomRight = 9] = "BottomRight", t))(Tl || {});
12247
+ const wl = /* @__PURE__ */ new L.Vector3(), Cl = 1.666666;
12241
12248
  class gr extends tt {
12242
12249
  /**
12243
12250
  * Creates a new RenderContext instance with optional initial values.
@@ -12260,7 +12267,7 @@ class gr extends tt {
12260
12267
  * @returns The color as a hex number (0xRRGGBB)
12261
12268
  */
12262
12269
  getColorAsHex() {
12263
- return this.color.isRgb && this.color.rgbValue !== null ? this.color.rgbValue : this.color.isAci && this.color.aci !== null ? Na(this.color.aci) : 16777215;
12270
+ return this.color.isRgb && this.color.rgbValue !== null ? this.color.rgbValue : this.color.isAci && this.color.aci !== null ? _a(this.color.aci) : 16777215;
12264
12271
  }
12265
12272
  /**
12266
12273
  * Set the color using a hex value for rendering purposes.
@@ -12271,7 +12278,7 @@ class gr extends tt {
12271
12278
  this.color.rgb = [r, n, a];
12272
12279
  }
12273
12280
  }
12274
- class Cl {
12281
+ class El {
12275
12282
  /**
12276
12283
  * Construct one instance of this class and initialize some properties with default values.
12277
12284
  * @param style Input text style
@@ -12370,7 +12377,7 @@ class Cl {
12370
12377
  * The height of current line of texts
12371
12378
  */
12372
12379
  get currentLineHeight() {
12373
- return this.defaultLineSpaceFactor * this.currentFontSize * wl + this.currentMaxFontSize;
12380
+ return this.defaultLineSpaceFactor * this.currentFontSize * Cl + this.currentMaxFontSize;
12374
12381
  }
12375
12382
  /**
12376
12383
  * The maximum font size in current line. Characters in one line may have different font and font
@@ -12773,7 +12780,7 @@ class Cl {
12773
12780
  if (e.forEach((n, a) => {
12774
12781
  n.boundingBox || n.computeBoundingBox(), a === 0 ? r = n.boundingBox : r.union(n.boundingBox);
12775
12782
  }), r) {
12776
- const n = r.getSize(Tl);
12783
+ const n = r.getSize(wl);
12777
12784
  switch (this.currentHorizontalAlignment) {
12778
12785
  case se.LEFT:
12779
12786
  e.forEach(
@@ -12833,7 +12840,7 @@ class Cl {
12833
12840
  const n = new L.Group(), a = this._currentContext.getColorAsHex(), s = e.filter((o) => o instanceof L.ExtrudeGeometry);
12834
12841
  if (s.length > 0) {
12835
12842
  const o = new L.Mesh();
12836
- o.geometry = cn(s), o.material = this.styleManager.getMeshBasicMaterial(a), o.userData.bboxIntersectionCheck = !0, n.add(o);
12843
+ o.geometry = fn(s), o.material = this.styleManager.getMeshBasicMaterial(a), o.userData.bboxIntersectionCheck = !0, n.add(o);
12837
12844
  }
12838
12845
  const i = [
12839
12846
  ...r,
@@ -12841,7 +12848,7 @@ class Cl {
12841
12848
  ];
12842
12849
  if (i.length > 0) {
12843
12850
  const o = new L.LineSegments();
12844
- o.geometry = cn(i), o.material = this.styleManager.getLineBasicMaterial(a), o.userData.bboxIntersectionCheck = !0, n.add(o);
12851
+ o.geometry = fn(i), o.material = this.styleManager.getLineBasicMaterial(a), o.userData.bboxIntersectionCheck = !0, n.add(o);
12845
12852
  }
12846
12853
  return n.children.length === 1 ? n.children[0] : n;
12847
12854
  }
@@ -12852,8 +12859,8 @@ class Cl {
12852
12859
  this._currentContext.fontSize = e * this._currentContext.fontScaleFactor * this._currentContext.fontSizeScaleFactor, this.calcuateLineParams();
12853
12860
  }
12854
12861
  }
12855
- const Dt = /* @__PURE__ */ new L.Vector3(), Oe = /* @__PURE__ */ new L.Vector3(), Gt = /* @__PURE__ */ new L.Vector3(), Nt = /* @__PURE__ */ new L.Quaternion(), _t = /* @__PURE__ */ new L.Matrix4(), yn = /* @__PURE__ */ new L.Matrix4(), xn = /* @__PURE__ */ new L.Vector3(1, 0, 0);
12856
- class El extends L.Object3D {
12862
+ const It = /* @__PURE__ */ new L.Vector3(), Oe = /* @__PURE__ */ new L.Vector3(), Gt = /* @__PURE__ */ new L.Vector3(), Nt = /* @__PURE__ */ new L.Quaternion(), _t = /* @__PURE__ */ new L.Matrix4(), xn = /* @__PURE__ */ new L.Matrix4(), bn = /* @__PURE__ */ new L.Vector3(1, 0, 0);
12863
+ class vr extends L.Object3D {
12857
12864
  /**
12858
12865
  * Extracts all unique font names used in an MText string.
12859
12866
  * This function searches for font commands in the format \f{fontname}| or \f{fontname}; and returns a set of unique font names.
@@ -12870,7 +12877,7 @@ class El extends L.Object3D {
12870
12877
  * ```
12871
12878
  */
12872
12879
  static getFonts(e, r = !1) {
12873
- return bl(e, r);
12880
+ return Sl(e, r);
12874
12881
  }
12875
12882
  /**
12876
12883
  * Creates a new instance of MText.
@@ -12887,9 +12894,7 @@ class El extends L.Object3D {
12887
12894
  super(), this._style = r, this._styleManager = n, this._fontManager = a, this._colorSettings = {
12888
12895
  byLayerColor: s.byLayerColor,
12889
12896
  byBlockColor: s.byBlockColor
12890
- }, this._box = new L.Box3(), this._boxes = [];
12891
- const i = this.loadMText(e, r);
12892
- i && (this.getBoxes(i, this._boxes), this._boxes.forEach((o) => this.box.union(o)), this.add(i));
12897
+ }, this._box = new L.Box3(), this._boxes = [], this._mtextData = e;
12893
12898
  }
12894
12899
  /**
12895
12900
  * Gets the font manager instance associated with this MText object.
@@ -12898,6 +12903,19 @@ class El extends L.Object3D {
12898
12903
  get fontManager() {
12899
12904
  return this._fontManager;
12900
12905
  }
12906
+ /**
12907
+ * Draw the MText object. This method loads required fonts on demand and builds the object graph.
12908
+ *
12909
+ * @param isLoadFontsOnDemand - The flag indicate whether to load required fonts on demand
12910
+ */
12911
+ async draw(e = !0) {
12912
+ if (e) {
12913
+ const n = Array.from(vr.getFonts(this._mtextData.text || "", !0));
12914
+ n.length > 0 && await this._fontManager.loadFontsByNames(n);
12915
+ }
12916
+ const r = this.loadMText(this._mtextData, this._style);
12917
+ r && (this.getBoxes(r, this._boxes), this._boxes.forEach((n) => this.box.union(n)), this.add(r));
12918
+ }
12901
12919
  /**
12902
12920
  * Gets the style manager instance associated with this MText object.
12903
12921
  * @returns The StyleManager instance
@@ -12931,11 +12949,11 @@ class El extends L.Object3D {
12931
12949
  */
12932
12950
  raycast(e, r) {
12933
12951
  this._boxes.forEach((n) => {
12934
- if (e.ray.intersectBox(n, Dt)) {
12935
- const a = e.ray.origin.distanceTo(Dt);
12952
+ if (e.ray.intersectBox(n, It)) {
12953
+ const a = e.ray.origin.distanceTo(It);
12936
12954
  r.push({
12937
12955
  distance: a,
12938
- point: Dt.clone(),
12956
+ point: It.clone(),
12939
12957
  object: this,
12940
12958
  face: null,
12941
12959
  faceIndex: void 0,
@@ -12966,12 +12984,12 @@ class El extends L.Object3D {
12966
12984
  });
12967
12985
  let o = e.rotation || 0;
12968
12986
  if (e.directionVector) {
12969
- const l = e.directionVector, h = new L.Vector3(l.x, l.y, l.z), f = h.clone().cross(xn), c = xn.angleTo(h);
12987
+ const l = e.directionVector, h = new L.Vector3(l.x, l.y, l.z), f = h.clone().cross(bn), c = bn.angleTo(h);
12970
12988
  o = f.z > 0 ? -c : c;
12971
12989
  }
12972
12990
  n.matrix.compose(Oe, Nt, Gt);
12973
12991
  const u = e.position ? Oe.clone().sub(e.position) : Oe;
12974
- return _t.makeTranslation(-u.x, -u.y, 0), yn.makeRotationZ(o), n.matrix.multiply(_t), n.matrix.multiply(yn), n.matrix.multiply(_t.invert()), n.matrix.decompose(n.position, n.quaternion, n.scale), n;
12992
+ return _t.makeTranslation(-u.x, -u.y, 0), xn.makeRotationZ(o), n.matrix.multiply(_t), n.matrix.multiply(xn), n.matrix.multiply(_t.invert()), n.matrix.decompose(n.position, n.quaternion, n.scale), n;
12975
12993
  }
12976
12994
  /**
12977
12995
  * Creates a group of text elements from MText data.
@@ -13004,12 +13022,12 @@ class El extends L.Object3D {
13004
13022
  value: e.widthFactor ?? 1,
13005
13023
  isRelative: !0
13006
13024
  }, h.align = s, h.paragraph.align = a;
13007
- const f = new Cl(
13025
+ const f = new El(
13008
13026
  r,
13009
13027
  this.styleManager,
13010
13028
  this.fontManager,
13011
13029
  l
13012
- ), p = new kl(e.text, h, {
13030
+ ), p = new Fl(e.text, h, {
13013
13031
  resetParagraphParameters: !0,
13014
13032
  yieldPropertyCommands: !0
13015
13033
  }).parse();
@@ -13092,12 +13110,12 @@ class Ol {
13092
13110
  })), this.lineBasicMaterials[e];
13093
13111
  }
13094
13112
  }
13095
- class bn {
13096
- constructor(e = {}) {
13113
+ class Sn {
13114
+ constructor(e = { isLoadFontsOnDemand: !0 }) {
13097
13115
  this.workers = [], this.inFlightPerWorker = [], this.pendingRequests = /* @__PURE__ */ new Map(), this.requestId = 0, this.readyPromise = null, this.poolSize = e.poolSize ?? Math.max(
13098
13116
  1,
13099
13117
  navigator.hardwareConcurrency ? Math.min(4, navigator.hardwareConcurrency) : 2
13100
- );
13118
+ ), this.isLoadFontsOnDemand = !!e.isLoadFontsOnDemand;
13101
13119
  const r = e.workerUrl ?? "./mtext-renderer-worker.js";
13102
13120
  for (let n = 0; n < this.poolSize; n++) {
13103
13121
  const a = new Worker(new URL(r, import.meta.url), {
@@ -13187,7 +13205,8 @@ class bn {
13187
13205
  const a = await this.sendMessage("render", {
13188
13206
  mtextContent: e,
13189
13207
  textStyle: r,
13190
- colorSettings: n
13208
+ colorSettings: n,
13209
+ isLoadFontsOnDemand: this.isLoadFontsOnDemand
13191
13210
  });
13192
13211
  return this.reconstructMText(a);
13193
13212
  }
@@ -13334,14 +13353,14 @@ class Ul {
13334
13353
  byLayerColor: 16777215,
13335
13354
  byBlockColor: 16777215
13336
13355
  }) {
13337
- const a = new El(
13356
+ const a = new vr(
13338
13357
  e,
13339
13358
  r,
13340
13359
  this.styleManager,
13341
13360
  this.fontManager,
13342
13361
  n
13343
13362
  );
13344
- return a.updateMatrixWorld(!0), a;
13363
+ return await a.draw(), a.updateMatrixWorld(!0), a;
13345
13364
  }
13346
13365
  /**
13347
13366
  * Load fonts in the main thread
@@ -13360,7 +13379,7 @@ class Ul {
13360
13379
  }
13361
13380
  class Pl {
13362
13381
  constructor(e = "main") {
13363
- this.workerManager = null, this.currentMode = e, this.mainThreadRenderer = new Ul(), this.adapter = this.mainThreadRenderer, e === "worker" && (this.workerManager = new bn({}), this.adapter = this.workerManager);
13382
+ this.workerManager = null, this.currentMode = e, this.mainThreadRenderer = new Ul(), this.adapter = this.mainThreadRenderer, e === "worker" && (this.workerManager = new Sn({}), this.adapter = this.workerManager);
13364
13383
  }
13365
13384
  /**
13366
13385
  * Switch between main thread and worker rendering modes
@@ -13368,7 +13387,7 @@ class Pl {
13368
13387
  * @param workerConfig Configuration options for WebWorkerRenderer when switching to worker mode
13369
13388
  */
13370
13389
  switchMode(e, r) {
13371
- this.currentMode !== e && (this.currentMode === "worker" && this.workerManager && (this.workerManager.terminate(), this.workerManager = null), this.currentMode = e, e === "worker" ? (this.workerManager = new bn(r || {}), this.adapter = this.workerManager) : this.adapter = this.mainThreadRenderer);
13390
+ this.currentMode !== e && (this.currentMode === "worker" && this.workerManager && (this.workerManager.terminate(), this.workerManager = null), this.currentMode = e, e === "worker" ? (this.workerManager = new Sn(r || {}), this.adapter = this.workerManager) : this.adapter = this.mainThreadRenderer);
13372
13391
  }
13373
13392
  /**
13374
13393
  * Get current rendering mode
@@ -13405,17 +13424,17 @@ class Pl {
13405
13424
  }
13406
13425
  }
13407
13426
  export {
13408
- Sn as BaseFont,
13409
- kn as BaseTextShape,
13410
- ml as DefaultFontLoader,
13411
- yr as EventManager,
13427
+ kn as BaseFont,
13428
+ Fn as BaseTextShape,
13429
+ yl as DefaultFontLoader,
13430
+ xr as EventManager,
13412
13431
  Se as FontFactory,
13413
13432
  ke as FontManager,
13414
- El as MText,
13415
- Fl as MTextAttachmentPoint,
13433
+ vr as MText,
13434
+ Tl as MTextAttachmentPoint,
13416
13435
  je as MTextFlowDirection,
13417
13436
  Ul as MainThreadRenderer,
13418
13437
  Ol as StyleManager,
13419
13438
  Pl as UnifiedRenderer,
13420
- bn as WebWorkerRenderer
13439
+ Sn as WebWorkerRenderer
13421
13440
  };