@mlightcad/mtext-renderer 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +574 -560
- package/dist/index.umd.cjs +7 -7
- package/dist/mtext-renderer-worker.js +139 -125
- package/lib/renderer/mtextProcessor.d.ts +3 -0
- package/package.json +1 -1
- package/lib/renderer/mtext.charBoxes.test.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _ from "three";
|
|
2
|
-
import { BufferGeometry as zi, BufferAttribute as Wi, ShapePath as Ia, ShapeUtils as Da, Shape as qi, LineCurve as ar, QuadraticBezierCurve as mn, CubicBezierCurve as
|
|
2
|
+
import { BufferGeometry as zi, BufferAttribute as Wi, ShapePath as Ia, ShapeUtils as Da, Shape as qi, LineCurve as ar, QuadraticBezierCurve as mn, CubicBezierCurve as bn, EllipseCurve as xn } from "three";
|
|
3
3
|
class Sn {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.listeners = [];
|
|
@@ -300,7 +300,7 @@ const _a = (t) => t.split("/").pop(), wn = (t) => {
|
|
|
300
300
|
16777215,
|
|
301
301
|
0
|
|
302
302
|
], Xi = (t) => Vi[t];
|
|
303
|
-
class
|
|
303
|
+
class ji {
|
|
304
304
|
constructor() {
|
|
305
305
|
this.cache = /* @__PURE__ */ new Map();
|
|
306
306
|
}
|
|
@@ -358,7 +358,7 @@ class Yi {
|
|
|
358
358
|
}
|
|
359
359
|
class Pa {
|
|
360
360
|
constructor(e) {
|
|
361
|
-
this.names = /* @__PURE__ */ new Set(), this.unsupportedChars = {}, this.encoding = e.encoding, e.alias.forEach((r) => this.names.add(r)), this.cache = new
|
|
361
|
+
this.names = /* @__PURE__ */ new Set(), this.unsupportedChars = {}, this.encoding = e.encoding, e.alias.forEach((r) => this.names.add(r)), this.cache = new ji();
|
|
362
362
|
}
|
|
363
363
|
/**
|
|
364
364
|
* Records an unsupported character in the font.
|
|
@@ -376,7 +376,7 @@ class Na extends _.Shape {
|
|
|
376
376
|
}
|
|
377
377
|
const Mr = (t, e) => e.some((r) => t instanceof r);
|
|
378
378
|
let Fn, kn;
|
|
379
|
-
function
|
|
379
|
+
function Yi() {
|
|
380
380
|
return Fn || (Fn = [
|
|
381
381
|
IDBDatabase,
|
|
382
382
|
IDBObjectStore,
|
|
@@ -398,7 +398,7 @@ function $i(t) {
|
|
|
398
398
|
const a = () => {
|
|
399
399
|
t.removeEventListener("success", i), t.removeEventListener("error", s);
|
|
400
400
|
}, i = () => {
|
|
401
|
-
r(
|
|
401
|
+
r(et(t.result)), a();
|
|
402
402
|
}, s = () => {
|
|
403
403
|
n(t.error), a();
|
|
404
404
|
};
|
|
@@ -429,7 +429,7 @@ let Dr = {
|
|
|
429
429
|
if (e === "store")
|
|
430
430
|
return r.objectStoreNames[1] ? void 0 : r.objectStore(r.objectStoreNames[0]);
|
|
431
431
|
}
|
|
432
|
-
return
|
|
432
|
+
return et(t[e]);
|
|
433
433
|
},
|
|
434
434
|
set(t, e, r) {
|
|
435
435
|
return t[e] = r, !0;
|
|
@@ -443,15 +443,15 @@ function Ga(t) {
|
|
|
443
443
|
}
|
|
444
444
|
function Qi(t) {
|
|
445
445
|
return Zi().includes(t) ? function(...e) {
|
|
446
|
-
return t.apply(_r(this), e),
|
|
446
|
+
return t.apply(_r(this), e), et(this.request);
|
|
447
447
|
} : function(...e) {
|
|
448
|
-
return
|
|
448
|
+
return et(t.apply(_r(this), e));
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
451
|
function Ji(t) {
|
|
452
|
-
return typeof t == "function" ? Qi(t) : (t instanceof IDBTransaction && Ki(t), Mr(t,
|
|
452
|
+
return typeof t == "function" ? Qi(t) : (t instanceof IDBTransaction && Ki(t), Mr(t, Yi()) ? new Proxy(t, Dr) : t);
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function et(t) {
|
|
455
455
|
if (t instanceof IDBRequest)
|
|
456
456
|
return $i(t);
|
|
457
457
|
if (ir.has(t))
|
|
@@ -461,9 +461,9 @@ function Je(t) {
|
|
|
461
461
|
}
|
|
462
462
|
const _r = (t) => Jt.get(t);
|
|
463
463
|
function es(t, e, { blocked: r, upgrade: n, blocking: a, terminated: i } = {}) {
|
|
464
|
-
const s = indexedDB.open(t, e), o =
|
|
464
|
+
const s = indexedDB.open(t, e), o = et(s);
|
|
465
465
|
return n && s.addEventListener("upgradeneeded", (c) => {
|
|
466
|
-
n(
|
|
466
|
+
n(et(s.result), c.oldVersion, c.newVersion, et(s.transaction), c);
|
|
467
467
|
}), r && s.addEventListener("blocked", (c) => r(
|
|
468
468
|
// Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
|
|
469
469
|
c.oldVersion,
|
|
@@ -702,13 +702,13 @@ String.prototype.codePointAt || function() {
|
|
|
702
702
|
}) : String.prototype.codePointAt = e;
|
|
703
703
|
}();
|
|
704
704
|
var Zr = 0, za = -3;
|
|
705
|
-
function
|
|
705
|
+
function bt() {
|
|
706
706
|
this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
|
|
707
707
|
}
|
|
708
708
|
function ss(t, e) {
|
|
709
|
-
this.source = t, this.sourceIndex = 0, this.tag = 0, this.bitcount = 0, this.dest = e, this.destLen = 0, this.ltree = new
|
|
709
|
+
this.source = t, this.sourceIndex = 0, this.tag = 0, this.bitcount = 0, this.dest = e, this.destLen = 0, this.ltree = new bt(), this.dtree = new bt();
|
|
710
710
|
}
|
|
711
|
-
var Wa = new
|
|
711
|
+
var Wa = new bt(), qa = new bt(), $r = new Uint8Array(30), Kr = new Uint16Array(30), Va = new Uint8Array(30), Xa = new Uint16Array(30), os = new Uint8Array([
|
|
712
712
|
16,
|
|
713
713
|
17,
|
|
714
714
|
18,
|
|
@@ -728,8 +728,8 @@ var Wa = new xt(), qa = new xt(), $r = new Uint8Array(30), Kr = new Uint16Array(
|
|
|
728
728
|
14,
|
|
729
729
|
1,
|
|
730
730
|
15
|
|
731
|
-
]), An = new
|
|
732
|
-
function
|
|
731
|
+
]), An = new bt(), Ue = new Uint8Array(320);
|
|
732
|
+
function ja(t, e, r, n) {
|
|
733
733
|
var a, i;
|
|
734
734
|
for (a = 0; a < r; ++a)
|
|
735
735
|
t[a] = 0;
|
|
@@ -865,12 +865,12 @@ function fs(t, e) {
|
|
|
865
865
|
return r.destLen < r.dest.length ? typeof r.dest.slice == "function" ? r.dest.slice(0, r.destLen) : r.dest.subarray(0, r.destLen) : r.dest;
|
|
866
866
|
}
|
|
867
867
|
cs(Wa, qa);
|
|
868
|
-
|
|
869
|
-
|
|
868
|
+
ja($r, Kr, 4, 3);
|
|
869
|
+
ja(Va, Xa, 2, 1);
|
|
870
870
|
$r[28] = 0;
|
|
871
871
|
Kr[28] = 258;
|
|
872
872
|
var ps = fs;
|
|
873
|
-
function
|
|
873
|
+
function nt(t, e, r, n, a) {
|
|
874
874
|
return Math.pow(1 - a, 3) * t + 3 * Math.pow(1 - a, 2) * a * e + 3 * (1 - a) * Math.pow(a, 2) * r + Math.pow(a, 3) * n;
|
|
875
875
|
}
|
|
876
876
|
function Xe() {
|
|
@@ -896,16 +896,16 @@ Xe.prototype.addBezier = function(t, e, r, n, a, i, s, o) {
|
|
|
896
896
|
if (S === 0) {
|
|
897
897
|
if (g === 0)
|
|
898
898
|
continue;
|
|
899
|
-
var
|
|
900
|
-
0 <
|
|
899
|
+
var x = -v / g;
|
|
900
|
+
0 < x && x < 1 && (f === 0 && this.addX(nt(c[f], u[f], h[f], d[f], x)), f === 1 && this.addY(nt(c[f], u[f], h[f], d[f], x)));
|
|
901
901
|
continue;
|
|
902
902
|
}
|
|
903
903
|
var m = Math.pow(g, 2) - 4 * v * S;
|
|
904
904
|
if (!(m < 0)) {
|
|
905
905
|
var F = (-g + Math.sqrt(m)) / (2 * S);
|
|
906
|
-
0 < F && F < 1 && (f === 0 && this.addX(
|
|
906
|
+
0 < F && F < 1 && (f === 0 && this.addX(nt(c[f], u[f], h[f], d[f], F)), f === 1 && this.addY(nt(c[f], u[f], h[f], d[f], F)));
|
|
907
907
|
var w = (-g - Math.sqrt(m)) / (2 * S);
|
|
908
|
-
0 < w && w < 1 && (f === 0 && this.addX(
|
|
908
|
+
0 < w && w < 1 && (f === 0 && this.addX(nt(c[f], u[f], h[f], d[f], w)), f === 1 && this.addY(nt(c[f], u[f], h[f], d[f], w)));
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
911
|
};
|
|
@@ -1024,13 +1024,13 @@ oe.prototype.toDOMElement = function(t) {
|
|
|
1024
1024
|
var e = this.toPathData(t), r = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1025
1025
|
return r.setAttribute("d", e), r;
|
|
1026
1026
|
};
|
|
1027
|
-
function
|
|
1027
|
+
function Ya(t) {
|
|
1028
1028
|
throw new Error(t);
|
|
1029
1029
|
}
|
|
1030
1030
|
function Ln(t, e) {
|
|
1031
|
-
t ||
|
|
1031
|
+
t || Ya(e);
|
|
1032
1032
|
}
|
|
1033
|
-
var P = { fail:
|
|
1033
|
+
var P = { fail: Ya, argument: Ln, assert: Ln }, On = 32768, Rn = 2147483648, ut = {}, R = {}, N = {};
|
|
1034
1034
|
function Ce(t) {
|
|
1035
1035
|
return function() {
|
|
1036
1036
|
return t;
|
|
@@ -1413,7 +1413,7 @@ he.prototype.encode = function() {
|
|
|
1413
1413
|
he.prototype.sizeOf = function() {
|
|
1414
1414
|
return N.TABLE(this);
|
|
1415
1415
|
};
|
|
1416
|
-
function
|
|
1416
|
+
function xt(t, e, r) {
|
|
1417
1417
|
r === void 0 && (r = e.length);
|
|
1418
1418
|
var n = new Array(e.length + 1);
|
|
1419
1419
|
n[0] = { name: t + "Count", type: "USHORT", value: r };
|
|
@@ -1439,7 +1439,7 @@ function Xt(t) {
|
|
|
1439
1439
|
t.format === 1 ? he.call(
|
|
1440
1440
|
this,
|
|
1441
1441
|
"coverageTable",
|
|
1442
|
-
[{ name: "coverageFormat", type: "USHORT", value: 1 }].concat(
|
|
1442
|
+
[{ name: "coverageFormat", type: "USHORT", value: 1 }].concat(xt("glyph", t.glyphs))
|
|
1443
1443
|
) : t.format === 2 ? he.call(
|
|
1444
1444
|
this,
|
|
1445
1445
|
"coverageTable",
|
|
@@ -1454,7 +1454,7 @@ function Xt(t) {
|
|
|
1454
1454
|
}
|
|
1455
1455
|
Xt.prototype = Object.create(he.prototype);
|
|
1456
1456
|
Xt.prototype.constructor = Xt;
|
|
1457
|
-
function
|
|
1457
|
+
function jt(t) {
|
|
1458
1458
|
he.call(
|
|
1459
1459
|
this,
|
|
1460
1460
|
"scriptListTable",
|
|
@@ -1466,7 +1466,7 @@ function Yt(t) {
|
|
|
1466
1466
|
{ name: "defaultLangSys", type: "TABLE", value: new he("defaultLangSys", [
|
|
1467
1467
|
{ name: "lookupOrder", type: "USHORT", value: 0 },
|
|
1468
1468
|
{ name: "reqFeatureIndex", type: "USHORT", value: a.reqFeatureIndex }
|
|
1469
|
-
].concat(
|
|
1469
|
+
].concat(xt("featureIndex", a.featureIndexes))) }
|
|
1470
1470
|
].concat(St("langSys", n.langSysRecords, function(i, s) {
|
|
1471
1471
|
var o = i.langSys;
|
|
1472
1472
|
return [
|
|
@@ -1474,16 +1474,16 @@ function Yt(t) {
|
|
|
1474
1474
|
{ name: "langSys" + s, type: "TABLE", value: new he("langSys", [
|
|
1475
1475
|
{ name: "lookupOrder", type: "USHORT", value: 0 },
|
|
1476
1476
|
{ name: "reqFeatureIndex", type: "USHORT", value: o.reqFeatureIndex }
|
|
1477
|
-
].concat(
|
|
1477
|
+
].concat(xt("featureIndex", o.featureIndexes))) }
|
|
1478
1478
|
];
|
|
1479
1479
|
}))) }
|
|
1480
1480
|
];
|
|
1481
1481
|
})
|
|
1482
1482
|
);
|
|
1483
1483
|
}
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
function
|
|
1484
|
+
jt.prototype = Object.create(he.prototype);
|
|
1485
|
+
jt.prototype.constructor = jt;
|
|
1486
|
+
function Yt(t) {
|
|
1487
1487
|
he.call(
|
|
1488
1488
|
this,
|
|
1489
1489
|
"featureListTable",
|
|
@@ -1493,13 +1493,13 @@ function jt(t) {
|
|
|
1493
1493
|
{ name: "featureTag" + r, type: "TAG", value: e.tag },
|
|
1494
1494
|
{ name: "feature" + r, type: "TABLE", value: new he("featureTable", [
|
|
1495
1495
|
{ name: "featureParams", type: "USHORT", value: n.featureParams }
|
|
1496
|
-
].concat(
|
|
1496
|
+
].concat(xt("lookupListIndex", n.lookupListIndexes))) }
|
|
1497
1497
|
];
|
|
1498
1498
|
})
|
|
1499
1499
|
);
|
|
1500
1500
|
}
|
|
1501
|
-
|
|
1502
|
-
|
|
1501
|
+
Yt.prototype = Object.create(he.prototype);
|
|
1502
|
+
Yt.prototype.constructor = Yt;
|
|
1503
1503
|
function Zt(t, e) {
|
|
1504
1504
|
he.call(this, "lookupListTable", zr("lookup", t, function(r) {
|
|
1505
1505
|
var n = e[r.lookupType];
|
|
@@ -1515,10 +1515,10 @@ var M = {
|
|
|
1515
1515
|
Table: he,
|
|
1516
1516
|
Record: he,
|
|
1517
1517
|
Coverage: Xt,
|
|
1518
|
-
ScriptList:
|
|
1519
|
-
FeatureList:
|
|
1518
|
+
ScriptList: jt,
|
|
1519
|
+
FeatureList: Yt,
|
|
1520
1520
|
LookupList: Zt,
|
|
1521
|
-
ushortList:
|
|
1521
|
+
ushortList: xt,
|
|
1522
1522
|
tableList: zr,
|
|
1523
1523
|
recordList: St
|
|
1524
1524
|
};
|
|
@@ -1538,12 +1538,12 @@ function Za(t, e) {
|
|
|
1538
1538
|
var r = t.getInt16(e, !1), n = t.getUint16(e + 2, !1);
|
|
1539
1539
|
return r + n / 65535;
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function bs(t, e) {
|
|
1542
1542
|
for (var r = "", n = e; n < e + 4; n += 1)
|
|
1543
1543
|
r += String.fromCharCode(t.getInt8(n));
|
|
1544
1544
|
return r;
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function xs(t, e, r) {
|
|
1547
1547
|
for (var n = 0, a = 0; a < r; a += 1)
|
|
1548
1548
|
n <<= 8, n += t.getUint8(e + a);
|
|
1549
1549
|
return n;
|
|
@@ -1863,8 +1863,8 @@ var D = {
|
|
|
1863
1863
|
getShort: ms,
|
|
1864
1864
|
getULong: Qr,
|
|
1865
1865
|
getFixed: Za,
|
|
1866
|
-
getTag:
|
|
1867
|
-
getOffset:
|
|
1866
|
+
getTag: bs,
|
|
1867
|
+
getOffset: xs,
|
|
1868
1868
|
getBytes: Ss,
|
|
1869
1869
|
bytesToString: ws,
|
|
1870
1870
|
Parser: E
|
|
@@ -1882,8 +1882,8 @@ function Ts(t, e, r, n, a) {
|
|
|
1882
1882
|
var i;
|
|
1883
1883
|
t.segCount = i = e.parseUShort() >> 1, e.skip("uShort", 3), t.glyphIndexMap = {};
|
|
1884
1884
|
for (var s = new D.Parser(r, n + a + 14), o = new D.Parser(r, n + a + 16 + i * 2), c = new D.Parser(r, n + a + 16 + i * 4), u = new D.Parser(r, n + a + 16 + i * 6), h = n + a + 16 + i * 8, d = 0; d < i - 1; d += 1)
|
|
1885
|
-
for (var f = void 0, g = s.parseUShort(), S = o.parseUShort(), v = c.parseShort(),
|
|
1886
|
-
|
|
1885
|
+
for (var f = void 0, g = s.parseUShort(), S = o.parseUShort(), v = c.parseShort(), x = u.parseUShort(), m = S; m <= g; m += 1)
|
|
1886
|
+
x !== 0 ? (h = u.offset + u.relativeOffset - 2, h += x, h += (m - S) * 2, f = D.getUShort(r, h), f !== 0 && (f = f + v & 65535)) : f = m + v & 65535, t.glyphIndexMap[m] = f;
|
|
1887
1887
|
}
|
|
1888
1888
|
function Cs(t, e) {
|
|
1889
1889
|
var r = {};
|
|
@@ -1967,8 +1967,8 @@ function Us(t) {
|
|
|
1967
1967
|
As(i);
|
|
1968
1968
|
var c = i.segments.length, u = 0, h = [], d = [], f = [], g = [], S = [], v = [];
|
|
1969
1969
|
for (r = 0; r < c; r += 1) {
|
|
1970
|
-
var
|
|
1971
|
-
|
|
1970
|
+
var x = i.segments[r];
|
|
1971
|
+
x.end <= 65535 && x.start <= 65535 ? (h = h.concat({ name: "end_" + r, type: "USHORT", value: x.end }), d = d.concat({ name: "start_" + r, type: "USHORT", value: x.start }), f = f.concat({ name: "idDelta_" + r, type: "SHORT", value: x.delta }), g = g.concat({ name: "idRangeOffset_" + r, type: "USHORT", value: x.offset }), x.glyphId !== void 0 && (S = S.concat({ name: "glyph_" + r, type: "USHORT", value: x.glyphId }))) : u += 1, !e && x.glyphIndex !== void 0 && (v = v.concat({ name: "cmap12Start_" + r, type: "ULONG", value: x.start }), v = v.concat({ name: "cmap12End_" + r, type: "ULONG", value: x.end }), v = v.concat({ name: "cmap12Glyph_" + r, type: "ULONG", value: x.glyphIndex }));
|
|
1972
1972
|
}
|
|
1973
1973
|
if (i.segCountX2 = (c - u) * 2, i.searchRange = Math.pow(2, Math.floor(Math.log(c - u) / Math.log(2))) * 2, i.entrySelector = Math.log(i.searchRange / 2) / Math.log(2), i.rangeShift = i.segCountX2 - i.searchRange, i.fields = i.fields.concat(h), i.fields.push({ name: "reservedPad", type: "USHORT", value: 0 }), i.fields = i.fields.concat(d), i.fields = i.fields.concat(f), i.fields = i.fields.concat(g), i.fields = i.fields.concat(S), i.cmap4Length = 14 + // Subtable header
|
|
1974
1974
|
h.length * 2 + 2 + // reservedPad
|
|
@@ -3224,7 +3224,7 @@ function Ms(t, e) {
|
|
|
3224
3224
|
function Is(t, e, r, n, a) {
|
|
3225
3225
|
t.beginPath(), t.moveTo(e, r), t.lineTo(n, a), t.stroke();
|
|
3226
3226
|
}
|
|
3227
|
-
var
|
|
3227
|
+
var Ye = { line: Is };
|
|
3228
3228
|
function Ds(t, e) {
|
|
3229
3229
|
var r = e || new oe();
|
|
3230
3230
|
return {
|
|
@@ -3321,9 +3321,9 @@ Se.prototype.drawPoints = function(t, e, r, n) {
|
|
|
3321
3321
|
};
|
|
3322
3322
|
Se.prototype.drawMetrics = function(t, e, r, n) {
|
|
3323
3323
|
var a;
|
|
3324
|
-
e = e !== void 0 ? e : 0, r = r !== void 0 ? r : 0, n = n !== void 0 ? n : 24, a = 1 / this.path.unitsPerEm * n, t.lineWidth = 1, t.strokeStyle = "black",
|
|
3324
|
+
e = e !== void 0 ? e : 0, r = r !== void 0 ? r : 0, n = n !== void 0 ? n : 24, a = 1 / this.path.unitsPerEm * n, t.lineWidth = 1, t.strokeStyle = "black", Ye.line(t, e, -1e4, e, 1e4), Ye.line(t, -1e4, r, 1e4, r);
|
|
3325
3325
|
var i = this.xMin || 0, s = this.yMin || 0, o = this.xMax || 0, c = this.yMax || 0, u = this.advanceWidth || 0;
|
|
3326
|
-
t.strokeStyle = "blue",
|
|
3326
|
+
t.strokeStyle = "blue", Ye.line(t, e + i * a, -1e4, e + i * a, 1e4), Ye.line(t, e + o * a, -1e4, e + o * a, 1e4), Ye.line(t, -1e4, r + -s * a, 1e4, r + -s * a), Ye.line(t, -1e4, r + -c * a, 1e4, r + -c * a), t.strokeStyle = "green", Ye.line(t, e + u * a, -1e4, e + u * a, 1e4);
|
|
3327
3327
|
};
|
|
3328
3328
|
function Pt(t, e, r) {
|
|
3329
3329
|
Object.defineProperty(t, e, {
|
|
@@ -3567,7 +3567,7 @@ function Dn(t, e, r, n) {
|
|
|
3567
3567
|
}
|
|
3568
3568
|
return a;
|
|
3569
3569
|
}
|
|
3570
|
-
function
|
|
3570
|
+
function js(t, e, r, n) {
|
|
3571
3571
|
var a, i, s = new D.Parser(t, e);
|
|
3572
3572
|
r -= 1;
|
|
3573
3573
|
var o = [".notdef"], c = s.parseCard8();
|
|
@@ -3590,7 +3590,7 @@ function Ys(t, e, r, n) {
|
|
|
3590
3590
|
throw new Error("Unknown charset format " + c);
|
|
3591
3591
|
return o;
|
|
3592
3592
|
}
|
|
3593
|
-
function
|
|
3593
|
+
function Ys(t, e, r) {
|
|
3594
3594
|
var n, a = {}, i = new D.Parser(t, e), s = i.parseCard8();
|
|
3595
3595
|
if (s === 0)
|
|
3596
3596
|
for (var o = i.parseCard8(), c = 0; c < o; c += 1)
|
|
@@ -3606,13 +3606,13 @@ function js(t, e, r) {
|
|
|
3606
3606
|
return new Kt(a, r);
|
|
3607
3607
|
}
|
|
3608
3608
|
function _n(t, e, r) {
|
|
3609
|
-
var n, a, i, s, o = new oe(), c = [], u = 0, h = !1, d = !1, f = 0, g = 0, S, v,
|
|
3609
|
+
var n, a, i, s, o = new oe(), c = [], u = 0, h = !1, d = !1, f = 0, g = 0, S, v, x, m;
|
|
3610
3610
|
if (t.isCIDFont) {
|
|
3611
3611
|
var F = t.tables.cff.topDict._fdSelect[e.index], w = t.tables.cff.topDict._fdArray[F];
|
|
3612
|
-
S = w._subrs, v = w._subrsBias,
|
|
3612
|
+
S = w._subrs, v = w._subrsBias, x = w._defaultWidthX, m = w._nominalWidthX;
|
|
3613
3613
|
} else
|
|
3614
|
-
S = t.tables.cff.topDict._subrs, v = t.tables.cff.topDict._subrsBias,
|
|
3615
|
-
var k =
|
|
3614
|
+
S = t.tables.cff.topDict._subrs, v = t.tables.cff.topDict._subrsBias, x = t.tables.cff.topDict._defaultWidthX, m = t.tables.cff.topDict._nominalWidthX;
|
|
3615
|
+
var k = x;
|
|
3616
3616
|
function C(O, H) {
|
|
3617
3617
|
d && o.closePath(), o.moveTo(O, H), d = !0;
|
|
3618
3618
|
}
|
|
@@ -3621,7 +3621,7 @@ function _n(t, e, r) {
|
|
|
3621
3621
|
O = c.length % 2 !== 0, O && !h && (k = c.shift() + m), u += c.length >> 1, c.length = 0, h = !0;
|
|
3622
3622
|
}
|
|
3623
3623
|
function B(O) {
|
|
3624
|
-
for (var H, W, z, ce, ie,
|
|
3624
|
+
for (var H, W, z, ce, ie, Y, Z, $, te, se, ae, ue, G = 0; G < O.length; ) {
|
|
3625
3625
|
var V = O[G];
|
|
3626
3626
|
switch (G += 1, V) {
|
|
3627
3627
|
case 1:
|
|
@@ -3650,7 +3650,7 @@ function _n(t, e, r) {
|
|
|
3650
3650
|
n = f + c.shift(), a = g + c.shift(), i = n + c.shift(), s = a + c.shift(), f = i + c.shift(), g = s + c.shift(), o.curveTo(n, a, i, s, f, g);
|
|
3651
3651
|
break;
|
|
3652
3652
|
case 10:
|
|
3653
|
-
ie = c.pop() + v,
|
|
3653
|
+
ie = c.pop() + v, Y = S[ie], Y && B(Y);
|
|
3654
3654
|
break;
|
|
3655
3655
|
case 11:
|
|
3656
3656
|
return;
|
|
@@ -3713,7 +3713,7 @@ function _n(t, e, r) {
|
|
|
3713
3713
|
H = O[G], W = O[G + 1], c.push((H << 24 | W << 16) >> 16), G += 2;
|
|
3714
3714
|
break;
|
|
3715
3715
|
case 29:
|
|
3716
|
-
ie = c.pop() + t.gsubrsBias,
|
|
3716
|
+
ie = c.pop() + t.gsubrsBias, Y = t.gsubrs[ie], Y && B(Y);
|
|
3717
3717
|
break;
|
|
3718
3718
|
case 30:
|
|
3719
3719
|
for (; c.length > 0 && (n = f, a = g + c.shift(), i = n + c.shift(), s = a + c.shift(), f = i + c.shift(), g = s + (c.length === 1 ? c.shift() : 0), o.curveTo(n, a, i, s, f, g), c.length !== 0); )
|
|
@@ -3773,16 +3773,16 @@ function $s(t, e, r, n) {
|
|
|
3773
3773
|
var g = He(t, d), S = Dn(t, e, g.objects, o.objects);
|
|
3774
3774
|
h._fdArray = S, f += e, h._fdSelect = Zs(t, f, r.numGlyphs, S.length);
|
|
3775
3775
|
}
|
|
3776
|
-
var v = e + h.private[1],
|
|
3777
|
-
if (r.defaultWidthX =
|
|
3778
|
-
var m = v +
|
|
3776
|
+
var v = e + h.private[1], x = ai(t, v, h.private[0], o.objects);
|
|
3777
|
+
if (r.defaultWidthX = x.defaultWidthX, r.nominalWidthX = x.nominalWidthX, x.subrs !== 0) {
|
|
3778
|
+
var m = v + x.subrs, F = He(t, m);
|
|
3779
3779
|
r.subrs = F.objects, r.subrsBias = Wr(r.subrs);
|
|
3780
3780
|
} else
|
|
3781
3781
|
r.subrs = [], r.subrsBias = 0;
|
|
3782
3782
|
var w;
|
|
3783
3783
|
n.lowMemory ? (w = Gs(t, e + h.charStrings), r.nGlyphs = w.offsets.length) : (w = He(t, e + h.charStrings), r.nGlyphs = w.objects.length);
|
|
3784
|
-
var k =
|
|
3785
|
-
if (h.encoding === 0 ? r.cffEncoding = new Kt(Bs, k) : h.encoding === 1 ? r.cffEncoding = new Kt(Ls, k) : r.cffEncoding =
|
|
3784
|
+
var k = js(t, e + h.charset, r.nGlyphs, o.objects);
|
|
3785
|
+
if (h.encoding === 0 ? r.cffEncoding = new Kt(Bs, k) : h.encoding === 1 ? r.cffEncoding = new Kt(Ls, k) : r.cffEncoding = Ys(t, e + h.encoding, k), r.encoding = r.encoding || r.cffEncoding, r.glyphs = new Me.GlyphSet(r), n.lowMemory)
|
|
3786
3786
|
r._push = function(B) {
|
|
3787
3787
|
var O = Hs(B, w.offsets, t, e + h.charStrings);
|
|
3788
3788
|
r.glyphs.push(B, Me.cffGlyphLoader(r, B, _n, O));
|
|
@@ -4208,7 +4208,7 @@ var fi = { parse: yo, make: mo }, pi = [
|
|
|
4208
4208
|
149: "kl",
|
|
4209
4209
|
150: "az",
|
|
4210
4210
|
151: "nn"
|
|
4211
|
-
},
|
|
4211
|
+
}, bo = {
|
|
4212
4212
|
0: 0,
|
|
4213
4213
|
// langEnglish → smRoman
|
|
4214
4214
|
1: 0,
|
|
@@ -4661,7 +4661,7 @@ var fi = { parse: yo, make: mo }, pi = [
|
|
|
4661
4661
|
1144: "ii",
|
|
4662
4662
|
1130: "yo"
|
|
4663
4663
|
};
|
|
4664
|
-
function
|
|
4664
|
+
function xo(t, e, r) {
|
|
4665
4665
|
switch (t) {
|
|
4666
4666
|
case 0:
|
|
4667
4667
|
if (e === 65535)
|
|
@@ -4780,12 +4780,12 @@ function vi(t, e, r) {
|
|
|
4780
4780
|
}
|
|
4781
4781
|
function Fo(t, e, r) {
|
|
4782
4782
|
for (var n = {}, a = new D.Parser(t, e), i = a.parseUShort(), s = a.parseUShort(), o = a.offset + a.parseUShort(), c = 0; c < s; c++) {
|
|
4783
|
-
var u = a.parseUShort(), h = a.parseUShort(), d = a.parseUShort(), f = a.parseUShort(), g = pi[f] || f, S = a.parseUShort(), v = a.parseUShort(),
|
|
4784
|
-
if (m !== void 0 &&
|
|
4783
|
+
var u = a.parseUShort(), h = a.parseUShort(), d = a.parseUShort(), f = a.parseUShort(), g = pi[f] || f, S = a.parseUShort(), v = a.parseUShort(), x = xo(u, d, r), m = vi(u, h, d);
|
|
4784
|
+
if (m !== void 0 && x !== void 0) {
|
|
4785
4785
|
var F = void 0;
|
|
4786
4786
|
if (m === qr ? F = ut.UTF16(t, o + v, S) : F = ut.MACSTRING(t, o + v, S, m), F) {
|
|
4787
4787
|
var w = n[g];
|
|
4788
|
-
w === void 0 && (w = n[g] = {}), w[
|
|
4788
|
+
w === void 0 && (w = n[g] = {}), w[x] = F;
|
|
4789
4789
|
}
|
|
4790
4790
|
}
|
|
4791
4791
|
}
|
|
@@ -4840,11 +4840,11 @@ function To(t, e) {
|
|
|
4840
4840
|
r = n[f];
|
|
4841
4841
|
var g = a[r];
|
|
4842
4842
|
for (var S in g) {
|
|
4843
|
-
var v = g[S],
|
|
4844
|
-
k === void 0 && (
|
|
4843
|
+
var v = g[S], x = 1, m = c[S], F = bo[m], w = vi(x, F, m), k = R.MACSTRING(v, w);
|
|
4844
|
+
k === void 0 && (x = 0, m = e.indexOf(S), m < 0 && (m = e.length, e.push(S)), F = 4, k = R.UTF16(v));
|
|
4845
4845
|
var C = Hn(k, d);
|
|
4846
4846
|
h.push(Gn(
|
|
4847
|
-
|
|
4847
|
+
x,
|
|
4848
4848
|
F,
|
|
4849
4849
|
m,
|
|
4850
4850
|
r,
|
|
@@ -5274,7 +5274,7 @@ Fe[4] = function() {
|
|
|
5274
5274
|
})
|
|
5275
5275
|
};
|
|
5276
5276
|
};
|
|
5277
|
-
var
|
|
5277
|
+
var st = {
|
|
5278
5278
|
sequenceIndex: E.uShort,
|
|
5279
5279
|
lookupListIndex: E.uShort
|
|
5280
5280
|
};
|
|
@@ -5288,7 +5288,7 @@ Fe[5] = function() {
|
|
|
5288
5288
|
var i = this.parseUShort(), s = this.parseUShort();
|
|
5289
5289
|
return {
|
|
5290
5290
|
input: this.parseUShortList(i - 1),
|
|
5291
|
-
lookupRecords: this.parseRecordList(s,
|
|
5291
|
+
lookupRecords: this.parseRecordList(s, st)
|
|
5292
5292
|
};
|
|
5293
5293
|
})
|
|
5294
5294
|
};
|
|
@@ -5301,7 +5301,7 @@ Fe[5] = function() {
|
|
|
5301
5301
|
var i = this.parseUShort(), s = this.parseUShort();
|
|
5302
5302
|
return {
|
|
5303
5303
|
classes: this.parseUShortList(i - 1),
|
|
5304
|
-
lookupRecords: this.parseRecordList(s,
|
|
5304
|
+
lookupRecords: this.parseRecordList(s, st)
|
|
5305
5305
|
};
|
|
5306
5306
|
})
|
|
5307
5307
|
};
|
|
@@ -5310,7 +5310,7 @@ Fe[5] = function() {
|
|
|
5310
5310
|
return {
|
|
5311
5311
|
substFormat: r,
|
|
5312
5312
|
coverages: this.parseList(n, E.pointer(E.coverage)),
|
|
5313
|
-
lookupRecords: this.parseRecordList(a,
|
|
5313
|
+
lookupRecords: this.parseRecordList(a, st)
|
|
5314
5314
|
};
|
|
5315
5315
|
}
|
|
5316
5316
|
P.assert(!1, "0x" + e.toString(16) + ": lookup type 5 format must be 1, 2 or 3.");
|
|
@@ -5326,7 +5326,7 @@ Fe[6] = function() {
|
|
|
5326
5326
|
backtrack: this.parseUShortList(),
|
|
5327
5327
|
input: this.parseUShortList(this.parseShort() - 1),
|
|
5328
5328
|
lookahead: this.parseUShortList(),
|
|
5329
|
-
lookupRecords: this.parseRecordList(
|
|
5329
|
+
lookupRecords: this.parseRecordList(st)
|
|
5330
5330
|
};
|
|
5331
5331
|
})
|
|
5332
5332
|
};
|
|
@@ -5342,7 +5342,7 @@ Fe[6] = function() {
|
|
|
5342
5342
|
backtrack: this.parseUShortList(),
|
|
5343
5343
|
input: this.parseUShortList(this.parseShort() - 1),
|
|
5344
5344
|
lookahead: this.parseUShortList(),
|
|
5345
|
-
lookupRecords: this.parseRecordList(
|
|
5345
|
+
lookupRecords: this.parseRecordList(st)
|
|
5346
5346
|
};
|
|
5347
5347
|
})
|
|
5348
5348
|
};
|
|
@@ -5352,7 +5352,7 @@ Fe[6] = function() {
|
|
|
5352
5352
|
backtrackCoverage: this.parseList(E.pointer(E.coverage)),
|
|
5353
5353
|
inputCoverage: this.parseList(E.pointer(E.coverage)),
|
|
5354
5354
|
lookaheadCoverage: this.parseList(E.pointer(E.coverage)),
|
|
5355
|
-
lookupRecords: this.parseRecordList(
|
|
5355
|
+
lookupRecords: this.parseRecordList(st)
|
|
5356
5356
|
};
|
|
5357
5357
|
P.assert(!1, "0x" + e.toString(16) + ": lookup type 6 format must be 1, 2 or 3.");
|
|
5358
5358
|
};
|
|
@@ -5474,7 +5474,7 @@ function Oo(t) {
|
|
|
5474
5474
|
{ name: "lookups", type: "TABLE", value: new M.LookupList(t.lookups, ht) }
|
|
5475
5475
|
]);
|
|
5476
5476
|
}
|
|
5477
|
-
var
|
|
5477
|
+
var bi = { parse: Lo, make: Oo };
|
|
5478
5478
|
function Ro(t, e) {
|
|
5479
5479
|
var r = new D.Parser(t, e), n = r.parseULong();
|
|
5480
5480
|
P.argument(n === 1, "Unsupported META table version."), r.parseULong(), r.parseULong();
|
|
@@ -5497,7 +5497,7 @@ function Mo(t) {
|
|
|
5497
5497
|
}
|
|
5498
5498
|
return a.fields.push({ name: "stringPool", type: "CHARARRAY", value: r }), a;
|
|
5499
5499
|
}
|
|
5500
|
-
var
|
|
5500
|
+
var xi = { parse: Ro, make: Mo };
|
|
5501
5501
|
function zn(t) {
|
|
5502
5502
|
return Math.log(t) / Math.log(2) | 0;
|
|
5503
5503
|
}
|
|
@@ -5557,11 +5557,11 @@ function Io(t) {
|
|
|
5557
5557
|
}
|
|
5558
5558
|
function Do(t) {
|
|
5559
5559
|
for (var e = [], r = [], n = [], a = [], i = [], s = [], o = [], c, u = 0, h = 0, d = 0, f = 0, g = 0, S = 0; S < t.glyphs.length; S += 1) {
|
|
5560
|
-
var v = t.glyphs.get(S),
|
|
5560
|
+
var v = t.glyphs.get(S), x = v.unicode | 0;
|
|
5561
5561
|
if (isNaN(v.advanceWidth))
|
|
5562
5562
|
throw new Error("Glyph " + v.name + " (" + S + "): advanceWidth is not a number.");
|
|
5563
|
-
(c >
|
|
5564
|
-
var m = Xr.getUnicodeRange(
|
|
5563
|
+
(c > x || c === void 0) && x > 0 && (c = x), u < x && (u = x);
|
|
5564
|
+
var m = Xr.getUnicodeRange(x);
|
|
5565
5565
|
if (m < 32)
|
|
5566
5566
|
h |= 1 << m;
|
|
5567
5567
|
else if (m < 64)
|
|
@@ -5634,11 +5634,11 @@ function Do(t) {
|
|
|
5634
5634
|
// Use space as the break character, if available.
|
|
5635
5635
|
}, t.tables.os2)), O = hi.make(t.glyphs), H = $a.make(t.glyphs), W = t.getEnglishName("fontFamily"), z = t.getEnglishName("fontSubfamily"), ce = W + " " + z, ie = t.getEnglishName("postScriptName");
|
|
5636
5636
|
ie || (ie = W.replace(/\s/g, "") + "-" + z);
|
|
5637
|
-
var
|
|
5637
|
+
var Y = {};
|
|
5638
5638
|
for (var Z in t.names)
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
var $ = [], te = yi.make(
|
|
5639
|
+
Y[Z] = t.names[Z];
|
|
5640
|
+
Y.uniqueID || (Y.uniqueID = { en: t.getEnglishName("manufacturer") + ":" + ce }), Y.postScriptName || (Y.postScriptName = { en: ie }), Y.preferredFamily || (Y.preferredFamily = t.names.fontFamily), Y.preferredSubfamily || (Y.preferredSubfamily = t.names.fontSubfamily);
|
|
5641
|
+
var $ = [], te = yi.make(Y, $), se = $.length > 0 ? li.make($) : void 0, ae = mi.make(), ue = oi.make(t.glyphs, {
|
|
5642
5642
|
version: t.getEnglishName("version"),
|
|
5643
5643
|
fullName: ce,
|
|
5644
5644
|
familyName: W,
|
|
@@ -5646,16 +5646,16 @@ function Do(t) {
|
|
|
5646
5646
|
postScriptName: ie,
|
|
5647
5647
|
unitsPerEm: t.unitsPerEm,
|
|
5648
5648
|
fontBBox: [0, w.yMin, w.ascender, w.advanceWidthMax]
|
|
5649
|
-
}), G = t.metas && Object.keys(t.metas).length > 0 ?
|
|
5650
|
-
se && V.push(se), t.tables.gsub && V.push(
|
|
5651
|
-
for (var
|
|
5649
|
+
}), G = t.metas && Object.keys(t.metas).length > 0 ? xi.make(t.metas) : void 0, V = [k, C, L, B, te, H, ae, ue, O];
|
|
5650
|
+
se && V.push(se), t.tables.gsub && V.push(bi.make(t.tables.gsub)), G && V.push(G);
|
|
5651
|
+
for (var rt = Si(V), Bt = rt.encode(), Lt = tn(Bt), ft = rt.fields, Ot = !1, Pe = 0; Pe < ft.length; Pe += 1)
|
|
5652
5652
|
if (ft[Pe].name === "head table") {
|
|
5653
5653
|
ft[Pe].value.checkSumAdjustment = 2981146554 - Lt, Ot = !0;
|
|
5654
5654
|
break;
|
|
5655
5655
|
}
|
|
5656
5656
|
if (!Ot)
|
|
5657
5657
|
throw new Error("Could not find head table with checkSum to adjust.");
|
|
5658
|
-
return
|
|
5658
|
+
return rt;
|
|
5659
5659
|
}
|
|
5660
5660
|
var _o = { make: Si, fontToTable: Do, computeCheckSum: tn };
|
|
5661
5661
|
function hr(t, e) {
|
|
@@ -6119,7 +6119,7 @@ function pt(t, e) {
|
|
|
6119
6119
|
if (!t)
|
|
6120
6120
|
throw e;
|
|
6121
6121
|
}
|
|
6122
|
-
function
|
|
6122
|
+
function jn(t, e, r, n, a) {
|
|
6123
6123
|
var i;
|
|
6124
6124
|
return (e & n) > 0 ? (i = t.parseByte(), e & a || (i = -i), i = r + i) : (e & a) > 0 ? i = r : i = r + t.parseShort(), i;
|
|
6125
6125
|
}
|
|
@@ -6144,10 +6144,10 @@ function wi(t, e, r) {
|
|
|
6144
6144
|
if (u > 0) {
|
|
6145
6145
|
for (var v = 0; v < u; v += 1)
|
|
6146
6146
|
i = a[v], S = {}, S.onCurve = !!(i & 1), S.lastPointOfContour = s.indexOf(v) >= 0, g.push(S);
|
|
6147
|
-
for (var
|
|
6148
|
-
i = a[m], S = g[m], S.x =
|
|
6147
|
+
for (var x = 0, m = 0; m < u; m += 1)
|
|
6148
|
+
i = a[m], S = g[m], S.x = jn(n, i, x, 2, 16), x = S.x;
|
|
6149
6149
|
for (var F = 0, w = 0; w < u; w += 1)
|
|
6150
|
-
i = a[w], S = g[w], S.y =
|
|
6150
|
+
i = a[w], S = g[w], S.y = jn(n, i, F, 4, 32), F = S.y;
|
|
6151
6151
|
}
|
|
6152
6152
|
t.points = g;
|
|
6153
6153
|
} else
|
|
@@ -6263,7 +6263,7 @@ function Wo(t, e, r, n) {
|
|
|
6263
6263
|
function qo(t, e, r, n, a) {
|
|
6264
6264
|
return a.lowMemory ? Wo(t, e, r, n) : zo(t, e, r, n);
|
|
6265
6265
|
}
|
|
6266
|
-
var Ti = { getPath: Fi, parse: qo }, Ci,
|
|
6266
|
+
var Ti = { getPath: Fi, parse: qo }, Ci, tt, Ei, jr;
|
|
6267
6267
|
function Ai(t) {
|
|
6268
6268
|
this.font = t, this.getCommands = function(e) {
|
|
6269
6269
|
return Ti.getPath(e).commands;
|
|
@@ -6278,10 +6278,10 @@ function Ui(t) {
|
|
|
6278
6278
|
function Xo(t) {
|
|
6279
6279
|
return Math.sign(t) * Math.round(Math.abs(t * 2)) / 2;
|
|
6280
6280
|
}
|
|
6281
|
-
function
|
|
6281
|
+
function jo(t) {
|
|
6282
6282
|
return Math.sign(t) * (Math.round(Math.abs(t) + 0.5) - 0.5);
|
|
6283
6283
|
}
|
|
6284
|
-
function
|
|
6284
|
+
function Yo(t) {
|
|
6285
6285
|
return Math.sign(t) * Math.ceil(Math.abs(t));
|
|
6286
6286
|
}
|
|
6287
6287
|
function Zo(t) {
|
|
@@ -6489,7 +6489,7 @@ Ai.prototype.exec = function(t, e) {
|
|
|
6489
6489
|
if (!a) {
|
|
6490
6490
|
ze.prototype = $o, a = this._fpgmState = new ze("fpgm", r.tables.fpgm), a.funcs = [], a.font = r, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
|
|
6491
6491
|
try {
|
|
6492
|
-
|
|
6492
|
+
tt(a);
|
|
6493
6493
|
} catch (u) {
|
|
6494
6494
|
console.log("Hinting error in FPGM:" + u), this._errorState = 3;
|
|
6495
6495
|
return;
|
|
@@ -6504,7 +6504,7 @@ Ai.prototype.exec = function(t, e) {
|
|
|
6504
6504
|
n.cvt = [];
|
|
6505
6505
|
exports.DEBUG && (console.log("---EXEC PREP---"), n.step = -1);
|
|
6506
6506
|
try {
|
|
6507
|
-
|
|
6507
|
+
tt(n);
|
|
6508
6508
|
} catch (u) {
|
|
6509
6509
|
this._errorState < 2 && console.log("Hinting error in PREP:" + u), this._errorState = 2;
|
|
6510
6510
|
}
|
|
@@ -6521,15 +6521,15 @@ Ai.prototype.exec = function(t, e) {
|
|
|
6521
6521
|
Ei = function(t, e) {
|
|
6522
6522
|
var r = e.ppem / e.font.unitsPerEm, n = r, a = t.components, i, s, o;
|
|
6523
6523
|
if (ze.prototype = e, !a)
|
|
6524
|
-
o = new ze("glyf", t.instructions), exports.DEBUG && (console.log("---EXEC GLYPH---"), o.step = -1),
|
|
6524
|
+
o = new ze("glyf", t.instructions), exports.DEBUG && (console.log("---EXEC GLYPH---"), o.step = -1), jr(t, o, r, n), s = o.gZone;
|
|
6525
6525
|
else {
|
|
6526
6526
|
var c = e.font;
|
|
6527
6527
|
s = [], i = [];
|
|
6528
6528
|
for (var u = 0; u < a.length; u++) {
|
|
6529
6529
|
var h = a[u], d = c.glyphs.get(h.glyphIndex);
|
|
6530
|
-
o = new ze("glyf", d.instructions), exports.DEBUG && (console.log("---EXEC COMP " + u + "---"), o.step = -1),
|
|
6531
|
-
for (var f = Math.round(h.dx * r), g = Math.round(h.dy * n), S = o.gZone, v = o.contours,
|
|
6532
|
-
var m = S[
|
|
6530
|
+
o = new ze("glyf", d.instructions), exports.DEBUG && (console.log("---EXEC COMP " + u + "---"), o.step = -1), jr(d, o, r, n);
|
|
6531
|
+
for (var f = Math.round(h.dx * r), g = Math.round(h.dy * n), S = o.gZone, v = o.contours, x = 0; x < S.length; x++) {
|
|
6532
|
+
var m = S[x];
|
|
6533
6533
|
m.xTouched = m.yTouched = !1, m.xo = m.x = m.x + f, m.yo = m.y = m.y + g;
|
|
6534
6534
|
}
|
|
6535
6535
|
var F = s.length;
|
|
@@ -6540,11 +6540,11 @@ Ei = function(t, e) {
|
|
|
6540
6540
|
t.instructions && !o.inhibitGridFit && (o = new ze("glyf", t.instructions), o.gZone = o.z0 = o.z1 = o.z2 = s, o.contours = i, s.push(
|
|
6541
6541
|
new _e(0, 0),
|
|
6542
6542
|
new _e(Math.round(t.advanceWidth * r), 0)
|
|
6543
|
-
), exports.DEBUG && (console.log("---EXEC COMPOSITE---"), o.step = -1),
|
|
6543
|
+
), exports.DEBUG && (console.log("---EXEC COMPOSITE---"), o.step = -1), tt(o), s.length -= 2);
|
|
6544
6544
|
}
|
|
6545
6545
|
return s;
|
|
6546
6546
|
};
|
|
6547
|
-
|
|
6547
|
+
jr = function(t, e, r, n) {
|
|
6548
6548
|
for (var a = t.points || [], i = a.length, s = e.gZone = e.z0 = e.z1 = e.z2 = [], o = e.contours = [], c, u = 0; u < i; u++)
|
|
6549
6549
|
c = a[u], s[u] = new _e(
|
|
6550
6550
|
c.x * r,
|
|
@@ -6563,14 +6563,14 @@ Yr = function(t, e, r, n) {
|
|
|
6563
6563
|
if (s.push(
|
|
6564
6564
|
new _e(0, 0),
|
|
6565
6565
|
new _e(Math.round(t.advanceWidth * r), 0)
|
|
6566
|
-
),
|
|
6566
|
+
), tt(e), s.length -= 2, exports.DEBUG) {
|
|
6567
6567
|
console.log("FINISHED GLYPH", e.stack);
|
|
6568
6568
|
for (var S = 0; S < i; S++)
|
|
6569
6569
|
console.log(S, s[S].x, s[S].y);
|
|
6570
6570
|
}
|
|
6571
6571
|
}
|
|
6572
6572
|
};
|
|
6573
|
-
|
|
6573
|
+
tt = function(t) {
|
|
6574
6574
|
var e = t.prog;
|
|
6575
6575
|
if (e) {
|
|
6576
6576
|
var r = e.length, n;
|
|
@@ -6607,7 +6607,7 @@ function Li(t, e) {
|
|
|
6607
6607
|
while (a > 0);
|
|
6608
6608
|
t.ip = n;
|
|
6609
6609
|
}
|
|
6610
|
-
function
|
|
6610
|
+
function Yn(t, e) {
|
|
6611
6611
|
exports.DEBUG && console.log(e.step, "SVTCA[" + t.axis + "]"), e.fv = e.pv = e.dpv = t;
|
|
6612
6612
|
}
|
|
6613
6613
|
function Zn(t, e) {
|
|
@@ -6650,8 +6650,8 @@ function tc(t) {
|
|
|
6650
6650
|
function rc(t) {
|
|
6651
6651
|
var e = t.stack, r = e.pop(), n = e.pop(), a = e.pop(), i = e.pop(), s = e.pop(), o = t.z0, c = t.z1, u = o[r], h = o[n], d = c[a], f = c[i], g = t.z2[s];
|
|
6652
6652
|
exports.DEBUG && console.log("ISECT[], ", r, n, a, i, s);
|
|
6653
|
-
var S = u.x, v = u.y,
|
|
6654
|
-
g.x = (B * (F - k) - O * (S -
|
|
6653
|
+
var S = u.x, v = u.y, x = h.x, m = h.y, F = d.x, w = d.y, k = f.x, C = f.y, L = (S - x) * (w - C) - (v - m) * (F - k), B = S * m - v * x, O = F * C - w * k;
|
|
6654
|
+
g.x = (B * (F - k) - O * (S - x)) / L, g.y = (B * (w - C) - O * (v - m)) / L;
|
|
6655
6655
|
}
|
|
6656
6656
|
function nc(t) {
|
|
6657
6657
|
t.rp0 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP0[]", t.rp0);
|
|
@@ -6721,7 +6721,7 @@ function lc(t) {
|
|
|
6721
6721
|
exports.DEBUG && console.log(t.step, "RTG[]"), t.round = Ui;
|
|
6722
6722
|
}
|
|
6723
6723
|
function fc(t) {
|
|
6724
|
-
exports.DEBUG && console.log(t.step, "RTHG[]"), t.round =
|
|
6724
|
+
exports.DEBUG && console.log(t.step, "RTHG[]"), t.round = jo;
|
|
6725
6725
|
}
|
|
6726
6726
|
function pc(t) {
|
|
6727
6727
|
var e = t.stack.pop();
|
|
@@ -6748,11 +6748,11 @@ function fr(t) {
|
|
|
6748
6748
|
function mc(t) {
|
|
6749
6749
|
exports.DEBUG && console.log(t.step, "CLEAR[]"), t.stack.length = 0;
|
|
6750
6750
|
}
|
|
6751
|
-
function
|
|
6751
|
+
function bc(t) {
|
|
6752
6752
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6753
6753
|
exports.DEBUG && console.log(t.step, "SWAP[]"), e.push(r), e.push(n);
|
|
6754
6754
|
}
|
|
6755
|
-
function
|
|
6755
|
+
function xc(t) {
|
|
6756
6756
|
var e = t.stack;
|
|
6757
6757
|
exports.DEBUG && console.log(t.step, "DEPTH[]"), e.push(e.length);
|
|
6758
6758
|
}
|
|
@@ -6762,7 +6762,7 @@ function Sc(t) {
|
|
|
6762
6762
|
var a = t.ip, i = t.prog;
|
|
6763
6763
|
t.prog = t.funcs[r];
|
|
6764
6764
|
for (var s = 0; s < n; s++)
|
|
6765
|
-
|
|
6765
|
+
tt(t), exports.DEBUG && console.log(
|
|
6766
6766
|
++t.step,
|
|
6767
6767
|
s + 1 < n ? "next loopcall" : "done loopcall",
|
|
6768
6768
|
s
|
|
@@ -6773,7 +6773,7 @@ function wc(t) {
|
|
|
6773
6773
|
var e = t.stack.pop();
|
|
6774
6774
|
exports.DEBUG && console.log(t.step, "CALL[]", e);
|
|
6775
6775
|
var r = t.ip, n = t.prog;
|
|
6776
|
-
t.prog = t.funcs[e],
|
|
6776
|
+
t.prog = t.funcs[e], tt(t), t.ip = r, t.prog = n, exports.DEBUG && console.log(++t.step, "returning from", e);
|
|
6777
6777
|
}
|
|
6778
6778
|
function Fc(t) {
|
|
6779
6779
|
var e = t.stack, r = e.pop();
|
|
@@ -6983,10 +6983,10 @@ function Xc(t) {
|
|
|
6983
6983
|
var e = t.stack.pop();
|
|
6984
6984
|
exports.DEBUG && console.log(t.step, "IF[]", e), e || (Li(t, !0), exports.DEBUG && console.log(t.step, "EIF[]"));
|
|
6985
6985
|
}
|
|
6986
|
-
function
|
|
6986
|
+
function jc(t) {
|
|
6987
6987
|
exports.DEBUG && console.log(t.step, "EIF[]");
|
|
6988
6988
|
}
|
|
6989
|
-
function
|
|
6989
|
+
function Yc(t) {
|
|
6990
6990
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6991
6991
|
exports.DEBUG && console.log(t.step, "AND[]", r, n), e.push(r && n ? 1 : 0);
|
|
6992
6992
|
}
|
|
@@ -7146,7 +7146,7 @@ function hu(t) {
|
|
|
7146
7146
|
exports.DEBUG && console.log(t.step, "ROFF[]"), t.round = Vo;
|
|
7147
7147
|
}
|
|
7148
7148
|
function lu(t) {
|
|
7149
|
-
exports.DEBUG && console.log(t.step, "RUTG[]"), t.round =
|
|
7149
|
+
exports.DEBUG && console.log(t.step, "RUTG[]"), t.round = Yo;
|
|
7150
7150
|
}
|
|
7151
7151
|
function fu(t) {
|
|
7152
7152
|
exports.DEBUG && console.log(t.step, "RDTG[]"), t.round = Zo;
|
|
@@ -7181,7 +7181,7 @@ function mu(t) {
|
|
|
7181
7181
|
var e = t.stack.pop();
|
|
7182
7182
|
exports.DEBUG && console.log(t.step, "SCANTYPE[]", e);
|
|
7183
7183
|
}
|
|
7184
|
-
function
|
|
7184
|
+
function bu(t) {
|
|
7185
7185
|
var e = t.stack.pop(), r = t.stack.pop();
|
|
7186
7186
|
switch (exports.DEBUG && console.log(t.step, "INSTCTRL[]", e, r), e) {
|
|
7187
7187
|
case 1:
|
|
@@ -7211,8 +7211,8 @@ function Ge(t, e) {
|
|
|
7211
7211
|
e.ip = r;
|
|
7212
7212
|
}
|
|
7213
7213
|
function I(t, e, r, n, a, i) {
|
|
7214
|
-
var s = i.stack, o = t && s.pop(), c = s.pop(), u = i.rp0, h = i.z0[u], d = i.z1[c], f = i.minDis, g = i.fv, S = i.dpv, v,
|
|
7215
|
-
|
|
7214
|
+
var s = i.stack, o = t && s.pop(), c = s.pop(), u = i.rp0, h = i.z0[u], d = i.z1[c], f = i.minDis, g = i.fv, S = i.dpv, v, x, m, F;
|
|
7215
|
+
x = v = S.distance(d, h, !0, !0), m = x >= 0 ? 1 : -1, x = Math.abs(x), t && (F = i.cvt[o], n && Math.abs(x - F) < i.cvCutIn && (x = F)), r && x < f && (x = f), n && (x = i.round(x)), g.setRelative(d, h, m * x, S), g.touch(d), exports.DEBUG && console.log(
|
|
7216
7216
|
i.step,
|
|
7217
7217
|
(t ? "MIRP[" : "MDRP[") + (e ? "M" : "m") + (r ? ">" : "_") + (n ? "R" : "_") + (a === 0 ? "Gr" : a === 1 ? "Bl" : a === 2 ? "Wh" : "") + "]",
|
|
7218
7218
|
t ? o + "(" + i.cvt[o] + "," + F + ")" : "",
|
|
@@ -7220,15 +7220,15 @@ function I(t, e, r, n, a, i) {
|
|
|
7220
7220
|
"(d =",
|
|
7221
7221
|
v,
|
|
7222
7222
|
"->",
|
|
7223
|
-
m *
|
|
7223
|
+
m * x,
|
|
7224
7224
|
")"
|
|
7225
7225
|
), i.rp1 = i.rp0, i.rp2 = c, e && (i.rp0 = c);
|
|
7226
7226
|
}
|
|
7227
7227
|
Ci = [
|
|
7228
7228
|
/* 0x00 */
|
|
7229
|
-
|
|
7229
|
+
Yn.bind(void 0, De),
|
|
7230
7230
|
/* 0x01 */
|
|
7231
|
-
|
|
7231
|
+
Yn.bind(void 0, Oe),
|
|
7232
7232
|
/* 0x02 */
|
|
7233
7233
|
Zn.bind(void 0, De),
|
|
7234
7234
|
/* 0x03 */
|
|
@@ -7298,9 +7298,9 @@ Ci = [
|
|
|
7298
7298
|
/* 0x22 */
|
|
7299
7299
|
mc,
|
|
7300
7300
|
/* 0x23 */
|
|
7301
|
-
xc,
|
|
7302
|
-
/* 0x24 */
|
|
7303
7301
|
bc,
|
|
7302
|
+
/* 0x24 */
|
|
7303
|
+
xc,
|
|
7304
7304
|
/* 0x25 */
|
|
7305
7305
|
Fc,
|
|
7306
7306
|
/* 0x26 */
|
|
@@ -7413,9 +7413,9 @@ Ci = [
|
|
|
7413
7413
|
/* 0x58 */
|
|
7414
7414
|
Xc,
|
|
7415
7415
|
/* 0x59 */
|
|
7416
|
-
Yc,
|
|
7417
|
-
/* 0x5A */
|
|
7418
7416
|
jc,
|
|
7417
|
+
/* 0x5A */
|
|
7418
|
+
Yc,
|
|
7419
7419
|
/* 0x5B */
|
|
7420
7420
|
Zc,
|
|
7421
7421
|
/* 0x5C */
|
|
@@ -7531,7 +7531,7 @@ Ci = [
|
|
|
7531
7531
|
/* 0x8D */
|
|
7532
7532
|
mu,
|
|
7533
7533
|
/* 0x8E */
|
|
7534
|
-
|
|
7534
|
+
bu,
|
|
7535
7535
|
/* 0x8F */
|
|
7536
7536
|
void 0,
|
|
7537
7537
|
/* 0x90 */
|
|
@@ -7765,7 +7765,7 @@ function lt(t) {
|
|
|
7765
7765
|
function nn(t, e, r) {
|
|
7766
7766
|
this.contextName = r, this.startIndex = t, this.endOffset = e;
|
|
7767
7767
|
}
|
|
7768
|
-
function
|
|
7768
|
+
function xu(t, e, r) {
|
|
7769
7769
|
this.contextName = t, this.openRange = null, this.ranges = [], this.checkStart = e, this.checkEnd = r;
|
|
7770
7770
|
}
|
|
7771
7771
|
function ke(t, e) {
|
|
@@ -7951,7 +7951,7 @@ ee.prototype.registerContextChecker = function(t, e, r) {
|
|
|
7951
7951
|
return {
|
|
7952
7952
|
FAIL: "missing context end check."
|
|
7953
7953
|
};
|
|
7954
|
-
var n = new
|
|
7954
|
+
var n = new xu(
|
|
7955
7955
|
t,
|
|
7956
7956
|
e,
|
|
7957
7957
|
r
|
|
@@ -8099,8 +8099,8 @@ function Tu(t, e) {
|
|
|
8099
8099
|
), d = n.length === e.inputCoverage.length && o.length === e.lookaheadCoverage.length && h.length === e.backtrackCoverage.length, f = [];
|
|
8100
8100
|
if (d)
|
|
8101
8101
|
for (var g = 0; g < e.lookupRecords.length; g++)
|
|
8102
|
-
for (var S = e.lookupRecords[g], v = S.lookupListIndex,
|
|
8103
|
-
var F =
|
|
8102
|
+
for (var S = e.lookupRecords[g], v = S.lookupListIndex, x = this.getLookupByIndex(v), m = 0; m < x.subtables.length; m++) {
|
|
8103
|
+
var F = x.subtables[m], w = this.getLookupMethod(x, F), k = this.getSubstitutionType(x, F);
|
|
8104
8104
|
if (k === "12")
|
|
8105
8105
|
for (var C = 0; C < n.length; C++) {
|
|
8106
8106
|
var L = t.get(C), B = w(L);
|
|
@@ -8546,7 +8546,7 @@ function vr(t) {
|
|
|
8546
8546
|
function Xu() {
|
|
8547
8547
|
return vr.call(this, "latinWord"), vr.call(this, "arabicWord"), vr.call(this, "arabicSentence"), this.tokenizer.tokenize(this.text);
|
|
8548
8548
|
}
|
|
8549
|
-
function
|
|
8549
|
+
function ju() {
|
|
8550
8550
|
var t = this, e = this.tokenizer.getContextRanges("arabicSentence");
|
|
8551
8551
|
e.forEach(function(r) {
|
|
8552
8552
|
var n = t.tokenizer.getRangeTokens(r);
|
|
@@ -8585,7 +8585,7 @@ function sn() {
|
|
|
8585
8585
|
"glyphIndex modifier is required to apply arabic presentation features."
|
|
8586
8586
|
);
|
|
8587
8587
|
}
|
|
8588
|
-
function
|
|
8588
|
+
function Yu() {
|
|
8589
8589
|
var t = this, e = "arab";
|
|
8590
8590
|
if (this.featuresTags.hasOwnProperty(e)) {
|
|
8591
8591
|
sn.call(this);
|
|
@@ -8625,7 +8625,7 @@ Ee.prototype.checkContextReady = function(t) {
|
|
|
8625
8625
|
return !!this.tokenizer.getContext(t);
|
|
8626
8626
|
};
|
|
8627
8627
|
Ee.prototype.applyFeaturesToContexts = function() {
|
|
8628
|
-
this.checkContextReady("arabicWord") && (
|
|
8628
|
+
this.checkContextReady("arabicWord") && (Yu.call(this), Zu.call(this)), this.checkContextReady("latinWord") && $u.call(this), this.checkContextReady("arabicSentence") && ju.call(this);
|
|
8629
8629
|
};
|
|
8630
8630
|
Ee.prototype.processText = function(t) {
|
|
8631
8631
|
(!this.text || this.text !== t) && (this.setText(t), Xu.call(this), this.applyFeaturesToContexts());
|
|
@@ -8644,7 +8644,7 @@ Ee.prototype.getTextGlyphs = function(t) {
|
|
|
8644
8644
|
}
|
|
8645
8645
|
return e;
|
|
8646
8646
|
};
|
|
8647
|
-
function
|
|
8647
|
+
function j(t) {
|
|
8648
8648
|
t = t || {}, t.tables = t.tables || {}, t.empty || (pt(t.familyName, "When creating a new Font object, familyName is required."), pt(t.styleName, "When creating a new Font object, styleName is required."), pt(t.unitsPerEm, "When creating a new Font object, unitsPerEm is required."), pt(t.ascender, "When creating a new Font object, ascender is required."), pt(t.descender <= 0, "When creating a new Font object, negative descender value is required."), this.names = {
|
|
8649
8649
|
fontFamily: { en: t.familyName || " " },
|
|
8650
8650
|
fontSubfamily: { en: t.styleName || " " },
|
|
@@ -8676,17 +8676,17 @@ function Y(t) {
|
|
|
8676
8676
|
}
|
|
8677
8677
|
});
|
|
8678
8678
|
}
|
|
8679
|
-
|
|
8679
|
+
j.prototype.hasChar = function(t) {
|
|
8680
8680
|
return this.encoding.charToGlyphIndex(t) !== null;
|
|
8681
8681
|
};
|
|
8682
|
-
|
|
8682
|
+
j.prototype.charToGlyphIndex = function(t) {
|
|
8683
8683
|
return this.encoding.charToGlyphIndex(t);
|
|
8684
8684
|
};
|
|
8685
|
-
|
|
8685
|
+
j.prototype.charToGlyph = function(t) {
|
|
8686
8686
|
var e = this.charToGlyphIndex(t), r = this.glyphs.get(e);
|
|
8687
8687
|
return r || (r = this.glyphs.get(0)), r;
|
|
8688
8688
|
};
|
|
8689
|
-
|
|
8689
|
+
j.prototype.updateFeatures = function(t) {
|
|
8690
8690
|
return this.defaultRenderOptions.features.map(function(e) {
|
|
8691
8691
|
return e.script === "latn" ? {
|
|
8692
8692
|
script: "latn",
|
|
@@ -8696,7 +8696,7 @@ Y.prototype.updateFeatures = function(t) {
|
|
|
8696
8696
|
} : e;
|
|
8697
8697
|
});
|
|
8698
8698
|
};
|
|
8699
|
-
|
|
8699
|
+
j.prototype.stringToGlyphs = function(t, e) {
|
|
8700
8700
|
var r = this, n = new Ee(), a = function(d) {
|
|
8701
8701
|
return r.charToGlyphIndex(d.char);
|
|
8702
8702
|
};
|
|
@@ -8707,22 +8707,22 @@ Y.prototype.stringToGlyphs = function(t, e) {
|
|
|
8707
8707
|
c[h] = this.glyphs.get(s[h]) || u;
|
|
8708
8708
|
return c;
|
|
8709
8709
|
};
|
|
8710
|
-
|
|
8710
|
+
j.prototype.nameToGlyphIndex = function(t) {
|
|
8711
8711
|
return this.glyphNames.nameToGlyphIndex(t);
|
|
8712
8712
|
};
|
|
8713
|
-
|
|
8713
|
+
j.prototype.nameToGlyph = function(t) {
|
|
8714
8714
|
var e = this.nameToGlyphIndex(t), r = this.glyphs.get(e);
|
|
8715
8715
|
return r || (r = this.glyphs.get(0)), r;
|
|
8716
8716
|
};
|
|
8717
|
-
|
|
8717
|
+
j.prototype.glyphIndexToName = function(t) {
|
|
8718
8718
|
return this.glyphNames.glyphIndexToName ? this.glyphNames.glyphIndexToName(t) : "";
|
|
8719
8719
|
};
|
|
8720
|
-
|
|
8720
|
+
j.prototype.getKerningValue = function(t, e) {
|
|
8721
8721
|
t = t.index || t, e = e.index || e;
|
|
8722
8722
|
var r = this.position.defaultKerningTables;
|
|
8723
8723
|
return r ? this.position.getKerningValue(r, t, e) : this.kerningPairs[t + "," + e] || 0;
|
|
8724
8724
|
};
|
|
8725
|
-
|
|
8725
|
+
j.prototype.defaultRenderOptions = {
|
|
8726
8726
|
kerning: !0,
|
|
8727
8727
|
features: [
|
|
8728
8728
|
/**
|
|
@@ -8733,7 +8733,7 @@ Y.prototype.defaultRenderOptions = {
|
|
|
8733
8733
|
{ script: "latn", tags: ["liga", "rlig"] }
|
|
8734
8734
|
]
|
|
8735
8735
|
};
|
|
8736
|
-
|
|
8736
|
+
j.prototype.forEachGlyph = function(t, e, r, n, a, i) {
|
|
8737
8737
|
e = e !== void 0 ? e : 0, r = r !== void 0 ? r : 0, n = n !== void 0 ? n : 72, a = Object.assign({}, this.defaultRenderOptions, a);
|
|
8738
8738
|
var s = 1 / this.unitsPerEm * n, o = this.stringToGlyphs(t, a), c;
|
|
8739
8739
|
if (a.kerning) {
|
|
@@ -8750,43 +8750,43 @@ Y.prototype.forEachGlyph = function(t, e, r, n, a, i) {
|
|
|
8750
8750
|
}
|
|
8751
8751
|
return e;
|
|
8752
8752
|
};
|
|
8753
|
-
|
|
8753
|
+
j.prototype.getPath = function(t, e, r, n, a) {
|
|
8754
8754
|
var i = new oe();
|
|
8755
8755
|
return this.forEachGlyph(t, e, r, n, a, function(s, o, c, u) {
|
|
8756
8756
|
var h = s.getPath(o, c, u, a, this);
|
|
8757
8757
|
i.extend(h);
|
|
8758
8758
|
}), i;
|
|
8759
8759
|
};
|
|
8760
|
-
|
|
8760
|
+
j.prototype.getPaths = function(t, e, r, n, a) {
|
|
8761
8761
|
var i = [];
|
|
8762
8762
|
return this.forEachGlyph(t, e, r, n, a, function(s, o, c, u) {
|
|
8763
8763
|
var h = s.getPath(o, c, u, a, this);
|
|
8764
8764
|
i.push(h);
|
|
8765
8765
|
}), i;
|
|
8766
8766
|
};
|
|
8767
|
-
|
|
8767
|
+
j.prototype.getAdvanceWidth = function(t, e, r) {
|
|
8768
8768
|
return this.forEachGlyph(t, 0, 0, e, r, function() {
|
|
8769
8769
|
});
|
|
8770
8770
|
};
|
|
8771
|
-
|
|
8771
|
+
j.prototype.draw = function(t, e, r, n, a, i) {
|
|
8772
8772
|
this.getPath(e, r, n, a, i).draw(t);
|
|
8773
8773
|
};
|
|
8774
|
-
|
|
8774
|
+
j.prototype.drawPoints = function(t, e, r, n, a, i) {
|
|
8775
8775
|
this.forEachGlyph(e, r, n, a, i, function(s, o, c, u) {
|
|
8776
8776
|
s.drawPoints(t, o, c, u);
|
|
8777
8777
|
});
|
|
8778
8778
|
};
|
|
8779
|
-
|
|
8779
|
+
j.prototype.drawMetrics = function(t, e, r, n, a, i) {
|
|
8780
8780
|
this.forEachGlyph(e, r, n, a, i, function(s, o, c, u) {
|
|
8781
8781
|
s.drawMetrics(t, o, c, u);
|
|
8782
8782
|
});
|
|
8783
8783
|
};
|
|
8784
|
-
|
|
8784
|
+
j.prototype.getEnglishName = function(t) {
|
|
8785
8785
|
var e = this.names[t];
|
|
8786
8786
|
if (e)
|
|
8787
8787
|
return e.en;
|
|
8788
8788
|
};
|
|
8789
|
-
|
|
8789
|
+
j.prototype.validate = function() {
|
|
8790
8790
|
var t = this;
|
|
8791
8791
|
function e(n, a) {
|
|
8792
8792
|
}
|
|
@@ -8796,18 +8796,18 @@ Y.prototype.validate = function() {
|
|
|
8796
8796
|
}
|
|
8797
8797
|
r("fontFamily"), r("weightName"), r("manufacturer"), r("copyright"), r("version"), this.unitsPerEm > 0;
|
|
8798
8798
|
};
|
|
8799
|
-
|
|
8799
|
+
j.prototype.toTables = function() {
|
|
8800
8800
|
return _o.fontToTable(this);
|
|
8801
8801
|
};
|
|
8802
|
-
|
|
8802
|
+
j.prototype.toBuffer = function() {
|
|
8803
8803
|
return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."), this.toArrayBuffer();
|
|
8804
8804
|
};
|
|
8805
|
-
|
|
8805
|
+
j.prototype.toArrayBuffer = function() {
|
|
8806
8806
|
for (var t = this.toTables(), e = t.encode(), r = new ArrayBuffer(e.length), n = new Uint8Array(r), a = 0; a < e.length; a++)
|
|
8807
8807
|
n[a] = e[a];
|
|
8808
8808
|
return r;
|
|
8809
8809
|
};
|
|
8810
|
-
|
|
8810
|
+
j.prototype.download = function(t) {
|
|
8811
8811
|
var e = this.getEnglishName("fontFamily"), r = this.getEnglishName("fontSubfamily");
|
|
8812
8812
|
t = t || e.replace(/\s/g, "") + "-" + r + ".otf";
|
|
8813
8813
|
var n = this.toArrayBuffer();
|
|
@@ -8824,7 +8824,7 @@ Y.prototype.download = function(t) {
|
|
|
8824
8824
|
c.writeFileSync(t, u);
|
|
8825
8825
|
}
|
|
8826
8826
|
};
|
|
8827
|
-
|
|
8827
|
+
j.prototype.fsSelectionValues = {
|
|
8828
8828
|
ITALIC: 1,
|
|
8829
8829
|
//1
|
|
8830
8830
|
UNDERSCORE: 2,
|
|
@@ -8846,7 +8846,7 @@ Y.prototype.fsSelectionValues = {
|
|
|
8846
8846
|
OBLIQUE: 512
|
|
8847
8847
|
//512
|
|
8848
8848
|
};
|
|
8849
|
-
|
|
8849
|
+
j.prototype.usWidthClasses = {
|
|
8850
8850
|
ULTRA_CONDENSED: 1,
|
|
8851
8851
|
EXTRA_CONDENSED: 2,
|
|
8852
8852
|
CONDENSED: 3,
|
|
@@ -8857,7 +8857,7 @@ Y.prototype.usWidthClasses = {
|
|
|
8857
8857
|
EXTRA_EXPANDED: 8,
|
|
8858
8858
|
ULTRA_EXPANDED: 9
|
|
8859
8859
|
};
|
|
8860
|
-
|
|
8860
|
+
j.prototype.usWeightClasses = {
|
|
8861
8861
|
THIN: 100,
|
|
8862
8862
|
EXTRA_LIGHT: 200,
|
|
8863
8863
|
LIGHT: 300,
|
|
@@ -9128,14 +9128,14 @@ function yh(t, e) {
|
|
|
9128
9128
|
throw new Error("Unsupported kern table version (" + n + ").");
|
|
9129
9129
|
}
|
|
9130
9130
|
var mh = { parse: yh };
|
|
9131
|
-
function
|
|
9131
|
+
function bh(t, e, r, n) {
|
|
9132
9132
|
for (var a = new D.Parser(t, e), i = n ? a.parseUShort : a.parseULong, s = [], o = 0; o < r + 1; o += 1) {
|
|
9133
9133
|
var c = i.call(a);
|
|
9134
9134
|
n && (c *= 2), s.push(c);
|
|
9135
9135
|
}
|
|
9136
9136
|
return s;
|
|
9137
9137
|
}
|
|
9138
|
-
var
|
|
9138
|
+
var xh = { parse: bh };
|
|
9139
9139
|
function fa(t, e) {
|
|
9140
9140
|
for (var r = [], n = 12, a = 0; a < e; a += 1) {
|
|
9141
9141
|
var i = D.getTag(t, n), s = D.getULong(t, n + 4), o = D.getULong(t, n + 8), c = D.getULong(t, n + 12);
|
|
@@ -9168,7 +9168,7 @@ function re(t, e) {
|
|
|
9168
9168
|
}
|
|
9169
9169
|
function wh(t, e) {
|
|
9170
9170
|
e = e ?? {};
|
|
9171
|
-
var r, n, a = new
|
|
9171
|
+
var r, n, a = new j({ empty: !0 }), i = new DataView(t, 0), s, o = [], c = D.getTag(i, 0);
|
|
9172
9172
|
if (c === "\0\0\0" || c === "true" || c === "typ1")
|
|
9173
9173
|
a.outlinesFormat = "truetype", s = D.getUShort(i, 4), o = fa(i, s);
|
|
9174
9174
|
else if (c === "OTTO")
|
|
@@ -9184,7 +9184,7 @@ function wh(t, e) {
|
|
|
9184
9184
|
s = D.getUShort(i, 12), o = Sh(i, s);
|
|
9185
9185
|
} else
|
|
9186
9186
|
throw new Error("Unsupported OpenType signature " + c);
|
|
9187
|
-
for (var h, d, f, g, S, v,
|
|
9187
|
+
for (var h, d, f, g, S, v, x, m, F, w, k, C, L = 0; L < s; L += 1) {
|
|
9188
9188
|
var B = o[L], O = void 0;
|
|
9189
9189
|
switch (B.tag) {
|
|
9190
9190
|
case "cmap":
|
|
@@ -9206,7 +9206,7 @@ function wh(t, e) {
|
|
|
9206
9206
|
O = re(i, B), a.tables.hhea = ui.parse(O.data, O.offset), a.ascender = a.tables.hhea.ascender, a.descender = a.tables.hhea.descender, a.numberOfHMetrics = a.tables.hhea.numberOfHMetrics;
|
|
9207
9207
|
break;
|
|
9208
9208
|
case "hmtx":
|
|
9209
|
-
|
|
9209
|
+
x = B;
|
|
9210
9210
|
break;
|
|
9211
9211
|
case "ltag":
|
|
9212
9212
|
O = re(i, B), n = li.parse(O.data, O.offset);
|
|
@@ -9254,14 +9254,14 @@ function wh(t, e) {
|
|
|
9254
9254
|
}
|
|
9255
9255
|
var H = re(i, w);
|
|
9256
9256
|
if (a.tables.name = yi.parse(H.data, H.offset, n), a.names = a.tables.name, f && F) {
|
|
9257
|
-
var W = r === 0, z = re(i, F), ce =
|
|
9257
|
+
var W = r === 0, z = re(i, F), ce = xh.parse(z.data, z.offset, a.numGlyphs, W), ie = re(i, f);
|
|
9258
9258
|
a.glyphs = Ti.parse(ie.data, ie.offset, ce, a, e);
|
|
9259
9259
|
} else if (h) {
|
|
9260
|
-
var
|
|
9261
|
-
oi.parse(
|
|
9260
|
+
var Y = re(i, h);
|
|
9261
|
+
oi.parse(Y.data, Y.offset, a, e);
|
|
9262
9262
|
} else
|
|
9263
9263
|
throw new Error("Font doesn't contain TrueType or CFF outlines.");
|
|
9264
|
-
var Z = re(i,
|
|
9264
|
+
var Z = re(i, x);
|
|
9265
9265
|
if (hi.parse(a, Z.data, Z.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, e), Ms(a, e), m) {
|
|
9266
9266
|
var $ = re(i, m);
|
|
9267
9267
|
a.kerningPairs = mh.parse($.data, $.offset);
|
|
@@ -9277,7 +9277,7 @@ function wh(t, e) {
|
|
|
9277
9277
|
}
|
|
9278
9278
|
if (v) {
|
|
9279
9279
|
var ae = re(i, v);
|
|
9280
|
-
a.tables.gsub =
|
|
9280
|
+
a.tables.gsub = bi.parse(ae.data, ae.offset);
|
|
9281
9281
|
}
|
|
9282
9282
|
if (d) {
|
|
9283
9283
|
var ue = re(i, d);
|
|
@@ -9285,7 +9285,7 @@ function wh(t, e) {
|
|
|
9285
9285
|
}
|
|
9286
9286
|
if (k) {
|
|
9287
9287
|
var G = re(i, k);
|
|
9288
|
-
a.tables.meta =
|
|
9288
|
+
a.tables.meta = xi.parse(G.data, G.offset), a.metas = a.tables.meta;
|
|
9289
9289
|
}
|
|
9290
9290
|
return a;
|
|
9291
9291
|
}
|
|
@@ -9404,14 +9404,14 @@ function Fh(t, e = 1e-4) {
|
|
|
9404
9404
|
u[k][O] = new B.constructor(H, B.itemSize, B.normalized);
|
|
9405
9405
|
}));
|
|
9406
9406
|
}
|
|
9407
|
-
const g = e * 0.5, S = Math.log10(1 / e), v = Math.pow(10, S),
|
|
9407
|
+
const g = e * 0.5, S = Math.log10(1 / e), v = Math.pow(10, S), x = g * v;
|
|
9408
9408
|
for (let F = 0; F < i; F++) {
|
|
9409
9409
|
const w = n ? n.getX(F) : F;
|
|
9410
9410
|
let k = "";
|
|
9411
9411
|
for (let C = 0, L = o.length; C < L; C++) {
|
|
9412
9412
|
const B = o[C], O = t.getAttribute(B), H = O.itemSize;
|
|
9413
9413
|
for (let W = 0; W < H; W++)
|
|
9414
|
-
k += `${~~(O[d[W]](w) * v +
|
|
9414
|
+
k += `${~~(O[d[W]](w) * v + x)},`;
|
|
9415
9415
|
}
|
|
9416
9416
|
if (k in r)
|
|
9417
9417
|
h.push(r[k]);
|
|
@@ -9419,10 +9419,10 @@ function Fh(t, e = 1e-4) {
|
|
|
9419
9419
|
for (let C = 0, L = o.length; C < L; C++) {
|
|
9420
9420
|
const B = o[C], O = t.getAttribute(B), H = t.morphAttributes[B], W = O.itemSize, z = c[B], ce = u[B];
|
|
9421
9421
|
for (let ie = 0; ie < W; ie++) {
|
|
9422
|
-
const
|
|
9423
|
-
if (z[Z](s, O[
|
|
9422
|
+
const Y = d[ie], Z = f[ie];
|
|
9423
|
+
if (z[Z](s, O[Y](w)), H)
|
|
9424
9424
|
for (let $ = 0, te = H.length; $ < te; $++)
|
|
9425
|
-
ce[$][Z](s, H[$][
|
|
9425
|
+
ce[$][Z](s, H[$][Y](w));
|
|
9426
9426
|
}
|
|
9427
9427
|
}
|
|
9428
9428
|
r[k] = s, h.push(s), s++;
|
|
@@ -9516,19 +9516,19 @@ function Ch(t, e, r, n, a) {
|
|
|
9516
9516
|
let o, c, u, h, d, f, g, S;
|
|
9517
9517
|
if (i.o) {
|
|
9518
9518
|
const v = i._cachedOutline || (i._cachedOutline = i.o.split(" "));
|
|
9519
|
-
for (let
|
|
9520
|
-
switch (v[
|
|
9519
|
+
for (let x = 0, m = v.length; x < m; )
|
|
9520
|
+
switch (v[x++]) {
|
|
9521
9521
|
case "m":
|
|
9522
|
-
o = v[
|
|
9522
|
+
o = v[x++] * e + r, c = v[x++] * e + n, s.moveTo(o, c);
|
|
9523
9523
|
break;
|
|
9524
9524
|
case "l":
|
|
9525
|
-
o = v[
|
|
9525
|
+
o = v[x++] * e + r, c = v[x++] * e + n, s.lineTo(o, c);
|
|
9526
9526
|
break;
|
|
9527
9527
|
case "q":
|
|
9528
|
-
u = v[
|
|
9528
|
+
u = v[x++] * e + r, h = v[x++] * e + n, d = v[x++] * e + r, f = v[x++] * e + n, s.quadraticCurveTo(d, f, u, h);
|
|
9529
9529
|
break;
|
|
9530
9530
|
case "b":
|
|
9531
|
-
u = v[
|
|
9531
|
+
u = v[x++] * e + r, h = v[x++] * e + n, d = v[x++] * e + r, f = v[x++] * e + n, g = v[x++] * e + r, S = v[x++] * e + n, s.bezierCurveTo(d, f, g, S, u, h);
|
|
9532
9532
|
break;
|
|
9533
9533
|
}
|
|
9534
9534
|
}
|
|
@@ -9610,7 +9610,7 @@ function Uh(t, e, r, n, a) {
|
|
|
9610
9610
|
let c = 0;
|
|
9611
9611
|
for (; c < o.length; ) {
|
|
9612
9612
|
const u = o[c++];
|
|
9613
|
-
let h, d, f, g, S, v,
|
|
9613
|
+
let h, d, f, g, S, v, x, m;
|
|
9614
9614
|
switch (u) {
|
|
9615
9615
|
case "m":
|
|
9616
9616
|
h = parseFloat(o[c++]) * e + r, d = parseFloat(o[c++]) * e + n, s.moveTo(h, d);
|
|
@@ -9622,7 +9622,7 @@ function Uh(t, e, r, n, a) {
|
|
|
9622
9622
|
f = parseFloat(o[c++]) * e + r, g = parseFloat(o[c++]) * e + n, S = parseFloat(o[c++]) * e + r, v = parseFloat(o[c++]) * e + n, s.quadraticCurveTo(S, v, f, g);
|
|
9623
9623
|
break;
|
|
9624
9624
|
case "b":
|
|
9625
|
-
f = parseFloat(o[c++]) * e + r, g = parseFloat(o[c++]) * e + n, S = parseFloat(o[c++]) * e + r, v = parseFloat(o[c++]) * e + n,
|
|
9625
|
+
f = parseFloat(o[c++]) * e + r, g = parseFloat(o[c++]) * e + n, S = parseFloat(o[c++]) * e + r, v = parseFloat(o[c++]) * e + n, x = parseFloat(o[c++]) * e + r, m = parseFloat(o[c++]) * e + n, s.bezierCurveTo(S, v, x, m, f, g);
|
|
9626
9626
|
break;
|
|
9627
9627
|
}
|
|
9628
9628
|
}
|
|
@@ -9672,18 +9672,18 @@ function Mh(t) {
|
|
|
9672
9672
|
e.push(
|
|
9673
9673
|
new mn(n.v2.clone(), n.v1.clone(), n.v0.clone())
|
|
9674
9674
|
);
|
|
9675
|
-
else if (n instanceof
|
|
9675
|
+
else if (n instanceof bn)
|
|
9676
9676
|
e.push(
|
|
9677
|
-
new
|
|
9677
|
+
new bn(
|
|
9678
9678
|
n.v3.clone(),
|
|
9679
9679
|
n.v2.clone(),
|
|
9680
9680
|
n.v1.clone(),
|
|
9681
9681
|
n.v0.clone()
|
|
9682
9682
|
)
|
|
9683
9683
|
);
|
|
9684
|
-
else if (n instanceof
|
|
9684
|
+
else if (n instanceof xn)
|
|
9685
9685
|
e.push(
|
|
9686
|
-
new
|
|
9686
|
+
new xn(
|
|
9687
9687
|
n.aX,
|
|
9688
9688
|
n.aY,
|
|
9689
9689
|
n.xRadius,
|
|
@@ -9715,7 +9715,7 @@ function Ih(t, e = 32) {
|
|
|
9715
9715
|
for (; S.length; ) {
|
|
9716
9716
|
const v = S.pop();
|
|
9717
9717
|
c[v.idx] = v.d, u[v.idx] = g;
|
|
9718
|
-
for (const
|
|
9718
|
+
for (const x of i[v.idx]) S.push({ idx: x, d: v.d + 1 });
|
|
9719
9719
|
}
|
|
9720
9720
|
}
|
|
9721
9721
|
const h = [], d = /* @__PURE__ */ new Set();
|
|
@@ -9724,8 +9724,8 @@ function Ih(t, e = 32) {
|
|
|
9724
9724
|
d.add(g);
|
|
9725
9725
|
for (const v of i[g])
|
|
9726
9726
|
if (!d.has(v) && c[v] === c[g] + 1) {
|
|
9727
|
-
const
|
|
9728
|
-
S.holes.push(
|
|
9727
|
+
const x = va(r[v], !1);
|
|
9728
|
+
S.holes.push(x), d.add(v);
|
|
9729
9729
|
}
|
|
9730
9730
|
h.push(S);
|
|
9731
9731
|
}
|
|
@@ -10082,7 +10082,7 @@ class Ph {
|
|
|
10082
10082
|
return r.trim();
|
|
10083
10083
|
}
|
|
10084
10084
|
}
|
|
10085
|
-
const
|
|
10085
|
+
const xe = 10, Nh = [13, 10, 0];
|
|
10086
10086
|
class Gh {
|
|
10087
10087
|
parse(e) {
|
|
10088
10088
|
try {
|
|
@@ -10108,8 +10108,8 @@ class Gh {
|
|
|
10108
10108
|
info: "",
|
|
10109
10109
|
baseUp: 8,
|
|
10110
10110
|
baseDown: 2,
|
|
10111
|
-
height:
|
|
10112
|
-
width:
|
|
10111
|
+
height: xe,
|
|
10112
|
+
width: xe,
|
|
10113
10113
|
orientation: "horizontal",
|
|
10114
10114
|
isExtended: !1
|
|
10115
10115
|
};
|
|
@@ -10130,8 +10130,8 @@ class Gh {
|
|
|
10130
10130
|
info: "Failed to parse font file",
|
|
10131
10131
|
baseUp: 8,
|
|
10132
10132
|
baseDown: 2,
|
|
10133
|
-
height:
|
|
10134
|
-
width:
|
|
10133
|
+
height: xe,
|
|
10134
|
+
width: xe,
|
|
10135
10135
|
orientation: "horizontal",
|
|
10136
10136
|
isExtended: !1
|
|
10137
10137
|
};
|
|
@@ -10165,8 +10165,8 @@ class Hh {
|
|
|
10165
10165
|
info: "",
|
|
10166
10166
|
baseUp: 8,
|
|
10167
10167
|
baseDown: 2,
|
|
10168
|
-
height:
|
|
10169
|
-
width:
|
|
10168
|
+
height: xe,
|
|
10169
|
+
width: xe,
|
|
10170
10170
|
orientation: "horizontal",
|
|
10171
10171
|
isExtended: !1
|
|
10172
10172
|
};
|
|
@@ -10187,8 +10187,8 @@ class Hh {
|
|
|
10187
10187
|
info: "Failed to parse font file",
|
|
10188
10188
|
baseUp: 8,
|
|
10189
10189
|
baseDown: 2,
|
|
10190
|
-
height:
|
|
10191
|
-
width:
|
|
10190
|
+
height: xe,
|
|
10191
|
+
width: xe,
|
|
10192
10192
|
orientation: "horizontal",
|
|
10193
10193
|
isExtended: !1
|
|
10194
10194
|
};
|
|
@@ -10240,8 +10240,8 @@ let zh = class {
|
|
|
10240
10240
|
info: "",
|
|
10241
10241
|
baseUp: 8,
|
|
10242
10242
|
baseDown: 2,
|
|
10243
|
-
height:
|
|
10244
|
-
width:
|
|
10243
|
+
height: xe,
|
|
10244
|
+
width: xe,
|
|
10245
10245
|
orientation: "horizontal",
|
|
10246
10246
|
isExtended: !1
|
|
10247
10247
|
};
|
|
@@ -10275,8 +10275,8 @@ let zh = class {
|
|
|
10275
10275
|
info: "Failed to parse font file",
|
|
10276
10276
|
baseUp: 8,
|
|
10277
10277
|
baseDown: 2,
|
|
10278
|
-
height:
|
|
10279
|
-
width:
|
|
10278
|
+
height: xe,
|
|
10279
|
+
width: xe,
|
|
10280
10280
|
orientation: "horizontal",
|
|
10281
10281
|
isExtended: !1
|
|
10282
10282
|
};
|
|
@@ -10530,14 +10530,14 @@ class mt {
|
|
|
10530
10530
|
const { strokeWidth: r = "0.5%", strokeColor: n = "black", isAutoFit: a = !1 } = e;
|
|
10531
10531
|
let i, s;
|
|
10532
10532
|
if (a) {
|
|
10533
|
-
const o = this.bbox, c = 0.2, u = o.maxX - o.minX, h = o.maxY - o.minY, d = u === 0 ? h : u, f = h === 0 ? u : h, g = o.minX - d * c, S = o.maxX + d * c, v = o.minY - f * c,
|
|
10533
|
+
const o = this.bbox, c = 0.2, u = o.maxX - o.minX, h = o.maxY - o.minY, d = u === 0 ? h : u, f = h === 0 ? u : h, g = o.minX - d * c, S = o.maxX + d * c, v = o.minY - f * c, x = o.maxY + f * c;
|
|
10534
10534
|
s = this.polylines.map((m) => {
|
|
10535
10535
|
let F = "";
|
|
10536
10536
|
return m.forEach((w, k) => {
|
|
10537
10537
|
const C = w.x, L = -w.y;
|
|
10538
10538
|
F += k === 0 ? `M ${C} ${L} ` : `L ${C} ${L} `;
|
|
10539
10539
|
}), `<path d="${F}" stroke="${n}" stroke-width="${r}" fill="none"/>`;
|
|
10540
|
-
}).join(""), i = `${g} ${-
|
|
10540
|
+
}).join(""), i = `${g} ${-x} ${S - g} ${x - v}`;
|
|
10541
10541
|
} else
|
|
10542
10542
|
i = "0 0 20 20", s = this.polylines.map((o) => {
|
|
10543
10543
|
let c = "";
|
|
@@ -10826,10 +10826,10 @@ class Vh {
|
|
|
10826
10826
|
let f = h & 7;
|
|
10827
10827
|
f === 0 && (f = 8), s !== 0 && f--;
|
|
10828
10828
|
const g = Math.PI / 4;
|
|
10829
|
-
let S = g * f, v = qh,
|
|
10830
|
-
h < 0 && (v = -v, S = -S,
|
|
10829
|
+
let S = g * f, v = qh, x = 1;
|
|
10830
|
+
h < 0 && (v = -v, S = -S, x = -1);
|
|
10831
10831
|
let m = g * d, F = m + S;
|
|
10832
|
-
m += g * i / 256 *
|
|
10832
|
+
m += g * i / 256 * x, F += g * s / 256 * x;
|
|
10833
10833
|
const w = n.currentPoint.clone().subtract(new J(u * Math.cos(m), u * Math.sin(m)));
|
|
10834
10834
|
if (n.currentPoint = w.clone().add(new J(u * Math.cos(F), u * Math.sin(F))), n.isPenDown) {
|
|
10835
10835
|
let k = m;
|
|
@@ -11018,10 +11018,10 @@ let Xh = class {
|
|
|
11018
11018
|
this.shapeParser.release();
|
|
11019
11019
|
}
|
|
11020
11020
|
};
|
|
11021
|
-
function
|
|
11021
|
+
function jh(t) {
|
|
11022
11022
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
11023
11023
|
}
|
|
11024
|
-
function
|
|
11024
|
+
function Yh(t) {
|
|
11025
11025
|
if (t.__esModule) return t;
|
|
11026
11026
|
var e = t.default;
|
|
11027
11027
|
if (typeof e == "function") {
|
|
@@ -11045,8 +11045,8 @@ rr.byteLength = Kh;
|
|
|
11045
11045
|
rr.toByteArray = Jh;
|
|
11046
11046
|
rr.fromByteArray = rl;
|
|
11047
11047
|
var Le = [], ye = [], Zh = typeof Uint8Array < "u" ? Uint8Array : Array, yr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
11048
|
-
for (var
|
|
11049
|
-
Le[
|
|
11048
|
+
for (var at = 0, $h = yr.length; at < $h; ++at)
|
|
11049
|
+
Le[at] = yr[at], ye[yr.charCodeAt(at)] = at;
|
|
11050
11050
|
ye[45] = 62;
|
|
11051
11051
|
ye[95] = 63;
|
|
11052
11052
|
function Ii(t) {
|
|
@@ -11181,10 +11181,10 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11181
11181
|
throw new TypeError(
|
|
11182
11182
|
'The "value" argument must not be of type number. Received type number'
|
|
11183
11183
|
);
|
|
11184
|
-
var
|
|
11185
|
-
if (
|
|
11186
|
-
return o.from(
|
|
11187
|
-
var T =
|
|
11184
|
+
var b = y.valueOf && y.valueOf();
|
|
11185
|
+
if (b != null && b !== y)
|
|
11186
|
+
return o.from(b, l, p);
|
|
11187
|
+
var T = x(y);
|
|
11188
11188
|
if (T) return T;
|
|
11189
11189
|
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof y[Symbol.toPrimitive] == "function")
|
|
11190
11190
|
return o.from(
|
|
@@ -11222,12 +11222,12 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11222
11222
|
function f(y, l) {
|
|
11223
11223
|
if ((typeof l != "string" || l === "") && (l = "utf8"), !o.isEncoding(l))
|
|
11224
11224
|
throw new TypeError("Unknown encoding: " + l);
|
|
11225
|
-
var p = w(y, l) | 0,
|
|
11226
|
-
return T !== p && (
|
|
11225
|
+
var p = w(y, l) | 0, b = s(p), T = b.write(y, l);
|
|
11226
|
+
return T !== p && (b = b.slice(0, T)), b;
|
|
11227
11227
|
}
|
|
11228
11228
|
function g(y) {
|
|
11229
|
-
for (var l = y.length < 0 ? 0 : m(y.length) | 0, p = s(l),
|
|
11230
|
-
p[
|
|
11229
|
+
for (var l = y.length < 0 ? 0 : m(y.length) | 0, p = s(l), b = 0; b < l; b += 1)
|
|
11230
|
+
p[b] = y[b] & 255;
|
|
11231
11231
|
return p;
|
|
11232
11232
|
}
|
|
11233
11233
|
function S(y) {
|
|
@@ -11242,10 +11242,10 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11242
11242
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
11243
11243
|
if (y.byteLength < l + (p || 0))
|
|
11244
11244
|
throw new RangeError('"length" is outside of buffer bounds');
|
|
11245
|
-
var
|
|
11246
|
-
return l === void 0 && p === void 0 ?
|
|
11245
|
+
var b;
|
|
11246
|
+
return l === void 0 && p === void 0 ? b = new Uint8Array(y) : p === void 0 ? b = new Uint8Array(y, l) : b = new Uint8Array(y, l, p), Object.setPrototypeOf(b, o.prototype), b;
|
|
11247
11247
|
}
|
|
11248
|
-
function
|
|
11248
|
+
function x(y) {
|
|
11249
11249
|
if (o.isBuffer(y)) {
|
|
11250
11250
|
var l = m(y.length) | 0, p = s(l);
|
|
11251
11251
|
return p.length === 0 || y.copy(p, 0, 0, l), p;
|
|
@@ -11271,12 +11271,12 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11271
11271
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
11272
11272
|
);
|
|
11273
11273
|
if (l === p) return 0;
|
|
11274
|
-
for (var
|
|
11274
|
+
for (var b = l.length, T = p.length, A = 0, U = Math.min(b, T); A < U; ++A)
|
|
11275
11275
|
if (l[A] !== p[A]) {
|
|
11276
|
-
|
|
11276
|
+
b = l[A], T = p[A];
|
|
11277
11277
|
break;
|
|
11278
11278
|
}
|
|
11279
|
-
return
|
|
11279
|
+
return b < T ? -1 : T < b ? 1 : 0;
|
|
11280
11280
|
}, o.isEncoding = function(l) {
|
|
11281
11281
|
switch (String(l).toLowerCase()) {
|
|
11282
11282
|
case "hex":
|
|
@@ -11299,13 +11299,13 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11299
11299
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
11300
11300
|
if (l.length === 0)
|
|
11301
11301
|
return o.alloc(0);
|
|
11302
|
-
var
|
|
11302
|
+
var b;
|
|
11303
11303
|
if (p === void 0)
|
|
11304
|
-
for (p = 0,
|
|
11305
|
-
p += l[
|
|
11304
|
+
for (p = 0, b = 0; b < l.length; ++b)
|
|
11305
|
+
p += l[b].length;
|
|
11306
11306
|
var T = o.allocUnsafe(p), A = 0;
|
|
11307
|
-
for (
|
|
11308
|
-
var U = l[
|
|
11307
|
+
for (b = 0; b < l.length; ++b) {
|
|
11308
|
+
var U = l[b];
|
|
11309
11309
|
if (Ae(U, Uint8Array))
|
|
11310
11310
|
A + U.length > T.length ? o.from(U).copy(T, A) : Uint8Array.prototype.set.call(
|
|
11311
11311
|
T,
|
|
@@ -11329,8 +11329,8 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11329
11329
|
throw new TypeError(
|
|
11330
11330
|
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof y
|
|
11331
11331
|
);
|
|
11332
|
-
var p = y.length,
|
|
11333
|
-
if (!
|
|
11332
|
+
var p = y.length, b = arguments.length > 2 && arguments[2] === !0;
|
|
11333
|
+
if (!b && p === 0) return 0;
|
|
11334
11334
|
for (var T = !1; ; )
|
|
11335
11335
|
switch (l) {
|
|
11336
11336
|
case "ascii":
|
|
@@ -11351,13 +11351,13 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11351
11351
|
return gn(y).length;
|
|
11352
11352
|
default:
|
|
11353
11353
|
if (T)
|
|
11354
|
-
return
|
|
11354
|
+
return b ? -1 : Pe(y).length;
|
|
11355
11355
|
l = ("" + l).toLowerCase(), T = !0;
|
|
11356
11356
|
}
|
|
11357
11357
|
}
|
|
11358
11358
|
o.byteLength = w;
|
|
11359
11359
|
function k(y, l, p) {
|
|
11360
|
-
var
|
|
11360
|
+
var b = !1;
|
|
11361
11361
|
if ((l === void 0 || l < 0) && (l = 0), l > this.length || ((p === void 0 || p > this.length) && (p = this.length), p <= 0) || (p >>>= 0, l >>>= 0, p <= l))
|
|
11362
11362
|
return "";
|
|
11363
11363
|
for (y || (y = "utf8"); ; )
|
|
@@ -11366,7 +11366,7 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11366
11366
|
return ae(this, l, p);
|
|
11367
11367
|
case "utf8":
|
|
11368
11368
|
case "utf-8":
|
|
11369
|
-
return
|
|
11369
|
+
return Y(this, l, p);
|
|
11370
11370
|
case "ascii":
|
|
11371
11371
|
return te(this, l, p);
|
|
11372
11372
|
case "latin1":
|
|
@@ -11380,14 +11380,14 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11380
11380
|
case "utf-16le":
|
|
11381
11381
|
return ue(this, l, p);
|
|
11382
11382
|
default:
|
|
11383
|
-
if (
|
|
11384
|
-
y = (y + "").toLowerCase(),
|
|
11383
|
+
if (b) throw new TypeError("Unknown encoding: " + y);
|
|
11384
|
+
y = (y + "").toLowerCase(), b = !0;
|
|
11385
11385
|
}
|
|
11386
11386
|
}
|
|
11387
11387
|
o.prototype._isBuffer = !0;
|
|
11388
11388
|
function C(y, l, p) {
|
|
11389
|
-
var
|
|
11390
|
-
y[l] = y[p], y[p] =
|
|
11389
|
+
var b = y[l];
|
|
11390
|
+
y[l] = y[p], y[p] = b;
|
|
11391
11391
|
}
|
|
11392
11392
|
o.prototype.swap16 = function() {
|
|
11393
11393
|
var l = this.length;
|
|
@@ -11412,51 +11412,51 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11412
11412
|
return this;
|
|
11413
11413
|
}, o.prototype.toString = function() {
|
|
11414
11414
|
var l = this.length;
|
|
11415
|
-
return l === 0 ? "" : arguments.length === 0 ?
|
|
11415
|
+
return l === 0 ? "" : arguments.length === 0 ? Y(this, 0, l) : k.apply(this, arguments);
|
|
11416
11416
|
}, o.prototype.toLocaleString = o.prototype.toString, o.prototype.equals = function(l) {
|
|
11417
11417
|
if (!o.isBuffer(l)) throw new TypeError("Argument must be a Buffer");
|
|
11418
11418
|
return this === l ? !0 : o.compare(this, l) === 0;
|
|
11419
11419
|
}, o.prototype.inspect = function() {
|
|
11420
11420
|
var l = "", p = t.INSPECT_MAX_BYTES;
|
|
11421
11421
|
return l = this.toString("hex", 0, p).replace(/(.{2})/g, "$1 ").trim(), this.length > p && (l += " ... "), "<Buffer " + l + ">";
|
|
11422
|
-
}, n && (o.prototype[n] = o.prototype.inspect), o.prototype.compare = function(l, p,
|
|
11422
|
+
}, n && (o.prototype[n] = o.prototype.inspect), o.prototype.compare = function(l, p, b, T, A) {
|
|
11423
11423
|
if (Ae(l, Uint8Array) && (l = o.from(l, l.offset, l.byteLength)), !o.isBuffer(l))
|
|
11424
11424
|
throw new TypeError(
|
|
11425
11425
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof l
|
|
11426
11426
|
);
|
|
11427
|
-
if (p === void 0 && (p = 0),
|
|
11427
|
+
if (p === void 0 && (p = 0), b === void 0 && (b = l ? l.length : 0), T === void 0 && (T = 0), A === void 0 && (A = this.length), p < 0 || b > l.length || T < 0 || A > this.length)
|
|
11428
11428
|
throw new RangeError("out of range index");
|
|
11429
|
-
if (T >= A && p >=
|
|
11429
|
+
if (T >= A && p >= b)
|
|
11430
11430
|
return 0;
|
|
11431
11431
|
if (T >= A)
|
|
11432
11432
|
return -1;
|
|
11433
|
-
if (p >=
|
|
11433
|
+
if (p >= b)
|
|
11434
11434
|
return 1;
|
|
11435
|
-
if (p >>>= 0,
|
|
11436
|
-
for (var U = A - T, q =
|
|
11435
|
+
if (p >>>= 0, b >>>= 0, T >>>= 0, A >>>= 0, this === l) return 0;
|
|
11436
|
+
for (var U = A - T, q = b - p, X = Math.min(U, q), K = this.slice(T, A), le = l.slice(p, b), Q = 0; Q < X; ++Q)
|
|
11437
11437
|
if (K[Q] !== le[Q]) {
|
|
11438
11438
|
U = K[Q], q = le[Q];
|
|
11439
11439
|
break;
|
|
11440
11440
|
}
|
|
11441
11441
|
return U < q ? -1 : q < U ? 1 : 0;
|
|
11442
11442
|
};
|
|
11443
|
-
function L(y, l, p,
|
|
11443
|
+
function L(y, l, p, b, T) {
|
|
11444
11444
|
if (y.length === 0) return -1;
|
|
11445
|
-
if (typeof p == "string" ? (
|
|
11445
|
+
if (typeof p == "string" ? (b = p, p = 0) : p > 2147483647 ? p = 2147483647 : p < -2147483648 && (p = -2147483648), p = +p, nr(p) && (p = T ? 0 : y.length - 1), p < 0 && (p = y.length + p), p >= y.length) {
|
|
11446
11446
|
if (T) return -1;
|
|
11447
11447
|
p = y.length - 1;
|
|
11448
11448
|
} else if (p < 0)
|
|
11449
11449
|
if (T) p = 0;
|
|
11450
11450
|
else return -1;
|
|
11451
|
-
if (typeof l == "string" && (l = o.from(l,
|
|
11452
|
-
return l.length === 0 ? -1 : B(y, l, p,
|
|
11451
|
+
if (typeof l == "string" && (l = o.from(l, b)), o.isBuffer(l))
|
|
11452
|
+
return l.length === 0 ? -1 : B(y, l, p, b, T);
|
|
11453
11453
|
if (typeof l == "number")
|
|
11454
|
-
return l = l & 255, typeof Uint8Array.prototype.indexOf == "function" ? T ? Uint8Array.prototype.indexOf.call(y, l, p) : Uint8Array.prototype.lastIndexOf.call(y, l, p) : B(y, [l], p,
|
|
11454
|
+
return l = l & 255, typeof Uint8Array.prototype.indexOf == "function" ? T ? Uint8Array.prototype.indexOf.call(y, l, p) : Uint8Array.prototype.lastIndexOf.call(y, l, p) : B(y, [l], p, b, T);
|
|
11455
11455
|
throw new TypeError("val must be string, number or Buffer");
|
|
11456
11456
|
}
|
|
11457
|
-
function B(y, l, p,
|
|
11457
|
+
function B(y, l, p, b, T) {
|
|
11458
11458
|
var A = 1, U = y.length, q = l.length;
|
|
11459
|
-
if (
|
|
11459
|
+
if (b !== void 0 && (b = String(b).toLowerCase(), b === "ucs2" || b === "ucs-2" || b === "utf16le" || b === "utf-16le")) {
|
|
11460
11460
|
if (y.length < 2 || l.length < 2)
|
|
11461
11461
|
return -1;
|
|
11462
11462
|
A = 2, U /= 2, q /= 2, p /= 2;
|
|
@@ -11483,71 +11483,71 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11483
11483
|
}
|
|
11484
11484
|
return -1;
|
|
11485
11485
|
}
|
|
11486
|
-
o.prototype.includes = function(l, p,
|
|
11487
|
-
return this.indexOf(l, p,
|
|
11488
|
-
}, o.prototype.indexOf = function(l, p,
|
|
11489
|
-
return L(this, l, p,
|
|
11490
|
-
}, o.prototype.lastIndexOf = function(l, p,
|
|
11491
|
-
return L(this, l, p,
|
|
11486
|
+
o.prototype.includes = function(l, p, b) {
|
|
11487
|
+
return this.indexOf(l, p, b) !== -1;
|
|
11488
|
+
}, o.prototype.indexOf = function(l, p, b) {
|
|
11489
|
+
return L(this, l, p, b, !0);
|
|
11490
|
+
}, o.prototype.lastIndexOf = function(l, p, b) {
|
|
11491
|
+
return L(this, l, p, b, !1);
|
|
11492
11492
|
};
|
|
11493
|
-
function O(y, l, p,
|
|
11493
|
+
function O(y, l, p, b) {
|
|
11494
11494
|
p = Number(p) || 0;
|
|
11495
11495
|
var T = y.length - p;
|
|
11496
|
-
|
|
11496
|
+
b ? (b = Number(b), b > T && (b = T)) : b = T;
|
|
11497
11497
|
var A = l.length;
|
|
11498
|
-
|
|
11499
|
-
for (var U = 0; U <
|
|
11498
|
+
b > A / 2 && (b = A / 2);
|
|
11499
|
+
for (var U = 0; U < b; ++U) {
|
|
11500
11500
|
var q = parseInt(l.substr(U * 2, 2), 16);
|
|
11501
11501
|
if (nr(q)) return U;
|
|
11502
11502
|
y[p + U] = q;
|
|
11503
11503
|
}
|
|
11504
11504
|
return U;
|
|
11505
11505
|
}
|
|
11506
|
-
function H(y, l, p,
|
|
11507
|
-
return Rt(Pe(l, y.length - p), y, p,
|
|
11506
|
+
function H(y, l, p, b) {
|
|
11507
|
+
return Rt(Pe(l, y.length - p), y, p, b);
|
|
11508
11508
|
}
|
|
11509
|
-
function W(y, l, p,
|
|
11510
|
-
return Rt(Ni(l), y, p,
|
|
11509
|
+
function W(y, l, p, b) {
|
|
11510
|
+
return Rt(Ni(l), y, p, b);
|
|
11511
11511
|
}
|
|
11512
|
-
function z(y, l, p,
|
|
11513
|
-
return Rt(gn(l), y, p,
|
|
11512
|
+
function z(y, l, p, b) {
|
|
11513
|
+
return Rt(gn(l), y, p, b);
|
|
11514
11514
|
}
|
|
11515
|
-
function ce(y, l, p,
|
|
11516
|
-
return Rt(Gi(l, y.length - p), y, p,
|
|
11515
|
+
function ce(y, l, p, b) {
|
|
11516
|
+
return Rt(Gi(l, y.length - p), y, p, b);
|
|
11517
11517
|
}
|
|
11518
|
-
o.prototype.write = function(l, p,
|
|
11518
|
+
o.prototype.write = function(l, p, b, T) {
|
|
11519
11519
|
if (p === void 0)
|
|
11520
|
-
T = "utf8",
|
|
11521
|
-
else if (
|
|
11522
|
-
T = p,
|
|
11520
|
+
T = "utf8", b = this.length, p = 0;
|
|
11521
|
+
else if (b === void 0 && typeof p == "string")
|
|
11522
|
+
T = p, b = this.length, p = 0;
|
|
11523
11523
|
else if (isFinite(p))
|
|
11524
|
-
p = p >>> 0, isFinite(
|
|
11524
|
+
p = p >>> 0, isFinite(b) ? (b = b >>> 0, T === void 0 && (T = "utf8")) : (T = b, b = void 0);
|
|
11525
11525
|
else
|
|
11526
11526
|
throw new Error(
|
|
11527
11527
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
11528
11528
|
);
|
|
11529
11529
|
var A = this.length - p;
|
|
11530
|
-
if ((
|
|
11530
|
+
if ((b === void 0 || b > A) && (b = A), l.length > 0 && (b < 0 || p < 0) || p > this.length)
|
|
11531
11531
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
11532
11532
|
T || (T = "utf8");
|
|
11533
11533
|
for (var U = !1; ; )
|
|
11534
11534
|
switch (T) {
|
|
11535
11535
|
case "hex":
|
|
11536
|
-
return O(this, l, p,
|
|
11536
|
+
return O(this, l, p, b);
|
|
11537
11537
|
case "utf8":
|
|
11538
11538
|
case "utf-8":
|
|
11539
|
-
return H(this, l, p,
|
|
11539
|
+
return H(this, l, p, b);
|
|
11540
11540
|
case "ascii":
|
|
11541
11541
|
case "latin1":
|
|
11542
11542
|
case "binary":
|
|
11543
|
-
return W(this, l, p,
|
|
11543
|
+
return W(this, l, p, b);
|
|
11544
11544
|
case "base64":
|
|
11545
|
-
return z(this, l, p,
|
|
11545
|
+
return z(this, l, p, b);
|
|
11546
11546
|
case "ucs2":
|
|
11547
11547
|
case "ucs-2":
|
|
11548
11548
|
case "utf16le":
|
|
11549
11549
|
case "utf-16le":
|
|
11550
|
-
return ce(this, l, p,
|
|
11550
|
+
return ce(this, l, p, b);
|
|
11551
11551
|
default:
|
|
11552
11552
|
if (U) throw new TypeError("Unknown encoding: " + T);
|
|
11553
11553
|
T = ("" + T).toLowerCase(), U = !0;
|
|
@@ -11561,9 +11561,9 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11561
11561
|
function ie(y, l, p) {
|
|
11562
11562
|
return l === 0 && p === y.length ? e.fromByteArray(y) : e.fromByteArray(y.slice(l, p));
|
|
11563
11563
|
}
|
|
11564
|
-
function
|
|
11564
|
+
function Y(y, l, p) {
|
|
11565
11565
|
p = Math.min(y.length, p);
|
|
11566
|
-
for (var
|
|
11566
|
+
for (var b = [], T = l; T < p; ) {
|
|
11567
11567
|
var A = y[T], U = null, q = A > 239 ? 4 : A > 223 ? 3 : A > 191 ? 2 : 1;
|
|
11568
11568
|
if (T + q <= p) {
|
|
11569
11569
|
var X, K, le, Q;
|
|
@@ -11581,51 +11581,51 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11581
11581
|
X = y[T + 1], K = y[T + 2], le = y[T + 3], (X & 192) === 128 && (K & 192) === 128 && (le & 192) === 128 && (Q = (A & 15) << 18 | (X & 63) << 12 | (K & 63) << 6 | le & 63, Q > 65535 && Q < 1114112 && (U = Q));
|
|
11582
11582
|
}
|
|
11583
11583
|
}
|
|
11584
|
-
U === null ? (U = 65533, q = 1) : U > 65535 && (U -= 65536,
|
|
11584
|
+
U === null ? (U = 65533, q = 1) : U > 65535 && (U -= 65536, b.push(U >>> 10 & 1023 | 55296), U = 56320 | U & 1023), b.push(U), T += q;
|
|
11585
11585
|
}
|
|
11586
|
-
return $(
|
|
11586
|
+
return $(b);
|
|
11587
11587
|
}
|
|
11588
11588
|
var Z = 4096;
|
|
11589
11589
|
function $(y) {
|
|
11590
11590
|
var l = y.length;
|
|
11591
11591
|
if (l <= Z)
|
|
11592
11592
|
return String.fromCharCode.apply(String, y);
|
|
11593
|
-
for (var p = "",
|
|
11593
|
+
for (var p = "", b = 0; b < l; )
|
|
11594
11594
|
p += String.fromCharCode.apply(
|
|
11595
11595
|
String,
|
|
11596
|
-
y.slice(
|
|
11596
|
+
y.slice(b, b += Z)
|
|
11597
11597
|
);
|
|
11598
11598
|
return p;
|
|
11599
11599
|
}
|
|
11600
11600
|
function te(y, l, p) {
|
|
11601
|
-
var
|
|
11601
|
+
var b = "";
|
|
11602
11602
|
p = Math.min(y.length, p);
|
|
11603
11603
|
for (var T = l; T < p; ++T)
|
|
11604
|
-
|
|
11605
|
-
return
|
|
11604
|
+
b += String.fromCharCode(y[T] & 127);
|
|
11605
|
+
return b;
|
|
11606
11606
|
}
|
|
11607
11607
|
function se(y, l, p) {
|
|
11608
|
-
var
|
|
11608
|
+
var b = "";
|
|
11609
11609
|
p = Math.min(y.length, p);
|
|
11610
11610
|
for (var T = l; T < p; ++T)
|
|
11611
|
-
|
|
11612
|
-
return
|
|
11611
|
+
b += String.fromCharCode(y[T]);
|
|
11612
|
+
return b;
|
|
11613
11613
|
}
|
|
11614
11614
|
function ae(y, l, p) {
|
|
11615
|
-
var
|
|
11616
|
-
(!l || l < 0) && (l = 0), (!p || p < 0 || p >
|
|
11615
|
+
var b = y.length;
|
|
11616
|
+
(!l || l < 0) && (l = 0), (!p || p < 0 || p > b) && (p = b);
|
|
11617
11617
|
for (var T = "", A = l; A < p; ++A)
|
|
11618
11618
|
T += Hi[y[A]];
|
|
11619
11619
|
return T;
|
|
11620
11620
|
}
|
|
11621
11621
|
function ue(y, l, p) {
|
|
11622
|
-
for (var
|
|
11623
|
-
T += String.fromCharCode(
|
|
11622
|
+
for (var b = y.slice(l, p), T = "", A = 0; A < b.length - 1; A += 2)
|
|
11623
|
+
T += String.fromCharCode(b[A] + b[A + 1] * 256);
|
|
11624
11624
|
return T;
|
|
11625
11625
|
}
|
|
11626
11626
|
o.prototype.slice = function(l, p) {
|
|
11627
|
-
var
|
|
11628
|
-
l = ~~l, p = p === void 0 ?
|
|
11627
|
+
var b = this.length;
|
|
11628
|
+
l = ~~l, p = p === void 0 ? b : ~~p, l < 0 ? (l += b, l < 0 && (l = 0)) : l > b && (l = b), p < 0 ? (p += b, p < 0 && (p = 0)) : p > b && (p = b), p < l && (p = l);
|
|
11629
11629
|
var T = this.subarray(l, p);
|
|
11630
11630
|
return Object.setPrototypeOf(T, o.prototype), T;
|
|
11631
11631
|
};
|
|
@@ -11633,13 +11633,13 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11633
11633
|
if (y % 1 !== 0 || y < 0) throw new RangeError("offset is not uint");
|
|
11634
11634
|
if (y + l > p) throw new RangeError("Trying to access beyond buffer length");
|
|
11635
11635
|
}
|
|
11636
|
-
o.prototype.readUintLE = o.prototype.readUIntLE = function(l, p,
|
|
11637
|
-
l = l >>> 0, p = p >>> 0,
|
|
11636
|
+
o.prototype.readUintLE = o.prototype.readUIntLE = function(l, p, b) {
|
|
11637
|
+
l = l >>> 0, p = p >>> 0, b || G(l, p, this.length);
|
|
11638
11638
|
for (var T = this[l], A = 1, U = 0; ++U < p && (A *= 256); )
|
|
11639
11639
|
T += this[l + U] * A;
|
|
11640
11640
|
return T;
|
|
11641
|
-
}, o.prototype.readUintBE = o.prototype.readUIntBE = function(l, p,
|
|
11642
|
-
l = l >>> 0, p = p >>> 0,
|
|
11641
|
+
}, o.prototype.readUintBE = o.prototype.readUIntBE = function(l, p, b) {
|
|
11642
|
+
l = l >>> 0, p = p >>> 0, b || G(l, p, this.length);
|
|
11643
11643
|
for (var T = this[l + --p], A = 1; p > 0 && (A *= 256); )
|
|
11644
11644
|
T += this[l + --p] * A;
|
|
11645
11645
|
return T;
|
|
@@ -11653,13 +11653,13 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11653
11653
|
return l = l >>> 0, p || G(l, 4, this.length), (this[l] | this[l + 1] << 8 | this[l + 2] << 16) + this[l + 3] * 16777216;
|
|
11654
11654
|
}, o.prototype.readUint32BE = o.prototype.readUInt32BE = function(l, p) {
|
|
11655
11655
|
return l = l >>> 0, p || G(l, 4, this.length), this[l] * 16777216 + (this[l + 1] << 16 | this[l + 2] << 8 | this[l + 3]);
|
|
11656
|
-
}, o.prototype.readIntLE = function(l, p,
|
|
11657
|
-
l = l >>> 0, p = p >>> 0,
|
|
11656
|
+
}, o.prototype.readIntLE = function(l, p, b) {
|
|
11657
|
+
l = l >>> 0, p = p >>> 0, b || G(l, p, this.length);
|
|
11658
11658
|
for (var T = this[l], A = 1, U = 0; ++U < p && (A *= 256); )
|
|
11659
11659
|
T += this[l + U] * A;
|
|
11660
11660
|
return A *= 128, T >= A && (T -= Math.pow(2, 8 * p)), T;
|
|
11661
|
-
}, o.prototype.readIntBE = function(l, p,
|
|
11662
|
-
l = l >>> 0, p = p >>> 0,
|
|
11661
|
+
}, o.prototype.readIntBE = function(l, p, b) {
|
|
11662
|
+
l = l >>> 0, p = p >>> 0, b || G(l, p, this.length);
|
|
11663
11663
|
for (var T = p, A = 1, U = this[l + --T]; T > 0 && (A *= 256); )
|
|
11664
11664
|
U += this[l + --T] * A;
|
|
11665
11665
|
return A *= 128, U >= A && (U -= Math.pow(2, 8 * p)), U;
|
|
@@ -11667,12 +11667,12 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11667
11667
|
return l = l >>> 0, p || G(l, 1, this.length), this[l] & 128 ? (255 - this[l] + 1) * -1 : this[l];
|
|
11668
11668
|
}, o.prototype.readInt16LE = function(l, p) {
|
|
11669
11669
|
l = l >>> 0, p || G(l, 2, this.length);
|
|
11670
|
-
var
|
|
11671
|
-
return
|
|
11670
|
+
var b = this[l] | this[l + 1] << 8;
|
|
11671
|
+
return b & 32768 ? b | 4294901760 : b;
|
|
11672
11672
|
}, o.prototype.readInt16BE = function(l, p) {
|
|
11673
11673
|
l = l >>> 0, p || G(l, 2, this.length);
|
|
11674
|
-
var
|
|
11675
|
-
return
|
|
11674
|
+
var b = this[l + 1] | this[l] << 8;
|
|
11675
|
+
return b & 32768 ? b | 4294901760 : b;
|
|
11676
11676
|
}, o.prototype.readInt32LE = function(l, p) {
|
|
11677
11677
|
return l = l >>> 0, p || G(l, 4, this.length), this[l] | this[l + 1] << 8 | this[l + 2] << 16 | this[l + 3] << 24;
|
|
11678
11678
|
}, o.prototype.readInt32BE = function(l, p) {
|
|
@@ -11686,104 +11686,104 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11686
11686
|
}, o.prototype.readDoubleBE = function(l, p) {
|
|
11687
11687
|
return l = l >>> 0, p || G(l, 8, this.length), r.read(this, l, !1, 52, 8);
|
|
11688
11688
|
};
|
|
11689
|
-
function V(y, l, p,
|
|
11689
|
+
function V(y, l, p, b, T, A) {
|
|
11690
11690
|
if (!o.isBuffer(y)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
11691
11691
|
if (l > T || l < A) throw new RangeError('"value" argument is out of bounds');
|
|
11692
|
-
if (p +
|
|
11692
|
+
if (p + b > y.length) throw new RangeError("Index out of range");
|
|
11693
11693
|
}
|
|
11694
|
-
o.prototype.writeUintLE = o.prototype.writeUIntLE = function(l, p,
|
|
11695
|
-
if (l = +l, p = p >>> 0,
|
|
11696
|
-
var A = Math.pow(2, 8 *
|
|
11697
|
-
V(this, l, p,
|
|
11694
|
+
o.prototype.writeUintLE = o.prototype.writeUIntLE = function(l, p, b, T) {
|
|
11695
|
+
if (l = +l, p = p >>> 0, b = b >>> 0, !T) {
|
|
11696
|
+
var A = Math.pow(2, 8 * b) - 1;
|
|
11697
|
+
V(this, l, p, b, A, 0);
|
|
11698
11698
|
}
|
|
11699
11699
|
var U = 1, q = 0;
|
|
11700
|
-
for (this[p] = l & 255; ++q <
|
|
11700
|
+
for (this[p] = l & 255; ++q < b && (U *= 256); )
|
|
11701
11701
|
this[p + q] = l / U & 255;
|
|
11702
|
-
return p +
|
|
11703
|
-
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(l, p,
|
|
11704
|
-
if (l = +l, p = p >>> 0,
|
|
11705
|
-
var A = Math.pow(2, 8 *
|
|
11706
|
-
V(this, l, p,
|
|
11702
|
+
return p + b;
|
|
11703
|
+
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(l, p, b, T) {
|
|
11704
|
+
if (l = +l, p = p >>> 0, b = b >>> 0, !T) {
|
|
11705
|
+
var A = Math.pow(2, 8 * b) - 1;
|
|
11706
|
+
V(this, l, p, b, A, 0);
|
|
11707
11707
|
}
|
|
11708
|
-
var U =
|
|
11708
|
+
var U = b - 1, q = 1;
|
|
11709
11709
|
for (this[p + U] = l & 255; --U >= 0 && (q *= 256); )
|
|
11710
11710
|
this[p + U] = l / q & 255;
|
|
11711
|
-
return p +
|
|
11712
|
-
}, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(l, p,
|
|
11713
|
-
return l = +l, p = p >>> 0,
|
|
11714
|
-
}, o.prototype.writeUint16LE = o.prototype.writeUInt16LE = function(l, p,
|
|
11715
|
-
return l = +l, p = p >>> 0,
|
|
11716
|
-
}, o.prototype.writeUint16BE = o.prototype.writeUInt16BE = function(l, p,
|
|
11717
|
-
return l = +l, p = p >>> 0,
|
|
11718
|
-
}, o.prototype.writeUint32LE = o.prototype.writeUInt32LE = function(l, p,
|
|
11719
|
-
return l = +l, p = p >>> 0,
|
|
11720
|
-
}, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(l, p,
|
|
11721
|
-
return l = +l, p = p >>> 0,
|
|
11722
|
-
}, o.prototype.writeIntLE = function(l, p,
|
|
11711
|
+
return p + b;
|
|
11712
|
+
}, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(l, p, b) {
|
|
11713
|
+
return l = +l, p = p >>> 0, b || V(this, l, p, 1, 255, 0), this[p] = l & 255, p + 1;
|
|
11714
|
+
}, o.prototype.writeUint16LE = o.prototype.writeUInt16LE = function(l, p, b) {
|
|
11715
|
+
return l = +l, p = p >>> 0, b || V(this, l, p, 2, 65535, 0), this[p] = l & 255, this[p + 1] = l >>> 8, p + 2;
|
|
11716
|
+
}, o.prototype.writeUint16BE = o.prototype.writeUInt16BE = function(l, p, b) {
|
|
11717
|
+
return l = +l, p = p >>> 0, b || V(this, l, p, 2, 65535, 0), this[p] = l >>> 8, this[p + 1] = l & 255, p + 2;
|
|
11718
|
+
}, o.prototype.writeUint32LE = o.prototype.writeUInt32LE = function(l, p, b) {
|
|
11719
|
+
return l = +l, p = p >>> 0, b || V(this, l, p, 4, 4294967295, 0), this[p + 3] = l >>> 24, this[p + 2] = l >>> 16, this[p + 1] = l >>> 8, this[p] = l & 255, p + 4;
|
|
11720
|
+
}, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(l, p, b) {
|
|
11721
|
+
return l = +l, p = p >>> 0, b || V(this, l, p, 4, 4294967295, 0), this[p] = l >>> 24, this[p + 1] = l >>> 16, this[p + 2] = l >>> 8, this[p + 3] = l & 255, p + 4;
|
|
11722
|
+
}, o.prototype.writeIntLE = function(l, p, b, T) {
|
|
11723
11723
|
if (l = +l, p = p >>> 0, !T) {
|
|
11724
|
-
var A = Math.pow(2, 8 *
|
|
11725
|
-
V(this, l, p,
|
|
11724
|
+
var A = Math.pow(2, 8 * b - 1);
|
|
11725
|
+
V(this, l, p, b, A - 1, -A);
|
|
11726
11726
|
}
|
|
11727
11727
|
var U = 0, q = 1, X = 0;
|
|
11728
|
-
for (this[p] = l & 255; ++U <
|
|
11728
|
+
for (this[p] = l & 255; ++U < b && (q *= 256); )
|
|
11729
11729
|
l < 0 && X === 0 && this[p + U - 1] !== 0 && (X = 1), this[p + U] = (l / q >> 0) - X & 255;
|
|
11730
|
-
return p +
|
|
11731
|
-
}, o.prototype.writeIntBE = function(l, p,
|
|
11730
|
+
return p + b;
|
|
11731
|
+
}, o.prototype.writeIntBE = function(l, p, b, T) {
|
|
11732
11732
|
if (l = +l, p = p >>> 0, !T) {
|
|
11733
|
-
var A = Math.pow(2, 8 *
|
|
11734
|
-
V(this, l, p,
|
|
11733
|
+
var A = Math.pow(2, 8 * b - 1);
|
|
11734
|
+
V(this, l, p, b, A - 1, -A);
|
|
11735
11735
|
}
|
|
11736
|
-
var U =
|
|
11736
|
+
var U = b - 1, q = 1, X = 0;
|
|
11737
11737
|
for (this[p + U] = l & 255; --U >= 0 && (q *= 256); )
|
|
11738
11738
|
l < 0 && X === 0 && this[p + U + 1] !== 0 && (X = 1), this[p + U] = (l / q >> 0) - X & 255;
|
|
11739
|
-
return p +
|
|
11740
|
-
}, o.prototype.writeInt8 = function(l, p,
|
|
11741
|
-
return l = +l, p = p >>> 0,
|
|
11742
|
-
}, o.prototype.writeInt16LE = function(l, p,
|
|
11743
|
-
return l = +l, p = p >>> 0,
|
|
11744
|
-
}, o.prototype.writeInt16BE = function(l, p,
|
|
11745
|
-
return l = +l, p = p >>> 0,
|
|
11746
|
-
}, o.prototype.writeInt32LE = function(l, p,
|
|
11747
|
-
return l = +l, p = p >>> 0,
|
|
11748
|
-
}, o.prototype.writeInt32BE = function(l, p,
|
|
11749
|
-
return l = +l, p = p >>> 0,
|
|
11739
|
+
return p + b;
|
|
11740
|
+
}, o.prototype.writeInt8 = function(l, p, b) {
|
|
11741
|
+
return l = +l, p = p >>> 0, b || V(this, l, p, 1, 127, -128), l < 0 && (l = 255 + l + 1), this[p] = l & 255, p + 1;
|
|
11742
|
+
}, o.prototype.writeInt16LE = function(l, p, b) {
|
|
11743
|
+
return l = +l, p = p >>> 0, b || V(this, l, p, 2, 32767, -32768), this[p] = l & 255, this[p + 1] = l >>> 8, p + 2;
|
|
11744
|
+
}, o.prototype.writeInt16BE = function(l, p, b) {
|
|
11745
|
+
return l = +l, p = p >>> 0, b || V(this, l, p, 2, 32767, -32768), this[p] = l >>> 8, this[p + 1] = l & 255, p + 2;
|
|
11746
|
+
}, o.prototype.writeInt32LE = function(l, p, b) {
|
|
11747
|
+
return l = +l, p = p >>> 0, b || V(this, l, p, 4, 2147483647, -2147483648), this[p] = l & 255, this[p + 1] = l >>> 8, this[p + 2] = l >>> 16, this[p + 3] = l >>> 24, p + 4;
|
|
11748
|
+
}, o.prototype.writeInt32BE = function(l, p, b) {
|
|
11749
|
+
return l = +l, p = p >>> 0, b || V(this, l, p, 4, 2147483647, -2147483648), l < 0 && (l = 4294967295 + l + 1), this[p] = l >>> 24, this[p + 1] = l >>> 16, this[p + 2] = l >>> 8, this[p + 3] = l & 255, p + 4;
|
|
11750
11750
|
};
|
|
11751
|
-
function
|
|
11752
|
-
if (p +
|
|
11751
|
+
function rt(y, l, p, b, T, A) {
|
|
11752
|
+
if (p + b > y.length) throw new RangeError("Index out of range");
|
|
11753
11753
|
if (p < 0) throw new RangeError("Index out of range");
|
|
11754
11754
|
}
|
|
11755
|
-
function Bt(y, l, p,
|
|
11756
|
-
return l = +l, p = p >>> 0, T ||
|
|
11755
|
+
function Bt(y, l, p, b, T) {
|
|
11756
|
+
return l = +l, p = p >>> 0, T || rt(y, l, p, 4), r.write(y, l, p, b, 23, 4), p + 4;
|
|
11757
11757
|
}
|
|
11758
|
-
o.prototype.writeFloatLE = function(l, p,
|
|
11759
|
-
return Bt(this, l, p, !0,
|
|
11760
|
-
}, o.prototype.writeFloatBE = function(l, p,
|
|
11761
|
-
return Bt(this, l, p, !1,
|
|
11758
|
+
o.prototype.writeFloatLE = function(l, p, b) {
|
|
11759
|
+
return Bt(this, l, p, !0, b);
|
|
11760
|
+
}, o.prototype.writeFloatBE = function(l, p, b) {
|
|
11761
|
+
return Bt(this, l, p, !1, b);
|
|
11762
11762
|
};
|
|
11763
|
-
function Lt(y, l, p,
|
|
11764
|
-
return l = +l, p = p >>> 0, T ||
|
|
11765
|
-
}
|
|
11766
|
-
o.prototype.writeDoubleLE = function(l, p,
|
|
11767
|
-
return Lt(this, l, p, !0,
|
|
11768
|
-
}, o.prototype.writeDoubleBE = function(l, p,
|
|
11769
|
-
return Lt(this, l, p, !1,
|
|
11770
|
-
}, o.prototype.copy = function(l, p,
|
|
11763
|
+
function Lt(y, l, p, b, T) {
|
|
11764
|
+
return l = +l, p = p >>> 0, T || rt(y, l, p, 8), r.write(y, l, p, b, 52, 8), p + 8;
|
|
11765
|
+
}
|
|
11766
|
+
o.prototype.writeDoubleLE = function(l, p, b) {
|
|
11767
|
+
return Lt(this, l, p, !0, b);
|
|
11768
|
+
}, o.prototype.writeDoubleBE = function(l, p, b) {
|
|
11769
|
+
return Lt(this, l, p, !1, b);
|
|
11770
|
+
}, o.prototype.copy = function(l, p, b, T) {
|
|
11771
11771
|
if (!o.isBuffer(l)) throw new TypeError("argument should be a Buffer");
|
|
11772
|
-
if (
|
|
11772
|
+
if (b || (b = 0), !T && T !== 0 && (T = this.length), p >= l.length && (p = l.length), p || (p = 0), T > 0 && T < b && (T = b), T === b || l.length === 0 || this.length === 0) return 0;
|
|
11773
11773
|
if (p < 0)
|
|
11774
11774
|
throw new RangeError("targetStart out of bounds");
|
|
11775
|
-
if (
|
|
11775
|
+
if (b < 0 || b >= this.length) throw new RangeError("Index out of range");
|
|
11776
11776
|
if (T < 0) throw new RangeError("sourceEnd out of bounds");
|
|
11777
|
-
T > this.length && (T = this.length), l.length - p < T -
|
|
11778
|
-
var A = T -
|
|
11779
|
-
return this === l && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(p,
|
|
11777
|
+
T > this.length && (T = this.length), l.length - p < T - b && (T = l.length - p + b);
|
|
11778
|
+
var A = T - b;
|
|
11779
|
+
return this === l && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(p, b, T) : Uint8Array.prototype.set.call(
|
|
11780
11780
|
l,
|
|
11781
|
-
this.subarray(
|
|
11781
|
+
this.subarray(b, T),
|
|
11782
11782
|
p
|
|
11783
11783
|
), A;
|
|
11784
|
-
}, o.prototype.fill = function(l, p,
|
|
11784
|
+
}, o.prototype.fill = function(l, p, b, T) {
|
|
11785
11785
|
if (typeof l == "string") {
|
|
11786
|
-
if (typeof p == "string" ? (T = p, p = 0,
|
|
11786
|
+
if (typeof p == "string" ? (T = p, p = 0, b = this.length) : typeof b == "string" && (T = b, b = this.length), T !== void 0 && typeof T != "string")
|
|
11787
11787
|
throw new TypeError("encoding must be a string");
|
|
11788
11788
|
if (typeof T == "string" && !o.isEncoding(T))
|
|
11789
11789
|
throw new TypeError("Unknown encoding: " + T);
|
|
@@ -11792,20 +11792,20 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11792
11792
|
(T === "utf8" && A < 128 || T === "latin1") && (l = A);
|
|
11793
11793
|
}
|
|
11794
11794
|
} else typeof l == "number" ? l = l & 255 : typeof l == "boolean" && (l = Number(l));
|
|
11795
|
-
if (p < 0 || this.length < p || this.length <
|
|
11795
|
+
if (p < 0 || this.length < p || this.length < b)
|
|
11796
11796
|
throw new RangeError("Out of range index");
|
|
11797
|
-
if (
|
|
11797
|
+
if (b <= p)
|
|
11798
11798
|
return this;
|
|
11799
|
-
p = p >>> 0,
|
|
11799
|
+
p = p >>> 0, b = b === void 0 ? this.length : b >>> 0, l || (l = 0);
|
|
11800
11800
|
var U;
|
|
11801
11801
|
if (typeof l == "number")
|
|
11802
|
-
for (U = p; U <
|
|
11802
|
+
for (U = p; U < b; ++U)
|
|
11803
11803
|
this[U] = l;
|
|
11804
11804
|
else {
|
|
11805
11805
|
var q = o.isBuffer(l) ? l : o.from(l, T), X = q.length;
|
|
11806
11806
|
if (X === 0)
|
|
11807
11807
|
throw new TypeError('The value "' + l + '" is invalid for argument "value"');
|
|
11808
|
-
for (U = 0; U <
|
|
11808
|
+
for (U = 0; U < b - p; ++U)
|
|
11809
11809
|
this[U + p] = q[U % X];
|
|
11810
11810
|
}
|
|
11811
11811
|
return this;
|
|
@@ -11819,13 +11819,13 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11819
11819
|
}
|
|
11820
11820
|
function Pe(y, l) {
|
|
11821
11821
|
l = l || 1 / 0;
|
|
11822
|
-
for (var p,
|
|
11822
|
+
for (var p, b = y.length, T = null, A = [], U = 0; U < b; ++U) {
|
|
11823
11823
|
if (p = y.charCodeAt(U), p > 55295 && p < 57344) {
|
|
11824
11824
|
if (!T) {
|
|
11825
11825
|
if (p > 56319) {
|
|
11826
11826
|
(l -= 3) > -1 && A.push(239, 191, 189);
|
|
11827
11827
|
continue;
|
|
11828
|
-
} else if (U + 1 ===
|
|
11828
|
+
} else if (U + 1 === b) {
|
|
11829
11829
|
(l -= 3) > -1 && A.push(239, 191, 189);
|
|
11830
11830
|
continue;
|
|
11831
11831
|
}
|
|
@@ -11873,15 +11873,15 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11873
11873
|
return l;
|
|
11874
11874
|
}
|
|
11875
11875
|
function Gi(y, l) {
|
|
11876
|
-
for (var p,
|
|
11877
|
-
p = y.charCodeAt(U),
|
|
11876
|
+
for (var p, b, T, A = [], U = 0; U < y.length && !((l -= 2) < 0); ++U)
|
|
11877
|
+
p = y.charCodeAt(U), b = p >> 8, T = p % 256, A.push(T), A.push(b);
|
|
11878
11878
|
return A;
|
|
11879
11879
|
}
|
|
11880
11880
|
function gn(y) {
|
|
11881
11881
|
return e.toByteArray(Ot(y));
|
|
11882
11882
|
}
|
|
11883
|
-
function Rt(y, l, p,
|
|
11884
|
-
for (var T = 0; T <
|
|
11883
|
+
function Rt(y, l, p, b) {
|
|
11884
|
+
for (var T = 0; T < b && !(T + p >= l.length || T >= y.length); ++T)
|
|
11885
11885
|
l[T + p] = y[T];
|
|
11886
11886
|
return T;
|
|
11887
11887
|
}
|
|
@@ -11893,31 +11893,31 @@ cn.write = function(t, e, r, n, a, i) {
|
|
|
11893
11893
|
}
|
|
11894
11894
|
var Hi = function() {
|
|
11895
11895
|
for (var y = "0123456789abcdef", l = new Array(256), p = 0; p < 16; ++p)
|
|
11896
|
-
for (var
|
|
11897
|
-
l[
|
|
11896
|
+
for (var b = p * 16, T = 0; T < 16; ++T)
|
|
11897
|
+
l[b + T] = y[p] + y[T];
|
|
11898
11898
|
return l;
|
|
11899
11899
|
}();
|
|
11900
11900
|
})(on);
|
|
11901
|
-
var Vt = on,
|
|
11902
|
-
for (
|
|
11903
|
-
Vt.hasOwnProperty(
|
|
11904
|
-
var
|
|
11905
|
-
for (
|
|
11906
|
-
|
|
11907
|
-
me.Buffer.prototype =
|
|
11908
|
-
(!
|
|
11901
|
+
var Vt = on, ot = Vt.Buffer, me = {}, be;
|
|
11902
|
+
for (be in Vt)
|
|
11903
|
+
Vt.hasOwnProperty(be) && (be === "SlowBuffer" || be === "Buffer" || (me[be] = Vt[be]));
|
|
11904
|
+
var ct = me.Buffer = {};
|
|
11905
|
+
for (be in ot)
|
|
11906
|
+
ot.hasOwnProperty(be) && (be === "allocUnsafe" || be === "allocUnsafeSlow" || (ct[be] = ot[be]));
|
|
11907
|
+
me.Buffer.prototype = ot.prototype;
|
|
11908
|
+
(!ct.from || ct.from === Uint8Array.from) && (ct.from = function(t, e, r) {
|
|
11909
11909
|
if (typeof t == "number")
|
|
11910
11910
|
throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof t);
|
|
11911
11911
|
if (t && typeof t.length > "u")
|
|
11912
11912
|
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof t);
|
|
11913
|
-
return
|
|
11913
|
+
return ot(t, e, r);
|
|
11914
11914
|
});
|
|
11915
|
-
|
|
11915
|
+
ct.alloc || (ct.alloc = function(t, e, r) {
|
|
11916
11916
|
if (typeof t != "number")
|
|
11917
11917
|
throw new TypeError('The "size" argument must be of type number. Received type ' + typeof t);
|
|
11918
11918
|
if (t < 0 || t >= 2 * (1 << 30))
|
|
11919
11919
|
throw new RangeError('The value "' + t + '" is invalid for option "size"');
|
|
11920
|
-
var n =
|
|
11920
|
+
var n = ot(t);
|
|
11921
11921
|
return !e || e.length === 0 ? n.fill(0) : typeof r == "string" ? n.fill(e, r) : n.fill(e), n;
|
|
11922
11922
|
});
|
|
11923
11923
|
if (!me.kStringMaxLength)
|
|
@@ -11928,7 +11928,7 @@ if (!me.kStringMaxLength)
|
|
|
11928
11928
|
me.constants || (me.constants = {
|
|
11929
11929
|
MAX_LENGTH: me.kMaxLength
|
|
11930
11930
|
}, me.kStringMaxLength && (me.constants.MAX_STRING_LENGTH = me.kStringMaxLength));
|
|
11931
|
-
var
|
|
11931
|
+
var je = me, un = {}, Di = "\uFEFF";
|
|
11932
11932
|
un.PrependBOM = hn;
|
|
11933
11933
|
function hn(t, e) {
|
|
11934
11934
|
this.encoder = t, this.addBOM = !0;
|
|
@@ -11955,7 +11955,7 @@ function al(t, e) {
|
|
|
11955
11955
|
for (var r in e)
|
|
11956
11956
|
nl(e, r) && (t[r] = e[r]);
|
|
11957
11957
|
}
|
|
11958
|
-
var _i = al, mr = {},
|
|
11958
|
+
var _i = al, mr = {}, br = {}, Gt = { exports: {} };
|
|
11959
11959
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
11960
11960
|
var ma;
|
|
11961
11961
|
function il() {
|
|
@@ -11989,10 +11989,10 @@ function il() {
|
|
|
11989
11989
|
};
|
|
11990
11990
|
}(Gt, Gt.exports)), Gt.exports;
|
|
11991
11991
|
}
|
|
11992
|
-
var
|
|
11992
|
+
var ba;
|
|
11993
11993
|
function sl() {
|
|
11994
|
-
if (
|
|
11995
|
-
|
|
11994
|
+
if (ba) return br;
|
|
11995
|
+
ba = 1;
|
|
11996
11996
|
var t = il().Buffer, e = t.isEncoding || function(m) {
|
|
11997
11997
|
switch (m = "" + m, m && m.toLowerCase()) {
|
|
11998
11998
|
case "hex":
|
|
@@ -12040,7 +12040,7 @@ function sl() {
|
|
|
12040
12040
|
if (typeof F != "string" && (t.isEncoding === e || !e(m))) throw new Error("Unknown encoding: " + m);
|
|
12041
12041
|
return F || m;
|
|
12042
12042
|
}
|
|
12043
|
-
|
|
12043
|
+
br.StringDecoder = a;
|
|
12044
12044
|
function a(m) {
|
|
12045
12045
|
this.encoding = n(m);
|
|
12046
12046
|
var F;
|
|
@@ -12055,7 +12055,7 @@ function sl() {
|
|
|
12055
12055
|
this.text = g, this.end = S, F = 3;
|
|
12056
12056
|
break;
|
|
12057
12057
|
default:
|
|
12058
|
-
this.write = v, this.end =
|
|
12058
|
+
this.write = v, this.end = x;
|
|
12059
12059
|
return;
|
|
12060
12060
|
}
|
|
12061
12061
|
this.lastNeed = 0, this.lastTotal = 0, this.lastChar = t.allocUnsafe(F);
|
|
@@ -12142,17 +12142,17 @@ function sl() {
|
|
|
12142
12142
|
function v(m) {
|
|
12143
12143
|
return m.toString(this.encoding);
|
|
12144
12144
|
}
|
|
12145
|
-
function
|
|
12145
|
+
function x(m) {
|
|
12146
12146
|
return m && m.length ? this.write(m) : "";
|
|
12147
12147
|
}
|
|
12148
|
-
return
|
|
12148
|
+
return br;
|
|
12149
12149
|
}
|
|
12150
|
-
var
|
|
12150
|
+
var xr, xa;
|
|
12151
12151
|
function ol() {
|
|
12152
|
-
if (
|
|
12153
|
-
|
|
12154
|
-
var t =
|
|
12155
|
-
|
|
12152
|
+
if (xa) return xr;
|
|
12153
|
+
xa = 1;
|
|
12154
|
+
var t = je.Buffer;
|
|
12155
|
+
xr = {
|
|
12156
12156
|
// Encodings
|
|
12157
12157
|
utf8: { type: "_internal", bomAware: !0 },
|
|
12158
12158
|
cesu8: { type: "_internal", bomAware: !0 },
|
|
@@ -12232,13 +12232,13 @@ function ol() {
|
|
|
12232
12232
|
var u = this.highSurrogate;
|
|
12233
12233
|
return this.highSurrogate = "", t.from(u, this.enc);
|
|
12234
12234
|
}
|
|
12235
|
-
},
|
|
12235
|
+
}, xr;
|
|
12236
12236
|
}
|
|
12237
12237
|
var Ie = {}, Sa;
|
|
12238
12238
|
function cl() {
|
|
12239
12239
|
if (Sa) return Ie;
|
|
12240
12240
|
Sa = 1;
|
|
12241
|
-
var t =
|
|
12241
|
+
var t = je.Buffer;
|
|
12242
12242
|
Ie._utf32 = e;
|
|
12243
12243
|
function e(u, h) {
|
|
12244
12244
|
this.iconv = h, this.bomAware = !0, this.isLE = u.isLE;
|
|
@@ -12249,16 +12249,16 @@ function cl() {
|
|
|
12249
12249
|
}
|
|
12250
12250
|
r.prototype.write = function(u) {
|
|
12251
12251
|
for (var h = t.from(u, "ucs2"), d = t.alloc(h.length * 2), f = this.isLE ? d.writeUInt32LE : d.writeUInt32BE, g = 0, S = 0; S < h.length; S += 2) {
|
|
12252
|
-
var v = h.readUInt16LE(S),
|
|
12252
|
+
var v = h.readUInt16LE(S), x = v >= 55296 && v < 56320, m = v >= 56320 && v < 57344;
|
|
12253
12253
|
if (this.highSurrogate)
|
|
12254
|
-
if (
|
|
12254
|
+
if (x || !m)
|
|
12255
12255
|
f.call(d, this.highSurrogate, g), g += 4;
|
|
12256
12256
|
else {
|
|
12257
12257
|
var F = (this.highSurrogate - 55296 << 10 | v - 56320) + 65536;
|
|
12258
12258
|
f.call(d, F, g), g += 4, this.highSurrogate = 0;
|
|
12259
12259
|
continue;
|
|
12260
12260
|
}
|
|
12261
|
-
|
|
12261
|
+
x ? this.highSurrogate = v : (f.call(d, v, g), g += 4, this.highSurrogate = 0);
|
|
12262
12262
|
}
|
|
12263
12263
|
return g < d.length && (d = d.slice(0, g)), d;
|
|
12264
12264
|
}, r.prototype.end = function() {
|
|
@@ -12273,14 +12273,14 @@ function cl() {
|
|
|
12273
12273
|
n.prototype.write = function(u) {
|
|
12274
12274
|
if (u.length === 0)
|
|
12275
12275
|
return "";
|
|
12276
|
-
var h = 0, d = 0, f = t.alloc(u.length + 4), g = 0, S = this.isLE, v = this.overflow,
|
|
12276
|
+
var h = 0, d = 0, f = t.alloc(u.length + 4), g = 0, S = this.isLE, v = this.overflow, x = this.badChar;
|
|
12277
12277
|
if (v.length > 0) {
|
|
12278
12278
|
for (; h < u.length && v.length < 4; h++)
|
|
12279
12279
|
v.push(u[h]);
|
|
12280
|
-
v.length === 4 && (S ? d = v[h] | v[h + 1] << 8 | v[h + 2] << 16 | v[h + 3] << 24 : d = v[h + 3] | v[h + 2] << 8 | v[h + 1] << 16 | v[h] << 24, v.length = 0, g = a(f, g, d,
|
|
12280
|
+
v.length === 4 && (S ? d = v[h] | v[h + 1] << 8 | v[h + 2] << 16 | v[h + 3] << 24 : d = v[h + 3] | v[h + 2] << 8 | v[h + 1] << 16 | v[h] << 24, v.length = 0, g = a(f, g, d, x));
|
|
12281
12281
|
}
|
|
12282
12282
|
for (; h < u.length - 3; h += 4)
|
|
12283
|
-
S ? d = u[h] | u[h + 1] << 8 | u[h + 2] << 16 | u[h + 3] << 24 : d = u[h + 3] | u[h + 2] << 8 | u[h + 1] << 16 | u[h] << 24, g = a(f, g, d,
|
|
12283
|
+
S ? d = u[h] | u[h + 1] << 8 | u[h + 2] << 16 | u[h + 3] << 24 : d = u[h + 3] | u[h + 2] << 8 | u[h + 1] << 16 | u[h] << 24, g = a(f, g, d, x);
|
|
12284
12284
|
for (; h < u.length; h++)
|
|
12285
12285
|
v.push(u[h]);
|
|
12286
12286
|
return f.slice(0, g).toString("ucs2");
|
|
@@ -12335,7 +12335,7 @@ function cl() {
|
|
|
12335
12335
|
return this.decoder.end();
|
|
12336
12336
|
};
|
|
12337
12337
|
function c(u, h) {
|
|
12338
|
-
var d = [], f = 0, g = 0, S = 0, v = 0,
|
|
12338
|
+
var d = [], f = 0, g = 0, S = 0, v = 0, x = 0;
|
|
12339
12339
|
e:
|
|
12340
12340
|
for (var m = 0; m < u.length; m++)
|
|
12341
12341
|
for (var F = u[m], w = 0; w < F.length; w++)
|
|
@@ -12346,10 +12346,10 @@ function cl() {
|
|
|
12346
12346
|
if (d[0] === 0 && d[1] === 0 && d[2] === 254 && d[3] === 255)
|
|
12347
12347
|
return "utf-32be";
|
|
12348
12348
|
}
|
|
12349
|
-
if ((d[0] !== 0 || d[1] > 16) && S++, (d[3] !== 0 || d[2] > 16) && g++, d[0] === 0 && d[1] === 0 && (d[2] !== 0 || d[3] !== 0) &&
|
|
12349
|
+
if ((d[0] !== 0 || d[1] > 16) && S++, (d[3] !== 0 || d[2] > 16) && g++, d[0] === 0 && d[1] === 0 && (d[2] !== 0 || d[3] !== 0) && x++, (d[0] !== 0 || d[1] !== 0) && d[2] === 0 && d[3] === 0 && v++, d.length = 0, f++, f >= 100)
|
|
12350
12350
|
break e;
|
|
12351
12351
|
}
|
|
12352
|
-
return
|
|
12352
|
+
return x - S > v - g ? "utf-32be" : x - S < v - g ? "utf-32le" : h || "utf-32le";
|
|
12353
12353
|
}
|
|
12354
12354
|
return Ie;
|
|
12355
12355
|
}
|
|
@@ -12357,7 +12357,7 @@ var Ht = {}, wa;
|
|
|
12357
12357
|
function ul() {
|
|
12358
12358
|
if (wa) return Ht;
|
|
12359
12359
|
wa = 1;
|
|
12360
|
-
var t =
|
|
12360
|
+
var t = je.Buffer;
|
|
12361
12361
|
Ht.utf16be = e;
|
|
12362
12362
|
function e() {
|
|
12363
12363
|
}
|
|
@@ -12426,8 +12426,8 @@ function ul() {
|
|
|
12426
12426
|
var h = [], d = 0, f = 0, g = 0;
|
|
12427
12427
|
e:
|
|
12428
12428
|
for (var S = 0; S < c.length; S++)
|
|
12429
|
-
for (var v = c[S],
|
|
12430
|
-
if (h.push(v[
|
|
12429
|
+
for (var v = c[S], x = 0; x < v.length; x++)
|
|
12430
|
+
if (h.push(v[x]), h.length === 2) {
|
|
12431
12431
|
if (d === 0) {
|
|
12432
12432
|
if (h[0] === 255 && h[1] === 254) return "utf-16le";
|
|
12433
12433
|
if (h[0] === 254 && h[1] === 255) return "utf-16be";
|
|
@@ -12443,93 +12443,93 @@ var dt = {}, Fa;
|
|
|
12443
12443
|
function hl() {
|
|
12444
12444
|
if (Fa) return dt;
|
|
12445
12445
|
Fa = 1;
|
|
12446
|
-
var t =
|
|
12446
|
+
var t = je.Buffer;
|
|
12447
12447
|
dt.utf7 = e, dt.unicode11utf7 = "utf7";
|
|
12448
|
-
function e(v,
|
|
12449
|
-
this.iconv =
|
|
12448
|
+
function e(v, x) {
|
|
12449
|
+
this.iconv = x;
|
|
12450
12450
|
}
|
|
12451
12451
|
e.prototype.encoder = n, e.prototype.decoder = a, e.prototype.bomAware = !0;
|
|
12452
12452
|
var r = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;
|
|
12453
|
-
function n(v,
|
|
12454
|
-
this.iconv =
|
|
12453
|
+
function n(v, x) {
|
|
12454
|
+
this.iconv = x.iconv;
|
|
12455
12455
|
}
|
|
12456
12456
|
n.prototype.write = function(v) {
|
|
12457
|
-
return t.from(v.replace(r, (function(
|
|
12458
|
-
return "+" + (
|
|
12457
|
+
return t.from(v.replace(r, (function(x) {
|
|
12458
|
+
return "+" + (x === "+" ? "" : this.iconv.encode(x, "utf16-be").toString("base64").replace(/=+$/, "")) + "-";
|
|
12459
12459
|
}).bind(this)));
|
|
12460
12460
|
}, n.prototype.end = function() {
|
|
12461
12461
|
};
|
|
12462
|
-
function a(v,
|
|
12463
|
-
this.iconv =
|
|
12462
|
+
function a(v, x) {
|
|
12463
|
+
this.iconv = x.iconv, this.inBase64 = !1, this.base64Accum = "";
|
|
12464
12464
|
}
|
|
12465
12465
|
for (var i = /[A-Za-z0-9\/+]/, s = [], o = 0; o < 256; o++)
|
|
12466
12466
|
s[o] = i.test(String.fromCharCode(o));
|
|
12467
12467
|
var c = 43, u = 45, h = 38;
|
|
12468
12468
|
a.prototype.write = function(v) {
|
|
12469
|
-
for (var
|
|
12469
|
+
for (var x = "", m = 0, F = this.inBase64, w = this.base64Accum, k = 0; k < v.length; k++)
|
|
12470
12470
|
if (!F)
|
|
12471
|
-
v[k] == c && (
|
|
12471
|
+
v[k] == c && (x += this.iconv.decode(v.slice(m, k), "ascii"), m = k + 1, F = !0);
|
|
12472
12472
|
else if (!s[v[k]]) {
|
|
12473
12473
|
if (k == m && v[k] == u)
|
|
12474
|
-
|
|
12474
|
+
x += "+";
|
|
12475
12475
|
else {
|
|
12476
12476
|
var C = w + this.iconv.decode(v.slice(m, k), "ascii");
|
|
12477
|
-
|
|
12477
|
+
x += this.iconv.decode(t.from(C, "base64"), "utf16-be");
|
|
12478
12478
|
}
|
|
12479
12479
|
v[k] != u && k--, m = k + 1, F = !1, w = "";
|
|
12480
12480
|
}
|
|
12481
12481
|
if (!F)
|
|
12482
|
-
|
|
12482
|
+
x += this.iconv.decode(v.slice(m), "ascii");
|
|
12483
12483
|
else {
|
|
12484
12484
|
var C = w + this.iconv.decode(v.slice(m), "ascii"), L = C.length - C.length % 8;
|
|
12485
|
-
w = C.slice(L), C = C.slice(0, L),
|
|
12485
|
+
w = C.slice(L), C = C.slice(0, L), x += this.iconv.decode(t.from(C, "base64"), "utf16-be");
|
|
12486
12486
|
}
|
|
12487
|
-
return this.inBase64 = F, this.base64Accum = w,
|
|
12487
|
+
return this.inBase64 = F, this.base64Accum = w, x;
|
|
12488
12488
|
}, a.prototype.end = function() {
|
|
12489
12489
|
var v = "";
|
|
12490
12490
|
return this.inBase64 && this.base64Accum.length > 0 && (v = this.iconv.decode(t.from(this.base64Accum, "base64"), "utf16-be")), this.inBase64 = !1, this.base64Accum = "", v;
|
|
12491
12491
|
}, dt.utf7imap = d;
|
|
12492
|
-
function d(v,
|
|
12493
|
-
this.iconv =
|
|
12492
|
+
function d(v, x) {
|
|
12493
|
+
this.iconv = x;
|
|
12494
12494
|
}
|
|
12495
12495
|
d.prototype.encoder = f, d.prototype.decoder = g, d.prototype.bomAware = !0;
|
|
12496
|
-
function f(v,
|
|
12497
|
-
this.iconv =
|
|
12496
|
+
function f(v, x) {
|
|
12497
|
+
this.iconv = x.iconv, this.inBase64 = !1, this.base64Accum = t.alloc(6), this.base64AccumIdx = 0;
|
|
12498
12498
|
}
|
|
12499
12499
|
f.prototype.write = function(v) {
|
|
12500
|
-
for (var
|
|
12500
|
+
for (var x = this.inBase64, m = this.base64Accum, F = this.base64AccumIdx, w = t.alloc(v.length * 5 + 10), k = 0, C = 0; C < v.length; C++) {
|
|
12501
12501
|
var L = v.charCodeAt(C);
|
|
12502
|
-
L >= 32 && L <= 126 ? (
|
|
12502
|
+
L >= 32 && L <= 126 ? (x && (F > 0 && (k += w.write(m.slice(0, F).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), k), F = 0), w[k++] = u, x = !1), x || (w[k++] = L, L === h && (w[k++] = u))) : (x || (w[k++] = h, x = !0), x && (m[F++] = L >> 8, m[F++] = L & 255, F == m.length && (k += w.write(m.toString("base64").replace(/\//g, ","), k), F = 0)));
|
|
12503
12503
|
}
|
|
12504
|
-
return this.inBase64 =
|
|
12504
|
+
return this.inBase64 = x, this.base64AccumIdx = F, w.slice(0, k);
|
|
12505
12505
|
}, f.prototype.end = function() {
|
|
12506
|
-
var v = t.alloc(10),
|
|
12507
|
-
return this.inBase64 && (this.base64AccumIdx > 0 && (
|
|
12506
|
+
var v = t.alloc(10), x = 0;
|
|
12507
|
+
return this.inBase64 && (this.base64AccumIdx > 0 && (x += v.write(this.base64Accum.slice(0, this.base64AccumIdx).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), x), this.base64AccumIdx = 0), v[x++] = u, this.inBase64 = !1), v.slice(0, x);
|
|
12508
12508
|
};
|
|
12509
|
-
function g(v,
|
|
12510
|
-
this.iconv =
|
|
12509
|
+
function g(v, x) {
|
|
12510
|
+
this.iconv = x.iconv, this.inBase64 = !1, this.base64Accum = "";
|
|
12511
12511
|
}
|
|
12512
12512
|
var S = s.slice();
|
|
12513
12513
|
return S[44] = !0, g.prototype.write = function(v) {
|
|
12514
|
-
for (var
|
|
12514
|
+
for (var x = "", m = 0, F = this.inBase64, w = this.base64Accum, k = 0; k < v.length; k++)
|
|
12515
12515
|
if (!F)
|
|
12516
|
-
v[k] == h && (
|
|
12516
|
+
v[k] == h && (x += this.iconv.decode(v.slice(m, k), "ascii"), m = k + 1, F = !0);
|
|
12517
12517
|
else if (!S[v[k]]) {
|
|
12518
12518
|
if (k == m && v[k] == u)
|
|
12519
|
-
|
|
12519
|
+
x += "&";
|
|
12520
12520
|
else {
|
|
12521
12521
|
var C = w + this.iconv.decode(v.slice(m, k), "ascii").replace(/,/g, "/");
|
|
12522
|
-
|
|
12522
|
+
x += this.iconv.decode(t.from(C, "base64"), "utf16-be");
|
|
12523
12523
|
}
|
|
12524
12524
|
v[k] != u && k--, m = k + 1, F = !1, w = "";
|
|
12525
12525
|
}
|
|
12526
12526
|
if (!F)
|
|
12527
|
-
|
|
12527
|
+
x += this.iconv.decode(v.slice(m), "ascii");
|
|
12528
12528
|
else {
|
|
12529
12529
|
var C = w + this.iconv.decode(v.slice(m), "ascii").replace(/,/g, "/"), L = C.length - C.length % 8;
|
|
12530
|
-
w = C.slice(L), C = C.slice(0, L),
|
|
12530
|
+
w = C.slice(L), C = C.slice(0, L), x += this.iconv.decode(t.from(C, "base64"), "utf16-be");
|
|
12531
12531
|
}
|
|
12532
|
-
return this.inBase64 = F, this.base64Accum = w,
|
|
12532
|
+
return this.inBase64 = F, this.base64Accum = w, x;
|
|
12533
12533
|
}, g.prototype.end = function() {
|
|
12534
12534
|
var v = "";
|
|
12535
12535
|
return this.inBase64 && this.base64Accum.length > 0 && (v = this.iconv.decode(t.from(this.base64Accum, "base64"), "utf16-be")), this.inBase64 = !1, this.base64Accum = "", v;
|
|
@@ -12539,7 +12539,7 @@ var Sr = {}, ka;
|
|
|
12539
12539
|
function ll() {
|
|
12540
12540
|
if (ka) return Sr;
|
|
12541
12541
|
ka = 1;
|
|
12542
|
-
var t =
|
|
12542
|
+
var t = je.Buffer;
|
|
12543
12543
|
Sr._sbcs = e;
|
|
12544
12544
|
function e(a, i) {
|
|
12545
12545
|
if (!a)
|
|
@@ -13185,7 +13185,7 @@ var kr = {}, Ea;
|
|
|
13185
13185
|
function dl() {
|
|
13186
13186
|
if (Ea) return kr;
|
|
13187
13187
|
Ea = 1;
|
|
13188
|
-
var t =
|
|
13188
|
+
var t = je.Buffer;
|
|
13189
13189
|
kr._dbcs = c;
|
|
13190
13190
|
for (var e = -1, r = -2, n = -10, a = -1e3, i = new Array(256), s = -1, o = 0; o < 256; o++)
|
|
13191
13191
|
i[o] = e;
|
|
@@ -13200,14 +13200,14 @@ function dl() {
|
|
|
13200
13200
|
this._addDecodeChunk(S[v]);
|
|
13201
13201
|
if (typeof f.gb18030 == "function") {
|
|
13202
13202
|
this.gb18030 = f.gb18030();
|
|
13203
|
-
var
|
|
13203
|
+
var x = this.decodeTables.length;
|
|
13204
13204
|
this.decodeTables.push(i.slice(0));
|
|
13205
13205
|
var m = this.decodeTables.length;
|
|
13206
13206
|
this.decodeTables.push(i.slice(0));
|
|
13207
13207
|
for (var F = this.decodeTables[0], v = 129; v <= 254; v++)
|
|
13208
13208
|
for (var w = this.decodeTables[a - F[v]], k = 48; k <= 57; k++) {
|
|
13209
13209
|
if (w[k] === e)
|
|
13210
|
-
w[k] = a -
|
|
13210
|
+
w[k] = a - x;
|
|
13211
13211
|
else if (w[k] > a)
|
|
13212
13212
|
throw new Error("gb18030 decode tables conflict at byte 2");
|
|
13213
13213
|
for (var C = this.decodeTables[a - w[k]], L = 129; L <= 254; L++) {
|
|
@@ -13245,11 +13245,11 @@ function dl() {
|
|
|
13245
13245
|
g.push(f & 255);
|
|
13246
13246
|
g.length == 0 && g.push(0);
|
|
13247
13247
|
for (var S = this.decodeTables[0], v = g.length - 1; v > 0; v--) {
|
|
13248
|
-
var
|
|
13249
|
-
if (
|
|
13248
|
+
var x = S[g[v]];
|
|
13249
|
+
if (x == e)
|
|
13250
13250
|
S[g[v]] = a - this.decodeTables.length, this.decodeTables.push(S = i.slice(0));
|
|
13251
|
-
else if (
|
|
13252
|
-
S = this.decodeTables[a -
|
|
13251
|
+
else if (x <= a)
|
|
13252
|
+
S = this.decodeTables[a - x];
|
|
13253
13253
|
else
|
|
13254
13254
|
throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + f.toString(16));
|
|
13255
13255
|
}
|
|
@@ -13258,28 +13258,28 @@ function dl() {
|
|
|
13258
13258
|
var g = parseInt(f[0], 16), S = this._getDecodeTrieNode(g);
|
|
13259
13259
|
g = g & 255;
|
|
13260
13260
|
for (var v = 1; v < f.length; v++) {
|
|
13261
|
-
var
|
|
13262
|
-
if (typeof
|
|
13263
|
-
for (var m = 0; m <
|
|
13264
|
-
var F =
|
|
13261
|
+
var x = f[v];
|
|
13262
|
+
if (typeof x == "string")
|
|
13263
|
+
for (var m = 0; m < x.length; ) {
|
|
13264
|
+
var F = x.charCodeAt(m++);
|
|
13265
13265
|
if (F >= 55296 && F < 56320) {
|
|
13266
|
-
var w =
|
|
13266
|
+
var w = x.charCodeAt(m++);
|
|
13267
13267
|
if (w >= 56320 && w < 57344)
|
|
13268
13268
|
S[g++] = 65536 + (F - 55296) * 1024 + (w - 56320);
|
|
13269
13269
|
else
|
|
13270
13270
|
throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + f[0]);
|
|
13271
13271
|
} else if (F > 4080 && F <= 4095) {
|
|
13272
13272
|
for (var k = 4095 - F + 2, C = [], L = 0; L < k; L++)
|
|
13273
|
-
C.push(
|
|
13273
|
+
C.push(x.charCodeAt(m++));
|
|
13274
13274
|
S[g++] = n - this.decodeTableSeq.length, this.decodeTableSeq.push(C);
|
|
13275
13275
|
} else
|
|
13276
13276
|
S[g++] = F;
|
|
13277
13277
|
}
|
|
13278
|
-
else if (typeof
|
|
13279
|
-
for (var B = S[g - 1] + 1, m = 0; m <
|
|
13278
|
+
else if (typeof x == "number")
|
|
13279
|
+
for (var B = S[g - 1] + 1, m = 0; m < x; m++)
|
|
13280
13280
|
S[g++] = B++;
|
|
13281
13281
|
else
|
|
13282
|
-
throw new Error("Incorrect type '" + typeof
|
|
13282
|
+
throw new Error("Incorrect type '" + typeof x + "' given in " + this.encodingName + " at chunk " + f[0]);
|
|
13283
13283
|
}
|
|
13284
13284
|
if (g > 255)
|
|
13285
13285
|
throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + f[0] + ": too long" + g);
|
|
@@ -13290,40 +13290,40 @@ function dl() {
|
|
|
13290
13290
|
var S = this._getEncodeBucket(f), v = f & 255;
|
|
13291
13291
|
S[v] <= n ? this.encodeTableSeq[n - S[v]][s] = g : S[v] == e && (S[v] = g);
|
|
13292
13292
|
}, c.prototype._setEncodeSequence = function(f, g) {
|
|
13293
|
-
var S = f[0], v = this._getEncodeBucket(S),
|
|
13294
|
-
v[
|
|
13293
|
+
var S = f[0], v = this._getEncodeBucket(S), x = S & 255, m;
|
|
13294
|
+
v[x] <= n ? m = this.encodeTableSeq[n - v[x]] : (m = {}, v[x] !== e && (m[s] = v[x]), v[x] = n - this.encodeTableSeq.length, this.encodeTableSeq.push(m));
|
|
13295
13295
|
for (var F = 1; F < f.length - 1; F++) {
|
|
13296
13296
|
var w = m[S];
|
|
13297
13297
|
typeof w == "object" ? m = w : (m = m[S] = {}, w !== void 0 && (m[s] = w));
|
|
13298
13298
|
}
|
|
13299
13299
|
S = f[f.length - 1], m[S] = g;
|
|
13300
13300
|
}, c.prototype._fillEncodeTable = function(f, g, S) {
|
|
13301
|
-
for (var v = this.decodeTables[f],
|
|
13301
|
+
for (var v = this.decodeTables[f], x = !1, m = {}, F = 0; F < 256; F++) {
|
|
13302
13302
|
var w = v[F], k = g + F;
|
|
13303
13303
|
if (!S[k])
|
|
13304
13304
|
if (w >= 0)
|
|
13305
|
-
this._setEncodeChar(w, k),
|
|
13305
|
+
this._setEncodeChar(w, k), x = !0;
|
|
13306
13306
|
else if (w <= a) {
|
|
13307
13307
|
var C = a - w;
|
|
13308
13308
|
if (!m[C]) {
|
|
13309
13309
|
var L = k << 8 >>> 0;
|
|
13310
|
-
this._fillEncodeTable(C, L, S) ?
|
|
13310
|
+
this._fillEncodeTable(C, L, S) ? x = !0 : m[C] = !0;
|
|
13311
13311
|
}
|
|
13312
|
-
} else w <= n && (this._setEncodeSequence(this.decodeTableSeq[n - w], k),
|
|
13312
|
+
} else w <= n && (this._setEncodeSequence(this.decodeTableSeq[n - w], k), x = !0);
|
|
13313
13313
|
}
|
|
13314
|
-
return
|
|
13314
|
+
return x;
|
|
13315
13315
|
};
|
|
13316
13316
|
function u(f, g) {
|
|
13317
13317
|
this.leadSurrogate = -1, this.seqObj = void 0, this.encodeTable = g.encodeTable, this.encodeTableSeq = g.encodeTableSeq, this.defaultCharSingleByte = g.defCharSB, this.gb18030 = g.gb18030;
|
|
13318
13318
|
}
|
|
13319
13319
|
u.prototype.write = function(f) {
|
|
13320
|
-
for (var g = t.alloc(f.length * (this.gb18030 ? 4 : 3)), S = this.leadSurrogate, v = this.seqObj,
|
|
13321
|
-
if (
|
|
13320
|
+
for (var g = t.alloc(f.length * (this.gb18030 ? 4 : 3)), S = this.leadSurrogate, v = this.seqObj, x = -1, m = 0, F = 0; ; ) {
|
|
13321
|
+
if (x === -1) {
|
|
13322
13322
|
if (m == f.length) break;
|
|
13323
13323
|
var w = f.charCodeAt(m++);
|
|
13324
13324
|
} else {
|
|
13325
|
-
var w =
|
|
13326
|
-
|
|
13325
|
+
var w = x;
|
|
13326
|
+
x = -1;
|
|
13327
13327
|
}
|
|
13328
13328
|
if (w >= 55296 && w < 57344)
|
|
13329
13329
|
if (w < 56320)
|
|
@@ -13334,14 +13334,14 @@ function dl() {
|
|
|
13334
13334
|
S = w, w = e;
|
|
13335
13335
|
else
|
|
13336
13336
|
S !== -1 ? (w = 65536 + (S - 55296) * 1024 + (w - 56320), S = -1) : w = e;
|
|
13337
|
-
else S !== -1 && (
|
|
13337
|
+
else S !== -1 && (x = w, w = e, S = -1);
|
|
13338
13338
|
var k = e;
|
|
13339
13339
|
if (v !== void 0 && w != e) {
|
|
13340
13340
|
var C = v[w];
|
|
13341
13341
|
if (typeof C == "object") {
|
|
13342
13342
|
v = C;
|
|
13343
13343
|
continue;
|
|
13344
|
-
} else typeof C == "number" ? k = C : C == null && (C = v[s], C !== void 0 && (k = C,
|
|
13344
|
+
} else typeof C == "number" ? k = C : C == null && (C = v[s], C !== void 0 && (k = C, x = w));
|
|
13345
13345
|
v = void 0;
|
|
13346
13346
|
} else if (w >= 0) {
|
|
13347
13347
|
var L = this.encodeTable[w >> 8];
|
|
@@ -13375,15 +13375,15 @@ function dl() {
|
|
|
13375
13375
|
this.nodeIdx = 0, this.prevBytes = [], this.decodeTables = g.decodeTables, this.decodeTableSeq = g.decodeTableSeq, this.defaultCharUnicode = g.defaultCharUnicode, this.gb18030 = g.gb18030;
|
|
13376
13376
|
}
|
|
13377
13377
|
h.prototype.write = function(f) {
|
|
13378
|
-
for (var g = t.alloc(f.length * 2), S = this.nodeIdx, v = this.prevBytes,
|
|
13379
|
-
var C = w >= 0 ? f[w] : v[w +
|
|
13378
|
+
for (var g = t.alloc(f.length * 2), S = this.nodeIdx, v = this.prevBytes, x = this.prevBytes.length, m = -this.prevBytes.length, F, w = 0, k = 0; w < f.length; w++) {
|
|
13379
|
+
var C = w >= 0 ? f[w] : v[w + x], F = this.decodeTables[S][C];
|
|
13380
13380
|
if (!(F >= 0)) if (F === e)
|
|
13381
13381
|
F = this.defaultCharUnicode.charCodeAt(0), w = m;
|
|
13382
13382
|
else if (F === r) {
|
|
13383
13383
|
if (w >= 3)
|
|
13384
13384
|
var L = (f[w - 3] - 129) * 12600 + (f[w - 2] - 48) * 1260 + (f[w - 1] - 129) * 10 + (C - 48);
|
|
13385
13385
|
else
|
|
13386
|
-
var L = (v[w - 3 +
|
|
13386
|
+
var L = (v[w - 3 + x] - 129) * 12600 + ((w - 2 >= 0 ? f[w - 2] : v[w - 2 + x]) - 48) * 1260 + ((w - 1 >= 0 ? f[w - 1] : v[w - 1 + x]) - 129) * 10 + (C - 48);
|
|
13387
13387
|
var B = d(this.gb18030.gbChars, L);
|
|
13388
13388
|
F = this.gb18030.uChars[B] + L - this.gb18030.gbChars[B];
|
|
13389
13389
|
} else if (F <= a) {
|
|
@@ -13402,7 +13402,7 @@ function dl() {
|
|
|
13402
13402
|
}
|
|
13403
13403
|
g[k++] = F & 255, g[k++] = F >> 8, S = 0, m = w + 1;
|
|
13404
13404
|
}
|
|
13405
|
-
return this.nodeIdx = S, this.prevBytes = m >= 0 ? Array.prototype.slice.call(f, m) : v.slice(m +
|
|
13405
|
+
return this.nodeIdx = S, this.prevBytes = m >= 0 ? Array.prototype.slice.call(f, m) : v.slice(m + x).concat(Array.prototype.slice.call(f)), g.slice(0, k).toString("ucs2");
|
|
13406
13406
|
}, h.prototype.end = function() {
|
|
13407
13407
|
for (var f = ""; this.prevBytes.length > 0; ) {
|
|
13408
13408
|
f += this.defaultCharUnicode;
|
|
@@ -13415,8 +13415,8 @@ function dl() {
|
|
|
13415
13415
|
if (f[0] > g)
|
|
13416
13416
|
return -1;
|
|
13417
13417
|
for (var S = 0, v = f.length; S < v - 1; ) {
|
|
13418
|
-
var
|
|
13419
|
-
f[
|
|
13418
|
+
var x = S + (v - S + 1 >> 1);
|
|
13419
|
+
f[x] <= g ? S = x : v = x;
|
|
13420
13420
|
}
|
|
13421
13421
|
return S;
|
|
13422
13422
|
}
|
|
@@ -18081,10 +18081,10 @@ const gl = [
|
|
|
18081
18081
|
39265,
|
|
18082
18082
|
39394,
|
|
18083
18083
|
189e3
|
|
18084
|
-
],
|
|
18084
|
+
], bl = {
|
|
18085
18085
|
uChars: yl,
|
|
18086
18086
|
gbChars: ml
|
|
18087
|
-
},
|
|
18087
|
+
}, xl = [
|
|
18088
18088
|
[
|
|
18089
18089
|
"0",
|
|
18090
18090
|
"\0",
|
|
@@ -21792,7 +21792,7 @@ function wl() {
|
|
|
21792
21792
|
return Tr.concat(Aa);
|
|
21793
21793
|
},
|
|
21794
21794
|
gb18030: function() {
|
|
21795
|
-
return
|
|
21795
|
+
return bl;
|
|
21796
21796
|
},
|
|
21797
21797
|
encodeSkipVals: [128],
|
|
21798
21798
|
encodeAdd: { "€": 41699 }
|
|
@@ -21806,7 +21806,7 @@ function wl() {
|
|
|
21806
21806
|
cp949: {
|
|
21807
21807
|
type: "_dbcs",
|
|
21808
21808
|
table: function() {
|
|
21809
|
-
return
|
|
21809
|
+
return xl;
|
|
21810
21810
|
}
|
|
21811
21811
|
},
|
|
21812
21812
|
cseuckr: "cp949",
|
|
@@ -21957,7 +21957,7 @@ var Er, Oa;
|
|
|
21957
21957
|
function kl() {
|
|
21958
21958
|
if (Oa) return Er;
|
|
21959
21959
|
Oa = 1;
|
|
21960
|
-
var t =
|
|
21960
|
+
var t = je.Buffer;
|
|
21961
21961
|
return Er = function(e) {
|
|
21962
21962
|
var r = e.Transform;
|
|
21963
21963
|
function n(i, s) {
|
|
@@ -22026,9 +22026,9 @@ function kl() {
|
|
|
22026
22026
|
const Tl = {}, Cl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
22027
22027
|
__proto__: null,
|
|
22028
22028
|
default: Tl
|
|
22029
|
-
}, Symbol.toStringTag, { value: "Module" })), El = /* @__PURE__ */
|
|
22029
|
+
}, Symbol.toStringTag, { value: "Module" })), El = /* @__PURE__ */ Yh(Cl);
|
|
22030
22030
|
(function(t) {
|
|
22031
|
-
var e =
|
|
22031
|
+
var e = je.Buffer, r = un, n = _i, a = t.exports;
|
|
22032
22032
|
a.encodings = null, a.defaultCharUnicode = "�", a.defaultCharSingleByte = "?", a.encode = function(o, c, u) {
|
|
22033
22033
|
o = "" + (o || "");
|
|
22034
22034
|
var h = a.getEncoder(c, u), d = h.write(o), f = h.end();
|
|
@@ -22096,7 +22096,7 @@ const Tl = {}, Cl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
22096
22096
|
};
|
|
22097
22097
|
})(Mi);
|
|
22098
22098
|
var Al = Mi.exports;
|
|
22099
|
-
const Ul = /* @__PURE__ */
|
|
22099
|
+
const Ul = /* @__PURE__ */ jh(Al);
|
|
22100
22100
|
class fn extends Na {
|
|
22101
22101
|
/**
|
|
22102
22102
|
* Creates a new instance of ShxTextShape
|
|
@@ -22623,7 +22623,7 @@ class Ll {
|
|
|
22623
22623
|
});
|
|
22624
22624
|
}
|
|
22625
22625
|
}
|
|
22626
|
-
var
|
|
22626
|
+
var it = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.WORD = 1] = "WORD", t[t.STACK = 2] = "STACK", t[t.SPACE = 3] = "SPACE", t[t.NBSP = 4] = "NBSP", t[t.TABULATOR = 5] = "TABULATOR", t[t.NEW_PARAGRAPH = 6] = "NEW_PARAGRAPH", t[t.NEW_COLUMN = 7] = "NEW_COLUMN", t[t.WRAP_AT_DIMLINE = 8] = "WRAP_AT_DIMLINE", t[t.PROPERTIES_CHANGED = 9] = "PROPERTIES_CHANGED", t))(it || {}), gt = /* @__PURE__ */ ((t) => (t[t.BOTTOM = 0] = "BOTTOM", t[t.MIDDLE = 1] = "MIDDLE", t[t.TOP = 2] = "TOP", t))(gt || {}), we = /* @__PURE__ */ ((t) => (t[t.DEFAULT = 0] = "DEFAULT", t[t.LEFT = 1] = "LEFT", t[t.RIGHT = 2] = "RIGHT", t[t.CENTER = 3] = "CENTER", t[t.JUSTIFIED = 4] = "JUSTIFIED", t[t.DISTRIBUTED = 5] = "DISTRIBUTED", t))(we || {});
|
|
22627
22627
|
const Ol = {
|
|
22628
22628
|
c: "Ø",
|
|
22629
22629
|
d: "°",
|
|
@@ -23684,8 +23684,8 @@ class Ur {
|
|
|
23684
23684
|
this.type = e, this.ctx = r, this.data = n;
|
|
23685
23685
|
}
|
|
23686
23686
|
}
|
|
23687
|
-
var
|
|
23688
|
-
const
|
|
23687
|
+
var Je = /* @__PURE__ */ ((t) => (t[t.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", t[t.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", t[t.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", t[t.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", t[t.BY_STYLE = 5] = "BY_STYLE", t))(Je || {}), _l = /* @__PURE__ */ ((t) => (t[t.TopLeft = 1] = "TopLeft", t[t.TopCenter = 2] = "TopCenter", t[t.TopRight = 3] = "TopRight", t[t.MiddleLeft = 4] = "MiddleLeft", t[t.MiddleCenter = 5] = "MiddleCenter", t[t.MiddleRight = 6] = "MiddleRight", t[t.BottomLeft = 7] = "BottomLeft", t[t.BottomCenter = 8] = "BottomCenter", t[t.BottomRight = 9] = "BottomRight", t))(_l || {}), ne = /* @__PURE__ */ ((t) => (t.CHAR = "CHAR", t.NEW_PARAGRAPH = "NEW_PARAGRAPH", t.STACK = "STACK", t))(ne || {});
|
|
23688
|
+
const Yr = "";
|
|
23689
23689
|
function Pl(t) {
|
|
23690
23690
|
if (!(!t || [
|
|
23691
23691
|
t.min.x,
|
|
@@ -23699,7 +23699,7 @@ function Pl(t) {
|
|
|
23699
23699
|
}
|
|
23700
23700
|
function Nl(t, e, r) {
|
|
23701
23701
|
const n = [];
|
|
23702
|
-
if (t.filter((f) => f.char !==
|
|
23702
|
+
if (t.filter((f) => f.char !== Yr).forEach((f) => {
|
|
23703
23703
|
const g = Pl(
|
|
23704
23704
|
new _.Box3().copy(f.box).applyMatrix4(e)
|
|
23705
23705
|
);
|
|
@@ -23792,7 +23792,7 @@ class zl {
|
|
|
23792
23792
|
}), this._currentContext.setColorFromHex(e.color), this._currentContext.fontFace.family = this.textStyle.font.toLowerCase(), this._currentContext.widthFactor = {
|
|
23793
23793
|
value: a.widthFactor,
|
|
23794
23794
|
isRelative: !0
|
|
23795
|
-
}, this._currentContext.oblique = e.obliqueAngle || 0, this._maxFontSize = 0, this._currentHorizontalAlignment = a.horizontalAlignment, this._lastCharBoxTarget = void 0, this._currentIndent = 0, this._currentLeftMargin = 0, this._currentRightMargin = 0, this.initLineParams();
|
|
23795
|
+
}, this._currentContext.oblique = e.obliqueAngle || 0, this._maxFontSize = 0, this._currentHorizontalAlignment = a.horizontalAlignment, this._lastCharBoxTarget = void 0, this._lineHasRenderableChar = !1, this._pendingEmptyLineFontSizeAdjust = void 0, this._currentIndent = 0, this._currentLeftMargin = 0, this._currentRightMargin = 0, this.initLineParams();
|
|
23796
23796
|
}
|
|
23797
23797
|
get fontManager() {
|
|
23798
23798
|
return this._fontManager;
|
|
@@ -23867,7 +23867,8 @@ class zl {
|
|
|
23867
23867
|
* The height of current line of texts
|
|
23868
23868
|
*/
|
|
23869
23869
|
get currentLineHeight() {
|
|
23870
|
-
|
|
23870
|
+
const e = this.defaultLineSpaceFactor * this.currentFontSize * Hl, r = this.currentMaxFontSize > 0 ? this.currentMaxFontSize : this.currentFontSize;
|
|
23871
|
+
return e + r;
|
|
23871
23872
|
}
|
|
23872
23873
|
/**
|
|
23873
23874
|
* The maximum font size in current line. Characters in one line may have different font and font
|
|
@@ -23942,7 +23943,7 @@ class zl {
|
|
|
23942
23943
|
break;
|
|
23943
23944
|
case "c":
|
|
23944
23945
|
case "C":
|
|
23945
|
-
e.changes.aci ? e.changes.aci === 0 ? this._currentContext.setColorFromHex(this._options.byBlockColor) : e.changes.aci === 256 ? this._currentContext.setColorFromHex(this._options.byLayerColor) : this._currentContext.color.aci = e.changes.aci : e.changes.rgb && (this._currentContext.color.rgb = e.changes.rgb);
|
|
23946
|
+
e.changes.aci !== void 0 && e.changes.aci !== null ? e.changes.aci === 0 ? this._currentContext.setColorFromHex(this._options.byBlockColor) : e.changes.aci === 256 ? this._currentContext.setColorFromHex(this._options.byLayerColor) : this._currentContext.color.aci = e.changes.aci : e.changes.rgb && (this._currentContext.color.rgb = e.changes.rgb);
|
|
23946
23947
|
break;
|
|
23947
23948
|
case "W":
|
|
23948
23949
|
e.changes.widthFactor && (e.changes.widthFactor.isRelative ? this._currentContext.widthFactor = {
|
|
@@ -24021,7 +24022,7 @@ class zl {
|
|
|
24021
24022
|
this._lastCharBoxTarget = void 0;
|
|
24022
24023
|
const r = [], n = [], a = [], i = [], s = new _.Group();
|
|
24023
24024
|
for (const o of e)
|
|
24024
|
-
if (o.type ===
|
|
24025
|
+
if (o.type === it.NEW_PARAGRAPH)
|
|
24025
24026
|
this.startNewParagraph(
|
|
24026
24027
|
r,
|
|
24027
24028
|
n,
|
|
@@ -24029,7 +24030,7 @@ class zl {
|
|
|
24029
24030
|
i,
|
|
24030
24031
|
s
|
|
24031
24032
|
);
|
|
24032
|
-
else if (o.type ===
|
|
24033
|
+
else if (o.type === it.WORD) {
|
|
24033
24034
|
const c = o.data;
|
|
24034
24035
|
Array.isArray(c) ? c.forEach(
|
|
24035
24036
|
(u) => this.processWord(
|
|
@@ -24046,9 +24047,9 @@ class zl {
|
|
|
24046
24047
|
a,
|
|
24047
24048
|
i
|
|
24048
24049
|
);
|
|
24049
|
-
} else if (o.type ===
|
|
24050
|
+
} else if (o.type === it.SPACE)
|
|
24050
24051
|
this.processBlank(a, i);
|
|
24051
|
-
else if (o.type ===
|
|
24052
|
+
else if (o.type === it.PROPERTIES_CHANGED) {
|
|
24052
24053
|
this.processGeometries(
|
|
24053
24054
|
r,
|
|
24054
24055
|
n,
|
|
@@ -24057,8 +24058,15 @@ class zl {
|
|
|
24057
24058
|
s
|
|
24058
24059
|
);
|
|
24059
24060
|
const c = o.data;
|
|
24060
|
-
c.command === void 0
|
|
24061
|
-
|
|
24061
|
+
if (c.command === void 0)
|
|
24062
|
+
for (; this._contextStack.length > c.depth; )
|
|
24063
|
+
this._currentContext = this._contextStack.pop();
|
|
24064
|
+
else {
|
|
24065
|
+
for (; this._contextStack.length < c.depth; )
|
|
24066
|
+
this._contextStack.push(this._currentContext.clone());
|
|
24067
|
+
this.processFormat(c);
|
|
24068
|
+
}
|
|
24069
|
+
} else if (o.type === it.STACK) {
|
|
24062
24070
|
this.processGeometries(
|
|
24063
24071
|
r,
|
|
24064
24072
|
n,
|
|
@@ -24134,7 +24142,7 @@ class zl {
|
|
|
24134
24142
|
const k = this.getCharShape(o[w]);
|
|
24135
24143
|
k && (v += k.width * this.currentWidthFactor);
|
|
24136
24144
|
}
|
|
24137
|
-
const
|
|
24145
|
+
const x = Math.max(S, v), m = (x - S) / 2, F = (x - v) / 2;
|
|
24138
24146
|
if (c === "^") {
|
|
24139
24147
|
if (this._currentContext.fontSizeScaleFactor = g * 0.7, this.calcuateLineParams(), s && !o) {
|
|
24140
24148
|
const w = [], k = [], C = [], L = [];
|
|
@@ -24185,7 +24193,7 @@ class zl {
|
|
|
24185
24193
|
r.push(...w), n.push(...k), a.push(...C), i.push(...L), (c === "/" || c === "#") && this.recordStackDivider(
|
|
24186
24194
|
u,
|
|
24187
24195
|
h,
|
|
24188
|
-
|
|
24196
|
+
x,
|
|
24189
24197
|
a,
|
|
24190
24198
|
i
|
|
24191
24199
|
);
|
|
@@ -24207,7 +24215,7 @@ class zl {
|
|
|
24207
24215
|
u,
|
|
24208
24216
|
h - this.currentFontSize * 0.8 + this.defaultFontSize * zt,
|
|
24209
24217
|
0,
|
|
24210
|
-
u +
|
|
24218
|
+
u + x,
|
|
24211
24219
|
h - this.currentFontSize * 0.8 + this.defaultFontSize * zt,
|
|
24212
24220
|
0
|
|
24213
24221
|
]);
|
|
@@ -24216,7 +24224,7 @@ class zl {
|
|
|
24216
24224
|
new _.BufferAttribute(ce, 3)
|
|
24217
24225
|
), z.setIndex(null), z.userData = { isDecoration: !0 }, n.push(z);
|
|
24218
24226
|
}
|
|
24219
|
-
this._hOffset = u +
|
|
24227
|
+
this._hOffset = u + x;
|
|
24220
24228
|
}
|
|
24221
24229
|
this._vOffset = h, this._currentContext.charTrackingFactor = {
|
|
24222
24230
|
value: d,
|
|
@@ -24232,12 +24240,12 @@ class zl {
|
|
|
24232
24240
|
this.resolveCharBoxTarget(a, i) === "mesh" ? a.push({
|
|
24233
24241
|
type: ne.CHAR,
|
|
24234
24242
|
box: o,
|
|
24235
|
-
char:
|
|
24243
|
+
char: Yr,
|
|
24236
24244
|
children: []
|
|
24237
24245
|
}) : i.push({
|
|
24238
24246
|
type: ne.CHAR,
|
|
24239
24247
|
box: o,
|
|
24240
|
-
char:
|
|
24248
|
+
char: Yr,
|
|
24241
24249
|
children: []
|
|
24242
24250
|
});
|
|
24243
24251
|
}
|
|
@@ -24250,7 +24258,7 @@ class zl {
|
|
|
24250
24258
|
}
|
|
24251
24259
|
processBlank(e, r) {
|
|
24252
24260
|
if (this._options.collectCharBoxes !== !1) {
|
|
24253
|
-
const n = this._hOffset, a = this.flowDirection ==
|
|
24261
|
+
const n = this._hOffset, a = this.flowDirection == Je.BOTTOM_TO_TOP ? this._vOffset : this._vOffset - this.defaultFontSize, i = new _.Box3(
|
|
24254
24262
|
new _.Vector3(n, a, 0),
|
|
24255
24263
|
new _.Vector3(
|
|
24256
24264
|
n + this._currentContext.blankWidth,
|
|
@@ -24295,14 +24303,15 @@ class zl {
|
|
|
24295
24303
|
this.processBlank(a, i);
|
|
24296
24304
|
return;
|
|
24297
24305
|
}
|
|
24306
|
+
this._lineHasRenderableChar || this.applyPendingEmptyLineYAdjust();
|
|
24298
24307
|
const o = s.toGeometry();
|
|
24299
24308
|
o.scale(this.currentWidthFactor, 1, 1);
|
|
24300
24309
|
let c = this._currentContext.oblique;
|
|
24301
24310
|
if (this._currentContext.italic && (c += 15), c) {
|
|
24302
|
-
const
|
|
24311
|
+
const x = c * Math.PI / 180, m = new _.Matrix4();
|
|
24303
24312
|
m.set(
|
|
24304
24313
|
1,
|
|
24305
|
-
Math.tan(
|
|
24314
|
+
Math.tan(x),
|
|
24306
24315
|
0,
|
|
24307
24316
|
0,
|
|
24308
24317
|
0,
|
|
@@ -24321,26 +24330,26 @@ class zl {
|
|
|
24321
24330
|
}
|
|
24322
24331
|
const u = this.fontManager.getFontType(this.currentFont);
|
|
24323
24332
|
this._currentContext.bold && u === "mesh" && o.scale(1.06, 1.06, 1), this.hOffset > (this.maxLineWidth || 1 / 0) && this.startNewLine(a, i);
|
|
24324
|
-
const h = this.hOffset, d = this.flowDirection ==
|
|
24325
|
-
if (o.translate(h, d, 0), this.currentHorizontalAlignment == we.DISTRIBUTED ? this._hOffset += s.width * this.currentWidthFactor : this._hOffset += s.width * this.currentWordSpace * this.currentWidthFactor, r.push(o), this._options.collectCharBoxes !== !1) {
|
|
24333
|
+
const h = this.hOffset, d = this.flowDirection == Je.BOTTOM_TO_TOP ? this.vOffset : this.vOffset - this.defaultFontSize, f = s.width * this.currentWidthFactor, g = this.currentFontSize;
|
|
24334
|
+
if (o.translate(h, d, 0), this.currentHorizontalAlignment == we.DISTRIBUTED ? this._hOffset += s.width * this.currentWidthFactor : this._hOffset += s.width * this.currentWordSpace * this.currentWidthFactor, r.push(o), this._lineHasRenderableChar = !0, this._options.collectCharBoxes !== !1) {
|
|
24326
24335
|
o.userData.char = e, o.boundingBox || o.computeBoundingBox();
|
|
24327
|
-
const
|
|
24336
|
+
const x = new _.Box3().copy(o.boundingBox);
|
|
24328
24337
|
o instanceof _.ShapeGeometry ? (this._lastCharBoxTarget = "mesh", a.push({
|
|
24329
24338
|
type: ne.CHAR,
|
|
24330
|
-
box:
|
|
24339
|
+
box: x,
|
|
24331
24340
|
char: e,
|
|
24332
24341
|
children: []
|
|
24333
24342
|
})) : (this._lastCharBoxTarget = "line", i.push({
|
|
24334
24343
|
type: ne.CHAR,
|
|
24335
|
-
box:
|
|
24344
|
+
box: x,
|
|
24336
24345
|
char: e,
|
|
24337
24346
|
children: []
|
|
24338
24347
|
}));
|
|
24339
24348
|
}
|
|
24340
24349
|
const S = g * 0.05, v = 1e-3;
|
|
24341
24350
|
if (this._currentContext.underline) {
|
|
24342
|
-
const
|
|
24343
|
-
|
|
24351
|
+
const x = new _.BufferGeometry(), m = d - S;
|
|
24352
|
+
x.setAttribute(
|
|
24344
24353
|
"position",
|
|
24345
24354
|
new _.BufferAttribute(
|
|
24346
24355
|
new Float32Array([
|
|
@@ -24353,11 +24362,11 @@ class zl {
|
|
|
24353
24362
|
]),
|
|
24354
24363
|
3
|
|
24355
24364
|
)
|
|
24356
|
-
),
|
|
24365
|
+
), x.setIndex(null), x.userData = { isDecoration: !0 }, n.push(x);
|
|
24357
24366
|
}
|
|
24358
24367
|
if (this._currentContext.overline) {
|
|
24359
|
-
const
|
|
24360
|
-
|
|
24368
|
+
const x = new _.BufferGeometry(), m = d + g + S;
|
|
24369
|
+
x.setAttribute(
|
|
24361
24370
|
"position",
|
|
24362
24371
|
new _.BufferAttribute(
|
|
24363
24372
|
new Float32Array([
|
|
@@ -24370,11 +24379,11 @@ class zl {
|
|
|
24370
24379
|
]),
|
|
24371
24380
|
3
|
|
24372
24381
|
)
|
|
24373
|
-
),
|
|
24382
|
+
), x.setIndex(null), x.userData = { isDecoration: !0 }, n.push(x);
|
|
24374
24383
|
}
|
|
24375
24384
|
if (this._currentContext.strikeThrough) {
|
|
24376
|
-
const
|
|
24377
|
-
|
|
24385
|
+
const x = new _.BufferGeometry(), m = d + g / 2 - g * 0.2;
|
|
24386
|
+
x.setAttribute(
|
|
24378
24387
|
"position",
|
|
24379
24388
|
new _.BufferAttribute(
|
|
24380
24389
|
new Float32Array([
|
|
@@ -24387,7 +24396,7 @@ class zl {
|
|
|
24387
24396
|
]),
|
|
24388
24397
|
3
|
|
24389
24398
|
)
|
|
24390
|
-
),
|
|
24399
|
+
), x.setIndex(null), x.userData = { isDecoration: !0 }, n.push(x);
|
|
24391
24400
|
}
|
|
24392
24401
|
}
|
|
24393
24402
|
processLastLine() {
|
|
@@ -24434,7 +24443,12 @@ class zl {
|
|
|
24434
24443
|
this.recordLineBreak(e, r), this.advanceToNextLine();
|
|
24435
24444
|
}
|
|
24436
24445
|
advanceToNextLine() {
|
|
24437
|
-
this._hOffset = 0, this.flowDirection ==
|
|
24446
|
+
this._hOffset = 0, this._lineHasRenderableChar ? this._pendingEmptyLineFontSizeAdjust = void 0 : this._pendingEmptyLineFontSizeAdjust = this.currentFontSize, this.flowDirection == Je.BOTTOM_TO_TOP ? this._vOffset += this.currentLineHeight : this._vOffset -= this.currentLineHeight, this._lineCount++, this.processAlignment(), this._currentLineObjects = [], this._lineCount == 2 ? this._totalHeight = this.currentMaxFontSize : this._totalHeight = this._totalHeight + this.currentLineHeight, this._maxFontSize = 0, this._lineHasRenderableChar = !1;
|
|
24447
|
+
}
|
|
24448
|
+
applyPendingEmptyLineYAdjust() {
|
|
24449
|
+
if (this._pendingEmptyLineFontSizeAdjust === void 0) return;
|
|
24450
|
+
const e = this.currentFontSize - this._pendingEmptyLineFontSizeAdjust;
|
|
24451
|
+
e !== 0 && (this.flowDirection == Je.BOTTOM_TO_TOP ? this._vOffset += e : this._vOffset -= e), this._pendingEmptyLineFontSizeAdjust = void 0;
|
|
24438
24452
|
}
|
|
24439
24453
|
resolveCharBoxTarget(e, r) {
|
|
24440
24454
|
return this._lastCharBoxTarget ? this._lastCharBoxTarget : e.length > 0 && r.length === 0 ? "mesh" : r.length > 0 && e.length === 0 ? "line" : this.fontManager.getFontType(this.currentFont) === "mesh" ? "mesh" : "line";
|
|
@@ -24738,7 +24752,7 @@ class Qt extends _.Object3D {
|
|
|
24738
24752
|
e.width && e.attachmentPoint && ([1, 4, 7].includes(e.attachmentPoint) ? a = we.LEFT : [2, 5, 8].includes(e.attachmentPoint) ? a = we.CENTER : [3, 6, 9].includes(e.attachmentPoint) && (a = we.RIGHT));
|
|
24739
24753
|
let i = gt.BOTTOM;
|
|
24740
24754
|
e.attachmentPoint && ([1, 2, 3].includes(e.attachmentPoint) ? i = gt.TOP : [4, 5, 6].includes(e.attachmentPoint) ? i = gt.MIDDLE : [7, 8, 9].includes(e.attachmentPoint) && (i = gt.BOTTOM));
|
|
24741
|
-
const s = e.height || 0, o = e.lineSpaceFactor || 0.3, c = e.drawingDirection ??
|
|
24755
|
+
const s = e.height || 0, o = e.lineSpaceFactor || 0.3, c = e.drawingDirection ?? Je.LEFT_TO_RIGHT, u = {
|
|
24742
24756
|
fontSize: s,
|
|
24743
24757
|
widthFactor: e.widthFactor ?? 1,
|
|
24744
24758
|
lineSpaceFactor: o,
|
|
@@ -24808,7 +24822,7 @@ class Qt extends _.Object3D {
|
|
|
24808
24822
|
i -= e, s += r;
|
|
24809
24823
|
break;
|
|
24810
24824
|
}
|
|
24811
|
-
return a ==
|
|
24825
|
+
return a == Je.BOTTOM_TO_TOP && (s -= r), { x: i, y: s };
|
|
24812
24826
|
}
|
|
24813
24827
|
/**
|
|
24814
24828
|
* Recursively calculates bounding boxes for an object and its children.
|
|
@@ -25309,9 +25323,9 @@ export {
|
|
|
25309
25323
|
Re as FontManager,
|
|
25310
25324
|
Qt as MText,
|
|
25311
25325
|
_l as MTextAttachmentPoint,
|
|
25312
|
-
|
|
25326
|
+
Je as MTextFlowDirection,
|
|
25313
25327
|
ql as MainThreadRenderer,
|
|
25314
|
-
|
|
25328
|
+
Yr as STACK_DIVIDER_CHAR,
|
|
25315
25329
|
Zl as UnifiedRenderer,
|
|
25316
25330
|
Wl as WebWorkerRenderer,
|
|
25317
25331
|
Xi as getColorByIndex
|