flipbookengine 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/flipbook-engine.js
CHANGED
|
@@ -713,7 +713,7 @@ class zW {
|
|
|
713
713
|
I.div.style.transform = g, I.div.hidden = !1;
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
|
-
const
|
|
716
|
+
const FA = "http://www.w3.org/2000/svg", ui = class ui {
|
|
717
717
|
};
|
|
718
718
|
M(ui, "CSS", 96), M(ui, "PDF", 72), M(ui, "PDF_TO_CSS_UNITS", ui.CSS / ui.PDF);
|
|
719
719
|
let ti = ui;
|
|
@@ -936,7 +936,7 @@ function $s(s, I) {
|
|
|
936
936
|
function TC(s) {
|
|
937
937
|
s.preventDefault();
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function QI(s) {
|
|
940
940
|
s.preventDefault(), s.stopPropagation();
|
|
941
941
|
}
|
|
942
942
|
function Ra(s) {
|
|
@@ -1038,11 +1038,11 @@ function vZ(s, I, g = !1, C = !0) {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
C && s.setAttribute("data-main-rotation", I.rotation);
|
|
1040
1040
|
}
|
|
1041
|
-
class
|
|
1041
|
+
class pA {
|
|
1042
1042
|
constructor() {
|
|
1043
1043
|
const {
|
|
1044
1044
|
pixelRatio: I
|
|
1045
|
-
} =
|
|
1045
|
+
} = pA;
|
|
1046
1046
|
this.sx = I, this.sy = I;
|
|
1047
1047
|
}
|
|
1048
1048
|
get scaled() {
|
|
@@ -1053,7 +1053,7 @@ class DA {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
limitCanvas(I, g, C, A, i = -1) {
|
|
1055
1055
|
let Z = 1 / 0, d = 1 / 0, c = 1 / 0;
|
|
1056
|
-
C =
|
|
1056
|
+
C = pA.capPixels(C, i), C > 0 && (Z = Math.sqrt(C / (I * g))), A !== -1 && (d = A / I, c = A / g);
|
|
1057
1057
|
const G = Math.min(Z, d, c);
|
|
1058
1058
|
return this.sx > G || this.sy > G ? (this.sx = G, this.sy = G, !0) : !1;
|
|
1059
1059
|
}
|
|
@@ -1222,7 +1222,7 @@ function LW(s) {
|
|
|
1222
1222
|
return I;
|
|
1223
1223
|
}
|
|
1224
1224
|
var Hl, Ml, XC, RC, Dc, Dl, wd, ad, Kc, L0, TW, tg, rW, jW, Cd, Ic;
|
|
1225
|
-
const
|
|
1225
|
+
const kA = class kA {
|
|
1226
1226
|
constructor(I) {
|
|
1227
1227
|
w(this, tg);
|
|
1228
1228
|
w(this, Hl, null);
|
|
@@ -1233,7 +1233,7 @@ const JA = class JA {
|
|
|
1233
1233
|
w(this, Dl, null);
|
|
1234
1234
|
w(this, wd, null);
|
|
1235
1235
|
w(this, ad, null);
|
|
1236
|
-
B(this, XC, I), l(
|
|
1236
|
+
B(this, XC, I), l(kA, Kc) || B(kA, Kc, Object.freeze({
|
|
1237
1237
|
freetext: "pdfjs-editor-remove-freetext-button",
|
|
1238
1238
|
highlight: "pdfjs-editor-remove-highlight-button",
|
|
1239
1239
|
ink: "pdfjs-editor-remove-ink-button",
|
|
@@ -1247,7 +1247,7 @@ const JA = class JA {
|
|
|
1247
1247
|
const g = l(this, XC)._uiManager._signal;
|
|
1248
1248
|
g instanceof AbortSignal && !g.aborted && (I.addEventListener("contextmenu", TC, {
|
|
1249
1249
|
signal: g
|
|
1250
|
-
}), I.addEventListener("pointerdown", Y(
|
|
1250
|
+
}), I.addEventListener("pointerdown", Y(kA, L0, TW), {
|
|
1251
1251
|
signal: g
|
|
1252
1252
|
}));
|
|
1253
1253
|
const C = B(this, RC, document.createElement("div"));
|
|
@@ -1277,7 +1277,7 @@ const JA = class JA {
|
|
|
1277
1277
|
editorType: I,
|
|
1278
1278
|
_uiManager: g
|
|
1279
1279
|
} = l(this, XC), C = document.createElement("button");
|
|
1280
|
-
C.classList.add("basic", "deleteButton"), C.tabIndex = 0, C.setAttribute("data-l10n-id", l(
|
|
1280
|
+
C.classList.add("basic", "deleteButton"), C.tabIndex = 0, C.setAttribute("data-l10n-id", l(kA, Kc)[I]), Y(this, tg, Cd).call(this, C) && C.addEventListener("click", (A) => {
|
|
1281
1281
|
g.delete();
|
|
1282
1282
|
}, {
|
|
1283
1283
|
signal: g._signal
|
|
@@ -1352,9 +1352,9 @@ const JA = class JA {
|
|
|
1352
1352
|
Hl = new WeakMap(), Ml = new WeakMap(), XC = new WeakMap(), RC = new WeakMap(), Dc = new WeakMap(), Dl = new WeakMap(), wd = new WeakMap(), ad = new WeakMap(), Kc = new WeakMap(), L0 = new WeakSet(), TW = function(I) {
|
|
1353
1353
|
I.stopPropagation();
|
|
1354
1354
|
}, tg = new WeakSet(), rW = function(I) {
|
|
1355
|
-
l(this, XC)._focusEventsAllowed = !1,
|
|
1355
|
+
l(this, XC)._focusEventsAllowed = !1, QI(I);
|
|
1356
1356
|
}, jW = function(I) {
|
|
1357
|
-
l(this, XC)._focusEventsAllowed = !0,
|
|
1357
|
+
l(this, XC)._focusEventsAllowed = !0, QI(I);
|
|
1358
1358
|
}, Cd = function(I) {
|
|
1359
1359
|
const g = l(this, XC)._uiManager._signal;
|
|
1360
1360
|
return !(g instanceof AbortSignal) || g.aborted ? !1 : (I.addEventListener("focusin", Y(this, tg, rW).bind(this), {
|
|
@@ -1369,16 +1369,16 @@ Hl = new WeakMap(), Ml = new WeakMap(), XC = new WeakMap(), RC = new WeakMap(),
|
|
|
1369
1369
|
}, Ic = function() {
|
|
1370
1370
|
const I = document.createElement("div");
|
|
1371
1371
|
return I.className = "divider", I;
|
|
1372
|
-
}, w(
|
|
1373
|
-
let Tm =
|
|
1374
|
-
var pc, Mi,
|
|
1372
|
+
}, w(kA, L0), w(kA, Kc, null);
|
|
1373
|
+
let Tm = kA;
|
|
1374
|
+
var pc, Mi, TA, Xl, QW, xW, rm;
|
|
1375
1375
|
class pa {
|
|
1376
1376
|
constructor(I) {
|
|
1377
1377
|
w(this, Xl);
|
|
1378
1378
|
w(this, pc, null);
|
|
1379
1379
|
w(this, Mi, null);
|
|
1380
|
-
w(this,
|
|
1381
|
-
B(this,
|
|
1380
|
+
w(this, TA);
|
|
1381
|
+
B(this, TA, I);
|
|
1382
1382
|
}
|
|
1383
1383
|
show(I, g, C) {
|
|
1384
1384
|
const [A, i] = Y(this, Xl, xW).call(this, g, C), {
|
|
@@ -1390,18 +1390,18 @@ class pa {
|
|
|
1390
1390
|
l(this, Mi).remove();
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
|
-
pc = new WeakMap(), Mi = new WeakMap(),
|
|
1393
|
+
pc = new WeakMap(), Mi = new WeakMap(), TA = new WeakMap(), Xl = new WeakSet(), QW = function() {
|
|
1394
1394
|
const I = B(this, Mi, document.createElement("div"));
|
|
1395
1395
|
I.className = "editToolbar", I.setAttribute("role", "toolbar");
|
|
1396
|
-
const g = l(this,
|
|
1396
|
+
const g = l(this, TA)._signal;
|
|
1397
1397
|
g instanceof AbortSignal && !g.aborted && I.addEventListener("contextmenu", TC, {
|
|
1398
1398
|
signal: g
|
|
1399
1399
|
});
|
|
1400
1400
|
const C = B(this, pc, document.createElement("div"));
|
|
1401
|
-
return C.className = "buttons", I.append(C), l(this,
|
|
1402
|
-
l(this,
|
|
1401
|
+
return C.className = "buttons", I.append(C), l(this, TA).hasCommentManager() && Y(this, Xl, rm).call(this, "commentButton", "pdfjs-comment-floating-button", "pdfjs-comment-floating-button-label", () => {
|
|
1402
|
+
l(this, TA).commentSelection("floating_button");
|
|
1403
1403
|
}), Y(this, Xl, rm).call(this, "highlightButton", "pdfjs-highlight-floating-button1", "pdfjs-highlight-floating-button-label", () => {
|
|
1404
|
-
l(this,
|
|
1404
|
+
l(this, TA).highlightSelection("floating_button");
|
|
1405
1405
|
}), I;
|
|
1406
1406
|
}, xW = function(I, g) {
|
|
1407
1407
|
let C = 0, A = 0;
|
|
@@ -1422,7 +1422,7 @@ pc = new WeakMap(), Mi = new WeakMap(), kA = new WeakMap(), Xl = new WeakSet(),
|
|
|
1422
1422
|
i.classList.add("basic", I), i.tabIndex = 0, i.setAttribute("data-l10n-id", g);
|
|
1423
1423
|
const Z = document.createElement("span");
|
|
1424
1424
|
i.append(Z), Z.className = "visuallyHidden", Z.setAttribute("data-l10n-id", C);
|
|
1425
|
-
const d = l(this,
|
|
1425
|
+
const d = l(this, TA)._signal;
|
|
1426
1426
|
d instanceof AbortSignal && !d.aborted && (i.addEventListener("contextmenu", TC, {
|
|
1427
1427
|
signal: d
|
|
1428
1428
|
}), i.addEventListener("click", A, {
|
|
@@ -1605,10 +1605,10 @@ td = new WeakMap(), Sc = new WeakMap(), Rg = new WeakMap(), ed = new WeakSet(),
|
|
|
1605
1605
|
return l(this, Rg).set(I, C), C && l(this, Rg).set(C.id, C), C;
|
|
1606
1606
|
};
|
|
1607
1607
|
let jm = kB;
|
|
1608
|
-
var
|
|
1608
|
+
var xI, Kl, Fc, pI;
|
|
1609
1609
|
class Fa {
|
|
1610
1610
|
constructor(I = 128) {
|
|
1611
|
-
w(this,
|
|
1611
|
+
w(this, xI, []);
|
|
1612
1612
|
w(this, Kl, !1);
|
|
1613
1613
|
w(this, Fc);
|
|
1614
1614
|
w(this, pI, -1);
|
|
@@ -1632,15 +1632,15 @@ class Fa {
|
|
|
1632
1632
|
type: i
|
|
1633
1633
|
};
|
|
1634
1634
|
if (l(this, pI) === -1) {
|
|
1635
|
-
l(this,
|
|
1635
|
+
l(this, xI).length > 0 && (l(this, xI).length = 0), B(this, pI, 0), l(this, xI).push(c);
|
|
1636
1636
|
return;
|
|
1637
1637
|
}
|
|
1638
|
-
if (Z && l(this,
|
|
1639
|
-
d && (c.undo = l(this,
|
|
1638
|
+
if (Z && l(this, xI)[l(this, pI)].type === i) {
|
|
1639
|
+
d && (c.undo = l(this, xI)[l(this, pI)].undo), l(this, xI)[l(this, pI)] = c;
|
|
1640
1640
|
return;
|
|
1641
1641
|
}
|
|
1642
1642
|
const G = l(this, pI) + 1;
|
|
1643
|
-
G === l(this, Fc) ? l(this,
|
|
1643
|
+
G === l(this, Fc) ? l(this, xI).splice(0, 1) : (B(this, pI, G), G < l(this, xI).length && l(this, xI).splice(G)), l(this, xI).push(c);
|
|
1644
1644
|
}
|
|
1645
1645
|
undo() {
|
|
1646
1646
|
if (l(this, pI) === -1)
|
|
@@ -1649,16 +1649,16 @@ class Fa {
|
|
|
1649
1649
|
const {
|
|
1650
1650
|
undo: I,
|
|
1651
1651
|
post: g
|
|
1652
|
-
} = l(this,
|
|
1652
|
+
} = l(this, xI)[l(this, pI)];
|
|
1653
1653
|
I(), g == null || g(), B(this, Kl, !1), B(this, pI, l(this, pI) - 1);
|
|
1654
1654
|
}
|
|
1655
1655
|
redo() {
|
|
1656
|
-
if (l(this, pI) < l(this,
|
|
1656
|
+
if (l(this, pI) < l(this, xI).length - 1) {
|
|
1657
1657
|
B(this, pI, l(this, pI) + 1), B(this, Kl, !0);
|
|
1658
1658
|
const {
|
|
1659
1659
|
cmd: I,
|
|
1660
1660
|
post: g
|
|
1661
|
-
} = l(this,
|
|
1661
|
+
} = l(this, xI)[l(this, pI)];
|
|
1662
1662
|
I(), g == null || g(), B(this, Kl, !1);
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
@@ -1666,23 +1666,23 @@ class Fa {
|
|
|
1666
1666
|
return l(this, pI) !== -1;
|
|
1667
1667
|
}
|
|
1668
1668
|
hasSomethingToRedo() {
|
|
1669
|
-
return l(this, pI) < l(this,
|
|
1669
|
+
return l(this, pI) < l(this, xI).length - 1;
|
|
1670
1670
|
}
|
|
1671
1671
|
cleanType(I) {
|
|
1672
1672
|
if (l(this, pI) !== -1) {
|
|
1673
1673
|
for (let g = l(this, pI); g >= 0; g--)
|
|
1674
|
-
if (l(this,
|
|
1675
|
-
l(this,
|
|
1674
|
+
if (l(this, xI)[g].type !== I) {
|
|
1675
|
+
l(this, xI).splice(g + 1, l(this, pI) - g), B(this, pI, g);
|
|
1676
1676
|
return;
|
|
1677
1677
|
}
|
|
1678
|
-
l(this,
|
|
1678
|
+
l(this, xI).length = 0, B(this, pI, -1);
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
1681
1681
|
destroy() {
|
|
1682
|
-
B(this,
|
|
1682
|
+
B(this, xI, null);
|
|
1683
1683
|
}
|
|
1684
1684
|
}
|
|
1685
|
-
|
|
1685
|
+
xI = new WeakMap(), Kl = new WeakMap(), Fc = new WeakMap(), pI = new WeakMap();
|
|
1686
1686
|
var r0, OW;
|
|
1687
1687
|
class Xb {
|
|
1688
1688
|
constructor(I) {
|
|
@@ -1717,7 +1717,7 @@ class Xb {
|
|
|
1717
1717
|
checker: d = null
|
|
1718
1718
|
}
|
|
1719
1719
|
} = C;
|
|
1720
|
-
d && !d(I, g) || (A.bind(I, ...Z, g)(), i ||
|
|
1720
|
+
d && !d(I, g) || (A.bind(I, ...Z, g)(), i || QI(g));
|
|
1721
1721
|
}
|
|
1722
1722
|
}
|
|
1723
1723
|
r0 = new WeakSet(), OW = function(I) {
|
|
@@ -1746,14 +1746,14 @@ const j0 = class j0 {
|
|
|
1746
1746
|
};
|
|
1747
1747
|
M(j0, "_colorsMapping", /* @__PURE__ */ new Map([["CanvasText", [0, 0, 0]], ["Canvas", [255, 255, 255]]]));
|
|
1748
1748
|
let Qm = j0;
|
|
1749
|
-
var nd, IC, Vd,
|
|
1749
|
+
var nd, IC, Vd, kI, Ig, Nd, uC, Xd, yC, ug, pl, Sl, Rd, Fl, sA, HC, Si, Jc, zc, ud, kc, cA, Jl, yd, zl, GA, Q0, kl, Hd, Lc, Ll, Fi, Md, Tl, Tc, EI, GI, rA, rl, jl, rc, Dd, jc, Ql, bA, jA, Qc, xc, MC, S, rb, xm, vW, EW, gc, PW, fW, qW, Um, _W, $W, Ih, gh, Kg, JA, Ch, Ah, Om, lh, Cc, vm;
|
|
1750
1750
|
const bd = class bd {
|
|
1751
1751
|
constructor(I, g, C, A, i, Z, d, c, G, b, m, W, a, n, e, X) {
|
|
1752
1752
|
w(this, S);
|
|
1753
1753
|
w(this, nd, new AbortController());
|
|
1754
1754
|
w(this, IC, null);
|
|
1755
1755
|
w(this, Vd, null);
|
|
1756
|
-
w(this,
|
|
1756
|
+
w(this, kI, /* @__PURE__ */ new Map());
|
|
1757
1757
|
w(this, Ig, /* @__PURE__ */ new Map());
|
|
1758
1758
|
w(this, Nd, null);
|
|
1759
1759
|
w(this, uC, null);
|
|
@@ -1788,7 +1788,7 @@ const bd = class bd {
|
|
|
1788
1788
|
w(this, Tc, null);
|
|
1789
1789
|
w(this, EI, P.NONE);
|
|
1790
1790
|
w(this, GI, /* @__PURE__ */ new Set());
|
|
1791
|
-
w(this,
|
|
1791
|
+
w(this, rA, null);
|
|
1792
1792
|
w(this, rl, null);
|
|
1793
1793
|
w(this, jl, null);
|
|
1794
1794
|
w(this, rc, null);
|
|
@@ -1803,12 +1803,12 @@ const bd = class bd {
|
|
|
1803
1803
|
});
|
|
1804
1804
|
w(this, Ql, [0, 0]);
|
|
1805
1805
|
w(this, bA, null);
|
|
1806
|
-
w(this,
|
|
1806
|
+
w(this, jA, null);
|
|
1807
1807
|
w(this, Qc, null);
|
|
1808
1808
|
w(this, xc, null);
|
|
1809
1809
|
w(this, MC, null);
|
|
1810
1810
|
const N = this._signal = l(this, nd).signal;
|
|
1811
|
-
B(this,
|
|
1811
|
+
B(this, jA, I), B(this, Qc, g), B(this, xc, C), B(this, Nd, A), B(this, ug, i), B(this, rl, Z), B(this, Dd, c), this._eventBus = d, d._on("editingaction", this.onEditingAction.bind(this), {
|
|
1812
1812
|
signal: N
|
|
1813
1813
|
}), d._on("pagechanging", this.onPageChanging.bind(this), {
|
|
1814
1814
|
signal: N
|
|
@@ -1836,7 +1836,7 @@ const bd = class bd {
|
|
|
1836
1836
|
}, this.isShiftKeyDown = !1, this._editorUndoBar = e || null, this._supportsPinchToZoom = X !== !1, i == null || i.setSidebarUiManager(this);
|
|
1837
1837
|
}
|
|
1838
1838
|
static get _keyboardManager() {
|
|
1839
|
-
const I = bd.prototype, g = (Z) => l(Z,
|
|
1839
|
+
const I = bd.prototype, g = (Z) => l(Z, jA).contains(document.activeElement) && document.activeElement.tagName !== "BUTTON" && Z.hasSomethingToControl(), C = (Z, {
|
|
1840
1840
|
target: d
|
|
1841
1841
|
}) => {
|
|
1842
1842
|
if (d instanceof HTMLInputElement) {
|
|
@@ -1858,11 +1858,11 @@ const bd = class bd {
|
|
|
1858
1858
|
}], [["Enter", "mac+Enter"], I.addNewEditorFromKeyboard, {
|
|
1859
1859
|
checker: (Z, {
|
|
1860
1860
|
target: d
|
|
1861
|
-
}) => !(d instanceof HTMLButtonElement) && l(Z,
|
|
1861
|
+
}) => !(d instanceof HTMLButtonElement) && l(Z, jA).contains(d) && !Z.isEnterHandled
|
|
1862
1862
|
}], [[" ", "mac+ "], I.addNewEditorFromKeyboard, {
|
|
1863
1863
|
checker: (Z, {
|
|
1864
1864
|
target: d
|
|
1865
|
-
}) => !(d instanceof HTMLButtonElement) && l(Z,
|
|
1865
|
+
}) => !(d instanceof HTMLButtonElement) && l(Z, jA).contains(document.activeElement)
|
|
1866
1866
|
}], [["Escape", "mac+Escape"], I.unselectAll], [["ArrowLeft", "mac+ArrowLeft"], I.translateSelectedEditors, {
|
|
1867
1867
|
args: [-A, 0],
|
|
1868
1868
|
checker: g
|
|
@@ -1894,7 +1894,7 @@ const bd = class bd {
|
|
|
1894
1894
|
(I = l(this, MC)) == null || I.resolve(), B(this, MC, null), (g = l(this, nd)) == null || g.abort(), B(this, nd, null), this._signal = null;
|
|
1895
1895
|
for (const b of l(this, Ig).values())
|
|
1896
1896
|
b.destroy();
|
|
1897
|
-
l(this, Ig).clear(), l(this,
|
|
1897
|
+
l(this, Ig).clear(), l(this, kI).clear(), l(this, Si).clear(), (C = l(this, Tl)) == null || C.clear(), B(this, IC, null), l(this, GI).clear(), l(this, yC).destroy(), (A = l(this, Nd)) == null || A.destroy(), (i = l(this, ug)) == null || i.destroy(), (Z = l(this, rl)) == null || Z.destroy(), (d = l(this, GA)) == null || d.hide(), B(this, GA, null), (c = l(this, Md)) == null || c.destroy(), B(this, Md, null), B(this, Vd, null), l(this, cA) && (clearTimeout(l(this, cA)), B(this, cA, null)), l(this, bA) && (clearTimeout(l(this, bA)), B(this, bA, null)), (G = this._editorUndoBar) == null || G.destroy(), B(this, Dd, null);
|
|
1898
1898
|
}
|
|
1899
1899
|
combinedSignal(I) {
|
|
1900
1900
|
return AbortSignal.any([this._signal, I.signal]);
|
|
@@ -1912,7 +1912,7 @@ const bd = class bd {
|
|
|
1912
1912
|
return v(this, "hcmFilter", l(this, jl) ? l(this, kc).addHCMFilter(l(this, jl).foreground, l(this, jl).background) : "none");
|
|
1913
1913
|
}
|
|
1914
1914
|
get direction() {
|
|
1915
|
-
return v(this, "direction", getComputedStyle(l(this,
|
|
1915
|
+
return v(this, "direction", getComputedStyle(l(this, jA)).direction);
|
|
1916
1916
|
}
|
|
1917
1917
|
get _highlightColors() {
|
|
1918
1918
|
return v(this, "_highlightColors", l(this, yd) ? new Map(l(this, yd).split(",").map((I) => (I = I.split("=").map((g) => g.trim()), I[1] = I[1].toUpperCase(), I))) : null);
|
|
@@ -2044,7 +2044,7 @@ const bd = class bd {
|
|
|
2044
2044
|
B(this, Rd, I - 1);
|
|
2045
2045
|
}
|
|
2046
2046
|
focusMainContainer() {
|
|
2047
|
-
l(this,
|
|
2047
|
+
l(this, jA).focus();
|
|
2048
2048
|
}
|
|
2049
2049
|
findParent(I, g) {
|
|
2050
2050
|
for (const C of l(this, Ig).values()) {
|
|
@@ -2281,7 +2281,7 @@ const bd = class bd {
|
|
|
2281
2281
|
if (!l(this, HC)) {
|
|
2282
2282
|
B(this, HC, I);
|
|
2283
2283
|
for (const g of l(this, HC))
|
|
2284
|
-
Y(this, S,
|
|
2284
|
+
Y(this, S, JA).call(this, g.defaultPropertiesToUpdate);
|
|
2285
2285
|
}
|
|
2286
2286
|
}
|
|
2287
2287
|
getId() {
|
|
@@ -2307,12 +2307,12 @@ const bd = class bd {
|
|
|
2307
2307
|
if (l(this, EI) !== I && !(l(this, MC) && (await l(this, MC).promise, !l(this, MC)))) {
|
|
2308
2308
|
if (B(this, MC, Promise.withResolvers()), (d = l(this, Sl)) == null || d.commitOrRemove(), l(this, EI) === P.POPUP && ((c = l(this, ug)) == null || c.hideSidebar()), (G = l(this, ug)) == null || G.destroyPopup(), B(this, EI, I), I === P.NONE) {
|
|
2309
2309
|
this.setEditingState(!1), Y(this, S, Ah).call(this);
|
|
2310
|
-
for (const a of l(this,
|
|
2310
|
+
for (const a of l(this, kI).values())
|
|
2311
2311
|
a.hideStandaloneCommentButton();
|
|
2312
2312
|
(b = this._editorUndoBar) == null || b.hide(), this.toggleComment(null), l(this, MC).resolve();
|
|
2313
2313
|
return;
|
|
2314
2314
|
}
|
|
2315
|
-
for (const a of l(this,
|
|
2315
|
+
for (const a of l(this, kI).values())
|
|
2316
2316
|
a.addStandaloneCommentButton();
|
|
2317
2317
|
I === P.SIGNATURE && await ((m = l(this, rl)) == null ? void 0 : m.loadSignatures()), C && Xg.clearPointerType(), this.setEditingState(!0), await Y(this, S, Ch).call(this), this.unselectAll();
|
|
2318
2318
|
for (const a of l(this, Ig).values())
|
|
@@ -2320,7 +2320,7 @@ const bd = class bd {
|
|
|
2320
2320
|
if (I === P.POPUP) {
|
|
2321
2321
|
l(this, Vd) || B(this, Vd, await l(this, Dd).getAnnotationsByType(new Set(l(this, HC).map((e) => e._editorType))));
|
|
2322
2322
|
const a = /* @__PURE__ */ new Set(), n = [];
|
|
2323
|
-
for (const e of l(this,
|
|
2323
|
+
for (const e of l(this, kI).values()) {
|
|
2324
2324
|
const {
|
|
2325
2325
|
annotationElementId: X,
|
|
2326
2326
|
hasComment: N,
|
|
@@ -2342,7 +2342,7 @@ const bd = class bd {
|
|
|
2342
2342
|
A && this.addNewEditorFromKeyboard(), l(this, MC).resolve();
|
|
2343
2343
|
return;
|
|
2344
2344
|
}
|
|
2345
|
-
for (const a of l(this,
|
|
2345
|
+
for (const a of l(this, kI).values())
|
|
2346
2346
|
a.uid === g ? (this.setSelected(a), Z ? a.editComment() : i ? a.enterInEditMode() : a.focus()) : a.unselect();
|
|
2347
2347
|
l(this, MC).resolve();
|
|
2348
2348
|
}
|
|
@@ -2385,9 +2385,9 @@ const bd = class bd {
|
|
|
2385
2385
|
}
|
|
2386
2386
|
showAllEditors(I, g, C = !1) {
|
|
2387
2387
|
var i;
|
|
2388
|
-
for (const Z of l(this,
|
|
2388
|
+
for (const Z of l(this, kI).values())
|
|
2389
2389
|
Z.editorType === I && Z.show(g);
|
|
2390
|
-
(((i = l(this, rc)) == null ? void 0 : i.get(gI.HIGHLIGHT_SHOW_ALL)) ?? !0) !== g && Y(this, S,
|
|
2390
|
+
(((i = l(this, rc)) == null ? void 0 : i.get(gI.HIGHLIGHT_SHOW_ALL)) ?? !0) !== g && Y(this, S, JA).call(this, [[gI.HIGHLIGHT_SHOW_ALL, g]]);
|
|
2391
2391
|
}
|
|
2392
2392
|
enableWaiting(I = !1) {
|
|
2393
2393
|
if (l(this, Lc) !== I) {
|
|
@@ -2397,20 +2397,20 @@ const bd = class bd {
|
|
|
2397
2397
|
}
|
|
2398
2398
|
}
|
|
2399
2399
|
*getEditors(I) {
|
|
2400
|
-
for (const g of l(this,
|
|
2400
|
+
for (const g of l(this, kI).values())
|
|
2401
2401
|
g.pageIndex === I && (yield g);
|
|
2402
2402
|
}
|
|
2403
2403
|
getEditor(I) {
|
|
2404
|
-
return l(this,
|
|
2404
|
+
return l(this, kI).get(I);
|
|
2405
2405
|
}
|
|
2406
2406
|
addEditor(I) {
|
|
2407
|
-
l(this,
|
|
2407
|
+
l(this, kI).set(I.id, I);
|
|
2408
2408
|
}
|
|
2409
2409
|
removeEditor(I) {
|
|
2410
2410
|
var g, C;
|
|
2411
2411
|
I.div.contains(document.activeElement) && (l(this, cA) && clearTimeout(l(this, cA)), B(this, cA, setTimeout(() => {
|
|
2412
2412
|
this.focusMainContainer(), B(this, cA, null);
|
|
2413
|
-
}, 0))), l(this,
|
|
2413
|
+
}, 0))), l(this, kI).delete(I.id), I.annotationElementId && ((g = l(this, Tl)) == null || g.delete(I.annotationElementId)), this.unselect(I), (!I.annotationElementId || !l(this, Fl).has(I.annotationElementId)) && ((C = l(this, uC)) == null || C.remove(I.id));
|
|
2414
2414
|
}
|
|
2415
2415
|
addDeletedAnnotationElement(I) {
|
|
2416
2416
|
l(this, Fl).add(I.annotationElementId), this.addChangedExistingAnnotation(I), I.deleted = !0;
|
|
@@ -2422,13 +2422,13 @@ const bd = class bd {
|
|
|
2422
2422
|
l(this, Fl).delete(I.annotationElementId), this.removeChangedExistingAnnotation(I), I.deleted = !1;
|
|
2423
2423
|
}
|
|
2424
2424
|
setActiveEditor(I) {
|
|
2425
|
-
l(this, IC) !== I && (B(this, IC, I), I && Y(this, S,
|
|
2425
|
+
l(this, IC) !== I && (B(this, IC, I), I && Y(this, S, JA).call(this, I.propertiesToUpdate));
|
|
2426
2426
|
}
|
|
2427
2427
|
updateUI(I) {
|
|
2428
|
-
l(this, S, lh) === I && Y(this, S,
|
|
2428
|
+
l(this, S, lh) === I && Y(this, S, JA).call(this, I.propertiesToUpdate);
|
|
2429
2429
|
}
|
|
2430
2430
|
updateUIForDefaultProperties(I) {
|
|
2431
|
-
Y(this, S,
|
|
2431
|
+
Y(this, S, JA).call(this, I.defaultPropertiesToUpdate);
|
|
2432
2432
|
}
|
|
2433
2433
|
toggleSelected(I) {
|
|
2434
2434
|
if (l(this, GI).has(I)) {
|
|
@@ -2437,7 +2437,7 @@ const bd = class bd {
|
|
|
2437
2437
|
});
|
|
2438
2438
|
return;
|
|
2439
2439
|
}
|
|
2440
|
-
l(this, GI).add(I), I.select(), Y(this, S,
|
|
2440
|
+
l(this, GI).add(I), I.select(), Y(this, S, JA).call(this, I.propertiesToUpdate), Y(this, S, Kg).call(this, {
|
|
2441
2441
|
hasSelectedEditor: !0
|
|
2442
2442
|
});
|
|
2443
2443
|
}
|
|
@@ -2449,7 +2449,7 @@ const bd = class bd {
|
|
|
2449
2449
|
}), (g = l(this, Sl)) == null || g.commitOrRemove();
|
|
2450
2450
|
for (const C of l(this, GI))
|
|
2451
2451
|
C !== I && C.unselect();
|
|
2452
|
-
l(this, GI).clear(), l(this, GI).add(I), I.select(), Y(this, S,
|
|
2452
|
+
l(this, GI).clear(), l(this, GI).add(I), I.select(), Y(this, S, JA).call(this, I.propertiesToUpdate), Y(this, S, Kg).call(this, {
|
|
2453
2453
|
hasSelectedEditor: !0
|
|
2454
2454
|
});
|
|
2455
2455
|
}
|
|
@@ -2526,7 +2526,7 @@ const bd = class bd {
|
|
|
2526
2526
|
selectAll() {
|
|
2527
2527
|
for (const I of l(this, GI))
|
|
2528
2528
|
I.commit();
|
|
2529
|
-
Y(this, S, vm).call(this, l(this,
|
|
2529
|
+
Y(this, S, vm).call(this, l(this, kI).values());
|
|
2530
2530
|
}
|
|
2531
2531
|
unselectAll() {
|
|
2532
2532
|
var I;
|
|
@@ -2547,11 +2547,11 @@ const bd = class bd {
|
|
|
2547
2547
|
B(this, bA, null), l(this, Ql)[0] = l(this, Ql)[1] = 0, this.addCommands({
|
|
2548
2548
|
cmd: () => {
|
|
2549
2549
|
for (const c of Z)
|
|
2550
|
-
l(this,
|
|
2550
|
+
l(this, kI).has(c.id) && (c.translateInPage(A, i), c.translationDone());
|
|
2551
2551
|
},
|
|
2552
2552
|
undo: () => {
|
|
2553
2553
|
for (const c of Z)
|
|
2554
|
-
l(this,
|
|
2554
|
+
l(this, kI).has(c.id) && (c.translateInPage(-A, -i), c.translationDone());
|
|
2555
2555
|
},
|
|
2556
2556
|
mustExec: !1
|
|
2557
2557
|
});
|
|
@@ -2589,7 +2589,7 @@ const bd = class bd {
|
|
|
2589
2589
|
if (!g)
|
|
2590
2590
|
return !1;
|
|
2591
2591
|
const C = (A, i, Z, d) => {
|
|
2592
|
-
if (l(this,
|
|
2592
|
+
if (l(this, kI).has(A.id)) {
|
|
2593
2593
|
const c = l(this, Ig).get(d);
|
|
2594
2594
|
c ? A._setParentAndPosition(c, i, Z) : (A.pageIndex = d, A.x = i, A.y = Z);
|
|
2595
2595
|
}
|
|
@@ -2736,7 +2736,7 @@ const bd = class bd {
|
|
|
2736
2736
|
(l(this, Tl) || B(this, Tl, /* @__PURE__ */ new Map())).set(I, g);
|
|
2737
2737
|
}
|
|
2738
2738
|
};
|
|
2739
|
-
nd = new WeakMap(), IC = new WeakMap(), Vd = new WeakMap(),
|
|
2739
|
+
nd = new WeakMap(), IC = new WeakMap(), Vd = new WeakMap(), kI = new WeakMap(), Ig = new WeakMap(), Nd = new WeakMap(), uC = new WeakMap(), Xd = new WeakMap(), yC = new WeakMap(), ug = new WeakMap(), pl = new WeakMap(), Sl = new WeakMap(), Rd = new WeakMap(), Fl = new WeakMap(), sA = new WeakMap(), HC = new WeakMap(), Si = new WeakMap(), Jc = new WeakMap(), zc = new WeakMap(), ud = new WeakMap(), kc = new WeakMap(), cA = new WeakMap(), Jl = new WeakMap(), yd = new WeakMap(), zl = new WeakMap(), GA = new WeakMap(), Q0 = new WeakMap(), kl = new WeakMap(), Hd = new WeakMap(), Lc = new WeakMap(), Ll = new WeakMap(), Fi = new WeakMap(), Md = new WeakMap(), Tl = new WeakMap(), Tc = new WeakMap(), EI = new WeakMap(), GI = new WeakMap(), rA = new WeakMap(), rl = new WeakMap(), jl = new WeakMap(), rc = new WeakMap(), Dd = new WeakMap(), jc = new WeakMap(), Ql = new WeakMap(), bA = new WeakMap(), jA = new WeakMap(), Qc = new WeakMap(), xc = new WeakMap(), MC = new WeakMap(), S = new WeakSet(), rb = function({
|
|
2740
2740
|
anchorNode: I
|
|
2741
2741
|
}) {
|
|
2742
2742
|
return I.nodeType === Node.TEXT_NODE ? I.parentElement : I;
|
|
@@ -2760,7 +2760,7 @@ nd = new WeakMap(), IC = new WeakMap(), Vd = new WeakMap(), zI = new WeakMap(),
|
|
|
2760
2760
|
var i, Z, d;
|
|
2761
2761
|
const I = document.getSelection();
|
|
2762
2762
|
if (!I || I.isCollapsed) {
|
|
2763
|
-
l(this,
|
|
2763
|
+
l(this, rA) && ((i = l(this, GA)) == null || i.hide(), B(this, rA, null), Y(this, S, Kg).call(this, {
|
|
2764
2764
|
hasSelectedText: !1
|
|
2765
2765
|
}));
|
|
2766
2766
|
return;
|
|
@@ -2768,16 +2768,16 @@ nd = new WeakMap(), IC = new WeakMap(), Vd = new WeakMap(), zI = new WeakMap(),
|
|
|
2768
2768
|
const {
|
|
2769
2769
|
anchorNode: g
|
|
2770
2770
|
} = I;
|
|
2771
|
-
if (g === l(this,
|
|
2771
|
+
if (g === l(this, rA))
|
|
2772
2772
|
return;
|
|
2773
2773
|
const A = Y(this, S, rb).call(this, I).closest(".textLayer");
|
|
2774
2774
|
if (!A) {
|
|
2775
|
-
l(this,
|
|
2775
|
+
l(this, rA) && ((Z = l(this, GA)) == null || Z.hide(), B(this, rA, null), Y(this, S, Kg).call(this, {
|
|
2776
2776
|
hasSelectedText: !1
|
|
2777
2777
|
}));
|
|
2778
2778
|
return;
|
|
2779
2779
|
}
|
|
2780
|
-
if ((d = l(this, GA)) == null || d.hide(), B(this,
|
|
2780
|
+
if ((d = l(this, GA)) == null || d.hide(), B(this, rA, g), Y(this, S, Kg).call(this, {
|
|
2781
2781
|
hasSelectedText: !0
|
|
2782
2782
|
}), !(l(this, EI) !== P.HIGHLIGHT && l(this, EI) !== P.NONE) && (l(this, EI) === P.HIGHLIGHT && this.showAllEditors("highlight", !0, !0), B(this, zl, this.isShiftKeyDown), !this.isShiftKeyDown)) {
|
|
2783
2783
|
const c = l(this, EI) === P.HIGHLIGHT ? Y(this, S, xm).call(this, A) : null;
|
|
@@ -2851,8 +2851,8 @@ nd = new WeakMap(), IC = new WeakMap(), Vd = new WeakMap(), zI = new WeakMap(),
|
|
|
2851
2851
|
Object.entries(I).some(([C, A]) => l(this, jc)[C] !== A) && (this._eventBus.dispatch("annotationeditorstateschanged", {
|
|
2852
2852
|
source: this,
|
|
2853
2853
|
details: Object.assign(l(this, jc), I)
|
|
2854
|
-
}), l(this, EI) === P.HIGHLIGHT && I.hasSelectedEditor === !1 && Y(this, S,
|
|
2855
|
-
},
|
|
2854
|
+
}), l(this, EI) === P.HIGHLIGHT && I.hasSelectedEditor === !1 && Y(this, S, JA).call(this, [[gI.HIGHLIGHT_FREE, !0]]));
|
|
2855
|
+
}, JA = function(I) {
|
|
2856
2856
|
this._eventBus.dispatch("annotationeditorparamschanged", {
|
|
2857
2857
|
source: this,
|
|
2858
2858
|
details: I
|
|
@@ -2864,7 +2864,7 @@ nd = new WeakMap(), IC = new WeakMap(), Vd = new WeakMap(), zI = new WeakMap(),
|
|
|
2864
2864
|
for (const g of l(this, Ig).values())
|
|
2865
2865
|
I.push(g.enable());
|
|
2866
2866
|
await Promise.all(I);
|
|
2867
|
-
for (const g of l(this,
|
|
2867
|
+
for (const g of l(this, kI).values())
|
|
2868
2868
|
g.enable();
|
|
2869
2869
|
}
|
|
2870
2870
|
}, Ah = function() {
|
|
@@ -2872,7 +2872,7 @@ nd = new WeakMap(), IC = new WeakMap(), Vd = new WeakMap(), zI = new WeakMap(),
|
|
|
2872
2872
|
B(this, kl, !1);
|
|
2873
2873
|
for (const I of l(this, Ig).values())
|
|
2874
2874
|
I.disable();
|
|
2875
|
-
for (const I of l(this,
|
|
2875
|
+
for (const I of l(this, kI).values())
|
|
2876
2876
|
I.disable();
|
|
2877
2877
|
}
|
|
2878
2878
|
}, Om = function(I) {
|
|
@@ -2884,10 +2884,10 @@ nd = new WeakMap(), IC = new WeakMap(), Vd = new WeakMap(), zI = new WeakMap(),
|
|
|
2884
2884
|
;
|
|
2885
2885
|
return I;
|
|
2886
2886
|
}, Cc = function() {
|
|
2887
|
-
if (l(this,
|
|
2887
|
+
if (l(this, kI).size === 0)
|
|
2888
2888
|
return !0;
|
|
2889
|
-
if (l(this,
|
|
2890
|
-
for (const I of l(this,
|
|
2889
|
+
if (l(this, kI).size === 1)
|
|
2890
|
+
for (const I of l(this, kI).values())
|
|
2891
2891
|
return I.isEmpty();
|
|
2892
2892
|
return !1;
|
|
2893
2893
|
}, vm = function(I) {
|
|
@@ -2901,7 +2901,7 @@ nd = new WeakMap(), IC = new WeakMap(), Vd = new WeakMap(), zI = new WeakMap(),
|
|
|
2901
2901
|
});
|
|
2902
2902
|
}, M(bd, "TRANSLATE_SMALL", 1), M(bd, "TRANSLATE_BIG", 10);
|
|
2903
2903
|
let EZ = bd;
|
|
2904
|
-
var ig, mA, xC, Kd, oA, gC, pd, BA, Ug,
|
|
2904
|
+
var ig, mA, xC, Kd, oA, gC, pd, BA, Ug, QA, Ji, WA, xl, AA, Ac, jb;
|
|
2905
2905
|
const pg = class pg {
|
|
2906
2906
|
constructor(I) {
|
|
2907
2907
|
w(this, AA);
|
|
@@ -2914,7 +2914,7 @@ const pg = class pg {
|
|
|
2914
2914
|
w(this, pd, !1);
|
|
2915
2915
|
w(this, BA, null);
|
|
2916
2916
|
w(this, Ug, null);
|
|
2917
|
-
w(this,
|
|
2917
|
+
w(this, QA, null);
|
|
2918
2918
|
w(this, Ji, null);
|
|
2919
2919
|
w(this, WA, !1);
|
|
2920
2920
|
B(this, Ug, I), B(this, WA, I._uiManager.useNewAltTextFlow), l(pg, xl) || B(pg, xl, Object.freeze({
|
|
@@ -2966,13 +2966,13 @@ const pg = class pg {
|
|
|
2966
2966
|
return l(this, WA) ? l(this, ig) === null : !l(this, ig) && !l(this, mA);
|
|
2967
2967
|
}
|
|
2968
2968
|
hasData() {
|
|
2969
|
-
return l(this, WA) ? l(this, ig) !== null || !!l(this,
|
|
2969
|
+
return l(this, WA) ? l(this, ig) !== null || !!l(this, QA) : this.isEmpty();
|
|
2970
2970
|
}
|
|
2971
2971
|
get guessedText() {
|
|
2972
|
-
return l(this,
|
|
2972
|
+
return l(this, QA);
|
|
2973
2973
|
}
|
|
2974
2974
|
async setGuessedText(I) {
|
|
2975
|
-
l(this, ig) === null && (B(this,
|
|
2975
|
+
l(this, ig) === null && (B(this, QA, I), B(this, Ji, await pg._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer", {
|
|
2976
2976
|
generatedAltText: I
|
|
2977
2977
|
})), Y(this, AA, jb).call(this));
|
|
2978
2978
|
}
|
|
@@ -2990,10 +2990,10 @@ const pg = class pg {
|
|
|
2990
2990
|
}
|
|
2991
2991
|
serialize(I) {
|
|
2992
2992
|
let g = l(this, ig);
|
|
2993
|
-
return !I && l(this,
|
|
2993
|
+
return !I && l(this, QA) === g && (g = l(this, Ji)), {
|
|
2994
2994
|
altText: g,
|
|
2995
2995
|
decorative: l(this, mA),
|
|
2996
|
-
guessedText: l(this,
|
|
2996
|
+
guessedText: l(this, QA),
|
|
2997
2997
|
textWithDisclaimer: l(this, Ji)
|
|
2998
2998
|
};
|
|
2999
2999
|
}
|
|
@@ -3010,7 +3010,7 @@ const pg = class pg {
|
|
|
3010
3010
|
textWithDisclaimer: A,
|
|
3011
3011
|
cancel: i = !1
|
|
3012
3012
|
}) {
|
|
3013
|
-
C && (B(this,
|
|
3013
|
+
C && (B(this, QA, C), B(this, Ji, A)), !(l(this, ig) === I && l(this, mA) === g) && (i || (B(this, ig, I), B(this, mA, g)), Y(this, AA, jb).call(this));
|
|
3014
3014
|
}
|
|
3015
3015
|
toggle(I = !1) {
|
|
3016
3016
|
l(this, xC) && (!I && l(this, gC) && (clearTimeout(l(this, gC)), B(this, gC, null)), l(this, xC).disabled = !I);
|
|
@@ -3028,7 +3028,7 @@ const pg = class pg {
|
|
|
3028
3028
|
(I = l(this, xC)) == null || I.remove(), B(this, xC, null), B(this, Kd, null), B(this, oA, null), (g = l(this, BA)) == null || g.remove(), B(this, BA, null);
|
|
3029
3029
|
}
|
|
3030
3030
|
};
|
|
3031
|
-
ig = new WeakMap(), mA = new WeakMap(), xC = new WeakMap(), Kd = new WeakMap(), oA = new WeakMap(), gC = new WeakMap(), pd = new WeakMap(), BA = new WeakMap(), Ug = new WeakMap(),
|
|
3031
|
+
ig = new WeakMap(), mA = new WeakMap(), xC = new WeakMap(), Kd = new WeakMap(), oA = new WeakMap(), gC = new WeakMap(), pd = new WeakMap(), BA = new WeakMap(), Ug = new WeakMap(), QA = new WeakMap(), Ji = new WeakMap(), WA = new WeakMap(), xl = new WeakMap(), AA = new WeakSet(), Ac = function() {
|
|
3032
3032
|
return l(this, ig) && "added" || l(this, ig) === null && this.guessedText && "review" || "missing";
|
|
3033
3033
|
}, jb = async function() {
|
|
3034
3034
|
var A, i, Z;
|
|
@@ -3239,12 +3239,12 @@ let yb = (HW = class {
|
|
|
3239
3239
|
I.addEventListener("contextmenu", TC, {
|
|
3240
3240
|
signal: C
|
|
3241
3241
|
}), g && (I.addEventListener("focusin", (i) => {
|
|
3242
|
-
l(this, XI)._focusEventsAllowed = !1,
|
|
3242
|
+
l(this, XI)._focusEventsAllowed = !1, QI(i);
|
|
3243
3243
|
}, {
|
|
3244
3244
|
capture: !0,
|
|
3245
3245
|
signal: C
|
|
3246
3246
|
}), I.addEventListener("focusout", (i) => {
|
|
3247
|
-
l(this, XI)._focusEventsAllowed = !0,
|
|
3247
|
+
l(this, XI)._focusEventsAllowed = !0, QI(i);
|
|
3248
3248
|
}, {
|
|
3249
3249
|
capture: !0,
|
|
3250
3250
|
signal: C
|
|
@@ -3271,7 +3271,7 @@ let yb = (HW = class {
|
|
|
3271
3271
|
signal: C
|
|
3272
3272
|
}), I;
|
|
3273
3273
|
}, HW);
|
|
3274
|
-
var Sd, ji, vc, Ec, Pc, fc, qc,
|
|
3274
|
+
var Sd, ji, vc, Ec, Pc, fc, qc, xA, Qi, UA, xi, OA, ei, ih, Zh, dh;
|
|
3275
3275
|
const LB = class LB {
|
|
3276
3276
|
constructor({
|
|
3277
3277
|
container: I,
|
|
@@ -3290,61 +3290,61 @@ const LB = class LB {
|
|
|
3290
3290
|
w(this, Pc);
|
|
3291
3291
|
w(this, fc);
|
|
3292
3292
|
w(this, qc);
|
|
3293
|
-
w(this,
|
|
3293
|
+
w(this, xA, null);
|
|
3294
3294
|
w(this, Qi);
|
|
3295
|
-
w(this,
|
|
3295
|
+
w(this, UA, null);
|
|
3296
3296
|
w(this, xi);
|
|
3297
|
-
w(this,
|
|
3297
|
+
w(this, OA, null);
|
|
3298
3298
|
B(this, Sd, I), B(this, vc, C), B(this, Ec, g), B(this, Pc, A), B(this, fc, i), B(this, qc, Z), B(this, xi, new AbortController()), B(this, Qi, AbortSignal.any([d, l(this, xi).signal])), I.addEventListener("touchstart", Y(this, ei, ih).bind(this), {
|
|
3299
3299
|
passive: !1,
|
|
3300
3300
|
signal: l(this, Qi)
|
|
3301
3301
|
});
|
|
3302
3302
|
}
|
|
3303
3303
|
get MIN_TOUCH_DISTANCE_TO_PINCH() {
|
|
3304
|
-
return 35 /
|
|
3304
|
+
return 35 / pA.pixelRatio;
|
|
3305
3305
|
}
|
|
3306
3306
|
destroy() {
|
|
3307
3307
|
var I, g;
|
|
3308
|
-
(I = l(this, xi)) == null || I.abort(), B(this, xi, null), (g = l(this,
|
|
3308
|
+
(I = l(this, xi)) == null || I.abort(), B(this, xi, null), (g = l(this, xA)) == null || g.abort(), B(this, xA, null);
|
|
3309
3309
|
}
|
|
3310
3310
|
};
|
|
3311
|
-
Sd = new WeakMap(), ji = new WeakMap(), vc = new WeakMap(), Ec = new WeakMap(), Pc = new WeakMap(), fc = new WeakMap(), qc = new WeakMap(),
|
|
3311
|
+
Sd = new WeakMap(), ji = new WeakMap(), vc = new WeakMap(), Ec = new WeakMap(), Pc = new WeakMap(), fc = new WeakMap(), qc = new WeakMap(), xA = new WeakMap(), Qi = new WeakMap(), UA = new WeakMap(), xi = new WeakMap(), OA = new WeakMap(), ei = new WeakSet(), ih = function(I) {
|
|
3312
3312
|
var A, i, Z;
|
|
3313
3313
|
if ((A = l(this, Ec)) != null && A.call(this))
|
|
3314
3314
|
return;
|
|
3315
3315
|
if (I.touches.length === 1) {
|
|
3316
|
-
if (l(this,
|
|
3316
|
+
if (l(this, xA))
|
|
3317
3317
|
return;
|
|
3318
|
-
const d = B(this,
|
|
3318
|
+
const d = B(this, xA, new AbortController()), c = AbortSignal.any([l(this, Qi), d.signal]), G = l(this, Sd), b = {
|
|
3319
3319
|
capture: !0,
|
|
3320
3320
|
signal: c,
|
|
3321
3321
|
passive: !1
|
|
3322
3322
|
}, m = (W) => {
|
|
3323
3323
|
var a;
|
|
3324
|
-
W.pointerType === "touch" && ((a = l(this,
|
|
3324
|
+
W.pointerType === "touch" && ((a = l(this, xA)) == null || a.abort(), B(this, xA, null));
|
|
3325
3325
|
};
|
|
3326
3326
|
G.addEventListener("pointerdown", (W) => {
|
|
3327
|
-
W.pointerType === "touch" && (
|
|
3327
|
+
W.pointerType === "touch" && (QI(W), m(W));
|
|
3328
3328
|
}, b), G.addEventListener("pointerup", m, b), G.addEventListener("pointercancel", m, b);
|
|
3329
3329
|
return;
|
|
3330
3330
|
}
|
|
3331
|
-
if (!l(this,
|
|
3332
|
-
B(this,
|
|
3333
|
-
const d = AbortSignal.any([l(this, Qi), l(this,
|
|
3331
|
+
if (!l(this, OA)) {
|
|
3332
|
+
B(this, OA, new AbortController());
|
|
3333
|
+
const d = AbortSignal.any([l(this, Qi), l(this, OA).signal]), c = l(this, Sd), G = {
|
|
3334
3334
|
signal: d,
|
|
3335
3335
|
capture: !1,
|
|
3336
3336
|
passive: !1
|
|
3337
3337
|
};
|
|
3338
3338
|
c.addEventListener("touchmove", Y(this, ei, Zh).bind(this), G);
|
|
3339
3339
|
const b = Y(this, ei, dh).bind(this);
|
|
3340
|
-
c.addEventListener("touchend", b, G), c.addEventListener("touchcancel", b, G), G.capture = !0, c.addEventListener("pointerdown",
|
|
3340
|
+
c.addEventListener("touchend", b, G), c.addEventListener("touchcancel", b, G), G.capture = !0, c.addEventListener("pointerdown", QI, G), c.addEventListener("pointermove", QI, G), c.addEventListener("pointercancel", QI, G), c.addEventListener("pointerup", QI, G), (i = l(this, Pc)) == null || i.call(this);
|
|
3341
3341
|
}
|
|
3342
|
-
if (
|
|
3343
|
-
B(this,
|
|
3342
|
+
if (QI(I), I.touches.length !== 2 || (Z = l(this, vc)) != null && Z.call(this)) {
|
|
3343
|
+
B(this, UA, null);
|
|
3344
3344
|
return;
|
|
3345
3345
|
}
|
|
3346
3346
|
let [g, C] = I.touches;
|
|
3347
|
-
g.identifier > C.identifier && ([g, C] = [C, g]), B(this,
|
|
3347
|
+
g.identifier > C.identifier && ([g, C] = [C, g]), B(this, UA, {
|
|
3348
3348
|
touch0X: g.screenX,
|
|
3349
3349
|
touch0Y: g.screenY,
|
|
3350
3350
|
touch1X: C.screenX,
|
|
@@ -3352,9 +3352,9 @@ Sd = new WeakMap(), ji = new WeakMap(), vc = new WeakMap(), Ec = new WeakMap(),
|
|
|
3352
3352
|
});
|
|
3353
3353
|
}, Zh = function(I) {
|
|
3354
3354
|
var o;
|
|
3355
|
-
if (!l(this,
|
|
3355
|
+
if (!l(this, UA) || I.touches.length !== 2)
|
|
3356
3356
|
return;
|
|
3357
|
-
|
|
3357
|
+
QI(I);
|
|
3358
3358
|
let [g, C] = I.touches;
|
|
3359
3359
|
g.identifier > C.identifier && ([g, C] = [C, g]);
|
|
3360
3360
|
const {
|
|
@@ -3363,7 +3363,7 @@ Sd = new WeakMap(), ji = new WeakMap(), vc = new WeakMap(), Ec = new WeakMap(),
|
|
|
3363
3363
|
} = g, {
|
|
3364
3364
|
screenX: Z,
|
|
3365
3365
|
screenY: d
|
|
3366
|
-
} = C, c = l(this,
|
|
3366
|
+
} = C, c = l(this, UA), {
|
|
3367
3367
|
touch0X: G,
|
|
3368
3368
|
touch0Y: b,
|
|
3369
3369
|
touch1X: m,
|
|
@@ -3379,10 +3379,10 @@ Sd = new WeakMap(), ji = new WeakMap(), vc = new WeakMap(), Ec = new WeakMap(),
|
|
|
3379
3379
|
(o = l(this, fc)) == null || o.call(this, V, u, N);
|
|
3380
3380
|
}, dh = function(I) {
|
|
3381
3381
|
var g;
|
|
3382
|
-
I.touches.length >= 2 || (l(this,
|
|
3382
|
+
I.touches.length >= 2 || (l(this, OA) && (l(this, OA).abort(), B(this, OA, null), (g = l(this, qc)) == null || g.call(this)), l(this, UA) && (QI(I), B(this, UA, null), B(this, ji, !1)));
|
|
3383
3383
|
};
|
|
3384
3384
|
let e0 = LB;
|
|
3385
|
-
var Ui, OC, HI, YI,
|
|
3385
|
+
var Ui, OC, HI, YI, vA, Fd, Ul, _c, Bg, Oi, EA, KC, Ol, $c, vi, CC, IG, Ei, PA, hA, Jd, zd, pC, Pi, gG, x0, x, Pm, CG, fm, Qb, sh, ch, qm, xb, _m, Gh, bh, mh, $m, oh, Io, Bh, Wh, hh, go, lc;
|
|
3386
3386
|
const E = class E {
|
|
3387
3387
|
constructor(I) {
|
|
3388
3388
|
w(this, x);
|
|
@@ -3390,13 +3390,13 @@ const E = class E {
|
|
|
3390
3390
|
w(this, OC, null);
|
|
3391
3391
|
w(this, HI, null);
|
|
3392
3392
|
w(this, YI, null);
|
|
3393
|
-
w(this,
|
|
3393
|
+
w(this, vA, null);
|
|
3394
3394
|
w(this, Fd, !1);
|
|
3395
3395
|
w(this, Ul, null);
|
|
3396
3396
|
w(this, _c, "");
|
|
3397
3397
|
w(this, Bg, null);
|
|
3398
3398
|
w(this, Oi, null);
|
|
3399
|
-
w(this,
|
|
3399
|
+
w(this, EA, null);
|
|
3400
3400
|
w(this, KC, null);
|
|
3401
3401
|
w(this, Ol, null);
|
|
3402
3402
|
w(this, $c, "");
|
|
@@ -3404,7 +3404,7 @@ const E = class E {
|
|
|
3404
3404
|
w(this, CC, null);
|
|
3405
3405
|
w(this, IG, !1);
|
|
3406
3406
|
w(this, Ei, !1);
|
|
3407
|
-
w(this,
|
|
3407
|
+
w(this, PA, !1);
|
|
3408
3408
|
w(this, hA, null);
|
|
3409
3409
|
w(this, Jd, 0);
|
|
3410
3410
|
w(this, zd, 0);
|
|
@@ -3792,19 +3792,19 @@ const E = class E {
|
|
|
3792
3792
|
}
|
|
3793
3793
|
addStandaloneCommentButton() {
|
|
3794
3794
|
if (this._uiManager.hasCommentManager()) {
|
|
3795
|
-
if (l(this,
|
|
3796
|
-
this._uiManager.isEditingMode() && l(this,
|
|
3795
|
+
if (l(this, vA)) {
|
|
3796
|
+
this._uiManager.isEditingMode() && l(this, vA).classList.remove("hidden");
|
|
3797
3797
|
return;
|
|
3798
3798
|
}
|
|
3799
|
-
this.hasComment && (B(this,
|
|
3799
|
+
this.hasComment && (B(this, vA, l(this, YI).renderForStandalone()), this.div.append(l(this, vA)));
|
|
3800
3800
|
}
|
|
3801
3801
|
}
|
|
3802
3802
|
removeStandaloneCommentButton() {
|
|
3803
|
-
l(this, YI).removeStandaloneCommentButton(), B(this,
|
|
3803
|
+
l(this, YI).removeStandaloneCommentButton(), B(this, vA, null);
|
|
3804
3804
|
}
|
|
3805
3805
|
hideStandaloneCommentButton() {
|
|
3806
3806
|
var I;
|
|
3807
|
-
(I = l(this,
|
|
3807
|
+
(I = l(this, vA)) == null || I.classList.add("hidden");
|
|
3808
3808
|
}
|
|
3809
3809
|
get comment() {
|
|
3810
3810
|
const {
|
|
@@ -4006,7 +4006,7 @@ const E = class E {
|
|
|
4006
4006
|
return l(this, Ei);
|
|
4007
4007
|
}
|
|
4008
4008
|
shouldGetKeyboardEvents() {
|
|
4009
|
-
return l(this,
|
|
4009
|
+
return l(this, PA);
|
|
4010
4010
|
}
|
|
4011
4011
|
needsToBeRebuilt() {
|
|
4012
4012
|
return this.div && !this.isAttachedToDOM;
|
|
@@ -4118,7 +4118,7 @@ const E = class E {
|
|
|
4118
4118
|
keydown(I) {
|
|
4119
4119
|
if (!this.isResizable || I.target !== this.div || I.key !== "Enter")
|
|
4120
4120
|
return;
|
|
4121
|
-
this._uiManager.setSelected(this), B(this,
|
|
4121
|
+
this._uiManager.setSelected(this), B(this, EA, {
|
|
4122
4122
|
savedX: this.x,
|
|
4123
4123
|
savedY: this.y,
|
|
4124
4124
|
savedWidth: this.width,
|
|
@@ -4160,12 +4160,12 @@ const E = class E {
|
|
|
4160
4160
|
d.setAttribute("data-l10n-id", E._l10nResizer[G]);
|
|
4161
4161
|
}
|
|
4162
4162
|
}
|
|
4163
|
-
Y(this, x, go).call(this, 0), B(this,
|
|
4163
|
+
Y(this, x, go).call(this, 0), B(this, PA, !0), l(this, Bg).firstElementChild.focus({
|
|
4164
4164
|
focusVisible: !0
|
|
4165
4165
|
}), I.preventDefault(), I.stopImmediatePropagation();
|
|
4166
4166
|
}
|
|
4167
4167
|
_resizeWithKeyboard(I, g) {
|
|
4168
|
-
l(this,
|
|
4168
|
+
l(this, PA) && Y(this, x, _m).call(this, l(this, $c), {
|
|
4169
4169
|
deltaX: I,
|
|
4170
4170
|
deltaY: g,
|
|
4171
4171
|
fromKeyboard: !0
|
|
@@ -4312,7 +4312,7 @@ const E = class E {
|
|
|
4312
4312
|
(g == null ? void 0 : g.nodeName) === "DIV" && g.classList.contains("annotationContent") && g.remove();
|
|
4313
4313
|
}
|
|
4314
4314
|
};
|
|
4315
|
-
Ui = new WeakMap(), OC = new WeakMap(), HI = new WeakMap(), YI = new WeakMap(),
|
|
4315
|
+
Ui = new WeakMap(), OC = new WeakMap(), HI = new WeakMap(), YI = new WeakMap(), vA = new WeakMap(), Fd = new WeakMap(), Ul = new WeakMap(), _c = new WeakMap(), Bg = new WeakMap(), Oi = new WeakMap(), EA = new WeakMap(), KC = new WeakMap(), Ol = new WeakMap(), $c = new WeakMap(), vi = new WeakMap(), CC = new WeakMap(), IG = new WeakMap(), Ei = new WeakMap(), PA = new WeakMap(), hA = new WeakMap(), Jd = new WeakMap(), zd = new WeakMap(), pC = new WeakMap(), Pi = new WeakMap(), gG = new WeakMap(), x0 = new WeakMap(), x = new WeakSet(), Pm = function([I, g], C, A) {
|
|
4316
4316
|
[C, A] = this.screenToPageTranslation(C, A), this.x += C / I, this.y += A / g, this._onTranslating(this.x, this.y), this.fixAndSetPosition();
|
|
4317
4317
|
}, CG = new WeakSet(), fm = function(I, g, C) {
|
|
4318
4318
|
switch (C) {
|
|
@@ -4370,12 +4370,12 @@ Ui = new WeakMap(), OC = new WeakMap(), HI = new WeakMap(), YI = new WeakMap(),
|
|
|
4370
4370
|
passive: !0,
|
|
4371
4371
|
capture: !0,
|
|
4372
4372
|
signal: Z
|
|
4373
|
-
}), window.addEventListener("touchmove",
|
|
4373
|
+
}), window.addEventListener("touchmove", QI, {
|
|
4374
4374
|
passive: !1,
|
|
4375
4375
|
signal: Z
|
|
4376
4376
|
}), window.addEventListener("contextmenu", TC, {
|
|
4377
4377
|
signal: Z
|
|
4378
|
-
}), B(this,
|
|
4378
|
+
}), B(this, EA, {
|
|
4379
4379
|
savedX: this.x,
|
|
4380
4380
|
savedY: this.y,
|
|
4381
4381
|
savedWidth: this.width,
|
|
@@ -4395,15 +4395,15 @@ Ui = new WeakMap(), OC = new WeakMap(), HI = new WeakMap(), YI = new WeakMap(),
|
|
|
4395
4395
|
}, qm = function(I, g, C, A) {
|
|
4396
4396
|
this.width = C, this.height = A, this.x = I, this.y = g, this.setDims(), this.fixAndSetPosition(), this._onResized();
|
|
4397
4397
|
}, xb = function() {
|
|
4398
|
-
if (!l(this,
|
|
4398
|
+
if (!l(this, EA))
|
|
4399
4399
|
return;
|
|
4400
4400
|
const {
|
|
4401
4401
|
savedX: I,
|
|
4402
4402
|
savedY: g,
|
|
4403
4403
|
savedWidth: C,
|
|
4404
4404
|
savedHeight: A
|
|
4405
|
-
} = l(this,
|
|
4406
|
-
B(this,
|
|
4405
|
+
} = l(this, EA);
|
|
4406
|
+
B(this, EA, null);
|
|
4407
4407
|
const i = this.x, Z = this.y, d = this.width, c = this.height;
|
|
4408
4408
|
i === I && Z === g && d === C && c === A || this.addCommands({
|
|
4409
4409
|
cmd: Y(this, x, qm).bind(this, i, Z, d, c),
|
|
@@ -4465,7 +4465,7 @@ Ui = new WeakMap(), OC = new WeakMap(), HI = new WeakMap(), YI = new WeakMap(),
|
|
|
4465
4465
|
l(this, CC) || B(this, CC, [this.x, this.y, this.width, this.height]), this.width = k, this.height = T, this.x = r, this.y = U, this.setDims(), this.fixAndSetPosition(), this._onResizing();
|
|
4466
4466
|
}, Gh = function() {
|
|
4467
4467
|
var I;
|
|
4468
|
-
B(this,
|
|
4468
|
+
B(this, EA, {
|
|
4469
4469
|
savedX: this.x,
|
|
4470
4470
|
savedY: this.y,
|
|
4471
4471
|
savedWidth: this.width,
|
|
@@ -4512,20 +4512,20 @@ Ui = new WeakMap(), OC = new WeakMap(), HI = new WeakMap(), YI = new WeakMap(),
|
|
|
4512
4512
|
pointerId: W
|
|
4513
4513
|
} = G;
|
|
4514
4514
|
if (W !== l(this, Ul)) {
|
|
4515
|
-
|
|
4515
|
+
QI(G);
|
|
4516
4516
|
return;
|
|
4517
4517
|
}
|
|
4518
4518
|
const [a, n] = this.screenToPageTranslation(b - l(this, Jd), m - l(this, zd));
|
|
4519
4519
|
B(this, Jd, b), B(this, zd, m), this._uiManager.dragSelectedEditors(a, n);
|
|
4520
|
-
}, Z), window.addEventListener("touchmove",
|
|
4521
|
-
G.pointerType === l(this, _c) && (l(this, Pi) || G.isPrimary) && d(G),
|
|
4520
|
+
}, Z), window.addEventListener("touchmove", QI, Z), window.addEventListener("pointerdown", (G) => {
|
|
4521
|
+
G.pointerType === l(this, _c) && (l(this, Pi) || G.isPrimary) && d(G), QI(G);
|
|
4522
4522
|
}, Z));
|
|
4523
4523
|
const c = (G) => {
|
|
4524
4524
|
if (!l(this, Ul) || l(this, Ul) === G.pointerId) {
|
|
4525
4525
|
d(G);
|
|
4526
4526
|
return;
|
|
4527
4527
|
}
|
|
4528
|
-
|
|
4528
|
+
QI(G);
|
|
4529
4529
|
};
|
|
4530
4530
|
window.addEventListener("pointerup", c, {
|
|
4531
4531
|
signal: i
|
|
@@ -4546,15 +4546,15 @@ Ui = new WeakMap(), OC = new WeakMap(), HI = new WeakMap(), YI = new WeakMap(),
|
|
|
4546
4546
|
E._resizerKeyboardManager.exec(this, I);
|
|
4547
4547
|
}, Wh = function(I) {
|
|
4548
4548
|
var g;
|
|
4549
|
-
l(this,
|
|
4549
|
+
l(this, PA) && ((g = I.relatedTarget) == null ? void 0 : g.parentNode) !== l(this, Bg) && Y(this, x, lc).call(this);
|
|
4550
4550
|
}, hh = function(I) {
|
|
4551
|
-
B(this, $c, l(this,
|
|
4551
|
+
B(this, $c, l(this, PA) ? I : "");
|
|
4552
4552
|
}, go = function(I) {
|
|
4553
4553
|
if (l(this, OC))
|
|
4554
4554
|
for (const g of l(this, OC))
|
|
4555
4555
|
g.tabIndex = I;
|
|
4556
4556
|
}, lc = function() {
|
|
4557
|
-
B(this,
|
|
4557
|
+
B(this, PA, !1), Y(this, x, go).call(this, -1), Y(this, x, xb).call(this);
|
|
4558
4558
|
}, w(E, CG), M(E, "_l10n", null), M(E, "_l10nResizer", null), M(E, "_borderLineWidth", -1), M(E, "_colorManager", new Qm()), M(E, "_zIndex", 1), M(E, "_telemetryTimeout", 1e3);
|
|
4559
4559
|
let RI = E;
|
|
4560
4560
|
class Ja extends RI {
|
|
@@ -4607,13 +4607,13 @@ const Co = Object.freeze({
|
|
|
4607
4607
|
hash: "",
|
|
4608
4608
|
transfer: void 0
|
|
4609
4609
|
});
|
|
4610
|
-
var fi, qi,
|
|
4610
|
+
var fi, qi, fA, Wg, U0, ah;
|
|
4611
4611
|
class YB {
|
|
4612
4612
|
constructor() {
|
|
4613
4613
|
w(this, U0);
|
|
4614
4614
|
w(this, fi, !1);
|
|
4615
4615
|
w(this, qi, null);
|
|
4616
|
-
w(this,
|
|
4616
|
+
w(this, fA, null);
|
|
4617
4617
|
w(this, Wg, /* @__PURE__ */ new Map());
|
|
4618
4618
|
this.onSetModified = null, this.onResetModified = null, this.onAnnotationEditor = null;
|
|
4619
4619
|
}
|
|
@@ -4626,7 +4626,7 @@ class YB {
|
|
|
4626
4626
|
}
|
|
4627
4627
|
remove(I) {
|
|
4628
4628
|
const g = l(this, Wg).get(I);
|
|
4629
|
-
if (g !== void 0 && (g instanceof RI && l(this,
|
|
4629
|
+
if (g !== void 0 && (g instanceof RI && l(this, fA).delete(g.annotationElementId), l(this, Wg).delete(I), l(this, Wg).size === 0 && this.resetModified(), typeof this.onAnnotationEditor == "function")) {
|
|
4630
4630
|
for (const C of l(this, Wg).values())
|
|
4631
4631
|
if (C instanceof RI)
|
|
4632
4632
|
return;
|
|
@@ -4641,7 +4641,7 @@ class YB {
|
|
|
4641
4641
|
C[i] !== Z && (A = !0, C[i] = Z);
|
|
4642
4642
|
else
|
|
4643
4643
|
A = !0, l(this, Wg).set(I, g);
|
|
4644
|
-
A && Y(this, U0, ah).call(this), g instanceof RI && ((l(this,
|
|
4644
|
+
A && Y(this, U0, ah).call(this), g instanceof RI && ((l(this, fA) || B(this, fA, /* @__PURE__ */ new Map())).set(g.annotationElementId, g), typeof this.onAnnotationEditor == "function" && this.onAnnotationEditor(g.constructor._type));
|
|
4645
4645
|
}
|
|
4646
4646
|
has(I) {
|
|
4647
4647
|
return l(this, Wg).has(I);
|
|
@@ -4714,19 +4714,19 @@ class YB {
|
|
|
4714
4714
|
}
|
|
4715
4715
|
updateEditor(I, g) {
|
|
4716
4716
|
var A;
|
|
4717
|
-
const C = (A = l(this,
|
|
4717
|
+
const C = (A = l(this, fA)) == null ? void 0 : A.get(I);
|
|
4718
4718
|
return C ? (C.updateFromAnnotationLayer(g), !0) : !1;
|
|
4719
4719
|
}
|
|
4720
4720
|
getEditor(I) {
|
|
4721
4721
|
var g;
|
|
4722
|
-
return ((g = l(this,
|
|
4722
|
+
return ((g = l(this, fA)) == null ? void 0 : g.get(I)) || null;
|
|
4723
4723
|
}
|
|
4724
4724
|
get modifiedIds() {
|
|
4725
4725
|
if (l(this, qi))
|
|
4726
4726
|
return l(this, qi);
|
|
4727
4727
|
const I = [];
|
|
4728
|
-
if (l(this,
|
|
4729
|
-
for (const g of l(this,
|
|
4728
|
+
if (l(this, fA))
|
|
4729
|
+
for (const g of l(this, fA).values())
|
|
4730
4730
|
g.serialize() && I.push(g.annotationElementId);
|
|
4731
4731
|
return B(this, qi, {
|
|
4732
4732
|
ids: new Set(I),
|
|
@@ -4737,7 +4737,7 @@ class YB {
|
|
|
4737
4737
|
return l(this, Wg).entries();
|
|
4738
4738
|
}
|
|
4739
4739
|
}
|
|
4740
|
-
fi = new WeakMap(), qi = new WeakMap(),
|
|
4740
|
+
fi = new WeakMap(), qi = new WeakMap(), fA = new WeakMap(), Wg = new WeakMap(), U0 = new WeakSet(), ah = function() {
|
|
4741
4741
|
l(this, fi) || (B(this, fi, !0), typeof this.onSetModified == "function" && this.onSetModified());
|
|
4742
4742
|
};
|
|
4743
4743
|
var AG;
|
|
@@ -5158,56 +5158,56 @@ vl = new WeakMap(), wA = new WeakMap(), _i = new WeakMap(), $i = new WeakSet(),
|
|
|
5158
5158
|
return l(this, _i).decode(new Uint8Array(l(this, vl), g + 4, C));
|
|
5159
5159
|
}, M(od, "strings", ["css", "loadedName", "baseFontName", "src"]);
|
|
5160
5160
|
let V0 = od;
|
|
5161
|
-
var jd, Qd, xd, Ud, AC, aA, iG, BI,
|
|
5161
|
+
var jd, Qd, xd, Ud, AC, aA, iG, BI, jI, jC, Ob, Zc;
|
|
5162
5162
|
const f = class f {
|
|
5163
5163
|
constructor({
|
|
5164
5164
|
data: I,
|
|
5165
5165
|
extra: g
|
|
5166
5166
|
}) {
|
|
5167
|
-
w(this,
|
|
5167
|
+
w(this, jI);
|
|
5168
5168
|
w(this, aA);
|
|
5169
5169
|
w(this, iG);
|
|
5170
5170
|
w(this, BI);
|
|
5171
5171
|
B(this, aA, I), B(this, iG, new TextDecoder()), B(this, BI, new DataView(l(this, aA))), g && Object.assign(this, g);
|
|
5172
5172
|
}
|
|
5173
5173
|
get black() {
|
|
5174
|
-
return Y(this,
|
|
5174
|
+
return Y(this, jI, jC).call(this, 0);
|
|
5175
5175
|
}
|
|
5176
5176
|
get bold() {
|
|
5177
|
-
return Y(this,
|
|
5177
|
+
return Y(this, jI, jC).call(this, 1);
|
|
5178
5178
|
}
|
|
5179
5179
|
get disableFontFace() {
|
|
5180
|
-
return Y(this,
|
|
5180
|
+
return Y(this, jI, jC).call(this, 2);
|
|
5181
5181
|
}
|
|
5182
5182
|
get fontExtraProperties() {
|
|
5183
|
-
return Y(this,
|
|
5183
|
+
return Y(this, jI, jC).call(this, 3);
|
|
5184
5184
|
}
|
|
5185
5185
|
get isInvalidPDFjsFont() {
|
|
5186
|
-
return Y(this,
|
|
5186
|
+
return Y(this, jI, jC).call(this, 4);
|
|
5187
5187
|
}
|
|
5188
5188
|
get isType3Font() {
|
|
5189
|
-
return Y(this,
|
|
5189
|
+
return Y(this, jI, jC).call(this, 5);
|
|
5190
5190
|
}
|
|
5191
5191
|
get italic() {
|
|
5192
|
-
return Y(this,
|
|
5192
|
+
return Y(this, jI, jC).call(this, 6);
|
|
5193
5193
|
}
|
|
5194
5194
|
get missingFile() {
|
|
5195
|
-
return Y(this,
|
|
5195
|
+
return Y(this, jI, jC).call(this, 7);
|
|
5196
5196
|
}
|
|
5197
5197
|
get remeasure() {
|
|
5198
|
-
return Y(this,
|
|
5198
|
+
return Y(this, jI, jC).call(this, 8);
|
|
5199
5199
|
}
|
|
5200
5200
|
get vertical() {
|
|
5201
|
-
return Y(this,
|
|
5201
|
+
return Y(this, jI, jC).call(this, 9);
|
|
5202
5202
|
}
|
|
5203
5203
|
get ascent() {
|
|
5204
|
-
return Y(this,
|
|
5204
|
+
return Y(this, jI, Ob).call(this, 0);
|
|
5205
5205
|
}
|
|
5206
5206
|
get defaultWidth() {
|
|
5207
|
-
return Y(this,
|
|
5207
|
+
return Y(this, jI, Ob).call(this, 1);
|
|
5208
5208
|
}
|
|
5209
5209
|
get descent() {
|
|
5210
|
-
return Y(this,
|
|
5210
|
+
return Y(this, jI, Ob).call(this, 2);
|
|
5211
5211
|
}
|
|
5212
5212
|
get bbox() {
|
|
5213
5213
|
let I = l(f, Qd);
|
|
@@ -5240,16 +5240,16 @@ const f = class f {
|
|
|
5240
5240
|
return C;
|
|
5241
5241
|
}
|
|
5242
5242
|
get fallbackName() {
|
|
5243
|
-
return Y(this,
|
|
5243
|
+
return Y(this, jI, Zc).call(this, 0);
|
|
5244
5244
|
}
|
|
5245
5245
|
get loadedName() {
|
|
5246
|
-
return Y(this,
|
|
5246
|
+
return Y(this, jI, Zc).call(this, 1);
|
|
5247
5247
|
}
|
|
5248
5248
|
get mimetype() {
|
|
5249
|
-
return Y(this,
|
|
5249
|
+
return Y(this, jI, Zc).call(this, 2);
|
|
5250
5250
|
}
|
|
5251
5251
|
get name() {
|
|
5252
|
-
return Y(this,
|
|
5252
|
+
return Y(this, jI, Zc).call(this, 3);
|
|
5253
5253
|
}
|
|
5254
5254
|
get data() {
|
|
5255
5255
|
let I = l(f, AC);
|
|
@@ -5350,7 +5350,7 @@ const f = class f {
|
|
|
5350
5350
|
return I.data === void 0 ? (b.setUint32(m, 0), m += 4) : (b.setUint32(m, I.data.length), G.set(I.data, m + 4), m += 4 + I.data.length), CI(m <= c.byteLength, "FontInfo.write: Buffer overflow"), c.transferToFixedLength(m);
|
|
5351
5351
|
}
|
|
5352
5352
|
};
|
|
5353
|
-
jd = new WeakMap(), Qd = new WeakMap(), xd = new WeakMap(), Ud = new WeakMap(), AC = new WeakMap(), aA = new WeakMap(), iG = new WeakMap(), BI = new WeakMap(),
|
|
5353
|
+
jd = new WeakMap(), Qd = new WeakMap(), xd = new WeakMap(), Ud = new WeakMap(), AC = new WeakMap(), aA = new WeakMap(), iG = new WeakMap(), BI = new WeakMap(), jI = new WeakSet(), jC = function(I) {
|
|
5354
5354
|
CI(I < f.bools.length, "Invalid boolean index");
|
|
5355
5355
|
const g = Math.floor(I / 4), C = I * 2 % 8, A = l(this, BI).getUint8(g) >> C & 3;
|
|
5356
5356
|
return A === 0 ? void 0 : A === 2;
|
|
@@ -5511,10 +5511,10 @@ function Hb(s) {
|
|
|
5511
5511
|
throw new Error(`Invalid factory url: "${s}" must include trailing slash.`);
|
|
5512
5512
|
}
|
|
5513
5513
|
const io = (s) => typeof s == "object" && Number.isInteger(s == null ? void 0 : s.num) && s.num >= 0 && Number.isInteger(s == null ? void 0 : s.gen) && s.gen >= 0, ja = (s) => typeof s == "object" && typeof (s == null ? void 0 : s.name) == "string", Qa = na.bind(null, io, ja);
|
|
5514
|
-
var
|
|
5514
|
+
var qA, O0;
|
|
5515
5515
|
class xa {
|
|
5516
5516
|
constructor() {
|
|
5517
|
-
w(this,
|
|
5517
|
+
w(this, qA, /* @__PURE__ */ new Map());
|
|
5518
5518
|
w(this, O0, Promise.resolve());
|
|
5519
5519
|
}
|
|
5520
5520
|
postMessage(I, g) {
|
|
@@ -5524,7 +5524,7 @@ class xa {
|
|
|
5524
5524
|
} : null)
|
|
5525
5525
|
};
|
|
5526
5526
|
l(this, O0).then(() => {
|
|
5527
|
-
for (const [A] of l(this,
|
|
5527
|
+
for (const [A] of l(this, qA))
|
|
5528
5528
|
A.call(this, C);
|
|
5529
5529
|
});
|
|
5530
5530
|
}
|
|
@@ -5541,19 +5541,19 @@ class xa {
|
|
|
5541
5541
|
const Z = () => this.removeEventListener(I, g);
|
|
5542
5542
|
A = () => i.removeEventListener("abort", Z), i.addEventListener("abort", Z);
|
|
5543
5543
|
}
|
|
5544
|
-
l(this,
|
|
5544
|
+
l(this, qA).set(g, A);
|
|
5545
5545
|
}
|
|
5546
5546
|
removeEventListener(I, g) {
|
|
5547
|
-
const C = l(this,
|
|
5548
|
-
C == null || C(), l(this,
|
|
5547
|
+
const C = l(this, qA).get(g);
|
|
5548
|
+
C == null || C(), l(this, qA).delete(g);
|
|
5549
5549
|
}
|
|
5550
5550
|
terminate() {
|
|
5551
|
-
for (const [, I] of l(this,
|
|
5551
|
+
for (const [, I] of l(this, qA))
|
|
5552
5552
|
I == null || I();
|
|
5553
|
-
l(this,
|
|
5553
|
+
l(this, qA).clear();
|
|
5554
5554
|
}
|
|
5555
5555
|
}
|
|
5556
|
-
|
|
5556
|
+
qA = new WeakMap(), O0 = new WeakMap();
|
|
5557
5557
|
const Mb = {
|
|
5558
5558
|
DATA: 1,
|
|
5559
5559
|
ERROR: 2
|
|
@@ -5962,7 +5962,7 @@ class Xh {
|
|
|
5962
5962
|
destroy(I = !1) {
|
|
5963
5963
|
}
|
|
5964
5964
|
}
|
|
5965
|
-
var IZ, Ed,
|
|
5965
|
+
var IZ, Ed, _A, $A, yg, gZ, CZ, J, Ng, sc, Ad, Eb, ld, Rh, Zo, id, cc, Gc, so, bc;
|
|
5966
5966
|
class Oa extends Xh {
|
|
5967
5967
|
constructor({
|
|
5968
5968
|
docId: g,
|
|
@@ -5972,12 +5972,12 @@ class Oa extends Xh {
|
|
|
5972
5972
|
w(this, J);
|
|
5973
5973
|
w(this, IZ);
|
|
5974
5974
|
w(this, Ed);
|
|
5975
|
-
w(this,
|
|
5976
|
-
w(this,
|
|
5975
|
+
w(this, _A);
|
|
5976
|
+
w(this, $A);
|
|
5977
5977
|
w(this, yg);
|
|
5978
5978
|
w(this, gZ);
|
|
5979
5979
|
w(this, CZ, 0);
|
|
5980
|
-
B(this,
|
|
5980
|
+
B(this, $A, g), B(this, yg, C);
|
|
5981
5981
|
}
|
|
5982
5982
|
addFilter(g) {
|
|
5983
5983
|
if (!g)
|
|
@@ -5988,7 +5988,7 @@ class Oa extends Xh {
|
|
|
5988
5988
|
const [A, i, Z] = Y(this, J, Eb).call(this, g), d = g.length === 1 ? A : `${A}${i}${Z}`;
|
|
5989
5989
|
if (C = l(this, J, Ng).get(d), C)
|
|
5990
5990
|
return l(this, J, Ng).set(g, C), C;
|
|
5991
|
-
const c = `g_${l(this,
|
|
5991
|
+
const c = `g_${l(this, $A)}_transfer_map_${qI(this, CZ)._++}`, G = Y(this, J, ld).call(this, c);
|
|
5992
5992
|
l(this, J, Ng).set(g, G), l(this, J, Ng).set(d, G);
|
|
5993
5993
|
const b = Y(this, J, id).call(this, c);
|
|
5994
5994
|
return Y(this, J, Gc).call(this, A, i, Z, b), G;
|
|
@@ -6013,7 +6013,7 @@ class Oa extends Xh {
|
|
|
6013
6013
|
const X = e / 255;
|
|
6014
6014
|
G[e] = X <= 0.03928 ? X / 12.92 : ((X + 0.055) / 1.055) ** 2.4;
|
|
6015
6015
|
}
|
|
6016
|
-
const b = G.join(","), m = `g_${l(this,
|
|
6016
|
+
const b = G.join(","), m = `g_${l(this, $A)}_hcm_filter`, W = Z.filter = Y(this, J, id).call(this, m);
|
|
6017
6017
|
Y(this, J, Gc).call(this, b, b, b, W), Y(this, J, Zo).call(this, W);
|
|
6018
6018
|
const a = (e, X) => {
|
|
6019
6019
|
const N = d[e] / 255, u = c[e] / 255, V = new Array(X + 1);
|
|
@@ -6030,7 +6030,7 @@ class Oa extends Xh {
|
|
|
6030
6030
|
const [A] = Y(this, J, Eb).call(this, [g]), i = `alpha_${A}`;
|
|
6031
6031
|
if (C = l(this, J, Ng).get(i), C)
|
|
6032
6032
|
return l(this, J, Ng).set(g, C), C;
|
|
6033
|
-
const Z = `g_${l(this,
|
|
6033
|
+
const Z = `g_${l(this, $A)}_alpha_map_${qI(this, CZ)._++}`, d = Y(this, J, ld).call(this, Z);
|
|
6034
6034
|
l(this, J, Ng).set(g, d), l(this, J, Ng).set(i, d);
|
|
6035
6035
|
const c = Y(this, J, id).call(this, Z);
|
|
6036
6036
|
return Y(this, J, so).call(this, A, c), d;
|
|
@@ -6042,7 +6042,7 @@ class Oa extends Xh {
|
|
|
6042
6042
|
let A, i;
|
|
6043
6043
|
if (g ? ([A] = Y(this, J, Eb).call(this, [g]), i = `luminosity_${A}`) : i = "luminosity", C = l(this, J, Ng).get(i), C)
|
|
6044
6044
|
return l(this, J, Ng).set(g, C), C;
|
|
6045
|
-
const Z = `g_${l(this,
|
|
6045
|
+
const Z = `g_${l(this, $A)}_luminosity_map_${qI(this, CZ)._++}`, d = Y(this, J, ld).call(this, Z);
|
|
6046
6046
|
l(this, J, Ng).set(g, d), l(this, J, Ng).set(i, d);
|
|
6047
6047
|
const c = Y(this, J, id).call(this, Z);
|
|
6048
6048
|
return Y(this, J, Rh).call(this, c), g && Y(this, J, so).call(this, A, c), d;
|
|
@@ -6072,28 +6072,28 @@ class Oa extends Xh {
|
|
|
6072
6072
|
for (let D = K; D < 256; D++)
|
|
6073
6073
|
t[D] = t[K - 1];
|
|
6074
6074
|
return t.join(",");
|
|
6075
|
-
}, X = `g_${l(this,
|
|
6075
|
+
}, X = `g_${l(this, $A)}_hcm_${g}_filter`, N = c.filter = Y(this, J, id).call(this, X);
|
|
6076
6076
|
return Y(this, J, Zo).call(this, N), Y(this, J, Gc).call(this, e(a[0], n[0], 5), e(a[1], n[1], 5), e(a[2], n[2], 5), N), c.url = Y(this, J, ld).call(this, X), c.url;
|
|
6077
6077
|
}
|
|
6078
6078
|
destroy(g = !1) {
|
|
6079
6079
|
var C, A, i, Z;
|
|
6080
|
-
g && ((C = l(this, gZ)) != null && C.size) || ((A = l(this,
|
|
6080
|
+
g && ((C = l(this, gZ)) != null && C.size) || ((A = l(this, _A)) == null || A.parentNode.parentNode.remove(), B(this, _A, null), (i = l(this, Ed)) == null || i.clear(), B(this, Ed, null), (Z = l(this, gZ)) == null || Z.clear(), B(this, gZ, null), B(this, CZ, 0));
|
|
6081
6081
|
}
|
|
6082
6082
|
}
|
|
6083
|
-
IZ = new WeakMap(), Ed = new WeakMap(),
|
|
6083
|
+
IZ = new WeakMap(), Ed = new WeakMap(), _A = new WeakMap(), $A = new WeakMap(), yg = new WeakMap(), gZ = new WeakMap(), CZ = new WeakMap(), J = new WeakSet(), Ng = function() {
|
|
6084
6084
|
return l(this, Ed) || B(this, Ed, /* @__PURE__ */ new Map());
|
|
6085
6085
|
}, sc = function() {
|
|
6086
6086
|
return l(this, gZ) || B(this, gZ, /* @__PURE__ */ new Map());
|
|
6087
6087
|
}, Ad = function() {
|
|
6088
|
-
if (!l(this,
|
|
6088
|
+
if (!l(this, _A)) {
|
|
6089
6089
|
const g = l(this, yg).createElement("div"), {
|
|
6090
6090
|
style: C
|
|
6091
6091
|
} = g;
|
|
6092
6092
|
C.visibility = "hidden", C.contain = "strict", C.width = C.height = 0, C.position = "absolute", C.top = C.left = 0, C.zIndex = -1;
|
|
6093
|
-
const A = l(this, yg).createElementNS(
|
|
6094
|
-
A.setAttribute("width", 0), A.setAttribute("height", 0), B(this,
|
|
6093
|
+
const A = l(this, yg).createElementNS(FA, "svg");
|
|
6094
|
+
A.setAttribute("width", 0), A.setAttribute("height", 0), B(this, _A, l(this, yg).createElementNS(FA, "defs")), g.append(A), A.append(l(this, _A)), l(this, yg).body.append(g);
|
|
6095
6095
|
}
|
|
6096
|
-
return l(this,
|
|
6096
|
+
return l(this, _A);
|
|
6097
6097
|
}, Eb = function(g) {
|
|
6098
6098
|
if (g.length === 1) {
|
|
6099
6099
|
const G = g[0], b = new Array(256);
|
|
@@ -6114,22 +6114,22 @@ IZ = new WeakMap(), Ed = new WeakMap(), fA = new WeakMap(), qA = new WeakMap(),
|
|
|
6114
6114
|
}
|
|
6115
6115
|
return `url(${l(this, IZ)}#${g})`;
|
|
6116
6116
|
}, Rh = function(g) {
|
|
6117
|
-
const C = l(this, yg).createElementNS(
|
|
6117
|
+
const C = l(this, yg).createElementNS(FA, "feColorMatrix");
|
|
6118
6118
|
C.setAttribute("type", "matrix"), C.setAttribute("values", "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"), g.append(C);
|
|
6119
6119
|
}, Zo = function(g) {
|
|
6120
|
-
const C = l(this, yg).createElementNS(
|
|
6120
|
+
const C = l(this, yg).createElementNS(FA, "feColorMatrix");
|
|
6121
6121
|
C.setAttribute("type", "matrix"), C.setAttribute("values", "0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"), g.append(C);
|
|
6122
6122
|
}, id = function(g) {
|
|
6123
|
-
const C = l(this, yg).createElementNS(
|
|
6123
|
+
const C = l(this, yg).createElementNS(FA, "filter");
|
|
6124
6124
|
return C.setAttribute("color-interpolation-filters", "sRGB"), C.setAttribute("id", g), l(this, J, Ad).append(C), C;
|
|
6125
6125
|
}, cc = function(g, C, A) {
|
|
6126
|
-
const i = l(this, yg).createElementNS(
|
|
6126
|
+
const i = l(this, yg).createElementNS(FA, C);
|
|
6127
6127
|
i.setAttribute("type", "discrete"), i.setAttribute("tableValues", A), g.append(i);
|
|
6128
6128
|
}, Gc = function(g, C, A, i) {
|
|
6129
|
-
const Z = l(this, yg).createElementNS(
|
|
6129
|
+
const Z = l(this, yg).createElementNS(FA, "feComponentTransfer");
|
|
6130
6130
|
i.append(Z), Y(this, J, cc).call(this, Z, "feFuncR", g), Y(this, J, cc).call(this, Z, "feFuncG", C), Y(this, J, cc).call(this, Z, "feFuncB", A);
|
|
6131
6131
|
}, so = function(g, C) {
|
|
6132
|
-
const A = l(this, yg).createElementNS(
|
|
6132
|
+
const A = l(this, yg).createElementNS(FA, "feComponentTransfer");
|
|
6133
6133
|
C.append(A), Y(this, J, cc).call(this, A, "feFuncA", g);
|
|
6134
6134
|
}, bc = function(g) {
|
|
6135
6135
|
return l(this, J, Ad).style.color = g, Nb(getComputedStyle(l(this, J, Ad)).getPropertyValue("color"));
|
|
@@ -6261,7 +6261,7 @@ const Kb = (s, I) => {
|
|
|
6261
6261
|
isRenderingOperation: !1
|
|
6262
6262
|
}, s.set(I, g)), g;
|
|
6263
6263
|
};
|
|
6264
|
-
var Og, vg, AZ, vC, lZ,
|
|
6264
|
+
var Og, vg, AZ, vC, lZ, Il, bI, WI, gl, Eg, WG, fd, iZ, ZZ, Cl, Hg, YA, hG, Go;
|
|
6265
6265
|
class $a {
|
|
6266
6266
|
constructor(I, g, C = !1) {
|
|
6267
6267
|
w(this, hG);
|
|
@@ -6278,16 +6278,16 @@ class $a {
|
|
|
6278
6278
|
w(this, AZ, /* @__PURE__ */ new Map());
|
|
6279
6279
|
w(this, vC, []);
|
|
6280
6280
|
w(this, lZ, []);
|
|
6281
|
-
w(this,
|
|
6281
|
+
w(this, Il, [[1, 0, 0, 1, 0, 0]]);
|
|
6282
6282
|
w(this, bI, [-1 / 0, -1 / 0, 1 / 0, 1 / 0]);
|
|
6283
6283
|
w(this, WI, new Float64Array([1 / 0, 1 / 0, -1 / 0, -1 / 0]));
|
|
6284
|
-
w(this,
|
|
6284
|
+
w(this, gl, -1);
|
|
6285
6285
|
w(this, Eg, /* @__PURE__ */ new Set());
|
|
6286
6286
|
w(this, WG, /* @__PURE__ */ new Map());
|
|
6287
6287
|
w(this, fd, /* @__PURE__ */ new Map());
|
|
6288
6288
|
w(this, iZ);
|
|
6289
6289
|
w(this, ZZ);
|
|
6290
|
-
w(this,
|
|
6290
|
+
w(this, Cl);
|
|
6291
6291
|
w(this, Hg);
|
|
6292
6292
|
w(this, YA);
|
|
6293
6293
|
B(this, iZ, I.width), B(this, ZZ, I.height), Y(this, hG, Go).call(this, g), C && B(this, YA, /* @__PURE__ */ new Map());
|
|
@@ -6345,10 +6345,10 @@ class $a {
|
|
|
6345
6345
|
return g !== void 0 && ((C = Kb(l(this, YA), I)) == null || C.dependencies.add(g), l(this, Hg)[I] = l(this, Hg)[g]), this;
|
|
6346
6346
|
}
|
|
6347
6347
|
pushBaseTransform(I) {
|
|
6348
|
-
return l(this,
|
|
6348
|
+
return l(this, Il).push(F.multiplyByDOMMatrix(l(this, Il).at(-1), I.getTransform())), this;
|
|
6349
6349
|
}
|
|
6350
6350
|
popBaseTransform() {
|
|
6351
|
-
return l(this,
|
|
6351
|
+
return l(this, Il).length > 1 && l(this, Il).pop(), this;
|
|
6352
6352
|
}
|
|
6353
6353
|
recordSimpleData(I, g) {
|
|
6354
6354
|
return l(this, Og)[I] = g, this;
|
|
@@ -6379,10 +6379,10 @@ class $a {
|
|
|
6379
6379
|
return this;
|
|
6380
6380
|
}
|
|
6381
6381
|
resetBBox(I) {
|
|
6382
|
-
return l(this,
|
|
6382
|
+
return l(this, gl) !== I && (B(this, gl, I), l(this, WI)[0] = 1 / 0, l(this, WI)[1] = 1 / 0, l(this, WI)[2] = -1 / 0, l(this, WI)[3] = -1 / 0), this;
|
|
6383
6383
|
}
|
|
6384
6384
|
recordClipBox(I, g, C, A, i, Z) {
|
|
6385
|
-
const d = F.multiplyByDOMMatrix(l(this,
|
|
6385
|
+
const d = F.multiplyByDOMMatrix(l(this, Il).at(-1), g.getTransform()), c = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
6386
6386
|
F.axialAlignedBoundingBox([C, i, A, Z], d, c);
|
|
6387
6387
|
const G = F.intersect(l(this, bI), c);
|
|
6388
6388
|
return G ? (l(this, bI)[0] = G[0], l(this, bI)[1] = G[1], l(this, bI)[2] = G[2], l(this, bI)[3] = G[3]) : (l(this, bI)[0] = l(this, bI)[1] = 1 / 0, l(this, bI)[2] = l(this, bI)[3] = -1 / 0), this;
|
|
@@ -6391,7 +6391,7 @@ class $a {
|
|
|
6391
6391
|
const d = l(this, bI);
|
|
6392
6392
|
if (d[0] === 1 / 0)
|
|
6393
6393
|
return this;
|
|
6394
|
-
const c = F.multiplyByDOMMatrix(l(this,
|
|
6394
|
+
const c = F.multiplyByDOMMatrix(l(this, Il).at(-1), g.getTransform());
|
|
6395
6395
|
if (d[0] === -1 / 0)
|
|
6396
6396
|
return F.axialAlignedBoundingBox([C, i, A, Z], c, l(this, WI)), this;
|
|
6397
6397
|
const G = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
@@ -6429,16 +6429,16 @@ class $a {
|
|
|
6429
6429
|
} = C;
|
|
6430
6430
|
l(this, Eg).forEach(A.add, A), l(this, vC).forEach(A.add, A), l(this, lZ).forEach(A.add, A), A.delete(I), C.isRenderingOperation = !0;
|
|
6431
6431
|
}
|
|
6432
|
-
if (l(this,
|
|
6432
|
+
if (l(this, gl) === I) {
|
|
6433
6433
|
const C = lW(l(this, WI)[0] * 256 / l(this, iZ)), A = lW(l(this, WI)[1] * 256 / l(this, ZZ)), i = iW(l(this, WI)[2] * 256 / l(this, iZ)), Z = iW(l(this, WI)[3] * 256 / l(this, ZZ));
|
|
6434
|
-
Db(l(this,
|
|
6434
|
+
Db(l(this, Cl), I, C, A, i, Z);
|
|
6435
6435
|
for (const d of l(this, Eg))
|
|
6436
|
-
d !== I && Db(l(this,
|
|
6436
|
+
d !== I && Db(l(this, Cl), d, C, A, i, Z);
|
|
6437
6437
|
for (const d of l(this, vC))
|
|
6438
|
-
d !== I && Db(l(this,
|
|
6438
|
+
d !== I && Db(l(this, Cl), d, C, A, i, Z);
|
|
6439
6439
|
for (const d of l(this, lZ))
|
|
6440
|
-
d !== I && Db(l(this,
|
|
6441
|
-
g || (l(this, Eg).clear(), B(this,
|
|
6440
|
+
d !== I && Db(l(this, Cl), d, C, A, i, Z);
|
|
6441
|
+
g || (l(this, Eg).clear(), B(this, gl, -1));
|
|
6442
6442
|
}
|
|
6443
6443
|
return this;
|
|
6444
6444
|
}
|
|
@@ -6450,7 +6450,7 @@ class $a {
|
|
|
6450
6450
|
return this;
|
|
6451
6451
|
}
|
|
6452
6452
|
bboxToClipBoxDropOperation(I, g = !1) {
|
|
6453
|
-
return l(this,
|
|
6453
|
+
return l(this, gl) === I && (B(this, gl, -1), l(this, bI)[0] = Math.max(l(this, bI)[0], l(this, WI)[0]), l(this, bI)[1] = Math.max(l(this, bI)[1], l(this, WI)[1]), l(this, bI)[2] = Math.min(l(this, bI)[2], l(this, WI)[2]), l(this, bI)[3] = Math.min(l(this, bI)[3], l(this, WI)[3]), g || l(this, Eg).clear()), this;
|
|
6454
6454
|
}
|
|
6455
6455
|
_takePendingDependencies() {
|
|
6456
6456
|
const I = l(this, Eg);
|
|
@@ -6465,42 +6465,42 @@ class $a {
|
|
|
6465
6465
|
l(this, Eg).add(g);
|
|
6466
6466
|
}
|
|
6467
6467
|
take() {
|
|
6468
|
-
return l(this, fd).clear(), new _a(l(this, Hg), l(this,
|
|
6468
|
+
return l(this, fd).clear(), new _a(l(this, Hg), l(this, Cl));
|
|
6469
6469
|
}
|
|
6470
6470
|
takeDebugMetadata() {
|
|
6471
6471
|
return l(this, YA);
|
|
6472
6472
|
}
|
|
6473
6473
|
}
|
|
6474
|
-
Og = new WeakMap(), vg = new WeakMap(), AZ = new WeakMap(), vC = new WeakMap(), lZ = new WeakMap(),
|
|
6474
|
+
Og = new WeakMap(), vg = new WeakMap(), AZ = new WeakMap(), vC = new WeakMap(), lZ = new WeakMap(), Il = new WeakMap(), bI = new WeakMap(), WI = new WeakMap(), gl = new WeakMap(), Eg = new WeakMap(), WG = new WeakMap(), fd = new WeakMap(), iZ = new WeakMap(), ZZ = new WeakMap(), Cl = new WeakMap(), Hg = new WeakMap(), YA = new WeakMap(), hG = new WeakSet(), Go = function(I, g) {
|
|
6475
6475
|
const C = new ArrayBuffer(I * 4);
|
|
6476
|
-
B(this,
|
|
6476
|
+
B(this, Cl, new Uint8ClampedArray(C)), B(this, Hg, new Uint32Array(C)), g && g.length > 0 ? (l(this, Hg).set(g), l(this, Hg).fill(co, g.length)) : l(this, Hg).fill(co);
|
|
6477
6477
|
};
|
|
6478
|
-
var tI,
|
|
6478
|
+
var tI, LI, EC, qd, _d;
|
|
6479
6479
|
const TB = class TB {
|
|
6480
6480
|
constructor(I, g, C) {
|
|
6481
6481
|
w(this, tI);
|
|
6482
|
-
w(this,
|
|
6482
|
+
w(this, LI);
|
|
6483
6483
|
w(this, EC);
|
|
6484
6484
|
w(this, qd, 0);
|
|
6485
6485
|
w(this, _d, 0);
|
|
6486
6486
|
if (I instanceof TB && l(I, EC) === !!C)
|
|
6487
6487
|
return I;
|
|
6488
|
-
B(this, tI, I), B(this,
|
|
6488
|
+
B(this, tI, I), B(this, LI, g), B(this, EC, !!C);
|
|
6489
6489
|
}
|
|
6490
6490
|
growOperationsCount() {
|
|
6491
6491
|
throw new Error("Unreachable");
|
|
6492
6492
|
}
|
|
6493
6493
|
save(I) {
|
|
6494
|
-
return qI(this, _d)._++, l(this, tI).save(l(this,
|
|
6494
|
+
return qI(this, _d)._++, l(this, tI).save(l(this, LI)), this;
|
|
6495
6495
|
}
|
|
6496
6496
|
restore(I) {
|
|
6497
|
-
return l(this, _d) > 0 && (l(this, tI).restore(l(this,
|
|
6497
|
+
return l(this, _d) > 0 && (l(this, tI).restore(l(this, LI)), qI(this, _d)._--), this;
|
|
6498
6498
|
}
|
|
6499
6499
|
recordOpenMarker(I) {
|
|
6500
6500
|
return qI(this, qd)._++, this;
|
|
6501
6501
|
}
|
|
6502
6502
|
getOpenMarker() {
|
|
6503
|
-
return l(this, qd) > 0 ? l(this,
|
|
6503
|
+
return l(this, qd) > 0 ? l(this, LI) : l(this, tI).getOpenMarker();
|
|
6504
6504
|
}
|
|
6505
6505
|
recordCloseMarker(I) {
|
|
6506
6506
|
return qI(this, qd)._--, this;
|
|
@@ -6518,22 +6518,22 @@ const TB = class TB {
|
|
|
6518
6518
|
return l(this, tI).popBaseTransform(), this;
|
|
6519
6519
|
}
|
|
6520
6520
|
recordSimpleData(I, g) {
|
|
6521
|
-
return l(this, tI).recordSimpleData(I, l(this,
|
|
6521
|
+
return l(this, tI).recordSimpleData(I, l(this, LI)), this;
|
|
6522
6522
|
}
|
|
6523
6523
|
recordIncrementalData(I, g) {
|
|
6524
|
-
return l(this, tI).recordIncrementalData(I, l(this,
|
|
6524
|
+
return l(this, tI).recordIncrementalData(I, l(this, LI)), this;
|
|
6525
6525
|
}
|
|
6526
6526
|
resetIncrementalData(I, g) {
|
|
6527
|
-
return l(this, tI).resetIncrementalData(I, l(this,
|
|
6527
|
+
return l(this, tI).resetIncrementalData(I, l(this, LI)), this;
|
|
6528
6528
|
}
|
|
6529
6529
|
recordNamedData(I, g) {
|
|
6530
6530
|
return this;
|
|
6531
6531
|
}
|
|
6532
6532
|
recordSimpleDataFromNamed(I, g, C) {
|
|
6533
|
-
return l(this, tI).recordSimpleDataFromNamed(I, g, l(this,
|
|
6533
|
+
return l(this, tI).recordSimpleDataFromNamed(I, g, l(this, LI)), this;
|
|
6534
6534
|
}
|
|
6535
6535
|
recordFutureForcedDependency(I, g) {
|
|
6536
|
-
return l(this, tI).recordFutureForcedDependency(I, l(this,
|
|
6536
|
+
return l(this, tI).recordFutureForcedDependency(I, l(this, LI)), this;
|
|
6537
6537
|
}
|
|
6538
6538
|
inheritSimpleDataAsFutureForcedDependencies(I) {
|
|
6539
6539
|
return l(this, tI).inheritSimpleDataAsFutureForcedDependencies(I), this;
|
|
@@ -6542,37 +6542,37 @@ const TB = class TB {
|
|
|
6542
6542
|
return l(this, tI).inheritPendingDependenciesAsFutureForcedDependencies(), this;
|
|
6543
6543
|
}
|
|
6544
6544
|
resetBBox(I) {
|
|
6545
|
-
return l(this, EC) || l(this, tI).resetBBox(l(this,
|
|
6545
|
+
return l(this, EC) || l(this, tI).resetBBox(l(this, LI)), this;
|
|
6546
6546
|
}
|
|
6547
6547
|
recordClipBox(I, g, C, A, i, Z) {
|
|
6548
|
-
return l(this, EC) || l(this, tI).recordClipBox(l(this,
|
|
6548
|
+
return l(this, EC) || l(this, tI).recordClipBox(l(this, LI), g, C, A, i, Z), this;
|
|
6549
6549
|
}
|
|
6550
6550
|
recordBBox(I, g, C, A, i, Z) {
|
|
6551
|
-
return l(this, EC) || l(this, tI).recordBBox(l(this,
|
|
6551
|
+
return l(this, EC) || l(this, tI).recordBBox(l(this, LI), g, C, A, i, Z), this;
|
|
6552
6552
|
}
|
|
6553
6553
|
recordCharacterBBox(I, g, C, A, i, Z, d) {
|
|
6554
|
-
return l(this, EC) || l(this, tI).recordCharacterBBox(l(this,
|
|
6554
|
+
return l(this, EC) || l(this, tI).recordCharacterBBox(l(this, LI), g, C, A, i, Z, d), this;
|
|
6555
6555
|
}
|
|
6556
6556
|
recordFullPageBBox(I) {
|
|
6557
|
-
return l(this, EC) || l(this, tI).recordFullPageBBox(l(this,
|
|
6557
|
+
return l(this, EC) || l(this, tI).recordFullPageBBox(l(this, LI)), this;
|
|
6558
6558
|
}
|
|
6559
6559
|
getSimpleIndex(I) {
|
|
6560
6560
|
return l(this, tI).getSimpleIndex(I);
|
|
6561
6561
|
}
|
|
6562
6562
|
recordDependencies(I, g) {
|
|
6563
|
-
return l(this, tI).recordDependencies(l(this,
|
|
6563
|
+
return l(this, tI).recordDependencies(l(this, LI), g), this;
|
|
6564
6564
|
}
|
|
6565
6565
|
recordNamedDependency(I, g) {
|
|
6566
|
-
return l(this, tI).recordNamedDependency(l(this,
|
|
6566
|
+
return l(this, tI).recordNamedDependency(l(this, LI), g), this;
|
|
6567
6567
|
}
|
|
6568
6568
|
recordOperation(I) {
|
|
6569
|
-
return l(this, tI).recordOperation(l(this,
|
|
6569
|
+
return l(this, tI).recordOperation(l(this, LI), !0), this;
|
|
6570
6570
|
}
|
|
6571
6571
|
recordShowTextOperation(I) {
|
|
6572
|
-
return l(this, tI).recordShowTextOperation(l(this,
|
|
6572
|
+
return l(this, tI).recordShowTextOperation(l(this, LI), !0), this;
|
|
6573
6573
|
}
|
|
6574
6574
|
bboxToClipBoxDropOperation(I) {
|
|
6575
|
-
return l(this, EC) || l(this, tI).bboxToClipBoxDropOperation(l(this,
|
|
6575
|
+
return l(this, EC) || l(this, tI).bboxToClipBoxDropOperation(l(this, LI), !0), this;
|
|
6576
6576
|
}
|
|
6577
6577
|
take() {
|
|
6578
6578
|
throw new Error("Unreachable");
|
|
@@ -6581,7 +6581,7 @@ const TB = class TB {
|
|
|
6581
6581
|
throw new Error("Unreachable");
|
|
6582
6582
|
}
|
|
6583
6583
|
};
|
|
6584
|
-
tI = new WeakMap(),
|
|
6584
|
+
tI = new WeakMap(), LI = new WeakMap(), EC = new WeakMap(), qd = new WeakMap(), _d = new WeakMap();
|
|
6585
6585
|
let N0 = TB;
|
|
6586
6586
|
const NC = {
|
|
6587
6587
|
stroke: ["path", "transform", "filter", "strokeColor", "strokeAlpha", "lineWidth", "lineCap", "lineJoin", "miterLimit", "dash"],
|
|
@@ -6670,18 +6670,18 @@ function Vm(s, I, g, C, A, i, Z, d) {
|
|
|
6670
6670
|
let r, U, j, Q, iI, Dg, ng, jg;
|
|
6671
6671
|
for (let aI = k; aI <= T; aI++) {
|
|
6672
6672
|
if (aI < X) {
|
|
6673
|
-
const
|
|
6674
|
-
r = a - (a - e) *
|
|
6673
|
+
const zI = aI < n ? 0 : (n - aI) / (n - X);
|
|
6674
|
+
r = a - (a - e) * zI, U = V - (V - t) * zI, j = o - (o - R) * zI, Q = h - (h - y) * zI;
|
|
6675
6675
|
} else {
|
|
6676
|
-
let
|
|
6677
|
-
aI > u ?
|
|
6676
|
+
let zI;
|
|
6677
|
+
aI > u ? zI = 1 : X === u ? zI = 0 : zI = (X - aI) / (X - u), r = e - (e - N) * zI, U = t - (t - H) * zI, j = R - (R - K) * zI, Q = y - (y - D) * zI;
|
|
6678
6678
|
}
|
|
6679
6679
|
let VI;
|
|
6680
6680
|
aI < n ? VI = 0 : aI > u ? VI = 1 : VI = (n - aI) / (n - u), iI = a - (a - N) * VI, Dg = V - (V - H) * VI, ng = o - (o - K) * VI, jg = h - (h - D) * VI;
|
|
6681
6681
|
const rC = Math.round(Math.min(r, iI)), KI = Math.round(Math.max(r, iI));
|
|
6682
6682
|
let Vg = m * aI + rC * 4;
|
|
6683
|
-
for (let
|
|
6684
|
-
VI = (r -
|
|
6683
|
+
for (let zI = rC; zI <= KI; zI++)
|
|
6684
|
+
VI = (r - zI) / (r - iI), VI < 0 ? VI = 0 : VI > 1 && (VI = 1), b[Vg++] = U - (U - Dg) * VI | 0, b[Vg++] = j - (j - ng) * VI | 0, b[Vg++] = Q - (Q - jg) * VI | 0, b[Vg++] = 255;
|
|
6685
6685
|
}
|
|
6686
6686
|
}
|
|
6687
6687
|
function gY(s, I, g) {
|
|
@@ -6800,10 +6800,10 @@ const ZW = {
|
|
|
6800
6800
|
if (iI.groupLevel = I.groupLevel, this.setFillAndStrokeStyleToContext(iI, i, d), Q.translate(-r.scale * m, -U.scale * W), iI.transform(0, r.scale, 0, 0, U.scale, 0, 0), Q.save(), (Dg = iI.dependencyTracker) == null || Dg.save(), this.clipBbox(iI, m, W, a, n), iI.baseTransform = SI(iI.ctx), iI.executeOperatorList(A), iI.endDrawing(), (ng = iI.dependencyTracker) == null || ng.restore(), Q.restore(), y || H) {
|
|
6801
6801
|
const jg = j.canvas;
|
|
6802
6802
|
y && (t = G), H && (R = b);
|
|
6803
|
-
const aI = this.getSizeAndScale(t, this.ctx.canvas.width, o), VI = this.getSizeAndScale(R, this.ctx.canvas.height, h), rC = aI.size, KI = VI.size, Vg = I.cachedCanvases.getCanvas("pattern-workaround", rC, KI),
|
|
6803
|
+
const aI = this.getSizeAndScale(t, this.ctx.canvas.width, o), VI = this.getSizeAndScale(R, this.ctx.canvas.height, h), rC = aI.size, KI = VI.size, Vg = I.cachedCanvases.getCanvas("pattern-workaround", rC, KI), zI = Vg.context, Wm = y ? Math.floor(e / G) : 0, hm = H ? Math.floor(X / b) : 0;
|
|
6804
6804
|
for (let vs = 0; vs <= Wm; vs++)
|
|
6805
6805
|
for (let Vi = 0; Vi <= hm; Vi++)
|
|
6806
|
-
|
|
6806
|
+
zI.drawImage(jg, rC * vs, KI * Vi, rC, KI, 0, 0, rC, KI);
|
|
6807
6807
|
return {
|
|
6808
6808
|
canvas: Vg.canvas,
|
|
6809
6809
|
scaleX: aI.scale,
|
|
@@ -7096,7 +7096,7 @@ function oW(s, I) {
|
|
|
7096
7096
|
if (I)
|
|
7097
7097
|
return !0;
|
|
7098
7098
|
F.singularValueDecompose2dScale(s, tC);
|
|
7099
|
-
const g = Math.fround(
|
|
7099
|
+
const g = Math.fround(pA.pixelRatio * ti.PDF_TO_CSS_UNITS);
|
|
7100
7100
|
return tC[0] <= g && tC[1] <= g;
|
|
7101
7101
|
}
|
|
7102
7102
|
const cY = ["butt", "round", "square"], GY = ["miter", "round", "bevel"], bY = {}, BW = {};
|
|
@@ -7617,8 +7617,8 @@ const rB = class rB {
|
|
|
7617
7617
|
const Q = (U.isSpace ? G : 0) + c, iI = U.fontChar, Dg = U.accent;
|
|
7618
7618
|
let ng, jg, aI = U.width;
|
|
7619
7619
|
if (a) {
|
|
7620
|
-
const KI = U.vmetric || e, Vg = -(U.vmetric ? KI[1] : aI * 0.5) * X,
|
|
7621
|
-
aI = KI ? -KI[0] : aI, ng = Vg / d, jg = (H +
|
|
7620
|
+
const KI = U.vmetric || e, Vg = -(U.vmetric ? KI[1] : aI * 0.5) * X, zI = KI[2] * X;
|
|
7621
|
+
aI = KI ? -KI[0] : aI, ng = Vg / d, jg = (H + zI) / d;
|
|
7622
7622
|
} else
|
|
7623
7623
|
ng = H / d, jg = 0;
|
|
7624
7624
|
let VI;
|
|
@@ -9257,7 +9257,7 @@ lC = new WeakMap(), NG = new WeakSet(), wo = function(I) {
|
|
|
9257
9257
|
});
|
|
9258
9258
|
};
|
|
9259
9259
|
const KY = 1e5, WW = 30;
|
|
9260
|
-
var MW, fl, iC, XG, RG, dZ,
|
|
9260
|
+
var MW, fl, iC, XG, RG, dZ, Al, uG, yG, sZ, HG, As, ql, ls, MG, is, cZ, DG, KG, Zs, GZ, pG, ds, ss, Rl, Jh, zh, ao, nC, Pb, Yo, kh, Lh;
|
|
9261
9261
|
const mg = class mg {
|
|
9262
9262
|
constructor({
|
|
9263
9263
|
textContentSource: I,
|
|
@@ -9270,7 +9270,7 @@ const mg = class mg {
|
|
|
9270
9270
|
w(this, XG, !1);
|
|
9271
9271
|
w(this, RG, !!((MW = globalThis.FontInspector) != null && MW.enabled));
|
|
9272
9272
|
w(this, dZ, null);
|
|
9273
|
-
w(this,
|
|
9273
|
+
w(this, Al, null);
|
|
9274
9274
|
w(this, uG, 0);
|
|
9275
9275
|
w(this, yG, 0);
|
|
9276
9276
|
w(this, sZ, null);
|
|
@@ -9294,7 +9294,7 @@ const mg = class mg {
|
|
|
9294
9294
|
}));
|
|
9295
9295
|
else
|
|
9296
9296
|
throw new Error('No "textContentSource" parameter specified.');
|
|
9297
|
-
B(this, iC, B(this, HG, g)), B(this, ql, C.scale *
|
|
9297
|
+
B(this, iC, B(this, HG, g)), B(this, ql, C.scale * pA.pixelRatio), B(this, As, C.rotation), B(this, Al, {
|
|
9298
9298
|
div: null,
|
|
9299
9299
|
properties: null,
|
|
9300
9300
|
ctx: null
|
|
@@ -9306,7 +9306,7 @@ const mg = class mg {
|
|
|
9306
9306
|
pageY: d
|
|
9307
9307
|
} = C.rawDims;
|
|
9308
9308
|
B(this, KG, [1, 0, 0, -1, -Z, d + i]), B(this, yG, A), B(this, uG, i), Y(c = mg, nC, kh).call(c), g.style.setProperty("--min-font-size", l(mg, ds)), vZ(g, C), l(this, fl).promise.finally(() => {
|
|
9309
|
-
l(mg, ss).delete(this), B(this,
|
|
9309
|
+
l(mg, ss).delete(this), B(this, Al, null), B(this, ls, null);
|
|
9310
9310
|
}).catch(() => {
|
|
9311
9311
|
});
|
|
9312
9312
|
}
|
|
@@ -9337,7 +9337,7 @@ const mg = class mg {
|
|
|
9337
9337
|
onBefore: g = null
|
|
9338
9338
|
}) {
|
|
9339
9339
|
var i;
|
|
9340
|
-
const C = I.scale *
|
|
9340
|
+
const C = I.scale * pA.pixelRatio, A = I.rotation;
|
|
9341
9341
|
if (A !== l(this, As) && (g == null || g(), B(this, As, A), vZ(l(this, HG), {
|
|
9342
9342
|
rotation: A
|
|
9343
9343
|
})), C !== l(this, ql)) {
|
|
@@ -9374,11 +9374,11 @@ const mg = class mg {
|
|
|
9374
9374
|
}
|
|
9375
9375
|
}
|
|
9376
9376
|
};
|
|
9377
|
-
fl = new WeakMap(), iC = new WeakMap(), XG = new WeakMap(), RG = new WeakMap(), dZ = new WeakMap(),
|
|
9377
|
+
fl = new WeakMap(), iC = new WeakMap(), XG = new WeakMap(), RG = new WeakMap(), dZ = new WeakMap(), Al = new WeakMap(), uG = new WeakMap(), yG = new WeakMap(), sZ = new WeakMap(), HG = new WeakMap(), As = new WeakMap(), ql = new WeakMap(), ls = new WeakMap(), MG = new WeakMap(), is = new WeakMap(), cZ = new WeakMap(), DG = new WeakMap(), KG = new WeakMap(), Zs = new WeakMap(), GZ = new WeakMap(), pG = new WeakMap(), ds = new WeakMap(), ss = new WeakMap(), Rl = new WeakSet(), Jh = function(I) {
|
|
9378
9378
|
var A, i;
|
|
9379
9379
|
if (l(this, XG))
|
|
9380
9380
|
return;
|
|
9381
|
-
(i = l(this,
|
|
9381
|
+
(i = l(this, Al)).ctx ?? (i.ctx = Y(A = mg, nC, Pb).call(A, l(this, dZ)));
|
|
9382
9382
|
const g = l(this, cZ), C = l(this, MG);
|
|
9383
9383
|
for (const Z of I) {
|
|
9384
9384
|
if (g.length > KY) {
|
|
@@ -9422,7 +9422,7 @@ fl = new WeakMap(), iC = new WeakMap(), XG = new WeakMap(), RG = new WeakMap(),
|
|
|
9422
9422
|
const e = Math.abs(I.transform[0]), X = Math.abs(I.transform[3]);
|
|
9423
9423
|
e !== X && Math.max(e, X) / Math.min(e, X) > 1.5 && (a = !0);
|
|
9424
9424
|
}
|
|
9425
|
-
if (a && (C.canvasWidth = Z.vertical ? I.height : I.width), l(this, DG).set(g, C), l(this,
|
|
9425
|
+
if (a && (C.canvasWidth = Z.vertical ? I.height : I.width), l(this, DG).set(g, C), l(this, Al).div = g, l(this, Al).properties = C, Y(this, Rl, ao).call(this, l(this, Al)), C.hasText && l(this, iC).append(g), C.hasEOL) {
|
|
9426
9426
|
const e = document.createElement("br");
|
|
9427
9427
|
e.setAttribute("role", "presentation"), l(this, iC).append(e);
|
|
9428
9428
|
}
|
|
@@ -9495,7 +9495,7 @@ function Th(s = {}) {
|
|
|
9495
9495
|
let b = s.worker instanceof Rc ? s.worker : null;
|
|
9496
9496
|
const m = s.verbosity, W = typeof s.docBaseUrl == "string" && !sm(s.docBaseUrl) ? s.docBaseUrl : null, a = Hb(s.cMapUrl), n = s.cMapPacked !== !1, e = s.CMapReaderFactory || (zg ? Pa : gW), X = Hb(s.iccUrl), N = Hb(s.standardFontDataUrl), u = s.StandardFontDataFactory || (zg ? fa : CW), V = Hb(s.wasmUrl), o = s.WasmFactory || (zg ? qa : AW), h = s.stopAtErrors !== !0, t = Number.isInteger(s.maxImageSize) && s.maxImageSize > -1 ? s.maxImageSize : -1, R = s.isEvalSupported !== !1, y = typeof s.isOffscreenCanvasSupported == "boolean" ? s.isOffscreenCanvasSupported : !zg, H = typeof s.isImageDecoderSupported == "boolean" ? s.isImageDecoderSupported : !zg && (lg.platform.isFirefox || !globalThis.chrome), K = Number.isInteger(s.canvasMaxAreaInBytes) ? s.canvasMaxAreaInBytes : -1, D = typeof s.disableFontFace == "boolean" ? s.disableFontFace : zg, k = s.fontExtraProperties === !0, T = s.enableXfa === !0, r = s.ownerDocument || globalThis.document, U = s.disableRange === !0, j = s.disableStream === !0, Q = s.disableAutoFetch === !0, iI = s.pdfBug === !0, Dg = s.CanvasFactory || (zg ? Ea : Ua), ng = s.FilterFactory || (zg ? va : Oa), jg = s.enableHWA === !0, aI = s.useWasm !== !1, VI = c ? c.length : s.length ?? NaN, rC = typeof s.useSystemFonts == "boolean" ? s.useSystemFonts : !zg && !D, KI = typeof s.useWorkerFetch == "boolean" ? s.useWorkerFetch : !!(e === gW && u === CW && o === AW && a && N && V && $s(a, document.baseURI) && $s(N, document.baseURI) && $s(V, document.baseURI)), Vg = null;
|
|
9497
9497
|
oa(m);
|
|
9498
|
-
const
|
|
9498
|
+
const zI = {
|
|
9499
9499
|
canvasFactory: new Dg({
|
|
9500
9500
|
ownerDocument: r,
|
|
9501
9501
|
enableHWA: jg
|
|
@@ -9586,7 +9586,7 @@ function Th(s = {}) {
|
|
|
9586
9586
|
throw new Error("Loading aborted");
|
|
9587
9587
|
if (b.destroyed)
|
|
9588
9588
|
throw new Error("Worker was destroyed");
|
|
9589
|
-
const xB = new dc(g, wm, b.port), sa = new JY(xB, I, Vi, hm,
|
|
9589
|
+
const xB = new dc(g, wm, b.port), sa = new JY(xB, I, Vi, hm, zI, jg);
|
|
9590
9590
|
I._transport = sa, xB.send("Ready", null);
|
|
9591
9591
|
});
|
|
9592
9592
|
}).catch(I._capability.reject), I;
|
|
@@ -9793,11 +9793,11 @@ class SY {
|
|
|
9793
9793
|
return this._transport.getCalculationOrderIds();
|
|
9794
9794
|
}
|
|
9795
9795
|
}
|
|
9796
|
-
var
|
|
9796
|
+
var ll, mZ, mc;
|
|
9797
9797
|
class FY {
|
|
9798
9798
|
constructor(I, g, C, A = !1) {
|
|
9799
9799
|
w(this, mZ);
|
|
9800
|
-
w(this,
|
|
9800
|
+
w(this, ll, !1);
|
|
9801
9801
|
this._pageIndex = I, this._pageInfo = g, this._transport = C, this._stats = A ? new EB() : null, this._pdfBug = A, this.commonObjs = C.commonObjs, this.objs = new Fh(), this._intentStates = /* @__PURE__ */ new Map(), this.destroyed = !1, this.recordedBBoxes = null;
|
|
9802
9802
|
}
|
|
9803
9803
|
get pageNumber() {
|
|
@@ -9875,7 +9875,7 @@ class FY {
|
|
|
9875
9875
|
renderingIntent: X,
|
|
9876
9876
|
cacheKey: N
|
|
9877
9877
|
} = e;
|
|
9878
|
-
B(this,
|
|
9878
|
+
B(this, ll, !1), c || (c = this._transport.getOptionalContentConfig(X));
|
|
9879
9879
|
let u = this._intentStates.get(N);
|
|
9880
9880
|
u || (u = /* @__PURE__ */ Object.create(null), this._intentStates.set(N, u)), u.streamReaderCancelTimeout && (clearTimeout(u.streamReaderCancelTimeout), u.streamReaderCancelTimeout = null);
|
|
9881
9881
|
const V = !!(X & YC.PRINT);
|
|
@@ -9891,7 +9891,7 @@ class FY {
|
|
|
9891
9891
|
const U = (T = R.gfx) == null ? void 0 : T.dependencyTracker.take();
|
|
9892
9892
|
U && (R.stepper && R.stepper.setOperatorBBoxes(U, R.gfx.dependencyTracker.takeDebugMetadata()), a && (this.recordedBBoxes = U));
|
|
9893
9893
|
}
|
|
9894
|
-
V && B(this,
|
|
9894
|
+
V && B(this, ll, !0), Y(this, mZ, mc).call(this), k ? (R.capability.reject(k), this._abortOperatorList({
|
|
9895
9895
|
intentState: u,
|
|
9896
9896
|
reason: k instanceof Error ? k : new Error(k)
|
|
9897
9897
|
})) : R.capability.resolve(), this._stats && (this._stats.timeEnd("Rendering"), this._stats.timeEnd("Overall"), (r = globalThis.Stats) != null && r.enabled && globalThis.Stats.add(this.pageNumber, this._stats));
|
|
@@ -10009,10 +10009,10 @@ class FY {
|
|
|
10009
10009
|
}), !g.opListReadCapability)
|
|
10010
10010
|
for (const C of g.renderTasks)
|
|
10011
10011
|
I.push(C.completed), C.cancel();
|
|
10012
|
-
return this.objs.clear(), B(this,
|
|
10012
|
+
return this.objs.clear(), B(this, ll, !1), Promise.all(I);
|
|
10013
10013
|
}
|
|
10014
10014
|
cleanup(I = !1) {
|
|
10015
|
-
B(this,
|
|
10015
|
+
B(this, ll, !0);
|
|
10016
10016
|
const g = Y(this, mZ, mc).call(this);
|
|
10017
10017
|
return I && g && this._stats && (this._stats = new EB()), g;
|
|
10018
10018
|
}
|
|
@@ -10111,8 +10111,8 @@ class FY {
|
|
|
10111
10111
|
return this._stats;
|
|
10112
10112
|
}
|
|
10113
10113
|
}
|
|
10114
|
-
|
|
10115
|
-
if (!l(this,
|
|
10114
|
+
ll = new WeakMap(), mZ = new WeakSet(), mc = function() {
|
|
10115
|
+
if (!l(this, ll) || this.destroyed)
|
|
10116
10116
|
return !1;
|
|
10117
10117
|
for (const {
|
|
10118
10118
|
renderTasks: I,
|
|
@@ -10120,9 +10120,9 @@ Cl = new WeakMap(), mZ = new WeakSet(), mc = function() {
|
|
|
10120
10120
|
} of this._intentStates.values())
|
|
10121
10121
|
if (I.size > 0 || !g.lastChunk)
|
|
10122
10122
|
return !1;
|
|
10123
|
-
return this._intentStates.clear(), this.objs.clear(), B(this,
|
|
10123
|
+
return this._intentStates.clear(), this.objs.clear(), B(this, ll, !1), !0;
|
|
10124
10124
|
};
|
|
10125
|
-
var _l, PC,
|
|
10125
|
+
var _l, PC, il, oZ, f0, BZ, WZ, Lg, fb, jh, Qh, oc, cs, qb;
|
|
10126
10126
|
const yI = class yI {
|
|
10127
10127
|
constructor({
|
|
10128
10128
|
name: I = null,
|
|
@@ -10132,7 +10132,7 @@ const yI = class yI {
|
|
|
10132
10132
|
w(this, Lg);
|
|
10133
10133
|
w(this, _l, Promise.withResolvers());
|
|
10134
10134
|
w(this, PC, null);
|
|
10135
|
-
w(this,
|
|
10135
|
+
w(this, il, null);
|
|
10136
10136
|
w(this, oZ, null);
|
|
10137
10137
|
if (this.name = I, this.destroyed = !1, this.verbosity = C, g) {
|
|
10138
10138
|
if (l(yI, WZ).has(g))
|
|
@@ -10145,14 +10145,14 @@ const yI = class yI {
|
|
|
10145
10145
|
return l(this, _l).promise;
|
|
10146
10146
|
}
|
|
10147
10147
|
get port() {
|
|
10148
|
-
return l(this,
|
|
10148
|
+
return l(this, il);
|
|
10149
10149
|
}
|
|
10150
10150
|
get messageHandler() {
|
|
10151
10151
|
return l(this, PC);
|
|
10152
10152
|
}
|
|
10153
10153
|
destroy() {
|
|
10154
10154
|
var I, g;
|
|
10155
|
-
this.destroyed = !0, (I = l(this, oZ)) == null || I.terminate(), B(this, oZ, null), l(yI, WZ).delete(l(this,
|
|
10155
|
+
this.destroyed = !0, (I = l(this, oZ)) == null || I.terminate(), B(this, oZ, null), l(yI, WZ).delete(l(this, il)), B(this, il, null), (g = l(this, PC)) == null || g.destroy(), B(this, PC, null);
|
|
10156
10156
|
}
|
|
10157
10157
|
static create(I) {
|
|
10158
10158
|
const g = l(this, WZ).get(I == null ? void 0 : I.port);
|
|
@@ -10176,12 +10176,12 @@ const yI = class yI {
|
|
|
10176
10176
|
)).WorkerMessageHandler)());
|
|
10177
10177
|
}
|
|
10178
10178
|
};
|
|
10179
|
-
_l = new WeakMap(), PC = new WeakMap(),
|
|
10179
|
+
_l = new WeakMap(), PC = new WeakMap(), il = new WeakMap(), oZ = new WeakMap(), f0 = new WeakMap(), BZ = new WeakMap(), WZ = new WeakMap(), Lg = new WeakSet(), fb = function() {
|
|
10180
10180
|
l(this, _l).resolve(), l(this, PC).send("configure", {
|
|
10181
10181
|
verbosity: this.verbosity
|
|
10182
10182
|
});
|
|
10183
10183
|
}, jh = function(I) {
|
|
10184
|
-
B(this,
|
|
10184
|
+
B(this, il, I), B(this, PC, new dc("main", "worker", I)), l(this, PC).on("ready", () => {
|
|
10185
10185
|
}), Y(this, Lg, fb).call(this);
|
|
10186
10186
|
}, Qh = function() {
|
|
10187
10187
|
if (l(yI, BZ) || l(yI, cs, qb)) {
|
|
@@ -10207,7 +10207,7 @@ _l = new WeakMap(), PC = new WeakMap(), Al = new WeakMap(), oZ = new WeakMap(),
|
|
|
10207
10207
|
A();
|
|
10208
10208
|
return;
|
|
10209
10209
|
}
|
|
10210
|
-
B(this, PC, C), B(this,
|
|
10210
|
+
B(this, PC, C), B(this, il, g), B(this, oZ, g), Y(this, Lg, fb).call(this);
|
|
10211
10211
|
}), C.on("ready", (d) => {
|
|
10212
10212
|
if (i.abort(), this.destroyed) {
|
|
10213
10213
|
A();
|
|
@@ -10236,7 +10236,7 @@ _l = new WeakMap(), PC = new WeakMap(), Al = new WeakMap(), oZ = new WeakMap(),
|
|
|
10236
10236
|
return;
|
|
10237
10237
|
}
|
|
10238
10238
|
const g = new xa();
|
|
10239
|
-
B(this,
|
|
10239
|
+
B(this, il, g);
|
|
10240
10240
|
const C = `fake${qI(yI, f0)._++}`, A = new dc(C + "_worker", C, g);
|
|
10241
10241
|
I.setup(A, g), B(this, PC, new dc(C, C + "_worker", g)), Y(this, Lg, fb).call(this);
|
|
10242
10242
|
}).catch((I) => {
|
|
@@ -10266,15 +10266,15 @@ _l = new WeakMap(), PC = new WeakMap(), Al = new WeakMap(), oZ = new WeakMap(),
|
|
|
10266
10266
|
return yI.create(I);
|
|
10267
10267
|
};
|
|
10268
10268
|
let Rc = yI;
|
|
10269
|
-
var
|
|
10269
|
+
var Zl, tA, Gs, bs, dl, hZ, Bc;
|
|
10270
10270
|
class JY {
|
|
10271
10271
|
constructor(I, g, C, A, i, Z) {
|
|
10272
10272
|
w(this, hZ);
|
|
10273
|
-
w(this,
|
|
10273
|
+
w(this, Zl, /* @__PURE__ */ new Map());
|
|
10274
10274
|
w(this, tA, /* @__PURE__ */ new Map());
|
|
10275
10275
|
w(this, Gs, /* @__PURE__ */ new Map());
|
|
10276
10276
|
w(this, bs, /* @__PURE__ */ new Map());
|
|
10277
|
-
w(this,
|
|
10277
|
+
w(this, dl, null);
|
|
10278
10278
|
this.messageHandler = I, this.loadingTask = g, this.commonObjs = new Fh(), this.fontLoader = new za({
|
|
10279
10279
|
ownerDocument: A.ownerDocument,
|
|
10280
10280
|
styleElement: A.styleElement
|
|
@@ -10329,7 +10329,7 @@ class JY {
|
|
|
10329
10329
|
var C;
|
|
10330
10330
|
if (this.destroyCapability)
|
|
10331
10331
|
return this.destroyCapability.promise;
|
|
10332
|
-
this.destroyed = !0, this.destroyCapability = Promise.withResolvers(), (C = l(this,
|
|
10332
|
+
this.destroyed = !0, this.destroyCapability = Promise.withResolvers(), (C = l(this, dl)) == null || C.reject(new Error("Worker was destroyed during onPassword callback"));
|
|
10333
10333
|
const I = [];
|
|
10334
10334
|
for (const A of l(this, tA).values())
|
|
10335
10335
|
I.push(A._destroy());
|
|
@@ -10337,7 +10337,7 @@ class JY {
|
|
|
10337
10337
|
const g = this.messageHandler.sendWithPromise("Terminate", null);
|
|
10338
10338
|
return I.push(g), Promise.all(I).then(() => {
|
|
10339
10339
|
var A, i;
|
|
10340
|
-
this.commonObjs.clear(), this.fontLoader.clear(), l(this,
|
|
10340
|
+
this.commonObjs.clear(), this.fontLoader.clear(), l(this, Zl).clear(), this.filterFactory.destroy(), Xc.cleanup(), (A = this._networkStream) == null || A.cancelAllRequests(new Yi("Worker was terminated.")), (i = this.messageHandler) == null || i.destroy(), this.messageHandler = null, this.destroyCapability.resolve();
|
|
10341
10341
|
}, this.destroyCapability.reject), this.destroyCapability.promise;
|
|
10342
10342
|
}
|
|
10343
10343
|
setupMessageHandler() {
|
|
@@ -10422,20 +10422,20 @@ class JY {
|
|
|
10422
10422
|
}), I.on("DocException", (C) => {
|
|
10423
10423
|
g._capability.reject(Qg(C));
|
|
10424
10424
|
}), I.on("PasswordRequest", (C) => {
|
|
10425
|
-
B(this,
|
|
10425
|
+
B(this, dl, Promise.withResolvers());
|
|
10426
10426
|
try {
|
|
10427
10427
|
if (!g.onPassword)
|
|
10428
10428
|
throw Qg(C);
|
|
10429
10429
|
const A = (i) => {
|
|
10430
|
-
i instanceof Error ? l(this,
|
|
10430
|
+
i instanceof Error ? l(this, dl).reject(i) : l(this, dl).resolve({
|
|
10431
10431
|
password: i
|
|
10432
10432
|
});
|
|
10433
10433
|
};
|
|
10434
10434
|
g.onPassword(A, C.code);
|
|
10435
10435
|
} catch (A) {
|
|
10436
|
-
l(this,
|
|
10436
|
+
l(this, dl).reject(A);
|
|
10437
10437
|
}
|
|
10438
|
-
return l(this,
|
|
10438
|
+
return l(this, dl).promise;
|
|
10439
10439
|
}), I.on("DataLoaded", (C) => {
|
|
10440
10440
|
var A;
|
|
10441
10441
|
(A = g.onProgress) == null || A.call(g, {
|
|
@@ -10639,7 +10639,7 @@ class JY {
|
|
|
10639
10639
|
return this.messageHandler.sendWithPromise("GetPermissions", null);
|
|
10640
10640
|
}
|
|
10641
10641
|
getMetadata() {
|
|
10642
|
-
const I = "GetMetadata", g = l(this,
|
|
10642
|
+
const I = "GetMetadata", g = l(this, Zl).get(I);
|
|
10643
10643
|
if (g)
|
|
10644
10644
|
return g;
|
|
10645
10645
|
const C = this.messageHandler.sendWithPromise(I, null).then((A) => {
|
|
@@ -10652,7 +10652,7 @@ class JY {
|
|
|
10652
10652
|
hasStructTree: A[2]
|
|
10653
10653
|
};
|
|
10654
10654
|
});
|
|
10655
|
-
return l(this,
|
|
10655
|
+
return l(this, Zl).set(I, C), C;
|
|
10656
10656
|
}
|
|
10657
10657
|
getMarkInfo() {
|
|
10658
10658
|
return this.messageHandler.sendWithPromise("GetMarkInfo", null);
|
|
@@ -10663,7 +10663,7 @@ class JY {
|
|
|
10663
10663
|
for (const g of l(this, tA).values())
|
|
10664
10664
|
if (!g.cleanup())
|
|
10665
10665
|
throw new Error(`startCleanup: Page ${g.pageNumber} is currently rendering.`);
|
|
10666
|
-
this.commonObjs.clear(), I || this.fontLoader.clear(), l(this,
|
|
10666
|
+
this.commonObjs.clear(), I || this.fontLoader.clear(), l(this, Zl).clear(), this.filterFactory.destroy(!0), Xc.cleanup();
|
|
10667
10667
|
}
|
|
10668
10668
|
}
|
|
10669
10669
|
cachedPageNumber(I) {
|
|
@@ -10673,12 +10673,12 @@ class JY {
|
|
|
10673
10673
|
return l(this, bs).get(g) ?? null;
|
|
10674
10674
|
}
|
|
10675
10675
|
}
|
|
10676
|
-
|
|
10677
|
-
const C = l(this,
|
|
10676
|
+
Zl = new WeakMap(), tA = new WeakMap(), Gs = new WeakMap(), bs = new WeakMap(), dl = new WeakMap(), hZ = new WeakSet(), Bc = function(I, g = null) {
|
|
10677
|
+
const C = l(this, Zl).get(I);
|
|
10678
10678
|
if (C)
|
|
10679
10679
|
return C;
|
|
10680
10680
|
const A = this.messageHandler.sendWithPromise(I, g);
|
|
10681
|
-
return l(this,
|
|
10681
|
+
return l(this, Zl).set(I, A), A;
|
|
10682
10682
|
};
|
|
10683
10683
|
var $l;
|
|
10684
10684
|
class zY {
|
|
@@ -10790,7 +10790,7 @@ const yi = class yi {
|
|
|
10790
10790
|
Ii = new WeakMap(), wZ = new WeakMap(), w(yi, wZ, /* @__PURE__ */ new WeakSet());
|
|
10791
10791
|
let eo = yi;
|
|
10792
10792
|
const kY = "5.4.530", LY = "50cc4adac";
|
|
10793
|
-
var ZC, aZ, ms, gg, kG, os,
|
|
10793
|
+
var ZC, aZ, ms, gg, kG, os, sl, LG, gi, fC, TG, wI, no, Vo, No, Ni, xh, ul;
|
|
10794
10794
|
const xg = class xg {
|
|
10795
10795
|
constructor({
|
|
10796
10796
|
editor: I = null,
|
|
@@ -10803,12 +10803,12 @@ const xg = class xg {
|
|
|
10803
10803
|
w(this, gg, null);
|
|
10804
10804
|
w(this, kG, !1);
|
|
10805
10805
|
w(this, os, !1);
|
|
10806
|
-
w(this,
|
|
10806
|
+
w(this, sl, null);
|
|
10807
10807
|
w(this, LG);
|
|
10808
10808
|
w(this, gi, null);
|
|
10809
10809
|
w(this, fC, null);
|
|
10810
10810
|
var C, A;
|
|
10811
|
-
I ? (B(this, os, !1), B(this,
|
|
10811
|
+
I ? (B(this, os, !1), B(this, sl, I)) : B(this, os, !0), B(this, fC, (I == null ? void 0 : I._uiManager) || g), B(this, LG, l(this, fC)._eventBus), B(this, ms, ((C = I == null ? void 0 : I.color) == null ? void 0 : C.toUpperCase()) || ((A = l(this, fC)) == null ? void 0 : A.highlightColors.values().next().value) || "#FFFF98"), l(xg, TG) || B(xg, TG, Object.freeze({
|
|
10812
10812
|
blue: "pdfjs-editor-colorpicker-blue",
|
|
10813
10813
|
green: "pdfjs-editor-colorpicker-green",
|
|
10814
10814
|
pink: "pdfjs-editor-colorpicker-pink",
|
|
@@ -10821,7 +10821,7 @@ const xg = class xg {
|
|
|
10821
10821
|
}
|
|
10822
10822
|
renderButton() {
|
|
10823
10823
|
const I = B(this, ZC, document.createElement("button"));
|
|
10824
|
-
I.className = "colorPicker", I.tabIndex = "0", I.setAttribute("data-l10n-id", "pdfjs-editor-colorpicker-button"), I.ariaHasPopup = "true", l(this,
|
|
10824
|
+
I.className = "colorPicker", I.tabIndex = "0", I.setAttribute("data-l10n-id", "pdfjs-editor-colorpicker-button"), I.ariaHasPopup = "true", l(this, sl) && (I.ariaControls = `${l(this, sl).id}_colorpicker_dropdown`);
|
|
10825
10825
|
const g = l(this, fC)._signal;
|
|
10826
10826
|
I.addEventListener("click", Y(this, wI, Ni).bind(this), {
|
|
10827
10827
|
signal: g
|
|
@@ -10887,7 +10887,7 @@ const xg = class xg {
|
|
|
10887
10887
|
var I;
|
|
10888
10888
|
if (!l(this, os)) {
|
|
10889
10889
|
if (!l(this, wI, ul)) {
|
|
10890
|
-
(I = l(this,
|
|
10890
|
+
(I = l(this, sl)) == null || I.unselect();
|
|
10891
10891
|
return;
|
|
10892
10892
|
}
|
|
10893
10893
|
this.hideDropdown(), l(this, ZC).focus({
|
|
@@ -10908,11 +10908,11 @@ const xg = class xg {
|
|
|
10908
10908
|
(I = l(this, ZC)) == null || I.remove(), B(this, ZC, null), B(this, aZ, null), (g = l(this, gg)) == null || g.remove(), B(this, gg, null);
|
|
10909
10909
|
}
|
|
10910
10910
|
};
|
|
10911
|
-
ZC = new WeakMap(), aZ = new WeakMap(), ms = new WeakMap(), gg = new WeakMap(), kG = new WeakMap(), os = new WeakMap(),
|
|
10911
|
+
ZC = new WeakMap(), aZ = new WeakMap(), ms = new WeakMap(), gg = new WeakMap(), kG = new WeakMap(), os = new WeakMap(), sl = new WeakMap(), LG = new WeakMap(), gi = new WeakMap(), fC = new WeakMap(), TG = new WeakMap(), wI = new WeakSet(), no = function() {
|
|
10912
10912
|
const I = document.createElement("div"), g = l(this, fC)._signal;
|
|
10913
10913
|
I.addEventListener("contextmenu", TC, {
|
|
10914
10914
|
signal: g
|
|
10915
|
-
}), I.className = "dropdown", I.role = "listbox", I.ariaMultiSelectable = "false", I.ariaOrientation = "vertical", I.setAttribute("data-l10n-id", "pdfjs-editor-colorpicker-dropdown"), l(this,
|
|
10915
|
+
}), I.className = "dropdown", I.role = "listbox", I.ariaMultiSelectable = "false", I.ariaOrientation = "vertical", I.setAttribute("data-l10n-id", "pdfjs-editor-colorpicker-dropdown"), l(this, sl) && (I.id = `${l(this, sl).id}_colorpicker_dropdown`);
|
|
10916
10916
|
for (const [C, A] of l(this, fC).highlightColors) {
|
|
10917
10917
|
const i = document.createElement("button");
|
|
10918
10918
|
i.tabIndex = "0", i.role = "option", i.setAttribute("data-color", A), i.title = C, i.setAttribute("data-l10n-id", l(xg, TG)[C]);
|
|
@@ -11060,7 +11060,7 @@ class TY {
|
|
|
11060
11060
|
}
|
|
11061
11061
|
class u0 extends TY {
|
|
11062
11062
|
_createSVG(I) {
|
|
11063
|
-
return document.createElementNS(
|
|
11063
|
+
return document.createElementNS(FA, I);
|
|
11064
11064
|
}
|
|
11065
11065
|
}
|
|
11066
11066
|
const rY = 9, PZ = /* @__PURE__ */ new WeakSet(), jY = (/* @__PURE__ */ new Date()).getTimezoneOffset() * 60 * 1e3;
|
|
@@ -11114,7 +11114,7 @@ class um {
|
|
|
11114
11114
|
case vI.FILEATTACHMENT:
|
|
11115
11115
|
return new it(I);
|
|
11116
11116
|
default:
|
|
11117
|
-
return new
|
|
11117
|
+
return new JI(I);
|
|
11118
11118
|
}
|
|
11119
11119
|
}
|
|
11120
11120
|
}
|
|
@@ -11594,8 +11594,8 @@ YZ = new WeakMap(), Ws = new WeakMap(), SC = new WeakMap(), QG = new WeakSet(),
|
|
|
11594
11594
|
} = this;
|
|
11595
11595
|
C == null || C.splice(0, 4, ...I), g.left = `${100 * (I[0] - d) / i}%`, g.top = `${100 * (Z - I[3] + c) / Z}%`, A === 0 ? (g.width = `${100 * (I[2] - I[0]) / i}%`, g.height = `${100 * (I[3] - I[1]) / Z}%`) : this.setRotation(A);
|
|
11596
11596
|
};
|
|
11597
|
-
let
|
|
11598
|
-
class QY extends
|
|
11597
|
+
let JI = jB;
|
|
11598
|
+
class QY extends JI {
|
|
11599
11599
|
constructor(I) {
|
|
11600
11600
|
super(I, {
|
|
11601
11601
|
isRenderable: !0,
|
|
@@ -11631,7 +11631,7 @@ class QY extends FI {
|
|
|
11631
11631
|
}
|
|
11632
11632
|
}
|
|
11633
11633
|
var eC, Xi, Uh, Oh;
|
|
11634
|
-
class nB extends
|
|
11634
|
+
class nB extends JI {
|
|
11635
11635
|
constructor(g, C = null) {
|
|
11636
11636
|
super(g, {
|
|
11637
11637
|
isRenderable: !0,
|
|
@@ -11765,7 +11765,7 @@ eC = new WeakSet(), Xi = function() {
|
|
|
11765
11765
|
}, Oh = function(g, C, A = "") {
|
|
11766
11766
|
g.href = this.linkService.getAnchorUrl(""), g.onclick = () => (this.linkService.executeSetOCGState(C), !1), A && (g.title = A), Y(this, eC, Xi).call(this);
|
|
11767
11767
|
};
|
|
11768
|
-
class xY extends
|
|
11768
|
+
class xY extends JI {
|
|
11769
11769
|
constructor(I) {
|
|
11770
11770
|
super(I, {
|
|
11771
11771
|
isRenderable: !0
|
|
@@ -11779,7 +11779,7 @@ class xY extends FI {
|
|
|
11779
11779
|
})), !this.data.popupRef && this.hasPopupData && (this.hasOwnCommentButton = !0, this._createPopup()), this.container.append(I), this.container;
|
|
11780
11780
|
}
|
|
11781
11781
|
}
|
|
11782
|
-
class _Z extends
|
|
11782
|
+
class _Z extends JI {
|
|
11783
11783
|
render() {
|
|
11784
11784
|
return this.container;
|
|
11785
11785
|
}
|
|
@@ -12352,7 +12352,7 @@ class PY extends _Z {
|
|
|
12352
12352
|
}
|
|
12353
12353
|
}
|
|
12354
12354
|
var xG, uo;
|
|
12355
|
-
class Ro extends
|
|
12355
|
+
class Ro extends JI {
|
|
12356
12356
|
constructor(g) {
|
|
12357
12357
|
const {
|
|
12358
12358
|
data: C,
|
|
@@ -12360,10 +12360,10 @@ class Ro extends FI {
|
|
|
12360
12360
|
parent: i
|
|
12361
12361
|
} = g, Z = !!i._commentManager;
|
|
12362
12362
|
super(g, {
|
|
12363
|
-
isRenderable: !Z &&
|
|
12363
|
+
isRenderable: !Z && JI._hasPopupData(C)
|
|
12364
12364
|
});
|
|
12365
12365
|
w(this, xG);
|
|
12366
|
-
if (this.elements = A, Z &&
|
|
12366
|
+
if (this.elements = A, Z && JI._hasPopupData(C)) {
|
|
12367
12367
|
const d = this.popup = Y(this, xG, uo).call(this);
|
|
12368
12368
|
for (const c of A)
|
|
12369
12369
|
c.popup = d;
|
|
@@ -12397,7 +12397,7 @@ xG = new WeakSet(), uo = function() {
|
|
|
12397
12397
|
commentManager: this.parent._commentManager
|
|
12398
12398
|
});
|
|
12399
12399
|
};
|
|
12400
|
-
var dC, Ci, q0, _0, hs, ws,
|
|
12400
|
+
var dC, Ci, q0, _0, hs, ws, TI, nA, Ai, tZ, as, Ys, VA, sC, cl, Gl, rI, bl, li, UG, ml, ts, eZ, ii, Zg, Zi, _, _b, yo, Ho, Mo, $b, Do, Eh, Ph, fh, qh, I0, g0, Ko;
|
|
12401
12401
|
class fY {
|
|
12402
12402
|
constructor({
|
|
12403
12403
|
container: I,
|
|
@@ -12420,7 +12420,7 @@ class fY {
|
|
|
12420
12420
|
w(this, _0, Y(this, _, g0).bind(this));
|
|
12421
12421
|
w(this, hs, Y(this, _, I0).bind(this));
|
|
12422
12422
|
w(this, ws, null);
|
|
12423
|
-
w(this,
|
|
12423
|
+
w(this, TI, null);
|
|
12424
12424
|
w(this, nA, null);
|
|
12425
12425
|
w(this, Ai, null);
|
|
12426
12426
|
w(this, tZ, null);
|
|
@@ -12428,30 +12428,30 @@ class fY {
|
|
|
12428
12428
|
w(this, Ys, null);
|
|
12429
12429
|
w(this, VA, !1);
|
|
12430
12430
|
w(this, sC, null);
|
|
12431
|
-
w(this, dl, null);
|
|
12432
|
-
w(this, sl, null);
|
|
12433
|
-
w(this, TI, null);
|
|
12434
12431
|
w(this, cl, null);
|
|
12432
|
+
w(this, Gl, null);
|
|
12433
|
+
w(this, rI, null);
|
|
12434
|
+
w(this, bl, null);
|
|
12435
12435
|
w(this, li, null);
|
|
12436
12436
|
w(this, UG, null);
|
|
12437
|
-
w(this,
|
|
12437
|
+
w(this, ml, null);
|
|
12438
12438
|
w(this, ts, null);
|
|
12439
12439
|
w(this, eZ, null);
|
|
12440
12440
|
w(this, ii, !1);
|
|
12441
12441
|
w(this, Zg, null);
|
|
12442
12442
|
w(this, Zi, null);
|
|
12443
|
-
B(this,
|
|
12443
|
+
B(this, TI, I), B(this, ts, A), B(this, nA, Z), B(this, ml, d), B(this, as, c), B(this, ws, g), B(this, UG, G), B(this, Ys, b), B(this, tZ, C), B(this, dC, W), B(this, Zg, C[0]), B(this, Ai, Y0.toDateObject(i)), this.trigger = C.flatMap((a) => a.getElementsToTriggerPopup()), W || (Y(this, _, _b).call(this), l(this, TI).hidden = !0, m && Y(this, _, I0).call(this));
|
|
12444
12444
|
}
|
|
12445
12445
|
renderCommentButton() {
|
|
12446
|
-
if (l(this,
|
|
12447
|
-
l(this,
|
|
12446
|
+
if (l(this, rI)) {
|
|
12447
|
+
l(this, rI).parentNode || l(this, Zg).container.after(l(this, rI));
|
|
12448
12448
|
return;
|
|
12449
12449
|
}
|
|
12450
|
-
if (l(this,
|
|
12450
|
+
if (l(this, bl) || Y(this, _, yo).call(this), !l(this, bl))
|
|
12451
12451
|
return;
|
|
12452
12452
|
const {
|
|
12453
12453
|
signal: I
|
|
12454
|
-
} = B(this,
|
|
12454
|
+
} = B(this, cl, new AbortController()), g = l(this, Zg).hasOwnCommentButton, C = () => {
|
|
12455
12455
|
l(this, dC).toggleCommentPopup(this, !0, void 0, !g);
|
|
12456
12456
|
}, A = () => {
|
|
12457
12457
|
l(this, dC).toggleCommentPopup(this, !1, !0, !g);
|
|
@@ -12459,7 +12459,7 @@ class fY {
|
|
|
12459
12459
|
l(this, dC).toggleCommentPopup(this, !1, !1);
|
|
12460
12460
|
};
|
|
12461
12461
|
if (g) {
|
|
12462
|
-
B(this,
|
|
12462
|
+
B(this, rI, l(this, Zg).container);
|
|
12463
12463
|
for (const Z of this.trigger)
|
|
12464
12464
|
Z.ariaHasPopup = "dialog", Z.ariaControls = "commentPopup", Z.addEventListener("keydown", l(this, Ci), {
|
|
12465
12465
|
signal: I
|
|
@@ -12471,7 +12471,7 @@ class fY {
|
|
|
12471
12471
|
signal: I
|
|
12472
12472
|
}), Z.classList.add("popupTriggerArea");
|
|
12473
12473
|
} else {
|
|
12474
|
-
const Z = B(this,
|
|
12474
|
+
const Z = B(this, rI, document.createElement("button"));
|
|
12475
12475
|
Z.className = "annotationCommentButton";
|
|
12476
12476
|
const d = l(this, Zg).container;
|
|
12477
12477
|
Z.style.zIndex = d.style.zIndex + 1, Z.tabIndex = 0, Z.ariaHasPopup = "dialog", Z.ariaControls = "commentPopup", Z.setAttribute("data-l10n-id", "pdfjs-show-comment-button"), Y(this, _, Mo).call(this), Y(this, _, Ho).call(this), Z.addEventListener("keydown", l(this, Ci), {
|
|
@@ -12495,7 +12495,7 @@ class fY {
|
|
|
12495
12495
|
focusCommentButton() {
|
|
12496
12496
|
setTimeout(() => {
|
|
12497
12497
|
var I;
|
|
12498
|
-
(I = l(this,
|
|
12498
|
+
(I = l(this, rI)) == null || I.focus();
|
|
12499
12499
|
}, 0);
|
|
12500
12500
|
}
|
|
12501
12501
|
getData() {
|
|
@@ -12518,7 +12518,7 @@ class fY {
|
|
|
12518
12518
|
};
|
|
12519
12519
|
}
|
|
12520
12520
|
get elementBeforePopup() {
|
|
12521
|
-
return l(this,
|
|
12521
|
+
return l(this, rI);
|
|
12522
12522
|
}
|
|
12523
12523
|
get comment() {
|
|
12524
12524
|
return l(this, Zi) || B(this, Zi, l(this, Zg).commentText), l(this, Zi);
|
|
@@ -12537,10 +12537,10 @@ class fY {
|
|
|
12537
12537
|
selected: I,
|
|
12538
12538
|
hasPopup: g
|
|
12539
12539
|
}) {
|
|
12540
|
-
l(this,
|
|
12540
|
+
l(this, rI) && (l(this, rI).classList.toggle("selected", I), l(this, rI).ariaExpanded = g);
|
|
12541
12541
|
}
|
|
12542
12542
|
setSelectedCommentButton(I) {
|
|
12543
|
-
l(this,
|
|
12543
|
+
l(this, rI).classList.toggle("selected", I);
|
|
12544
12544
|
}
|
|
12545
12545
|
get commentPopupPosition() {
|
|
12546
12546
|
if (l(this, li))
|
|
@@ -12549,7 +12549,7 @@ class fY {
|
|
|
12549
12549
|
x: I,
|
|
12550
12550
|
y: g,
|
|
12551
12551
|
height: C
|
|
12552
|
-
} = l(this,
|
|
12552
|
+
} = l(this, rI).getBoundingClientRect(), {
|
|
12553
12553
|
x: A,
|
|
12554
12554
|
y: i,
|
|
12555
12555
|
width: Z,
|
|
@@ -12564,10 +12564,10 @@ class fY {
|
|
|
12564
12564
|
return l(this, li) === null;
|
|
12565
12565
|
}
|
|
12566
12566
|
get commentButtonPosition() {
|
|
12567
|
-
return l(this,
|
|
12567
|
+
return l(this, bl);
|
|
12568
12568
|
}
|
|
12569
12569
|
get commentButtonWidth() {
|
|
12570
|
-
return l(this,
|
|
12570
|
+
return l(this, rI).getBoundingClientRect().width / this.parentBoundingClientRect.width;
|
|
12571
12571
|
}
|
|
12572
12572
|
editComment(I) {
|
|
12573
12573
|
const [g, C] = l(this, li) || this.commentButtonPosition.map((G) => G / 100), A = this.parentBoundingClientRect, {
|
|
@@ -12608,7 +12608,7 @@ class fY {
|
|
|
12608
12608
|
html: l(this, _, $b) || l(this, nA).str,
|
|
12609
12609
|
dir: (A = l(this, nA)) == null ? void 0 : A.dir,
|
|
12610
12610
|
className: "popupContent"
|
|
12611
|
-
}, I), l(this,
|
|
12611
|
+
}, I), l(this, TI).append(I);
|
|
12612
12612
|
}
|
|
12613
12613
|
updateEdited({
|
|
12614
12614
|
rect: I,
|
|
@@ -12617,7 +12617,7 @@ class fY {
|
|
|
12617
12617
|
}) {
|
|
12618
12618
|
var A;
|
|
12619
12619
|
if (l(this, dC)) {
|
|
12620
|
-
C ? (this.remove(), B(this, Zi, null)) : g && (g.deleted ? this.remove() : (Y(this, _, Mo).call(this), B(this, Zi, g.text))), I && (B(this,
|
|
12620
|
+
C ? (this.remove(), B(this, Zi, null)) : g && (g.deleted ? this.remove() : (Y(this, _, Mo).call(this), B(this, Zi, g.text))), I && (B(this, bl, null), Y(this, _, yo).call(this), Y(this, _, Ho).call(this));
|
|
12621
12621
|
return;
|
|
12622
12622
|
}
|
|
12623
12623
|
if (C || g != null && g.deleted) {
|
|
@@ -12626,40 +12626,40 @@ class fY {
|
|
|
12626
12626
|
}
|
|
12627
12627
|
Y(this, _, _b).call(this), l(this, eZ) || B(this, eZ, {
|
|
12628
12628
|
contentsObj: l(this, nA),
|
|
12629
|
-
richText: l(this,
|
|
12630
|
-
}), I && B(this,
|
|
12629
|
+
richText: l(this, ml)
|
|
12630
|
+
}), I && B(this, Gl, null), g && g.text && (B(this, ml, Y(this, _, Ph).call(this, g.text)), B(this, Ai, Y0.toDateObject(g.date)), B(this, nA, null)), (A = l(this, sC)) == null || A.remove(), B(this, sC, null);
|
|
12631
12631
|
}
|
|
12632
12632
|
resetEdited() {
|
|
12633
12633
|
var I;
|
|
12634
12634
|
l(this, eZ) && ({
|
|
12635
12635
|
contentsObj: qI(this, nA)._,
|
|
12636
|
-
richText: qI(this,
|
|
12637
|
-
} = l(this, eZ), B(this, eZ, null), (I = l(this, sC)) == null || I.remove(), B(this, sC, null), B(this,
|
|
12636
|
+
richText: qI(this, ml)._
|
|
12637
|
+
} = l(this, eZ), B(this, eZ, null), (I = l(this, sC)) == null || I.remove(), B(this, sC, null), B(this, Gl, null));
|
|
12638
12638
|
}
|
|
12639
12639
|
remove() {
|
|
12640
12640
|
var I, g, C;
|
|
12641
|
-
if ((I = l(this,
|
|
12641
|
+
if ((I = l(this, cl)) == null || I.abort(), B(this, cl, null), (g = l(this, sC)) == null || g.remove(), B(this, sC, null), B(this, ii, !1), B(this, VA, !1), (C = l(this, rI)) == null || C.remove(), B(this, rI, null), this.trigger)
|
|
12642
12642
|
for (const A of this.trigger)
|
|
12643
12643
|
A.classList.remove("popupTriggerArea");
|
|
12644
12644
|
}
|
|
12645
12645
|
forceHide() {
|
|
12646
|
-
B(this, ii, this.isVisible), l(this, ii) && (l(this,
|
|
12646
|
+
B(this, ii, this.isVisible), l(this, ii) && (l(this, TI).hidden = !0);
|
|
12647
12647
|
}
|
|
12648
12648
|
maybeShow() {
|
|
12649
|
-
l(this, dC) || (Y(this, _, _b).call(this), l(this, ii) && (l(this, sC) || Y(this, _, g0).call(this), B(this, ii, !1), l(this,
|
|
12649
|
+
l(this, dC) || (Y(this, _, _b).call(this), l(this, ii) && (l(this, sC) || Y(this, _, g0).call(this), B(this, ii, !1), l(this, TI).hidden = !1));
|
|
12650
12650
|
}
|
|
12651
12651
|
get isVisible() {
|
|
12652
|
-
return l(this, dC) ? !1 : l(this,
|
|
12652
|
+
return l(this, dC) ? !1 : l(this, TI).hidden === !1;
|
|
12653
12653
|
}
|
|
12654
12654
|
}
|
|
12655
|
-
dC = new WeakMap(), Ci = new WeakMap(), q0 = new WeakMap(), _0 = new WeakMap(), hs = new WeakMap(), ws = new WeakMap(),
|
|
12655
|
+
dC = new WeakMap(), Ci = new WeakMap(), q0 = new WeakMap(), _0 = new WeakMap(), hs = new WeakMap(), ws = new WeakMap(), TI = new WeakMap(), nA = new WeakMap(), Ai = new WeakMap(), tZ = new WeakMap(), as = new WeakMap(), Ys = new WeakMap(), VA = new WeakMap(), sC = new WeakMap(), cl = new WeakMap(), Gl = new WeakMap(), rI = new WeakMap(), bl = new WeakMap(), li = new WeakMap(), UG = new WeakMap(), ml = new WeakMap(), ts = new WeakMap(), eZ = new WeakMap(), ii = new WeakMap(), Zg = new WeakMap(), Zi = new WeakMap(), _ = new WeakSet(), _b = function() {
|
|
12656
12656
|
var g;
|
|
12657
|
-
if (l(this,
|
|
12657
|
+
if (l(this, cl))
|
|
12658
12658
|
return;
|
|
12659
|
-
B(this,
|
|
12659
|
+
B(this, cl, new AbortController());
|
|
12660
12660
|
const {
|
|
12661
12661
|
signal: I
|
|
12662
|
-
} = l(this,
|
|
12662
|
+
} = l(this, cl);
|
|
12663
12663
|
for (const C of this.trigger)
|
|
12664
12664
|
C.addEventListener("click", l(this, hs), {
|
|
12665
12665
|
signal: I
|
|
@@ -12674,20 +12674,20 @@ dC = new WeakMap(), Ci = new WeakMap(), q0 = new WeakMap(), _0 = new WeakMap(),
|
|
|
12674
12674
|
});
|
|
12675
12675
|
}, yo = function() {
|
|
12676
12676
|
const I = l(this, tZ).find((g) => g.hasCommentButton);
|
|
12677
|
-
I && B(this,
|
|
12677
|
+
I && B(this, bl, I._normalizePoint(I.commentButtonPosition));
|
|
12678
12678
|
}, Ho = function() {
|
|
12679
12679
|
if (l(this, Zg).extraPopupElement && !l(this, Zg).editor)
|
|
12680
12680
|
return;
|
|
12681
|
-
l(this,
|
|
12682
|
-
const [I, g] = l(this,
|
|
12681
|
+
l(this, rI) || this.renderCommentButton();
|
|
12682
|
+
const [I, g] = l(this, bl), {
|
|
12683
12683
|
style: C
|
|
12684
|
-
} = l(this,
|
|
12684
|
+
} = l(this, rI);
|
|
12685
12685
|
C.left = `calc(${I}%)`, C.top = `calc(${g}% - var(--comment-button-dim))`;
|
|
12686
12686
|
}, Mo = function() {
|
|
12687
|
-
l(this, Zg).extraPopupElement || (l(this,
|
|
12687
|
+
l(this, Zg).extraPopupElement || (l(this, rI) || this.renderCommentButton(), l(this, rI).style.backgroundColor = this.commentButtonColor || "");
|
|
12688
12688
|
}, $b = function() {
|
|
12689
|
-
const I = l(this,
|
|
12690
|
-
return I != null && I.str && (!(g != null && g.str) || g.str === I.str) && l(this,
|
|
12689
|
+
const I = l(this, ml), g = l(this, nA);
|
|
12690
|
+
return I != null && I.str && (!(g != null && g.str) || g.str === I.str) && l(this, ml).html || null;
|
|
12691
12691
|
}, Do = function() {
|
|
12692
12692
|
var I, g, C;
|
|
12693
12693
|
return ((C = (g = (I = l(this, _, $b)) == null ? void 0 : I.attributes) == null ? void 0 : g.style) == null ? void 0 : C.fontSize) || 0;
|
|
@@ -12724,7 +12724,7 @@ dC = new WeakMap(), Ci = new WeakMap(), q0 = new WeakMap(), _0 = new WeakMap(),
|
|
|
12724
12724
|
}, fh = function(I) {
|
|
12725
12725
|
I.altKey || I.shiftKey || I.ctrlKey || I.metaKey || (I.key === "Enter" || I.key === "Escape" && l(this, VA)) && Y(this, _, I0).call(this);
|
|
12726
12726
|
}, qh = function() {
|
|
12727
|
-
if (l(this,
|
|
12727
|
+
if (l(this, Gl) !== null)
|
|
12728
12728
|
return;
|
|
12729
12729
|
const {
|
|
12730
12730
|
page: {
|
|
@@ -12746,23 +12746,23 @@ dC = new WeakMap(), Ci = new WeakMap(), q0 = new WeakMap(), _0 = new WeakMap(),
|
|
|
12746
12746
|
break;
|
|
12747
12747
|
}
|
|
12748
12748
|
const c = F.normalizeRect([d[0], I[3] - d[1] + I[1], d[2], I[3] - d[3] + I[1]]), b = Z ? d[2] - d[0] + 5 : 0, m = c[0] + b, W = c[1];
|
|
12749
|
-
B(this,
|
|
12749
|
+
B(this, Gl, [100 * (m - A) / g, 100 * (W - i) / C]);
|
|
12750
12750
|
const {
|
|
12751
12751
|
style: a
|
|
12752
|
-
} = l(this,
|
|
12753
|
-
a.left = `${l(this,
|
|
12752
|
+
} = l(this, TI);
|
|
12753
|
+
a.left = `${l(this, Gl)[0]}%`, a.top = `${l(this, Gl)[1]}%`;
|
|
12754
12754
|
}, I0 = function() {
|
|
12755
12755
|
if (l(this, dC)) {
|
|
12756
12756
|
l(this, dC).toggleCommentPopup(this, !1);
|
|
12757
12757
|
return;
|
|
12758
12758
|
}
|
|
12759
|
-
B(this, VA, !l(this, VA)), l(this, VA) ? (Y(this, _, g0).call(this), l(this,
|
|
12759
|
+
B(this, VA, !l(this, VA)), l(this, VA) ? (Y(this, _, g0).call(this), l(this, TI).addEventListener("click", l(this, hs)), l(this, TI).addEventListener("keydown", l(this, Ci))) : (Y(this, _, Ko).call(this), l(this, TI).removeEventListener("click", l(this, hs)), l(this, TI).removeEventListener("keydown", l(this, Ci)));
|
|
12760
12760
|
}, g0 = function() {
|
|
12761
|
-
l(this, sC) || this.render(), this.isVisible ? l(this, VA) && l(this,
|
|
12761
|
+
l(this, sC) || this.render(), this.isVisible ? l(this, VA) && l(this, TI).classList.add("focused") : (Y(this, _, qh).call(this), l(this, TI).hidden = !1, l(this, TI).style.zIndex = parseInt(l(this, TI).style.zIndex) + 1e3);
|
|
12762
12762
|
}, Ko = function() {
|
|
12763
|
-
l(this,
|
|
12763
|
+
l(this, TI).classList.remove("focused"), !(l(this, VA) || !this.isVisible) && (l(this, TI).hidden = !0, l(this, TI).style.zIndex = parseInt(l(this, TI).style.zIndex) - 1e3);
|
|
12764
12764
|
};
|
|
12765
|
-
class _h extends
|
|
12765
|
+
class _h extends JI {
|
|
12766
12766
|
constructor(I) {
|
|
12767
12767
|
super(I, {
|
|
12768
12768
|
isRenderable: !0,
|
|
@@ -12783,7 +12783,7 @@ class _h extends FI {
|
|
|
12783
12783
|
}
|
|
12784
12784
|
}
|
|
12785
12785
|
var OG;
|
|
12786
|
-
class qY extends
|
|
12786
|
+
class qY extends JI {
|
|
12787
12787
|
constructor(g) {
|
|
12788
12788
|
super(g, {
|
|
12789
12789
|
isRenderable: !0,
|
|
@@ -12809,7 +12809,7 @@ class qY extends FI {
|
|
|
12809
12809
|
}
|
|
12810
12810
|
OG = new WeakMap();
|
|
12811
12811
|
var vG;
|
|
12812
|
-
class _Y extends
|
|
12812
|
+
class _Y extends JI {
|
|
12813
12813
|
constructor(g) {
|
|
12814
12814
|
super(g, {
|
|
12815
12815
|
isRenderable: !0,
|
|
@@ -12835,7 +12835,7 @@ class _Y extends FI {
|
|
|
12835
12835
|
}
|
|
12836
12836
|
vG = new WeakMap();
|
|
12837
12837
|
var EG;
|
|
12838
|
-
class $Y extends
|
|
12838
|
+
class $Y extends JI {
|
|
12839
12839
|
constructor(g) {
|
|
12840
12840
|
super(g, {
|
|
12841
12841
|
isRenderable: !0,
|
|
@@ -12861,7 +12861,7 @@ class $Y extends FI {
|
|
|
12861
12861
|
}
|
|
12862
12862
|
EG = new WeakMap();
|
|
12863
12863
|
var PG;
|
|
12864
|
-
class $h extends
|
|
12864
|
+
class $h extends JI {
|
|
12865
12865
|
constructor(g) {
|
|
12866
12866
|
super(g, {
|
|
12867
12867
|
isRenderable: !0,
|
|
@@ -12907,7 +12907,7 @@ class It extends $h {
|
|
|
12907
12907
|
super(I), this.containerClassName = "polygonAnnotation", this.svgElementName = "svg:polygon";
|
|
12908
12908
|
}
|
|
12909
12909
|
}
|
|
12910
|
-
class gt extends
|
|
12910
|
+
class gt extends JI {
|
|
12911
12911
|
constructor(I) {
|
|
12912
12912
|
super(I, {
|
|
12913
12913
|
isRenderable: !0,
|
|
@@ -12919,7 +12919,7 @@ class gt extends FI {
|
|
|
12919
12919
|
}
|
|
12920
12920
|
}
|
|
12921
12921
|
var fG, nZ, qG, po;
|
|
12922
|
-
class VB extends
|
|
12922
|
+
class VB extends JI {
|
|
12923
12923
|
constructor(g) {
|
|
12924
12924
|
super(g, {
|
|
12925
12925
|
isRenderable: !0,
|
|
@@ -13006,7 +13006,7 @@ fG = new WeakMap(), nZ = new WeakMap(), qG = new WeakSet(), po = function(g, C)
|
|
|
13006
13006
|
};
|
|
13007
13007
|
}
|
|
13008
13008
|
};
|
|
13009
|
-
class Iw extends
|
|
13009
|
+
class Iw extends JI {
|
|
13010
13010
|
constructor(I) {
|
|
13011
13011
|
super(I, {
|
|
13012
13012
|
isRenderable: !0,
|
|
@@ -13028,7 +13028,7 @@ class Iw extends FI {
|
|
|
13028
13028
|
return this.container;
|
|
13029
13029
|
}
|
|
13030
13030
|
}
|
|
13031
|
-
class Ct extends
|
|
13031
|
+
class Ct extends JI {
|
|
13032
13032
|
constructor(I) {
|
|
13033
13033
|
super(I, {
|
|
13034
13034
|
isRenderable: !0,
|
|
@@ -13050,7 +13050,7 @@ class Ct extends FI {
|
|
|
13050
13050
|
return this.container;
|
|
13051
13051
|
}
|
|
13052
13052
|
}
|
|
13053
|
-
class At extends
|
|
13053
|
+
class At extends JI {
|
|
13054
13054
|
constructor(I) {
|
|
13055
13055
|
super(I, {
|
|
13056
13056
|
isRenderable: !0,
|
|
@@ -13072,7 +13072,7 @@ class At extends FI {
|
|
|
13072
13072
|
return this.container;
|
|
13073
13073
|
}
|
|
13074
13074
|
}
|
|
13075
|
-
class lt extends
|
|
13075
|
+
class lt extends JI {
|
|
13076
13076
|
constructor(I) {
|
|
13077
13077
|
super(I, {
|
|
13078
13078
|
isRenderable: !0,
|
|
@@ -13094,7 +13094,7 @@ class lt extends FI {
|
|
|
13094
13094
|
return this.container;
|
|
13095
13095
|
}
|
|
13096
13096
|
}
|
|
13097
|
-
class gw extends
|
|
13097
|
+
class gw extends JI {
|
|
13098
13098
|
constructor(I) {
|
|
13099
13099
|
super(I, {
|
|
13100
13100
|
isRenderable: !0,
|
|
@@ -13106,7 +13106,7 @@ class gw extends FI {
|
|
|
13106
13106
|
}
|
|
13107
13107
|
}
|
|
13108
13108
|
var _G, $G, So;
|
|
13109
|
-
class it extends
|
|
13109
|
+
class it extends JI {
|
|
13110
13110
|
constructor(g) {
|
|
13111
13111
|
var A;
|
|
13112
13112
|
super(g, {
|
|
@@ -13900,7 +13900,7 @@ class z {
|
|
|
13900
13900
|
}
|
|
13901
13901
|
M(z, "PRECISION", 1e-4);
|
|
13902
13902
|
var mC, qC, ns, Vs, NA, $, uZ, yZ, Ab, lb, Ns, Xs, si, ib, $0, Im, Ag, Wc, dw, sw, cw, Gw, bw, mw;
|
|
13903
|
-
const
|
|
13903
|
+
const LA = class LA {
|
|
13904
13904
|
constructor({
|
|
13905
13905
|
x: I,
|
|
13906
13906
|
y: g
|
|
@@ -13919,7 +13919,7 @@ const zA = class zA {
|
|
|
13919
13919
|
w(this, Ns);
|
|
13920
13920
|
w(this, Xs);
|
|
13921
13921
|
w(this, si, []);
|
|
13922
|
-
B(this, mC, C), B(this, Xs, i * A), B(this, Vs, Z), l(this, $).set([NaN, NaN, NaN, NaN, I, g], 6), B(this, ns, d), B(this, lb, l(
|
|
13922
|
+
B(this, mC, C), B(this, Xs, i * A), B(this, Vs, Z), l(this, $).set([NaN, NaN, NaN, NaN, I, g], 6), B(this, ns, d), B(this, lb, l(LA, ib) * A), B(this, Ab, l(LA, Im) * A), B(this, Ns, A), l(this, si).push(I, g);
|
|
13923
13923
|
}
|
|
13924
13924
|
isEmpty() {
|
|
13925
13925
|
return isNaN(l(this, $)[8]);
|
|
@@ -14008,21 +14008,21 @@ mC = new WeakMap(), qC = new WeakMap(), ns = new WeakMap(), Vs = new WeakMap(),
|
|
|
14008
14008
|
}, mw = function(I, g) {
|
|
14009
14009
|
const C = l(this, $).subarray(4, 6), A = l(this, $).subarray(16, 18), [i, Z, d, c] = l(this, mC), [G, b, m, W] = Y(this, Ag, Wc).call(this);
|
|
14010
14010
|
return I.set([NaN, NaN, NaN, NaN, (C[0] - i) / d, (C[1] - Z) / c, NaN, NaN, NaN, NaN, G, b, NaN, NaN, NaN, NaN, m, W, NaN, NaN, NaN, NaN, (A[0] - i) / d, (A[1] - Z) / c], g), g += 24;
|
|
14011
|
-
}, w(
|
|
14012
|
-
let y0 =
|
|
14013
|
-
var Rs, HZ,
|
|
14011
|
+
}, w(LA, ib, 8), w(LA, $0, 2), w(LA, Im, l(LA, ib) + l(LA, $0));
|
|
14012
|
+
let y0 = LA;
|
|
14013
|
+
var Rs, HZ, ol, Zb, oC, db, UI, gm, Bw;
|
|
14014
14014
|
class ow extends z {
|
|
14015
14015
|
constructor(g, C, A, i, Z, d) {
|
|
14016
14016
|
super();
|
|
14017
14017
|
w(this, gm);
|
|
14018
14018
|
w(this, Rs);
|
|
14019
14019
|
w(this, HZ, new Float32Array(4));
|
|
14020
|
-
w(this,
|
|
14020
|
+
w(this, ol);
|
|
14021
14021
|
w(this, Zb);
|
|
14022
14022
|
w(this, oC);
|
|
14023
14023
|
w(this, db);
|
|
14024
|
-
w(this,
|
|
14025
|
-
B(this,
|
|
14024
|
+
w(this, UI);
|
|
14025
|
+
B(this, UI, g), B(this, oC, C), B(this, Rs, A), B(this, db, i), B(this, ol, Z), B(this, Zb, d), this.firstPoint = [NaN, NaN], this.lastPoint = [NaN, NaN], Y(this, gm, Bw).call(this, d);
|
|
14026
14026
|
const [c, G, b, m] = l(this, HZ);
|
|
14027
14027
|
for (let W = 0, a = g.length; W < a; W += 2)
|
|
14028
14028
|
g[W] = (g[W] - c) / b, g[W + 1] = (g[W + 1] - G) / m;
|
|
@@ -14030,13 +14030,13 @@ class ow extends z {
|
|
|
14030
14030
|
C[W] = (C[W] - c) / b, C[W + 1] = (C[W + 1] - G) / m;
|
|
14031
14031
|
}
|
|
14032
14032
|
toSVGPath() {
|
|
14033
|
-
const g = [`M${l(this,
|
|
14034
|
-
for (let C = 6, A = l(this,
|
|
14035
|
-
if (isNaN(l(this,
|
|
14036
|
-
g.push(`L${l(this,
|
|
14033
|
+
const g = [`M${l(this, UI)[4]} ${l(this, UI)[5]}`];
|
|
14034
|
+
for (let C = 6, A = l(this, UI).length; C < A; C += 6) {
|
|
14035
|
+
if (isNaN(l(this, UI)[C])) {
|
|
14036
|
+
g.push(`L${l(this, UI)[C + 4]} ${l(this, UI)[C + 5]}`);
|
|
14037
14037
|
continue;
|
|
14038
14038
|
}
|
|
14039
|
-
g.push(`C${l(this,
|
|
14039
|
+
g.push(`C${l(this, UI)[C]} ${l(this, UI)[C + 1]} ${l(this, UI)[C + 2]} ${l(this, UI)[C + 3]} ${l(this, UI)[C + 4]} ${l(this, UI)[C + 5]}`);
|
|
14040
14040
|
}
|
|
14041
14041
|
return g.push("Z"), g.join(" ");
|
|
14042
14042
|
}
|
|
@@ -14045,16 +14045,16 @@ class ow extends z {
|
|
|
14045
14045
|
let G, b;
|
|
14046
14046
|
switch (Z) {
|
|
14047
14047
|
case 0:
|
|
14048
|
-
G = z._rescale(l(this,
|
|
14048
|
+
G = z._rescale(l(this, UI), g, i, d, -c), b = z._rescale(l(this, oC), g, i, d, -c);
|
|
14049
14049
|
break;
|
|
14050
14050
|
case 90:
|
|
14051
|
-
G = z._rescaleAndSwap(l(this,
|
|
14051
|
+
G = z._rescaleAndSwap(l(this, UI), g, C, d, c), b = z._rescaleAndSwap(l(this, oC), g, C, d, c);
|
|
14052
14052
|
break;
|
|
14053
14053
|
case 180:
|
|
14054
|
-
G = z._rescale(l(this,
|
|
14054
|
+
G = z._rescale(l(this, UI), A, C, -d, c), b = z._rescale(l(this, oC), A, C, -d, c);
|
|
14055
14055
|
break;
|
|
14056
14056
|
case 270:
|
|
14057
|
-
G = z._rescaleAndSwap(l(this,
|
|
14057
|
+
G = z._rescaleAndSwap(l(this, UI), A, i, -d, -c), b = z._rescaleAndSwap(l(this, oC), A, i, -d, -c);
|
|
14058
14058
|
break;
|
|
14059
14059
|
}
|
|
14060
14060
|
return {
|
|
@@ -14072,7 +14072,7 @@ class ow extends z {
|
|
|
14072
14072
|
const [A, i, Z, d] = l(this, HZ), [c, G, b, m] = l(this, Rs), W = Z * b, a = d * m, n = A * b + c, e = i * m + G, X = this.newOutliner({
|
|
14073
14073
|
x: l(this, oC)[0] * W + n,
|
|
14074
14074
|
y: l(this, oC)[1] * a + e
|
|
14075
|
-
}, l(this, Rs), l(this, db), g, l(this, Zb), C ?? l(this,
|
|
14075
|
+
}, l(this, Rs), l(this, db), g, l(this, Zb), C ?? l(this, ol));
|
|
14076
14076
|
for (let N = 2; N < l(this, oC).length; N += 2)
|
|
14077
14077
|
X.add({
|
|
14078
14078
|
x: l(this, oC)[N] * W + n,
|
|
@@ -14081,8 +14081,8 @@ class ow extends z {
|
|
|
14081
14081
|
return X.getOutlines();
|
|
14082
14082
|
}
|
|
14083
14083
|
}
|
|
14084
|
-
Rs = new WeakMap(), HZ = new WeakMap(),
|
|
14085
|
-
const C = l(this,
|
|
14084
|
+
Rs = new WeakMap(), HZ = new WeakMap(), ol = new WeakMap(), Zb = new WeakMap(), oC = new WeakMap(), db = new WeakMap(), UI = new WeakMap(), gm = new WeakSet(), Bw = function(g) {
|
|
14085
|
+
const C = l(this, UI);
|
|
14086
14086
|
let A = C[4], i = C[5];
|
|
14087
14087
|
const Z = [A, i, A, i];
|
|
14088
14088
|
let d = A, c = i, G = A, b = i;
|
|
@@ -14092,7 +14092,7 @@ Rs = new WeakMap(), HZ = new WeakMap(), bl = new WeakMap(), Zb = new WeakMap(),
|
|
|
14092
14092
|
isNaN(C[n]) ? (F.pointBoundingBox(X, N, Z), c > N ? (d = X, c = N) : c === N && (d = m(d, X)), b < N ? (G = X, b = N) : b === N && (G = m(G, X))) : (W[0] = W[1] = 1 / 0, W[2] = W[3] = -1 / 0, F.bezierBoundingBox(A, i, ...C.slice(n, n + 6), W), F.rectBoundingBox(W[0], W[1], W[2], W[3], Z), c > W[1] ? (d = W[0], c = W[1]) : c === W[1] && (d = m(d, W[0])), b < W[3] ? (G = W[2], b = W[3]) : b === W[3] && (G = m(G, W[2]))), A = X, i = N;
|
|
14093
14093
|
}
|
|
14094
14094
|
const a = l(this, HZ);
|
|
14095
|
-
a[0] = Z[0] - l(this,
|
|
14095
|
+
a[0] = Z[0] - l(this, ol), a[1] = Z[1] - l(this, ol), a[2] = Z[2] - Z[0] + 2 * l(this, ol), a[3] = Z[3] - Z[1] + 2 * l(this, ol), this.firstPoint = [d, c], this.lastPoint = [G, b];
|
|
14096
14096
|
};
|
|
14097
14097
|
var sb, cb, Gb, ci, _C, Tg, Ww, Z0, hw, ww, To;
|
|
14098
14098
|
class Lo {
|
|
@@ -14266,7 +14266,7 @@ class dt extends ow {
|
|
|
14266
14266
|
return new ro(I, g, C, A, i, Z);
|
|
14267
14267
|
}
|
|
14268
14268
|
}
|
|
14269
|
-
var ys, mb,
|
|
14269
|
+
var ys, mb, Bl, MZ, ob, Pg, Bb, Wb, DZ, BC, WC, hg, Hs, Ms, Mg, Ds, FC, hb, q, jo, d0, aw, Yw, tw, Qo, Ri, zC, dd, ew, s0, c0, nw, Vw, Nw, Xw, Rw;
|
|
14270
14270
|
const ZI = class ZI extends RI {
|
|
14271
14271
|
constructor(g) {
|
|
14272
14272
|
super({
|
|
@@ -14276,7 +14276,7 @@ const ZI = class ZI extends RI {
|
|
|
14276
14276
|
w(this, q);
|
|
14277
14277
|
w(this, ys, null);
|
|
14278
14278
|
w(this, mb, 0);
|
|
14279
|
-
w(this,
|
|
14279
|
+
w(this, Bl);
|
|
14280
14280
|
w(this, MZ, null);
|
|
14281
14281
|
w(this, ob, null);
|
|
14282
14282
|
w(this, Pg, null);
|
|
@@ -14292,7 +14292,7 @@ const ZI = class ZI extends RI {
|
|
|
14292
14292
|
w(this, Ds, "");
|
|
14293
14293
|
w(this, FC);
|
|
14294
14294
|
w(this, hb, "");
|
|
14295
|
-
this.color = g.color || ZI._defaultColor, B(this, FC, g.thickness || ZI._defaultThickness), this.opacity = g.opacity || ZI._defaultOpacity, B(this,
|
|
14295
|
+
this.color = g.color || ZI._defaultColor, B(this, FC, g.thickness || ZI._defaultThickness), this.opacity = g.opacity || ZI._defaultOpacity, B(this, Bl, g.boxes || null), B(this, hb, g.methodOfCreation || ""), B(this, Ds, g.text || ""), this._isDraggable = !1, this.defaultL10nId = "pdfjs-editor-highlight-editor", g.highlightId > -1 ? (B(this, hg, !0), Y(this, q, d0).call(this, g), Y(this, q, Ri).call(this)) : l(this, Bl) && (B(this, ys, g.anchorNode), B(this, mb, g.anchorOffset), B(this, Bb, g.focusNode), B(this, Wb, g.focusOffset), Y(this, q, jo).call(this), Y(this, q, Ri).call(this), this.rotate(this.rotation)), this.annotationElementId || this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert");
|
|
14296
14296
|
}
|
|
14297
14297
|
static get _keyboardManager() {
|
|
14298
14298
|
const g = ZI.prototype;
|
|
@@ -14513,7 +14513,7 @@ const ZI = class ZI extends RI {
|
|
|
14513
14513
|
signal: W
|
|
14514
14514
|
}), window.addEventListener("pointerup", a, {
|
|
14515
14515
|
signal: W
|
|
14516
|
-
}), window.addEventListener("pointerdown",
|
|
14516
|
+
}), window.addEventListener("pointerdown", QI, {
|
|
14517
14517
|
capture: !0,
|
|
14518
14518
|
passive: !1,
|
|
14519
14519
|
signal: W
|
|
@@ -14636,7 +14636,7 @@ const ZI = class ZI extends RI {
|
|
|
14636
14636
|
b.color = F.makeHexColor(...Z), b.opacity = G || 1, c && B(b, FC, g.thickness), b._initialData = i, g.comment && b.setCommentData(g);
|
|
14637
14637
|
const [m, W] = b.pageDimensions, [a, n] = b.pageTranslation;
|
|
14638
14638
|
if (d) {
|
|
14639
|
-
const V = B(b,
|
|
14639
|
+
const V = B(b, Bl, []);
|
|
14640
14640
|
for (let o = 0; o < d.length; o += 8)
|
|
14641
14641
|
V.push({
|
|
14642
14642
|
x: (d[o] - a) / m,
|
|
@@ -14703,10 +14703,10 @@ const ZI = class ZI extends RI {
|
|
|
14703
14703
|
return !1;
|
|
14704
14704
|
}
|
|
14705
14705
|
};
|
|
14706
|
-
ys = new WeakMap(), mb = new WeakMap(),
|
|
14707
|
-
const g = new Lo(l(this,
|
|
14706
|
+
ys = new WeakMap(), mb = new WeakMap(), Bl = new WeakMap(), MZ = new WeakMap(), ob = new WeakMap(), Pg = new WeakMap(), Bb = new WeakMap(), Wb = new WeakMap(), DZ = new WeakMap(), BC = new WeakMap(), WC = new WeakMap(), hg = new WeakMap(), Hs = new WeakMap(), Ms = new WeakMap(), Mg = new WeakMap(), Ds = new WeakMap(), FC = new WeakMap(), hb = new WeakMap(), q = new WeakSet(), jo = function() {
|
|
14707
|
+
const g = new Lo(l(this, Bl), 1e-3);
|
|
14708
14708
|
B(this, BC, g.getOutlines()), [this.x, this.y, this.width, this.height] = l(this, BC).box;
|
|
14709
|
-
const C = new Lo(l(this,
|
|
14709
|
+
const C = new Lo(l(this, Bl), 25e-4, 1e-3, this._uiManager.direction === "ltr");
|
|
14710
14710
|
B(this, Pg, C.getOutlines());
|
|
14711
14711
|
const {
|
|
14712
14712
|
firstPoint: A
|
|
@@ -14867,7 +14867,7 @@ ys = new WeakMap(), mb = new WeakMap(), ml = new WeakMap(), MZ = new WeakMap(),
|
|
|
14867
14867
|
}, nw = function() {
|
|
14868
14868
|
if (l(this, hg))
|
|
14869
14869
|
return null;
|
|
14870
|
-
const [g, C] = this.pageDimensions, [A, i] = this.pageTranslation, Z = l(this,
|
|
14870
|
+
const [g, C] = this.pageDimensions, [A, i] = this.pageTranslation, Z = l(this, Bl), d = new Float32Array(Z.length * 8);
|
|
14871
14871
|
let c = 0;
|
|
14872
14872
|
for (const {
|
|
14873
14873
|
x: G,
|
|
@@ -15139,7 +15139,7 @@ const II = class II extends RI {
|
|
|
15139
15139
|
}), Z.addEventListener("pointermove", this._drawMove.bind(this), {
|
|
15140
15140
|
signal: e
|
|
15141
15141
|
}), Z.addEventListener("touchmove", (N) => {
|
|
15142
|
-
Xg.isSameTimeStamp(N.timeStamp) &&
|
|
15142
|
+
Xg.isSameTimeStamp(N.timeStamp) && QI(N);
|
|
15143
15143
|
}, {
|
|
15144
15144
|
signal: e
|
|
15145
15145
|
}), g.toggleDrawing(), (X = C._editorUndoBar) == null || X.hide(), l(II, dg)) {
|
|
@@ -15163,7 +15163,7 @@ const II = class II extends RI {
|
|
|
15163
15163
|
this._endDraw(g);
|
|
15164
15164
|
return;
|
|
15165
15165
|
}
|
|
15166
|
-
this._currentParent.drawLayer.updateProperties(this._currentDrawId, l(II, dg).add(C, A)), Xg.setTimeStamp(g.timeStamp),
|
|
15166
|
+
this._currentParent.drawLayer.updateProperties(this._currentDrawId, l(II, dg).add(C, A)), Xg.setTimeStamp(g.timeStamp), QI(g);
|
|
15167
15167
|
}
|
|
15168
15168
|
}
|
|
15169
15169
|
static _cleanup(g) {
|
|
@@ -15473,7 +15473,7 @@ class st {
|
|
|
15473
15473
|
XA = new WeakMap(), sg = new WeakMap(), cg = new WeakMap(), FZ = new WeakMap(), ps = new WeakMap(), Sg = new WeakMap(), wg = new WeakMap(), JC = new WeakMap(), JZ = new WeakMap(), zZ = new WeakMap(), kZ = new WeakMap(), Ss = new WeakSet(), b0 = function(I, g) {
|
|
15474
15474
|
return z._normalizePoint(I, g, l(this, zZ), l(this, kZ), l(this, FZ));
|
|
15475
15475
|
};
|
|
15476
|
-
var Fg, wb, ab, wC, RA, uA, Fs, Js, LZ, Yg,
|
|
15476
|
+
var Fg, wb, ab, wC, RA, uA, Fs, Js, LZ, Yg, zA, Hw, Mw, Dw;
|
|
15477
15477
|
class ub extends z {
|
|
15478
15478
|
constructor() {
|
|
15479
15479
|
super(...arguments);
|
|
@@ -15617,9 +15617,9 @@ class ub extends z {
|
|
|
15617
15617
|
return g === "stroke-width" ? Y(this, Yg, Dw).call(this, C) : null;
|
|
15618
15618
|
}
|
|
15619
15619
|
updateParentDimensions([g, C], A) {
|
|
15620
|
-
const [i, Z] = Y(this, Yg,
|
|
15620
|
+
const [i, Z] = Y(this, Yg, zA).call(this);
|
|
15621
15621
|
B(this, RA, g), B(this, uA, C), B(this, Fs, A);
|
|
15622
|
-
const [d, c] = Y(this, Yg,
|
|
15622
|
+
const [d, c] = Y(this, Yg, zA).call(this), G = d - i, b = c - Z, m = l(this, Fg);
|
|
15623
15623
|
return m[0] -= G, m[1] -= b, m[2] += 2 * G, m[3] += 2 * b, m;
|
|
15624
15624
|
}
|
|
15625
15625
|
updateRotation(g) {
|
|
@@ -15662,7 +15662,7 @@ class ub extends z {
|
|
|
15662
15662
|
return `matrix(${A} ${i} ${Z} ${d} ${z.svgRound(c)} ${z.svgRound(G)})`;
|
|
15663
15663
|
}
|
|
15664
15664
|
getPathResizingSVGProperties([g, C, A, i]) {
|
|
15665
|
-
const [Z, d] = Y(this, Yg,
|
|
15665
|
+
const [Z, d] = Y(this, Yg, zA).call(this), [c, G, b, m] = l(this, Fg);
|
|
15666
15666
|
if (Math.abs(b - Z) <= z.PRECISION || Math.abs(m - d) <= z.PRECISION) {
|
|
15667
15667
|
const X = g + A / 2 - (c + b / 2), N = C + i / 2 - (G + m / 2);
|
|
15668
15668
|
return {
|
|
@@ -15681,7 +15681,7 @@ class ub extends z {
|
|
|
15681
15681
|
};
|
|
15682
15682
|
}
|
|
15683
15683
|
getPathResizedSVGProperties([g, C, A, i]) {
|
|
15684
|
-
const [Z, d] = Y(this, Yg,
|
|
15684
|
+
const [Z, d] = Y(this, Yg, zA).call(this), c = l(this, Fg), [G, b, m, W] = c;
|
|
15685
15685
|
if (c[0] = g, c[1] = C, c[2] = A, c[3] = i, Math.abs(m - Z) <= z.PRECISION || Math.abs(W - d) <= z.PRECISION) {
|
|
15686
15686
|
const N = g + A / 2 - (G + m / 2), u = C + i / 2 - (b + W / 2);
|
|
15687
15687
|
for (const {
|
|
@@ -15764,11 +15764,11 @@ class ub extends z {
|
|
|
15764
15764
|
};
|
|
15765
15765
|
}
|
|
15766
15766
|
}
|
|
15767
|
-
Fg = new WeakMap(), wb = new WeakMap(), ab = new WeakMap(), wC = new WeakMap(), RA = new WeakMap(), uA = new WeakMap(), Fs = new WeakMap(), Js = new WeakMap(), LZ = new WeakMap(), Yg = new WeakSet(),
|
|
15767
|
+
Fg = new WeakMap(), wb = new WeakMap(), ab = new WeakMap(), wC = new WeakMap(), RA = new WeakMap(), uA = new WeakMap(), Fs = new WeakMap(), Js = new WeakMap(), LZ = new WeakMap(), Yg = new WeakSet(), zA = function(g = l(this, LZ)) {
|
|
15768
15768
|
const C = l(this, ab) + g / 2 * l(this, Fs);
|
|
15769
15769
|
return l(this, Js) % 180 === 0 ? [C / l(this, RA), C / l(this, uA)] : [C / l(this, uA), C / l(this, RA)];
|
|
15770
15770
|
}, Hw = function() {
|
|
15771
|
-
const [g, C, A, i] = l(this, Fg), [Z, d] = Y(this, Yg,
|
|
15771
|
+
const [g, C, A, i] = l(this, Fg), [Z, d] = Y(this, Yg, zA).call(this, 0);
|
|
15772
15772
|
return [g + Z, C + d, A - 2 * Z, i - 2 * d];
|
|
15773
15773
|
}, Mw = function() {
|
|
15774
15774
|
const g = B(this, Fg, new Float32Array([1 / 0, 1 / 0, -1 / 0, -1 / 0]));
|
|
@@ -15786,12 +15786,12 @@ Fg = new WeakMap(), wb = new WeakMap(), ab = new WeakMap(), wC = new WeakMap(),
|
|
|
15786
15786
|
F.bezierBoundingBox(Z, d, b, m, W, a, n, e, g), Z = n, d = e;
|
|
15787
15787
|
}
|
|
15788
15788
|
}
|
|
15789
|
-
const [C, A] = Y(this, Yg,
|
|
15789
|
+
const [C, A] = Y(this, Yg, zA).call(this);
|
|
15790
15790
|
g[0] = kg(g[0] - C, 0, 1), g[1] = kg(g[1] - A, 0, 1), g[2] = kg(g[2] + C, 0, 1), g[3] = kg(g[3] + A, 0, 1), g[2] -= g[0], g[3] -= g[1];
|
|
15791
15791
|
}, Dw = function(g) {
|
|
15792
|
-
const [C, A] = Y(this, Yg,
|
|
15792
|
+
const [C, A] = Y(this, Yg, zA).call(this);
|
|
15793
15793
|
B(this, LZ, g);
|
|
15794
|
-
const [i, Z] = Y(this, Yg,
|
|
15794
|
+
const [i, Z] = Y(this, Yg, zA).call(this), [d, c] = [i - C, Z - A], G = l(this, Fg);
|
|
15795
15795
|
return G[0] -= d, G[1] -= c, G[2] += 2 * d, G[3] += 2 * c, G;
|
|
15796
15796
|
};
|
|
15797
15797
|
class Gm extends uw {
|
|
@@ -15990,7 +15990,7 @@ class Eo extends ub {
|
|
|
15990
15990
|
}
|
|
15991
15991
|
const Jb = 8, _s = 3;
|
|
15992
15992
|
var TZ, cI, Po, $C, pw, Sw, fo, m0, Fw, Jw, zw, qo, _o, kw;
|
|
15993
|
-
class
|
|
15993
|
+
class tl {
|
|
15994
15994
|
static extractContoursFromText(I, {
|
|
15995
15995
|
fontFamily: g,
|
|
15996
15996
|
fontStyle: C,
|
|
@@ -16357,12 +16357,12 @@ TZ = new WeakMap(), cI = new WeakSet(), Po = function(I, g, C, A) {
|
|
|
16357
16357
|
G.fillStyle = "white", G.fillRect(0, 0, Z, d), G.filter = "grayscale(1)", G.drawImage(I, 0, 0, I.width, I.height, 0, 0, Z, d);
|
|
16358
16358
|
const b = G.getImageData(0, 0, Z, d).data;
|
|
16359
16359
|
return [Y(this, cI, qo).call(this, b), Z, d];
|
|
16360
|
-
}, w(
|
|
16360
|
+
}, w(tl, cI), w(tl, TZ, {
|
|
16361
16361
|
maxDim: 512,
|
|
16362
16362
|
sigmaSFactor: 0.02,
|
|
16363
16363
|
sigmaR: 25,
|
|
16364
16364
|
kernelSize: 16
|
|
16365
|
-
}), w(
|
|
16365
|
+
}), w(tl, $C, new Int32Array([0, 1, -1, 1, -1, 0, -1, -1, 0, -1, 1, -1, 1, 0, 1, 1]));
|
|
16366
16366
|
class NB extends uw {
|
|
16367
16367
|
constructor() {
|
|
16368
16368
|
super(), super.updateProperties({
|
|
@@ -16458,7 +16458,7 @@ const $g = class $g extends M0 {
|
|
|
16458
16458
|
pageHeight: W
|
|
16459
16459
|
},
|
|
16460
16460
|
rotation: a
|
|
16461
|
-
} = this.parent.viewport, n =
|
|
16461
|
+
} = this.parent.viewport, n = tl.processDrawnLines({
|
|
16462
16462
|
lines: i,
|
|
16463
16463
|
pageWidth: m,
|
|
16464
16464
|
pageHeight: W,
|
|
@@ -16501,7 +16501,7 @@ const $g = class $g extends M0 {
|
|
|
16501
16501
|
thickness: A,
|
|
16502
16502
|
width: i,
|
|
16503
16503
|
height: Z
|
|
16504
|
-
} = l(this, bi), d = Math.max(i, Z), c =
|
|
16504
|
+
} = l(this, bi), d = Math.max(i, Z), c = tl.processDrawnLines({
|
|
16505
16505
|
lines: {
|
|
16506
16506
|
curves: g.map((G) => ({
|
|
16507
16507
|
points: G
|
|
@@ -16558,7 +16558,7 @@ const $g = class $g extends M0 {
|
|
|
16558
16558
|
},
|
|
16559
16559
|
rotation: i
|
|
16560
16560
|
} = this.parent.viewport;
|
|
16561
|
-
return
|
|
16561
|
+
return tl.process(g, C, A, i, $g._INNER_MARGIN);
|
|
16562
16562
|
}
|
|
16563
16563
|
getFromText(g, C) {
|
|
16564
16564
|
const {
|
|
@@ -16568,7 +16568,7 @@ const $g = class $g extends M0 {
|
|
|
16568
16568
|
},
|
|
16569
16569
|
rotation: Z
|
|
16570
16570
|
} = this.parent.viewport;
|
|
16571
|
-
return
|
|
16571
|
+
return tl.extractContoursFromText(g, C, A, i, Z, $g._INNER_MARGIN);
|
|
16572
16572
|
}
|
|
16573
16573
|
getDrawnSignature(g) {
|
|
16574
16574
|
const {
|
|
@@ -16578,7 +16578,7 @@ const $g = class $g extends M0 {
|
|
|
16578
16578
|
},
|
|
16579
16579
|
rotation: i
|
|
16580
16580
|
} = this.parent.viewport;
|
|
16581
|
-
return
|
|
16581
|
+
return tl.processDrawnLines({
|
|
16582
16582
|
lines: g,
|
|
16583
16583
|
pageWidth: C,
|
|
16584
16584
|
pageHeight: A,
|
|
@@ -16631,7 +16631,7 @@ const $g = class $g extends M0 {
|
|
|
16631
16631
|
};
|
|
16632
16632
|
Gi = new WeakMap(), yA = new WeakMap(), bi = new WeakMap(), rZ = new WeakMap(), M($g, "_type", "signature"), M($g, "_editorType", P.SIGNATURE), M($g, "_defaultDrawingOptions", null);
|
|
16633
16633
|
let $o = $g;
|
|
16634
|
-
var MI, Gg, mi,
|
|
16634
|
+
var MI, Gg, mi, Wl, oi, zs, hl, jZ, HA, aC, ks, lI, ac, Yc, o0, B0, W0, gB, h0, Lw;
|
|
16635
16635
|
class IB extends RI {
|
|
16636
16636
|
constructor(g) {
|
|
16637
16637
|
super({
|
|
@@ -16642,15 +16642,15 @@ class IB extends RI {
|
|
|
16642
16642
|
w(this, MI, null);
|
|
16643
16643
|
w(this, Gg, null);
|
|
16644
16644
|
w(this, mi, null);
|
|
16645
|
-
w(this,
|
|
16645
|
+
w(this, Wl, null);
|
|
16646
16646
|
w(this, oi, null);
|
|
16647
16647
|
w(this, zs, "");
|
|
16648
|
-
w(this,
|
|
16648
|
+
w(this, hl, null);
|
|
16649
16649
|
w(this, jZ, !1);
|
|
16650
16650
|
w(this, HA, null);
|
|
16651
16651
|
w(this, aC, !1);
|
|
16652
16652
|
w(this, ks, !1);
|
|
16653
|
-
B(this,
|
|
16653
|
+
B(this, Wl, g.bitmapUrl), B(this, oi, g.bitmapFile), this.defaultL10nId = "pdfjs-editor-stamp-editor";
|
|
16654
16654
|
}
|
|
16655
16655
|
static initialize(g, C) {
|
|
16656
16656
|
RI.initialize(g, C);
|
|
@@ -16721,20 +16721,20 @@ class IB extends RI {
|
|
|
16721
16721
|
}
|
|
16722
16722
|
remove() {
|
|
16723
16723
|
var g;
|
|
16724
|
-
l(this, Gg) && (B(this, MI, null), this._uiManager.imageManager.deleteId(l(this, Gg)), (g = l(this,
|
|
16724
|
+
l(this, Gg) && (B(this, MI, null), this._uiManager.imageManager.deleteId(l(this, Gg)), (g = l(this, hl)) == null || g.remove(), B(this, hl, null), l(this, HA) && (clearTimeout(l(this, HA)), B(this, HA, null))), super.remove();
|
|
16725
16725
|
}
|
|
16726
16726
|
rebuild() {
|
|
16727
16727
|
if (!this.parent) {
|
|
16728
16728
|
l(this, Gg) && Y(this, lI, o0).call(this);
|
|
16729
16729
|
return;
|
|
16730
16730
|
}
|
|
16731
|
-
super.rebuild(), this.div !== null && (l(this, Gg) && l(this,
|
|
16731
|
+
super.rebuild(), this.div !== null && (l(this, Gg) && l(this, hl) === null && Y(this, lI, o0).call(this), this.isAttachedToDOM || this.parent.add(this));
|
|
16732
16732
|
}
|
|
16733
16733
|
onceAdded(g) {
|
|
16734
16734
|
this._isDraggable = !0, g && this.div.focus();
|
|
16735
16735
|
}
|
|
16736
16736
|
isEmpty() {
|
|
16737
|
-
return !(l(this, mi) || l(this, MI) || l(this,
|
|
16737
|
+
return !(l(this, mi) || l(this, MI) || l(this, Wl) || l(this, oi) || l(this, Gg) || l(this, jZ));
|
|
16738
16738
|
}
|
|
16739
16739
|
get toolbarButtons() {
|
|
16740
16740
|
return [["altText", this.createAltText()]];
|
|
@@ -16770,7 +16770,7 @@ class IB extends RI {
|
|
|
16770
16770
|
const {
|
|
16771
16771
|
width: i,
|
|
16772
16772
|
height: Z
|
|
16773
|
-
} = l(this, MI), d = new
|
|
16773
|
+
} = l(this, MI), d = new pA();
|
|
16774
16774
|
let c = l(this, MI), G = i, b = Z, m = null;
|
|
16775
16775
|
if (C) {
|
|
16776
16776
|
if (i > C || Z > C) {
|
|
@@ -16873,7 +16873,7 @@ class IB extends RI {
|
|
|
16873
16873
|
isSvg: W,
|
|
16874
16874
|
accessibilityData: a
|
|
16875
16875
|
} = g;
|
|
16876
|
-
Z ? (A.addMissingCanvas(g.id, d), B(d, jZ, !0)) : m && A.imageManager.isValidId(m) ? (B(d, Gg, m), G && B(d, MI, G)) : B(d,
|
|
16876
|
+
Z ? (A.addMissingCanvas(g.id, d), B(d, jZ, !0)) : m && A.imageManager.isValidId(m) ? (B(d, Gg, m), G && B(d, MI, G)) : B(d, Wl, b), B(d, aC, W);
|
|
16877
16877
|
const [n, e] = d.pageDimensions;
|
|
16878
16878
|
return d.width = (c[2] - c[0]) / n, d.height = (c[3] - c[1]) / e, a && (d.altTextData = a), d._initialData = i, g.comment && d.setCommentData(g), B(d, ks, !!i), d;
|
|
16879
16879
|
}
|
|
@@ -16921,14 +16921,14 @@ class IB extends RI {
|
|
|
16921
16921
|
}), null);
|
|
16922
16922
|
}
|
|
16923
16923
|
}
|
|
16924
|
-
MI = new WeakMap(), Gg = new WeakMap(), mi = new WeakMap(),
|
|
16924
|
+
MI = new WeakMap(), Gg = new WeakMap(), mi = new WeakMap(), Wl = new WeakMap(), oi = new WeakMap(), zs = new WeakMap(), hl = new WeakMap(), jZ = new WeakMap(), HA = new WeakMap(), aC = new WeakMap(), ks = new WeakMap(), lI = new WeakSet(), ac = function(g, C = !1) {
|
|
16925
16925
|
if (!g) {
|
|
16926
16926
|
this.remove();
|
|
16927
16927
|
return;
|
|
16928
16928
|
}
|
|
16929
16929
|
B(this, MI, g.bitmap), C || (B(this, Gg, g.id), B(this, aC, g.isSvg)), g.file && B(this, zs, g.file.name), Y(this, lI, B0).call(this);
|
|
16930
16930
|
}, Yc = function() {
|
|
16931
|
-
if (B(this, mi, null), this._uiManager.enableWaiting(!1), !!l(this,
|
|
16931
|
+
if (B(this, mi, null), this._uiManager.enableWaiting(!1), !!l(this, hl)) {
|
|
16932
16932
|
if (this._uiManager.useNewAltTextWhenAddingImage && this._uiManager.useNewAltTextFlow && l(this, MI)) {
|
|
16933
16933
|
this.addEditToolbar().then(() => {
|
|
16934
16934
|
this._editToolbar.hide(), this._uiManager.editAltText(this, !0);
|
|
@@ -16955,9 +16955,9 @@ MI = new WeakMap(), Gg = new WeakMap(), mi = new WeakMap(), ol = new WeakMap(),
|
|
|
16955
16955
|
this._uiManager.enableWaiting(!0), this._uiManager.imageManager.getFromId(l(this, Gg)).then((A) => Y(this, lI, ac).call(this, A, !0)).finally(() => Y(this, lI, Yc).call(this));
|
|
16956
16956
|
return;
|
|
16957
16957
|
}
|
|
16958
|
-
if (l(this,
|
|
16959
|
-
const A = l(this,
|
|
16960
|
-
B(this,
|
|
16958
|
+
if (l(this, Wl)) {
|
|
16959
|
+
const A = l(this, Wl);
|
|
16960
|
+
B(this, Wl, null), this._uiManager.enableWaiting(!0), B(this, mi, this._uiManager.imageManager.getFromUrl(A).then((i) => Y(this, lI, ac).call(this, i)).finally(() => Y(this, lI, Yc).call(this)));
|
|
16961
16961
|
return;
|
|
16962
16962
|
}
|
|
16963
16963
|
if (l(this, oi)) {
|
|
@@ -17008,7 +17008,7 @@ MI = new WeakMap(), Gg = new WeakMap(), mi = new WeakMap(), ol = new WeakMap(),
|
|
|
17008
17008
|
C *= b, A *= b;
|
|
17009
17009
|
}
|
|
17010
17010
|
this._uiManager.enableWaiting(!1);
|
|
17011
|
-
const c = B(this,
|
|
17011
|
+
const c = B(this, hl, document.createElement("canvas"));
|
|
17012
17012
|
c.setAttribute("role", "img"), this.addContainer(c), this.width = C / i, this.height = A / Z, this.setDims(), (G = this._initialOptions) != null && G.isCentered ? this.center() : this.fixAndSetPosition(), this._initialOptions = null, (!this._uiManager.useNewAltTextWhenAddingImage || !this._uiManager.useNewAltTextFlow || this.annotationElementId) && (g.hidden = !1), Y(this, lI, gB).call(this), l(this, ks) || (this.parent.addUndoableEditor(this), B(this, ks, !0)), this._reportTelemetry({
|
|
17013
17013
|
action: "inserted_image"
|
|
17014
17014
|
}), l(this, zs) && this.div.setAttribute("aria-description", l(this, zs)), this.annotationElementId || this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert");
|
|
@@ -17029,7 +17029,7 @@ MI = new WeakMap(), Gg = new WeakMap(), mi = new WeakMap(), ol = new WeakMap(),
|
|
|
17029
17029
|
const [g, C] = this.parentDimensions, {
|
|
17030
17030
|
width: A,
|
|
17031
17031
|
height: i
|
|
17032
|
-
} = this, Z = new
|
|
17032
|
+
} = this, Z = new pA(), d = Math.ceil(A * g * Z.sx), c = Math.ceil(i * C * Z.sy), G = l(this, hl);
|
|
17033
17033
|
if (!G || G.width === d && G.height === c)
|
|
17034
17034
|
return;
|
|
17035
17035
|
G.width = d, G.height = c;
|
|
@@ -17066,7 +17066,7 @@ MI = new WeakMap(), Gg = new WeakMap(), mi = new WeakMap(), ol = new WeakMap(),
|
|
|
17066
17066
|
isSameAltText: Z
|
|
17067
17067
|
};
|
|
17068
17068
|
}, M(IB, "_type", "stamp"), M(IB, "_editorType", P.STAMP);
|
|
17069
|
-
var QZ, Ls, Bi, Wi,
|
|
17069
|
+
var QZ, Ls, Bi, Wi, wl, fg, hi, Ts, rs, IA, al, bg, Yl, wi, js, L, ai, eI, AB, Tw, dA, lB, iB, w0;
|
|
17070
17070
|
const QC = class QC {
|
|
17071
17071
|
constructor({
|
|
17072
17072
|
uiManager: I,
|
|
@@ -17085,15 +17085,15 @@ const QC = class QC {
|
|
|
17085
17085
|
w(this, Ls, !1);
|
|
17086
17086
|
w(this, Bi, null);
|
|
17087
17087
|
w(this, Wi, null);
|
|
17088
|
-
w(this,
|
|
17088
|
+
w(this, wl, null);
|
|
17089
17089
|
w(this, fg, /* @__PURE__ */ new Map());
|
|
17090
17090
|
w(this, hi, !1);
|
|
17091
17091
|
w(this, Ts, !1);
|
|
17092
17092
|
w(this, rs, !1);
|
|
17093
17093
|
w(this, IA, null);
|
|
17094
|
-
w(this,
|
|
17094
|
+
w(this, al, null);
|
|
17095
17095
|
w(this, bg, null);
|
|
17096
|
-
w(this,
|
|
17096
|
+
w(this, Yl, null);
|
|
17097
17097
|
w(this, wi, null);
|
|
17098
17098
|
w(this, js, -1);
|
|
17099
17099
|
w(this, L);
|
|
@@ -17273,9 +17273,9 @@ const QC = class QC {
|
|
|
17273
17273
|
}
|
|
17274
17274
|
enableTextSelection() {
|
|
17275
17275
|
var I;
|
|
17276
|
-
if (this.div.tabIndex = -1, (I = l(this, bg)) != null && I.div && !l(this,
|
|
17277
|
-
B(this,
|
|
17278
|
-
const g = l(this, L).combinedSignal(l(this,
|
|
17276
|
+
if (this.div.tabIndex = -1, (I = l(this, bg)) != null && I.div && !l(this, Yl)) {
|
|
17277
|
+
B(this, Yl, new AbortController());
|
|
17278
|
+
const g = l(this, L).combinedSignal(l(this, Yl));
|
|
17279
17279
|
l(this, bg).div.addEventListener("pointerdown", Y(this, eI, Tw).bind(this), {
|
|
17280
17280
|
signal: g
|
|
17281
17281
|
}), l(this, bg).div.classList.add("highlighting");
|
|
@@ -17283,7 +17283,7 @@ const QC = class QC {
|
|
|
17283
17283
|
}
|
|
17284
17284
|
disableTextSelection() {
|
|
17285
17285
|
var I;
|
|
17286
|
-
this.div.tabIndex = 0, (I = l(this, bg)) != null && I.div && l(this,
|
|
17286
|
+
this.div.tabIndex = 0, (I = l(this, bg)) != null && I.div && l(this, Yl) && (l(this, Yl).abort(), B(this, Yl, null), l(this, bg).div.classList.remove("highlighting"));
|
|
17287
17287
|
}
|
|
17288
17288
|
enableClick() {
|
|
17289
17289
|
if (l(this, Wi))
|
|
@@ -17338,8 +17338,8 @@ const QC = class QC {
|
|
|
17338
17338
|
const {
|
|
17339
17339
|
activeElement: g
|
|
17340
17340
|
} = document;
|
|
17341
|
-
I.div.contains(g) && !l(this,
|
|
17342
|
-
B(this,
|
|
17341
|
+
I.div.contains(g) && !l(this, wl) && (I._focusEventsAllowed = !1, B(this, wl, setTimeout(() => {
|
|
17342
|
+
B(this, wl, null), I.div.contains(document.activeElement) ? I._focusEventsAllowed = !0 : (I.div.addEventListener("focusin", () => {
|
|
17343
17343
|
I._focusEventsAllowed = !0;
|
|
17344
17344
|
}, {
|
|
17345
17345
|
once: !0,
|
|
@@ -17471,7 +17471,7 @@ const QC = class QC {
|
|
|
17471
17471
|
this.div.addEventListener("blur", ({
|
|
17472
17472
|
relatedTarget: C
|
|
17473
17473
|
}) => {
|
|
17474
|
-
C && !this.div.contains(C) && (B(this,
|
|
17474
|
+
C && !this.div.contains(C) && (B(this, al, null), this.commitOrRemove());
|
|
17475
17475
|
}, {
|
|
17476
17476
|
signal: g
|
|
17477
17477
|
}), l(this, eI, dA).startDrawing(this, l(this, L), !1, I);
|
|
@@ -17481,16 +17481,16 @@ const QC = class QC {
|
|
|
17481
17481
|
const {
|
|
17482
17482
|
activeElement: g
|
|
17483
17483
|
} = document;
|
|
17484
|
-
this.div.contains(g) && B(this,
|
|
17484
|
+
this.div.contains(g) && B(this, al, g);
|
|
17485
17485
|
return;
|
|
17486
17486
|
}
|
|
17487
|
-
l(this,
|
|
17487
|
+
l(this, al) && setTimeout(() => {
|
|
17488
17488
|
var g;
|
|
17489
|
-
(g = l(this,
|
|
17489
|
+
(g = l(this, al)) == null || g.focus(), B(this, al, null);
|
|
17490
17490
|
}, 0);
|
|
17491
17491
|
}
|
|
17492
17492
|
endDrawingSession(I = !1) {
|
|
17493
|
-
return l(this, IA) ? (l(this, L).setCurrentDrawingSession(null), l(this, IA).abort(), B(this, IA, null), B(this,
|
|
17493
|
+
return l(this, IA) ? (l(this, L).setCurrentDrawingSession(null), l(this, IA).abort(), B(this, IA, null), B(this, al, null), l(this, eI, dA).endDrawing(I)) : null;
|
|
17494
17494
|
}
|
|
17495
17495
|
findNewParent(I, g, C) {
|
|
17496
17496
|
const A = l(this, L).findParent(g, C);
|
|
@@ -17504,7 +17504,7 @@ const QC = class QC {
|
|
|
17504
17504
|
}
|
|
17505
17505
|
destroy() {
|
|
17506
17506
|
var I, g;
|
|
17507
|
-
this.commitOrRemove(), ((I = l(this, L).getActive()) == null ? void 0 : I.parent) === this && (l(this, L).commitOrRemove(), l(this, L).setActiveEditor(null)), l(this,
|
|
17507
|
+
this.commitOrRemove(), ((I = l(this, L).getActive()) == null ? void 0 : I.parent) === this && (l(this, L).commitOrRemove(), l(this, L).setActiveEditor(null)), l(this, wl) && (clearTimeout(l(this, wl)), B(this, wl, null));
|
|
17508
17508
|
for (const C of l(this, fg).values())
|
|
17509
17509
|
(g = l(this, QZ)) == null || g.removePointerInTextLayer(C.contentDiv), C.setParent(null), C.isAttachedToDOM = !1, C.div.remove();
|
|
17510
17510
|
this.div = null, l(this, fg).clear(), l(this, L).removeLayer(this);
|
|
@@ -17539,7 +17539,7 @@ const QC = class QC {
|
|
|
17539
17539
|
return l(this, L).viewParameters.realScale;
|
|
17540
17540
|
}
|
|
17541
17541
|
};
|
|
17542
|
-
QZ = new WeakMap(), Ls = new WeakMap(), Bi = new WeakMap(), Wi = new WeakMap(),
|
|
17542
|
+
QZ = new WeakMap(), Ls = new WeakMap(), Bi = new WeakMap(), Wi = new WeakMap(), wl = new WeakMap(), fg = new WeakMap(), hi = new WeakMap(), Ts = new WeakMap(), rs = new WeakMap(), IA = new WeakMap(), al = new WeakMap(), bg = new WeakMap(), Yl = new WeakMap(), wi = new WeakMap(), js = new WeakMap(), L = new WeakMap(), ai = new WeakMap(), eI = new WeakSet(), AB = function() {
|
|
17543
17543
|
return l(this, fg).size !== 0 ? l(this, fg).values() : l(this, L).getEditors(this.pageIndex);
|
|
17544
17544
|
}, Tw = function(I) {
|
|
17545
17545
|
l(this, L).unselectAll();
|
|
@@ -17584,12 +17584,12 @@ QZ = new WeakMap(), Ls = new WeakMap(), Bi = new WeakMap(), Wi = new WeakMap(),
|
|
|
17584
17584
|
I.isEmpty() && I.remove();
|
|
17585
17585
|
}, M(QC, "_initialized", !1), w(QC, ai, new Map([zo, vo, IB, H0, $o].map((I) => [I._editorType, I])));
|
|
17586
17586
|
let CB = QC;
|
|
17587
|
-
var gA, Jg, xZ, Yb, Am, rw,
|
|
17587
|
+
var gA, Jg, xZ, Yb, Am, rw, SA, dB, jw, sB;
|
|
17588
17588
|
const $I = class $I {
|
|
17589
17589
|
constructor({
|
|
17590
17590
|
pageIndex: I
|
|
17591
17591
|
}) {
|
|
17592
|
-
w(this,
|
|
17592
|
+
w(this, SA);
|
|
17593
17593
|
w(this, gA, null);
|
|
17594
17594
|
w(this, Jg, /* @__PURE__ */ new Map());
|
|
17595
17595
|
w(this, xZ, /* @__PURE__ */ new Map());
|
|
@@ -17611,20 +17611,20 @@ const $I = class $I {
|
|
|
17611
17611
|
return v(this, "_svgFactory", new u0());
|
|
17612
17612
|
}
|
|
17613
17613
|
draw(I, g = !1, C = !1) {
|
|
17614
|
-
const A = qI($I, Yb)._++, i = Y(this,
|
|
17614
|
+
const A = qI($I, Yb)._++, i = Y(this, SA, dB).call(this), Z = $I._svgFactory.createElement("defs");
|
|
17615
17615
|
i.append(Z);
|
|
17616
17616
|
const d = $I._svgFactory.createElement("path");
|
|
17617
17617
|
Z.append(d);
|
|
17618
17618
|
const c = `path_p${this.pageIndex}_${A}`;
|
|
17619
17619
|
d.setAttribute("id", c), d.setAttribute("vector-effect", "non-scaling-stroke"), g && l(this, xZ).set(A, d);
|
|
17620
|
-
const G = C ? Y(this,
|
|
17620
|
+
const G = C ? Y(this, SA, jw).call(this, Z, c) : null, b = $I._svgFactory.createElement("use");
|
|
17621
17621
|
return i.append(b), b.setAttribute("href", `#${c}`), this.updateProperties(i, I), l(this, Jg).set(A, i), {
|
|
17622
17622
|
id: A,
|
|
17623
17623
|
clipPathId: `url(#${G})`
|
|
17624
17624
|
};
|
|
17625
17625
|
}
|
|
17626
17626
|
drawOutline(I, g) {
|
|
17627
|
-
const C = qI($I, Yb)._++, A = Y(this,
|
|
17627
|
+
const C = qI($I, Yb)._++, A = Y(this, SA, dB).call(this), i = $I._svgFactory.createElement("defs");
|
|
17628
17628
|
A.append(i);
|
|
17629
17629
|
const Z = $I._svgFactory.createElement("path");
|
|
17630
17630
|
i.append(Z);
|
|
@@ -17658,7 +17658,7 @@ const $I = class $I {
|
|
|
17658
17658
|
path: Z
|
|
17659
17659
|
} = g, d = typeof I == "number" ? l(this, Jg).get(I) : I;
|
|
17660
17660
|
if (d) {
|
|
17661
|
-
if (C && Y(this,
|
|
17661
|
+
if (C && Y(this, SA, sB).call(this, d, C), A && Y(c = $I, Am, rw).call(c, d, A), i) {
|
|
17662
17662
|
const {
|
|
17663
17663
|
classList: G
|
|
17664
17664
|
} = d;
|
|
@@ -17667,7 +17667,7 @@ const $I = class $I {
|
|
|
17667
17667
|
}
|
|
17668
17668
|
if (Z) {
|
|
17669
17669
|
const b = d.firstElementChild.firstElementChild;
|
|
17670
|
-
Y(this,
|
|
17670
|
+
Y(this, SA, sB).call(this, b, Z);
|
|
17671
17671
|
}
|
|
17672
17672
|
}
|
|
17673
17673
|
}
|
|
@@ -17692,7 +17692,7 @@ gA = new WeakMap(), Jg = new WeakMap(), xZ = new WeakMap(), Yb = new WeakMap(),
|
|
|
17692
17692
|
style: Z
|
|
17693
17693
|
} = I;
|
|
17694
17694
|
Z.top = `${100 * C}%`, Z.left = `${100 * g}%`, Z.width = `${100 * A}%`, Z.height = `${100 * i}%`;
|
|
17695
|
-
},
|
|
17695
|
+
}, SA = new WeakSet(), dB = function() {
|
|
17696
17696
|
const I = $I._svgFactory.create(1, 1, !0);
|
|
17697
17697
|
return l(this, gA).append(I), I.setAttribute("aria-hidden", !0), I;
|
|
17698
17698
|
}, jw = function(I, g) {
|
|
@@ -17745,7 +17745,7 @@ globalThis.pdfjsLib = {
|
|
|
17745
17745
|
noContextMenu: TC,
|
|
17746
17746
|
normalizeUnicode: ea,
|
|
17747
17747
|
OPS: Vc,
|
|
17748
|
-
OutputScale:
|
|
17748
|
+
OutputScale: pA,
|
|
17749
17749
|
PasswordResponses: ma,
|
|
17750
17750
|
PDFDataRangeTransport: rh,
|
|
17751
17751
|
PDFDateString: Y0,
|
|
@@ -17757,8 +17757,8 @@ globalThis.pdfjsLib = {
|
|
|
17757
17757
|
ResponseException: a0,
|
|
17758
17758
|
setLayerDimensions: vZ,
|
|
17759
17759
|
shadow: v,
|
|
17760
|
-
SignatureExtractor:
|
|
17761
|
-
stopEvent:
|
|
17760
|
+
SignatureExtractor: tl,
|
|
17761
|
+
stopEvent: QI,
|
|
17762
17762
|
SupportedImageMimeTypes: km,
|
|
17763
17763
|
TextLayer: Xc,
|
|
17764
17764
|
TouchManager: e0,
|
|
@@ -18749,7 +18749,7 @@ Object.defineProperty($Z.prototype, "value", { get: function() {
|
|
|
18749
18749
|
if (this.h(), s !== void 0 && (s.i = this.i), 16 & this.f) throw this.v;
|
|
18750
18750
|
return this.v;
|
|
18751
18751
|
} });
|
|
18752
|
-
function
|
|
18752
|
+
function FI(s, I) {
|
|
18753
18753
|
return new $Z(s, I);
|
|
18754
18754
|
}
|
|
18755
18755
|
function Aa(s) {
|
|
@@ -18813,15 +18813,15 @@ function hd(s, I) {
|
|
|
18813
18813
|
var C = g.d.bind(g);
|
|
18814
18814
|
return C[Symbol.dispose] = C, C;
|
|
18815
18815
|
}
|
|
18816
|
-
const PI = eg(0), om = eg(0), Cg = eg(!1), Qs = eg(!0), k0 = eg("landscape"), BB = eg("read"), SB = eg("auto"), FB = eg(!0), jt = eg(!1), la = eg("#7367f0"), JB = eg(!1), ia = eg(!1),
|
|
18816
|
+
const PI = eg(0), om = eg(0), Cg = eg(!1), Qs = eg(!0), k0 = eg("landscape"), BB = eg("read"), SB = eg("auto"), FB = eg(!0), jt = eg(!1), la = eg("#7367f0"), JB = eg(!1), ia = eg(!1), KA = eg(!1), zB = eg(3e3), DA = eg(!0), dI = eg({
|
|
18817
18817
|
isActive: !1,
|
|
18818
18818
|
translateX: 0,
|
|
18819
18819
|
translateY: 0,
|
|
18820
18820
|
isDragging: !1,
|
|
18821
18821
|
scale: 1
|
|
18822
|
-
}),
|
|
18822
|
+
}), el = eg([]), Bm = FI(() => !Cg.value && k0.value === "landscape"), Qt = FI(() => Bm.value && PI.value === 0), xt = FI(() => Bm.value ? PI.value >= om.value - 1 : !1);
|
|
18823
18823
|
function Ut(s, I, g, C) {
|
|
18824
|
-
om.value = I,
|
|
18824
|
+
om.value = I, el.value = g, jt.value = C, s.theme !== void 0 && (SB.value = s.theme), s.primaryColor !== void 0 && (la.value = s.primaryColor), s.showThumbs !== void 0 && (Qs.value = s.showThumbs), s.allowDownload !== void 0 && (FB.value = s.allowDownload), s.whiteLabel !== void 0 && (JB.value = s.whiteLabel), s.soundEnabled !== void 0 && (DA.value = s.soundEnabled), s.isSingleMode !== void 0 && (Cg.value = s.isSingleMode), s.singleMode !== void 0 && (Cg.value = s.singleMode), s.autoPlay !== void 0 && (KA.value = s.autoPlay), s.autoPlayInterval !== void 0 && (zB.value = s.autoPlayInterval), PI.value = 0;
|
|
18825
18825
|
}
|
|
18826
18826
|
const Ot = {
|
|
18827
18827
|
emptyStateTitle: "No data available.",
|
|
@@ -18871,7 +18871,7 @@ function Pt(s) {
|
|
|
18871
18871
|
/* @__PURE__ */ p(
|
|
18872
18872
|
"button",
|
|
18873
18873
|
{
|
|
18874
|
-
class:
|
|
18874
|
+
class: FI(() => `bk-btn ${Qs.value ? "active" : ""}`),
|
|
18875
18875
|
onClick: s.onToggleThumbs,
|
|
18876
18876
|
title: I.thumbnails || "Thumbnails",
|
|
18877
18877
|
children: /* @__PURE__ */ p("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: [
|
|
@@ -18885,7 +18885,7 @@ function Pt(s) {
|
|
|
18885
18885
|
/* @__PURE__ */ p(
|
|
18886
18886
|
"button",
|
|
18887
18887
|
{
|
|
18888
|
-
class:
|
|
18888
|
+
class: FI(() => `bk-btn bz-hide-mobile ${Cg.value ? "active" : ""}`),
|
|
18889
18889
|
onClick: s.onToggleSingleMode,
|
|
18890
18890
|
title: I.singlePageMode || "Single Page",
|
|
18891
18891
|
children: /* @__PURE__ */ p("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: [
|
|
@@ -18900,19 +18900,22 @@ function Pt(s) {
|
|
|
18900
18900
|
/* @__PURE__ */ p(
|
|
18901
18901
|
"button",
|
|
18902
18902
|
{
|
|
18903
|
-
class:
|
|
18903
|
+
class: FI(() => `bk-btn ${KA.value ? "active" : ""}`),
|
|
18904
18904
|
onClick: s.onToggleAutoPlay,
|
|
18905
|
-
title:
|
|
18906
|
-
children:
|
|
18907
|
-
/* @__PURE__ */ p("
|
|
18908
|
-
|
|
18909
|
-
|
|
18905
|
+
title: FI(() => KA.value ? I.pause || "Pause" : I.play || "Play"),
|
|
18906
|
+
children: [
|
|
18907
|
+
/* @__PURE__ */ p("svg", { style: { display: FI(() => KA.value ? "block" : "none") }, xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: [
|
|
18908
|
+
/* @__PURE__ */ p("rect", { x: "6", y: "4", width: "4", height: "16" }),
|
|
18909
|
+
/* @__PURE__ */ p("rect", { x: "14", y: "4", width: "4", height: "16" })
|
|
18910
|
+
] }),
|
|
18911
|
+
/* @__PURE__ */ p("svg", { style: { display: FI(() => KA.value ? "none" : "block") }, xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: /* @__PURE__ */ p("polygon", { points: "5 3 19 12 5 21 5 3" }) })
|
|
18912
|
+
]
|
|
18910
18913
|
}
|
|
18911
18914
|
)
|
|
18912
18915
|
] }),
|
|
18913
18916
|
/* @__PURE__ */ p("div", { class: "bk-btn-group bk-btn-group--center", children: [
|
|
18914
18917
|
/* @__PURE__ */ p("button", { class: "bk-btn", onClick: s.onPrevPage, title: I.previous || "Previous", children: /* @__PURE__ */ p("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: /* @__PURE__ */ p("polyline", { points: "15 18 9 12 15 6" }) }) }),
|
|
18915
|
-
/* @__PURE__ */ p("span", { class: "bz-page-info", children:
|
|
18918
|
+
/* @__PURE__ */ p("span", { class: "bz-page-info", children: FI(() => {
|
|
18916
18919
|
const g = PI.value, C = om.value;
|
|
18917
18920
|
if (Cg.value || g === 0 || g >= C - 1)
|
|
18918
18921
|
return `${g + 1} / ${C}`;
|
|
@@ -18931,7 +18934,7 @@ function Pt(s) {
|
|
|
18931
18934
|
/* @__PURE__ */ p(
|
|
18932
18935
|
"button",
|
|
18933
18936
|
{
|
|
18934
|
-
class:
|
|
18937
|
+
class: FI(() => `bk-btn ${ia.value ? "active" : ""}`),
|
|
18935
18938
|
onClick: s.onZoomOut,
|
|
18936
18939
|
title: I.zoomOut || "Zoom Out",
|
|
18937
18940
|
children: /* @__PURE__ */ p("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: [
|
|
@@ -18942,7 +18945,7 @@ function Pt(s) {
|
|
|
18942
18945
|
}
|
|
18943
18946
|
),
|
|
18944
18947
|
/* @__PURE__ */ p("button", { class: "bk-btn bk-btn--fullscreen", onClick: s.onToggleFullscreen, title: I.fullscreen || "Fullscreen", children: /* @__PURE__ */ p("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: /* @__PURE__ */ p("path", { d: "M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3" }) }) }),
|
|
18945
|
-
|
|
18948
|
+
FI(() => FB.value && s.onDownload ? /* @__PURE__ */ p("button", { class: "bk-btn bk-btn--download", onClick: s.onDownload, title: I.downloadCatalog || "Download", children: /* @__PURE__ */ p("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: [
|
|
18946
18949
|
/* @__PURE__ */ p("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
18947
18950
|
/* @__PURE__ */ p("polyline", { points: "7 10 12 15 17 10" }),
|
|
18948
18951
|
/* @__PURE__ */ p("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
|
|
@@ -18950,30 +18953,33 @@ function Pt(s) {
|
|
|
18950
18953
|
/* @__PURE__ */ p(
|
|
18951
18954
|
"button",
|
|
18952
18955
|
{
|
|
18953
|
-
class:
|
|
18956
|
+
class: FI(() => `bk-btn ${DA.value ? "" : "muted"}`),
|
|
18954
18957
|
onClick: () => {
|
|
18955
|
-
|
|
18958
|
+
DA.value = !DA.value, s.onSoundToggle();
|
|
18956
18959
|
},
|
|
18957
18960
|
title: "Sound",
|
|
18958
|
-
children:
|
|
18959
|
-
/* @__PURE__ */ p("
|
|
18960
|
-
|
|
18961
|
-
|
|
18962
|
-
|
|
18963
|
-
|
|
18964
|
-
/* @__PURE__ */ p("
|
|
18965
|
-
|
|
18966
|
-
|
|
18961
|
+
children: [
|
|
18962
|
+
/* @__PURE__ */ p("svg", { style: { display: FI(() => DA.value ? "block" : "none") }, xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: [
|
|
18963
|
+
/* @__PURE__ */ p("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
18964
|
+
/* @__PURE__ */ p("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" }),
|
|
18965
|
+
/* @__PURE__ */ p("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14" })
|
|
18966
|
+
] }),
|
|
18967
|
+
/* @__PURE__ */ p("svg", { style: { display: FI(() => DA.value ? "none" : "block") }, xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", children: [
|
|
18968
|
+
/* @__PURE__ */ p("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
18969
|
+
/* @__PURE__ */ p("line", { x1: "23", y1: "9", x2: "17", y2: "15" }),
|
|
18970
|
+
/* @__PURE__ */ p("line", { x1: "17", y1: "9", x2: "23", y2: "15" })
|
|
18971
|
+
] })
|
|
18972
|
+
]
|
|
18967
18973
|
}
|
|
18968
18974
|
)
|
|
18969
18975
|
] })
|
|
18970
18976
|
] });
|
|
18971
18977
|
}
|
|
18972
18978
|
function ft(s) {
|
|
18973
|
-
return /* @__PURE__ */ p("div", { class: "bk-thumbs", style:
|
|
18979
|
+
return /* @__PURE__ */ p("div", { class: "bk-thumbs", style: FI(() => Qs.value ? "display:flex;" : "display:none;"), children: el.value.map((I, g) => {
|
|
18974
18980
|
const C = () => {
|
|
18975
18981
|
const A = PI.value;
|
|
18976
|
-
if (Cg.value || A === 0 || A >=
|
|
18982
|
+
if (Cg.value || A === 0 || A >= el.value.length - 1)
|
|
18977
18983
|
return A === g;
|
|
18978
18984
|
const i = A % 2 === 1 ? A : A - 1;
|
|
18979
18985
|
return g === i || g === i + 1;
|
|
@@ -18981,7 +18987,7 @@ function ft(s) {
|
|
|
18981
18987
|
return /* @__PURE__ */ p(
|
|
18982
18988
|
"div",
|
|
18983
18989
|
{
|
|
18984
|
-
class:
|
|
18990
|
+
class: FI(() => `thumb-item ${C() ? "active" : ""}`),
|
|
18985
18991
|
onClick: () => s.onThumbClick(g),
|
|
18986
18992
|
children: [
|
|
18987
18993
|
/* @__PURE__ */ p("div", { class: "thumb-img-wrapper", children: /* @__PURE__ */ p(
|
|
@@ -19007,7 +19013,7 @@ function qt(s) {
|
|
|
19007
19013
|
"div",
|
|
19008
19014
|
{
|
|
19009
19015
|
id: "bk-book-wrapper",
|
|
19010
|
-
class:
|
|
19016
|
+
class: FI(() => {
|
|
19011
19017
|
let I = "";
|
|
19012
19018
|
return Bm.value && (I += "double-mode "), Qt.value && (I += "bk-is-cover "), xt.value && (I += "bk-is-back-cover "), dI.value.isActive && (I += "zoomed "), I.trim();
|
|
19013
19019
|
}),
|
|
@@ -19023,14 +19029,14 @@ function qt(s) {
|
|
|
19023
19029
|
{
|
|
19024
19030
|
id: "bk-book",
|
|
19025
19031
|
ref: s.bookContainerRef,
|
|
19026
|
-
class:
|
|
19027
|
-
style:
|
|
19028
|
-
children:
|
|
19029
|
-
const C = g === 0 || g ===
|
|
19032
|
+
class: FI(() => BB.value !== "read" ? "is-flipping" : ""),
|
|
19033
|
+
style: FI(() => `display: ${Cg.value ? "none" : "block"};`),
|
|
19034
|
+
children: el.value.map((I, g) => {
|
|
19035
|
+
const C = g === 0 || g === el.value.length - 1;
|
|
19030
19036
|
return /* @__PURE__ */ p(
|
|
19031
19037
|
"div",
|
|
19032
19038
|
{
|
|
19033
|
-
class: `bz-page ${g === 0 ? "bz-page--cover" : ""} ${g ===
|
|
19039
|
+
class: `bz-page ${g === 0 ? "bz-page--cover" : ""} ${g === el.value.length - 1 ? "bz-page--back" : ""}`,
|
|
19034
19040
|
"data-density": C ? "hard" : "soft",
|
|
19035
19041
|
"data-idx": g,
|
|
19036
19042
|
children: /* @__PURE__ */ p("div", { class: "bz-page-content", style: "position:relative; width:100%; height:100%; overflow:hidden;", children: [
|
|
@@ -19055,9 +19061,9 @@ function qt(s) {
|
|
|
19055
19061
|
"div",
|
|
19056
19062
|
{
|
|
19057
19063
|
id: "bk-single-view",
|
|
19058
|
-
style:
|
|
19059
|
-
children:
|
|
19060
|
-
const I =
|
|
19064
|
+
style: FI(() => `display: ${Cg.value ? "flex" : "none"}; width: 100%; height: 100%; justify-content: center; align-items: center; position: absolute; top: 0; left: 0; z-index: 10;`),
|
|
19065
|
+
children: FI(() => {
|
|
19066
|
+
const I = el.value[PI.value];
|
|
19061
19067
|
return I ? /* @__PURE__ */ p(
|
|
19062
19068
|
"img",
|
|
19063
19069
|
{
|
|
@@ -19082,7 +19088,7 @@ function _t(s) {
|
|
|
19082
19088
|
}, g = () => {
|
|
19083
19089
|
Cg.value = !Cg.value;
|
|
19084
19090
|
}, C = () => {
|
|
19085
|
-
|
|
19091
|
+
KA.value = !KA.value;
|
|
19086
19092
|
}, A = () => {
|
|
19087
19093
|
var b;
|
|
19088
19094
|
(b = s.interactionManagerRef.current) == null || b.zoomIn();
|
|
@@ -19105,7 +19111,7 @@ function _t(s) {
|
|
|
19105
19111
|
return /* @__PURE__ */ p(
|
|
19106
19112
|
"div",
|
|
19107
19113
|
{
|
|
19108
|
-
class:
|
|
19114
|
+
class: FI(() => `bk-wrapper bk-theme-${SB.value} ${s.className || ""}`),
|
|
19109
19115
|
children: [
|
|
19110
19116
|
/* @__PURE__ */ p("div", { class: "bk-main-area", children: [
|
|
19111
19117
|
/* @__PURE__ */ p(
|
|
@@ -19131,7 +19137,7 @@ function _t(s) {
|
|
|
19131
19137
|
onDownload: s.onDownload,
|
|
19132
19138
|
onNextPage: c,
|
|
19133
19139
|
onPrevPage: G,
|
|
19134
|
-
onSoundToggle: () =>
|
|
19140
|
+
onSoundToggle: () => DA.value = !DA.value,
|
|
19135
19141
|
onToggleAutoPlay: C,
|
|
19136
19142
|
onToggleFullscreen: Z
|
|
19137
19143
|
}
|
|
@@ -20268,11 +20274,11 @@ class ge {
|
|
|
20268
20274
|
})
|
|
20269
20275
|
), this.unsubs.push(
|
|
20270
20276
|
hd(() => {
|
|
20271
|
-
const I =
|
|
20277
|
+
const I = KA.value, g = zB.value || 3e3;
|
|
20272
20278
|
this.autoPlayTimer && (clearInterval(this.autoPlayTimer), this.autoPlayTimer = null), I && (this.autoPlayTimer = setInterval(() => {
|
|
20273
|
-
const C =
|
|
20279
|
+
const C = el.value.length - 1;
|
|
20274
20280
|
if (PI.peek() >= C || PI.peek() >= C - 1 && !Cg.peek()) {
|
|
20275
|
-
|
|
20281
|
+
KA.value = !1;
|
|
20276
20282
|
return;
|
|
20277
20283
|
}
|
|
20278
20284
|
this.turnToNextPage();
|
|
@@ -20283,7 +20289,7 @@ class ge {
|
|
|
20283
20289
|
turnToNextPage() {
|
|
20284
20290
|
if (Cg.value) {
|
|
20285
20291
|
const I = PI.value + 1;
|
|
20286
|
-
I <
|
|
20292
|
+
I < el.value.length && (PI.value = I, this.playSound());
|
|
20287
20293
|
} else this.pageFlip && this.pageFlip.flipNext();
|
|
20288
20294
|
}
|
|
20289
20295
|
turnToPrevPage() {
|
|
@@ -20293,7 +20299,7 @@ class ge {
|
|
|
20293
20299
|
} else this.pageFlip && this.pageFlip.flipPrev();
|
|
20294
20300
|
}
|
|
20295
20301
|
playSound() {
|
|
20296
|
-
|
|
20302
|
+
DA.value && this.audioEl && (this.audioEl.currentTime = 0, this.audioEl.play().catch((I) => console.warn("Flipbook Audio Play Error:", I)));
|
|
20297
20303
|
}
|
|
20298
20304
|
update() {
|
|
20299
20305
|
this.pageFlip && this.pageFlip.update();
|
|
@@ -20596,7 +20602,7 @@ const lm = class lm {
|
|
|
20596
20602
|
Cg.value = I;
|
|
20597
20603
|
}
|
|
20598
20604
|
updateOptions(I) {
|
|
20599
|
-
this.options = { ...this.options, ...I }, I.theme !== void 0 && (SB.value = I.theme), I.primaryColor !== void 0 && (la.value = I.primaryColor), I.showThumbs !== void 0 && (Qs.value = I.showThumbs), I.allowDownload !== void 0 && (FB.value = I.allowDownload), I.whiteLabel !== void 0 && (JB.value = I.whiteLabel), I.soundEnabled !== void 0 && (
|
|
20605
|
+
this.options = { ...this.options, ...I }, I.theme !== void 0 && (SB.value = I.theme), I.primaryColor !== void 0 && (la.value = I.primaryColor), I.showThumbs !== void 0 && (Qs.value = I.showThumbs), I.allowDownload !== void 0 && (FB.value = I.allowDownload), I.whiteLabel !== void 0 && (JB.value = I.whiteLabel), I.soundEnabled !== void 0 && (DA.value = I.soundEnabled), I.singleMode !== void 0 && (Cg.value = I.singleMode), I.autoPlay !== void 0 && (KA.value = I.autoPlay), I.autoPlayInterval !== void 0 && (zB.value = I.autoPlayInterval), this.container && yW(this.container, this.options);
|
|
20600
20606
|
}
|
|
20601
20607
|
setPages(I, g) {
|
|
20602
20608
|
this.init(g || "", I);
|