@vue-pdf-viewer/viewer 3.7.0-beta.0 → 3.7.0-beta.1
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.
|
@@ -1641,7 +1641,7 @@ const qd = (l) => {
|
|
|
1641
1641
|
repeat: ["", "x", "y", "space", "round"]
|
|
1642
1642
|
}], A = () => ["auto", "cover", "contain", Ko, Oo, {
|
|
1643
1643
|
size: [Il, rl]
|
|
1644
|
-
}],
|
|
1644
|
+
}], B = () => [qF, AZ, Ht], E = () => [
|
|
1645
1645
|
// Deprecated since Tailwind CSS v4.0.0
|
|
1646
1646
|
"",
|
|
1647
1647
|
"none",
|
|
@@ -2649,21 +2649,21 @@ const qd = (l) => {
|
|
|
2649
2649
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2650
2650
|
*/
|
|
2651
2651
|
"gradient-from-pos": [{
|
|
2652
|
-
from:
|
|
2652
|
+
from: B()
|
|
2653
2653
|
}],
|
|
2654
2654
|
/**
|
|
2655
2655
|
* Gradient Color Stops Via Position
|
|
2656
2656
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2657
2657
|
*/
|
|
2658
2658
|
"gradient-via-pos": [{
|
|
2659
|
-
via:
|
|
2659
|
+
via: B()
|
|
2660
2660
|
}],
|
|
2661
2661
|
/**
|
|
2662
2662
|
* Gradient Color Stops To Position
|
|
2663
2663
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
2664
2664
|
*/
|
|
2665
2665
|
"gradient-to-pos": [{
|
|
2666
|
-
to:
|
|
2666
|
+
to: B()
|
|
2667
2667
|
}],
|
|
2668
2668
|
/**
|
|
2669
2669
|
* Gradient Color Stops From
|
|
@@ -4298,7 +4298,7 @@ class TZ {
|
|
|
4298
4298
|
}
|
|
4299
4299
|
}
|
|
4300
4300
|
}
|
|
4301
|
-
const al = TZ.getInstance(), ei = /* @__PURE__ */ new Date("2026-01-
|
|
4301
|
+
const al = TZ.getInstance(), ei = /* @__PURE__ */ new Date("2026-01-06T03:45:26.429Z"), $F = "Please visit https://www.vue-pdf-viewer.dev/license-management/ to generate a new license key.", GZ = {
|
|
4302
4302
|
invalidLicense: JSON.stringify({
|
|
4303
4303
|
message: `You are currently using %cwithout%c a valid license. ${$F}`,
|
|
4304
4304
|
style: ["font-weight: bold;", "font-weight: normal;"]
|
|
@@ -4354,7 +4354,7 @@ function Vi(l) {
|
|
|
4354
4354
|
}
|
|
4355
4355
|
async function Wi(l, U) {
|
|
4356
4356
|
try {
|
|
4357
|
-
const d = await import("./index-
|
|
4357
|
+
const d = await import("./index-CCIILzUt.js").then((V) => V.i), t = d.pki.publicKeyFromPem(U), Z = atob(l.data), n = d.util.decode64(l.signature), F = d.pss.create({
|
|
4358
4358
|
md: d.md.sha256.create(),
|
|
4359
4359
|
mgf: d.mgf.mgf1.create(d.md.sha256.create()),
|
|
4360
4360
|
saltLength: 32
|
|
@@ -11118,16 +11118,16 @@ var vY = /* @__PURE__ */ j({
|
|
|
11118
11118
|
const f = Y.right - D.right, tl = window.innerWidth - k.right - f, Fl = window.innerWidth - S.right - tl, bl = S.width + Fl, ul = Math.max(bl, Y.width), q = window.innerWidth - BU, Xl = a0(tl, BU, Math.max(BU, q - ul));
|
|
11119
11119
|
V.value.style.minWidth = `${bl}px`, V.value.style.right = `${Xl}px`;
|
|
11120
11120
|
}
|
|
11121
|
-
const h = Z().map((f) => f.ref), X = window.innerHeight - BU * 2, J = i.value.scrollHeight, u = window.getComputedStyle(W.value), L = Number.parseInt(u.borderTopWidth, 10), r = Number.parseInt(u.paddingTop, 10), w = Number.parseInt(u.borderBottomWidth, 10), g = Number.parseInt(u.paddingBottom, 10), $ = L + r + J + g + w, P = Math.min(o.value.offsetHeight * 5, $), Zl = window.getComputedStyle(i.value), O = Number.parseInt(Zl.paddingTop, 10), v = Number.parseInt(Zl.paddingBottom, 10), K = S.top + S.height / 2 - BU, A = X - K,
|
|
11121
|
+
const h = Z().map((f) => f.ref), X = window.innerHeight - BU * 2, J = i.value.scrollHeight, u = window.getComputedStyle(W.value), L = Number.parseInt(u.borderTopWidth, 10), r = Number.parseInt(u.paddingTop, 10), w = Number.parseInt(u.borderBottomWidth, 10), g = Number.parseInt(u.paddingBottom, 10), $ = L + r + J + g + w, P = Math.min(o.value.offsetHeight * 5, $), Zl = window.getComputedStyle(i.value), O = Number.parseInt(Zl.paddingTop, 10), v = Number.parseInt(Zl.paddingBottom, 10), K = S.top + S.height / 2 - BU, A = X - K, B = o.value.offsetHeight / 2, E = o.value.offsetTop + B, x = L + r + E, _ = $ - x;
|
|
11122
11122
|
if (x <= K) {
|
|
11123
11123
|
const f = o.value === h[h.length - 1];
|
|
11124
11124
|
V.value.style.bottom = "0px";
|
|
11125
|
-
const tl = W.value.clientHeight - i.value.offsetTop - i.value.offsetHeight, Fl = Math.max(A,
|
|
11125
|
+
const tl = W.value.clientHeight - i.value.offsetTop - i.value.offsetHeight, Fl = Math.max(A, B + (f ? v : 0) + tl + w), bl = x + Fl;
|
|
11126
11126
|
V.value.style.height = `${bl}px`;
|
|
11127
11127
|
} else {
|
|
11128
11128
|
const f = o.value === h[0];
|
|
11129
11129
|
V.value.style.top = "0px";
|
|
11130
|
-
const Fl = Math.max(K, L + i.value.offsetTop + (f ? O : 0) +
|
|
11130
|
+
const Fl = Math.max(K, L + i.value.offsetTop + (f ? O : 0) + B) + _;
|
|
11131
11131
|
V.value.style.height = `${Fl}px`, i.value.scrollTop = x - K + i.value.offsetTop;
|
|
11132
11132
|
}
|
|
11133
11133
|
V.value.style.margin = `${BU}px 0`, V.value.style.minHeight = `${P}px`, V.value.style.maxHeight = `${X}px`, t("placed"), requestAnimationFrame(() => e.value = !0);
|
|
@@ -17380,7 +17380,7 @@ const F1 = /* @__PURE__ */ j({
|
|
|
17380
17380
|
break;
|
|
17381
17381
|
}
|
|
17382
17382
|
Q.left = v / L, Q.top = K / r;
|
|
17383
|
-
const [A,
|
|
17383
|
+
const [A, B] = D(), E = Q.left + A, x = Q.top + B, { style: _ } = d.resizeElement;
|
|
17384
17384
|
_.left = `${(100 * E).toFixed(2)}%`, _.top = `${(100 * x).toFixed(2)}%`;
|
|
17385
17385
|
}
|
|
17386
17386
|
function J(L) {
|
|
@@ -17388,9 +17388,9 @@ const F1 = /* @__PURE__ */ j({
|
|
|
17388
17388
|
const [r, w] = m.value, { left: g, top: $, width: P, height: Zl } = W, O = D0 / r, v = D0 / w, K = S(i.value), A = (Fd, Ud) => [
|
|
17389
17389
|
K[0] * Fd + K[2] * Ud,
|
|
17390
17390
|
K[1] * Fd + K[3] * Ud
|
|
17391
|
-
],
|
|
17392
|
-
|
|
17393
|
-
|
|
17391
|
+
], B = S(360 - i.value), E = (Fd, Ud) => [
|
|
17392
|
+
B[0] * Fd + B[2] * Ud,
|
|
17393
|
+
B[1] * Fd + B[3] * Ud
|
|
17394
17394
|
];
|
|
17395
17395
|
let x, _;
|
|
17396
17396
|
switch (a.value) {
|
|
@@ -17576,7 +17576,7 @@ const F1 = /* @__PURE__ */ j({
|
|
|
17576
17576
|
Tl.style.top = `${kd}%`, s.y = kd / 100;
|
|
17577
17577
|
}
|
|
17578
17578
|
}
|
|
17579
|
-
},
|
|
17579
|
+
}, B = () => {
|
|
17580
17580
|
const [sl, Tl] = w.value, { pageX: Yl, pageY: yl } = J.value.clone({ dontFlip: !0, scale: 1 }).rawDims, zl = [
|
|
17581
17581
|
s.x * sl + Yl,
|
|
17582
17582
|
(1 - s.y - s.height) * Tl + yl,
|
|
@@ -17617,7 +17617,7 @@ const F1 = /* @__PURE__ */ j({
|
|
|
17617
17617
|
return;
|
|
17618
17618
|
const Yl = () => {
|
|
17619
17619
|
const yl = Y.value;
|
|
17620
|
-
k.value && (k.value.abort(), k.value = null), m.value = null, Y.value = !1, yl && (
|
|
17620
|
+
k.value && (k.value.abort(), k.value = null), m.value = null, Y.value = !1, yl && (B(), A(Tl));
|
|
17621
17621
|
};
|
|
17622
17622
|
(!m.value || m.value === Tl.pointerId) && Yl();
|
|
17623
17623
|
}
|
|
@@ -17738,7 +17738,7 @@ const F1 = /* @__PURE__ */ j({
|
|
|
17738
17738
|
const { target: Tl } = sl;
|
|
17739
17739
|
W.value?.contains(Tl) || (d.value = !1);
|
|
17740
17740
|
}, id = (sl) => {
|
|
17741
|
-
s.width = sl.width, s.height = sl.height, s.x = sl.left, s.y = sl.top, D.value = !1,
|
|
17741
|
+
s.width = sl.width, s.height = sl.height, s.x = sl.left, s.y = sl.top, D.value = !1, B();
|
|
17742
17742
|
};
|
|
17743
17743
|
dl(
|
|
17744
17744
|
N,
|
|
@@ -18518,7 +18518,7 @@ function NW(l, U, d) {
|
|
|
18518
18518
|
let N = s.left - i.left, R = s.top - i.top;
|
|
18519
18519
|
const m = Z.rotation;
|
|
18520
18520
|
if (m !== 0) {
|
|
18521
|
-
const A = parseFloat(l.style.left) || N,
|
|
18521
|
+
const A = parseFloat(l.style.left) || N, B = parseFloat(l.style.top) || R;
|
|
18522
18522
|
if (m === 270) {
|
|
18523
18523
|
const E = e;
|
|
18524
18524
|
U.getBoundingClientRect();
|
|
@@ -18527,7 +18527,7 @@ function NW(l, U, d) {
|
|
|
18527
18527
|
const tl = E - f, Fl = H;
|
|
18528
18528
|
N = tl, R = Fl;
|
|
18529
18529
|
} else
|
|
18530
|
-
N = A, R =
|
|
18530
|
+
N = A, R = B;
|
|
18531
18531
|
}
|
|
18532
18532
|
const T = {
|
|
18533
18533
|
x: N / i.width,
|
|
@@ -18540,19 +18540,19 @@ function NW(l, U, d) {
|
|
|
18540
18540
|
u > g && (D = g - Y), u < 0 && (D = -Y), r > $ && (h = $ - k), r < 0 && (h = -k);
|
|
18541
18541
|
let P, Zl, O, v;
|
|
18542
18542
|
if (m !== 0) {
|
|
18543
|
-
const A = S / zU.PDF_TO_CSS_UNITS,
|
|
18543
|
+
const A = S / zU.PDF_TO_CSS_UNITS, B = N / A, E = R / A, x = o.width / A, _ = o.height / A;
|
|
18544
18544
|
switch (m) {
|
|
18545
18545
|
case 90:
|
|
18546
|
-
P = E + a, Zl = F -
|
|
18546
|
+
P = E + a, Zl = F - B - x + V, O = E + _ + a, v = F - B + V;
|
|
18547
18547
|
break;
|
|
18548
18548
|
case 180:
|
|
18549
|
-
P = F -
|
|
18549
|
+
P = F - B - x + a, Zl = e - E - _ + V, O = F - B + a, v = e - E + V;
|
|
18550
18550
|
break;
|
|
18551
18551
|
case 270:
|
|
18552
|
-
P =
|
|
18552
|
+
P = B + a, Zl = e - E - _ + V, O = B + x + a, v = e - E + V;
|
|
18553
18553
|
break;
|
|
18554
18554
|
default:
|
|
18555
|
-
P =
|
|
18555
|
+
P = B + a, Zl = e - E - _ + V, O = B + x + a, v = e - E + V;
|
|
18556
18556
|
break;
|
|
18557
18557
|
}
|
|
18558
18558
|
} else
|
|
@@ -18626,12 +18626,12 @@ const uZ = { x: 0, y: 0 }, St = { x: 0, y: 0 }, q1 = /* @__PURE__ */ j({
|
|
|
18626
18626
|
const [v, K] = X.value;
|
|
18627
18627
|
return [v * N.value, K * N.value];
|
|
18628
18628
|
}), L = p(() => {
|
|
18629
|
-
const v = {}, K = 1 + R.value * N.value, [A,
|
|
18629
|
+
const v = {}, K = 1 + R.value * N.value, [A, B] = sy(
|
|
18630
18630
|
u.value,
|
|
18631
18631
|
s.value.rotation,
|
|
18632
18632
|
K
|
|
18633
18633
|
);
|
|
18634
|
-
let E = o.x + A, x = o.y +
|
|
18634
|
+
let E = o.x + A, x = o.y + B;
|
|
18635
18635
|
return E = Math.max(0, Math.min(E, 1 - o.width)), x = Math.max(0, Math.min(x, 1 - o.height)), v.left = `${(100 * E).toFixed(2)}%`, v.top = `${(100 * x).toFixed(2)}%`, v.position = "absolute", d.annotation.isModified || V.value ? (v.width = "auto", v.height = "auto") : (v.width = `${100 * o.width}%`, v.height = `${100 * o.height}%`), v;
|
|
18636
18636
|
}), r = (v) => {
|
|
18637
18637
|
v.stopPropagation(), v.preventDefault(), Q.value = !0, a.value = !0, Sl(() => {
|
|
@@ -18640,29 +18640,29 @@ const uZ = { x: 0, y: 0 }, St = { x: 0, y: 0 }, q1 = /* @__PURE__ */ j({
|
|
|
18640
18640
|
K.focus();
|
|
18641
18641
|
const A = window.getSelection();
|
|
18642
18642
|
if (A) {
|
|
18643
|
-
let
|
|
18643
|
+
let B = null;
|
|
18644
18644
|
if (document.caretPositionFromPoint) {
|
|
18645
18645
|
const E = document.caretPositionFromPoint(v.clientX, v.clientY);
|
|
18646
|
-
E && (
|
|
18647
|
-
} else document.caretRangeFromPoint && (
|
|
18648
|
-
if (!
|
|
18646
|
+
E && (B = document.createRange(), B.setStart(E.offsetNode, E.offset), B.setEnd(E.offsetNode, E.offset));
|
|
18647
|
+
} else document.caretRangeFromPoint && (B = document.caretRangeFromPoint(v.clientX, v.clientY));
|
|
18648
|
+
if (!B) {
|
|
18649
18649
|
const E = K.textContent || "", x = K.getBoundingClientRect(), _ = v.clientX - x.left, H = x.width / Math.max(E.length, 1), f = Math.min(Math.floor(_ / H), E.length), tl = K.firstChild || K;
|
|
18650
|
-
|
|
18650
|
+
B = document.createRange(), B.setStart(tl, 0), B.setEnd(tl, f);
|
|
18651
18651
|
}
|
|
18652
|
-
|
|
18652
|
+
B && (A.removeAllRanges(), A.addRange(B));
|
|
18653
18653
|
}
|
|
18654
18654
|
}
|
|
18655
18655
|
});
|
|
18656
18656
|
}, w = (v) => {
|
|
18657
18657
|
if (v.deleted)
|
|
18658
18658
|
return;
|
|
18659
|
-
const [K, A] = X.value,
|
|
18659
|
+
const [K, A] = X.value, B = v.rect, E = N.value, [x, _, H, f] = B, tl = x * E, Fl = (A - f) * E, bl = H * E, ul = (A - _) * E;
|
|
18660
18660
|
o.x = Math.min(tl, bl) / (K * E), o.y = Math.min(Fl, ul) / (A * E), o.width = Math.abs(bl - tl) / (K * E), o.height = Math.abs(ul - Fl) / (A * E);
|
|
18661
18661
|
};
|
|
18662
18662
|
function g(v = 0, K = 0, A = Z.rotation) {
|
|
18663
18663
|
if (!F.value)
|
|
18664
18664
|
return d.annotation.rect;
|
|
18665
|
-
const
|
|
18665
|
+
const B = N.value, [E, x] = X.value, [_, H] = J.value, f = v / B, tl = K / B, Fl = o.x * E, bl = o.y * x, ul = o.width * E, q = o.height * x;
|
|
18666
18666
|
switch (A) {
|
|
18667
18667
|
case 0:
|
|
18668
18668
|
return [
|
|
@@ -18706,9 +18706,9 @@ const uZ = { x: 0, y: 0 }, St = { x: 0, y: 0 }, q1 = /* @__PURE__ */ j({
|
|
|
18706
18706
|
onStart: (v, K) => {
|
|
18707
18707
|
const A = F.value;
|
|
18708
18708
|
if (!A) return;
|
|
18709
|
-
const { left:
|
|
18709
|
+
const { left: B, top: E } = A.getBoundingClientRect();
|
|
18710
18710
|
uZ.x = K.clientX, uZ.y = K.clientY, St.x = K.clientX, St.y = K.clientY;
|
|
18711
|
-
const x = K.clientX -
|
|
18711
|
+
const x = K.clientX - B, _ = K.clientY - E;
|
|
18712
18712
|
i.x = x, i.y = _, W.value = K.pointerId;
|
|
18713
18713
|
const H = h.value?.getBoundingClientRect();
|
|
18714
18714
|
H && (Pt = K.clientX - H.left - i.x, ft = K.clientY - H.top - i.y, o.x = Pt / H.width, o.y = ft / H.height);
|
|
@@ -18719,8 +18719,8 @@ const uZ = { x: 0, y: 0 }, St = { x: 0, y: 0 }, q1 = /* @__PURE__ */ j({
|
|
|
18719
18719
|
St.x = K.clientX, St.y = K.clientY, t("dragStart", d.annotation);
|
|
18720
18720
|
const A = F.value;
|
|
18721
18721
|
if (!A) return;
|
|
18722
|
-
const
|
|
18723
|
-
!
|
|
18722
|
+
const B = h.value?.getBoundingClientRect();
|
|
18723
|
+
!B || !A || (Pt = K.clientX - B.left - i.x, ft = K.clientY - B.top - i.y, Pt = Math.max(0, Math.min(Pt, B.width - A.offsetWidth)), ft = Math.max(0, Math.min(ft, B.height - A.offsetHeight - 10)), o.x = Pt / B.width, o.y = ft / B.height, A.scrollIntoView({ block: "nearest" }));
|
|
18724
18724
|
},
|
|
18725
18725
|
onEnd: (v, K) => {
|
|
18726
18726
|
if (W.value !== K.pointerId || uZ.x === St.x && uZ.y === St.y)
|
|
@@ -18729,7 +18729,7 @@ const uZ = { x: 0, y: 0 }, St = { x: 0, y: 0 }, q1 = /* @__PURE__ */ j({
|
|
|
18729
18729
|
const x = h.value?.getBoundingClientRect();
|
|
18730
18730
|
x && (o.x = Pt / x.width, o.y = ft / x.height);
|
|
18731
18731
|
}
|
|
18732
|
-
const
|
|
18732
|
+
const B = g(
|
|
18733
18733
|
R.value * N.value,
|
|
18734
18734
|
R.value * N.value,
|
|
18735
18735
|
Z.rotation
|
|
@@ -18738,7 +18738,7 @@ const uZ = { x: 0, y: 0 }, St = { x: 0, y: 0 }, q1 = /* @__PURE__ */ j({
|
|
|
18738
18738
|
color: T.value,
|
|
18739
18739
|
fontSize: S.value,
|
|
18740
18740
|
value: m.value,
|
|
18741
|
-
rect:
|
|
18741
|
+
rect: B,
|
|
18742
18742
|
pageIndex: D.value,
|
|
18743
18743
|
noView: !0,
|
|
18744
18744
|
noPrint: !1
|
|
@@ -18771,8 +18771,8 @@ const uZ = { x: 0, y: 0 }, St = { x: 0, y: 0 }, q1 = /* @__PURE__ */ j({
|
|
|
18771
18771
|
};
|
|
18772
18772
|
return dl(
|
|
18773
18773
|
[() => d.isSelected, F],
|
|
18774
|
-
([v, K], [A],
|
|
18775
|
-
K && (Q.value = !v,
|
|
18774
|
+
([v, K], [A], B) => {
|
|
18775
|
+
K && (Q.value = !v, B(() => {
|
|
18776
18776
|
Q.value = !0, a.value = !1;
|
|
18777
18777
|
}));
|
|
18778
18778
|
},
|
|
@@ -18787,16 +18787,16 @@ const uZ = { x: 0, y: 0 }, St = { x: 0, y: 0 }, q1 = /* @__PURE__ */ j({
|
|
|
18787
18787
|
if (!K || v === A)
|
|
18788
18788
|
return;
|
|
18789
18789
|
V.value = !0, await Sl();
|
|
18790
|
-
const
|
|
18790
|
+
const B = $(K);
|
|
18791
18791
|
t("update:content", {
|
|
18792
18792
|
...d.annotation,
|
|
18793
18793
|
color: T.value,
|
|
18794
18794
|
fontSize: v,
|
|
18795
|
-
rect:
|
|
18795
|
+
rect: B
|
|
18796
18796
|
});
|
|
18797
18797
|
}), dl([T, F], async ([v, K], [A]) => {
|
|
18798
18798
|
K && (zZ(v).every(
|
|
18799
|
-
(
|
|
18799
|
+
(B, E) => B === zZ(A)[E]
|
|
18800
18800
|
) || (V.value = !0, await Sl(), t("update:content", {
|
|
18801
18801
|
...d.annotation,
|
|
18802
18802
|
fontSize: S.value,
|
|
@@ -19110,21 +19110,25 @@ const Ka = () => {
|
|
|
19110
19110
|
ensureStorageInitialized: D,
|
|
19111
19111
|
getEditorKey: h
|
|
19112
19112
|
} = hU(), { isScrolling: X } = it(o), { addHistory: J } = Ka();
|
|
19113
|
-
function u(
|
|
19113
|
+
function u(B, E) {
|
|
19114
19114
|
const x = {
|
|
19115
19115
|
...E,
|
|
19116
19116
|
pageIndex: m.value
|
|
19117
19117
|
};
|
|
19118
19118
|
Sl(() => {
|
|
19119
|
-
|
|
19119
|
+
B === "create" ? Z(x) : B === "update" ? n(x) : B === "delete" && F(x);
|
|
19120
19120
|
});
|
|
19121
19121
|
}
|
|
19122
|
-
dl(
|
|
19123
|
-
|
|
19124
|
-
|
|
19125
|
-
|
|
19122
|
+
dl(
|
|
19123
|
+
[N, s],
|
|
19124
|
+
async (B) => {
|
|
19125
|
+
i.value = !1, await P(R.value), i.value = !0;
|
|
19126
|
+
},
|
|
19127
|
+
{ immediate: !0 }
|
|
19128
|
+
);
|
|
19129
|
+
function L(B, E, x, _ = !0) {
|
|
19126
19130
|
let { box: f, getOutlines: tl } = yt(E);
|
|
19127
|
-
const Fl = tl().toSVGPath(), { id: bl, clipPathId: ul } =
|
|
19131
|
+
const Fl = tl().toSVGPath(), { id: bl, clipPathId: ul } = B.draw(
|
|
19128
19132
|
{
|
|
19129
19133
|
bbox: f,
|
|
19130
19134
|
root: {
|
|
@@ -19146,7 +19150,7 @@ const Ka = () => {
|
|
|
19146
19150
|
borderWidth: _ ? 25e-4 : 0,
|
|
19147
19151
|
innerMargin: _ ? 25e-4 : 0,
|
|
19148
19152
|
isLTR: !0
|
|
19149
|
-
}), Xl = q.box, kl = q.getOutlines().toSVGPath(), Bl =
|
|
19153
|
+
}), Xl = q.box, kl = q.getOutlines().toSVGPath(), Bl = B.drawOutline(
|
|
19150
19154
|
{
|
|
19151
19155
|
rootClass: {
|
|
19152
19156
|
"vpv-highlight-outline": !0,
|
|
@@ -19159,19 +19163,19 @@ const Ka = () => {
|
|
|
19159
19163
|
},
|
|
19160
19164
|
!1
|
|
19161
19165
|
);
|
|
19162
|
-
return T.value && (
|
|
19166
|
+
return T.value && (B.updateProperties(bl, {
|
|
19163
19167
|
root: {
|
|
19164
19168
|
"data-main-rotation": T.value
|
|
19165
19169
|
}
|
|
19166
|
-
}),
|
|
19170
|
+
}), B.updateProperties(Bl, {
|
|
19167
19171
|
root: {
|
|
19168
19172
|
"data-main-rotation": T.value
|
|
19169
19173
|
}
|
|
19170
19174
|
})), { id: bl, clipPathUrl: ul, outlineId: Bl };
|
|
19171
19175
|
}
|
|
19172
|
-
function r(
|
|
19176
|
+
function r(B, E, x, _, H = !0) {
|
|
19173
19177
|
const f = sn(E, l.viewport.value), tl = on(f), Fl = yt(E).getOutlines().serialize(tl, T.value), bl = {
|
|
19174
|
-
id:
|
|
19178
|
+
id: B,
|
|
19175
19179
|
annotationType: jl.Highlight,
|
|
19176
19180
|
quadPoints: new Float32Array(f),
|
|
19177
19181
|
rect: tl,
|
|
@@ -19205,24 +19209,24 @@ const Ka = () => {
|
|
|
19205
19209
|
);
|
|
19206
19210
|
bl.drawLayerId = ul, bl.outlineId = Xl;
|
|
19207
19211
|
const kl = l.canvasLayer.value.lastElementChild, Bl = document.createElement("div");
|
|
19208
|
-
Bl.style.cssText = kl?.style.cssText || "", Bl.style.position = "absolute", V.value.set(
|
|
19212
|
+
Bl.style.cssText = kl?.style.cssText || "", Bl.style.position = "absolute", V.value.set(B, Bl);
|
|
19209
19213
|
const hl = {
|
|
19210
19214
|
...el(bl),
|
|
19211
19215
|
pageIndex: m.value
|
|
19212
19216
|
};
|
|
19213
|
-
return k.value.set(
|
|
19214
|
-
W.set(
|
|
19217
|
+
return k.value.set(B, hl), a.value.push(hl), u("create", hl), Sl(() => {
|
|
19218
|
+
W.set(B, {
|
|
19215
19219
|
clipPathUrl: q,
|
|
19216
19220
|
outlineId: Xl,
|
|
19217
19221
|
drawLayerId: ul
|
|
19218
|
-
}), Q.set(
|
|
19222
|
+
}), Q.set(B, H);
|
|
19219
19223
|
}), hl;
|
|
19220
19224
|
}
|
|
19221
|
-
function w(
|
|
19225
|
+
function w(B, E, x = !0) {
|
|
19222
19226
|
const _ = h(), H = d?.value ?? "#ffff00";
|
|
19223
|
-
let f = r(_,
|
|
19227
|
+
let f = r(_, B, H, E, x);
|
|
19224
19228
|
return J(
|
|
19225
|
-
() => f = r(_,
|
|
19229
|
+
() => f = r(_, B, H, E, !1),
|
|
19226
19230
|
() => A(f),
|
|
19227
19231
|
() => {
|
|
19228
19232
|
},
|
|
@@ -19232,18 +19236,18 @@ const Ka = () => {
|
|
|
19232
19236
|
!0
|
|
19233
19237
|
), f;
|
|
19234
19238
|
}
|
|
19235
|
-
function g(
|
|
19239
|
+
function g(B) {
|
|
19236
19240
|
const E = document.createElement("div");
|
|
19237
|
-
return E.style.cssText =
|
|
19241
|
+
return E.style.cssText = B.style.cssText, E.style.position = "absolute", E;
|
|
19238
19242
|
}
|
|
19239
|
-
function $(
|
|
19243
|
+
function $(B) {
|
|
19240
19244
|
const E = [], { width: x, height: _ } = l.viewport.value;
|
|
19241
|
-
for (let H = 0; H <
|
|
19245
|
+
for (let H = 0; H < B.length; H += 8) {
|
|
19242
19246
|
const f = [];
|
|
19243
19247
|
for (let xl = 0; xl < 8; xl += 2) {
|
|
19244
19248
|
const [Jd, Xd] = l.viewport.value.convertToViewportPoint(
|
|
19245
|
-
|
|
19246
|
-
|
|
19249
|
+
B[H + xl],
|
|
19250
|
+
B[H + xl + 1]
|
|
19247
19251
|
);
|
|
19248
19252
|
f.push({ x: Jd, y: Xd });
|
|
19249
19253
|
}
|
|
@@ -19252,12 +19256,12 @@ const Ka = () => {
|
|
|
19252
19256
|
}
|
|
19253
19257
|
return E;
|
|
19254
19258
|
}
|
|
19255
|
-
async function P(
|
|
19259
|
+
async function P(B = !0) {
|
|
19256
19260
|
if (!D()) {
|
|
19257
19261
|
al.debug("❌ Storage not initialized in prepareHighlightElements");
|
|
19258
19262
|
return;
|
|
19259
19263
|
}
|
|
19260
|
-
console.log("[DEBUG] prepareHighlightElements",
|
|
19264
|
+
console.log("[DEBUG] prepareHighlightElements", B, i.value);
|
|
19261
19265
|
try {
|
|
19262
19266
|
l.canvasLayer.value.querySelectorAll("svg").forEach((q) => {
|
|
19263
19267
|
q.remove();
|
|
@@ -19294,7 +19298,7 @@ const Ka = () => {
|
|
|
19294
19298
|
const Jd = q.id?.startsWith(gd);
|
|
19295
19299
|
if (bl.includes(q.id))
|
|
19296
19300
|
continue;
|
|
19297
|
-
if (!
|
|
19301
|
+
if (!B) {
|
|
19298
19302
|
if (!kl && !Jd)
|
|
19299
19303
|
continue;
|
|
19300
19304
|
const sl = $(q.quadPoints);
|
|
@@ -19325,14 +19329,14 @@ const Ka = () => {
|
|
|
19325
19329
|
al.error("Error preparing highlight elements:", E), i.value = !1;
|
|
19326
19330
|
}
|
|
19327
19331
|
}
|
|
19328
|
-
const Zl = (
|
|
19332
|
+
const Zl = (B) => {
|
|
19329
19333
|
Q.forEach((E, x) => {
|
|
19330
19334
|
Q.set(x, !1);
|
|
19331
|
-
}), Q.set(
|
|
19332
|
-
}, O = (
|
|
19333
|
-
d && (d.value =
|
|
19335
|
+
}), Q.set(B.id, !0);
|
|
19336
|
+
}, O = (B, E) => {
|
|
19337
|
+
d && (d.value = B), E.hexColor = B, el(e.value)?.updateProperties(E.drawLayerId, {
|
|
19334
19338
|
root: {
|
|
19335
|
-
fill:
|
|
19339
|
+
fill: B
|
|
19336
19340
|
}
|
|
19337
19341
|
});
|
|
19338
19342
|
const { id: x } = E, _ = el(S.value)?.getRawValue(x), H = !x?.startsWith(gd), {
|
|
@@ -19359,7 +19363,7 @@ const Ka = () => {
|
|
|
19359
19363
|
structureTreeParentId: -1,
|
|
19360
19364
|
rotation: Xl,
|
|
19361
19365
|
pageIndex: m.value,
|
|
19362
|
-
hexColor:
|
|
19366
|
+
hexColor: B,
|
|
19363
19367
|
color: kl.color,
|
|
19364
19368
|
opacity: 1
|
|
19365
19369
|
};
|
|
@@ -19379,12 +19383,12 @@ const Ka = () => {
|
|
|
19379
19383
|
k.value.set(hl, { ...E, ...Bl });
|
|
19380
19384
|
}
|
|
19381
19385
|
u("update", { ...E, ...Bl });
|
|
19382
|
-
}, v = (
|
|
19386
|
+
}, v = (B, E) => {
|
|
19383
19387
|
const x = d?.value ?? "#ffff00", _ = E.id;
|
|
19384
19388
|
J(
|
|
19385
19389
|
() => {
|
|
19386
19390
|
const H = a.value.find((f) => f.id === _);
|
|
19387
|
-
H && O(
|
|
19391
|
+
H && O(B, H);
|
|
19388
19392
|
},
|
|
19389
19393
|
() => {
|
|
19390
19394
|
const H = a.value.find((f) => f.id === _);
|
|
@@ -19397,22 +19401,22 @@ const Ka = () => {
|
|
|
19397
19401
|
!1,
|
|
19398
19402
|
!0
|
|
19399
19403
|
);
|
|
19400
|
-
}, K = (
|
|
19401
|
-
Q.set(
|
|
19402
|
-
const E = a.value.find((x) => x.id ===
|
|
19403
|
-
E && u("delete", E), a.value = a.value.filter((x) => x.id !==
|
|
19404
|
+
}, K = (B) => {
|
|
19405
|
+
Q.set(B, !1);
|
|
19406
|
+
const E = a.value.find((x) => x.id === B);
|
|
19407
|
+
E && u("delete", E), a.value = a.value.filter((x) => x.id !== B), typeof E.drawLayerId == "number" && el(e.value)?.remove(E.drawLayerId), typeof E.outlineId == "number" && el(e.value)?.remove(E.outlineId), V.value.delete(B), Q.delete(B), W.delete(B), B?.startsWith(gd) ? k.value.delete(B) : (el(S.value)?.setValue(B, {
|
|
19404
19408
|
pageIndex: m.value,
|
|
19405
19409
|
deleted: !0,
|
|
19406
19410
|
noView: !0,
|
|
19407
19411
|
noPrint: !0
|
|
19408
19412
|
}), k.value.set(h(), {
|
|
19409
19413
|
pageIndex: m.value,
|
|
19410
|
-
id:
|
|
19414
|
+
id: B,
|
|
19411
19415
|
deleted: !0,
|
|
19412
19416
|
annotationType: jl.Highlight
|
|
19413
19417
|
}));
|
|
19414
|
-
}, A = (
|
|
19415
|
-
let E =
|
|
19418
|
+
}, A = (B) => {
|
|
19419
|
+
let E = B;
|
|
19416
19420
|
J(
|
|
19417
19421
|
() => K(E.id),
|
|
19418
19422
|
() => {
|
|
@@ -19436,10 +19440,10 @@ const Ka = () => {
|
|
|
19436
19440
|
!0
|
|
19437
19441
|
);
|
|
19438
19442
|
};
|
|
19439
|
-
return dl(X, (
|
|
19440
|
-
|
|
19441
|
-
E
|
|
19442
|
-
|
|
19443
|
+
return dl(X, (B) => {
|
|
19444
|
+
if (B)
|
|
19445
|
+
for (const [E, x] of Q.entries())
|
|
19446
|
+
x && Q.set(E, !1);
|
|
19443
19447
|
}), Sd(() => {
|
|
19444
19448
|
el(e.value)?.destroy();
|
|
19445
19449
|
}), {
|
|
@@ -19533,15 +19537,15 @@ const Ka = () => {
|
|
|
19533
19537
|
}), O = Array.from(g?.keys() ?? []).filter((v) => g.get(v).deleted);
|
|
19534
19538
|
if (w = w.filter((v) => !O.includes(v.id)), Zl.length)
|
|
19535
19539
|
for (const v of Zl) {
|
|
19536
|
-
const K = g.get(v), A = w.find((
|
|
19540
|
+
const K = g.get(v), A = w.find((B) => B.id === K.id);
|
|
19537
19541
|
if (A) {
|
|
19538
19542
|
A.rect = K.rect;
|
|
19539
|
-
const
|
|
19543
|
+
const B = L.getEditableAnnotation(
|
|
19540
19544
|
K.id
|
|
19541
19545
|
);
|
|
19542
|
-
|
|
19546
|
+
B && QF(
|
|
19543
19547
|
el(l.page.value),
|
|
19544
|
-
|
|
19548
|
+
B,
|
|
19545
19549
|
K
|
|
19546
19550
|
);
|
|
19547
19551
|
}
|
|
@@ -19660,9 +19664,9 @@ const Ka = () => {
|
|
|
19660
19664
|
annotationEditorStorageMap: k,
|
|
19661
19665
|
getEditorKey: D
|
|
19662
19666
|
} = hU(), { isScrolling: h } = it(T);
|
|
19663
|
-
function X(A,
|
|
19667
|
+
function X(A, B) {
|
|
19664
19668
|
const E = {
|
|
19665
|
-
...
|
|
19669
|
+
...B,
|
|
19666
19670
|
pageIndex: m.value
|
|
19667
19671
|
};
|
|
19668
19672
|
Sl(() => {
|
|
@@ -19714,26 +19718,26 @@ const Ka = () => {
|
|
|
19714
19718
|
a.value = bl;
|
|
19715
19719
|
}
|
|
19716
19720
|
const u = (A) => {
|
|
19717
|
-
const
|
|
19718
|
-
|
|
19721
|
+
const B = A.id;
|
|
19722
|
+
B && (V.get(B) || (K(), V.set(B, !0)));
|
|
19719
19723
|
}, L = (A) => {
|
|
19720
|
-
const
|
|
19721
|
-
|
|
19724
|
+
const B = A.id;
|
|
19725
|
+
B && W.set(B, !0);
|
|
19722
19726
|
}, r = (A) => {
|
|
19723
|
-
const
|
|
19724
|
-
|
|
19727
|
+
const B = A.id;
|
|
19728
|
+
B && W.set(B, !1);
|
|
19725
19729
|
}, w = (A) => {
|
|
19726
19730
|
if (!A.id)
|
|
19727
19731
|
return;
|
|
19728
19732
|
X("delete", A), V.set(A.id, !1), a.value = a.value.filter((H) => H.id !== A.id), V.delete(A.id), Q.value.delete(A.id);
|
|
19729
|
-
const
|
|
19733
|
+
const B = el(l.annotationLayer.value).getEditableAnnotation(
|
|
19730
19734
|
A.id
|
|
19731
19735
|
);
|
|
19732
|
-
if (
|
|
19733
|
-
if ("hide" in
|
|
19734
|
-
|
|
19736
|
+
if (B)
|
|
19737
|
+
if ("hide" in B)
|
|
19738
|
+
B.hide();
|
|
19735
19739
|
else {
|
|
19736
|
-
const H =
|
|
19740
|
+
const H = B.container;
|
|
19737
19741
|
H.dispatchEvent(new Event("click")), H.setAttribute("hidden", "true");
|
|
19738
19742
|
}
|
|
19739
19743
|
const E = g(A.id), x = E ? k.value.get(E) : void 0, _ = x?.id?.startsWith(gd);
|
|
@@ -19759,21 +19763,21 @@ const Ka = () => {
|
|
|
19759
19763
|
};
|
|
19760
19764
|
function g(A) {
|
|
19761
19765
|
return Array.from(k.value.keys()).find(
|
|
19762
|
-
(
|
|
19766
|
+
(B) => k.value.get(B)?.id === A
|
|
19763
19767
|
);
|
|
19764
19768
|
}
|
|
19765
|
-
function $(A,
|
|
19769
|
+
function $(A, B, E) {
|
|
19766
19770
|
const _ = window.getComputedStyle(E).transform;
|
|
19767
19771
|
if (_ === "none")
|
|
19768
|
-
return { x: A, y };
|
|
19772
|
+
return { x: A, y: B };
|
|
19769
19773
|
try {
|
|
19770
|
-
const f = new DOMMatrix(_).inverse(), Fl = new DOMPoint(A,
|
|
19774
|
+
const f = new DOMMatrix(_).inverse(), Fl = new DOMPoint(A, B).matrixTransform(f);
|
|
19771
19775
|
return {
|
|
19772
19776
|
x: Fl.x,
|
|
19773
19777
|
y: Fl.y
|
|
19774
19778
|
};
|
|
19775
19779
|
} catch (H) {
|
|
19776
|
-
return console.warn("Failed to transform coordinates using matrix:", H), { x: A, y };
|
|
19780
|
+
return console.warn("Failed to transform coordinates using matrix:", H), { x: A, y: B };
|
|
19777
19781
|
}
|
|
19778
19782
|
}
|
|
19779
19783
|
const P = (A) => {
|
|
@@ -19819,7 +19823,7 @@ const Ka = () => {
|
|
|
19819
19823
|
});
|
|
19820
19824
|
}
|
|
19821
19825
|
};
|
|
19822
|
-
function Zl(A,
|
|
19826
|
+
function Zl(A, B) {
|
|
19823
19827
|
const x = el(c(l.page)).getViewport({
|
|
19824
19828
|
scale: t.scale * zU.PDF_TO_CSS_UNITS,
|
|
19825
19829
|
rotation: t.rotation
|
|
@@ -19828,11 +19832,11 @@ const Ka = () => {
|
|
|
19828
19832
|
al.debug("[createFreeTextAnnotation] Parent rect not found");
|
|
19829
19833
|
return;
|
|
19830
19834
|
}
|
|
19831
|
-
if (!
|
|
19835
|
+
if (!B.children[0]) {
|
|
19832
19836
|
al.debug("[createFreeTextAnnotation] Editable div not found");
|
|
19833
19837
|
return;
|
|
19834
19838
|
}
|
|
19835
|
-
const f = NW(
|
|
19839
|
+
const f = NW(B, l.editorLayer.value, x), Fl = {
|
|
19836
19840
|
id: D(),
|
|
19837
19841
|
annotationType: jl.FreeText,
|
|
19838
19842
|
pageIndex: m.value,
|
|
@@ -19855,8 +19859,8 @@ const Ka = () => {
|
|
|
19855
19859
|
k.value.set(Fl.id, bl), X("create", Fl);
|
|
19856
19860
|
}
|
|
19857
19861
|
function O(A) {
|
|
19858
|
-
const
|
|
19859
|
-
E.setStart(
|
|
19862
|
+
const B = A, E = document.createRange(), x = window.getSelection();
|
|
19863
|
+
E.setStart(B.childNodes[0], 0), E.collapse(!0), x?.removeAllRanges(), x?.addRange(E);
|
|
19860
19864
|
}
|
|
19861
19865
|
function v(A) {
|
|
19862
19866
|
if (!N.value || A.target instanceof HTMLElement && (A.target.classList.contains("vpv-annotation-editor__free-text") || A.target.closest(".vpv-annotation-editor__free-text")))
|
|
@@ -19908,14 +19912,14 @@ const Ka = () => {
|
|
|
19908
19912
|
e.value = !1, await J(R.value), e.value = !0;
|
|
19909
19913
|
}), dl(
|
|
19910
19914
|
[N, l.pageWrapperLayer],
|
|
19911
|
-
([A,
|
|
19915
|
+
([A, B], E, x) => {
|
|
19912
19916
|
let _ = null;
|
|
19913
|
-
A &&
|
|
19917
|
+
A && B && (B.addEventListener("click", v), _ = new MutationObserver((H) => {
|
|
19914
19918
|
H.forEach((f) => {
|
|
19915
|
-
f.type === "attributes" && f.attributeName === "class" && (
|
|
19919
|
+
f.type === "attributes" && f.attributeName === "class" && (B.className.includes(lZ.FOCUS_IN) || K());
|
|
19916
19920
|
});
|
|
19917
|
-
}), _.observe(
|
|
19918
|
-
|
|
19921
|
+
}), _.observe(B, { attributes: !0, attributeFilter: ["class"] })), x(() => {
|
|
19922
|
+
B?.removeEventListener("click", v), _?.disconnect();
|
|
19919
19923
|
});
|
|
19920
19924
|
},
|
|
19921
19925
|
{ immediate: !0 }
|
|
@@ -19923,8 +19927,8 @@ const Ka = () => {
|
|
|
19923
19927
|
A && K();
|
|
19924
19928
|
});
|
|
19925
19929
|
function K() {
|
|
19926
|
-
V.forEach((A,
|
|
19927
|
-
A && V.set(
|
|
19930
|
+
V.forEach((A, B) => {
|
|
19931
|
+
A && V.set(B, !1);
|
|
19928
19932
|
});
|
|
19929
19933
|
}
|
|
19930
19934
|
return {
|
|
@@ -19948,18 +19952,22 @@ const Ka = () => {
|
|
|
19948
19952
|
ensureStorageInitialized: k,
|
|
19949
19953
|
getEditorKey: D
|
|
19950
19954
|
} = hU(), h = p(() => el(S.value)), { isScrolling: X } = it(o), { addHistory: J } = Ka();
|
|
19951
|
-
dl(
|
|
19952
|
-
|
|
19953
|
-
|
|
19954
|
-
|
|
19955
|
-
|
|
19955
|
+
dl(
|
|
19956
|
+
[N, s],
|
|
19957
|
+
async (B) => {
|
|
19958
|
+
i.value = !1, await w(R.value), i.value = !0;
|
|
19959
|
+
},
|
|
19960
|
+
{ immediate: !0 }
|
|
19961
|
+
);
|
|
19962
|
+
function u(B) {
|
|
19963
|
+
if (!B || B.length === 0) return [];
|
|
19956
19964
|
const E = [], { width: x, height: _ } = l.viewport.value;
|
|
19957
|
-
for (let H = 0; H <
|
|
19965
|
+
for (let H = 0; H < B.length; H += 8) {
|
|
19958
19966
|
const f = [];
|
|
19959
19967
|
for (let xl = 0; xl < 8; xl += 2) {
|
|
19960
19968
|
const [Jd, Xd] = l.viewport.value.convertToViewportPoint(
|
|
19961
|
-
|
|
19962
|
-
|
|
19969
|
+
B[H + xl],
|
|
19970
|
+
B[H + xl + 1]
|
|
19963
19971
|
);
|
|
19964
19972
|
f.push({ x: Jd, y: Xd });
|
|
19965
19973
|
}
|
|
@@ -19968,17 +19976,17 @@ const Ka = () => {
|
|
|
19968
19976
|
}
|
|
19969
19977
|
return E;
|
|
19970
19978
|
}
|
|
19971
|
-
function L(
|
|
19979
|
+
function L(B, E, x, _) {
|
|
19972
19980
|
const H = "http://www.w3.org/2000/svg", tl = document.createElementNS(H, "svg");
|
|
19973
|
-
tl.setAttribute("version", "1.1"), tl.setAttribute("preserveAspectRatio", "none"), tl.setAttribute("viewBox", "0 0 1 1"), tl.setAttribute("aria-hidden", "true"), tl.setAttribute("data-underline-id",
|
|
19981
|
+
tl.setAttribute("version", "1.1"), tl.setAttribute("preserveAspectRatio", "none"), tl.setAttribute("viewBox", "0 0 1 1"), tl.setAttribute("aria-hidden", "true"), tl.setAttribute("data-underline-id", B), tl.classList.add("vpv-underline"), tl.style.cssText = `position: absolute; top: ${x.y * 100}%; left: ${x.x * 100}%; width: ${x.width * 100}%; height: ${x.height * 100}%;`;
|
|
19974
19982
|
for (const Fl of E) {
|
|
19975
19983
|
const bl = Fl.height * 0.1, ul = (Fl.x - x.x) / x.width, q = (Fl.y + Fl.height - bl - x.y) / x.height, Xl = Fl.width / x.width, kl = bl / x.height, Bl = document.createElementNS(H, "rect");
|
|
19976
19984
|
Bl.setAttribute("x", String(ul)), Bl.setAttribute("y", String(q)), Bl.setAttribute("width", String(Xl)), Bl.setAttribute("height", String(kl)), Bl.setAttribute("fill", _), tl.appendChild(Bl);
|
|
19977
19985
|
}
|
|
19978
19986
|
return tl;
|
|
19979
19987
|
}
|
|
19980
|
-
function r(
|
|
19981
|
-
const { hexColor: H, id: f } =
|
|
19988
|
+
function r(B, E, x, _ = !0) {
|
|
19989
|
+
const { hexColor: H, id: f } = B;
|
|
19982
19990
|
al.debug(`[Page ${m.value + 1}] drawUnderlineAnnotation - boxes:`, x);
|
|
19983
19991
|
const { box: tl, getOutlines: Fl } = yt(x), bl = {
|
|
19984
19992
|
x: tl[0],
|
|
@@ -20038,7 +20046,7 @@ const Ka = () => {
|
|
|
20038
20046
|
}
|
|
20039
20047
|
})), { id: q, clipPathUrl: Xl, outlineId: nd, underlineSvg: kl };
|
|
20040
20048
|
}
|
|
20041
|
-
async function w(
|
|
20049
|
+
async function w(B) {
|
|
20042
20050
|
if (!k()) {
|
|
20043
20051
|
al.debug("❌ Storage not initialized in prepareUnderlineElements");
|
|
20044
20052
|
return;
|
|
@@ -20052,7 +20060,7 @@ const Ka = () => {
|
|
|
20052
20060
|
);
|
|
20053
20061
|
const f = el(S.value)?.serializable?.map, tl = Y.value;
|
|
20054
20062
|
for (const q of H)
|
|
20055
|
-
h.value.setValue(q.id, { ...q, noView:
|
|
20063
|
+
h.value.setValue(q.id, { ...q, noView: B });
|
|
20056
20064
|
const Fl = Array.from(tl?.keys() ?? []).filter(
|
|
20057
20065
|
(q) => {
|
|
20058
20066
|
const Xl = tl.get(q);
|
|
@@ -20082,7 +20090,7 @@ const Ka = () => {
|
|
|
20082
20090
|
const Jd = q.id?.startsWith(gd);
|
|
20083
20091
|
if (bl.includes(q.id))
|
|
20084
20092
|
continue;
|
|
20085
|
-
if (!
|
|
20093
|
+
if (!B) {
|
|
20086
20094
|
if (!kl && !Jd)
|
|
20087
20095
|
continue;
|
|
20088
20096
|
const Tl = u(q.quadPoints);
|
|
@@ -20107,11 +20115,11 @@ const Ka = () => {
|
|
|
20107
20115
|
al.error("Error preparing underline elements:", E), i.value = !1;
|
|
20108
20116
|
}
|
|
20109
20117
|
}
|
|
20110
|
-
const g = (
|
|
20118
|
+
const g = (B) => {
|
|
20111
20119
|
Q.forEach((E, x) => {
|
|
20112
20120
|
Q.set(x, !1);
|
|
20113
|
-
}), console.log(`[Page ${m.value + 1}] handleUnderlineClick`,
|
|
20114
|
-
}, $ = (
|
|
20121
|
+
}), console.log(`[Page ${m.value + 1}] handleUnderlineClick`, B), Q.set(B.id, !0);
|
|
20122
|
+
}, $ = (B, E, x, _, H) => {
|
|
20115
20123
|
const f = sn(E, el(l.viewport.value)), tl = on(f), Fl = {
|
|
20116
20124
|
annotationType: jl.Underline,
|
|
20117
20125
|
color: LU(x),
|
|
@@ -20119,7 +20127,7 @@ const Ka = () => {
|
|
|
20119
20127
|
quadPoints: new Float32Array(f),
|
|
20120
20128
|
rect: tl,
|
|
20121
20129
|
pageIndex: m.value,
|
|
20122
|
-
id:
|
|
20130
|
+
id: B,
|
|
20123
20131
|
rotation: T.value,
|
|
20124
20132
|
contents: _,
|
|
20125
20133
|
isAddedNew: !H,
|
|
@@ -20129,9 +20137,9 @@ const Ka = () => {
|
|
|
20129
20137
|
};
|
|
20130
20138
|
a.value.push(Fl);
|
|
20131
20139
|
};
|
|
20132
|
-
function P(
|
|
20140
|
+
function P(B, E, x, _, H = !0) {
|
|
20133
20141
|
const f = sn(E, l.viewport.value), tl = on(f), Fl = {
|
|
20134
|
-
id:
|
|
20142
|
+
id: B,
|
|
20135
20143
|
annotationType: jl.Underline,
|
|
20136
20144
|
quadPoints: new Float32Array(f),
|
|
20137
20145
|
rect: tl,
|
|
@@ -20160,25 +20168,25 @@ const Ka = () => {
|
|
|
20160
20168
|
);
|
|
20161
20169
|
Fl.drawLayerId = bl, Fl.outlineId = q;
|
|
20162
20170
|
const kl = document.createElement("div");
|
|
20163
|
-
kl.style.cssText = Xl.style.cssText, kl.style.position = "absolute", V.value.set(
|
|
20171
|
+
kl.style.cssText = Xl.style.cssText, kl.style.position = "absolute", V.value.set(B, kl);
|
|
20164
20172
|
const Bl = {
|
|
20165
20173
|
...el(Fl),
|
|
20166
20174
|
pageIndex: m.value
|
|
20167
20175
|
};
|
|
20168
|
-
return Y.value.set(
|
|
20169
|
-
W.set(
|
|
20176
|
+
return Y.value.set(B, Bl), a.value.push(Bl), Z(Bl), Sl(() => {
|
|
20177
|
+
W.set(B, {
|
|
20170
20178
|
clipPathUrl: ul,
|
|
20171
20179
|
outlineId: q,
|
|
20172
20180
|
drawLayerId: bl,
|
|
20173
20181
|
underlineSvg: Xl
|
|
20174
|
-
}), Q.set(
|
|
20182
|
+
}), Q.set(B, H);
|
|
20175
20183
|
}), Bl;
|
|
20176
20184
|
}
|
|
20177
|
-
const Zl = async (
|
|
20185
|
+
const Zl = async (B, E, x = !0) => {
|
|
20178
20186
|
const _ = D(), H = d?.value ?? "#ffff00";
|
|
20179
|
-
let f = P(_,
|
|
20187
|
+
let f = P(_, B, H, E, x);
|
|
20180
20188
|
return J(
|
|
20181
|
-
() => f = P(_,
|
|
20189
|
+
() => f = P(_, B, H, E, !1),
|
|
20182
20190
|
() => A(f),
|
|
20183
20191
|
() => {
|
|
20184
20192
|
},
|
|
@@ -20187,10 +20195,10 @@ const Ka = () => {
|
|
|
20187
20195
|
!1,
|
|
20188
20196
|
!0
|
|
20189
20197
|
), f;
|
|
20190
|
-
}, O = (
|
|
20191
|
-
const x = a.value.find((f) => f.id ===
|
|
20198
|
+
}, O = (B, E) => {
|
|
20199
|
+
const x = a.value.find((f) => f.id === B);
|
|
20192
20200
|
if (!x) return;
|
|
20193
|
-
const _ = W.get(
|
|
20201
|
+
const _ = W.get(B);
|
|
20194
20202
|
_?.underlineSvg && _.underlineSvg.querySelectorAll("rect").forEach((tl) => {
|
|
20195
20203
|
tl.setAttribute("fill", E);
|
|
20196
20204
|
}), x.hexColor = E, x.color = LU(E), x.isModified = !0;
|
|
@@ -20198,12 +20206,12 @@ const Ka = () => {
|
|
|
20198
20206
|
...el(x),
|
|
20199
20207
|
pageIndex: m.value
|
|
20200
20208
|
};
|
|
20201
|
-
Y.value.set(
|
|
20202
|
-
}, v = (
|
|
20209
|
+
Y.value.set(B, H), n(H);
|
|
20210
|
+
}, v = (B, E) => {
|
|
20203
20211
|
const x = E.hexColor || "#ff0000", _ = E.id;
|
|
20204
|
-
d && (d.value =
|
|
20212
|
+
d && (d.value = B), J(
|
|
20205
20213
|
() => {
|
|
20206
|
-
a.value.find((f) => f.id === _) && O(_,
|
|
20214
|
+
a.value.find((f) => f.id === _) && O(_, B);
|
|
20207
20215
|
},
|
|
20208
20216
|
() => {
|
|
20209
20217
|
a.value.find((f) => f.id === _) && O(_, x);
|
|
@@ -20215,9 +20223,9 @@ const Ka = () => {
|
|
|
20215
20223
|
!1,
|
|
20216
20224
|
!0
|
|
20217
20225
|
);
|
|
20218
|
-
}, K = (
|
|
20219
|
-
Q.set(
|
|
20220
|
-
const E = a.value.find((_) => _.id ===
|
|
20226
|
+
}, K = (B) => {
|
|
20227
|
+
Q.set(B, !1);
|
|
20228
|
+
const E = a.value.find((_) => _.id === B), x = W.get(B);
|
|
20221
20229
|
if (E) {
|
|
20222
20230
|
el(e.value)?.remove(E.drawLayerId), el(e.value)?.remove(E.outlineId), x?.underlineSvg && x.underlineSvg.remove();
|
|
20223
20231
|
const _ = {
|
|
@@ -20225,11 +20233,11 @@ const Ka = () => {
|
|
|
20225
20233
|
deleted: !0,
|
|
20226
20234
|
pageIndex: m.value
|
|
20227
20235
|
};
|
|
20228
|
-
Y.value.set(
|
|
20236
|
+
Y.value.set(B, _), F(_);
|
|
20229
20237
|
}
|
|
20230
|
-
a.value = a.value.filter((_) => _.id !==
|
|
20231
|
-
}, A = (
|
|
20232
|
-
const E =
|
|
20238
|
+
a.value = a.value.filter((_) => _.id !== B), V.value.delete(B), W.delete(B);
|
|
20239
|
+
}, A = (B) => {
|
|
20240
|
+
const E = B;
|
|
20233
20241
|
J(
|
|
20234
20242
|
() => K(E.id),
|
|
20235
20243
|
() => {
|
|
@@ -20250,7 +20258,11 @@ const Ka = () => {
|
|
|
20250
20258
|
!0
|
|
20251
20259
|
);
|
|
20252
20260
|
};
|
|
20253
|
-
return
|
|
20261
|
+
return dl(X, (B) => {
|
|
20262
|
+
if (B)
|
|
20263
|
+
for (const [E, x] of Q.entries())
|
|
20264
|
+
x && Q.set(E, !1);
|
|
20265
|
+
}), Sd(() => {
|
|
20254
20266
|
el(e.value)?.destroy(), e.value = null, a.value = [], V.value.clear(), Q.clear(), W.clear();
|
|
20255
20267
|
}), {
|
|
20256
20268
|
// State
|
|
@@ -20279,18 +20291,22 @@ const Ka = () => {
|
|
|
20279
20291
|
ensureStorageInitialized: k,
|
|
20280
20292
|
getEditorKey: D
|
|
20281
20293
|
} = hU(), h = p(() => el(S.value)), { isScrolling: X } = it(o), { addHistory: J } = Ka();
|
|
20282
|
-
dl(
|
|
20283
|
-
|
|
20284
|
-
|
|
20285
|
-
|
|
20286
|
-
|
|
20294
|
+
dl(
|
|
20295
|
+
[N, s],
|
|
20296
|
+
async (B) => {
|
|
20297
|
+
i.value = !1, await w(R.value), i.value = !0;
|
|
20298
|
+
},
|
|
20299
|
+
{ immediate: !0 }
|
|
20300
|
+
);
|
|
20301
|
+
function u(B) {
|
|
20302
|
+
if (!B || B.length === 0) return [];
|
|
20287
20303
|
const E = [], { width: x, height: _ } = l.viewport.value;
|
|
20288
|
-
for (let H = 0; H <
|
|
20304
|
+
for (let H = 0; H < B.length; H += 8) {
|
|
20289
20305
|
const f = [];
|
|
20290
20306
|
for (let xl = 0; xl < 8; xl += 2) {
|
|
20291
20307
|
const [Jd, Xd] = l.viewport.value.convertToViewportPoint(
|
|
20292
|
-
|
|
20293
|
-
|
|
20308
|
+
B[H + xl],
|
|
20309
|
+
B[H + xl + 1]
|
|
20294
20310
|
);
|
|
20295
20311
|
f.push({ x: Jd, y: Xd });
|
|
20296
20312
|
}
|
|
@@ -20299,17 +20315,17 @@ const Ka = () => {
|
|
|
20299
20315
|
}
|
|
20300
20316
|
return E;
|
|
20301
20317
|
}
|
|
20302
|
-
function L(
|
|
20318
|
+
function L(B, E, x, _) {
|
|
20303
20319
|
const H = "http://www.w3.org/2000/svg", tl = document.createElementNS(H, "svg");
|
|
20304
|
-
tl.setAttribute("version", "1.1"), tl.setAttribute("preserveAspectRatio", "none"), tl.setAttribute("viewBox", "0 0 1 1"), tl.setAttribute("aria-hidden", "true"), tl.setAttribute("data-strikeout-id",
|
|
20320
|
+
tl.setAttribute("version", "1.1"), tl.setAttribute("preserveAspectRatio", "none"), tl.setAttribute("viewBox", "0 0 1 1"), tl.setAttribute("aria-hidden", "true"), tl.setAttribute("data-strikeout-id", B), tl.classList.add("vpv-strikeout"), tl.style.cssText = `position: absolute; top: ${x.y * 100}%; left: ${x.x * 100}%; width: ${x.width * 100}%; height: ${x.height * 100}%;`;
|
|
20305
20321
|
for (const Fl of E) {
|
|
20306
20322
|
const bl = Fl.height * 0.1, ul = (Fl.x - x.x) / x.width, q = (Fl.y + Fl.height / 2 - bl / 2 - x.y) / x.height, Xl = Fl.width / x.width, kl = bl / x.height, Bl = document.createElementNS(H, "rect");
|
|
20307
20323
|
Bl.setAttribute("x", String(ul)), Bl.setAttribute("y", String(q)), Bl.setAttribute("width", String(Xl)), Bl.setAttribute("height", String(kl)), Bl.setAttribute("fill", _), tl.appendChild(Bl);
|
|
20308
20324
|
}
|
|
20309
20325
|
return tl;
|
|
20310
20326
|
}
|
|
20311
|
-
function r(
|
|
20312
|
-
const { hexColor: H, id: f } =
|
|
20327
|
+
function r(B, E, x, _ = !0) {
|
|
20328
|
+
const { hexColor: H, id: f } = B;
|
|
20313
20329
|
al.debug(`[Page ${m.value + 1}] drawStrikethroughAnnotation - boxes:`, x);
|
|
20314
20330
|
const { box: tl, getOutlines: Fl } = yt(x), bl = {
|
|
20315
20331
|
x: tl[0],
|
|
@@ -20372,7 +20388,7 @@ const Ka = () => {
|
|
|
20372
20388
|
}
|
|
20373
20389
|
})), { id: q, clipPathUrl: Xl, outlineId: nd, strikethroughSvg: kl };
|
|
20374
20390
|
}
|
|
20375
|
-
async function w(
|
|
20391
|
+
async function w(B) {
|
|
20376
20392
|
if (!k()) {
|
|
20377
20393
|
al.debug("❌ Storage not initialized in prepareStrikethroughElements");
|
|
20378
20394
|
return;
|
|
@@ -20387,7 +20403,7 @@ const Ka = () => {
|
|
|
20387
20403
|
al.debug(`[Page ${m.value + 1}] _strikeOutAnnotations`, H);
|
|
20388
20404
|
const f = el(S.value)?.serializable?.map, tl = Y.value;
|
|
20389
20405
|
for (const q of H)
|
|
20390
|
-
h.value.setValue(q.id, { ...q, noView:
|
|
20406
|
+
h.value.setValue(q.id, { ...q, noView: B });
|
|
20391
20407
|
const Fl = Array.from(tl?.keys() ?? []).filter(
|
|
20392
20408
|
(q) => {
|
|
20393
20409
|
const Xl = tl.get(q);
|
|
@@ -20421,7 +20437,7 @@ const Ka = () => {
|
|
|
20421
20437
|
const Jd = q.id?.startsWith(gd);
|
|
20422
20438
|
if (bl.includes(q.id))
|
|
20423
20439
|
continue;
|
|
20424
|
-
if (!
|
|
20440
|
+
if (!B) {
|
|
20425
20441
|
if (!kl && !Jd)
|
|
20426
20442
|
continue;
|
|
20427
20443
|
const Tl = u(q.quadPoints);
|
|
@@ -20446,11 +20462,11 @@ const Ka = () => {
|
|
|
20446
20462
|
al.error("Error preparing strikeout elements:", E), i.value = !1;
|
|
20447
20463
|
}
|
|
20448
20464
|
}
|
|
20449
|
-
const g = (
|
|
20465
|
+
const g = (B) => {
|
|
20450
20466
|
Q.forEach((E, x) => {
|
|
20451
20467
|
Q.set(x, !1);
|
|
20452
|
-
}), al.debug(`[Page ${m.value + 1}] handleStrikethroughClick`,
|
|
20453
|
-
}, $ = (
|
|
20468
|
+
}), al.debug(`[Page ${m.value + 1}] handleStrikethroughClick`, B), Q.set(B.id, !0);
|
|
20469
|
+
}, $ = (B, E, x, _, H) => {
|
|
20454
20470
|
const f = sn(E, el(l.viewport.value)), tl = on(f), Fl = {
|
|
20455
20471
|
annotationType: jl.StrikeOut,
|
|
20456
20472
|
color: LU(x),
|
|
@@ -20458,7 +20474,7 @@ const Ka = () => {
|
|
|
20458
20474
|
quadPoints: new Float32Array(f),
|
|
20459
20475
|
rect: tl,
|
|
20460
20476
|
pageIndex: m.value,
|
|
20461
|
-
id:
|
|
20477
|
+
id: B,
|
|
20462
20478
|
rotation: T.value,
|
|
20463
20479
|
contents: _,
|
|
20464
20480
|
isAddedNew: !H,
|
|
@@ -20468,9 +20484,9 @@ const Ka = () => {
|
|
|
20468
20484
|
};
|
|
20469
20485
|
a.value.push(Fl);
|
|
20470
20486
|
};
|
|
20471
|
-
function P(
|
|
20487
|
+
function P(B, E, x, _, H = !0) {
|
|
20472
20488
|
const f = sn(E, l.viewport.value), tl = on(f), Fl = {
|
|
20473
|
-
id:
|
|
20489
|
+
id: B,
|
|
20474
20490
|
annotationType: jl.StrikeOut,
|
|
20475
20491
|
quadPoints: new Float32Array(f),
|
|
20476
20492
|
rect: tl,
|
|
@@ -20499,25 +20515,25 @@ const Ka = () => {
|
|
|
20499
20515
|
);
|
|
20500
20516
|
Fl.drawLayerId = bl, Fl.outlineId = q;
|
|
20501
20517
|
const kl = document.createElement("div");
|
|
20502
|
-
kl.style.cssText = Xl.style.cssText, kl.style.position = "absolute", V.value.set(
|
|
20518
|
+
kl.style.cssText = Xl.style.cssText, kl.style.position = "absolute", V.value.set(B, kl);
|
|
20503
20519
|
const Bl = {
|
|
20504
20520
|
...el(Fl),
|
|
20505
20521
|
pageIndex: m.value
|
|
20506
20522
|
};
|
|
20507
|
-
return Y.value.set(
|
|
20508
|
-
W.set(
|
|
20523
|
+
return Y.value.set(B, Bl), a.value.push(Bl), Z(Bl), Sl(() => {
|
|
20524
|
+
W.set(B, {
|
|
20509
20525
|
clipPathUrl: ul,
|
|
20510
20526
|
outlineId: q,
|
|
20511
20527
|
drawLayerId: bl,
|
|
20512
20528
|
strikethroughSvg: Xl
|
|
20513
|
-
}), Q.set(
|
|
20529
|
+
}), Q.set(B, H);
|
|
20514
20530
|
}), Bl;
|
|
20515
20531
|
}
|
|
20516
|
-
const Zl = async (
|
|
20532
|
+
const Zl = async (B, E, x = !0) => {
|
|
20517
20533
|
const _ = D(), H = d?.value ?? "#ffff00";
|
|
20518
|
-
let f = P(_,
|
|
20534
|
+
let f = P(_, B, H, E, x);
|
|
20519
20535
|
return J(
|
|
20520
|
-
() => f = P(_,
|
|
20536
|
+
() => f = P(_, B, H, E, !1),
|
|
20521
20537
|
() => A(f),
|
|
20522
20538
|
() => {
|
|
20523
20539
|
},
|
|
@@ -20526,10 +20542,10 @@ const Ka = () => {
|
|
|
20526
20542
|
!1,
|
|
20527
20543
|
!0
|
|
20528
20544
|
), f;
|
|
20529
|
-
}, O = (
|
|
20530
|
-
const x = a.value.find((f) => f.id ===
|
|
20545
|
+
}, O = (B, E) => {
|
|
20546
|
+
const x = a.value.find((f) => f.id === B);
|
|
20531
20547
|
if (!x) return;
|
|
20532
|
-
const _ = W.get(
|
|
20548
|
+
const _ = W.get(B);
|
|
20533
20549
|
_?.strikethroughSvg && _.strikethroughSvg.querySelectorAll("rect").forEach((tl) => {
|
|
20534
20550
|
tl.setAttribute("fill", E);
|
|
20535
20551
|
}), x.hexColor = E, x.color = LU(E), x.isModified = !0;
|
|
@@ -20537,14 +20553,14 @@ const Ka = () => {
|
|
|
20537
20553
|
...el(x),
|
|
20538
20554
|
pageIndex: m.value
|
|
20539
20555
|
};
|
|
20540
|
-
Y.value.set(
|
|
20541
|
-
}, v = (
|
|
20556
|
+
Y.value.set(B, H), n(H);
|
|
20557
|
+
}, v = (B, E) => {
|
|
20542
20558
|
const x = E.hexColor || "#ff0000", _ = E.id;
|
|
20543
|
-
d && (d.value =
|
|
20559
|
+
d && (d.value = B), J(
|
|
20544
20560
|
() => {
|
|
20545
20561
|
a.value.find(
|
|
20546
20562
|
(f) => f.id === _
|
|
20547
|
-
) && O(_,
|
|
20563
|
+
) && O(_, B);
|
|
20548
20564
|
},
|
|
20549
20565
|
() => {
|
|
20550
20566
|
a.value.find(
|
|
@@ -20558,9 +20574,9 @@ const Ka = () => {
|
|
|
20558
20574
|
!1,
|
|
20559
20575
|
!0
|
|
20560
20576
|
);
|
|
20561
|
-
}, K = (
|
|
20562
|
-
Q.set(
|
|
20563
|
-
const E = a.value.find((_) => _.id ===
|
|
20577
|
+
}, K = (B) => {
|
|
20578
|
+
Q.set(B, !1);
|
|
20579
|
+
const E = a.value.find((_) => _.id === B), x = W.get(B);
|
|
20564
20580
|
if (E) {
|
|
20565
20581
|
el(e.value)?.remove(E.drawLayerId), el(e.value)?.remove(E.outlineId), x?.strikethroughSvg && x.strikethroughSvg.remove();
|
|
20566
20582
|
const _ = {
|
|
@@ -20568,13 +20584,13 @@ const Ka = () => {
|
|
|
20568
20584
|
deleted: !0,
|
|
20569
20585
|
pageIndex: m.value
|
|
20570
20586
|
};
|
|
20571
|
-
Y.value.set(
|
|
20587
|
+
Y.value.set(B, _), F(_);
|
|
20572
20588
|
}
|
|
20573
20589
|
a.value = a.value.filter(
|
|
20574
|
-
(_) => _.id !==
|
|
20575
|
-
), V.value.delete(
|
|
20576
|
-
}, A = (
|
|
20577
|
-
const E =
|
|
20590
|
+
(_) => _.id !== B
|
|
20591
|
+
), V.value.delete(B), W.delete(B);
|
|
20592
|
+
}, A = (B) => {
|
|
20593
|
+
const E = B;
|
|
20578
20594
|
J(
|
|
20579
20595
|
() => K(E.id),
|
|
20580
20596
|
() => {
|
|
@@ -20595,7 +20611,11 @@ const Ka = () => {
|
|
|
20595
20611
|
!0
|
|
20596
20612
|
);
|
|
20597
20613
|
};
|
|
20598
|
-
return
|
|
20614
|
+
return dl(X, (B) => {
|
|
20615
|
+
if (B)
|
|
20616
|
+
for (const [E, x] of Q.entries())
|
|
20617
|
+
x && Q.set(E, !1);
|
|
20618
|
+
}), Sd(() => {
|
|
20599
20619
|
el(e.value)?.destroy(), e.value = null, a.value = [], V.value.clear(), Q.clear(), W.clear();
|
|
20600
20620
|
}), {
|
|
20601
20621
|
// State
|
|
@@ -20770,7 +20790,7 @@ const Ka = () => {
|
|
|
20770
20790
|
editorLayer: n
|
|
20771
20791
|
}), {
|
|
20772
20792
|
isPrepared: A,
|
|
20773
|
-
underlineAnnotations:
|
|
20793
|
+
underlineAnnotations: B,
|
|
20774
20794
|
underlineElements: E,
|
|
20775
20795
|
underlineElementClickOpens: x,
|
|
20776
20796
|
underlineCanvasInfos: _,
|
|
@@ -20896,7 +20916,7 @@ const Ka = () => {
|
|
|
20896
20916
|
for (const nl of N.value)
|
|
20897
20917
|
if (m.get(nl.id))
|
|
20898
20918
|
return { annotation: nl, type: "highlight" };
|
|
20899
|
-
for (const nl of
|
|
20919
|
+
for (const nl of B.value)
|
|
20900
20920
|
if (x.get(nl.id))
|
|
20901
20921
|
return { annotation: nl, type: "underline" };
|
|
20902
20922
|
for (const nl of q.value)
|
|
@@ -21029,7 +21049,7 @@ const Ka = () => {
|
|
|
21029
21049
|
"is-selected": c(m).get(Vl.id) || !1,
|
|
21030
21050
|
onClick: (Jl) => Rl(Vl)
|
|
21031
21051
|
}, null, 8, ["annotation", "element", "draw-layer", "clip-path-url", "outline-id", "is-selected", "onClick"]))), 128)) : Gl("", !0),
|
|
21032
|
-
c(A) ? (M(!0), Nl(Qd, { key: 1 }, Ed(c(
|
|
21052
|
+
c(A) ? (M(!0), Nl(Qd, { key: 1 }, Ed(c(B), (Vl) => (M(), I(Ve, {
|
|
21033
21053
|
key: `underline-${Vl.id}`,
|
|
21034
21054
|
annotation: Vl,
|
|
21035
21055
|
element: c(E).get(Vl.id) || null,
|
|
@@ -21422,13 +21442,13 @@ const Rk = /* @__PURE__ */ j({
|
|
|
21422
21442
|
dl(o, (K, A) => {
|
|
21423
21443
|
if (K && J && (clearTimeout(J), J = null), K && r && !r.parentNode && (iU(r), r = null), A && !K && X.value) {
|
|
21424
21444
|
X.value = !1;
|
|
21425
|
-
const
|
|
21426
|
-
|
|
21445
|
+
const B = Y.value?.querySelector("canvas");
|
|
21446
|
+
B && B.width > 0 && B.height > 0 || (J && clearTimeout(J), J = setTimeout(async () => {
|
|
21427
21447
|
o.value || (await Sl(), await v(!0));
|
|
21428
21448
|
}, 50));
|
|
21429
21449
|
}
|
|
21430
21450
|
});
|
|
21431
|
-
const g = (K, A,
|
|
21451
|
+
const g = (K, A, B, E, x) => {
|
|
21432
21452
|
const {
|
|
21433
21453
|
scale: _,
|
|
21434
21454
|
needsRestriction: H,
|
|
@@ -21436,27 +21456,27 @@ const Rk = /* @__PURE__ */ j({
|
|
|
21436
21456
|
} = E0(
|
|
21437
21457
|
K,
|
|
21438
21458
|
A,
|
|
21439
|
-
|
|
21459
|
+
B,
|
|
21440
21460
|
E,
|
|
21441
21461
|
x,
|
|
21442
21462
|
d,
|
|
21443
21463
|
Ke
|
|
21444
21464
|
);
|
|
21445
21465
|
return R.value = H, H && al.warn(
|
|
21446
|
-
`Canvas dimension constrained due to ${f} limit. Page ${Q.value?.pageNumber || "?"}: ${Math.round(K *
|
|
21466
|
+
`Canvas dimension constrained due to ${f} limit. Page ${Q.value?.pageNumber || "?"}: ${Math.round(K * B)}×${Math.round(A * B)} → ${Math.round(K * _)}×${Math.round(A * _)} (scale: ${B.toFixed(2)} → ${_.toFixed(2)})` + (ge ? " [iOS device]" : "")
|
|
21447
21467
|
), _;
|
|
21448
|
-
}, $ = (K, A,
|
|
21468
|
+
}, $ = (K, A, B, E) => ({
|
|
21449
21469
|
canvasContext: K,
|
|
21450
21470
|
transform: E,
|
|
21451
21471
|
viewport: A,
|
|
21452
|
-
annotationMode:
|
|
21472
|
+
annotationMode: B,
|
|
21453
21473
|
annotationCanvasMap: void 0,
|
|
21454
21474
|
intent: "display",
|
|
21455
21475
|
// Optimize for display
|
|
21456
21476
|
isEditing: n.isEditing
|
|
21457
21477
|
}), P = (K, A) => {
|
|
21458
21478
|
if (BZ(K), k.value = wU.DidRender, t.afterCanvasLoaded) {
|
|
21459
|
-
const
|
|
21479
|
+
const B = {
|
|
21460
21480
|
width: A.width,
|
|
21461
21481
|
height: A.height,
|
|
21462
21482
|
canvasWidth: K.width,
|
|
@@ -21464,7 +21484,7 @@ const Rk = /* @__PURE__ */ j({
|
|
|
21464
21484
|
widthRatio: K.width / A.width,
|
|
21465
21485
|
heightRatio: K.height / A.height
|
|
21466
21486
|
};
|
|
21467
|
-
t.afterCanvasLoaded(K,
|
|
21487
|
+
t.afterCanvasLoaded(K, B);
|
|
21468
21488
|
}
|
|
21469
21489
|
}, Zl = (K, A) => {
|
|
21470
21490
|
BZ(K), A?.name === "RenderingCancelledException" ? al.debug("Render cancelled (expected during state changes):", A.message) : al.warn("Render failed or cancelled:", A, Q.value.pageNumber);
|
|
@@ -21472,8 +21492,8 @@ const Rk = /* @__PURE__ */ j({
|
|
|
21472
21492
|
function O() {
|
|
21473
21493
|
const K = el(a.value);
|
|
21474
21494
|
if (K?.serializable?.map?.size)
|
|
21475
|
-
for (const [A,
|
|
21476
|
-
const { value: E, ...x } =
|
|
21495
|
+
for (const [A, B] of K.serializable.map.entries()) {
|
|
21496
|
+
const { value: E, ...x } = B;
|
|
21477
21497
|
Object.keys(x).length || K.setValue(A, { value: E, noView: !0 });
|
|
21478
21498
|
}
|
|
21479
21499
|
}
|
|
@@ -21492,9 +21512,9 @@ const Rk = /* @__PURE__ */ j({
|
|
|
21492
21512
|
return;
|
|
21493
21513
|
}
|
|
21494
21514
|
L = n.isEditing;
|
|
21495
|
-
const { scale:
|
|
21515
|
+
const { scale: B, rotation: E } = n, x = Q.value.getViewport(), _ = ((E + x.rotation) % 360 + 360) % 360, H = Q.value.getViewport({
|
|
21496
21516
|
rotation: _,
|
|
21497
|
-
scale:
|
|
21517
|
+
scale: B ?? 1
|
|
21498
21518
|
});
|
|
21499
21519
|
m.value = H, r && !r.parentNode && (iU(r), r = null), r = pW("vpv-canvas");
|
|
21500
21520
|
let f = window.devicePixelRatio || 1;
|
|
@@ -21597,8 +21617,8 @@ const Rk = /* @__PURE__ */ j({
|
|
|
21597
21617
|
// Watch rotation changes too
|
|
21598
21618
|
() => el(a.value)?.serializable?.hash
|
|
21599
21619
|
],
|
|
21600
|
-
async ([K, A,
|
|
21601
|
-
if (!K || !Y.value || (
|
|
21620
|
+
async ([K, A, B, E, x, _], H, f) => {
|
|
21621
|
+
if (!K || !Y.value || (B && (k.value = wU.PreRender), A))
|
|
21602
21622
|
return;
|
|
21603
21623
|
J && clearTimeout(J), J = setTimeout(async () => {
|
|
21604
21624
|
await Sl(), await v(
|
|
@@ -22246,7 +22266,7 @@ const Ck = (l, U) => new Promise((d) => {
|
|
|
22246
22266
|
document: hl,
|
|
22247
22267
|
page: F.value
|
|
22248
22268
|
};
|
|
22249
|
-
}),
|
|
22269
|
+
}), B = p(() => ({
|
|
22250
22270
|
annotations: S.value,
|
|
22251
22271
|
annotationsMap: void 0,
|
|
22252
22272
|
annotationsFilter: void 0,
|
|
@@ -22360,7 +22380,7 @@ const Ck = (l, U) => new Promise((d) => {
|
|
|
22360
22380
|
}, null, 8, ["page", "page-index", "intersecting", "after-canvas-loaded", "visible-area"])
|
|
22361
22381
|
], 8, Hk),
|
|
22362
22382
|
K.value ? (M(), I(xk, pl({ key: 0 }, E.value, { onTextLoaded: bl }), null, 16)) : Gl("", !0),
|
|
22363
|
-
K.value && k.value ? (M(), I(gG, pl({ key: 1 }, { ...A.value, ...
|
|
22383
|
+
K.value && k.value ? (M(), I(gG, pl({ key: 1 }, { ...A.value, ...B.value }, {
|
|
22364
22384
|
onAnnotation: tl,
|
|
22365
22385
|
onAnnotationLoaded: Fl,
|
|
22366
22386
|
onRendered: q
|
|
@@ -25956,7 +25976,7 @@ const yI = (l, U) => {
|
|
|
25956
25976
|
X.preventDefault(), X.stopPropagation();
|
|
25957
25977
|
let [J, u] = Array.from(X.touches);
|
|
25958
25978
|
J.identifier > u.identifier && ([J, u] = [u, J]);
|
|
25959
|
-
const L = J.screenX, r = J.screenY, w = u.screenX, g = u.screenY, { touch0X: $, touch0Y: P, touch1X: Zl, touch1Y: O } = Z, v = Zl - $, K = O - P, A = w - L,
|
|
25979
|
+
const L = J.screenX, r = J.screenY, w = u.screenX, g = u.screenY, { touch0X: $, touch0Y: P, touch1X: Zl, touch1Y: O } = Z, v = Zl - $, K = O - P, A = w - L, B = g - r, E = Math.hypot(A, B) || 1, x = Math.hypot(v, K) || 1;
|
|
25960
25980
|
if (!(!n && Math.abs(x - E) <= zI)) {
|
|
25961
25981
|
if (Z.touch0X = L, Z.touch0Y = r, Z.touch1X = w, Z.touch1Y = g, !n) {
|
|
25962
25982
|
n = !0;
|
|
@@ -26044,7 +26064,7 @@ function wI(l) {
|
|
|
26044
26064
|
}, A = (ll) => {
|
|
26045
26065
|
const Ul = t.value.at(ll);
|
|
26046
26066
|
return Ul ? Ul.width * n.value : 0;
|
|
26047
|
-
},
|
|
26067
|
+
}, B = p(() => {
|
|
26048
26068
|
switch (U.value) {
|
|
26049
26069
|
case Pl.Horizontal:
|
|
26050
26070
|
return A;
|
|
@@ -26147,7 +26167,7 @@ function wI(l) {
|
|
|
26147
26167
|
const Rl = Math.max(0, Math.min(Ul, t.value.length - 1));
|
|
26148
26168
|
let nl = 0, Wl = 0;
|
|
26149
26169
|
for (let Vl = Rl; Vl < t.value.length; Vl++) {
|
|
26150
|
-
const Jl = c(
|
|
26170
|
+
const Jl = c(B)(Vl);
|
|
26151
26171
|
if (nl += Jl, Wl = Vl, nl > ll) break;
|
|
26152
26172
|
}
|
|
26153
26173
|
return Wl - Rl;
|
|
@@ -27173,7 +27193,7 @@ function AI() {
|
|
|
27173
27193
|
};
|
|
27174
27194
|
}
|
|
27175
27195
|
let DW = "";
|
|
27176
|
-
DW = "https://unpkg.com/@vue-pdf-viewer/viewer@3.7.0-beta.
|
|
27196
|
+
DW = "https://unpkg.com/@vue-pdf-viewer/viewer@3.7.0-beta.1/dist/assets/pdf-annotations/";
|
|
27177
27197
|
const g0 = DW;
|
|
27178
27198
|
class qI {
|
|
27179
27199
|
_items = [];
|
|
@@ -27890,96 +27910,96 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
27890
27910
|
Hl(yQ, Q);
|
|
27891
27911
|
const W = d, i = Pd(), { resetTextLayers: o } = fa(), { hasPageBeenRendered: s, markPageAsRendered: N, clearRenderedPages: R } = AI(), m = p({
|
|
27892
27912
|
get: () => t.characterMap,
|
|
27893
|
-
set: (
|
|
27913
|
+
set: (y) => {
|
|
27894
27914
|
}
|
|
27895
27915
|
}), T = p({
|
|
27896
27916
|
get: () => t.initialThumbnailsVisible,
|
|
27897
|
-
set: (
|
|
27917
|
+
set: (y) => {
|
|
27898
27918
|
}
|
|
27899
27919
|
}), S = p({
|
|
27900
27920
|
get: () => t.toolbarOptions,
|
|
27901
|
-
set: (
|
|
27921
|
+
set: (y) => {
|
|
27902
27922
|
}
|
|
27903
27923
|
});
|
|
27904
27924
|
p({
|
|
27905
27925
|
get: () => t.localization,
|
|
27906
|
-
set: (
|
|
27926
|
+
set: (y) => {
|
|
27907
27927
|
}
|
|
27908
27928
|
});
|
|
27909
27929
|
const Y = p({
|
|
27910
27930
|
get: () => t.initialScrollMode,
|
|
27911
|
-
set: (
|
|
27931
|
+
set: (y) => {
|
|
27912
27932
|
}
|
|
27913
27933
|
}), k = p({
|
|
27914
27934
|
get: () => t.initialViewMode,
|
|
27915
|
-
set: (
|
|
27935
|
+
set: (y) => {
|
|
27916
27936
|
}
|
|
27917
27937
|
}), D = p({
|
|
27918
27938
|
get: () => t.scrollMode ?? Y.value ?? Pl.Vertical,
|
|
27919
|
-
set: (
|
|
27939
|
+
set: (y) => {
|
|
27920
27940
|
}
|
|
27921
27941
|
}), h = p({
|
|
27922
27942
|
get: () => t.viewMode ?? k.value ?? gl.SinglePage,
|
|
27923
|
-
set: (
|
|
27943
|
+
set: (y) => {
|
|
27924
27944
|
}
|
|
27925
27945
|
}), X = p({
|
|
27926
27946
|
get: () => t.textLayer,
|
|
27927
|
-
set: (
|
|
27947
|
+
set: (y) => {
|
|
27928
27948
|
}
|
|
27929
27949
|
}), J = p({
|
|
27930
27950
|
get: () => t.initialScale,
|
|
27931
|
-
set: (
|
|
27951
|
+
set: (y) => {
|
|
27932
27952
|
}
|
|
27933
27953
|
}), u = p({
|
|
27934
27954
|
get: () => t.initialRotation,
|
|
27935
|
-
set: (
|
|
27955
|
+
set: (y) => {
|
|
27936
27956
|
}
|
|
27937
27957
|
}), L = p({
|
|
27938
27958
|
get: () => t.initialPage,
|
|
27939
|
-
set: (
|
|
27959
|
+
set: (y) => {
|
|
27940
27960
|
}
|
|
27941
27961
|
}), r = p({
|
|
27942
27962
|
get: () => t.initialSearch,
|
|
27943
|
-
set: (
|
|
27963
|
+
set: (y) => {
|
|
27944
27964
|
}
|
|
27945
27965
|
}), w = p({
|
|
27946
27966
|
get: () => t.workerUrl,
|
|
27947
|
-
set: (
|
|
27967
|
+
set: (y) => {
|
|
27948
27968
|
}
|
|
27949
27969
|
}), g = p({
|
|
27950
27970
|
get: () => t.afterCanvasLoaded,
|
|
27951
|
-
set: (
|
|
27971
|
+
set: (y) => {
|
|
27952
27972
|
}
|
|
27953
27973
|
});
|
|
27954
27974
|
p({
|
|
27955
27975
|
get: () => t.textHighlights,
|
|
27956
|
-
set: (
|
|
27976
|
+
set: (y) => {
|
|
27957
27977
|
}
|
|
27958
27978
|
});
|
|
27959
27979
|
const $ = p({
|
|
27960
27980
|
get: () => t.downloadFilename ?? yd.value,
|
|
27961
|
-
set: (
|
|
27981
|
+
set: (y) => {
|
|
27962
27982
|
}
|
|
27963
27983
|
}), P = p({
|
|
27964
27984
|
get: () => t.documentOptions,
|
|
27965
|
-
set: (
|
|
27985
|
+
set: (y) => {
|
|
27966
27986
|
}
|
|
27967
27987
|
}), Zl = mF(), O = G(!1), v = fl(), K = fl();
|
|
27968
27988
|
let A;
|
|
27969
|
-
const
|
|
27989
|
+
const B = G(L.value), E = p(() => B.value - 1), x = G(u.value), _ = G(X.value), H = G(D.value), f = G(h.value);
|
|
27970
27990
|
t.scrollMode && t.initialScrollMode && al.warn(
|
|
27971
27991
|
"The use of both `initialScrollMode` and `scrollMode` simultaneously is strongly discouraged due to potential conflicts and unintended behavior."
|
|
27972
27992
|
), t.viewMode && t.initialViewMode && al.warn(
|
|
27973
27993
|
"The use of both `initialViewMode` and `viewMode` simultaneously is strongly discouraged due to potential conflicts and unintended behavior."
|
|
27974
27994
|
);
|
|
27975
|
-
const tl = G(T?.value ?? !1), Fl = G(!1), bl = G(null), ul = fl({ matchCase: !1, wholeWords: !1 }), { queue: q, cancelAllRenders: Xl, reprioritizeCurrentPage: kl } = _I(
|
|
27995
|
+
const tl = G(T?.value ?? !1), Fl = G(!1), bl = G(null), ul = fl({ matchCase: !1, wholeWords: !1 }), { queue: q, cancelAllRenders: Xl, reprioritizeCurrentPage: kl } = _I(B), Bl = ld({
|
|
27976
27996
|
thumbnails: T?.value ?? !1,
|
|
27977
27997
|
comments: !1
|
|
27978
27998
|
});
|
|
27979
27999
|
p(() => Object.values(Bl).some(Boolean));
|
|
27980
28000
|
const hl = p(() => Zl.pageOverlay !== void 0), Dl = ld(
|
|
27981
|
-
Object.keys(jl).filter((
|
|
27982
|
-
(
|
|
28001
|
+
Object.keys(jl).filter((y) => isNaN(Number(y))).reduce(
|
|
28002
|
+
(y, ol) => (y[ol] = !1, y),
|
|
27983
28003
|
{}
|
|
27984
28004
|
)
|
|
27985
28005
|
), nd = G(null), xl = G(null), Jd = G(null), Xd = G(null), id = G({ totalMatches: 0, matches: [] }), ud = ld({
|
|
@@ -28003,7 +28023,7 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28003
28023
|
} = hU(), { pdfPages: ql, filteredPages: vl } = BI(a), Vd = fI(v, vl), _l = p(() => {
|
|
28004
28024
|
if (S.value !== !1)
|
|
28005
28025
|
return { ...XQ, ...S.value };
|
|
28006
|
-
}), Td = p(() => ql.value?.at(
|
|
28026
|
+
}), Td = p(() => ql.value?.at(B.value - 1));
|
|
28007
28027
|
p(() => _l.value?.thumbnailViewable);
|
|
28008
28028
|
const {
|
|
28009
28029
|
list: Rd,
|
|
@@ -28043,13 +28063,13 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28043
28063
|
currentScale: Rl,
|
|
28044
28064
|
onScaleRequest: Et
|
|
28045
28065
|
}),
|
|
28046
|
-
(
|
|
28047
|
-
al.debug("OnZoom",
|
|
28066
|
+
(y) => {
|
|
28067
|
+
al.debug("OnZoom", y);
|
|
28048
28068
|
}
|
|
28049
28069
|
), { onRotateClockwise: Ot, onRotateCounterclockwise: vt } = yI(
|
|
28050
28070
|
x,
|
|
28051
|
-
(
|
|
28052
|
-
O.value || W("rotate",
|
|
28071
|
+
(y) => {
|
|
28072
|
+
O.value || W("rotate", y);
|
|
28053
28073
|
}
|
|
28054
28074
|
), { width: hn, height: gt } = tF(Ud), { license: SU } = oi(K);
|
|
28055
28075
|
LI(Ud, Rl, jt);
|
|
@@ -28058,34 +28078,34 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28058
28078
|
const Jn = p(() => {
|
|
28059
28079
|
if (!_l?.value || !Object.keys(_l.value).length)
|
|
28060
28080
|
return 0;
|
|
28061
|
-
let
|
|
28081
|
+
let y = [
|
|
28062
28082
|
"jumpNavigatable",
|
|
28063
28083
|
"rotatable",
|
|
28064
28084
|
"pointerSwitchable",
|
|
28065
28085
|
"docPropertiesEnabled"
|
|
28066
28086
|
];
|
|
28067
|
-
Kt.value && (
|
|
28087
|
+
Kt.value && (y = [
|
|
28068
28088
|
"newFileOpenable",
|
|
28069
28089
|
"printable",
|
|
28070
28090
|
"downloadable",
|
|
28071
28091
|
"fullscreen",
|
|
28072
|
-
...
|
|
28092
|
+
...y
|
|
28073
28093
|
]);
|
|
28074
28094
|
const ol = [];
|
|
28075
28095
|
return Object.entries(_l.value).forEach((il) => {
|
|
28076
28096
|
const [$l, Md] = il;
|
|
28077
|
-
|
|
28097
|
+
y.includes($l) && Md && ol.push($l);
|
|
28078
28098
|
}), ol.length;
|
|
28079
28099
|
}), xF = p(() => {
|
|
28080
28100
|
if (!Ud.value) return 0;
|
|
28081
|
-
const
|
|
28082
|
-
return parseInt(
|
|
28101
|
+
const y = getComputedStyle(Ud.value);
|
|
28102
|
+
return parseInt(y.getPropertyValue("--vpv-container-width-sm") ?? 0);
|
|
28083
28103
|
}), Kt = p(() => hn.value ? hn.value <= xF.value : !1), KZ = p(() => a.scrollMode === Pl.Page), lc = p(
|
|
28084
28104
|
() => SU.isValidKey && (SU.type === jU.Organization || SU.type === jU.All)
|
|
28085
|
-
), dc = p(() => SU.type === jU.Unlicense), Uc = p(() => SU.isValidKey && SU.type === jU.FreeTrial), Gn = p(() => lc.value || dc.value || Uc.value), tc = (
|
|
28105
|
+
), dc = p(() => SU.type === jU.Unlicense), Uc = p(() => SU.isValidKey && SU.type === jU.FreeTrial), Gn = p(() => lc.value || dc.value || Uc.value), tc = (y) => {
|
|
28086
28106
|
const { isCompressed: ol, url: il } = m.value;
|
|
28087
28107
|
return {
|
|
28088
|
-
url:
|
|
28108
|
+
url: y,
|
|
28089
28109
|
cMapPacked: typeof ol > "u" ? !0 : ol,
|
|
28090
28110
|
cMapUrl: il,
|
|
28091
28111
|
// withCredentials: true,
|
|
@@ -28094,41 +28114,41 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28094
28114
|
};
|
|
28095
28115
|
dl(
|
|
28096
28116
|
() => t.src,
|
|
28097
|
-
async (
|
|
28117
|
+
async (y) => {
|
|
28098
28118
|
q.clear(), o();
|
|
28099
|
-
const ol = ZU(
|
|
28100
|
-
if (await U0(ol), Tl.value = !1, sl.value = 0, yd.value = ol?.split("/")?.pop(), Yl.value ? vF() :
|
|
28119
|
+
const ol = ZU(y) ? y.value : y;
|
|
28120
|
+
if (await U0(ol), Tl.value = !1, sl.value = 0, yd.value = ol?.split("/")?.pop(), Yl.value ? vF() : B.value = L.value, m?.value) {
|
|
28101
28121
|
Ul.value = tc(ol);
|
|
28102
28122
|
return;
|
|
28103
28123
|
}
|
|
28104
28124
|
Ul.value = ol;
|
|
28105
28125
|
},
|
|
28106
28126
|
{ deep: !0, immediate: !0 }
|
|
28107
|
-
), dl(Ul, (
|
|
28108
|
-
|
|
28127
|
+
), dl(Ul, (y) => {
|
|
28128
|
+
y && Yl.value && vF();
|
|
28109
28129
|
});
|
|
28110
|
-
const Zc = async (
|
|
28111
|
-
if (!await U0(
|
|
28130
|
+
const Zc = async (y) => {
|
|
28131
|
+
if (!await U0(y)) {
|
|
28112
28132
|
Ul.value = void 0;
|
|
28113
28133
|
return;
|
|
28114
28134
|
}
|
|
28115
28135
|
if (m?.value) {
|
|
28116
|
-
Ul.value = tc(
|
|
28136
|
+
Ul.value = tc(y);
|
|
28117
28137
|
return;
|
|
28118
28138
|
}
|
|
28119
|
-
Ul.value =
|
|
28120
|
-
}, nc = (
|
|
28121
|
-
yd.value =
|
|
28139
|
+
Ul.value = y;
|
|
28140
|
+
}, nc = (y) => {
|
|
28141
|
+
yd.value = y;
|
|
28122
28142
|
};
|
|
28123
|
-
function IW(
|
|
28124
|
-
al.debug(`Reason for callback: ${ol}`), ol === 1 ? (yl.value = !0, Kl =
|
|
28143
|
+
function IW(y, ol) {
|
|
28144
|
+
al.debug(`Reason for callback: ${ol}`), ol === 1 ? (yl.value = !0, Kl = y) : ol === 2 && (zl.value = gF.value.passwordError);
|
|
28125
28145
|
}
|
|
28126
|
-
const EW = ({ loaded:
|
|
28127
|
-
const il =
|
|
28146
|
+
const EW = ({ loaded: y, total: ol }) => {
|
|
28147
|
+
const il = y / ol * XZ;
|
|
28128
28148
|
sl.value > XZ && (sl.value = XZ), O.value || W("loadProgress", il), sl.value = Math.trunc(il);
|
|
28129
28149
|
};
|
|
28130
|
-
function Fc(
|
|
28131
|
-
al.debug(
|
|
28150
|
+
function Fc(y) {
|
|
28151
|
+
al.debug(y), O.value || W("loadError", y), jF.value?.destroy(), v.value?.cleanup(), v.value = void 0, A = void 0, ud.documentLoadingTaskLoaded = !1, ud.documentProxyLoaded = !1, Tl.value = !0, sl.value = 0, R();
|
|
28132
28152
|
}
|
|
28133
28153
|
const { pdfDocLoadingTask: jF, getPage: ec } = pI(
|
|
28134
28154
|
Ul,
|
|
@@ -28162,29 +28182,29 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28162
28182
|
highlightKeywords: ic,
|
|
28163
28183
|
clear: _W
|
|
28164
28184
|
} = PI(v), vF = () => {
|
|
28165
|
-
Wc(),
|
|
28185
|
+
Wc(), B.value = 1, x.value = 0, Yl.value = !1;
|
|
28166
28186
|
};
|
|
28167
28187
|
dl(
|
|
28168
28188
|
[v, K, E, x, Rl, H, f],
|
|
28169
28189
|
() => {
|
|
28170
28190
|
a.pdfDocument = v.value, a.pagesContainerRef = K.value, a.pageIndex = E.value, a.rotation = (360 + x.value) % 360, a.scale = Rl.value, a.scrollMode = H.value, a.viewMode = f.value;
|
|
28171
28191
|
}
|
|
28172
|
-
), dl(yd, (
|
|
28192
|
+
), dl(yd, (y, ol) => {
|
|
28173
28193
|
ol && vF();
|
|
28174
|
-
}), dl(KW, (
|
|
28194
|
+
}), dl(KW, (y) => {
|
|
28175
28195
|
id.value = {
|
|
28176
|
-
totalMatches:
|
|
28177
|
-
matches:
|
|
28196
|
+
totalMatches: y.length,
|
|
28197
|
+
matches: y.map((ol) => ({ index: ol.oIndex, page: ol.page }))
|
|
28178
28198
|
};
|
|
28179
28199
|
}), dl(
|
|
28180
28200
|
() => a.scrollMode,
|
|
28181
|
-
(
|
|
28182
|
-
H.value !==
|
|
28201
|
+
(y) => {
|
|
28202
|
+
H.value !== y && (H.value = y), W("update:scrollMode", y);
|
|
28183
28203
|
}
|
|
28184
28204
|
), dl(
|
|
28185
28205
|
() => a.viewMode,
|
|
28186
|
-
(
|
|
28187
|
-
f.value !==
|
|
28206
|
+
(y) => {
|
|
28207
|
+
f.value !== y && (f.value = y), W("update:viewMode", y);
|
|
28188
28208
|
}
|
|
28189
28209
|
), dl(
|
|
28190
28210
|
() => [a.scrollMode, a.viewMode],
|
|
@@ -28193,68 +28213,68 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28193
28213
|
}
|
|
28194
28214
|
), dl(
|
|
28195
28215
|
[Yl, L, ll],
|
|
28196
|
-
([
|
|
28197
|
-
if (
|
|
28198
|
-
il > 0 && (il < ol || ol <= 0) && (al.warn("Prop `initialPage` should be within the valid range of the PDF pages."),
|
|
28216
|
+
([y, ol, il]) => {
|
|
28217
|
+
if (y) return;
|
|
28218
|
+
il > 0 && (il < ol || ol <= 0) && (al.warn("Prop `initialPage` should be within the valid range of the PDF pages."), B.value = 1);
|
|
28199
28219
|
},
|
|
28200
28220
|
{ once: !0 }
|
|
28201
28221
|
), dl(
|
|
28202
|
-
[Yl, L,
|
|
28203
|
-
async ([
|
|
28204
|
-
if (
|
|
28205
|
-
const Ad =
|
|
28222
|
+
[Yl, L, B, ll, Rd],
|
|
28223
|
+
async ([y, ol, il, $l, Md]) => {
|
|
28224
|
+
if (y || !Md.length) return;
|
|
28225
|
+
const Ad = B.value !== L.value ? B.value : L.value;
|
|
28206
28226
|
jd.value = "unset", al.debug("forcePageNumber =>", Ad), await Sl(), hd(Ad - 1), KZ.value || (jd.value = "smooth"), requestAnimationFrame(() => {
|
|
28207
28227
|
Rc();
|
|
28208
28228
|
}), Yl.value = !0;
|
|
28209
28229
|
}
|
|
28210
28230
|
);
|
|
28211
|
-
const $W = (
|
|
28212
|
-
|
|
28231
|
+
const $W = (y) => {
|
|
28232
|
+
y.preventDefault(), _l.value?.newFileOpenable && (kd.value = !0);
|
|
28213
28233
|
}, Rc = () => {
|
|
28214
28234
|
if (A === jF.value?.docId && !sU.value && !Mt.value && !(KZ.value || !Yl.value) && PZ) {
|
|
28215
|
-
const
|
|
28235
|
+
const y = xt.value, ol = f.value === gl.SinglePage && B.value === y, il = [gl.DualPage, gl.DualPageWithCover].includes(f.value) && (B.value === y || B.value === y - 1), $l = H.value === Pl.Wrapped && y + WU.value - 1 <= B.value;
|
|
28216
28236
|
(ol || il || $l) && (PZ = !1);
|
|
28217
28237
|
}
|
|
28218
28238
|
};
|
|
28219
|
-
dl(xt, (
|
|
28220
|
-
PZ || Yl.value && (KZ.value ||
|
|
28239
|
+
dl(xt, (y) => {
|
|
28240
|
+
PZ || Yl.value && (KZ.value || y > 0 && y !== B.value && (B.value = y));
|
|
28221
28241
|
});
|
|
28222
|
-
const Nc = /* @__PURE__ */ qe(Rc, 100, { maxWait: 500 }), bc = (
|
|
28223
|
-
W("scroll",
|
|
28242
|
+
const Nc = /* @__PURE__ */ qe(Rc, 100, { maxWait: 500 }), bc = (y) => {
|
|
28243
|
+
W("scroll", y);
|
|
28224
28244
|
};
|
|
28225
|
-
dl(K, (
|
|
28226
|
-
|
|
28227
|
-
}), dl(sU, (
|
|
28228
|
-
if (!
|
|
28245
|
+
dl(K, (y) => {
|
|
28246
|
+
y && (y.addEventListener("scroll", Nc, { capture: !0, passive: !0 }), y.addEventListener("scroll", bc, { capture: !0, passive: !0 }));
|
|
28247
|
+
}), dl(sU, (y) => {
|
|
28248
|
+
if (!y && wt.value >= 0) {
|
|
28229
28249
|
if (KZ.value)
|
|
28230
28250
|
return;
|
|
28231
28251
|
Sl(() => {
|
|
28232
28252
|
const ol = xt.value;
|
|
28233
|
-
ol > 0 && ol !==
|
|
28253
|
+
ol > 0 && ol !== B.value && (B.value = ol);
|
|
28234
28254
|
});
|
|
28235
28255
|
}
|
|
28236
28256
|
});
|
|
28237
28257
|
const mc = () => {
|
|
28238
|
-
let
|
|
28239
|
-
[gl.DualPage, gl.DualPageWithCover].includes(f.value) &&
|
|
28258
|
+
let y = B.value - 1;
|
|
28259
|
+
[gl.DualPage, gl.DualPageWithCover].includes(f.value) && y % 2 === 0 && (y -= 1), y <= 0 && (y = ll.value), _U(y);
|
|
28240
28260
|
}, uc = () => {
|
|
28241
|
-
let
|
|
28242
|
-
(f.value === gl.DualPage || f.value === gl.DualPageWithCover &&
|
|
28243
|
-
}, Mc = (
|
|
28244
|
-
_U(
|
|
28261
|
+
let y = B.value + 1;
|
|
28262
|
+
(f.value === gl.DualPage || f.value === gl.DualPageWithCover && y !== ll.value) && y % 2 === 0 && (y += 1), y > ll.value && (y = 1), _U(y);
|
|
28263
|
+
}, Mc = (y) => {
|
|
28264
|
+
_U(y);
|
|
28245
28265
|
}, pc = () => {
|
|
28246
28266
|
_U(1);
|
|
28247
28267
|
}, Tc = () => {
|
|
28248
28268
|
_U(ll.value);
|
|
28249
|
-
}, Sn = G(X.value), ls = (
|
|
28250
|
-
Sn.value =
|
|
28269
|
+
}, Sn = G(X.value), ls = (y) => {
|
|
28270
|
+
Sn.value = y, _.value = y;
|
|
28251
28271
|
};
|
|
28252
28272
|
let PZ = !1;
|
|
28253
|
-
const _U = (
|
|
28254
|
-
const ol = typeof
|
|
28255
|
-
ol || il || (
|
|
28256
|
-
}, ds = (
|
|
28257
|
-
const { action: ol } =
|
|
28273
|
+
const _U = (y) => {
|
|
28274
|
+
const ol = typeof y != "number" && !new RegExp(/^[0-9]*$/).test(y), il = y < 1 || y > ll.value;
|
|
28275
|
+
ol || il || (B.value = y, PZ = !0, hd(y - 1));
|
|
28276
|
+
}, ds = (y) => {
|
|
28277
|
+
const { action: ol } = y;
|
|
28258
28278
|
switch (ol) {
|
|
28259
28279
|
case "Print":
|
|
28260
28280
|
OF();
|
|
@@ -28263,11 +28283,11 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28263
28283
|
cc();
|
|
28264
28284
|
break;
|
|
28265
28285
|
default:
|
|
28266
|
-
al.debug("handleButtonEvent => ",
|
|
28286
|
+
al.debug("handleButtonEvent => ", y);
|
|
28267
28287
|
break;
|
|
28268
28288
|
}
|
|
28269
|
-
}, Us = (
|
|
28270
|
-
const { action: ol } =
|
|
28289
|
+
}, Us = (y) => {
|
|
28290
|
+
const { action: ol } = y;
|
|
28271
28291
|
switch (ol) {
|
|
28272
28292
|
case "FirstPage":
|
|
28273
28293
|
pc();
|
|
@@ -28282,8 +28302,8 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28282
28302
|
mc();
|
|
28283
28303
|
break;
|
|
28284
28304
|
}
|
|
28285
|
-
}, ts = (
|
|
28286
|
-
const { fieldName: ol, value: il, annotationId: $l, checked: Md } =
|
|
28305
|
+
}, ts = (y) => {
|
|
28306
|
+
const { fieldName: ol, value: il, annotationId: $l, checked: Md } = y;
|
|
28287
28307
|
if ($l) {
|
|
28288
28308
|
const Ad = Al($l);
|
|
28289
28309
|
if (al.debug("editorKey => ", Ad), Ad) {
|
|
@@ -28291,9 +28311,9 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28291
28311
|
IU.value = il, IU.checkBox && (IU.value = Md), al.debug("Updated annotation => ", IU, $l);
|
|
28292
28312
|
}
|
|
28293
28313
|
}
|
|
28294
|
-
}, hc = (
|
|
28295
|
-
const { type: ol, data: il } =
|
|
28296
|
-
switch (al.debug("handleAnnotated Type => ", ol,
|
|
28314
|
+
}, hc = (y) => {
|
|
28315
|
+
const { type: ol, data: il } = y;
|
|
28316
|
+
switch (al.debug("handleAnnotated Type => ", ol, y), ol) {
|
|
28297
28317
|
case Hd.INTERNAL_LINK:
|
|
28298
28318
|
scrollTo(il.referencedPage);
|
|
28299
28319
|
break;
|
|
@@ -28311,23 +28331,23 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28311
28331
|
ts(il);
|
|
28312
28332
|
break;
|
|
28313
28333
|
}
|
|
28314
|
-
}, Zs = (
|
|
28315
|
-
ul.value =
|
|
28316
|
-
}, ns = (
|
|
28317
|
-
const { viewport: ol } = ql.value[
|
|
28334
|
+
}, Zs = (y) => {
|
|
28335
|
+
ul.value = y;
|
|
28336
|
+
}, ns = (y) => {
|
|
28337
|
+
const { viewport: ol } = ql.value[y.page - 1], [il, $l, Md, Ad] = ol.convertToViewportRectangle(y.rect), IU = {
|
|
28318
28338
|
left: Math.min(il, Md),
|
|
28319
28339
|
top: Math.min($l, Ad),
|
|
28320
28340
|
width: Math.abs(Md - il),
|
|
28321
28341
|
height: Math.abs(Ad - $l)
|
|
28322
28342
|
};
|
|
28323
|
-
hd(
|
|
28343
|
+
hd(y.page - 1, IU);
|
|
28324
28344
|
}, Fs = () => {
|
|
28325
28345
|
Fl.value = !Fl.value;
|
|
28326
28346
|
};
|
|
28327
|
-
dl(jF, async (
|
|
28328
|
-
|
|
28347
|
+
dl(jF, async (y) => {
|
|
28348
|
+
y && (v.value?.cleanup(), v.value = void 0, A = void 0, ud.documentLoadingTaskLoaded = !1, ud.documentProxyLoaded = !1, R(), y.promise.then(
|
|
28329
28349
|
async (ol) => {
|
|
28330
|
-
v.value = ol, A =
|
|
28350
|
+
v.value = ol, A = y.docId, ll.value = ol.numPages, yl.value && (yl.value = !1, zl.value = void 0), ud.documentProxyLoaded = !0;
|
|
28331
28351
|
const il = await ec(ol, 0);
|
|
28332
28352
|
F.value = il.rotate, wl(), Jl(ol);
|
|
28333
28353
|
},
|
|
@@ -28337,33 +28357,33 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28337
28357
|
}).finally(() => {
|
|
28338
28358
|
Tl.value = !0;
|
|
28339
28359
|
}));
|
|
28340
|
-
}), dl([Tl, gZ], ([
|
|
28341
|
-
O.value || !
|
|
28360
|
+
}), dl([Tl, gZ], ([y, ol]) => {
|
|
28361
|
+
O.value || !y || !ol || W("loaded", ol);
|
|
28342
28362
|
}), dl(
|
|
28343
28363
|
[D, h],
|
|
28344
|
-
(
|
|
28364
|
+
(y) => {
|
|
28345
28365
|
const ol = Xe(
|
|
28346
|
-
{ scrollMode:
|
|
28366
|
+
{ scrollMode: y[0], viewMode: y[1] },
|
|
28347
28367
|
/* warn */
|
|
28348
28368
|
!1
|
|
28349
28369
|
), il = Ye(
|
|
28350
|
-
{ scrollMode:
|
|
28370
|
+
{ scrollMode: y[0], viewMode: y[1] },
|
|
28351
28371
|
/* warn */
|
|
28352
28372
|
!1
|
|
28353
28373
|
);
|
|
28354
28374
|
H.value = ol, f.value = il;
|
|
28355
28375
|
},
|
|
28356
28376
|
{ immediate: !0 }
|
|
28357
|
-
), dl(
|
|
28358
|
-
O.value || (W("afterGoToPage",
|
|
28359
|
-
}), dl(QZ, (
|
|
28360
|
-
|
|
28377
|
+
), dl(B, (y) => {
|
|
28378
|
+
O.value || (W("afterGoToPage", y), W("pageChanged", y));
|
|
28379
|
+
}), dl(QZ, (y) => {
|
|
28380
|
+
y && (_.value = !0);
|
|
28361
28381
|
}), dl(
|
|
28362
28382
|
[HZ, Rl],
|
|
28363
|
-
async ([
|
|
28364
|
-
if (nl.value = void 0, await Sl(), !
|
|
28383
|
+
async ([y, ol]) => {
|
|
28384
|
+
if (nl.value = void 0, await Sl(), !y)
|
|
28365
28385
|
return;
|
|
28366
|
-
const { page: il, pageMatchIdx: $l, rect: Md } =
|
|
28386
|
+
const { page: il, pageMatchIdx: $l, rect: Md } = y;
|
|
28367
28387
|
nl.value = {
|
|
28368
28388
|
pageIdx: il - 1,
|
|
28369
28389
|
matchIdx: $l
|
|
@@ -28374,19 +28394,19 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28374
28394
|
width: (Md?.width ?? 0) * ol,
|
|
28375
28395
|
height: (Md?.height ?? 0) * ol
|
|
28376
28396
|
};
|
|
28377
|
-
|
|
28397
|
+
B.value = il, PZ = !0, hd(il - 1, $U);
|
|
28378
28398
|
},
|
|
28379
28399
|
{ deep: !0, immediate: !0 }
|
|
28380
28400
|
);
|
|
28381
|
-
const Xn = p(() => sU.value ? GU.value : Rl.value), Jc = (
|
|
28382
|
-
jt(
|
|
28401
|
+
const Xn = p(() => sU.value ? GU.value : Rl.value), Jc = (y) => {
|
|
28402
|
+
jt(y);
|
|
28383
28403
|
};
|
|
28384
|
-
dl([GU, sU], ([
|
|
28385
|
-
a.targetScale =
|
|
28404
|
+
dl([GU, sU], ([y, ol]) => {
|
|
28405
|
+
a.targetScale = y, a.isScaling = ol;
|
|
28386
28406
|
}), dl(
|
|
28387
28407
|
Rl,
|
|
28388
|
-
(
|
|
28389
|
-
a.scale =
|
|
28408
|
+
(y) => {
|
|
28409
|
+
a.scale = y;
|
|
28390
28410
|
},
|
|
28391
28411
|
{ immediate: !0 }
|
|
28392
28412
|
);
|
|
@@ -28396,51 +28416,51 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28396
28416
|
startX: 0,
|
|
28397
28417
|
startScrollTop: 0,
|
|
28398
28418
|
startScrollLeft: 0
|
|
28399
|
-
}), Gc = (
|
|
28419
|
+
}), Gc = (y) => {
|
|
28400
28420
|
const ol = aU.container;
|
|
28401
|
-
aU.startY =
|
|
28421
|
+
aU.startY = y.pageY, aU.startScrollTop = ol.scrollTop, aU.startX = y.pageX, aU.startScrollLeft = ol.scrollLeft;
|
|
28402
28422
|
}, Sc = () => {
|
|
28403
28423
|
jd.value = "smooth";
|
|
28404
|
-
}, Xc = (
|
|
28424
|
+
}, Xc = (y) => {
|
|
28405
28425
|
if (!ac.value || Sn.value)
|
|
28406
28426
|
return;
|
|
28407
|
-
|
|
28408
|
-
const ol = aU.container, il = (
|
|
28427
|
+
y.preventDefault(), jd.value = "unset";
|
|
28428
|
+
const ol = aU.container, il = (y.pageX - aU.startX) * 2, $l = (y.pageY - aU.startY) * 2;
|
|
28409
28429
|
ol.scrollTop = aU.startScrollTop - $l, ol.scrollLeft = aU.startScrollLeft - il;
|
|
28410
|
-
}, es = (
|
|
28411
|
-
aU.container?.removeEventListener("mousedown", Gc), aU.container?.removeEventListener("mouseup", Sc), aU.container?.removeEventListener("mousemove", Xc), aU.container =
|
|
28430
|
+
}, es = (y) => {
|
|
28431
|
+
aU.container?.removeEventListener("mousedown", Gc), aU.container?.removeEventListener("mouseup", Sc), aU.container?.removeEventListener("mousemove", Xc), aU.container = y, y.addEventListener("mousedown", Gc, { capture: !0 }), y.addEventListener("mouseup", Sc), y.addEventListener("mousemove", Xc);
|
|
28412
28432
|
};
|
|
28413
|
-
dl([K, KZ], ([
|
|
28414
|
-
if (!
|
|
28433
|
+
dl([K, KZ], ([y, ol]) => {
|
|
28434
|
+
if (!y)
|
|
28415
28435
|
return;
|
|
28416
|
-
const il =
|
|
28436
|
+
const il = y.querySelector(
|
|
28417
28437
|
".vpv-pages-inner-container"
|
|
28418
|
-
), $l = ol ?
|
|
28438
|
+
), $l = ol ? y : il;
|
|
28419
28439
|
$l && (ol && (jd.value = "unset"), es($l));
|
|
28420
|
-
}), dl(Dl, (
|
|
28421
|
-
a.isEditing = Object.values(
|
|
28440
|
+
}), dl(Dl, (y) => {
|
|
28441
|
+
a.isEditing = Object.values(y).some((ol) => ol);
|
|
28422
28442
|
});
|
|
28423
28443
|
const gF = p(() => {
|
|
28424
|
-
const
|
|
28425
|
-
return ol.includes(il) || al.warn(`Locale '${il}' not found, falling back to 'en_US'`),
|
|
28444
|
+
const y = t.localization || SQ, ol = Object.keys(y), il = n.value || "en_US";
|
|
28445
|
+
return ol.includes(il) || al.warn(`Locale '${il}' not found, falling back to 'en_US'`), y[il];
|
|
28426
28446
|
}), pt = fl(null);
|
|
28427
28447
|
dl(
|
|
28428
28448
|
[Ul, v],
|
|
28429
|
-
async ([
|
|
28430
|
-
if (!ol || !
|
|
28449
|
+
async ([y, ol]) => {
|
|
28450
|
+
if (!ol || !y) {
|
|
28431
28451
|
pt.value = null;
|
|
28432
28452
|
return;
|
|
28433
28453
|
}
|
|
28434
28454
|
try {
|
|
28435
|
-
if (
|
|
28436
|
-
pt.value =
|
|
28437
|
-
else if (
|
|
28438
|
-
pt.value = new Uint8Array(
|
|
28439
|
-
else if (typeof
|
|
28440
|
-
const $l = await (await fetch(
|
|
28455
|
+
if (y instanceof Uint8Array)
|
|
28456
|
+
pt.value = y;
|
|
28457
|
+
else if (y instanceof ArrayBuffer)
|
|
28458
|
+
pt.value = new Uint8Array(y);
|
|
28459
|
+
else if (typeof y == "string") {
|
|
28460
|
+
const $l = await (await fetch(y)).arrayBuffer();
|
|
28441
28461
|
pt.value = new Uint8Array($l);
|
|
28442
|
-
} else if (typeof
|
|
28443
|
-
const il =
|
|
28462
|
+
} else if (typeof y == "object" && "data" in y) {
|
|
28463
|
+
const il = y.data;
|
|
28444
28464
|
il instanceof Uint8Array ? pt.value = il : il instanceof ArrayBuffer && (pt.value = new Uint8Array(il));
|
|
28445
28465
|
}
|
|
28446
28466
|
} catch (il) {
|
|
@@ -28458,8 +28478,8 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28458
28478
|
);
|
|
28459
28479
|
dl(
|
|
28460
28480
|
[as, x, F],
|
|
28461
|
-
([
|
|
28462
|
-
if (!
|
|
28481
|
+
([y, ol, il]) => {
|
|
28482
|
+
if (!y)
|
|
28463
28483
|
return;
|
|
28464
28484
|
const $l = SZ(i.uid, tn.Rotate);
|
|
28465
28485
|
window.dispatchEvent(
|
|
@@ -28474,14 +28494,14 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28474
28494
|
);
|
|
28475
28495
|
const cs = ld(/* @__PURE__ */ new Map()), KF = G(null), Qs = G(!1);
|
|
28476
28496
|
JE(Qs, KF), Hl(ca, cs), Hl(pd.ANNOTATION_IMAGE_MANAGER, zt), Hl(BQ, O || !1), Hl(eG, ql || []), Hl(ZG, ec || (() => {
|
|
28477
|
-
})), Hl(Ua, Yd || null), Hl(Za, _l || {}), Hl(FG, Jn || 0), Hl(FU, Z), Hl(ea, Zl.loaderImage || void 0), Hl(PU, Ud || null), Hl(TF,
|
|
28497
|
+
})), Hl(Ua, Yd || null), Hl(Za, _l || {}), Hl(FG, Jn || 0), Hl(FU, Z), Hl(ea, Zl.loaderImage || void 0), Hl(PU, Ud || null), Hl(TF, B || 1), Hl(zQ, x || 0), Hl(LQ, ll || 0), Hl(kQ, X.value || !1), Hl(pF, Kt || !1), Hl(na, cc || (() => {
|
|
28478
28498
|
})), Hl(wQ, Zl.iconPrint || void 0), Hl(CQ, Zl.iconDownload || void 0), Hl(EQ, Zl.iconOpenFile || void 0), Hl(xQ, Zl.iconFullScreen || void 0), Hl(Dd, gF), Hl(YQ, nl || null), Hl(nG, WU || G(1)), Hl(rQ, ul || {}), Hl(aG, _U || (() => {
|
|
28479
28499
|
})), Hl(gQ, ld(Vd || {})), Hl(Qa, q), Hl(KQ, { hasPageBeenRendered: s, markPageAsRendered: N }), Hl(OQ, qW || {});
|
|
28480
28500
|
const Yc = dn({
|
|
28481
28501
|
goToPage: _U,
|
|
28482
28502
|
totalPages: ll,
|
|
28483
|
-
currentPage:
|
|
28484
|
-
getTextContent: (
|
|
28503
|
+
currentPage: B,
|
|
28504
|
+
getTextContent: (y) => v.value?.getPage(y).then((ol) => ol.getTextContent())
|
|
28485
28505
|
}), Bc = ld({
|
|
28486
28506
|
searchMatches: dn(id),
|
|
28487
28507
|
searching: Vc,
|
|
@@ -28496,7 +28516,7 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28496
28516
|
rotateClockwise: Ot,
|
|
28497
28517
|
rotateCounterclockwise: vt,
|
|
28498
28518
|
currentRotation: x
|
|
28499
|
-
}), zc = p(() => Yn?.value?.some((
|
|
28519
|
+
}), zc = p(() => Yn?.value?.some((y) => y.id === qJ.ANNOTATIONS) ?? !1), Ws = p(() => zc.value && Yn.value.some((y) => y.component?.props?.image !== !1));
|
|
28500
28520
|
p(() => {
|
|
28501
28521
|
if (!O.value)
|
|
28502
28522
|
return Qc;
|
|
@@ -28518,21 +28538,21 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28518
28538
|
downloadControl: CW,
|
|
28519
28539
|
zoomControl: cZ
|
|
28520
28540
|
});
|
|
28521
|
-
const HF = (
|
|
28541
|
+
const HF = (y) => {
|
|
28522
28542
|
if (!v.value || !K.value) return;
|
|
28523
28543
|
const ol = K.value.classList[0];
|
|
28524
|
-
(wF.value || $a.value?.classList.contains(ol)) && ((
|
|
28544
|
+
(wF.value || $a.value?.classList.contains(ol)) && ((y.key === "ArrowRight" || y.key === "ArrowDown") && (y.preventDefault(), B.value < ll.value && _U(B.value + 1)), (y.key === "ArrowLeft" || y.key === "ArrowUp") && (y.preventDefault(), B.value > 1 && _U(B.value - 1)));
|
|
28525
28545
|
};
|
|
28526
|
-
function ss(
|
|
28546
|
+
function ss(y) {
|
|
28527
28547
|
return (ol) => {
|
|
28528
28548
|
const { detail: il } = ol;
|
|
28529
|
-
al.debug(`${
|
|
28530
|
-
const { active: $l } = il, Md =
|
|
28549
|
+
al.debug(`${y} state changed:`, il);
|
|
28550
|
+
const { active: $l } = il, Md = y.includes(qZ.textSelection), Ad = y.includes(qZ.freeText);
|
|
28531
28551
|
if (Md) {
|
|
28532
28552
|
const Tt = $l, $U = Tt && il.highlight !== !1, lt = Tt && il.strikethrough !== !1, fZ = Tt && il.underline !== !1;
|
|
28533
28553
|
Dl.Highlight = $U, Dl.StrikeOut = lt, Dl.Underline = fZ, zd.highlight = il.highlight, zd.strikethrough = il.strikethrough, zd.underline = il.underline, il.colors && (nd.value = il.colors, xl.value = il.colors[0].value), Fd.value || ($U ? Fd.value = "highlight" : lt ? Fd.value = "strikethrough" : fZ && (Fd.value = "underline"));
|
|
28534
28554
|
} else Ad && (Dl.FreeText = $l, !Jd.value && il.fontColors && (Jd.value = il.fontColors), !Xd.value && il.fontSizes && (Xd.value = il.fontSizes));
|
|
28535
|
-
if (
|
|
28555
|
+
if (y.includes(qZ.image)) {
|
|
28536
28556
|
Dl.Highlight = !1, Dl.StrikeOut = !1, Dl.Underline = !1, Dl.FreeText = !1;
|
|
28537
28557
|
const Tt = 1024 * 1024 * 1;
|
|
28538
28558
|
let $U = "";
|
|
@@ -28548,7 +28568,7 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28548
28568
|
}
|
|
28549
28569
|
zt.getFromFile(il.file).then(async (lt) => {
|
|
28550
28570
|
if (!lt?.bitmap) return;
|
|
28551
|
-
const fZ = ql.value[
|
|
28571
|
+
const fZ = ql.value[B.value - 1];
|
|
28552
28572
|
if (!fZ) return;
|
|
28553
28573
|
const { viewport: bs } = fZ, { pageWidth: VZ, pageHeight: WZ } = bs.clone({
|
|
28554
28574
|
dontFlip: !0,
|
|
@@ -28573,7 +28593,7 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28573
28593
|
(rc + PF) * VZ,
|
|
28574
28594
|
(1 - Ic) * WZ
|
|
28575
28595
|
],
|
|
28576
|
-
pageIndex:
|
|
28596
|
+
pageIndex: B.value - 1,
|
|
28577
28597
|
bitmapId: lt.id,
|
|
28578
28598
|
bitmap: lt.bitmap,
|
|
28579
28599
|
isSvg: lt.isSvg,
|
|
@@ -28585,17 +28605,17 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28585
28605
|
annotationType: jl.Stamp,
|
|
28586
28606
|
annotation: us,
|
|
28587
28607
|
// Type assertion for compatibility
|
|
28588
|
-
pageIndex:
|
|
28608
|
+
pageIndex: B.value - 1
|
|
28589
28609
|
});
|
|
28590
28610
|
});
|
|
28591
28611
|
}
|
|
28592
28612
|
};
|
|
28593
28613
|
}
|
|
28594
|
-
const Lc = /* @__PURE__ */ new Map(), kc = (
|
|
28595
|
-
|
|
28614
|
+
const Lc = /* @__PURE__ */ new Map(), kc = (y) => {
|
|
28615
|
+
y.key === "z" && y.metaKey && y.shiftKey || y.key === "y" && y.metaKey ? V.redo() : y.key === "z" && y.metaKey && V.undo();
|
|
28596
28616
|
};
|
|
28597
|
-
function Dc(
|
|
28598
|
-
const { pageIndex: ol, canvas: il } =
|
|
28617
|
+
function Dc(y) {
|
|
28618
|
+
const { pageIndex: ol, canvas: il } = y;
|
|
28599
28619
|
N(ol);
|
|
28600
28620
|
}
|
|
28601
28621
|
const {
|
|
@@ -28603,16 +28623,16 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28603
28623
|
height: is,
|
|
28604
28624
|
stop: Rs
|
|
28605
28625
|
} = tF(Gd, Wl.value);
|
|
28606
|
-
dl(Gd, (
|
|
28607
|
-
|
|
28608
|
-
|
|
28626
|
+
dl(Gd, (y, ol, il) => {
|
|
28627
|
+
y && y.addEventListener("keydown", kc), il(() => {
|
|
28628
|
+
y?.removeEventListener("keydown", kc);
|
|
28609
28629
|
});
|
|
28610
28630
|
}), dl(
|
|
28611
28631
|
[os, is],
|
|
28612
|
-
([
|
|
28632
|
+
([y, ol]) => {
|
|
28613
28633
|
const il = Wl.value;
|
|
28614
28634
|
Wl.value = {
|
|
28615
|
-
width:
|
|
28635
|
+
width: y > 0 ? y : il.width,
|
|
28616
28636
|
height: ol > 0 ? ol : il.height
|
|
28617
28637
|
};
|
|
28618
28638
|
},
|
|
@@ -28622,14 +28642,14 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28622
28642
|
/* flush: 'post' ensures the observer runs after the DOM has been updated */
|
|
28623
28643
|
), dl(
|
|
28624
28644
|
bl,
|
|
28625
|
-
(
|
|
28645
|
+
(y, ol, il) => {
|
|
28626
28646
|
let $l = null;
|
|
28627
|
-
if (
|
|
28647
|
+
if (y) {
|
|
28628
28648
|
const Md = () => {
|
|
28629
|
-
const { width: Ad } =
|
|
28649
|
+
const { width: Ad } = y.getBoundingClientRect();
|
|
28630
28650
|
Vl.value = Ad;
|
|
28631
28651
|
};
|
|
28632
|
-
$l = new ResizeObserver(Md), $l.observe(
|
|
28652
|
+
$l = new ResizeObserver(Md), $l.observe(y);
|
|
28633
28653
|
} else
|
|
28634
28654
|
Vl.value = 0;
|
|
28635
28655
|
il(() => {
|
|
@@ -28639,15 +28659,15 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28639
28659
|
{ immediate: !0 }
|
|
28640
28660
|
), dl(
|
|
28641
28661
|
[hl, Gn],
|
|
28642
|
-
([
|
|
28643
|
-
|
|
28662
|
+
([y, ol]) => {
|
|
28663
|
+
y && !ol && al.error("`pageOverlay` slot is only available for the Organization license");
|
|
28644
28664
|
},
|
|
28645
28665
|
{ immediate: !0 }
|
|
28646
28666
|
), sd(() => {
|
|
28647
|
-
Hl(vQ, i.uid), Hl(eU, K), Hl(pd.ENABLE_ANNOTATION_EDITOR, zc), Hl(pd.ACTIVE_ANNOTATION, Dl), Hl(pd.ENABLE_ANNOTATION_IMAGE_EDITOR, Ws), Hl(pd.TEXT_SELECTION_DEFAULT_COLORS, nd), Hl(pd.TEXT_SELECTION_DEFAULT_COLOR, xl), Hl(pd.FREE_TEXT_FONT_COLORS, Jd), Hl(pd.FREE_TEXT_FONT_SIZE_VALUES, Xd), Hl(pd.TEXT_SELECTION_OPTION, zd), Hl(pd.TEXT_SELECTION_DEFAULT_TOOL, Fd), window.addEventListener("keydown", HF), Object.keys(qZ).forEach((
|
|
28667
|
+
Hl(vQ, i.uid), Hl(eU, K), Hl(pd.ENABLE_ANNOTATION_EDITOR, zc), Hl(pd.ACTIVE_ANNOTATION, Dl), Hl(pd.ENABLE_ANNOTATION_IMAGE_EDITOR, Ws), Hl(pd.TEXT_SELECTION_DEFAULT_COLORS, nd), Hl(pd.TEXT_SELECTION_DEFAULT_COLOR, xl), Hl(pd.FREE_TEXT_FONT_COLORS, Jd), Hl(pd.FREE_TEXT_FONT_SIZE_VALUES, Xd), Hl(pd.TEXT_SELECTION_OPTION, zd), Hl(pd.TEXT_SELECTION_DEFAULT_TOOL, Fd), window.addEventListener("keydown", HF), Object.keys(qZ).forEach((y) => {
|
|
28648
28668
|
const ol = SZ(
|
|
28649
28669
|
i.uid,
|
|
28650
|
-
qZ[
|
|
28670
|
+
qZ[y]
|
|
28651
28671
|
), il = ss(ol);
|
|
28652
28672
|
Lc.set(ol, il), window.addEventListener(ol, il);
|
|
28653
28673
|
});
|
|
@@ -28655,11 +28675,11 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28655
28675
|
al.debug("onUnmounted"), zt.clear(), Ns(), Rs(), KF.value && KF.value.abort(), o(), v.value && v.value.cleanup();
|
|
28656
28676
|
});
|
|
28657
28677
|
function Ns() {
|
|
28658
|
-
K.value?.removeEventListener("keydown", HF), K.value?.removeEventListener("scroll", Nc), K.value?.removeEventListener("scroll", bc), window.removeEventListener("keydown", HF), Lc.forEach((
|
|
28659
|
-
window.removeEventListener(ol,
|
|
28678
|
+
K.value?.removeEventListener("keydown", HF), K.value?.removeEventListener("scroll", Nc), K.value?.removeEventListener("scroll", bc), window.removeEventListener("keydown", HF), Lc.forEach((y, ol) => {
|
|
28679
|
+
window.removeEventListener(ol, y);
|
|
28660
28680
|
});
|
|
28661
28681
|
}
|
|
28662
|
-
return (
|
|
28682
|
+
return (y, ol) => (M(), Nl("div", {
|
|
28663
28683
|
ref_key: "container",
|
|
28664
28684
|
ref: Ud,
|
|
28665
28685
|
tabindex: "-1",
|
|
@@ -28694,32 +28714,32 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28694
28714
|
onFilenameChange: nc,
|
|
28695
28715
|
onSrcChange: Zc
|
|
28696
28716
|
}, $d({ _: 2 }, [
|
|
28697
|
-
|
|
28717
|
+
y.$slots.dropFileZone ? {
|
|
28698
28718
|
name: "dropFileZone",
|
|
28699
28719
|
fn: b(() => [
|
|
28700
|
-
C(
|
|
28720
|
+
C(y.$slots, "dropFileZone", { isDark: Z.value }, void 0, !0)
|
|
28701
28721
|
]),
|
|
28702
28722
|
key: "0"
|
|
28703
28723
|
} : void 0
|
|
28704
28724
|
]), 1032, ["isDark", "show"]),
|
|
28705
28725
|
cl("div", XE, [
|
|
28706
|
-
!O.value &&
|
|
28726
|
+
!O.value && y.$slots.loader ? C(y.$slots, "loader", {
|
|
28707
28727
|
key: 0,
|
|
28708
28728
|
progress: sl.value,
|
|
28709
28729
|
loaded: Tl.value
|
|
28710
28730
|
}, void 0, !0) : (M(), Nl(Qd, { key: 1 }, [
|
|
28711
28731
|
Tl.value ? Gl("", !0) : (M(), I(ZF, { key: 0 }, $d({ _: 2 }, [
|
|
28712
|
-
!O.value &&
|
|
28732
|
+
!O.value && y.$slots.loaderImage ? {
|
|
28713
28733
|
name: "loaderImage",
|
|
28714
28734
|
fn: b(() => [
|
|
28715
|
-
C(
|
|
28735
|
+
C(y.$slots, "loaderImage", {}, void 0, !0)
|
|
28716
28736
|
]),
|
|
28717
28737
|
key: "0"
|
|
28718
28738
|
} : void 0,
|
|
28719
|
-
!O.value &&
|
|
28739
|
+
!O.value && y.$slots.loaderProgress ? {
|
|
28720
28740
|
name: "loaderProgress",
|
|
28721
28741
|
fn: b(() => [
|
|
28722
|
-
C(
|
|
28742
|
+
C(y.$slots, "loaderProgress", { progress: sl.value }, () => [
|
|
28723
28743
|
sl.value >= 0 ? (M(), Nl("p", YE, ml(sl.value) + "%", 1)) : Gl("", !0)
|
|
28724
28744
|
], !0)
|
|
28725
28745
|
]),
|
|
@@ -28756,10 +28776,10 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28756
28776
|
}, $d({
|
|
28757
28777
|
loader: b(() => [
|
|
28758
28778
|
z(ZF, null, $d({ _: 2 }, [
|
|
28759
|
-
!O.value &&
|
|
28779
|
+
!O.value && y.$slots.loaderImage ? {
|
|
28760
28780
|
name: "loaderImage",
|
|
28761
28781
|
fn: b(() => [
|
|
28762
|
-
C(
|
|
28782
|
+
C(y.$slots, "loaderImage", {}, void 0, !0)
|
|
28763
28783
|
]),
|
|
28764
28784
|
key: "0"
|
|
28765
28785
|
} : void 0
|
|
@@ -28767,10 +28787,10 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28767
28787
|
]),
|
|
28768
28788
|
_: 2
|
|
28769
28789
|
}, [
|
|
28770
|
-
!O.value &&
|
|
28790
|
+
!O.value && y.$slots.iconSearch ? {
|
|
28771
28791
|
name: "icon",
|
|
28772
28792
|
fn: b(() => [
|
|
28773
|
-
C(
|
|
28793
|
+
C(y.$slots, "iconSearch", {}, void 0, !0)
|
|
28774
28794
|
]),
|
|
28775
28795
|
key: "0"
|
|
28776
28796
|
} : void 0
|
|
@@ -28778,15 +28798,15 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28778
28798
|
_l.value?.navigatable && K.value ? (M(), I(fr, {
|
|
28779
28799
|
key: 1,
|
|
28780
28800
|
total: ll.value,
|
|
28781
|
-
current:
|
|
28801
|
+
current: B.value,
|
|
28782
28802
|
onNext: uc,
|
|
28783
28803
|
onPrev: mc,
|
|
28784
28804
|
onChangePage: Mc
|
|
28785
28805
|
}, $d({ _: 2 }, [
|
|
28786
|
-
!O.value &&
|
|
28806
|
+
!O.value && y.$slots.pageNavigationTool ? {
|
|
28787
28807
|
name: "default",
|
|
28788
28808
|
fn: b(({ total: il, current: $l, onNext: Md, onPrev: Ad, onChangePage: IU }) => [
|
|
28789
|
-
C(
|
|
28809
|
+
C(y.$slots, "pageNavigationTool", {
|
|
28790
28810
|
total: il,
|
|
28791
28811
|
current: $l,
|
|
28792
28812
|
onNext: Md,
|
|
@@ -28796,17 +28816,17 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28796
28816
|
]),
|
|
28797
28817
|
key: "0"
|
|
28798
28818
|
} : void 0,
|
|
28799
|
-
!O.value &&
|
|
28819
|
+
!O.value && y.$slots.iconPrevPage ? {
|
|
28800
28820
|
name: "iconPrevPage",
|
|
28801
28821
|
fn: b(() => [
|
|
28802
|
-
C(
|
|
28822
|
+
C(y.$slots, "iconPrevPage", {}, void 0, !0)
|
|
28803
28823
|
]),
|
|
28804
28824
|
key: "1"
|
|
28805
28825
|
} : void 0,
|
|
28806
|
-
!O.value &&
|
|
28826
|
+
!O.value && y.$slots.iconNextPage ? {
|
|
28807
28827
|
name: "iconNextPage",
|
|
28808
28828
|
fn: b(() => [
|
|
28809
|
-
C(
|
|
28829
|
+
C(y.$slots, "iconNextPage", {}, void 0, !0)
|
|
28810
28830
|
]),
|
|
28811
28831
|
key: "2"
|
|
28812
28832
|
} : void 0
|
|
@@ -28819,27 +28839,27 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28819
28839
|
"pages-container": K.value,
|
|
28820
28840
|
onZoom: Jc
|
|
28821
28841
|
}, $d({ _: 2 }, [
|
|
28822
|
-
!O.value &&
|
|
28842
|
+
!O.value && y.$slots.zoomTool ? {
|
|
28823
28843
|
name: "default",
|
|
28824
28844
|
fn: b(({ currentScale: il }) => [
|
|
28825
|
-
C(
|
|
28845
|
+
C(y.$slots, "zoomTool", {
|
|
28826
28846
|
currentScale: Xn.value,
|
|
28827
28847
|
zoom: Jc
|
|
28828
28848
|
}, void 0, !0)
|
|
28829
28849
|
]),
|
|
28830
28850
|
key: "0"
|
|
28831
28851
|
} : void 0,
|
|
28832
|
-
!O.value &&
|
|
28852
|
+
!O.value && y.$slots.iconZoomOut ? {
|
|
28833
28853
|
name: "iconZoomOut",
|
|
28834
28854
|
fn: b(() => [
|
|
28835
|
-
C(
|
|
28855
|
+
C(y.$slots, "iconZoomOut", {}, void 0, !0)
|
|
28836
28856
|
]),
|
|
28837
28857
|
key: "1"
|
|
28838
28858
|
} : void 0,
|
|
28839
|
-
!O.value &&
|
|
28859
|
+
!O.value && y.$slots.iconZoomIn ? {
|
|
28840
28860
|
name: "iconZoomIn",
|
|
28841
28861
|
fn: b(() => [
|
|
28842
|
-
C(
|
|
28862
|
+
C(y.$slots, "iconZoomIn", {}, void 0, !0)
|
|
28843
28863
|
]),
|
|
28844
28864
|
key: "2"
|
|
28845
28865
|
} : void 0
|
|
@@ -28852,17 +28872,17 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28852
28872
|
"onUpdate:modelValue": ol[2] || (ol[2] = (il) => Fl.value = il),
|
|
28853
28873
|
onToggle: Fs
|
|
28854
28874
|
}, $d({ _: 2 }, [
|
|
28855
|
-
!O.value &&
|
|
28875
|
+
!O.value && y.$slots.commentPanelTool ? {
|
|
28856
28876
|
name: "default",
|
|
28857
28877
|
fn: b(({ onClick: il }) => [
|
|
28858
|
-
C(
|
|
28878
|
+
C(y.$slots, "commentPanelTool", { onClick: il }, void 0, !0)
|
|
28859
28879
|
]),
|
|
28860
28880
|
key: "0"
|
|
28861
28881
|
} : void 0,
|
|
28862
|
-
!O.value &&
|
|
28882
|
+
!O.value && y.$slots.iconCommentPanel ? {
|
|
28863
28883
|
name: "icon",
|
|
28864
28884
|
fn: b(() => [
|
|
28865
|
-
C(
|
|
28885
|
+
C(y.$slots, "iconCommentPanel", {}, void 0, !0)
|
|
28866
28886
|
]),
|
|
28867
28887
|
key: "1"
|
|
28868
28888
|
} : void 0
|
|
@@ -28872,59 +28892,59 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28872
28892
|
modelValue: Z.value,
|
|
28873
28893
|
"onUpdate:modelValue": ol[3] || (ol[3] = (il) => Z.value = il)
|
|
28874
28894
|
}, $d({ _: 2 }, [
|
|
28875
|
-
!O.value &&
|
|
28895
|
+
!O.value && y.$slots.themeTool ? {
|
|
28876
28896
|
name: "default",
|
|
28877
28897
|
fn: b(({ isDark: il, onClick: $l }) => [
|
|
28878
|
-
C(
|
|
28898
|
+
C(y.$slots, "themeTool", {
|
|
28879
28899
|
isDark: il,
|
|
28880
28900
|
onClick: $l
|
|
28881
28901
|
}, void 0, !0)
|
|
28882
28902
|
]),
|
|
28883
28903
|
key: "0"
|
|
28884
28904
|
} : void 0,
|
|
28885
|
-
!O.value &&
|
|
28905
|
+
!O.value && y.$slots.iconThemeDark ? {
|
|
28886
28906
|
name: "iconDark",
|
|
28887
28907
|
fn: b(() => [
|
|
28888
|
-
C(
|
|
28908
|
+
C(y.$slots, "iconThemeDark", {}, void 0, !0)
|
|
28889
28909
|
]),
|
|
28890
28910
|
key: "1"
|
|
28891
28911
|
} : void 0,
|
|
28892
|
-
!O.value &&
|
|
28912
|
+
!O.value && y.$slots.iconThemeLight ? {
|
|
28893
28913
|
name: "iconLight",
|
|
28894
28914
|
fn: b(() => [
|
|
28895
|
-
C(
|
|
28915
|
+
C(y.$slots, "iconThemeLight", {}, void 0, !0)
|
|
28896
28916
|
]),
|
|
28897
28917
|
key: "2"
|
|
28898
28918
|
} : void 0
|
|
28899
28919
|
]), 1032, ["modelValue"])) : Gl("", !0),
|
|
28900
28920
|
_l.value?.newFileOpenable && !Kt.value ? (M(), I(Or, { key: 2 }, $d({ _: 2 }, [
|
|
28901
|
-
!O.value &&
|
|
28921
|
+
!O.value && y.$slots.openFileTool ? {
|
|
28902
28922
|
name: "default",
|
|
28903
28923
|
fn: b(({ onClick: il }) => [
|
|
28904
|
-
C(
|
|
28924
|
+
C(y.$slots, "openFileTool", { onClick: il }, void 0, !0)
|
|
28905
28925
|
]),
|
|
28906
28926
|
key: "0"
|
|
28907
28927
|
} : void 0,
|
|
28908
|
-
!O.value &&
|
|
28928
|
+
!O.value && y.$slots.iconOpenFile ? {
|
|
28909
28929
|
name: "icon",
|
|
28910
28930
|
fn: b(() => [
|
|
28911
|
-
C(
|
|
28931
|
+
C(y.$slots, "iconOpenFile", {}, void 0, !0)
|
|
28912
28932
|
]),
|
|
28913
28933
|
key: "1"
|
|
28914
28934
|
} : void 0
|
|
28915
28935
|
]), 1024)) : Gl("", !0),
|
|
28916
28936
|
_l.value?.downloadable && !Kt.value ? (M(), I(Cr, { key: 3 }, $d({ _: 2 }, [
|
|
28917
|
-
!O.value &&
|
|
28937
|
+
!O.value && y.$slots.downloadTool ? {
|
|
28918
28938
|
name: "default",
|
|
28919
28939
|
fn: b(({ onClick: il }) => [
|
|
28920
|
-
C(
|
|
28940
|
+
C(y.$slots, "downloadTool", { onClick: il }, void 0, !0)
|
|
28921
28941
|
]),
|
|
28922
28942
|
key: "0"
|
|
28923
28943
|
} : void 0,
|
|
28924
|
-
!O.value &&
|
|
28944
|
+
!O.value && y.$slots.iconDownload ? {
|
|
28925
28945
|
name: "icon",
|
|
28926
28946
|
fn: b(() => [
|
|
28927
|
-
C(
|
|
28947
|
+
C(y.$slots, "iconDownload", {}, void 0, !0)
|
|
28928
28948
|
]),
|
|
28929
28949
|
key: "1"
|
|
28930
28950
|
} : void 0
|
|
@@ -28933,36 +28953,36 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28933
28953
|
key: 4,
|
|
28934
28954
|
print: c(OF)
|
|
28935
28955
|
}, $d({ _: 2 }, [
|
|
28936
|
-
!O.value &&
|
|
28956
|
+
!O.value && y.$slots.printTool ? {
|
|
28937
28957
|
name: "default",
|
|
28938
28958
|
fn: b(({ onClick: il }) => [
|
|
28939
|
-
C(
|
|
28959
|
+
C(y.$slots, "printTool", { onClick: il }, void 0, !0)
|
|
28940
28960
|
]),
|
|
28941
28961
|
key: "0"
|
|
28942
28962
|
} : void 0,
|
|
28943
|
-
!O.value &&
|
|
28963
|
+
!O.value && y.$slots.iconPrint ? {
|
|
28944
28964
|
name: "icon",
|
|
28945
28965
|
fn: b(() => [
|
|
28946
|
-
C(
|
|
28966
|
+
C(y.$slots, "iconPrint", {}, void 0, !0)
|
|
28947
28967
|
]),
|
|
28948
28968
|
key: "1"
|
|
28949
28969
|
} : void 0
|
|
28950
28970
|
]), 1032, ["print"])) : Gl("", !0),
|
|
28951
28971
|
_l.value?.fullscreen && !Kt.value && K.value ? (M(), I(xr, { key: 5 }, $d({ _: 2 }, [
|
|
28952
|
-
!O.value &&
|
|
28972
|
+
!O.value && y.$slots.fullScreenTool ? {
|
|
28953
28973
|
name: "default",
|
|
28954
28974
|
fn: b(({ onClick: il, isSupported: $l }) => [
|
|
28955
|
-
C(
|
|
28975
|
+
C(y.$slots, "fullScreenTool", {
|
|
28956
28976
|
onClick: il,
|
|
28957
28977
|
isSupported: $l
|
|
28958
28978
|
}, void 0, !0)
|
|
28959
28979
|
]),
|
|
28960
28980
|
key: "0"
|
|
28961
28981
|
} : void 0,
|
|
28962
|
-
!O.value &&
|
|
28982
|
+
!O.value && y.$slots.iconFullScreen ? {
|
|
28963
28983
|
name: "icon",
|
|
28964
28984
|
fn: b(() => [
|
|
28965
|
-
C(
|
|
28985
|
+
C(y.$slots, "iconFullScreen", {}, void 0, !0)
|
|
28966
28986
|
]),
|
|
28967
28987
|
key: "1"
|
|
28968
28988
|
} : void 0
|
|
@@ -28978,108 +28998,108 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
28978
28998
|
onRotateCounterclockwise: c(vt),
|
|
28979
28999
|
onTextSelection: ls
|
|
28980
29000
|
}, $d({ _: 2 }, [
|
|
28981
|
-
!O.value &&
|
|
29001
|
+
!O.value && y.$slots.iconMoreOptions ? {
|
|
28982
29002
|
name: "icon",
|
|
28983
29003
|
fn: b(() => [
|
|
28984
|
-
C(
|
|
29004
|
+
C(y.$slots, "iconMoreOptions", {}, void 0, !0)
|
|
28985
29005
|
]),
|
|
28986
29006
|
key: "0"
|
|
28987
29007
|
} : void 0,
|
|
28988
|
-
!O.value &&
|
|
29008
|
+
!O.value && y.$slots.iconFirstPage ? {
|
|
28989
29009
|
name: "iconFirstPage",
|
|
28990
29010
|
fn: b(() => [
|
|
28991
|
-
C(
|
|
29011
|
+
C(y.$slots, "iconFirstPage", {}, void 0, !0)
|
|
28992
29012
|
]),
|
|
28993
29013
|
key: "1"
|
|
28994
29014
|
} : void 0,
|
|
28995
|
-
!O.value &&
|
|
29015
|
+
!O.value && y.$slots.iconLastPage ? {
|
|
28996
29016
|
name: "iconLastPage",
|
|
28997
29017
|
fn: b(() => [
|
|
28998
|
-
C(
|
|
29018
|
+
C(y.$slots, "iconLastPage", {}, void 0, !0)
|
|
28999
29019
|
]),
|
|
29000
29020
|
key: "2"
|
|
29001
29021
|
} : void 0,
|
|
29002
|
-
!O.value &&
|
|
29022
|
+
!O.value && y.$slots.iconRotateClockwise ? {
|
|
29003
29023
|
name: "iconRotateClockwise",
|
|
29004
29024
|
fn: b(() => [
|
|
29005
|
-
C(
|
|
29025
|
+
C(y.$slots, "iconRotateClockwise", {}, void 0, !0)
|
|
29006
29026
|
]),
|
|
29007
29027
|
key: "3"
|
|
29008
29028
|
} : void 0,
|
|
29009
|
-
!O.value &&
|
|
29029
|
+
!O.value && y.$slots.iconRotateCounterClockwise ? {
|
|
29010
29030
|
name: "iconRotateCounterClockwise",
|
|
29011
29031
|
fn: b(() => [
|
|
29012
|
-
C(
|
|
29032
|
+
C(y.$slots, "iconRotateCounterClockwise", {}, void 0, !0)
|
|
29013
29033
|
]),
|
|
29014
29034
|
key: "4"
|
|
29015
29035
|
} : void 0,
|
|
29016
|
-
!O.value &&
|
|
29036
|
+
!O.value && y.$slots.iconTextSelection ? {
|
|
29017
29037
|
name: "iconTextSelection",
|
|
29018
29038
|
fn: b(() => [
|
|
29019
|
-
C(
|
|
29039
|
+
C(y.$slots, "iconTextSelection", {}, void 0, !0)
|
|
29020
29040
|
]),
|
|
29021
29041
|
key: "5"
|
|
29022
29042
|
} : void 0,
|
|
29023
|
-
!O.value &&
|
|
29043
|
+
!O.value && y.$slots.iconHandMode ? {
|
|
29024
29044
|
name: "iconHandMode",
|
|
29025
29045
|
fn: b(() => [
|
|
29026
|
-
C(
|
|
29046
|
+
C(y.$slots, "iconHandMode", {}, void 0, !0)
|
|
29027
29047
|
]),
|
|
29028
29048
|
key: "6"
|
|
29029
29049
|
} : void 0,
|
|
29030
|
-
!O.value &&
|
|
29050
|
+
!O.value && y.$slots.iconScrollingPage ? {
|
|
29031
29051
|
name: "iconScrollingPage",
|
|
29032
29052
|
fn: b(() => [
|
|
29033
|
-
C(
|
|
29053
|
+
C(y.$slots, "iconScrollingPage", {}, void 0, !0)
|
|
29034
29054
|
]),
|
|
29035
29055
|
key: "7"
|
|
29036
29056
|
} : void 0,
|
|
29037
|
-
!O.value &&
|
|
29057
|
+
!O.value && y.$slots.iconScrollingVertical ? {
|
|
29038
29058
|
name: "iconScrollingVertical",
|
|
29039
29059
|
fn: b(() => [
|
|
29040
|
-
C(
|
|
29060
|
+
C(y.$slots, "iconScrollingVertical", {}, void 0, !0)
|
|
29041
29061
|
]),
|
|
29042
29062
|
key: "8"
|
|
29043
29063
|
} : void 0,
|
|
29044
|
-
!O.value &&
|
|
29064
|
+
!O.value && y.$slots.iconScrollingHorizontal ? {
|
|
29045
29065
|
name: "iconScrollingHorizontal",
|
|
29046
29066
|
fn: b(() => [
|
|
29047
|
-
C(
|
|
29067
|
+
C(y.$slots, "iconScrollingHorizontal", {}, void 0, !0)
|
|
29048
29068
|
]),
|
|
29049
29069
|
key: "9"
|
|
29050
29070
|
} : void 0,
|
|
29051
|
-
!O.value &&
|
|
29071
|
+
!O.value && y.$slots.iconScrollingWrapped ? {
|
|
29052
29072
|
name: "iconScrollingWrapped",
|
|
29053
29073
|
fn: b(() => [
|
|
29054
|
-
C(
|
|
29074
|
+
C(y.$slots, "iconScrollingWrapped", {}, void 0, !0)
|
|
29055
29075
|
]),
|
|
29056
29076
|
key: "10"
|
|
29057
29077
|
} : void 0,
|
|
29058
|
-
!O.value &&
|
|
29078
|
+
!O.value && y.$slots.iconPageViewSingle ? {
|
|
29059
29079
|
name: "iconPageViewSingle",
|
|
29060
29080
|
fn: b(() => [
|
|
29061
|
-
C(
|
|
29081
|
+
C(y.$slots, "iconPageViewSingle", {}, void 0, !0)
|
|
29062
29082
|
]),
|
|
29063
29083
|
key: "11"
|
|
29064
29084
|
} : void 0,
|
|
29065
|
-
!O.value &&
|
|
29085
|
+
!O.value && y.$slots.iconPageViewDual ? {
|
|
29066
29086
|
name: "iconPageViewDual",
|
|
29067
29087
|
fn: b(() => [
|
|
29068
|
-
C(
|
|
29088
|
+
C(y.$slots, "iconPageViewDual", {}, void 0, !0)
|
|
29069
29089
|
]),
|
|
29070
29090
|
key: "12"
|
|
29071
29091
|
} : void 0,
|
|
29072
|
-
!O.value &&
|
|
29092
|
+
!O.value && y.$slots.iconPageViewDualWithCover ? {
|
|
29073
29093
|
name: "iconPageViewDualWithCover",
|
|
29074
29094
|
fn: b(() => [
|
|
29075
|
-
C(
|
|
29095
|
+
C(y.$slots, "iconPageViewDualWithCover", {}, void 0, !0)
|
|
29076
29096
|
]),
|
|
29077
29097
|
key: "13"
|
|
29078
29098
|
} : void 0,
|
|
29079
|
-
!O.value &&
|
|
29099
|
+
!O.value && y.$slots.iconDocProperties ? {
|
|
29080
29100
|
name: "iconDocProperties",
|
|
29081
29101
|
fn: b(() => [
|
|
29082
|
-
C(
|
|
29102
|
+
C(y.$slots, "iconDocProperties", {}, void 0, !0)
|
|
29083
29103
|
]),
|
|
29084
29104
|
key: "14"
|
|
29085
29105
|
} : void 0
|
|
@@ -29104,17 +29124,17 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
29104
29124
|
modelValue: tl.value,
|
|
29105
29125
|
"onUpdate:modelValue": ol[4] || (ol[4] = (il) => tl.value = il)
|
|
29106
29126
|
}, $d({ _: 2 }, [
|
|
29107
|
-
!O.value &&
|
|
29127
|
+
!O.value && y.$slots.thumbnailTool ? {
|
|
29108
29128
|
name: "default",
|
|
29109
29129
|
fn: b(({ onToggle: il }) => [
|
|
29110
|
-
C(
|
|
29130
|
+
C(y.$slots, "thumbnailTool", { onToggle: il }, void 0, !0)
|
|
29111
29131
|
]),
|
|
29112
29132
|
key: "0"
|
|
29113
29133
|
} : void 0,
|
|
29114
|
-
!O.value &&
|
|
29134
|
+
!O.value && y.$slots.iconThumbnail ? {
|
|
29115
29135
|
name: "icon",
|
|
29116
29136
|
fn: b(() => [
|
|
29117
|
-
C(
|
|
29137
|
+
C(y.$slots, "iconThumbnail", {}, void 0, !0)
|
|
29118
29138
|
]),
|
|
29119
29139
|
key: "1"
|
|
29120
29140
|
} : void 0
|
|
@@ -29166,7 +29186,7 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
29166
29186
|
key: il,
|
|
29167
29187
|
"data-page-index": il,
|
|
29168
29188
|
"aria-label": `page ${$l?.page.pageNumber}`,
|
|
29169
|
-
class: td(`vpv-page-inner-container ${
|
|
29189
|
+
class: td(`vpv-page-inner-container ${B.value === $l?.page.pageNumber ? "vpv-current-page" : ""}`)
|
|
29170
29190
|
}, [
|
|
29171
29191
|
Rl.value && v.value && $l?.page ? (M(), I(C0, {
|
|
29172
29192
|
key: 0,
|
|
@@ -29189,7 +29209,7 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
29189
29209
|
Gn.value ? {
|
|
29190
29210
|
name: "pageOverlay",
|
|
29191
29211
|
fn: b((Md) => [
|
|
29192
|
-
C(
|
|
29212
|
+
C(y.$slots, "pageOverlay", pl({ ref_for: !0 }, Md), void 0, !0)
|
|
29193
29213
|
]),
|
|
29194
29214
|
key: "0"
|
|
29195
29215
|
} : void 0
|
|
@@ -29201,7 +29221,7 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
29201
29221
|
(M(!0), Nl(Qd, null, Ed(il, (Md) => (M(), Nl("div", {
|
|
29202
29222
|
key: Md.index,
|
|
29203
29223
|
"data-page-index": Md.index,
|
|
29204
|
-
class: td(`vpv-page-inner-container ${
|
|
29224
|
+
class: td(`vpv-page-inner-container ${B.value === Md.data?.page.pageNumber ? "vpv-current-page" : ""}`),
|
|
29205
29225
|
"aria-label": `page ${Md.data?.page.pageNumber}`
|
|
29206
29226
|
}, [
|
|
29207
29227
|
Rl.value && v.value && Md.data?.page ? (M(), I(C0, {
|
|
@@ -29225,7 +29245,7 @@ const { getTextLayers: ln } = fa(), JE = (l, U) => {
|
|
|
29225
29245
|
Gn.value ? {
|
|
29226
29246
|
name: "pageOverlay",
|
|
29227
29247
|
fn: b((Ad) => [
|
|
29228
|
-
C(
|
|
29248
|
+
C(y.$slots, "pageOverlay", pl({ ref_for: !0 }, Ad), void 0, !0)
|
|
29229
29249
|
]),
|
|
29230
29250
|
key: "0"
|
|
29231
29251
|
} : void 0
|