@unmade/text-renderer 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { svgPathProperties as zn } from "svg-path-properties";
2
- import { DOMParser as _n } from "linkedom";
1
+ import { svgPathProperties as Wn } from "svg-path-properties";
2
+ import { DOMParser as zn } from "linkedom";
3
3
  import "node:path";
4
- import Vn from "@thednp/dommatrix";
4
+ import _n from "@thednp/dommatrix";
5
5
  String.prototype.codePointAt || (function() {
6
6
  var e = (function() {
7
7
  try {
@@ -32,10 +32,10 @@ var Gr = 0, Ht = -3;
32
32
  function Ne() {
33
33
  this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
34
34
  }
35
- function qn(e, r) {
35
+ function Vn(e, r) {
36
36
  this.source = e, this.sourceIndex = 0, this.tag = 0, this.bitcount = 0, this.dest = r, this.destLen = 0, this.ltree = new Ne(), this.dtree = new Ne();
37
37
  }
38
- var Wt = new Ne(), zt = new Ne(), Nr = new Uint8Array(30), Hr = new Uint16Array(30), _t = new Uint8Array(30), Vt = new Uint16Array(30), Xn = new Uint8Array([
38
+ var Wt = new Ne(), zt = new Ne(), Nr = new Uint8Array(30), Hr = new Uint16Array(30), _t = new Uint8Array(30), Vt = new Uint16Array(30), qn = new Uint8Array([
39
39
  16,
40
40
  17,
41
41
  18,
@@ -65,7 +65,7 @@ function qt(e, r, t, n) {
65
65
  for (s = n, a = 0; a < 30; ++a)
66
66
  r[a] = s, s += 1 << e[a];
67
67
  }
68
- function Yn(e, r) {
68
+ function Xn(e, r) {
69
69
  var t;
70
70
  for (t = 0; t < 7; ++t)
71
71
  e.table[t] = 0;
@@ -94,7 +94,7 @@ function dr(e, r, t, n) {
94
94
  for (a = 0; a < n; ++a)
95
95
  r[t + a] && (e.trans[Kr[r[t + a]]++] = a);
96
96
  }
97
- function $n(e) {
97
+ function Yn(e) {
98
98
  e.bitcount-- || (e.tag = e.source[e.sourceIndex++], e.bitcount = 7);
99
99
  var r = e.tag & 1;
100
100
  return e.tag >>>= 1, r;
@@ -116,13 +116,13 @@ function wr(e, r) {
116
116
  while (n >= 0);
117
117
  return e.tag = s, e.bitcount -= a, r.trans[t + n];
118
118
  }
119
- function Zn(e, r, t) {
119
+ function $n(e, r, t) {
120
120
  var n, a, s, o, u, i;
121
121
  for (n = ie(e, 5, 257), a = ie(e, 5, 1), s = ie(e, 4, 4), o = 0; o < 19; ++o)
122
122
  oe[o] = 0;
123
123
  for (o = 0; o < s; ++o) {
124
124
  var l = ie(e, 3, 0);
125
- oe[Xn[o]] = l;
125
+ oe[qn[o]] = l;
126
126
  }
127
127
  for (dr(Qr, oe, 0, 19), u = 0; u < n + a; ) {
128
128
  var f = wr(e, Qr);
@@ -161,7 +161,7 @@ function jr(e, r, t) {
161
161
  }
162
162
  }
163
163
  }
164
- function Qn(e) {
164
+ function Zn(e) {
165
165
  for (var r, t, n; e.bitcount > 8; )
166
166
  e.sourceIndex--, e.bitcount -= 8;
167
167
  if (r = e.source[e.sourceIndex + 1], r = 256 * r + e.source[e.sourceIndex], t = e.source[e.sourceIndex + 3], t = 256 * t + e.source[e.sourceIndex + 2], r !== (~t & 65535))
@@ -170,18 +170,18 @@ function Qn(e) {
170
170
  e.dest[e.destLen++] = e.source[e.sourceIndex++];
171
171
  return e.bitcount = 0, Gr;
172
172
  }
173
- function Kn(e, r) {
174
- var t = new qn(e, r), n, a, s;
173
+ function Qn(e, r) {
174
+ var t = new Vn(e, r), n, a, s;
175
175
  do {
176
- switch (n = $n(t), a = ie(t, 2, 0), a) {
176
+ switch (n = Yn(t), a = ie(t, 2, 0), a) {
177
177
  case 0:
178
- s = Qn(t);
178
+ s = Zn(t);
179
179
  break;
180
180
  case 1:
181
181
  s = jr(t, Wt, zt);
182
182
  break;
183
183
  case 2:
184
- Zn(t, t.ltree, t.dtree), s = jr(t, t.ltree, t.dtree);
184
+ $n(t, t.ltree, t.dtree), s = jr(t, t.ltree, t.dtree);
185
185
  break;
186
186
  default:
187
187
  s = Ht;
@@ -191,12 +191,12 @@ function Kn(e, r) {
191
191
  } while (!n);
192
192
  return t.destLen < t.dest.length ? typeof t.dest.slice == "function" ? t.dest.slice(0, t.destLen) : t.dest.subarray(0, t.destLen) : t.dest;
193
193
  }
194
- Yn(Wt, zt);
194
+ Xn(Wt, zt);
195
195
  qt(Nr, Hr, 4, 3);
196
196
  qt(_t, Vt, 2, 1);
197
197
  Nr[28] = 0;
198
198
  Hr[28] = 258;
199
- var jn = Kn;
199
+ var Kn = Qn;
200
200
  function we(e, r, t, n, a) {
201
201
  return Math.pow(1 - a, 3) * e + 3 * Math.pow(1 - a, 2) * a * r + 3 * (1 - a) * Math.pow(a, 2) * t + Math.pow(a, 3) * n;
202
202
  }
@@ -535,7 +535,7 @@ Oe.MACSTRING = function(e, r, t, n) {
535
535
  return s;
536
536
  }
537
537
  };
538
- var Ze = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), Qe, Jn = function(e) {
538
+ var Ze = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), Qe, jn = function(e) {
539
539
  if (!Qe) {
540
540
  Qe = {};
541
541
  for (var r in Er)
@@ -557,7 +557,7 @@ var Ze = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), Qe, Jn =
557
557
  }
558
558
  };
559
559
  b.MACSTRING = function(e, r) {
560
- var t = Jn(r);
560
+ var t = jn(r);
561
561
  if (t !== void 0) {
562
562
  for (var n = [], a = 0; a < e.length; a++) {
563
563
  var s = e.charCodeAt(a);
@@ -575,12 +575,12 @@ O.MACSTRING = function(e, r) {
575
575
  function Or(e) {
576
576
  return e >= -128 && e <= 127;
577
577
  }
578
- function ea(e, r, t) {
578
+ function Jn(e, r, t) {
579
579
  for (var n = 0, a = e.length; r < a && n < 64 && e[r] === 0; )
580
580
  ++r, ++n;
581
581
  return t.push(128 | n - 1), r;
582
582
  }
583
- function ra(e, r, t) {
583
+ function ea(e, r, t) {
584
584
  for (var n = 0, a = e.length, s = r; s < a && n < 64; ) {
585
585
  var o = e[s];
586
586
  if (!Or(o) || o === 0 && s + 1 < a && e[s + 1] === 0)
@@ -592,7 +592,7 @@ function ra(e, r, t) {
592
592
  t.push(e[u] + 256 & 255);
593
593
  return s;
594
594
  }
595
- function ta(e, r, t) {
595
+ function ra(e, r, t) {
596
596
  for (var n = 0, a = e.length, s = r; s < a && n < 64; ) {
597
597
  var o = e[s];
598
598
  if (o === 0 || Or(o) && s + 1 < a && Or(e[s + 1]))
@@ -609,7 +609,7 @@ function ta(e, r, t) {
609
609
  b.VARDELTAS = function(e) {
610
610
  for (var r = 0, t = []; r < e.length; ) {
611
611
  var n = e[r];
612
- n === 0 ? r = ea(e, r, t) : n >= -128 && n <= 127 ? r = ra(e, r, t) : r = ta(e, r, t);
612
+ n === 0 ? r = Jn(e, r, t) : n >= -128 && n <= 127 ? r = ea(e, r, t) : r = ra(e, r, t);
613
613
  }
614
614
  return t;
615
615
  };
@@ -855,7 +855,7 @@ function tt(e, r) {
855
855
  function or(e, r) {
856
856
  return e.getUint16(r, !1);
857
857
  }
858
- function na(e, r) {
858
+ function ta(e, r) {
859
859
  return e.getInt16(r, !1);
860
860
  }
861
861
  function Wr(e, r) {
@@ -865,27 +865,27 @@ function Yt(e, r) {
865
865
  var t = e.getInt16(r, !1), n = e.getUint16(r + 2, !1);
866
866
  return t + n / 65535;
867
867
  }
868
- function aa(e, r) {
868
+ function na(e, r) {
869
869
  for (var t = "", n = r; n < r + 4; n += 1)
870
870
  t += String.fromCharCode(e.getInt8(n));
871
871
  return t;
872
872
  }
873
- function sa(e, r, t) {
873
+ function aa(e, r, t) {
874
874
  for (var n = 0, a = 0; a < t; a += 1)
875
875
  n <<= 8, n += e.getUint8(r + a);
876
876
  return n;
877
877
  }
878
- function oa(e, r, t) {
878
+ function sa(e, r, t) {
879
879
  for (var n = [], a = r; a < t; a += 1)
880
880
  n.push(e.getUint8(a));
881
881
  return n;
882
882
  }
883
- function ia(e) {
883
+ function oa(e) {
884
884
  for (var r = "", t = 0; t < e.length; t += 1)
885
885
  r += String.fromCharCode(e[t]);
886
886
  return r;
887
887
  }
888
- var ua = {
888
+ var ia = {
889
889
  byte: 1,
890
890
  uShort: 2,
891
891
  short: 2,
@@ -949,7 +949,7 @@ v.prototype.parseVersion = function(e) {
949
949
  return this.relativeOffset += 4, e === void 0 && (e = 4096), r + t / e / 10;
950
950
  };
951
951
  v.prototype.skip = function(e, r) {
952
- r === void 0 && (r = 1), this.relativeOffset += ua[e] * r;
952
+ r === void 0 && (r = 1), this.relativeOffset += ia[e] * r;
953
953
  };
954
954
  v.prototype.parseULongList = function(e) {
955
955
  e === void 0 && (e = this.parseULong());
@@ -1187,16 +1187,16 @@ var k = {
1187
1187
  getCard8: tt,
1188
1188
  getUShort: or,
1189
1189
  getCard16: or,
1190
- getShort: na,
1190
+ getShort: ta,
1191
1191
  getULong: Wr,
1192
1192
  getFixed: Yt,
1193
- getTag: aa,
1194
- getOffset: sa,
1195
- getBytes: oa,
1196
- bytesToString: ia,
1193
+ getTag: na,
1194
+ getOffset: aa,
1195
+ getBytes: sa,
1196
+ bytesToString: oa,
1197
1197
  Parser: v
1198
1198
  };
1199
- function la(e, r) {
1199
+ function ua(e, r) {
1200
1200
  r.parseUShort(), e.length = r.parseULong(), e.language = r.parseULong();
1201
1201
  var t;
1202
1202
  e.groupCount = t = r.parseULong(), e.glyphIndexMap = {};
@@ -1204,7 +1204,7 @@ function la(e, r) {
1204
1204
  for (var a = r.parseULong(), s = r.parseULong(), o = r.parseULong(), u = a; u <= s; u += 1)
1205
1205
  e.glyphIndexMap[u] = o, o++;
1206
1206
  }
1207
- function fa(e, r, t, n, a) {
1207
+ function la(e, r, t, n, a) {
1208
1208
  e.length = r.parseUShort(), e.language = r.parseUShort();
1209
1209
  var s;
1210
1210
  e.segCount = s = r.parseUShort() >> 1, r.skip("uShort", 3), e.glyphIndexMap = {};
@@ -1212,7 +1212,7 @@ function fa(e, r, t, n, a) {
1212
1212
  for (var p = void 0, h = o.parseUShort(), d = u.parseUShort(), g = i.parseShort(), m = l.parseUShort(), x = d; x <= h; x += 1)
1213
1213
  m !== 0 ? (f = l.offset + l.relativeOffset - 2, f += m, f += (x - d) * 2, p = k.getUShort(t, f), p !== 0 && (p = p + g & 65535)) : p = x + g & 65535, e.glyphIndexMap[x] = p;
1214
1214
  }
1215
- function pa(e, r) {
1215
+ function fa(e, r) {
1216
1216
  var t = {};
1217
1217
  t.version = k.getUShort(e, r), E.argument(t.version === 0, "cmap table version should be 0."), t.numTables = k.getUShort(e, r + 2);
1218
1218
  for (var n = -1, a = t.numTables - 1; a >= 0; a -= 1) {
@@ -1226,14 +1226,14 @@ function pa(e, r) {
1226
1226
  throw new Error("No valid cmap sub-tables found.");
1227
1227
  var u = new k.Parser(e, r + n);
1228
1228
  if (t.format = u.parseUShort(), t.format === 12)
1229
- la(t, u);
1229
+ ua(t, u);
1230
1230
  else if (t.format === 4)
1231
- fa(t, u, e, r, n);
1231
+ la(t, u, e, r, n);
1232
1232
  else
1233
1233
  throw new Error("Only format 4 and 12 cmap tables are supported (found format " + t.format + ").");
1234
1234
  return t;
1235
1235
  }
1236
- function ca(e, r, t) {
1236
+ function pa(e, r, t) {
1237
1237
  e.segments.push({
1238
1238
  end: r,
1239
1239
  start: r,
@@ -1242,7 +1242,7 @@ function ca(e, r, t) {
1242
1242
  glyphIndex: t
1243
1243
  });
1244
1244
  }
1245
- function ha(e) {
1245
+ function ca(e) {
1246
1246
  e.segments.push({
1247
1247
  end: 65535,
1248
1248
  start: 65535,
@@ -1250,7 +1250,7 @@ function ha(e) {
1250
1250
  offset: 0
1251
1251
  });
1252
1252
  }
1253
- function va(e) {
1253
+ function ha(e) {
1254
1254
  var r = !0, t;
1255
1255
  for (t = e.length - 1; t > 0; t -= 1) {
1256
1256
  var n = e.get(t);
@@ -1286,12 +1286,12 @@ function va(e) {
1286
1286
  var s = new S.Table("cmap", a);
1287
1287
  for (s.segments = [], t = 0; t < e.length; t += 1) {
1288
1288
  for (var o = e.get(t), u = 0; u < o.unicodes.length; u += 1)
1289
- ca(s, o.unicodes[u], t);
1289
+ pa(s, o.unicodes[u], t);
1290
1290
  s.segments = s.segments.sort(function(U, y) {
1291
1291
  return U.start - y.start;
1292
1292
  });
1293
1293
  }
1294
- ha(s);
1294
+ ca(s);
1295
1295
  var i = s.segments.length, l = 0, f = [], c = [], p = [], h = [], d = [], g = [];
1296
1296
  for (t = 0; t < i; t += 1) {
1297
1297
  var m = s.segments[t];
@@ -1312,7 +1312,7 @@ function va(e) {
1312
1312
  }
1313
1313
  return s;
1314
1314
  }
1315
- var $t = { parse: pa, make: va }, er = [
1315
+ var $t = { parse: fa, make: ha }, er = [
1316
1316
  ".notdef",
1317
1317
  "space",
1318
1318
  "exclam",
@@ -1704,7 +1704,7 @@ var $t = { parse: pa, make: va }, er = [
1704
1704
  "Regular",
1705
1705
  "Roman",
1706
1706
  "Semibold"
1707
- ], da = [
1707
+ ], va = [
1708
1708
  "",
1709
1709
  "",
1710
1710
  "",
@@ -1957,7 +1957,7 @@ var $t = { parse: pa, make: va }, er = [
1957
1957
  "oslash",
1958
1958
  "oe",
1959
1959
  "germandbls"
1960
- ], ga = [
1960
+ ], da = [
1961
1961
  "",
1962
1962
  "",
1963
1963
  "",
@@ -2528,7 +2528,7 @@ zr.prototype.nameToGlyphIndex = function(e) {
2528
2528
  zr.prototype.glyphIndexToName = function(e) {
2529
2529
  return this.names[e];
2530
2530
  };
2531
- function ma(e) {
2531
+ function ga(e) {
2532
2532
  for (var r, t = e.tables.cmap.glyphIndexMap, n = Object.keys(t), a = 0; a < n.length; a += 1) {
2533
2533
  var s = n[a], o = t[s];
2534
2534
  r = e.glyphs.get(o), r.addUnicode(parseInt(s));
@@ -2536,7 +2536,7 @@ function ma(e) {
2536
2536
  for (var u = 0; u < e.glyphs.length; u += 1)
2537
2537
  r = e.glyphs.get(u), e.cffEncoding ? e.isCIDFont ? r.name = "gid" + u : r.name = e.cffEncoding.charset[u] : e.glyphNames.names && (r.name = e.glyphNames.glyphIndexToName(u));
2538
2538
  }
2539
- function ya(e) {
2539
+ function ma(e) {
2540
2540
  e._IndexToUnicodeMap = {};
2541
2541
  for (var r = e.tables.cmap.glyphIndexMap, t = Object.keys(r), n = 0; n < t.length; n += 1) {
2542
2542
  var a = t[n], s = r[a];
@@ -2545,14 +2545,14 @@ function ya(e) {
2545
2545
  } : e._IndexToUnicodeMap[s].unicodes.push(parseInt(a));
2546
2546
  }
2547
2547
  }
2548
- function xa(e, r) {
2549
- r.lowMemory ? ya(e) : ma(e);
2548
+ function ya(e, r) {
2549
+ r.lowMemory ? ma(e) : ga(e);
2550
2550
  }
2551
- function ba(e, r, t, n, a) {
2551
+ function xa(e, r, t, n, a) {
2552
2552
  e.beginPath(), e.moveTo(r, t), e.lineTo(n, a), e.stroke();
2553
2553
  }
2554
- var Te = { line: ba };
2555
- function Sa(e, r) {
2554
+ var Te = { line: xa };
2555
+ function ba(e, r) {
2556
2556
  var t = r || new X();
2557
2557
  return {
2558
2558
  configurable: !0,
@@ -2568,7 +2568,7 @@ function K(e) {
2568
2568
  this.bindConstructorValues(e);
2569
2569
  }
2570
2570
  K.prototype.bindConstructorValues = function(e) {
2571
- this.index = e.index || 0, this.name = e.name || null, this.unicode = e.unicode || void 0, this.unicodes = e.unicodes || e.unicode !== void 0 ? [e.unicode] : [], "xMin" in e && (this.xMin = e.xMin), "yMin" in e && (this.yMin = e.yMin), "xMax" in e && (this.xMax = e.xMax), "yMax" in e && (this.yMax = e.yMax), "advanceWidth" in e && (this.advanceWidth = e.advanceWidth), Object.defineProperty(this, "path", Sa(this, e.path));
2571
+ this.index = e.index || 0, this.name = e.name || null, this.unicode = e.unicode || void 0, this.unicodes = e.unicodes || e.unicode !== void 0 ? [e.unicode] : [], "xMin" in e && (this.xMin = e.xMin), "yMin" in e && (this.yMin = e.yMin), "xMax" in e && (this.xMax = e.xMax), "yMax" in e && (this.yMax = e.yMax), "advanceWidth" in e && (this.advanceWidth = e.advanceWidth), Object.defineProperty(this, "path", ba(this, e.path));
2572
2572
  };
2573
2573
  K.prototype.addUnicode = function(e) {
2574
2574
  this.unicodes.length === 0 && (this.unicode = e), this.unicodes.push(e);
@@ -2687,10 +2687,10 @@ _r.prototype.get = function(e) {
2687
2687
  _r.prototype.push = function(e, r) {
2688
2688
  this.glyphs[e] = r, this.length++;
2689
2689
  };
2690
- function Ta(e, r) {
2690
+ function Sa(e, r) {
2691
2691
  return new K({ index: r, font: e });
2692
2692
  }
2693
- function ka(e, r, t, n, a, s) {
2693
+ function Ta(e, r, t, n, a, s) {
2694
2694
  return function() {
2695
2695
  var o = new K({ index: r, font: e });
2696
2696
  return o.path = function() {
@@ -2700,7 +2700,7 @@ function ka(e, r, t, n, a, s) {
2700
2700
  }, je(o, "xMin", "_xMin"), je(o, "xMax", "_xMax"), je(o, "yMin", "_yMin"), je(o, "yMax", "_yMax"), o;
2701
2701
  };
2702
2702
  }
2703
- function Fa(e, r, t, n) {
2703
+ function ka(e, r, t, n) {
2704
2704
  return function() {
2705
2705
  var a = new K({ index: r, font: e });
2706
2706
  return a.path = function() {
@@ -2709,7 +2709,7 @@ function Fa(e, r, t, n) {
2709
2709
  }, a;
2710
2710
  };
2711
2711
  }
2712
- var le = { GlyphSet: _r, glyphLoader: Ta, ttfGlyphLoader: ka, cffGlyphLoader: Fa };
2712
+ var le = { GlyphSet: _r, glyphLoader: Sa, ttfGlyphLoader: Ta, cffGlyphLoader: ka };
2713
2713
  function Kt(e, r) {
2714
2714
  if (e === r)
2715
2715
  return !0;
@@ -2743,7 +2743,7 @@ function ye(e, r, t) {
2743
2743
  }
2744
2744
  return { objects: a, startOffset: r, endOffset: u };
2745
2745
  }
2746
- function Ua(e, r) {
2746
+ function Fa(e, r) {
2747
2747
  var t = [], n = k.getCard16(e, r), a, s;
2748
2748
  if (n !== 0) {
2749
2749
  var o = k.getByte(e, r + 2);
@@ -2755,7 +2755,7 @@ function Ua(e, r) {
2755
2755
  s = r + 2;
2756
2756
  return { offsets: t, startOffset: r, endOffset: s };
2757
2757
  }
2758
- function Ca(e, r, t, n, a) {
2758
+ function Ua(e, r, t, n, a) {
2759
2759
  var s = k.getCard16(t, n), o = 0;
2760
2760
  if (s !== 0) {
2761
2761
  var u = k.getByte(t, n + 2);
@@ -2764,7 +2764,7 @@ function Ca(e, r, t, n, a) {
2764
2764
  var i = k.getBytes(t, o + r[e], o + r[e + 1]);
2765
2765
  return i;
2766
2766
  }
2767
- function wa(e) {
2767
+ function Ca(e) {
2768
2768
  for (var r = "", t = 15, n = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"]; ; ) {
2769
2769
  var a = e.parseByte(), s = a >> 4, o = a & 15;
2770
2770
  if (s === t || (r += n[s], o === t))
@@ -2773,14 +2773,14 @@ function wa(e) {
2773
2773
  }
2774
2774
  return parseFloat(r);
2775
2775
  }
2776
- function Ea(e, r) {
2776
+ function wa(e, r) {
2777
2777
  var t, n, a, s;
2778
2778
  if (r === 28)
2779
2779
  return t = e.parseByte(), n = e.parseByte(), t << 8 | n;
2780
2780
  if (r === 29)
2781
2781
  return t = e.parseByte(), n = e.parseByte(), a = e.parseByte(), s = e.parseByte(), t << 24 | n << 16 | a << 8 | s;
2782
2782
  if (r === 30)
2783
- return wa(e);
2783
+ return Ca(e);
2784
2784
  if (r >= 32 && r <= 246)
2785
2785
  return r - 139;
2786
2786
  if (r >= 247 && r <= 250)
@@ -2789,7 +2789,7 @@ function Ea(e, r) {
2789
2789
  return t = e.parseByte(), -(r - 251) * 256 - t - 108;
2790
2790
  throw new Error("Invalid b0 " + r);
2791
2791
  }
2792
- function Oa(e) {
2792
+ function Ea(e) {
2793
2793
  for (var r = {}, t = 0; t < e.length; t += 1) {
2794
2794
  var n = e[t][0], a = e[t][1], s = void 0;
2795
2795
  if (a.length === 1 ? s = a[0] : s = a, r.hasOwnProperty(n) && !isNaN(r[n]))
@@ -2803,9 +2803,9 @@ function jt(e, r, t) {
2803
2803
  var n = new k.Parser(e, r), a = [], s = [];
2804
2804
  for (t = t !== void 0 ? t : e.length; n.relativeOffset < t; ) {
2805
2805
  var o = n.parseByte();
2806
- o <= 21 ? (o === 12 && (o = 1200 + n.parseByte()), a.push([o, s]), s = []) : s.push(Ea(n, o));
2806
+ o <= 21 ? (o === 12 && (o = 1200 + n.parseByte()), a.push([o, s]), s = []) : s.push(wa(n, o));
2807
2807
  }
2808
- return Oa(a);
2808
+ return Ea(a);
2809
2809
  }
2810
2810
  function Ge(e, r) {
2811
2811
  return r <= 390 ? r = er[r] : r = e[r - 391], r;
@@ -2824,7 +2824,7 @@ function Jt(e, r, t) {
2824
2824
  }
2825
2825
  return n;
2826
2826
  }
2827
- function La(e, r) {
2827
+ function Oa(e, r) {
2828
2828
  var t = {};
2829
2829
  return t.formatMajor = k.getCard8(e, r), t.formatMinor = k.getCard8(e, r + 1), t.size = k.getCard8(e, r + 2), t.offsetSize = k.getCard8(e, r + 3), t.startOffset = r, t.endOffset = r + 4, t;
2830
2830
  }
@@ -2869,7 +2869,7 @@ var en = [
2869
2869
  { name: "defaultWidthX", op: 20, type: "number", value: 0 },
2870
2870
  { name: "nominalWidthX", op: 21, type: "number", value: 0 }
2871
2871
  ];
2872
- function Ra(e, r) {
2872
+ function La(e, r) {
2873
2873
  var t = jt(e, 0, e.byteLength);
2874
2874
  return Jt(t, en, r);
2875
2875
  }
@@ -2879,7 +2879,7 @@ function tn(e, r, t, n) {
2879
2879
  }
2880
2880
  function at(e, r, t, n) {
2881
2881
  for (var a = [], s = 0; s < t.length; s += 1) {
2882
- var o = new DataView(new Uint8Array(t[s]).buffer), u = Ra(o, n);
2882
+ var o = new DataView(new Uint8Array(t[s]).buffer), u = La(o, n);
2883
2883
  u._subrs = [], u._subrsBias = 0, u._defaultWidthX = 0, u._nominalWidthX = 0;
2884
2884
  var i = u.private[0], l = u.private[1];
2885
2885
  if (i !== 0 && l !== 0) {
@@ -2894,7 +2894,7 @@ function at(e, r, t, n) {
2894
2894
  }
2895
2895
  return a;
2896
2896
  }
2897
- function Da(e, r, t, n) {
2897
+ function Ra(e, r, t, n) {
2898
2898
  var a, s, o = new k.Parser(e, r);
2899
2899
  t -= 1;
2900
2900
  var u = [".notdef"], i = o.parseCard8();
@@ -2917,7 +2917,7 @@ function Da(e, r, t, n) {
2917
2917
  throw new Error("Unknown charset format " + i);
2918
2918
  return u;
2919
2919
  }
2920
- function Aa(e, r, t) {
2920
+ function Da(e, r, t) {
2921
2921
  var n, a = {}, s = new k.Parser(e, r), o = s.parseCard8();
2922
2922
  if (o === 0)
2923
2923
  for (var u = s.parseCard8(), i = 0; i < u; i += 1)
@@ -3058,7 +3058,7 @@ function st(e, r, t) {
3058
3058
  }
3059
3059
  return C(t), r.advanceWidth = L, u;
3060
3060
  }
3061
- function Ba(e, r, t, n) {
3061
+ function Aa(e, r, t, n) {
3062
3062
  var a = [], s, o = new k.Parser(e, r), u = o.parseCard8();
3063
3063
  if (u === 0)
3064
3064
  for (var i = 0; i < t; i++) {
@@ -3085,9 +3085,9 @@ function Ba(e, r, t, n) {
3085
3085
  throw new Error("CFF Table CID Font FDSelect table has unsupported format " + u);
3086
3086
  return a;
3087
3087
  }
3088
- function Ma(e, r, t, n) {
3088
+ function Ba(e, r, t, n) {
3089
3089
  t.tables.cff = {};
3090
- var a = La(e, r), s = ye(e, a.endOffset, k.bytesToString), o = ye(e, s.endOffset), u = ye(e, o.endOffset, k.bytesToString), i = ye(e, u.endOffset);
3090
+ var a = Oa(e, r), s = ye(e, a.endOffset, k.bytesToString), o = ye(e, s.endOffset), u = ye(e, o.endOffset, k.bytesToString), i = ye(e, u.endOffset);
3091
3091
  t.gsubrs = i.objects, t.gsubrsBias = Rr(t.gsubrs);
3092
3092
  var l = at(e, r, o.objects, u.objects);
3093
3093
  if (l.length !== 1)
@@ -3099,7 +3099,7 @@ function Ma(e, r, t, n) {
3099
3099
  throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
3100
3100
  c += r;
3101
3101
  var h = ye(e, c), d = at(e, r, h.objects, u.objects);
3102
- f._fdArray = d, p += r, f._fdSelect = Ba(e, p, t.numGlyphs, d.length);
3102
+ f._fdArray = d, p += r, f._fdSelect = Aa(e, p, t.numGlyphs, d.length);
3103
3103
  }
3104
3104
  var g = r + f.private[1], m = tn(e, g, f.private[0], u.objects);
3105
3105
  if (t.defaultWidthX = m.defaultWidthX, t.nominalWidthX = m.nominalWidthX, m.subrs !== 0) {
@@ -3108,11 +3108,11 @@ function Ma(e, r, t, n) {
3108
3108
  } else
3109
3109
  t.subrs = [], t.subrsBias = 0;
3110
3110
  var y;
3111
- n.lowMemory ? (y = Ua(e, r + f.charStrings), t.nGlyphs = y.offsets.length) : (y = ye(e, r + f.charStrings), t.nGlyphs = y.objects.length);
3112
- var L = Da(e, r + f.charset, t.nGlyphs, u.objects);
3113
- if (f.encoding === 0 ? t.cffEncoding = new ir(da, L) : f.encoding === 1 ? t.cffEncoding = new ir(ga, L) : t.cffEncoding = Aa(e, r + f.encoding, L), t.encoding = t.encoding || t.cffEncoding, t.glyphs = new le.GlyphSet(t), n.lowMemory)
3111
+ n.lowMemory ? (y = Fa(e, r + f.charStrings), t.nGlyphs = y.offsets.length) : (y = ye(e, r + f.charStrings), t.nGlyphs = y.objects.length);
3112
+ var L = Ra(e, r + f.charset, t.nGlyphs, u.objects);
3113
+ if (f.encoding === 0 ? t.cffEncoding = new ir(va, L) : f.encoding === 1 ? t.cffEncoding = new ir(da, L) : t.cffEncoding = Da(e, r + f.encoding, L), t.encoding = t.encoding || t.cffEncoding, t.glyphs = new le.GlyphSet(t), n.lowMemory)
3114
3114
  t._push = function(C) {
3115
- var F = Ca(C, y.offsets, e, r + f.charStrings);
3115
+ var F = Ua(C, y.offsets, e, r + f.charStrings);
3116
3116
  t.glyphs.push(C, le.cffGlyphLoader(t, C, st, F));
3117
3117
  };
3118
3118
  else
@@ -3125,7 +3125,7 @@ function nn(e, r) {
3125
3125
  var t, n = er.indexOf(e);
3126
3126
  return n >= 0 && (t = n), n = r.indexOf(e), n >= 0 ? t = n + er.length : (t = er.length + r.length, r.push(e)), t;
3127
3127
  }
3128
- function Ia() {
3128
+ function Ma() {
3129
3129
  return new S.Record("Header", [
3130
3130
  { name: "major", type: "Card8", value: 1 },
3131
3131
  { name: "minor", type: "Card8", value: 0 },
@@ -3133,7 +3133,7 @@ function Ia() {
3133
3133
  { name: "major", type: "Card8", value: 1 }
3134
3134
  ]);
3135
3135
  }
3136
- function Pa(e) {
3136
+ function Ia(e) {
3137
3137
  var r = new S.Record("Name INDEX", [
3138
3138
  { name: "names", type: "INDEX", value: [] }
3139
3139
  ]);
@@ -3161,7 +3161,7 @@ function it(e) {
3161
3161
  ]);
3162
3162
  return r.topDicts = [{ name: "topDict_0", type: "TABLE", value: e }], r;
3163
3163
  }
3164
- function Ga(e) {
3164
+ function Pa(e) {
3165
3165
  var r = new S.Record("String INDEX", [
3166
3166
  { name: "strings", type: "INDEX", value: [] }
3167
3167
  ]);
@@ -3170,12 +3170,12 @@ function Ga(e) {
3170
3170
  r.strings.push({ name: "string_" + t, type: "STRING", value: e[t] });
3171
3171
  return r;
3172
3172
  }
3173
- function Na() {
3173
+ function Ga() {
3174
3174
  return new S.Record("Global Subr INDEX", [
3175
3175
  { name: "subrs", type: "INDEX", value: [] }
3176
3176
  ]);
3177
3177
  }
3178
- function Ha(e, r) {
3178
+ function Na(e, r) {
3179
3179
  for (var t = new S.Record("Charsets", [
3180
3180
  { name: "format", type: "Card8", value: 0 }
3181
3181
  ]), n = 0; n < e.length; n += 1) {
@@ -3184,7 +3184,7 @@ function Ha(e, r) {
3184
3184
  }
3185
3185
  return t;
3186
3186
  }
3187
- function Wa(e) {
3187
+ function Ha(e) {
3188
3188
  var r = [], t = e.path;
3189
3189
  r.push({ name: "width", type: "NUMBER", value: e.advanceWidth });
3190
3190
  for (var n = 0, a = 0, s = 0; s < t.commands.length; s += 1) {
@@ -3212,22 +3212,22 @@ function Wa(e) {
3212
3212
  }
3213
3213
  return r.push({ name: "endchar", type: "OP", value: 14 }), r;
3214
3214
  }
3215
- function za(e) {
3215
+ function Wa(e) {
3216
3216
  for (var r = new S.Record("CharStrings INDEX", [
3217
3217
  { name: "charStrings", type: "INDEX", value: [] }
3218
3218
  ]), t = 0; t < e.length; t += 1) {
3219
- var n = e.get(t), a = Wa(n);
3219
+ var n = e.get(t), a = Ha(n);
3220
3220
  r.charStrings.push({ name: n.name, type: "CHARSTRING", value: a });
3221
3221
  }
3222
3222
  return r;
3223
3223
  }
3224
- function _a(e, r) {
3224
+ function za(e, r) {
3225
3225
  var t = new S.Record("Private DICT", [
3226
3226
  { name: "dict", type: "DICT", value: {} }
3227
3227
  ]);
3228
3228
  return t.dict = an(rn, e, r), t;
3229
3229
  }
3230
- function Va(e, r) {
3230
+ function _a(e, r) {
3231
3231
  for (var t = new S.Table("CFF ", [
3232
3232
  { name: "header", type: "RECORD" },
3233
3233
  { name: "nameIndex", type: "RECORD" },
@@ -3251,18 +3251,18 @@ function Va(e, r) {
3251
3251
  }, s = {}, o = [], u, i = 1; i < e.length; i += 1)
3252
3252
  u = e.get(i), o.push(u.name);
3253
3253
  var l = [];
3254
- t.header = Ia(), t.nameIndex = Pa([r.postScriptName]);
3254
+ t.header = Ma(), t.nameIndex = Ia([r.postScriptName]);
3255
3255
  var f = ot(a, l);
3256
- t.topDictIndex = it(f), t.globalSubrIndex = Na(), t.charsets = Ha(o, l), t.charStringsIndex = za(e), t.privateDict = _a(s, l), t.stringIndex = Ga(l);
3256
+ t.topDictIndex = it(f), t.globalSubrIndex = Ga(), t.charsets = Na(o, l), t.charStringsIndex = Wa(e), t.privateDict = za(s, l), t.stringIndex = Pa(l);
3257
3257
  var c = t.header.sizeOf() + t.nameIndex.sizeOf() + t.topDictIndex.sizeOf() + t.stringIndex.sizeOf() + t.globalSubrIndex.sizeOf();
3258
3258
  return a.charset = c, a.encoding = 0, a.charStrings = a.charset + t.charsets.sizeOf(), a.private[1] = a.charStrings + t.charStringsIndex.sizeOf(), f = ot(a, l), t.topDictIndex = it(f), t;
3259
3259
  }
3260
- var sn = { parse: Ma, make: Va };
3261
- function qa(e, r) {
3260
+ var sn = { parse: Ba, make: _a };
3261
+ function Va(e, r) {
3262
3262
  var t = {}, n = new k.Parser(e, r);
3263
3263
  return t.version = n.parseVersion(), t.fontRevision = Math.round(n.parseFixed() * 1e3) / 1e3, t.checkSumAdjustment = n.parseULong(), t.magicNumber = n.parseULong(), E.argument(t.magicNumber === 1594834165, "Font header has wrong magic number."), t.flags = n.parseUShort(), t.unitsPerEm = n.parseUShort(), t.created = n.parseLongDateTime(), t.modified = n.parseLongDateTime(), t.xMin = n.parseShort(), t.yMin = n.parseShort(), t.xMax = n.parseShort(), t.yMax = n.parseShort(), t.macStyle = n.parseUShort(), t.lowestRecPPEM = n.parseUShort(), t.fontDirectionHint = n.parseShort(), t.indexToLocFormat = n.parseShort(), t.glyphDataFormat = n.parseShort(), t;
3264
3264
  }
3265
- function Xa(e) {
3265
+ function qa(e) {
3266
3266
  var r = Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3) + 2082844800, t = r;
3267
3267
  return e.createdTimestamp && (t = e.createdTimestamp + 2082844800), new S.Table("head", [
3268
3268
  { name: "version", type: "FIXED", value: 65536 },
@@ -3284,12 +3284,12 @@ function Xa(e) {
3284
3284
  { name: "glyphDataFormat", type: "SHORT", value: 0 }
3285
3285
  ], e);
3286
3286
  }
3287
- var on = { parse: qa, make: Xa };
3288
- function Ya(e, r) {
3287
+ var on = { parse: Va, make: qa };
3288
+ function Xa(e, r) {
3289
3289
  var t = {}, n = new k.Parser(e, r);
3290
3290
  return t.version = n.parseVersion(), t.ascender = n.parseShort(), t.descender = n.parseShort(), t.lineGap = n.parseShort(), t.advanceWidthMax = n.parseUShort(), t.minLeftSideBearing = n.parseShort(), t.minRightSideBearing = n.parseShort(), t.xMaxExtent = n.parseShort(), t.caretSlopeRise = n.parseShort(), t.caretSlopeRun = n.parseShort(), t.caretOffset = n.parseShort(), n.relativeOffset += 8, t.metricDataFormat = n.parseShort(), t.numberOfHMetrics = n.parseUShort(), t;
3291
3291
  }
3292
- function $a(e) {
3292
+ function Ya(e) {
3293
3293
  return new S.Table("hhea", [
3294
3294
  { name: "version", type: "FIXED", value: 65536 },
3295
3295
  { name: "ascender", type: "FWORD", value: 0 },
@@ -3310,15 +3310,15 @@ function $a(e) {
3310
3310
  { name: "numberOfHMetrics", type: "USHORT", value: 0 }
3311
3311
  ], e);
3312
3312
  }
3313
- var un = { parse: Ya, make: $a };
3314
- function Za(e, r, t, n, a) {
3313
+ var un = { parse: Xa, make: Ya };
3314
+ function $a(e, r, t, n, a) {
3315
3315
  for (var s, o, u = new k.Parser(e, r), i = 0; i < n; i += 1) {
3316
3316
  i < t && (s = u.parseUShort(), o = u.parseShort());
3317
3317
  var l = a.get(i);
3318
3318
  l.advanceWidth = s, l.leftSideBearing = o;
3319
3319
  }
3320
3320
  }
3321
- function Qa(e, r, t, n, a) {
3321
+ function Za(e, r, t, n, a) {
3322
3322
  e._hmtxTableData = {};
3323
3323
  for (var s, o, u = new k.Parser(r, t), i = 0; i < a; i += 1)
3324
3324
  i < n && (s = u.parseUShort(), o = u.parseShort()), e._hmtxTableData[i] = {
@@ -3326,18 +3326,18 @@ function Qa(e, r, t, n, a) {
3326
3326
  leftSideBearing: o
3327
3327
  };
3328
3328
  }
3329
- function Ka(e, r, t, n, a, s, o) {
3330
- o.lowMemory ? Qa(e, r, t, n, a) : Za(r, t, n, a, s);
3329
+ function Qa(e, r, t, n, a, s, o) {
3330
+ o.lowMemory ? Za(e, r, t, n, a) : $a(r, t, n, a, s);
3331
3331
  }
3332
- function ja(e) {
3332
+ function Ka(e) {
3333
3333
  for (var r = new S.Table("hmtx", []), t = 0; t < e.length; t += 1) {
3334
3334
  var n = e.get(t), a = n.advanceWidth || 0, s = n.leftSideBearing || 0;
3335
3335
  r.fields.push({ name: "advanceWidth_" + t, type: "USHORT", value: a }), r.fields.push({ name: "leftSideBearing_" + t, type: "SHORT", value: s });
3336
3336
  }
3337
3337
  return r;
3338
3338
  }
3339
- var ln = { parse: Ka, make: ja };
3340
- function Ja(e) {
3339
+ var ln = { parse: Qa, make: Ka };
3340
+ function ja(e) {
3341
3341
  for (var r = new S.Table("ltag", [
3342
3342
  { name: "version", type: "ULONG", value: 1 },
3343
3343
  { name: "flags", type: "ULONG", value: 0 },
@@ -3348,7 +3348,7 @@ function Ja(e) {
3348
3348
  }
3349
3349
  return r.fields.push({ name: "stringPool", type: "CHARARRAY", value: t }), r;
3350
3350
  }
3351
- function es(e, r) {
3351
+ function Ja(e, r) {
3352
3352
  var t = new k.Parser(e, r), n = t.parseULong();
3353
3353
  E.argument(n === 1, "Unsupported ltag table version."), t.skip("uLong", 1);
3354
3354
  for (var a = t.parseULong(), s = [], o = 0; o < a; o++) {
@@ -3358,18 +3358,18 @@ function es(e, r) {
3358
3358
  }
3359
3359
  return s;
3360
3360
  }
3361
- var fn = { make: Ja, parse: es };
3362
- function rs(e, r) {
3361
+ var fn = { make: ja, parse: Ja };
3362
+ function es(e, r) {
3363
3363
  var t = {}, n = new k.Parser(e, r);
3364
3364
  return t.version = n.parseVersion(), t.numGlyphs = n.parseUShort(), t.version === 1 && (t.maxPoints = n.parseUShort(), t.maxContours = n.parseUShort(), t.maxCompositePoints = n.parseUShort(), t.maxCompositeContours = n.parseUShort(), t.maxZones = n.parseUShort(), t.maxTwilightPoints = n.parseUShort(), t.maxStorage = n.parseUShort(), t.maxFunctionDefs = n.parseUShort(), t.maxInstructionDefs = n.parseUShort(), t.maxStackElements = n.parseUShort(), t.maxSizeOfInstructions = n.parseUShort(), t.maxComponentElements = n.parseUShort(), t.maxComponentDepth = n.parseUShort()), t;
3365
3365
  }
3366
- function ts(e) {
3366
+ function rs(e) {
3367
3367
  return new S.Table("maxp", [
3368
3368
  { name: "version", type: "FIXED", value: 20480 },
3369
3369
  { name: "numGlyphs", type: "USHORT", value: e }
3370
3370
  ]);
3371
3371
  }
3372
- var pn = { parse: rs, make: ts }, cn = [
3372
+ var pn = { parse: es, make: rs }, cn = [
3373
3373
  "copyright",
3374
3374
  // 0
3375
3375
  "fontFamily",
@@ -3536,7 +3536,7 @@ var pn = { parse: rs, make: ts }, cn = [
3536
3536
  149: "kl",
3537
3537
  150: "az",
3538
3538
  151: "nn"
3539
- }, ns = {
3539
+ }, ts = {
3540
3540
  0: 0,
3541
3541
  // langEnglish → smRoman
3542
3542
  1: 0,
@@ -3989,7 +3989,7 @@ var pn = { parse: rs, make: ts }, cn = [
3989
3989
  1144: "ii",
3990
3990
  1130: "yo"
3991
3991
  };
3992
- function as(e, r, t) {
3992
+ function ns(e, r, t) {
3993
3993
  switch (e) {
3994
3994
  case 0:
3995
3995
  if (r === 65535)
@@ -4003,7 +4003,7 @@ function as(e, r, t) {
4003
4003
  return vn[r];
4004
4004
  }
4005
4005
  }
4006
- var Dr = "utf-16", ss = {
4006
+ var Dr = "utf-16", as = {
4007
4007
  0: "macintosh",
4008
4008
  // smRoman
4009
4009
  1: "x-mac-japanese",
@@ -4062,7 +4062,7 @@ var Dr = "utf-16", ss = {
4062
4062
  // smVietnamese
4063
4063
  31: "x-mac-extarabic"
4064
4064
  // smExtArabic
4065
- }, os = {
4065
+ }, ss = {
4066
4066
  15: "x-mac-icelandic",
4067
4067
  // langIcelandic
4068
4068
  17: "x-mac-turkish",
@@ -4099,16 +4099,16 @@ function dn(e, r, t) {
4099
4099
  case 0:
4100
4100
  return Dr;
4101
4101
  case 1:
4102
- return os[t] || ss[r];
4102
+ return ss[t] || as[r];
4103
4103
  case 3:
4104
4104
  if (r === 1 || r === 10)
4105
4105
  return Dr;
4106
4106
  break;
4107
4107
  }
4108
4108
  }
4109
- function is(e, r, t) {
4109
+ function os(e, r, t) {
4110
4110
  for (var n = {}, a = new k.Parser(e, r), s = a.parseUShort(), o = a.parseUShort(), u = a.offset + a.parseUShort(), i = 0; i < o; i++) {
4111
- var l = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = a.parseUShort(), h = cn[p] || p, d = a.parseUShort(), g = a.parseUShort(), m = as(l, c, t), x = dn(l, f, c);
4111
+ var l = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = a.parseUShort(), h = cn[p] || p, d = a.parseUShort(), g = a.parseUShort(), m = ns(l, c, t), x = dn(l, f, c);
4112
4112
  if (x !== void 0 && m !== void 0) {
4113
4113
  var U = void 0;
4114
4114
  if (x === Dr ? U = Oe.UTF16(e, u + g, d) : U = Oe.MACSTRING(e, u + g, d, x), U) {
@@ -4135,7 +4135,7 @@ function ut(e, r, t, n, a, s) {
4135
4135
  { name: "offset", type: "USHORT", value: s }
4136
4136
  ]);
4137
4137
  }
4138
- function us(e, r) {
4138
+ function is(e, r) {
4139
4139
  var t = e.length, n = r.length - t + 1;
4140
4140
  e:
4141
4141
  for (var a = 0; a < n; a++)
@@ -4148,7 +4148,7 @@ function us(e, r) {
4148
4148
  return -1;
4149
4149
  }
4150
4150
  function lt(e, r) {
4151
- var t = us(e, r);
4151
+ var t = is(e, r);
4152
4152
  if (t < 0) {
4153
4153
  t = r.length;
4154
4154
  for (var n = 0, a = e.length; n < a; ++n)
@@ -4156,7 +4156,7 @@ function lt(e, r) {
4156
4156
  }
4157
4157
  return t;
4158
4158
  }
4159
- function ls(e, r) {
4159
+ function us(e, r) {
4160
4160
  var t, n = [], a = {}, s = gr(cn);
4161
4161
  for (var o in e) {
4162
4162
  var u = s[o];
@@ -4168,7 +4168,7 @@ function ls(e, r) {
4168
4168
  t = n[p];
4169
4169
  var h = a[t];
4170
4170
  for (var d in h) {
4171
- var g = h[d], m = 1, x = i[d], U = ns[x], y = dn(m, U, x), L = b.MACSTRING(g, y);
4171
+ var g = h[d], m = 1, x = i[d], U = ts[x], y = dn(m, U, x), L = b.MACSTRING(g, y);
4172
4172
  L === void 0 && (m = 0, x = r.indexOf(d), x < 0 && (x = r.length, r.push(d)), U = 4, L = b.UTF16(g));
4173
4173
  var w = lt(L, c);
4174
4174
  f.push(ut(
@@ -4204,7 +4204,7 @@ function ls(e, r) {
4204
4204
  D.fields.push({ name: "record_" + R, type: "RECORD", value: f[R] });
4205
4205
  return D.fields.push({ name: "strings", type: "LITERAL", value: c }), D;
4206
4206
  }
4207
- var gn = { parse: is, make: ls }, Ar = [
4207
+ var gn = { parse: os, make: us }, Ar = [
4208
4208
  { begin: 0, end: 127 },
4209
4209
  // Basic Latin
4210
4210
  { begin: 128, end: 255 },
@@ -4452,7 +4452,7 @@ var gn = { parse: is, make: ls }, Ar = [
4452
4452
  { begin: 127024, end: 127135 }
4453
4453
  // Domino Tiles
4454
4454
  ];
4455
- function fs(e) {
4455
+ function ls(e) {
4456
4456
  for (var r = 0; r < Ar.length; r += 1) {
4457
4457
  var t = Ar[r];
4458
4458
  if (e >= t.begin && e < t.end)
@@ -4460,14 +4460,14 @@ function fs(e) {
4460
4460
  }
4461
4461
  return -1;
4462
4462
  }
4463
- function ps(e, r) {
4463
+ function fs(e, r) {
4464
4464
  var t = {}, n = new k.Parser(e, r);
4465
4465
  t.version = n.parseUShort(), t.xAvgCharWidth = n.parseShort(), t.usWeightClass = n.parseUShort(), t.usWidthClass = n.parseUShort(), t.fsType = n.parseUShort(), t.ySubscriptXSize = n.parseShort(), t.ySubscriptYSize = n.parseShort(), t.ySubscriptXOffset = n.parseShort(), t.ySubscriptYOffset = n.parseShort(), t.ySuperscriptXSize = n.parseShort(), t.ySuperscriptYSize = n.parseShort(), t.ySuperscriptXOffset = n.parseShort(), t.ySuperscriptYOffset = n.parseShort(), t.yStrikeoutSize = n.parseShort(), t.yStrikeoutPosition = n.parseShort(), t.sFamilyClass = n.parseShort(), t.panose = [];
4466
4466
  for (var a = 0; a < 10; a++)
4467
4467
  t.panose[a] = n.parseByte();
4468
4468
  return t.ulUnicodeRange1 = n.parseULong(), t.ulUnicodeRange2 = n.parseULong(), t.ulUnicodeRange3 = n.parseULong(), t.ulUnicodeRange4 = n.parseULong(), t.achVendID = String.fromCharCode(n.parseByte(), n.parseByte(), n.parseByte(), n.parseByte()), t.fsSelection = n.parseUShort(), t.usFirstCharIndex = n.parseUShort(), t.usLastCharIndex = n.parseUShort(), t.sTypoAscender = n.parseShort(), t.sTypoDescender = n.parseShort(), t.sTypoLineGap = n.parseShort(), t.usWinAscent = n.parseUShort(), t.usWinDescent = n.parseUShort(), t.version >= 1 && (t.ulCodePageRange1 = n.parseULong(), t.ulCodePageRange2 = n.parseULong()), t.version >= 2 && (t.sxHeight = n.parseShort(), t.sCapHeight = n.parseShort(), t.usDefaultChar = n.parseUShort(), t.usBreakChar = n.parseUShort(), t.usMaxContent = n.parseUShort()), t;
4469
4469
  }
4470
- function cs(e) {
4470
+ function ps(e) {
4471
4471
  return new S.Table("OS/2", [
4472
4472
  { name: "version", type: "USHORT", value: 3 },
4473
4473
  { name: "xAvgCharWidth", type: "SHORT", value: 0 },
@@ -4517,8 +4517,8 @@ function cs(e) {
4517
4517
  { name: "usMaxContext", type: "USHORT", value: 0 }
4518
4518
  ], e);
4519
4519
  }
4520
- var Br = { parse: ps, make: cs, unicodeRanges: Ar, getUnicodeRange: fs };
4521
- function hs(e, r) {
4520
+ var Br = { parse: fs, make: ps, unicodeRanges: Ar, getUnicodeRange: ls };
4521
+ function cs(e, r) {
4522
4522
  var t = {}, n = new k.Parser(e, r);
4523
4523
  switch (t.version = n.parseVersion(), t.italicAngle = n.parseFixed(), t.underlinePosition = n.parseShort(), t.underlineThickness = n.parseShort(), t.isFixedPitch = n.parseULong(), t.minMemType42 = n.parseULong(), t.maxMemType42 = n.parseULong(), t.minMemType1 = n.parseULong(), t.maxMemType1 = n.parseULong(), t.version) {
4524
4524
  case 1:
@@ -4543,7 +4543,7 @@ function hs(e, r) {
4543
4543
  }
4544
4544
  return t;
4545
4545
  }
4546
- function vs() {
4546
+ function hs() {
4547
4547
  return new S.Table("post", [
4548
4548
  { name: "version", type: "FIXED", value: 196608 },
4549
4549
  { name: "italicAngle", type: "FIXED", value: 0 },
@@ -4556,7 +4556,7 @@ function vs() {
4556
4556
  { name: "maxMemType1", type: "ULONG", value: 0 }
4557
4557
  ]);
4558
4558
  }
4559
- var mn = { parse: hs, make: vs }, ee = new Array(9);
4559
+ var mn = { parse: cs, make: hs }, ee = new Array(9);
4560
4560
  ee[1] = function() {
4561
4561
  var r = this.offset + this.relativeOffset, t = this.parseUShort();
4562
4562
  if (t === 1)
@@ -4704,7 +4704,7 @@ ee[8] = function() {
4704
4704
  substitutes: this.parseUShortList()
4705
4705
  };
4706
4706
  };
4707
- function ds(e, r) {
4707
+ function vs(e, r) {
4708
4708
  r = r || 0;
4709
4709
  var t = new v(e, r), n = t.parseVersion(1);
4710
4710
  return E.argument(n === 1 || n === 1.1, "Unsupported GSUB table version."), n === 1 ? {
@@ -4794,7 +4794,7 @@ Le[6] = function(r) {
4794
4794
  }
4795
4795
  E.assert(!1, "lookup type 6 format must be 1, 2 or 3.");
4796
4796
  };
4797
- function gs(e) {
4797
+ function ds(e) {
4798
4798
  return new S.Table("GSUB", [
4799
4799
  { name: "version", type: "ULONG", value: 65536 },
4800
4800
  { name: "scripts", type: "TABLE", value: new S.ScriptList(e.scripts) },
@@ -4802,8 +4802,8 @@ function gs(e) {
4802
4802
  { name: "lookups", type: "TABLE", value: new S.LookupList(e.lookups, Le) }
4803
4803
  ]);
4804
4804
  }
4805
- var yn = { parse: ds, make: gs };
4806
- function ms(e, r) {
4805
+ var yn = { parse: vs, make: ds };
4806
+ function gs(e, r) {
4807
4807
  var t = new k.Parser(e, r), n = t.parseULong();
4808
4808
  E.argument(n === 1, "Unsupported META table version."), t.parseULong(), t.parseULong();
4809
4809
  for (var a = t.parseULong(), s = {}, o = 0; o < a; o++) {
@@ -4812,7 +4812,7 @@ function ms(e, r) {
4812
4812
  }
4813
4813
  return s;
4814
4814
  }
4815
- function ys(e) {
4815
+ function ms(e) {
4816
4816
  var r = Object.keys(e).length, t = "", n = 16 + r * 12, a = new S.Table("meta", [
4817
4817
  { name: "version", type: "ULONG", value: 1 },
4818
4818
  { name: "flags", type: "ULONG", value: 0 },
@@ -4825,7 +4825,7 @@ function ys(e) {
4825
4825
  }
4826
4826
  return a.fields.push({ name: "stringPool", type: "CHARARRAY", value: t }), a;
4827
4827
  }
4828
- var xn = { parse: ms, make: ys };
4828
+ var xn = { parse: gs, make: ms };
4829
4829
  function ft(e) {
4830
4830
  return Math.log(e) / Math.log(2) | 0;
4831
4831
  }
@@ -4878,12 +4878,12 @@ function ct(e, r, t) {
4878
4878
  }
4879
4879
  return t;
4880
4880
  }
4881
- function xs(e) {
4881
+ function ys(e) {
4882
4882
  for (var r = 0, t = 0; t < e.length; t += 1)
4883
4883
  r += e[t];
4884
4884
  return r / e.length;
4885
4885
  }
4886
- function bs(e) {
4886
+ function xs(e) {
4887
4887
  for (var r = [], t = [], n = [], a = [], s = [], o = [], u = [], i, l = 0, f = 0, c = 0, p = 0, h = 0, d = 0; d < e.glyphs.length; d += 1) {
4888
4888
  var g = e.glyphs.get(d), m = g.unicode | 0;
4889
4889
  if (isNaN(g.advanceWidth))
@@ -4911,7 +4911,7 @@ function bs(e) {
4911
4911
  xMax: Math.max.apply(null, n),
4912
4912
  yMax: Math.max.apply(null, a),
4913
4913
  advanceWidthMax: Math.max.apply(null, s),
4914
- advanceWidthAvg: xs(s),
4914
+ advanceWidthAvg: ys(s),
4915
4915
  minLeftSideBearing: Math.min.apply(null, o),
4916
4916
  maxLeftSideBearing: Math.max.apply(null, o),
4917
4917
  minRightSideBearing: Math.min.apply(null, u)
@@ -4985,7 +4985,7 @@ function bs(e) {
4985
4985
  throw new Error("Could not find head table with checkSum to adjust.");
4986
4986
  return De;
4987
4987
  }
4988
- var Ss = { make: bn, fontToTable: bs, computeCheckSum: Vr };
4988
+ var bs = { make: bn, fontToTable: xs, computeCheckSum: Vr };
4989
4989
  function mr(e, r) {
4990
4990
  for (var t = 0, n = e.length - 1; t <= n; ) {
4991
4991
  var a = t + n >>> 1, s = e[a].tag;
@@ -5268,7 +5268,7 @@ Ve.prototype.getKerningTables = function(e, r) {
5268
5268
  function j(e) {
5269
5269
  _e.call(this, e, "gsub");
5270
5270
  }
5271
- function Ts(e, r) {
5271
+ function Ss(e, r) {
5272
5272
  var t = e.length;
5273
5273
  if (t !== r.length)
5274
5274
  return !1;
@@ -5398,7 +5398,7 @@ j.prototype.addLigature = function(e, r, t, n) {
5398
5398
  }, l = this.binSearch(s.coverage.glyphs, o);
5399
5399
  if (l >= 0) {
5400
5400
  for (var f = s.ligatureSets[l], c = 0; c < f.length; c++)
5401
- if (Ts(f[c].components, u))
5401
+ if (Ss(f[c].components, u))
5402
5402
  return;
5403
5403
  f.push(i);
5404
5404
  } else
@@ -5436,7 +5436,7 @@ j.prototype.add = function(e, r, t, n) {
5436
5436
  return r.by instanceof Array ? this.addMultiple(e, r, t, n) : this.addLigature(e, r, t, n);
5437
5437
  }
5438
5438
  };
5439
- function ks() {
5439
+ function Ts() {
5440
5440
  return typeof window < "u";
5441
5441
  }
5442
5442
  function Sn(e) {
@@ -5444,7 +5444,7 @@ function Sn(e) {
5444
5444
  t[n] = e[n];
5445
5445
  return r;
5446
5446
  }
5447
- function Fs(e) {
5447
+ function ks(e) {
5448
5448
  for (var r = new Buffer(e.byteLength), t = new Uint8Array(e), n = 0; n < r.length; ++n)
5449
5449
  r[n] = t[n];
5450
5450
  return r;
@@ -5522,7 +5522,7 @@ function yr(e, r) {
5522
5522
  }
5523
5523
  return t;
5524
5524
  }
5525
- function Us(e) {
5525
+ function Fs(e) {
5526
5526
  for (var r = [], t = [], n = 0; n < e.length; n += 1) {
5527
5527
  var a = e[n];
5528
5528
  t.push(a), a.lastPointOfContour && (r.push(t), t = []);
@@ -5533,7 +5533,7 @@ function kn(e) {
5533
5533
  var r = new X();
5534
5534
  if (!e)
5535
5535
  return r;
5536
- for (var t = Us(e), n = 0; n < t.length; ++n) {
5536
+ for (var t = Fs(e), n = 0; n < t.length; ++n) {
5537
5537
  var a = t[n], s = null, o = a[a.length - 1], u = a[0];
5538
5538
  if (o.onCurve)
5539
5539
  r.moveTo(o.x, o.y);
@@ -5580,45 +5580,45 @@ function Fn(e, r) {
5580
5580
  }
5581
5581
  return kn(r.points);
5582
5582
  }
5583
- function Cs(e, r, t, n) {
5583
+ function Us(e, r, t, n) {
5584
5584
  for (var a = new le.GlyphSet(n), s = 0; s < t.length - 1; s += 1) {
5585
5585
  var o = t[s], u = t[s + 1];
5586
5586
  o !== u ? a.push(s, le.ttfGlyphLoader(n, s, Tn, e, r + o, Fn)) : a.push(s, le.glyphLoader(n, s));
5587
5587
  }
5588
5588
  return a;
5589
5589
  }
5590
- function ws(e, r, t, n) {
5590
+ function Cs(e, r, t, n) {
5591
5591
  var a = new le.GlyphSet(n);
5592
5592
  return n._push = function(s) {
5593
5593
  var o = t[s], u = t[s + 1];
5594
5594
  o !== u ? a.push(s, le.ttfGlyphLoader(n, s, Tn, e, r + o, Fn)) : a.push(s, le.glyphLoader(n, s));
5595
5595
  }, a;
5596
5596
  }
5597
- function Es(e, r, t, n, a) {
5598
- return a.lowMemory ? ws(e, r, t, n) : Cs(e, r, t, n);
5597
+ function ws(e, r, t, n, a) {
5598
+ return a.lowMemory ? Cs(e, r, t, n) : Us(e, r, t, n);
5599
5599
  }
5600
- var Un = { getPath: kn, parse: Es }, Cn, Ue, wn, Mr;
5600
+ var Un = { getPath: kn, parse: ws }, Cn, Ue, wn, Mr;
5601
5601
  function En(e) {
5602
5602
  this.font = e, this.getCommands = function(r) {
5603
5603
  return Un.getPath(r).commands;
5604
5604
  }, this._fpgmState = this._prepState = void 0, this._errorState = 0;
5605
5605
  }
5606
- function Os(e) {
5606
+ function Es(e) {
5607
5607
  return e;
5608
5608
  }
5609
5609
  function On(e) {
5610
5610
  return Math.sign(e) * Math.round(Math.abs(e));
5611
5611
  }
5612
- function Ls(e) {
5612
+ function Os(e) {
5613
5613
  return Math.sign(e) * Math.round(Math.abs(e * 2)) / 2;
5614
5614
  }
5615
- function Rs(e) {
5615
+ function Ls(e) {
5616
5616
  return Math.sign(e) * (Math.round(Math.abs(e) + 0.5) - 0.5);
5617
5617
  }
5618
- function Ds(e) {
5618
+ function Rs(e) {
5619
5619
  return Math.sign(e) * Math.ceil(Math.abs(e));
5620
5620
  }
5621
- function As(e) {
5621
+ function Ds(e) {
5622
5622
  return Math.sign(e) * Math.floor(Math.abs(e));
5623
5623
  }
5624
5624
  var Ln = function(e) {
@@ -5794,7 +5794,7 @@ ce.prototype.prevTouched = function(e) {
5794
5794
  r = r.prevPointOnContour;
5795
5795
  return r;
5796
5796
  };
5797
- var ze = Object.freeze(new ce(0, 0)), Bs = {
5797
+ var ze = Object.freeze(new ce(0, 0)), As = {
5798
5798
  cvCutIn: 17 / 16,
5799
5799
  // control value cut in
5800
5800
  deltaBase: 9,
@@ -5822,7 +5822,7 @@ En.prototype.exec = function(e, r) {
5822
5822
  if (!n || n.ppem !== r) {
5823
5823
  var a = this._fpgmState;
5824
5824
  if (!a) {
5825
- xe.prototype = Bs, a = this._fpgmState = new xe("fpgm", t.tables.fpgm), a.funcs = [], a.font = t, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
5825
+ xe.prototype = As, a = this._fpgmState = new xe("fpgm", t.tables.fpgm), a.funcs = [], a.font = t, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
5826
5826
  try {
5827
5827
  Ue(a);
5828
5828
  } catch (l) {
@@ -5963,41 +5963,41 @@ function bt(e, r) {
5963
5963
  var u, i;
5964
5964
  e ? (u = s.y - o.y, i = o.x - s.x) : (u = o.x - s.x, i = o.y - s.y), r.fv = Xe(u, i);
5965
5965
  }
5966
- function Ms(e) {
5966
+ function Bs(e) {
5967
5967
  var r = e.stack, t = r.pop(), n = r.pop();
5968
5968
  exports.DEBUG && console.log(e.step, "SPVFS[]", t, n), e.pv = e.dpv = Xe(n, t);
5969
5969
  }
5970
- function Is(e) {
5970
+ function Ms(e) {
5971
5971
  var r = e.stack, t = r.pop(), n = r.pop();
5972
5972
  exports.DEBUG && console.log(e.step, "SPVFS[]", t, n), e.fv = Xe(n, t);
5973
5973
  }
5974
- function Ps(e) {
5974
+ function Is(e) {
5975
5975
  var r = e.stack, t = e.pv;
5976
5976
  exports.DEBUG && console.log(e.step, "GPV[]"), r.push(t.x * 16384), r.push(t.y * 16384);
5977
5977
  }
5978
- function Gs(e) {
5978
+ function Ps(e) {
5979
5979
  var r = e.stack, t = e.fv;
5980
5980
  exports.DEBUG && console.log(e.step, "GFV[]"), r.push(t.x * 16384), r.push(t.y * 16384);
5981
5981
  }
5982
- function Ns(e) {
5982
+ function Gs(e) {
5983
5983
  e.fv = e.pv, exports.DEBUG && console.log(e.step, "SFVTPV[]");
5984
5984
  }
5985
- function Hs(e) {
5985
+ function Ns(e) {
5986
5986
  var r = e.stack, t = r.pop(), n = r.pop(), a = r.pop(), s = r.pop(), o = r.pop(), u = e.z0, i = e.z1, l = u[t], f = u[n], c = i[a], p = i[s], h = e.z2[o];
5987
5987
  exports.DEBUG && console.log("ISECT[], ", t, n, a, s, o);
5988
5988
  var d = l.x, g = l.y, m = f.x, x = f.y, U = c.x, y = c.y, L = p.x, w = p.y, B = (d - m) * (y - w) - (g - x) * (U - L), C = d * x - g * m, F = U * w - y * L;
5989
5989
  h.x = (C * (U - L) - F * (d - m)) / B, h.y = (C * (y - w) - F * (g - x)) / B;
5990
5990
  }
5991
- function Ws(e) {
5991
+ function Hs(e) {
5992
5992
  e.rp0 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP0[]", e.rp0);
5993
5993
  }
5994
- function zs(e) {
5994
+ function Ws(e) {
5995
5995
  e.rp1 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP1[]", e.rp1);
5996
5996
  }
5997
- function _s(e) {
5997
+ function zs(e) {
5998
5998
  e.rp2 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP2[]", e.rp2);
5999
5999
  }
6000
- function Vs(e) {
6000
+ function _s(e) {
6001
6001
  var r = e.stack.pop();
6002
6002
  switch (exports.DEBUG && console.log(e.step, "SZP0[]", r), e.zp0 = r, r) {
6003
6003
  case 0:
@@ -6010,7 +6010,7 @@ function Vs(e) {
6010
6010
  throw new Error("Invalid zone pointer");
6011
6011
  }
6012
6012
  }
6013
- function qs(e) {
6013
+ function Vs(e) {
6014
6014
  var r = e.stack.pop();
6015
6015
  switch (exports.DEBUG && console.log(e.step, "SZP1[]", r), e.zp1 = r, r) {
6016
6016
  case 0:
@@ -6023,7 +6023,7 @@ function qs(e) {
6023
6023
  throw new Error("Invalid zone pointer");
6024
6024
  }
6025
6025
  }
6026
- function Xs(e) {
6026
+ function qs(e) {
6027
6027
  var r = e.stack.pop();
6028
6028
  switch (exports.DEBUG && console.log(e.step, "SZP2[]", r), e.zp2 = r, r) {
6029
6029
  case 0:
@@ -6036,7 +6036,7 @@ function Xs(e) {
6036
6036
  throw new Error("Invalid zone pointer");
6037
6037
  }
6038
6038
  }
6039
- function Ys(e) {
6039
+ function Xs(e) {
6040
6040
  var r = e.stack.pop();
6041
6041
  switch (exports.DEBUG && console.log(e.step, "SZPS[]", r), e.zp0 = e.zp1 = e.zp2 = r, r) {
6042
6042
  case 0:
@@ -6049,49 +6049,49 @@ function Ys(e) {
6049
6049
  throw new Error("Invalid zone pointer");
6050
6050
  }
6051
6051
  }
6052
- function $s(e) {
6052
+ function Ys(e) {
6053
6053
  e.loop = e.stack.pop(), exports.DEBUG && console.log(e.step, "SLOOP[]", e.loop);
6054
6054
  }
6055
- function Zs(e) {
6055
+ function $s(e) {
6056
6056
  exports.DEBUG && console.log(e.step, "RTG[]"), e.round = On;
6057
6057
  }
6058
- function Qs(e) {
6059
- exports.DEBUG && console.log(e.step, "RTHG[]"), e.round = Rs;
6058
+ function Zs(e) {
6059
+ exports.DEBUG && console.log(e.step, "RTHG[]"), e.round = Ls;
6060
6060
  }
6061
- function Ks(e) {
6061
+ function Qs(e) {
6062
6062
  var r = e.stack.pop();
6063
6063
  exports.DEBUG && console.log(e.step, "SMD[]", r), e.minDis = r / 64;
6064
6064
  }
6065
- function js(e) {
6065
+ function Ks(e) {
6066
6066
  exports.DEBUG && console.log(e.step, "ELSE[]"), Rn(e, !1);
6067
6067
  }
6068
- function Js(e) {
6068
+ function js(e) {
6069
6069
  var r = e.stack.pop();
6070
6070
  exports.DEBUG && console.log(e.step, "JMPR[]", r), e.ip += r - 1;
6071
6071
  }
6072
- function eo(e) {
6072
+ function Js(e) {
6073
6073
  var r = e.stack.pop();
6074
6074
  exports.DEBUG && console.log(e.step, "SCVTCI[]", r), e.cvCutIn = r / 64;
6075
6075
  }
6076
- function ro(e) {
6076
+ function eo(e) {
6077
6077
  var r = e.stack;
6078
6078
  exports.DEBUG && console.log(e.step, "DUP[]"), r.push(r[r.length - 1]);
6079
6079
  }
6080
6080
  function xr(e) {
6081
6081
  exports.DEBUG && console.log(e.step, "POP[]"), e.stack.pop();
6082
6082
  }
6083
- function to(e) {
6083
+ function ro(e) {
6084
6084
  exports.DEBUG && console.log(e.step, "CLEAR[]"), e.stack.length = 0;
6085
6085
  }
6086
- function no(e) {
6086
+ function to(e) {
6087
6087
  var r = e.stack, t = r.pop(), n = r.pop();
6088
6088
  exports.DEBUG && console.log(e.step, "SWAP[]"), r.push(t), r.push(n);
6089
6089
  }
6090
- function ao(e) {
6090
+ function no(e) {
6091
6091
  var r = e.stack;
6092
6092
  exports.DEBUG && console.log(e.step, "DEPTH[]"), r.push(r.length);
6093
6093
  }
6094
- function so(e) {
6094
+ function ao(e) {
6095
6095
  var r = e.stack, t = r.pop(), n = r.pop();
6096
6096
  exports.DEBUG && console.log(e.step, "LOOPCALL[]", t, n);
6097
6097
  var a = e.ip, s = e.prog;
@@ -6104,21 +6104,21 @@ function so(e) {
6104
6104
  );
6105
6105
  e.ip = a, e.prog = s;
6106
6106
  }
6107
- function oo(e) {
6107
+ function so(e) {
6108
6108
  var r = e.stack.pop();
6109
6109
  exports.DEBUG && console.log(e.step, "CALL[]", r);
6110
6110
  var t = e.ip, n = e.prog;
6111
6111
  e.prog = e.funcs[r], Ue(e), e.ip = t, e.prog = n, exports.DEBUG && console.log(++e.step, "returning from", r);
6112
6112
  }
6113
- function io(e) {
6113
+ function oo(e) {
6114
6114
  var r = e.stack, t = r.pop();
6115
6115
  exports.DEBUG && console.log(e.step, "CINDEX[]", t), r.push(r[r.length - t]);
6116
6116
  }
6117
- function uo(e) {
6117
+ function io(e) {
6118
6118
  var r = e.stack, t = r.pop();
6119
6119
  exports.DEBUG && console.log(e.step, "MINDEX[]", t), r.push(r.splice(r.length - t, 1)[0]);
6120
6120
  }
6121
- function lo(e) {
6121
+ function uo(e) {
6122
6122
  if (e.env !== "fpgm")
6123
6123
  throw new Error("FDEF not allowed here");
6124
6124
  var r = e.stack, t = e.prog, n = e.ip, a = r.pop(), s = n;
@@ -6174,7 +6174,7 @@ function Ut(e, r) {
6174
6174
  for (var l, f = o.distance(a, a, !1, !0), c = i.length - 2, p = 0; p < c; p++)
6175
6175
  l = i[p], s.setRelative(l, l, f, o);
6176
6176
  }
6177
- function fo(e) {
6177
+ function lo(e) {
6178
6178
  for (var r = e.stack, t = e.loop, n = e.fv, a = r.pop() / 64, s = e.z2; t--; ) {
6179
6179
  var o = r.pop(), u = s[o];
6180
6180
  exports.DEBUG && console.log(
@@ -6186,7 +6186,7 @@ function fo(e) {
6186
6186
  }
6187
6187
  e.loop = 1;
6188
6188
  }
6189
- function po(e) {
6189
+ function fo(e) {
6190
6190
  for (var r = e.stack, t = e.rp1, n = e.rp2, a = e.loop, s = e.z0[t], o = e.z1[n], u = e.fv, i = e.dpv, l = e.z2; a--; ) {
6191
6191
  var f = r.pop(), c = l[f];
6192
6192
  exports.DEBUG && console.log(
@@ -6204,7 +6204,7 @@ function Ct(e, r) {
6204
6204
  var t = r.stack, n = t.pop() / 64, a = t.pop(), s = r.z1[a], o = r.z0[r.rp0], u = r.fv, i = r.pv;
6205
6205
  u.setRelative(s, o, n, i), u.touch(s), exports.DEBUG && console.log(r.step, "MSIRP[" + e + "]", n, a), r.rp1 = r.rp0, r.rp2 = a, e && (r.rp0 = a);
6206
6206
  }
6207
- function co(e) {
6207
+ function po(e) {
6208
6208
  for (var r = e.stack, t = e.rp0, n = e.z0[t], a = e.loop, s = e.fv, o = e.pv, u = e.z1; a--; ) {
6209
6209
  var i = r.pop(), l = u[i];
6210
6210
  exports.DEBUG && console.log(
@@ -6215,8 +6215,8 @@ function co(e) {
6215
6215
  }
6216
6216
  e.loop = 1;
6217
6217
  }
6218
- function ho(e) {
6219
- exports.DEBUG && console.log(e.step, "RTDG[]"), e.round = Ls;
6218
+ function co(e) {
6219
+ exports.DEBUG && console.log(e.step, "RTDG[]"), e.round = Os;
6220
6220
  }
6221
6221
  function wt(e, r) {
6222
6222
  var t = r.stack, n = t.pop(), a = t.pop(), s = r.z0[a], o = r.fv, u = r.pv, i = r.cvt[n];
@@ -6232,14 +6232,14 @@ function wt(e, r) {
6232
6232
  var l = u.distance(s, ze);
6233
6233
  e && (Math.abs(l - i) < r.cvCutIn && (l = i), l = r.round(l)), o.setRelative(s, ze, l, u), r.zp0 === 0 && (s.xo = s.x, s.yo = s.y), o.touch(s), r.rp0 = r.rp1 = a;
6234
6234
  }
6235
- function vo(e) {
6235
+ function ho(e) {
6236
6236
  var r = e.prog, t = e.ip, n = e.stack, a = r[++t];
6237
6237
  exports.DEBUG && console.log(e.step, "NPUSHB[]", a);
6238
6238
  for (var s = 0; s < a; s++)
6239
6239
  n.push(r[++t]);
6240
6240
  e.ip = t;
6241
6241
  }
6242
- function go(e) {
6242
+ function vo(e) {
6243
6243
  var r = e.ip, t = e.prog, n = e.stack, a = t[++r];
6244
6244
  exports.DEBUG && console.log(e.step, "NPUSHW[]", a);
6245
6245
  for (var s = 0; s < a; s++) {
@@ -6248,23 +6248,23 @@ function go(e) {
6248
6248
  }
6249
6249
  e.ip = r;
6250
6250
  }
6251
- function mo(e) {
6251
+ function go(e) {
6252
6252
  var r = e.stack, t = e.store;
6253
6253
  t || (t = e.store = []);
6254
6254
  var n = r.pop(), a = r.pop();
6255
6255
  exports.DEBUG && console.log(e.step, "WS", n, a), t[a] = n;
6256
6256
  }
6257
- function yo(e) {
6257
+ function mo(e) {
6258
6258
  var r = e.stack, t = e.store, n = r.pop();
6259
6259
  exports.DEBUG && console.log(e.step, "RS", n);
6260
6260
  var a = t && t[n] || 0;
6261
6261
  r.push(a);
6262
6262
  }
6263
- function xo(e) {
6263
+ function yo(e) {
6264
6264
  var r = e.stack, t = r.pop(), n = r.pop();
6265
6265
  exports.DEBUG && console.log(e.step, "WCVTP", t, n), e.cvt[n] = t / 64;
6266
6266
  }
6267
- function bo(e) {
6267
+ function xo(e) {
6268
6268
  var r = e.stack, t = r.pop();
6269
6269
  exports.DEBUG && console.log(e.step, "RCVT", t), r.push(e.cvt[t] * 64);
6270
6270
  }
@@ -6276,60 +6276,60 @@ function Ot(e, r) {
6276
6276
  var t = r.stack, n = t.pop(), a = t.pop(), s = r.z1[n], o = r.z0[a], u = r.dpv.distance(o, s, e, e);
6277
6277
  exports.DEBUG && console.log(r.step, "MD[" + e + "]", n, a, "->", u), r.stack.push(Math.round(u * 64));
6278
6278
  }
6279
- function So(e) {
6279
+ function bo(e) {
6280
6280
  exports.DEBUG && console.log(e.step, "MPPEM[]"), e.stack.push(e.ppem);
6281
6281
  }
6282
- function To(e) {
6282
+ function So(e) {
6283
6283
  exports.DEBUG && console.log(e.step, "FLIPON[]"), e.autoFlip = !0;
6284
6284
  }
6285
- function ko(e) {
6285
+ function To(e) {
6286
6286
  var r = e.stack, t = r.pop(), n = r.pop();
6287
6287
  exports.DEBUG && console.log(e.step, "LT[]", t, n), r.push(n < t ? 1 : 0);
6288
6288
  }
6289
- function Fo(e) {
6289
+ function ko(e) {
6290
6290
  var r = e.stack, t = r.pop(), n = r.pop();
6291
6291
  exports.DEBUG && console.log(e.step, "LTEQ[]", t, n), r.push(n <= t ? 1 : 0);
6292
6292
  }
6293
- function Uo(e) {
6293
+ function Fo(e) {
6294
6294
  var r = e.stack, t = r.pop(), n = r.pop();
6295
6295
  exports.DEBUG && console.log(e.step, "GT[]", t, n), r.push(n > t ? 1 : 0);
6296
6296
  }
6297
- function Co(e) {
6297
+ function Uo(e) {
6298
6298
  var r = e.stack, t = r.pop(), n = r.pop();
6299
6299
  exports.DEBUG && console.log(e.step, "GTEQ[]", t, n), r.push(n >= t ? 1 : 0);
6300
6300
  }
6301
- function wo(e) {
6301
+ function Co(e) {
6302
6302
  var r = e.stack, t = r.pop(), n = r.pop();
6303
6303
  exports.DEBUG && console.log(e.step, "EQ[]", t, n), r.push(t === n ? 1 : 0);
6304
6304
  }
6305
- function Eo(e) {
6305
+ function wo(e) {
6306
6306
  var r = e.stack, t = r.pop(), n = r.pop();
6307
6307
  exports.DEBUG && console.log(e.step, "NEQ[]", t, n), r.push(t !== n ? 1 : 0);
6308
6308
  }
6309
- function Oo(e) {
6309
+ function Eo(e) {
6310
6310
  var r = e.stack, t = r.pop();
6311
6311
  exports.DEBUG && console.log(e.step, "ODD[]", t), r.push(Math.trunc(t) % 2 ? 1 : 0);
6312
6312
  }
6313
- function Lo(e) {
6313
+ function Oo(e) {
6314
6314
  var r = e.stack, t = r.pop();
6315
6315
  exports.DEBUG && console.log(e.step, "EVEN[]", t), r.push(Math.trunc(t) % 2 ? 0 : 1);
6316
6316
  }
6317
- function Ro(e) {
6317
+ function Lo(e) {
6318
6318
  var r = e.stack.pop();
6319
6319
  exports.DEBUG && console.log(e.step, "IF[]", r), r || (Rn(e, !0), exports.DEBUG && console.log(e.step, "EIF[]"));
6320
6320
  }
6321
- function Do(e) {
6321
+ function Ro(e) {
6322
6322
  exports.DEBUG && console.log(e.step, "EIF[]");
6323
6323
  }
6324
- function Ao(e) {
6324
+ function Do(e) {
6325
6325
  var r = e.stack, t = r.pop(), n = r.pop();
6326
6326
  exports.DEBUG && console.log(e.step, "AND[]", t, n), r.push(t && n ? 1 : 0);
6327
6327
  }
6328
- function Bo(e) {
6328
+ function Ao(e) {
6329
6329
  var r = e.stack, t = r.pop(), n = r.pop();
6330
6330
  exports.DEBUG && console.log(e.step, "OR[]", t, n), r.push(t || n ? 1 : 0);
6331
6331
  }
6332
- function Mo(e) {
6332
+ function Bo(e) {
6333
6333
  var r = e.stack, t = r.pop();
6334
6334
  exports.DEBUG && console.log(e.step, "NOT[]", t), r.push(t ? 0 : 1);
6335
6335
  }
@@ -6346,43 +6346,43 @@ function br(e, r) {
6346
6346
  }
6347
6347
  }
6348
6348
  }
6349
- function Io(e) {
6349
+ function Mo(e) {
6350
6350
  var r = e.stack, t = r.pop();
6351
6351
  exports.DEBUG && console.log(e.step, "SDB[]", t), e.deltaBase = t;
6352
6352
  }
6353
- function Po(e) {
6353
+ function Io(e) {
6354
6354
  var r = e.stack, t = r.pop();
6355
6355
  exports.DEBUG && console.log(e.step, "SDS[]", t), e.deltaShift = Math.pow(0.5, t);
6356
6356
  }
6357
- function Go(e) {
6357
+ function Po(e) {
6358
6358
  var r = e.stack, t = r.pop(), n = r.pop();
6359
6359
  exports.DEBUG && console.log(e.step, "ADD[]", t, n), r.push(n + t);
6360
6360
  }
6361
- function No(e) {
6361
+ function Go(e) {
6362
6362
  var r = e.stack, t = r.pop(), n = r.pop();
6363
6363
  exports.DEBUG && console.log(e.step, "SUB[]", t, n), r.push(n - t);
6364
6364
  }
6365
- function Ho(e) {
6365
+ function No(e) {
6366
6366
  var r = e.stack, t = r.pop(), n = r.pop();
6367
6367
  exports.DEBUG && console.log(e.step, "DIV[]", t, n), r.push(n * 64 / t);
6368
6368
  }
6369
- function Wo(e) {
6369
+ function Ho(e) {
6370
6370
  var r = e.stack, t = r.pop(), n = r.pop();
6371
6371
  exports.DEBUG && console.log(e.step, "MUL[]", t, n), r.push(n * t / 64);
6372
6372
  }
6373
- function zo(e) {
6373
+ function Wo(e) {
6374
6374
  var r = e.stack, t = r.pop();
6375
6375
  exports.DEBUG && console.log(e.step, "ABS[]", t), r.push(Math.abs(t));
6376
6376
  }
6377
- function _o(e) {
6377
+ function zo(e) {
6378
6378
  var r = e.stack, t = r.pop();
6379
6379
  exports.DEBUG && console.log(e.step, "NEG[]", t), r.push(-t);
6380
6380
  }
6381
- function Vo(e) {
6381
+ function _o(e) {
6382
6382
  var r = e.stack, t = r.pop();
6383
6383
  exports.DEBUG && console.log(e.step, "FLOOR[]", t), r.push(Math.floor(t / 64) * 64);
6384
6384
  }
6385
- function qo(e) {
6385
+ function Vo(e) {
6386
6386
  var r = e.stack, t = r.pop();
6387
6387
  exports.DEBUG && console.log(e.step, "CEILING[]", t), r.push(Math.ceil(t / 64) * 64);
6388
6388
  }
@@ -6390,7 +6390,7 @@ function Je(e, r) {
6390
6390
  var t = r.stack, n = t.pop();
6391
6391
  exports.DEBUG && console.log(r.step, "ROUND[]"), t.push(r.round(n / 64) * 64);
6392
6392
  }
6393
- function Xo(e) {
6393
+ function qo(e) {
6394
6394
  var r = e.stack, t = r.pop(), n = r.pop();
6395
6395
  exports.DEBUG && console.log(e.step, "WCVTF[]", t, n), e.cvt[n] = t * e.ppem / e.font.unitsPerEm;
6396
6396
  }
@@ -6407,7 +6407,7 @@ function Sr(e, r) {
6407
6407
  }
6408
6408
  }
6409
6409
  }
6410
- function Yo(e) {
6410
+ function Xo(e) {
6411
6411
  var r = e.stack.pop();
6412
6412
  exports.DEBUG && console.log(e.step, "SROUND[]", r), e.round = Ln;
6413
6413
  var t;
@@ -6442,7 +6442,7 @@ function Yo(e) {
6442
6442
  }
6443
6443
  r &= 15, r === 0 ? e.srThreshold = 0 : e.srThreshold = (r / 8 - 0.5) * t;
6444
6444
  }
6445
- function $o(e) {
6445
+ function Yo(e) {
6446
6446
  var r = e.stack.pop();
6447
6447
  exports.DEBUG && console.log(e.step, "S45ROUND[]", r), e.round = Ln;
6448
6448
  var t;
@@ -6477,16 +6477,16 @@ function $o(e) {
6477
6477
  }
6478
6478
  r &= 15, r === 0 ? e.srThreshold = 0 : e.srThreshold = (r / 8 - 0.5) * t;
6479
6479
  }
6480
+ function $o(e) {
6481
+ exports.DEBUG && console.log(e.step, "ROFF[]"), e.round = Es;
6482
+ }
6480
6483
  function Zo(e) {
6481
- exports.DEBUG && console.log(e.step, "ROFF[]"), e.round = Os;
6484
+ exports.DEBUG && console.log(e.step, "RUTG[]"), e.round = Rs;
6482
6485
  }
6483
6486
  function Qo(e) {
6484
- exports.DEBUG && console.log(e.step, "RUTG[]"), e.round = Ds;
6487
+ exports.DEBUG && console.log(e.step, "RDTG[]"), e.round = Ds;
6485
6488
  }
6486
6489
  function Ko(e) {
6487
- exports.DEBUG && console.log(e.step, "RDTG[]"), e.round = As;
6488
- }
6489
- function jo(e) {
6490
6490
  var r = e.stack.pop();
6491
6491
  exports.DEBUG && console.log(e.step, "SCANCTRL[]", r);
6492
6492
  }
@@ -6496,27 +6496,27 @@ function Lt(e, r) {
6496
6496
  var u, i;
6497
6497
  e ? (u = s.y - o.y, i = o.x - s.x) : (u = o.x - s.x, i = o.y - s.y), r.dpv = Xe(u, i);
6498
6498
  }
6499
- function Jo(e) {
6499
+ function jo(e) {
6500
6500
  var r = e.stack, t = r.pop(), n = 0;
6501
6501
  exports.DEBUG && console.log(e.step, "GETINFO[]", t), t & 1 && (n = 35), t & 32 && (n |= 4096), r.push(n);
6502
6502
  }
6503
- function ei(e) {
6503
+ function Jo(e) {
6504
6504
  var r = e.stack, t = r.pop(), n = r.pop(), a = r.pop();
6505
6505
  exports.DEBUG && console.log(e.step, "ROLL[]"), r.push(n), r.push(t), r.push(a);
6506
6506
  }
6507
- function ri(e) {
6507
+ function ei(e) {
6508
6508
  var r = e.stack, t = r.pop(), n = r.pop();
6509
6509
  exports.DEBUG && console.log(e.step, "MAX[]", t, n), r.push(Math.max(n, t));
6510
6510
  }
6511
- function ti(e) {
6511
+ function ri(e) {
6512
6512
  var r = e.stack, t = r.pop(), n = r.pop();
6513
6513
  exports.DEBUG && console.log(e.step, "MIN[]", t, n), r.push(Math.min(n, t));
6514
6514
  }
6515
- function ni(e) {
6515
+ function ti(e) {
6516
6516
  var r = e.stack.pop();
6517
6517
  exports.DEBUG && console.log(e.step, "SCANTYPE[]", r);
6518
6518
  }
6519
- function ai(e) {
6519
+ function ni(e) {
6520
6520
  var r = e.stack.pop(), t = e.stack.pop();
6521
6521
  switch (exports.DEBUG && console.log(e.step, "INSTCTRL[]", r, t), r) {
6522
6522
  case 1:
@@ -6581,45 +6581,45 @@ Cn = [
6581
6581
  /* 0x09 */
6582
6582
  bt.bind(void 0, 1),
6583
6583
  /* 0x0A */
6584
- Ms,
6584
+ Bs,
6585
6585
  /* 0x0B */
6586
- Is,
6586
+ Ms,
6587
6587
  /* 0x0C */
6588
- Ps,
6588
+ Is,
6589
6589
  /* 0x0D */
6590
- Gs,
6590
+ Ps,
6591
6591
  /* 0x0E */
6592
- Ns,
6592
+ Gs,
6593
6593
  /* 0x0F */
6594
- Hs,
6594
+ Ns,
6595
6595
  /* 0x10 */
6596
- Ws,
6596
+ Hs,
6597
6597
  /* 0x11 */
6598
- zs,
6598
+ Ws,
6599
6599
  /* 0x12 */
6600
- _s,
6600
+ zs,
6601
6601
  /* 0x13 */
6602
- Vs,
6602
+ _s,
6603
6603
  /* 0x14 */
6604
- qs,
6604
+ Vs,
6605
6605
  /* 0x15 */
6606
- Xs,
6606
+ qs,
6607
6607
  /* 0x16 */
6608
- Ys,
6608
+ Xs,
6609
6609
  /* 0x17 */
6610
- $s,
6610
+ Ys,
6611
6611
  /* 0x18 */
6612
- Zs,
6612
+ $s,
6613
6613
  /* 0x19 */
6614
- Qs,
6614
+ Zs,
6615
6615
  /* 0x1A */
6616
- Ks,
6616
+ Qs,
6617
6617
  /* 0x1B */
6618
- js,
6618
+ Ks,
6619
6619
  /* 0x1C */
6620
- Js,
6620
+ js,
6621
6621
  /* 0x1D */
6622
- eo,
6622
+ Js,
6623
6623
  /* 0x1E */
6624
6624
  void 0,
6625
6625
  // TODO SSWCI
@@ -6627,19 +6627,19 @@ Cn = [
6627
6627
  void 0,
6628
6628
  // TODO SSW
6629
6629
  /* 0x20 */
6630
- ro,
6630
+ eo,
6631
6631
  /* 0x21 */
6632
6632
  xr,
6633
6633
  /* 0x22 */
6634
- to,
6634
+ ro,
6635
6635
  /* 0x23 */
6636
- no,
6636
+ to,
6637
6637
  /* 0x24 */
6638
- ao,
6638
+ no,
6639
6639
  /* 0x25 */
6640
- io,
6640
+ oo,
6641
6641
  /* 0x26 */
6642
- uo,
6642
+ io,
6643
6643
  /* 0x27 */
6644
6644
  void 0,
6645
6645
  // TODO ALIGNPTS
@@ -6649,11 +6649,11 @@ Cn = [
6649
6649
  void 0,
6650
6650
  // TODO UTP
6651
6651
  /* 0x2A */
6652
- so,
6652
+ ao,
6653
6653
  /* 0x2B */
6654
- oo,
6654
+ so,
6655
6655
  /* 0x2C */
6656
- lo,
6656
+ uo,
6657
6657
  /* 0x2D */
6658
6658
  void 0,
6659
6659
  // ENDF (eaten by FDEF)
@@ -6678,33 +6678,33 @@ Cn = [
6678
6678
  /* 0x37 */
6679
6679
  Ut.bind(void 0, 1),
6680
6680
  /* 0x38 */
6681
- fo,
6681
+ lo,
6682
6682
  /* 0x39 */
6683
- po,
6683
+ fo,
6684
6684
  /* 0x3A */
6685
6685
  Ct.bind(void 0, 0),
6686
6686
  /* 0x3B */
6687
6687
  Ct.bind(void 0, 1),
6688
6688
  /* 0x3C */
6689
- co,
6689
+ po,
6690
6690
  /* 0x3D */
6691
- ho,
6691
+ co,
6692
6692
  /* 0x3E */
6693
6693
  wt.bind(void 0, 0),
6694
6694
  /* 0x3F */
6695
6695
  wt.bind(void 0, 1),
6696
6696
  /* 0x40 */
6697
- vo,
6697
+ ho,
6698
6698
  /* 0x41 */
6699
- go,
6699
+ vo,
6700
6700
  /* 0x42 */
6701
- mo,
6701
+ go,
6702
6702
  /* 0x43 */
6703
- yo,
6703
+ mo,
6704
6704
  /* 0x44 */
6705
- xo,
6705
+ yo,
6706
6706
  /* 0x45 */
6707
- bo,
6707
+ xo,
6708
6708
  /* 0x46 */
6709
6709
  Et.bind(void 0, 0),
6710
6710
  /* 0x47 */
@@ -6717,12 +6717,12 @@ Cn = [
6717
6717
  /* 0x4A */
6718
6718
  Ot.bind(void 0, 1),
6719
6719
  /* 0x4B */
6720
- So,
6720
+ bo,
6721
6721
  /* 0x4C */
6722
6722
  void 0,
6723
6723
  // TODO MPS
6724
6724
  /* 0x4D */
6725
- To,
6725
+ So,
6726
6726
  /* 0x4E */
6727
6727
  void 0,
6728
6728
  // TODO FLIPOFF
@@ -6730,53 +6730,53 @@ Cn = [
6730
6730
  void 0,
6731
6731
  // TODO DEBUG
6732
6732
  /* 0x50 */
6733
- ko,
6733
+ To,
6734
6734
  /* 0x51 */
6735
- Fo,
6735
+ ko,
6736
6736
  /* 0x52 */
6737
- Uo,
6737
+ Fo,
6738
6738
  /* 0x53 */
6739
- Co,
6739
+ Uo,
6740
6740
  /* 0x54 */
6741
- wo,
6741
+ Co,
6742
6742
  /* 0x55 */
6743
- Eo,
6743
+ wo,
6744
6744
  /* 0x56 */
6745
- Oo,
6745
+ Eo,
6746
6746
  /* 0x57 */
6747
- Lo,
6747
+ Oo,
6748
6748
  /* 0x58 */
6749
- Ro,
6749
+ Lo,
6750
6750
  /* 0x59 */
6751
- Do,
6751
+ Ro,
6752
6752
  /* 0x5A */
6753
- Ao,
6753
+ Do,
6754
6754
  /* 0x5B */
6755
- Bo,
6755
+ Ao,
6756
6756
  /* 0x5C */
6757
- Mo,
6757
+ Bo,
6758
6758
  /* 0x5D */
6759
6759
  br.bind(void 0, 1),
6760
6760
  /* 0x5E */
6761
- Io,
6761
+ Mo,
6762
6762
  /* 0x5F */
6763
- Po,
6763
+ Io,
6764
6764
  /* 0x60 */
6765
- Go,
6765
+ Po,
6766
6766
  /* 0x61 */
6767
- No,
6767
+ Go,
6768
6768
  /* 0x62 */
6769
- Ho,
6769
+ No,
6770
6770
  /* 0x63 */
6771
- Wo,
6771
+ Ho,
6772
6772
  /* 0x64 */
6773
- zo,
6773
+ Wo,
6774
6774
  /* 0x65 */
6775
- _o,
6775
+ zo,
6776
6776
  /* 0x66 */
6777
- Vo,
6777
+ _o,
6778
6778
  /* 0x67 */
6779
- qo,
6779
+ Vo,
6780
6780
  /* 0x68 */
6781
6781
  Je.bind(void 0, 0),
6782
6782
  /* 0x69 */
@@ -6798,7 +6798,7 @@ Cn = [
6798
6798
  void 0,
6799
6799
  // TODO NROUND[ab]
6800
6800
  /* 0x70 */
6801
- Xo,
6801
+ qo,
6802
6802
  /* 0x71 */
6803
6803
  br.bind(void 0, 2),
6804
6804
  /* 0x72 */
@@ -6810,9 +6810,9 @@ Cn = [
6810
6810
  /* 0x75 */
6811
6811
  Sr.bind(void 0, 3),
6812
6812
  /* 0x76 */
6813
- Yo,
6813
+ Xo,
6814
6814
  /* 0x77 */
6815
- $o,
6815
+ Yo,
6816
6816
  /* 0x78 */
6817
6817
  void 0,
6818
6818
  // TODO JROT[]
@@ -6820,13 +6820,13 @@ Cn = [
6820
6820
  void 0,
6821
6821
  // TODO JROF[]
6822
6822
  /* 0x7A */
6823
- Zo,
6823
+ $o,
6824
6824
  /* 0x7B */
6825
6825
  void 0,
6826
6826
  /* 0x7C */
6827
- Qo,
6827
+ Zo,
6828
6828
  /* 0x7D */
6829
- Ko,
6829
+ Qo,
6830
6830
  /* 0x7E */
6831
6831
  xr,
6832
6832
  // actually SANGW, supposed to do only a pop though
@@ -6847,26 +6847,26 @@ Cn = [
6847
6847
  /* 0x84 */
6848
6848
  void 0,
6849
6849
  /* 0x85 */
6850
- jo,
6850
+ Ko,
6851
6851
  /* 0x86 */
6852
6852
  Lt.bind(void 0, 0),
6853
6853
  /* 0x87 */
6854
6854
  Lt.bind(void 0, 1),
6855
6855
  /* 0x88 */
6856
- Jo,
6856
+ jo,
6857
6857
  /* 0x89 */
6858
6858
  void 0,
6859
6859
  // TODO IDEF
6860
6860
  /* 0x8A */
6861
- ei,
6861
+ Jo,
6862
6862
  /* 0x8B */
6863
- ri,
6863
+ ei,
6864
6864
  /* 0x8C */
6865
- ti,
6865
+ ri,
6866
6866
  /* 0x8D */
6867
- ni,
6867
+ ti,
6868
6868
  /* 0x8E */
6869
- ai,
6869
+ ni,
6870
6870
  /* 0x8F */
6871
6871
  void 0,
6872
6872
  /* 0x90 */
@@ -7100,7 +7100,7 @@ function Re(e) {
7100
7100
  function Xr(e, r, t) {
7101
7101
  this.contextName = t, this.startIndex = e, this.endOffset = r;
7102
7102
  }
7103
- function si(e, r, t) {
7103
+ function ai(e, r, t) {
7104
7104
  this.contextName = e, this.openRange = null, this.ranges = [], this.checkStart = r, this.checkEnd = t;
7105
7105
  }
7106
7106
  function re(e, r) {
@@ -7109,7 +7109,7 @@ function re(e, r) {
7109
7109
  function fr(e) {
7110
7110
  this.eventId = e, this.subscribers = [];
7111
7111
  }
7112
- function oi(e) {
7112
+ function si(e) {
7113
7113
  var r = this, t = [
7114
7114
  "start",
7115
7115
  "end",
@@ -7148,7 +7148,7 @@ function oi(e) {
7148
7148
  });
7149
7149
  }
7150
7150
  function N(e) {
7151
- this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], oi.call(this, e);
7151
+ this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], si.call(this, e);
7152
7152
  }
7153
7153
  Re.prototype.setState = function(e, r) {
7154
7154
  return this.state[e] = r, this.activeState = { key: e, value: this.state[e] }, this.activeState;
@@ -7286,7 +7286,7 @@ N.prototype.registerContextChecker = function(e, r, t) {
7286
7286
  return {
7287
7287
  FAIL: "missing context end check."
7288
7288
  };
7289
- var n = new si(
7289
+ var n = new ai(
7290
7290
  e,
7291
7291
  r,
7292
7292
  t
@@ -7359,7 +7359,7 @@ function Se(e) {
7359
7359
  function rr(e) {
7360
7360
  return /[A-z]/.test(e);
7361
7361
  }
7362
- function ii(e) {
7362
+ function oi(e) {
7363
7363
  return /\s/.test(e);
7364
7364
  }
7365
7365
  function J(e) {
@@ -7388,11 +7388,11 @@ function Ye(e, r) {
7388
7388
  }
7389
7389
  return -1;
7390
7390
  }
7391
- function ui(e, r) {
7391
+ function ii(e, r) {
7392
7392
  var t = Ye(e, r.coverage);
7393
7393
  return t === -1 ? null : e + r.deltaGlyphId;
7394
7394
  }
7395
- function li(e, r) {
7395
+ function ui(e, r) {
7396
7396
  var t = Ye(e, r.coverage);
7397
7397
  return t === -1 ? null : r.substitute[t];
7398
7398
  }
@@ -7405,7 +7405,7 @@ function Tr(e, r) {
7405
7405
  }
7406
7406
  return t.length !== e.length ? -1 : t;
7407
7407
  }
7408
- function fi(e, r) {
7408
+ function li(e, r) {
7409
7409
  var t = r.inputCoverage.length + r.lookaheadCoverage.length + r.backtrackCoverage.length;
7410
7410
  if (e.context.length < t)
7411
7411
  return [];
@@ -7444,7 +7444,7 @@ function fi(e, r) {
7444
7444
  }
7445
7445
  return p;
7446
7446
  }
7447
- function pi(e, r) {
7447
+ function fi(e, r) {
7448
7448
  var t = e.current, n = Ye(t, r.coverage);
7449
7449
  if (n === -1)
7450
7450
  return null;
@@ -7460,7 +7460,7 @@ function pi(e, r) {
7460
7460
  }
7461
7461
  return null;
7462
7462
  }
7463
- function ci(e, r) {
7463
+ function pi(e, r) {
7464
7464
  var t = Ye(e, r.coverage);
7465
7465
  return t === -1 ? null : r.sequences[t];
7466
7466
  }
@@ -7522,35 +7522,35 @@ J.prototype.getLookupMethod = function(e, r) {
7522
7522
  switch (n) {
7523
7523
  case "11":
7524
7524
  return function(a) {
7525
- return ui.apply(
7525
+ return ii.apply(
7526
7526
  t,
7527
7527
  [a, r]
7528
7528
  );
7529
7529
  };
7530
7530
  case "12":
7531
7531
  return function(a) {
7532
- return li.apply(
7532
+ return ui.apply(
7533
7533
  t,
7534
7534
  [a, r]
7535
7535
  );
7536
7536
  };
7537
7537
  case "63":
7538
7538
  return function(a) {
7539
- return fi.apply(
7539
+ return li.apply(
7540
7540
  t,
7541
7541
  [a, r]
7542
7542
  );
7543
7543
  };
7544
7544
  case "41":
7545
7545
  return function(a) {
7546
- return pi.apply(
7546
+ return fi.apply(
7547
7547
  t,
7548
7548
  [a, r]
7549
7549
  );
7550
7550
  };
7551
7551
  case "21":
7552
7552
  return function(a) {
7553
- return ci.apply(
7553
+ return pi.apply(
7554
7554
  t,
7555
7555
  [a, r]
7556
7556
  );
@@ -7643,7 +7643,7 @@ J.prototype.getFeature = function(r) {
7643
7643
  var t = this.features[r.script];
7644
7644
  return t ? t.tags[r.tag] ? this.features[r.script].tags[r.tag] : null : { FAIL: "No feature for script " + r.script };
7645
7645
  };
7646
- function hi(e) {
7646
+ function ci(e) {
7647
7647
  var r = e.current, t = e.get(-1);
7648
7648
  return (
7649
7649
  // ? arabic first char
@@ -7651,7 +7651,7 @@ function hi(e) {
7651
7651
  !be(t) && be(r)
7652
7652
  );
7653
7653
  }
7654
- function vi(e) {
7654
+ function hi(e) {
7655
7655
  var r = e.get(1);
7656
7656
  return (
7657
7657
  // ? last arabic char
@@ -7659,24 +7659,24 @@ function vi(e) {
7659
7659
  !be(r)
7660
7660
  );
7661
7661
  }
7662
- var di = {
7663
- startCheck: hi,
7664
- endCheck: vi
7662
+ var vi = {
7663
+ startCheck: ci,
7664
+ endCheck: hi
7665
7665
  };
7666
- function gi(e) {
7666
+ function di(e) {
7667
7667
  var r = e.current, t = e.get(-1);
7668
7668
  return (
7669
7669
  // ? an arabic char preceded with a non arabic char
7670
7670
  (be(r) || Se(r)) && !be(t)
7671
7671
  );
7672
7672
  }
7673
- function mi(e) {
7673
+ function gi(e) {
7674
7674
  var r = e.get(1);
7675
7675
  switch (!0) {
7676
7676
  case r === null:
7677
7677
  return !0;
7678
7678
  case (!be(r) && !Se(r)):
7679
- var t = ii(r);
7679
+ var t = oi(r);
7680
7680
  if (!t)
7681
7681
  return !0;
7682
7682
  if (t) {
@@ -7693,38 +7693,38 @@ function mi(e) {
7693
7693
  return !1;
7694
7694
  }
7695
7695
  }
7696
- var yi = {
7697
- startCheck: gi,
7698
- endCheck: mi
7696
+ var mi = {
7697
+ startCheck: di,
7698
+ endCheck: gi
7699
7699
  };
7700
- function xi(e, r, t) {
7700
+ function yi(e, r, t) {
7701
7701
  r[t].setState(e.tag, e.substitution);
7702
7702
  }
7703
- function bi(e, r, t) {
7703
+ function xi(e, r, t) {
7704
7704
  r[t].setState(e.tag, e.substitution);
7705
7705
  }
7706
- function Si(e, r, t) {
7706
+ function bi(e, r, t) {
7707
7707
  e.substitution.forEach(function(n, a) {
7708
7708
  var s = r[t + a];
7709
7709
  s.setState(e.tag, n);
7710
7710
  });
7711
7711
  }
7712
- function Ti(e, r, t) {
7712
+ function Si(e, r, t) {
7713
7713
  var n = r[t];
7714
7714
  n.setState(e.tag, e.substitution.ligGlyph);
7715
7715
  for (var a = e.substitution.components.length, s = 0; s < a; s++)
7716
7716
  n = r[t + s + 1], n.setState("deleted", !0);
7717
7717
  }
7718
7718
  var Rt = {
7719
- 11: xi,
7720
- 12: bi,
7721
- 63: Si,
7722
- 41: Ti
7719
+ 11: yi,
7720
+ 12: xi,
7721
+ 63: bi,
7722
+ 41: Si
7723
7723
  };
7724
7724
  function Yr(e, r, t) {
7725
7725
  e instanceof Fe && Rt[e.id] && Rt[e.id](e, r, t);
7726
7726
  }
7727
- function ki(e) {
7727
+ function Ti(e) {
7728
7728
  for (var r = [].concat(e.backtrack), t = r.length - 1; t >= 0; t--) {
7729
7729
  var n = r[t], a = Dn(n), s = Se(n);
7730
7730
  if (!a && !s)
@@ -7734,7 +7734,7 @@ function ki(e) {
7734
7734
  }
7735
7735
  return !1;
7736
7736
  }
7737
- function Fi(e) {
7737
+ function ki(e) {
7738
7738
  if (Dn(e.current))
7739
7739
  return !1;
7740
7740
  for (var r = 0; r < e.lookahead.length; r++) {
@@ -7744,7 +7744,7 @@ function Fi(e) {
7744
7744
  }
7745
7745
  return !1;
7746
7746
  }
7747
- function Ui(e) {
7747
+ function Fi(e) {
7748
7748
  var r = this, t = "arab", n = this.featuresTags[t], a = this.tokenizer.getRangeTokens(e);
7749
7749
  if (a.length !== 1) {
7750
7750
  var s = new re(
@@ -7766,7 +7766,7 @@ function Ui(e) {
7766
7766
  if (!Se(u.char)) {
7767
7767
  s.setCurrentIndex(i), o.setCurrentIndex(i);
7768
7768
  var l = 0;
7769
- ki(o) && (l |= 1), Fi(o) && (l |= 2);
7769
+ Ti(o) && (l |= 1), ki(o) && (l |= 2);
7770
7770
  var f;
7771
7771
  switch (l) {
7772
7772
  case 1:
@@ -7801,7 +7801,7 @@ function Dt(e, r) {
7801
7801
  });
7802
7802
  return new re(t, 0);
7803
7803
  }
7804
- function Ci(e) {
7804
+ function Ui(e) {
7805
7805
  var r = this, t = "arab", n = this.tokenizer.getRangeTokens(e), a = Dt(n);
7806
7806
  a.context.forEach(function(s, o) {
7807
7807
  a.setCurrentIndex(o);
@@ -7817,7 +7817,7 @@ function Ci(e) {
7817
7817
  ), a = Dt(n));
7818
7818
  });
7819
7819
  }
7820
- function wi(e) {
7820
+ function Ci(e) {
7821
7821
  var r = e.current, t = e.get(-1);
7822
7822
  return (
7823
7823
  // ? latin first char
@@ -7825,7 +7825,7 @@ function wi(e) {
7825
7825
  !rr(t) && rr(r)
7826
7826
  );
7827
7827
  }
7828
- function Ei(e) {
7828
+ function wi(e) {
7829
7829
  var r = e.get(1);
7830
7830
  return (
7831
7831
  // ? last latin char
@@ -7833,9 +7833,9 @@ function Ei(e) {
7833
7833
  !rr(r)
7834
7834
  );
7835
7835
  }
7836
- var Oi = {
7837
- startCheck: wi,
7838
- endCheck: Ei
7836
+ var Ei = {
7837
+ startCheck: Ci,
7838
+ endCheck: wi
7839
7839
  };
7840
7840
  function At(e, r) {
7841
7841
  var t = e.map(function(n) {
@@ -7843,7 +7843,7 @@ function At(e, r) {
7843
7843
  });
7844
7844
  return new re(t, 0);
7845
7845
  }
7846
- function Li(e) {
7846
+ function Oi(e) {
7847
7847
  var r = this, t = "latn", n = this.tokenizer.getRangeTokens(e), a = At(n);
7848
7848
  a.context.forEach(function(s, o) {
7849
7849
  a.setCurrentIndex(o);
@@ -7866,9 +7866,9 @@ ae.prototype.setText = function(e) {
7866
7866
  this.text = e;
7867
7867
  };
7868
7868
  ae.prototype.contextChecks = {
7869
- latinWordCheck: Oi,
7870
- arabicWordCheck: di,
7871
- arabicSentenceCheck: yi
7869
+ latinWordCheck: Ei,
7870
+ arabicWordCheck: vi,
7871
+ arabicSentenceCheck: mi
7872
7872
  };
7873
7873
  function kr(e) {
7874
7874
  var r = this.contextChecks[e + "Check"];
@@ -7878,10 +7878,10 @@ function kr(e) {
7878
7878
  r.endCheck
7879
7879
  );
7880
7880
  }
7881
- function Ri() {
7881
+ function Li() {
7882
7882
  return kr.call(this, "latinWord"), kr.call(this, "arabicWord"), kr.call(this, "arabicSentence"), this.tokenizer.tokenize(this.text);
7883
7883
  }
7884
- function Di() {
7884
+ function Ri() {
7885
7885
  var e = this, r = this.tokenizer.getContextRanges("arabicSentence");
7886
7886
  r.forEach(function(t) {
7887
7887
  var n = e.tokenizer.getRangeTokens(t);
@@ -7920,17 +7920,17 @@ function $r() {
7920
7920
  "glyphIndex modifier is required to apply arabic presentation features."
7921
7921
  );
7922
7922
  }
7923
- function Ai() {
7923
+ function Di() {
7924
7924
  var e = this, r = "arab";
7925
7925
  if (this.featuresTags.hasOwnProperty(r)) {
7926
7926
  $r.call(this);
7927
7927
  var t = this.tokenizer.getContextRanges("arabicWord");
7928
7928
  t.forEach(function(n) {
7929
- Ui.call(e, n);
7929
+ Fi.call(e, n);
7930
7930
  });
7931
7931
  }
7932
7932
  }
7933
- function Bi() {
7933
+ function Ai() {
7934
7934
  var e = this, r = "arab";
7935
7935
  if (this.featuresTags.hasOwnProperty(r)) {
7936
7936
  var t = this.featuresTags[r];
@@ -7938,12 +7938,12 @@ function Bi() {
7938
7938
  $r.call(this);
7939
7939
  var n = this.tokenizer.getContextRanges("arabicWord");
7940
7940
  n.forEach(function(a) {
7941
- Ci.call(e, a);
7941
+ Ui.call(e, a);
7942
7942
  });
7943
7943
  }
7944
7944
  }
7945
7945
  }
7946
- function Mi() {
7946
+ function Bi() {
7947
7947
  var e = this, r = "latn";
7948
7948
  if (this.featuresTags.hasOwnProperty(r)) {
7949
7949
  var t = this.featuresTags[r];
@@ -7951,7 +7951,7 @@ function Mi() {
7951
7951
  $r.call(this);
7952
7952
  var n = this.tokenizer.getContextRanges("latinWord");
7953
7953
  n.forEach(function(a) {
7954
- Li.call(e, a);
7954
+ Oi.call(e, a);
7955
7955
  });
7956
7956
  }
7957
7957
  }
@@ -7960,10 +7960,10 @@ ae.prototype.checkContextReady = function(e) {
7960
7960
  return !!this.tokenizer.getContext(e);
7961
7961
  };
7962
7962
  ae.prototype.applyFeaturesToContexts = function() {
7963
- this.checkContextReady("arabicWord") && (Ai.call(this), Bi.call(this)), this.checkContextReady("latinWord") && Mi.call(this), this.checkContextReady("arabicSentence") && Di.call(this);
7963
+ this.checkContextReady("arabicWord") && (Di.call(this), Ai.call(this)), this.checkContextReady("latinWord") && Bi.call(this), this.checkContextReady("arabicSentence") && Ri.call(this);
7964
7964
  };
7965
7965
  ae.prototype.processText = function(e) {
7966
- (!this.text || this.text !== e) && (this.setText(e), Ri.call(this), this.applyFeaturesToContexts());
7966
+ (!this.text || this.text !== e) && (this.setText(e), Li.call(this), this.applyFeaturesToContexts());
7967
7967
  };
7968
7968
  ae.prototype.getBidiText = function(e) {
7969
7969
  return this.processText(e), this.tokenizer.getText();
@@ -8132,7 +8132,7 @@ I.prototype.validate = function() {
8132
8132
  t("fontFamily"), t("weightName"), t("manufacturer"), t("copyright"), t("version"), this.unitsPerEm > 0;
8133
8133
  };
8134
8134
  I.prototype.toTables = function() {
8135
- return Ss.fontToTable(this);
8135
+ return bs.fontToTable(this);
8136
8136
  };
8137
8137
  I.prototype.toBuffer = function() {
8138
8138
  return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."), this.toArrayBuffer();
@@ -8146,7 +8146,7 @@ I.prototype.download = function(e) {
8146
8146
  var r = this.getEnglishName("fontFamily"), t = this.getEnglishName("fontSubfamily");
8147
8147
  e = e || r.replace(/\s/g, "") + "-" + t + ".otf";
8148
8148
  var n = this.toArrayBuffer();
8149
- if (ks())
8149
+ if (Ts())
8150
8150
  if (window.URL = window.URL || window.webkitURL, window.URL) {
8151
8151
  var a = new DataView(n), s = new Blob([a], { type: "font/opentype" }), o = document.createElement("a");
8152
8152
  o.href = window.URL.createObjectURL(s), o.download = e;
@@ -8155,7 +8155,7 @@ I.prototype.download = function(e) {
8155
8155
  } else
8156
8156
  console.warn("Font file could not be downloaded. Try using a different browser.");
8157
8157
  else {
8158
- var i = require("fs"), l = Fs(n);
8158
+ var i = require("fs"), l = ks(n);
8159
8159
  i.writeFileSync(e, l);
8160
8160
  }
8161
8161
  };
@@ -8215,7 +8215,7 @@ function An(e, r) {
8215
8215
  }
8216
8216
  return r[n] = e, n;
8217
8217
  }
8218
- function Ii(e, r, t) {
8218
+ function Mi(e, r, t) {
8219
8219
  var n = An(r.name, t);
8220
8220
  return [
8221
8221
  { name: "tag_" + e, type: "TAG", value: r.tag },
@@ -8226,11 +8226,11 @@ function Ii(e, r, t) {
8226
8226
  { name: "nameID_" + e, type: "USHORT", value: n }
8227
8227
  ];
8228
8228
  }
8229
- function Pi(e, r, t) {
8229
+ function Ii(e, r, t) {
8230
8230
  var n = {}, a = new k.Parser(e, r);
8231
8231
  return n.tag = a.parseTag(), n.minValue = a.parseFixed(), n.defaultValue = a.parseFixed(), n.maxValue = a.parseFixed(), a.skip("uShort", 1), n.name = t[a.parseUShort()] || {}, n;
8232
8232
  }
8233
- function Gi(e, r, t, n) {
8233
+ function Pi(e, r, t, n) {
8234
8234
  for (var a = An(r.name, n), s = [
8235
8235
  { name: "nameID_" + e, type: "USHORT", value: a },
8236
8236
  { name: "flags_" + e, type: "USHORT", value: 0 }
@@ -8244,14 +8244,14 @@ function Gi(e, r, t, n) {
8244
8244
  }
8245
8245
  return s;
8246
8246
  }
8247
- function Ni(e, r, t, n) {
8247
+ function Gi(e, r, t, n) {
8248
8248
  var a = {}, s = new k.Parser(e, r);
8249
8249
  a.name = n[s.parseUShort()] || {}, s.skip("uShort", 1), a.coordinates = {};
8250
8250
  for (var o = 0; o < t.length; ++o)
8251
8251
  a.coordinates[t[o].tag] = s.parseFixed();
8252
8252
  return a;
8253
8253
  }
8254
- function Hi(e, r) {
8254
+ function Ni(e, r) {
8255
8255
  var t = new S.Table("fvar", [
8256
8256
  { name: "version", type: "ULONG", value: 65536 },
8257
8257
  { name: "offsetToData", type: "USHORT", value: 0 },
@@ -8263,28 +8263,28 @@ function Hi(e, r) {
8263
8263
  ]);
8264
8264
  t.offsetToData = t.sizeOf();
8265
8265
  for (var n = 0; n < e.axes.length; n++)
8266
- t.fields = t.fields.concat(Ii(n, e.axes[n], r));
8266
+ t.fields = t.fields.concat(Mi(n, e.axes[n], r));
8267
8267
  for (var a = 0; a < e.instances.length; a++)
8268
- t.fields = t.fields.concat(Gi(a, e.instances[a], e.axes, r));
8268
+ t.fields = t.fields.concat(Pi(a, e.instances[a], e.axes, r));
8269
8269
  return t;
8270
8270
  }
8271
- function Wi(e, r, t) {
8271
+ function Hi(e, r, t) {
8272
8272
  var n = new k.Parser(e, r), a = n.parseULong();
8273
8273
  E.argument(a === 65536, "Unsupported fvar table version.");
8274
8274
  var s = n.parseOffset16();
8275
8275
  n.skip("uShort", 1);
8276
8276
  for (var o = n.parseUShort(), u = n.parseUShort(), i = n.parseUShort(), l = n.parseUShort(), f = [], c = 0; c < o; c++)
8277
- f.push(Pi(e, r + s + c * u, t));
8277
+ f.push(Ii(e, r + s + c * u, t));
8278
8278
  for (var p = [], h = r + s + o * u, d = 0; d < i; d++)
8279
- p.push(Ni(e, h + d * l, f, t));
8279
+ p.push(Gi(e, h + d * l, f, t));
8280
8280
  return { axes: f, instances: p };
8281
8281
  }
8282
- var zi = { make: Hi, parse: Wi }, _i = function() {
8282
+ var Wi = { make: Ni, parse: Hi }, zi = function() {
8283
8283
  return {
8284
8284
  coverage: this.parsePointer(v.coverage),
8285
8285
  attachPoints: this.parseList(v.pointer(v.uShortList))
8286
8286
  };
8287
- }, Vi = function() {
8287
+ }, _i = function() {
8288
8288
  var e = this.parseUShort();
8289
8289
  if (E.argument(
8290
8290
  e === 1 || e === 2 || e === 3,
@@ -8295,17 +8295,17 @@ var zi = { make: Hi, parse: Wi }, _i = function() {
8295
8295
  return { pointindex: this.parseShort() };
8296
8296
  if (e === 3)
8297
8297
  return { coordinate: this.parseShort() };
8298
+ }, Vi = function() {
8299
+ return this.parseList(v.pointer(_i));
8298
8300
  }, qi = function() {
8299
- return this.parseList(v.pointer(Vi));
8300
- }, Xi = function() {
8301
8301
  return {
8302
8302
  coverage: this.parsePointer(v.coverage),
8303
- ligGlyphs: this.parseList(v.pointer(qi))
8303
+ ligGlyphs: this.parseList(v.pointer(Vi))
8304
8304
  };
8305
- }, Yi = function() {
8305
+ }, Xi = function() {
8306
8306
  return this.parseUShort(), this.parseList(v.pointer(v.coverage));
8307
8307
  };
8308
- function $i(e, r) {
8308
+ function Yi(e, r) {
8309
8309
  r = r || 0;
8310
8310
  var t = new v(e, r), n = t.parseVersion(1);
8311
8311
  E.argument(
@@ -8315,13 +8315,13 @@ function $i(e, r) {
8315
8315
  var a = {
8316
8316
  version: n,
8317
8317
  classDef: t.parsePointer(v.classDef),
8318
- attachList: t.parsePointer(_i),
8319
- ligCaretList: t.parsePointer(Xi),
8318
+ attachList: t.parsePointer(zi),
8319
+ ligCaretList: t.parsePointer(qi),
8320
8320
  markAttachClassDef: t.parsePointer(v.classDef)
8321
8321
  };
8322
- return n >= 1.2 && (a.markGlyphSets = t.parsePointer(Yi)), a;
8322
+ return n >= 1.2 && (a.markGlyphSets = t.parsePointer(Xi)), a;
8323
8323
  }
8324
- var Zi = { parse: $i }, te = new Array(10);
8324
+ var $i = { parse: Yi }, te = new Array(10);
8325
8325
  te[1] = function() {
8326
8326
  var r = this.offset + this.relativeOffset, t = this.parseUShort();
8327
8327
  if (t === 1)
@@ -8399,7 +8399,7 @@ te[8] = function() {
8399
8399
  te[9] = function() {
8400
8400
  return { error: "GPOS Lookup 9 not supported" };
8401
8401
  };
8402
- function Qi(e, r) {
8402
+ function Zi(e, r) {
8403
8403
  r = r || 0;
8404
8404
  var t = new v(e, r), n = t.parseVersion(1);
8405
8405
  return E.argument(n === 1 || n === 1.1, "Unsupported GPOS table version " + n), n === 1 ? {
@@ -8415,17 +8415,17 @@ function Qi(e, r) {
8415
8415
  variations: t.parseFeatureVariationsList()
8416
8416
  };
8417
8417
  }
8418
- var Ki = new Array(10);
8419
- function ji(e) {
8418
+ var Qi = new Array(10);
8419
+ function Ki(e) {
8420
8420
  return new S.Table("GPOS", [
8421
8421
  { name: "version", type: "ULONG", value: 65536 },
8422
8422
  { name: "scripts", type: "TABLE", value: new S.ScriptList(e.scripts) },
8423
8423
  { name: "features", type: "TABLE", value: new S.FeatureList(e.features) },
8424
- { name: "lookups", type: "TABLE", value: new S.LookupList(e.lookups, Ki) }
8424
+ { name: "lookups", type: "TABLE", value: new S.LookupList(e.lookups, Qi) }
8425
8425
  ]);
8426
8426
  }
8427
- var Ji = { parse: Qi, make: ji };
8428
- function eu(e) {
8427
+ var ji = { parse: Zi, make: Ki };
8428
+ function Ji(e) {
8429
8429
  var r = {};
8430
8430
  e.skip("uShort");
8431
8431
  var t = e.parseUShort();
@@ -8438,7 +8438,7 @@ function eu(e) {
8438
8438
  }
8439
8439
  return r;
8440
8440
  }
8441
- function ru(e) {
8441
+ function eu(e) {
8442
8442
  var r = {};
8443
8443
  e.skip("uShort");
8444
8444
  var t = e.parseULong();
@@ -8454,24 +8454,24 @@ function ru(e) {
8454
8454
  }
8455
8455
  return r;
8456
8456
  }
8457
- function tu(e, r) {
8457
+ function ru(e, r) {
8458
8458
  var t = new k.Parser(e, r), n = t.parseUShort();
8459
8459
  if (n === 0)
8460
- return eu(t);
8460
+ return Ji(t);
8461
8461
  if (n === 1)
8462
- return ru(t);
8462
+ return eu(t);
8463
8463
  throw new Error("Unsupported kern table version (" + n + ").");
8464
8464
  }
8465
- var nu = { parse: tu };
8466
- function au(e, r, t, n) {
8465
+ var tu = { parse: ru };
8466
+ function nu(e, r, t, n) {
8467
8467
  for (var a = new k.Parser(e, r), s = n ? a.parseUShort : a.parseULong, o = [], u = 0; u < t + 1; u += 1) {
8468
8468
  var i = s.call(a);
8469
8469
  n && (i *= 2), o.push(i);
8470
8470
  }
8471
8471
  return o;
8472
8472
  }
8473
- var su = { parse: au };
8474
- function ou(e, r) {
8473
+ var au = { parse: nu };
8474
+ function su(e, r) {
8475
8475
  var t = require("fs");
8476
8476
  t.readFile(e, function(n, a) {
8477
8477
  if (n)
@@ -8479,7 +8479,7 @@ function ou(e, r) {
8479
8479
  r(null, Sn(a));
8480
8480
  });
8481
8481
  }
8482
- function iu(e, r) {
8482
+ function ou(e, r) {
8483
8483
  var t = new XMLHttpRequest();
8484
8484
  t.open("get", e, !0), t.responseType = "arraybuffer", t.onload = function() {
8485
8485
  return t.response ? r(null, t.response) : r("Font could not be loaded: " + t.statusText);
@@ -8494,7 +8494,7 @@ function Bt(e, r) {
8494
8494
  }
8495
8495
  return t;
8496
8496
  }
8497
- function uu(e, r) {
8497
+ function iu(e, r) {
8498
8498
  for (var t = [], n = 44, a = 0; a < r; a += 1) {
8499
8499
  var s = k.getTag(e, n), o = k.getULong(e, n + 4), u = k.getULong(e, n + 8), i = k.getULong(e, n + 12), l = void 0;
8500
8500
  u < i ? l = "WOFF" : l = !1, t.push({
@@ -8510,7 +8510,7 @@ function uu(e, r) {
8510
8510
  function W(e, r) {
8511
8511
  if (r.compression === "WOFF") {
8512
8512
  var t = new Uint8Array(e.buffer, r.offset + 2, r.compressedLength - 2), n = new Uint8Array(r.length);
8513
- if (jn(t, n), n.byteLength !== r.length)
8513
+ if (Kn(t, n), n.byteLength !== r.length)
8514
8514
  throw new Error("Decompression error: " + r.tag + " decompressed length doesn't match recorded length");
8515
8515
  var a = new DataView(n.buffer, 0);
8516
8516
  return { data: a, offset: 0 };
@@ -8532,7 +8532,7 @@ function Zr(e, r) {
8532
8532
  a.outlinesFormat = "cff";
8533
8533
  else
8534
8534
  throw new Error("Unsupported OpenType flavor " + i);
8535
- o = k.getUShort(s, 12), u = uu(s, o);
8535
+ o = k.getUShort(s, 12), u = iu(s, o);
8536
8536
  } else
8537
8537
  throw new Error("Unsupported OpenType signature " + i);
8538
8538
  for (var f, c, p, h, d, g, m, x, U, y, L, w, B = 0; B < o; B += 1) {
@@ -8605,7 +8605,7 @@ function Zr(e, r) {
8605
8605
  }
8606
8606
  var D = W(s, y);
8607
8607
  if (a.tables.name = gn.parse(D.data, D.offset, n), a.names = a.tables.name, p && U) {
8608
- var R = t === 0, A = W(s, U), H = su.parse(A.data, A.offset, a.numGlyphs, R), Q = W(s, p);
8608
+ var R = t === 0, A = W(s, U), H = au.parse(A.data, A.offset, a.numGlyphs, R), Q = W(s, p);
8609
8609
  a.glyphs = Un.parse(Q.data, Q.offset, H, a, r);
8610
8610
  } else if (f) {
8611
8611
  var G = W(s, f);
@@ -8613,18 +8613,18 @@ function Zr(e, r) {
8613
8613
  } else
8614
8614
  throw new Error("Font doesn't contain TrueType or CFF outlines.");
8615
8615
  var z = W(s, m);
8616
- if (ln.parse(a, z.data, z.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, r), xa(a, r), x) {
8616
+ if (ln.parse(a, z.data, z.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, r), ya(a, r), x) {
8617
8617
  var Y = W(s, x);
8618
- a.kerningPairs = nu.parse(Y.data, Y.offset);
8618
+ a.kerningPairs = tu.parse(Y.data, Y.offset);
8619
8619
  } else
8620
8620
  a.kerningPairs = {};
8621
8621
  if (h) {
8622
8622
  var _ = W(s, h);
8623
- a.tables.gdef = Zi.parse(_.data, _.offset);
8623
+ a.tables.gdef = $i.parse(_.data, _.offset);
8624
8624
  }
8625
8625
  if (d) {
8626
8626
  var P = W(s, d);
8627
- a.tables.gpos = Ji.parse(P.data, P.offset), a.position.init();
8627
+ a.tables.gpos = ji.parse(P.data, P.offset), a.position.init();
8628
8628
  }
8629
8629
  if (g) {
8630
8630
  var V = W(s, g);
@@ -8632,7 +8632,7 @@ function Zr(e, r) {
8632
8632
  }
8633
8633
  if (c) {
8634
8634
  var $ = W(s, c);
8635
- a.tables.fvar = zi.parse($.data, $.offset, a.names);
8635
+ a.tables.fvar = Wi.parse($.data, $.offset, a.names);
8636
8636
  }
8637
8637
  if (L) {
8638
8638
  var M = W(s, L);
@@ -8640,9 +8640,9 @@ function Zr(e, r) {
8640
8640
  }
8641
8641
  return a;
8642
8642
  }
8643
- function lu(e, r, t) {
8643
+ function uu(e, r, t) {
8644
8644
  t = t ?? {};
8645
- var n = typeof window > "u", a = n && !t.isUrl ? ou : iu;
8645
+ var n = typeof window > "u", a = n && !t.isUrl ? su : ou;
8646
8646
  return new Promise(function(s, o) {
8647
8647
  a(e, function(u, i) {
8648
8648
  if (u) {
@@ -8664,11 +8664,11 @@ function lu(e, r, t) {
8664
8664
  });
8665
8665
  });
8666
8666
  }
8667
- function fu(e, r) {
8667
+ function lu(e, r) {
8668
8668
  var t = require("fs"), n = t.readFileSync(e);
8669
8669
  return Zr(Sn(n), r);
8670
8670
  }
8671
- var pu = /* @__PURE__ */ Object.freeze({
8671
+ var fu = /* @__PURE__ */ Object.freeze({
8672
8672
  __proto__: null,
8673
8673
  Font: I,
8674
8674
  Glyph: K,
@@ -8676,10 +8676,10 @@ var pu = /* @__PURE__ */ Object.freeze({
8676
8676
  BoundingBox: he,
8677
8677
  _parse: k,
8678
8678
  parse: Zr,
8679
- load: lu,
8680
- loadSync: fu
8679
+ load: uu,
8680
+ loadSync: lu
8681
8681
  });
8682
- function cu(e, r) {
8682
+ function pu(e, r) {
8683
8683
  const t = { svgGlyphs: r };
8684
8684
  return new Proxy(e, {
8685
8685
  get(n, a, s) {
@@ -8696,7 +8696,7 @@ function cu(e, r) {
8696
8696
  }
8697
8697
  });
8698
8698
  }
8699
- const Ir = /* @__PURE__ */ new Map(), Zu = () => Ir, hu = async (e, r = !1) => {
8699
+ const Ir = /* @__PURE__ */ new Map(), Zu = () => Ir, cu = async (e, r = !1) => {
8700
8700
  const t = Ir.get(e);
8701
8701
  if (t) {
8702
8702
  if (r && !t.svgGlyphs) {
@@ -8715,16 +8715,16 @@ const Ir = /* @__PURE__ */ new Map(), Zu = () => Ir, hu = async (e, r = !1) => {
8715
8715
  throw new Error(
8716
8716
  `Failed to load font from ${e}: ${n.status} ${n.statusText}`
8717
8717
  );
8718
- const a = await n.arrayBuffer(), s = pu.parse(a);
8718
+ const a = await n.arrayBuffer(), s = fu.parse(a);
8719
8719
  let o;
8720
8720
  if (r) {
8721
8721
  const { extractSVGGlyphs: i } = await import("../index-F17NutRZ.js");
8722
8722
  o = await i(a);
8723
8723
  }
8724
- const u = cu(s, o);
8724
+ const u = pu(s, o);
8725
8725
  return Ir.set(e, u), u;
8726
- }, vu = 0.03125, Bn = 1.1, Mn = 0.2, $e = {
8727
- outlineWidth: vu,
8726
+ }, hu = 0.03125, Bn = 1.1, vu = 0.2, $e = {
8727
+ outlineWidth: hu,
8728
8728
  letterSpacing: 0,
8729
8729
  letterSpacingOutline: 0
8730
8730
  };
@@ -8774,15 +8774,15 @@ const gu = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8774
8774
  }
8775
8775
  }
8776
8776
  return l += s * (n * Bn), `M 0 ${l} L ${o} ${l}`;
8777
- }, In = ({
8777
+ }, Mn = ({
8778
8778
  boxDimensions: e,
8779
8779
  baseline: r,
8780
8780
  textHeight: t,
8781
8781
  verticalAlignment: n
8782
8782
  }) => {
8783
- const { width: a, height: s } = e, o = t * Mn, u = t + o, i = n === "top" ? 0 : s / 2 - u / 2, l = r + i, f = l + o;
8783
+ const { width: a, height: s } = e, o = t * vu, u = t + o, i = n === "top" ? 0 : s / 2 - u / 2, l = r + i, f = l + o;
8784
8784
  if (n !== "top" && (f > s || l - t < 0))
8785
- return In({
8785
+ return Mn({
8786
8786
  boxDimensions: e,
8787
8787
  baseline: r,
8788
8788
  textHeight: t,
@@ -8842,7 +8842,7 @@ const gu = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8842
8842
  height: h,
8843
8843
  baseline: d
8844
8844
  };
8845
- }, pr = _n, Tu = Vn, ku = () => new pr().parseFromString("<svg></svg>", "image/svg+xml"), Fu = ku();
8845
+ }, pr = zn, Tu = _n, ku = () => new pr().parseFromString("<svg></svg>", "image/svg+xml"), Fu = ku();
8846
8846
  Fu.readyState = "complete";
8847
8847
  const Uu = {
8848
8848
  aliceblue: "#f0f8ff",
@@ -9014,7 +9014,7 @@ const Uu = {
9014
9014
  Math.round((i + o) * 255),
9015
9015
  Math.round((l + o) * 255)
9016
9016
  ];
9017
- }, Eu = (e) => /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.test(e), Pn = (e) => {
9017
+ }, Eu = (e) => /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.test(e), In = (e) => {
9018
9018
  const r = e.trim().toLowerCase();
9019
9019
  if (r.startsWith("#") || /^[0-9a-f]{3}([0-9a-f]{3})?$/.test(r))
9020
9020
  return Eu(r) ? Cu(r) : void 0;
@@ -9072,7 +9072,7 @@ const Uu = {
9072
9072
  return r === "none" || !r ? !1 : r;
9073
9073
  }, Cr = (e) => {
9074
9074
  if (!(e === "none" || e === "transparent" || e.startsWith("url(")))
9075
- return Pn(e);
9075
+ return In(e);
9076
9076
  }, Du = (e) => {
9077
9077
  const r = Lu(e).reduce(
9078
9078
  (t, n) => {
@@ -9098,11 +9098,11 @@ const Uu = {
9098
9098
  const r = new pr().parseFromString(e, "image/svg+xml").querySelector("svg");
9099
9099
  return r ? Du(r) : [];
9100
9100
  };
9101
- function Gn(e) {
9101
+ function Pn(e) {
9102
9102
  const r = e.trim(), t = r.startsWith("<svg") || r.startsWith("<?xml"), n = t ? r : `<svg>${r}</svg>`;
9103
9103
  return { doc: new pr().parseFromString(n, "image/svg+xml"), wasWrapped: !t };
9104
9104
  }
9105
- function Nn(e, r) {
9105
+ function Gn(e, r) {
9106
9106
  const t = e.querySelector("svg");
9107
9107
  return t ? r ? t.innerHTML : t.outerHTML : "";
9108
9108
  }
@@ -9125,7 +9125,7 @@ function Mu(e) {
9125
9125
  }
9126
9126
  const Iu = ["fill", "stroke", "clip-path", "mask", "filter"];
9127
9127
  function Pu(e, r) {
9128
- const { doc: t, wasWrapped: n } = Gn(e), a = /* @__PURE__ */ new Map();
9128
+ const { doc: t, wasWrapped: n } = Pn(e), a = /* @__PURE__ */ new Map();
9129
9129
  for (const s of t.querySelectorAll("[id]")) {
9130
9130
  const o = s.getAttribute("id");
9131
9131
  if (!o) continue;
@@ -9153,16 +9153,16 @@ function Pu(e, r) {
9153
9153
  l && s.setAttribute(o, `#${l}`);
9154
9154
  }
9155
9155
  }
9156
- return Nn(t, n);
9156
+ return Gn(t, n);
9157
9157
  }
9158
9158
  const Gu = ["fill", "stroke", "stop-color"], Nu = ["path", "rect", "circle", "ellipse", "polygon", "polyline", "text"];
9159
9159
  function Hu(e, r) {
9160
- const { doc: t, wasWrapped: n } = Gn(e);
9160
+ const { doc: t, wasWrapped: n } = Pn(e);
9161
9161
  for (const s of Gu)
9162
9162
  for (const o of t.querySelectorAll(`[${s}]`)) {
9163
9163
  const u = o.getAttribute(s);
9164
9164
  if (!u || !Bu(u)) continue;
9165
- const i = Pn(u), l = i ? r[i] : void 0;
9165
+ const i = In(u), l = i ? r[i] : void 0;
9166
9166
  l && o.setAttribute(s, l.hex);
9167
9167
  }
9168
9168
  const a = r["#000000"];
@@ -9171,7 +9171,7 @@ function Hu(e, r) {
9171
9171
  for (const o of t.querySelectorAll(s))
9172
9172
  o.setAttribute("fill", a.hex);
9173
9173
  }
9174
- return Nn(t, n);
9174
+ return Gn(t, n);
9175
9175
  }
9176
9176
  const Wu = (e = [1, 0, 0, 1, 0, 0]) => {
9177
9177
  const r = `matrix(${e.join(",")})`, t = new Tu(r);
@@ -9191,7 +9191,7 @@ const It = (e, r, t) => e / t * r, _u = ({
9191
9191
  horizontalAlignment: s = "centre",
9192
9192
  colourMap: o
9193
9193
  }) => {
9194
- const { outlineWidth: u, letterSpacing: i, letterSpacingOutline: l } = a, f = new zn(r), c = u ? n * u * 2 : 0, p = f.getTotalLength(), h = e.getPaths(t, 0, 0, n, { drawSVG: !1 }), g = e.getPath(t, 0, 0, n, { drawSVG: !1 }).getBoundingBox(), m = g.x1 - c / 2, U = g.x2 + c / 2 - m, y = u > 0 ? l : i;
9194
+ const { outlineWidth: u, letterSpacing: i, letterSpacingOutline: l } = a, f = new Wn(r), c = u ? n * u * 2 : 0, p = f.getTotalLength(), h = e.getPaths(t, 0, 0, n, { drawSVG: !1 }), g = e.getPath(t, 0, 0, n, { drawSVG: !1 }).getBoundingBox(), m = g.x1 - c / 2, U = g.x2 + c / 2 - m, y = u > 0 ? l : i;
9195
9195
  let L = y ? y * n : 0;
9196
9196
  s === "distributed" && (L = t.length === 1 ? 0 : (p - U) / (t.length - 1));
9197
9197
  const w = L * (t.length - 1), B = U + w;
@@ -9218,10 +9218,10 @@ const It = (e, r, t) => e / t * r, _u = ({
9218
9218
  new fe(A.x1, 0),
9219
9219
  M,
9220
9220
  Be
9221
- ), Ce = De - Me.X, Hn = cr - Me.Y;
9221
+ ), Ce = De - Me.X, Nn = cr - Me.Y;
9222
9222
  let se = Wu();
9223
- se = se.translate(Ce, Hn), M && (se = se.translate(A.x1 + Ae / 2, 0), se = se.rotate(M), se = se.translate(-A.x1 - Ae / 2, 0));
9224
- const Wn = se.toString();
9223
+ se = se.translate(Ce, Nn), M && (se = se.translate(A.x1 + Ae / 2, 0), se = se.rotate(M), se = se.translate(-A.x1 - Ae / 2, 0));
9224
+ const Hn = se.toString();
9225
9225
  let ve = R.toPathData(2);
9226
9226
  ve.length && !ve.endsWith("Z") && (ve += "Z", ve = ve.replace(/M/g, "ZM"), ve = ve.substring(1));
9227
9227
  let hr;
@@ -9246,7 +9246,7 @@ const It = (e, r, t) => e / t * r, _u = ({
9246
9246
  attributes: {
9247
9247
  d: ve,
9248
9248
  "data-character": zu(t[D]),
9249
- transform: Wn
9249
+ transform: Hn
9250
9250
  },
9251
9251
  glyphData: {
9252
9252
  index: H.index,
@@ -9333,10 +9333,10 @@ const It = (e, r, t) => e / t * r, _u = ({
9333
9333
  mu(U.path), A = U.path;
9334
9334
  break;
9335
9335
  case "curved":
9336
- A = In({
9336
+ A = Mn({
9337
9337
  boxDimensions: s,
9338
9338
  baseline: L[R].baseline,
9339
- textHeight: L[R].height * (1 + Mn),
9339
+ textHeight: L[R].height,
9340
9340
  verticalAlignment: u
9341
9341
  });
9342
9342
  break;
@@ -9371,7 +9371,7 @@ const It = (e, r, t) => e / t * r, _u = ({
9371
9371
  strokeColour: c
9372
9372
  });
9373
9373
  }, Ku = async (e) => {
9374
- const { fontUrl: r, fontSizeFallback: t, ...n } = e, a = !!n.colourMap, s = await hu(r, a);
9374
+ const { fontUrl: r, fontSizeFallback: t, ...n } = e, a = !!n.colourMap, s = await cu(r, a);
9375
9375
  try {
9376
9376
  return Nt({ ...n, font: s });
9377
9377
  } catch (o) {
@@ -9381,17 +9381,17 @@ const It = (e, r, t) => e / t * r, _u = ({
9381
9381
  }
9382
9382
  };
9383
9383
  export {
9384
- vu as DEFAULT_OUTLINE_FACTOR,
9384
+ hu as DEFAULT_OUTLINE_FACTOR,
9385
9385
  $e as DEFAULT_SPACING,
9386
9386
  Bn as LINE_HEIGHT,
9387
- In as generateCurvedBaseline,
9387
+ Mn as generateCurvedBaseline,
9388
9388
  yu as generateFlatBaseline,
9389
9389
  Zu as getFontCache,
9390
9390
  Qu as getFontColours,
9391
9391
  bu as getFontSizeFromPhysicalSize,
9392
9392
  Ku as getRenderedText,
9393
9393
  Su as getTextMetricsAtFontSize,
9394
- hu as loadOpentypeFont,
9394
+ cu as loadOpentypeFont,
9395
9395
  gu as normaliseBaselineOption,
9396
9396
  Nt as renderText,
9397
9397
  mu as validateCustomBaselinePath