bok-reader 0.7.0 → 0.7.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.
- package/dist/bok.es.js +515 -512
- package/dist/bok.umd.js +20 -20
- package/dist/main.css +1 -1
- package/package.json +1 -1
package/dist/bok.es.js
CHANGED
|
@@ -126,7 +126,7 @@ const nn = [
|
|
|
126
126
|
}
|
|
127
127
|
],
|
|
128
128
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
129
|
-
],
|
|
129
|
+
], $e = ke("settings", nn);
|
|
130
130
|
var le = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
131
131
|
function rn(S) {
|
|
132
132
|
return S && S.__esModule && Object.prototype.hasOwnProperty.call(S, "default") ? S.default : S;
|
|
@@ -134,7 +134,7 @@ function rn(S) {
|
|
|
134
134
|
function ce(S) {
|
|
135
135
|
throw new Error('Could not dynamically require "' + S + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
136
136
|
}
|
|
137
|
-
var
|
|
137
|
+
var We = { exports: {} };
|
|
138
138
|
/*!
|
|
139
139
|
|
|
140
140
|
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
@@ -273,20 +273,20 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
273
273
|
return f;
|
|
274
274
|
}
|
|
275
275
|
function l(a, h, r, f, c, b) {
|
|
276
|
-
var C, A, N = a.file, x = a.compression, R = b !== g.utf8encode, F = i.transformTo("string", b(N.name)), O = i.transformTo("string", g.utf8encode(N.name)), U = N.comment, st = i.transformTo("string", b(U)), w = i.transformTo("string", g.utf8encode(U)), B = O.length !== N.name.length, n = w.length !== U.length, E = "", Y = "",
|
|
276
|
+
var C, A, N = a.file, x = a.compression, R = b !== g.utf8encode, F = i.transformTo("string", b(N.name)), O = i.transformTo("string", g.utf8encode(N.name)), U = N.comment, st = i.transformTo("string", b(U)), w = i.transformTo("string", g.utf8encode(U)), B = O.length !== N.name.length, n = w.length !== U.length, E = "", Y = "", W = "", it = N.dir, H = N.date, V = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
277
277
|
h && !r || (V.crc32 = a.crc32, V.compressedSize = a.compressedSize, V.uncompressedSize = a.uncompressedSize);
|
|
278
|
-
var
|
|
279
|
-
h && (
|
|
280
|
-
var
|
|
281
|
-
it && (
|
|
282
|
-
var ht =
|
|
283
|
-
return
|
|
284
|
-
}(N.unixPermissions, it)) : (nt = 20,
|
|
285
|
-
return 63 & (
|
|
286
|
-
}(N.dosPermissions)), C =
|
|
278
|
+
var I = 0;
|
|
279
|
+
h && (I |= 8), R || !B && !n || (I |= 2048);
|
|
280
|
+
var z = 0, nt = 0;
|
|
281
|
+
it && (z |= 16), c === "UNIX" ? (nt = 798, z |= function(j, lt) {
|
|
282
|
+
var ht = j;
|
|
283
|
+
return j || (ht = lt ? 16893 : 33204), (65535 & ht) << 16;
|
|
284
|
+
}(N.unixPermissions, it)) : (nt = 20, z |= function(j) {
|
|
285
|
+
return 63 & (j || 0);
|
|
286
|
+
}(N.dosPermissions)), C = H.getUTCHours(), C <<= 6, C |= H.getUTCMinutes(), C <<= 5, C |= H.getUTCSeconds() / 2, A = H.getUTCFullYear() - 1980, A <<= 4, A |= H.getUTCMonth() + 1, A <<= 5, A |= H.getUTCDate(), B && (Y = o(1, 1) + o(_(F), 4) + O, E += "up" + o(Y.length, 2) + Y), n && (W = o(1, 1) + o(_(st), 4) + w, E += "uc" + o(W.length, 2) + W);
|
|
287
287
|
var Q = "";
|
|
288
288
|
return Q += `
|
|
289
|
-
\0`, Q += o(
|
|
289
|
+
\0`, Q += o(I, 2), Q += x.magic, Q += o(C, 2), Q += o(A, 2), Q += o(V.crc32, 4), Q += o(V.compressedSize, 4), Q += o(V.uncompressedSize, 4), Q += o(F.length, 2), Q += o(E.length, 2), { fileRecord: m.LOCAL_FILE_HEADER + Q + F + E, dirRecord: m.CENTRAL_FILE_HEADER + o(nt, 2) + Q + o(st.length, 2) + "\0\0\0\0" + o(z, 4) + o(f, 4) + F + E + st };
|
|
290
290
|
}
|
|
291
291
|
var i = s("../utils"), d = s("../stream/GenericWorker"), g = s("../utf8"), _ = s("../crc32"), m = s("../signature");
|
|
292
292
|
function v(a, h, r, f) {
|
|
@@ -1648,55 +1648,55 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1648
1648
|
return -1 ^ l;
|
|
1649
1649
|
};
|
|
1650
1650
|
}, {}], 46: [function(s, k, u) {
|
|
1651
|
-
var o, l = s("../utils/common"), i = s("./trees"), d = s("./adler32"), g = s("./crc32"), _ = s("./messages"), m = 0, v = 4, a = 0, h = -2, r = -1, f = 4, c = 2, b = 8, C = 9, A = 286, N = 30, x = 19, R = 2 * A + 1, F = 15, O = 3, U = 258, st = U + O + 1, w = 42, B = 113, n = 1, E = 2, Y = 3,
|
|
1652
|
-
function it(e,
|
|
1653
|
-
return e.msg = _[
|
|
1651
|
+
var o, l = s("../utils/common"), i = s("./trees"), d = s("./adler32"), g = s("./crc32"), _ = s("./messages"), m = 0, v = 4, a = 0, h = -2, r = -1, f = 4, c = 2, b = 8, C = 9, A = 286, N = 30, x = 19, R = 2 * A + 1, F = 15, O = 3, U = 258, st = U + O + 1, w = 42, B = 113, n = 1, E = 2, Y = 3, W = 4;
|
|
1652
|
+
function it(e, $) {
|
|
1653
|
+
return e.msg = _[$], $;
|
|
1654
1654
|
}
|
|
1655
|
-
function
|
|
1655
|
+
function H(e) {
|
|
1656
1656
|
return (e << 1) - (4 < e ? 9 : 0);
|
|
1657
1657
|
}
|
|
1658
1658
|
function V(e) {
|
|
1659
|
-
for (var
|
|
1660
|
-
e[
|
|
1659
|
+
for (var $ = e.length; 0 <= --$; )
|
|
1660
|
+
e[$] = 0;
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1663
|
-
var
|
|
1664
|
-
M > e.avail_out && (M = e.avail_out), M !== 0 && (l.arraySet(e.output,
|
|
1662
|
+
function I(e) {
|
|
1663
|
+
var $ = e.state, M = $.pending;
|
|
1664
|
+
M > e.avail_out && (M = e.avail_out), M !== 0 && (l.arraySet(e.output, $.pending_buf, $.pending_out, M, e.next_out), e.next_out += M, $.pending_out += M, e.total_out += M, e.avail_out -= M, $.pending -= M, $.pending === 0 && ($.pending_out = 0));
|
|
1665
1665
|
}
|
|
1666
|
-
function
|
|
1667
|
-
i._tr_flush_block(e, 0 <= e.block_start ? e.block_start : -1, e.strstart - e.block_start,
|
|
1666
|
+
function z(e, $) {
|
|
1667
|
+
i._tr_flush_block(e, 0 <= e.block_start ? e.block_start : -1, e.strstart - e.block_start, $), e.block_start = e.strstart, I(e.strm);
|
|
1668
1668
|
}
|
|
1669
|
-
function nt(e,
|
|
1670
|
-
e.pending_buf[e.pending++] =
|
|
1669
|
+
function nt(e, $) {
|
|
1670
|
+
e.pending_buf[e.pending++] = $;
|
|
1671
1671
|
}
|
|
1672
|
-
function Q(e,
|
|
1673
|
-
e.pending_buf[e.pending++] =
|
|
1672
|
+
function Q(e, $) {
|
|
1673
|
+
e.pending_buf[e.pending++] = $ >>> 8 & 255, e.pending_buf[e.pending++] = 255 & $;
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1675
|
+
function j(e, $) {
|
|
1676
1676
|
var M, y, p = e.max_chain_length, T = e.strstart, q = e.prev_length, G = e.nice_match, P = e.strstart > e.w_size - st ? e.strstart - (e.w_size - st) : 0, X = e.window, ot = e.w_mask, tt = e.prev, ut = e.strstart + U, St = X[T + q - 1], mt = X[T + q];
|
|
1677
1677
|
e.prev_length >= e.good_match && (p >>= 2), G > e.lookahead && (G = e.lookahead);
|
|
1678
1678
|
do
|
|
1679
|
-
if (X[(M =
|
|
1679
|
+
if (X[(M = $) + q] === mt && X[M + q - 1] === St && X[M] === X[T] && X[++M] === X[T + 1]) {
|
|
1680
1680
|
T += 2, M++;
|
|
1681
1681
|
do
|
|
1682
1682
|
;
|
|
1683
1683
|
while (X[++T] === X[++M] && X[++T] === X[++M] && X[++T] === X[++M] && X[++T] === X[++M] && X[++T] === X[++M] && X[++T] === X[++M] && X[++T] === X[++M] && X[++T] === X[++M] && T < ut);
|
|
1684
1684
|
if (y = U - (ut - T), T = ut - U, q < y) {
|
|
1685
|
-
if (e.match_start =
|
|
1685
|
+
if (e.match_start = $, G <= (q = y))
|
|
1686
1686
|
break;
|
|
1687
1687
|
St = X[T + q - 1], mt = X[T + q];
|
|
1688
1688
|
}
|
|
1689
1689
|
}
|
|
1690
|
-
while ((
|
|
1690
|
+
while (($ = tt[$ & ot]) > P && --p != 0);
|
|
1691
1691
|
return q <= e.lookahead ? q : e.lookahead;
|
|
1692
1692
|
}
|
|
1693
1693
|
function lt(e) {
|
|
1694
|
-
var
|
|
1694
|
+
var $, M, y, p, T, q, G, P, X, ot, tt = e.w_size;
|
|
1695
1695
|
do {
|
|
1696
1696
|
if (p = e.window_size - e.lookahead - e.strstart, e.strstart >= tt + (tt - st)) {
|
|
1697
|
-
for (l.arraySet(e.window, e.window, tt, tt, 0), e.match_start -= tt, e.strstart -= tt, e.block_start -= tt,
|
|
1697
|
+
for (l.arraySet(e.window, e.window, tt, tt, 0), e.match_start -= tt, e.strstart -= tt, e.block_start -= tt, $ = M = e.hash_size; y = e.head[--$], e.head[$] = tt <= y ? y - tt : 0, --M; )
|
|
1698
1698
|
;
|
|
1699
|
-
for (
|
|
1699
|
+
for ($ = M = tt; y = e.prev[--$], e.prev[$] = tt <= y ? y - tt : 0, --M; )
|
|
1700
1700
|
;
|
|
1701
1701
|
p += tt;
|
|
1702
1702
|
}
|
|
@@ -1707,15 +1707,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1707
1707
|
;
|
|
1708
1708
|
} while (e.lookahead < st && e.strm.avail_in !== 0);
|
|
1709
1709
|
}
|
|
1710
|
-
function ht(e,
|
|
1710
|
+
function ht(e, $) {
|
|
1711
1711
|
for (var M, y; ; ) {
|
|
1712
1712
|
if (e.lookahead < st) {
|
|
1713
|
-
if (lt(e), e.lookahead < st &&
|
|
1713
|
+
if (lt(e), e.lookahead < st && $ === m)
|
|
1714
1714
|
return n;
|
|
1715
1715
|
if (e.lookahead === 0)
|
|
1716
1716
|
break;
|
|
1717
1717
|
}
|
|
1718
|
-
if (M = 0, e.lookahead >= O && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + O - 1]) & e.hash_mask, M = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), M !== 0 && e.strstart - M <= e.w_size - st && (e.match_length =
|
|
1718
|
+
if (M = 0, e.lookahead >= O && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + O - 1]) & e.hash_mask, M = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), M !== 0 && e.strstart - M <= e.w_size - st && (e.match_length = j(e, M)), e.match_length >= O)
|
|
1719
1719
|
if (y = i._tr_tally(e, e.strstart - e.match_start, e.match_length - O), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= O) {
|
|
1720
1720
|
for (e.match_length--; e.strstart++, e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + O - 1]) & e.hash_mask, M = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart, --e.match_length != 0; )
|
|
1721
1721
|
;
|
|
@@ -1724,84 +1724,84 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1724
1724
|
e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + 1]) & e.hash_mask;
|
|
1725
1725
|
else
|
|
1726
1726
|
y = i._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
|
|
1727
|
-
if (y && (
|
|
1727
|
+
if (y && (z(e, !1), e.strm.avail_out === 0))
|
|
1728
1728
|
return n;
|
|
1729
1729
|
}
|
|
1730
|
-
return e.insert = e.strstart < O - 1 ? e.strstart : O - 1,
|
|
1730
|
+
return e.insert = e.strstart < O - 1 ? e.strstart : O - 1, $ === v ? (z(e, !0), e.strm.avail_out === 0 ? Y : W) : e.last_lit && (z(e, !1), e.strm.avail_out === 0) ? n : E;
|
|
1731
1731
|
}
|
|
1732
|
-
function ct(e,
|
|
1732
|
+
function ct(e, $) {
|
|
1733
1733
|
for (var M, y, p; ; ) {
|
|
1734
1734
|
if (e.lookahead < st) {
|
|
1735
|
-
if (lt(e), e.lookahead < st &&
|
|
1735
|
+
if (lt(e), e.lookahead < st && $ === m)
|
|
1736
1736
|
return n;
|
|
1737
1737
|
if (e.lookahead === 0)
|
|
1738
1738
|
break;
|
|
1739
1739
|
}
|
|
1740
|
-
if (M = 0, e.lookahead >= O && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + O - 1]) & e.hash_mask, M = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = O - 1, M !== 0 && e.prev_length < e.max_lazy_match && e.strstart - M <= e.w_size - st && (e.match_length =
|
|
1740
|
+
if (M = 0, e.lookahead >= O && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + O - 1]) & e.hash_mask, M = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = O - 1, M !== 0 && e.prev_length < e.max_lazy_match && e.strstart - M <= e.w_size - st && (e.match_length = j(e, M), e.match_length <= 5 && (e.strategy === 1 || e.match_length === O && 4096 < e.strstart - e.match_start) && (e.match_length = O - 1)), e.prev_length >= O && e.match_length <= e.prev_length) {
|
|
1741
1741
|
for (p = e.strstart + e.lookahead - O, y = i._tr_tally(e, e.strstart - 1 - e.prev_match, e.prev_length - O), e.lookahead -= e.prev_length - 1, e.prev_length -= 2; ++e.strstart <= p && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + O - 1]) & e.hash_mask, M = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), --e.prev_length != 0; )
|
|
1742
1742
|
;
|
|
1743
|
-
if (e.match_available = 0, e.match_length = O - 1, e.strstart++, y && (
|
|
1743
|
+
if (e.match_available = 0, e.match_length = O - 1, e.strstart++, y && (z(e, !1), e.strm.avail_out === 0))
|
|
1744
1744
|
return n;
|
|
1745
1745
|
} else if (e.match_available) {
|
|
1746
|
-
if ((y = i._tr_tally(e, 0, e.window[e.strstart - 1])) &&
|
|
1746
|
+
if ((y = i._tr_tally(e, 0, e.window[e.strstart - 1])) && z(e, !1), e.strstart++, e.lookahead--, e.strm.avail_out === 0)
|
|
1747
1747
|
return n;
|
|
1748
1748
|
} else
|
|
1749
1749
|
e.match_available = 1, e.strstart++, e.lookahead--;
|
|
1750
1750
|
}
|
|
1751
|
-
return e.match_available && (y = i._tr_tally(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < O - 1 ? e.strstart : O - 1,
|
|
1751
|
+
return e.match_available && (y = i._tr_tally(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < O - 1 ? e.strstart : O - 1, $ === v ? (z(e, !0), e.strm.avail_out === 0 ? Y : W) : e.last_lit && (z(e, !1), e.strm.avail_out === 0) ? n : E;
|
|
1752
1752
|
}
|
|
1753
|
-
function dt(e,
|
|
1754
|
-
this.good_length = e, this.max_lazy =
|
|
1753
|
+
function dt(e, $, M, y, p) {
|
|
1754
|
+
this.good_length = e, this.max_lazy = $, this.nice_length = M, this.max_chain = y, this.func = p;
|
|
1755
1755
|
}
|
|
1756
1756
|
function pt() {
|
|
1757
1757
|
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = b, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new l.Buf16(2 * R), this.dyn_dtree = new l.Buf16(2 * (2 * N + 1)), this.bl_tree = new l.Buf16(2 * (2 * x + 1)), V(this.dyn_ltree), V(this.dyn_dtree), V(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new l.Buf16(F + 1), this.heap = new l.Buf16(2 * A + 1), V(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new l.Buf16(2 * A + 1), V(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
1758
1758
|
}
|
|
1759
1759
|
function gt(e) {
|
|
1760
|
-
var
|
|
1761
|
-
return e && e.state ? (e.total_in = e.total_out = 0, e.data_type = c, (
|
|
1760
|
+
var $;
|
|
1761
|
+
return e && e.state ? (e.total_in = e.total_out = 0, e.data_type = c, ($ = e.state).pending = 0, $.pending_out = 0, $.wrap < 0 && ($.wrap = -$.wrap), $.status = $.wrap ? w : B, e.adler = $.wrap === 2 ? 0 : 1, $.last_flush = m, i._tr_init($), a) : it(e, h);
|
|
1762
1762
|
}
|
|
1763
1763
|
function xt(e) {
|
|
1764
|
-
var
|
|
1765
|
-
return
|
|
1764
|
+
var $ = gt(e);
|
|
1765
|
+
return $ === a && function(M) {
|
|
1766
1766
|
M.window_size = 2 * M.w_size, V(M.head), M.max_lazy_match = o[M.level].max_lazy, M.good_match = o[M.level].good_length, M.nice_match = o[M.level].nice_length, M.max_chain_length = o[M.level].max_chain, M.strstart = 0, M.block_start = 0, M.lookahead = 0, M.insert = 0, M.match_length = M.prev_length = O - 1, M.match_available = 0, M.ins_h = 0;
|
|
1767
|
-
}(e.state),
|
|
1767
|
+
}(e.state), $;
|
|
1768
1768
|
}
|
|
1769
|
-
function Ct(e,
|
|
1769
|
+
function Ct(e, $, M, y, p, T) {
|
|
1770
1770
|
if (!e)
|
|
1771
1771
|
return h;
|
|
1772
1772
|
var q = 1;
|
|
1773
|
-
if (
|
|
1773
|
+
if ($ === r && ($ = 6), y < 0 ? (q = 0, y = -y) : 15 < y && (q = 2, y -= 16), p < 1 || C < p || M !== b || y < 8 || 15 < y || $ < 0 || 9 < $ || T < 0 || f < T)
|
|
1774
1774
|
return it(e, h);
|
|
1775
1775
|
y === 8 && (y = 9);
|
|
1776
1776
|
var G = new pt();
|
|
1777
|
-
return (e.state = G).strm = e, G.wrap = q, G.gzhead = null, G.w_bits = y, G.w_size = 1 << G.w_bits, G.w_mask = G.w_size - 1, G.hash_bits = p + 7, G.hash_size = 1 << G.hash_bits, G.hash_mask = G.hash_size - 1, G.hash_shift = ~~((G.hash_bits + O - 1) / O), G.window = new l.Buf8(2 * G.w_size), G.head = new l.Buf16(G.hash_size), G.prev = new l.Buf16(G.w_size), G.lit_bufsize = 1 << p + 6, G.pending_buf_size = 4 * G.lit_bufsize, G.pending_buf = new l.Buf8(G.pending_buf_size), G.d_buf = 1 * G.lit_bufsize, G.l_buf = 3 * G.lit_bufsize, G.level =
|
|
1777
|
+
return (e.state = G).strm = e, G.wrap = q, G.gzhead = null, G.w_bits = y, G.w_size = 1 << G.w_bits, G.w_mask = G.w_size - 1, G.hash_bits = p + 7, G.hash_size = 1 << G.hash_bits, G.hash_mask = G.hash_size - 1, G.hash_shift = ~~((G.hash_bits + O - 1) / O), G.window = new l.Buf8(2 * G.w_size), G.head = new l.Buf16(G.hash_size), G.prev = new l.Buf16(G.w_size), G.lit_bufsize = 1 << p + 6, G.pending_buf_size = 4 * G.lit_bufsize, G.pending_buf = new l.Buf8(G.pending_buf_size), G.d_buf = 1 * G.lit_bufsize, G.l_buf = 3 * G.lit_bufsize, G.level = $, G.strategy = T, G.method = M, xt(e);
|
|
1778
1778
|
}
|
|
1779
|
-
o = [new dt(0, 0, 0, 0, function(e,
|
|
1779
|
+
o = [new dt(0, 0, 0, 0, function(e, $) {
|
|
1780
1780
|
var M = 65535;
|
|
1781
1781
|
for (M > e.pending_buf_size - 5 && (M = e.pending_buf_size - 5); ; ) {
|
|
1782
1782
|
if (e.lookahead <= 1) {
|
|
1783
|
-
if (lt(e), e.lookahead === 0 &&
|
|
1783
|
+
if (lt(e), e.lookahead === 0 && $ === m)
|
|
1784
1784
|
return n;
|
|
1785
1785
|
if (e.lookahead === 0)
|
|
1786
1786
|
break;
|
|
1787
1787
|
}
|
|
1788
1788
|
e.strstart += e.lookahead, e.lookahead = 0;
|
|
1789
1789
|
var y = e.block_start + M;
|
|
1790
|
-
if ((e.strstart === 0 || e.strstart >= y) && (e.lookahead = e.strstart - y, e.strstart = y,
|
|
1790
|
+
if ((e.strstart === 0 || e.strstart >= y) && (e.lookahead = e.strstart - y, e.strstart = y, z(e, !1), e.strm.avail_out === 0) || e.strstart - e.block_start >= e.w_size - st && (z(e, !1), e.strm.avail_out === 0))
|
|
1791
1791
|
return n;
|
|
1792
1792
|
}
|
|
1793
|
-
return e.insert = 0,
|
|
1794
|
-
}), new dt(4, 4, 8, 4, ht), new dt(4, 5, 16, 8, ht), new dt(4, 6, 32, 32, ht), new dt(4, 4, 16, 16, ct), new dt(8, 16, 32, 32, ct), new dt(8, 16, 128, 128, ct), new dt(8, 32, 128, 256, ct), new dt(32, 128, 258, 1024, ct), new dt(32, 258, 258, 4096, ct)], u.deflateInit = function(e,
|
|
1795
|
-
return Ct(e,
|
|
1796
|
-
}, u.deflateInit2 = Ct, u.deflateReset = xt, u.deflateResetKeep = gt, u.deflateSetHeader = function(e,
|
|
1797
|
-
return e && e.state ? e.state.wrap !== 2 ? h : (e.state.gzhead =
|
|
1798
|
-
}, u.deflate = function(e,
|
|
1793
|
+
return e.insert = 0, $ === v ? (z(e, !0), e.strm.avail_out === 0 ? Y : W) : (e.strstart > e.block_start && (z(e, !1), e.strm.avail_out), n);
|
|
1794
|
+
}), new dt(4, 4, 8, 4, ht), new dt(4, 5, 16, 8, ht), new dt(4, 6, 32, 32, ht), new dt(4, 4, 16, 16, ct), new dt(8, 16, 32, 32, ct), new dt(8, 16, 128, 128, ct), new dt(8, 32, 128, 256, ct), new dt(32, 128, 258, 1024, ct), new dt(32, 258, 258, 4096, ct)], u.deflateInit = function(e, $) {
|
|
1795
|
+
return Ct(e, $, b, 15, 8, 0);
|
|
1796
|
+
}, u.deflateInit2 = Ct, u.deflateReset = xt, u.deflateResetKeep = gt, u.deflateSetHeader = function(e, $) {
|
|
1797
|
+
return e && e.state ? e.state.wrap !== 2 ? h : (e.state.gzhead = $, a) : h;
|
|
1798
|
+
}, u.deflate = function(e, $) {
|
|
1799
1799
|
var M, y, p, T;
|
|
1800
|
-
if (!e || !e.state || 5 <
|
|
1800
|
+
if (!e || !e.state || 5 < $ || $ < 0)
|
|
1801
1801
|
return e ? it(e, h) : h;
|
|
1802
|
-
if (y = e.state, !e.output || !e.input && e.avail_in !== 0 || y.status === 666 &&
|
|
1802
|
+
if (y = e.state, !e.output || !e.input && e.avail_in !== 0 || y.status === 666 && $ !== v)
|
|
1803
1803
|
return it(e, e.avail_out === 0 ? -5 : h);
|
|
1804
|
-
if (y.strm = e, M = y.last_flush, y.last_flush =
|
|
1804
|
+
if (y.strm = e, M = y.last_flush, y.last_flush = $, y.status === w)
|
|
1805
1805
|
if (y.wrap === 2)
|
|
1806
1806
|
e.adler = 0, nt(y, 31), nt(y, 139), nt(y, 8), y.gzhead ? (nt(y, (y.gzhead.text ? 1 : 0) + (y.gzhead.hcrc ? 2 : 0) + (y.gzhead.extra ? 4 : 0) + (y.gzhead.name ? 8 : 0) + (y.gzhead.comment ? 16 : 0)), nt(y, 255 & y.gzhead.time), nt(y, y.gzhead.time >> 8 & 255), nt(y, y.gzhead.time >> 16 & 255), nt(y, y.gzhead.time >> 24 & 255), nt(y, y.level === 9 ? 2 : 2 <= y.strategy || y.level < 2 ? 4 : 0), nt(y, 255 & y.gzhead.os), y.gzhead.extra && y.gzhead.extra.length && (nt(y, 255 & y.gzhead.extra.length), nt(y, y.gzhead.extra.length >> 8 & 255)), y.gzhead.hcrc && (e.adler = g(e.adler, y.pending_buf, y.pending, 0)), y.gzindex = 0, y.status = 69) : (nt(y, 0), nt(y, 0), nt(y, 0), nt(y, 0), nt(y, 0), nt(y, y.level === 9 ? 2 : 2 <= y.strategy || y.level < 2 ? 4 : 0), nt(y, 3), y.status = B);
|
|
1807
1807
|
else {
|
|
@@ -1810,7 +1810,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1810
1810
|
}
|
|
1811
1811
|
if (y.status === 69)
|
|
1812
1812
|
if (y.gzhead.extra) {
|
|
1813
|
-
for (p = y.pending; y.gzindex < (65535 & y.gzhead.extra.length) && (y.pending !== y.pending_buf_size || (y.gzhead.hcrc && y.pending > p && (e.adler = g(e.adler, y.pending_buf, y.pending - p, p)),
|
|
1813
|
+
for (p = y.pending; y.gzindex < (65535 & y.gzhead.extra.length) && (y.pending !== y.pending_buf_size || (y.gzhead.hcrc && y.pending > p && (e.adler = g(e.adler, y.pending_buf, y.pending - p, p)), I(e), p = y.pending, y.pending !== y.pending_buf_size)); )
|
|
1814
1814
|
nt(y, 255 & y.gzhead.extra[y.gzindex]), y.gzindex++;
|
|
1815
1815
|
y.gzhead.hcrc && y.pending > p && (e.adler = g(e.adler, y.pending_buf, y.pending - p, p)), y.gzindex === y.gzhead.extra.length && (y.gzindex = 0, y.status = 73);
|
|
1816
1816
|
} else
|
|
@@ -1819,7 +1819,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1819
1819
|
if (y.gzhead.name) {
|
|
1820
1820
|
p = y.pending;
|
|
1821
1821
|
do {
|
|
1822
|
-
if (y.pending === y.pending_buf_size && (y.gzhead.hcrc && y.pending > p && (e.adler = g(e.adler, y.pending_buf, y.pending - p, p)),
|
|
1822
|
+
if (y.pending === y.pending_buf_size && (y.gzhead.hcrc && y.pending > p && (e.adler = g(e.adler, y.pending_buf, y.pending - p, p)), I(e), p = y.pending, y.pending === y.pending_buf_size)) {
|
|
1823
1823
|
T = 1;
|
|
1824
1824
|
break;
|
|
1825
1825
|
}
|
|
@@ -1832,7 +1832,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1832
1832
|
if (y.gzhead.comment) {
|
|
1833
1833
|
p = y.pending;
|
|
1834
1834
|
do {
|
|
1835
|
-
if (y.pending === y.pending_buf_size && (y.gzhead.hcrc && y.pending > p && (e.adler = g(e.adler, y.pending_buf, y.pending - p, p)),
|
|
1835
|
+
if (y.pending === y.pending_buf_size && (y.gzhead.hcrc && y.pending > p && (e.adler = g(e.adler, y.pending_buf, y.pending - p, p)), I(e), p = y.pending, y.pending === y.pending_buf_size)) {
|
|
1836
1836
|
T = 1;
|
|
1837
1837
|
break;
|
|
1838
1838
|
}
|
|
@@ -1841,14 +1841,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1841
1841
|
y.gzhead.hcrc && y.pending > p && (e.adler = g(e.adler, y.pending_buf, y.pending - p, p)), T === 0 && (y.status = 103);
|
|
1842
1842
|
} else
|
|
1843
1843
|
y.status = 103;
|
|
1844
|
-
if (y.status === 103 && (y.gzhead.hcrc ? (y.pending + 2 > y.pending_buf_size &&
|
|
1845
|
-
if (
|
|
1844
|
+
if (y.status === 103 && (y.gzhead.hcrc ? (y.pending + 2 > y.pending_buf_size && I(e), y.pending + 2 <= y.pending_buf_size && (nt(y, 255 & e.adler), nt(y, e.adler >> 8 & 255), e.adler = 0, y.status = B)) : y.status = B), y.pending !== 0) {
|
|
1845
|
+
if (I(e), e.avail_out === 0)
|
|
1846
1846
|
return y.last_flush = -1, a;
|
|
1847
|
-
} else if (e.avail_in === 0 &&
|
|
1847
|
+
} else if (e.avail_in === 0 && H($) <= H(M) && $ !== v)
|
|
1848
1848
|
return it(e, -5);
|
|
1849
1849
|
if (y.status === 666 && e.avail_in !== 0)
|
|
1850
1850
|
return it(e, -5);
|
|
1851
|
-
if (e.avail_in !== 0 || y.lookahead !== 0 ||
|
|
1851
|
+
if (e.avail_in !== 0 || y.lookahead !== 0 || $ !== m && y.status !== 666) {
|
|
1852
1852
|
var G = y.strategy === 2 ? function(P, X) {
|
|
1853
1853
|
for (var ot; ; ) {
|
|
1854
1854
|
if (P.lookahead === 0 && (lt(P), P.lookahead === 0)) {
|
|
@@ -1856,11 +1856,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1856
1856
|
return n;
|
|
1857
1857
|
break;
|
|
1858
1858
|
}
|
|
1859
|
-
if (P.match_length = 0, ot = i._tr_tally(P, 0, P.window[P.strstart]), P.lookahead--, P.strstart++, ot && (
|
|
1859
|
+
if (P.match_length = 0, ot = i._tr_tally(P, 0, P.window[P.strstart]), P.lookahead--, P.strstart++, ot && (z(P, !1), P.strm.avail_out === 0))
|
|
1860
1860
|
return n;
|
|
1861
1861
|
}
|
|
1862
|
-
return P.insert = 0, X === v ? (
|
|
1863
|
-
}(y,
|
|
1862
|
+
return P.insert = 0, X === v ? (z(P, !0), P.strm.avail_out === 0 ? Y : W) : P.last_lit && (z(P, !1), P.strm.avail_out === 0) ? n : E;
|
|
1863
|
+
}(y, $) : y.strategy === 3 ? function(P, X) {
|
|
1864
1864
|
for (var ot, tt, ut, St, mt = P.window; ; ) {
|
|
1865
1865
|
if (P.lookahead <= U) {
|
|
1866
1866
|
if (lt(P), P.lookahead <= U && X === m)
|
|
@@ -1875,25 +1875,25 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
1875
1875
|
while (tt === mt[++ut] && tt === mt[++ut] && tt === mt[++ut] && tt === mt[++ut] && tt === mt[++ut] && tt === mt[++ut] && tt === mt[++ut] && tt === mt[++ut] && ut < St);
|
|
1876
1876
|
P.match_length = U - (St - ut), P.match_length > P.lookahead && (P.match_length = P.lookahead);
|
|
1877
1877
|
}
|
|
1878
|
-
if (P.match_length >= O ? (ot = i._tr_tally(P, 1, P.match_length - O), P.lookahead -= P.match_length, P.strstart += P.match_length, P.match_length = 0) : (ot = i._tr_tally(P, 0, P.window[P.strstart]), P.lookahead--, P.strstart++), ot && (
|
|
1878
|
+
if (P.match_length >= O ? (ot = i._tr_tally(P, 1, P.match_length - O), P.lookahead -= P.match_length, P.strstart += P.match_length, P.match_length = 0) : (ot = i._tr_tally(P, 0, P.window[P.strstart]), P.lookahead--, P.strstart++), ot && (z(P, !1), P.strm.avail_out === 0))
|
|
1879
1879
|
return n;
|
|
1880
1880
|
}
|
|
1881
|
-
return P.insert = 0, X === v ? (
|
|
1882
|
-
}(y,
|
|
1883
|
-
if (G !== Y && G !==
|
|
1881
|
+
return P.insert = 0, X === v ? (z(P, !0), P.strm.avail_out === 0 ? Y : W) : P.last_lit && (z(P, !1), P.strm.avail_out === 0) ? n : E;
|
|
1882
|
+
}(y, $) : o[y.level].func(y, $);
|
|
1883
|
+
if (G !== Y && G !== W || (y.status = 666), G === n || G === Y)
|
|
1884
1884
|
return e.avail_out === 0 && (y.last_flush = -1), a;
|
|
1885
|
-
if (G === E && (
|
|
1885
|
+
if (G === E && ($ === 1 ? i._tr_align(y) : $ !== 5 && (i._tr_stored_block(y, 0, 0, !1), $ === 3 && (V(y.head), y.lookahead === 0 && (y.strstart = 0, y.block_start = 0, y.insert = 0))), I(e), e.avail_out === 0))
|
|
1886
1886
|
return y.last_flush = -1, a;
|
|
1887
1887
|
}
|
|
1888
|
-
return
|
|
1888
|
+
return $ !== v ? a : y.wrap <= 0 ? 1 : (y.wrap === 2 ? (nt(y, 255 & e.adler), nt(y, e.adler >> 8 & 255), nt(y, e.adler >> 16 & 255), nt(y, e.adler >> 24 & 255), nt(y, 255 & e.total_in), nt(y, e.total_in >> 8 & 255), nt(y, e.total_in >> 16 & 255), nt(y, e.total_in >> 24 & 255)) : (Q(y, e.adler >>> 16), Q(y, 65535 & e.adler)), I(e), 0 < y.wrap && (y.wrap = -y.wrap), y.pending !== 0 ? a : 1);
|
|
1889
1889
|
}, u.deflateEnd = function(e) {
|
|
1890
|
-
var
|
|
1891
|
-
return e && e.state ? (
|
|
1892
|
-
}, u.deflateSetDictionary = function(e,
|
|
1893
|
-
var M, y, p, T, q, G, P, X, ot =
|
|
1890
|
+
var $;
|
|
1891
|
+
return e && e.state ? ($ = e.state.status) !== w && $ !== 69 && $ !== 73 && $ !== 91 && $ !== 103 && $ !== B && $ !== 666 ? it(e, h) : (e.state = null, $ === B ? it(e, -3) : a) : h;
|
|
1892
|
+
}, u.deflateSetDictionary = function(e, $) {
|
|
1893
|
+
var M, y, p, T, q, G, P, X, ot = $.length;
|
|
1894
1894
|
if (!e || !e.state || (T = (M = e.state).wrap) === 2 || T === 1 && M.status !== w || M.lookahead)
|
|
1895
1895
|
return h;
|
|
1896
|
-
for (T === 1 && (e.adler = d(e.adler,
|
|
1896
|
+
for (T === 1 && (e.adler = d(e.adler, $, ot, 0)), M.wrap = 0, ot >= M.w_size && (T === 0 && (V(M.head), M.strstart = 0, M.block_start = 0, M.insert = 0), X = new l.Buf8(M.w_size), l.arraySet(X, $, ot - M.w_size, M.w_size, 0), $ = X, ot = M.w_size), q = e.avail_in, G = e.next_in, P = e.input, e.avail_in = ot, e.next_in = 0, e.input = $, lt(M); M.lookahead >= O; ) {
|
|
1897
1897
|
for (y = M.strstart, p = M.lookahead - (O - 1); M.ins_h = (M.ins_h << M.hash_shift ^ M.window[y + O - 1]) & M.hash_mask, M.prev[y & M.w_mask] = M.head[M.ins_h], M.head[M.ins_h] = y, y++, --p; )
|
|
1898
1898
|
;
|
|
1899
1899
|
M.strstart = y, M.lookahead = O - 1, lt(M);
|
|
@@ -2028,16 +2028,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2028
2028
|
w.lencode = R, w.lenbits = 9, w.distcode = F, w.distbits = 5;
|
|
2029
2029
|
}
|
|
2030
2030
|
function st(w, B, n, E) {
|
|
2031
|
-
var Y,
|
|
2032
|
-
return
|
|
2031
|
+
var Y, W = w.state;
|
|
2032
|
+
return W.window === null && (W.wsize = 1 << W.wbits, W.wnext = 0, W.whave = 0, W.window = new o.Buf8(W.wsize)), E >= W.wsize ? (o.arraySet(W.window, B, n - W.wsize, W.wsize, 0), W.wnext = 0, W.whave = W.wsize) : (E < (Y = W.wsize - W.wnext) && (Y = E), o.arraySet(W.window, B, n - E, Y, W.wnext), (E -= Y) ? (o.arraySet(W.window, B, n - E, E, 0), W.wnext = E, W.whave = W.wsize) : (W.wnext += Y, W.wnext === W.wsize && (W.wnext = 0), W.whave < W.wsize && (W.whave += Y))), 0;
|
|
2033
2033
|
}
|
|
2034
2034
|
u.inflateReset = A, u.inflateReset2 = N, u.inflateResetKeep = C, u.inflateInit = function(w) {
|
|
2035
2035
|
return x(w, 15);
|
|
2036
2036
|
}, u.inflateInit2 = x, u.inflate = function(w, B) {
|
|
2037
|
-
var n, E, Y,
|
|
2037
|
+
var n, E, Y, W, it, H, V, I, z, nt, Q, j, lt, ht, ct, dt, pt, gt, xt, Ct, e, $, M, y, p = 0, T = new o.Buf8(4), q = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
2038
2038
|
if (!w || !w.state || !w.output || !w.input && w.avail_in !== 0)
|
|
2039
2039
|
return a;
|
|
2040
|
-
(n = w.state).mode === 12 && (n.mode = 13), it = w.next_out, Y = w.output, V = w.avail_out,
|
|
2040
|
+
(n = w.state).mode === 12 && (n.mode = 13), it = w.next_out, Y = w.output, V = w.avail_out, W = w.next_in, E = w.input, H = w.avail_in, I = n.hold, z = n.bits, nt = H, Q = V, $ = v;
|
|
2041
2041
|
t:
|
|
2042
2042
|
for (; ; )
|
|
2043
2043
|
switch (n.mode) {
|
|
@@ -2046,38 +2046,38 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2046
2046
|
n.mode = 13;
|
|
2047
2047
|
break;
|
|
2048
2048
|
}
|
|
2049
|
-
for (;
|
|
2050
|
-
if (
|
|
2049
|
+
for (; z < 16; ) {
|
|
2050
|
+
if (H === 0)
|
|
2051
2051
|
break t;
|
|
2052
|
-
|
|
2052
|
+
H--, I += E[W++] << z, z += 8;
|
|
2053
2053
|
}
|
|
2054
|
-
if (2 & n.wrap &&
|
|
2055
|
-
T[n.check = 0] = 255 &
|
|
2054
|
+
if (2 & n.wrap && I === 35615) {
|
|
2055
|
+
T[n.check = 0] = 255 & I, T[1] = I >>> 8 & 255, n.check = i(n.check, T, 2, 0), z = I = 0, n.mode = 2;
|
|
2056
2056
|
break;
|
|
2057
2057
|
}
|
|
2058
|
-
if (n.flags = 0, n.head && (n.head.done = !1), !(1 & n.wrap) || (((255 &
|
|
2058
|
+
if (n.flags = 0, n.head && (n.head.done = !1), !(1 & n.wrap) || (((255 & I) << 8) + (I >> 8)) % 31) {
|
|
2059
2059
|
w.msg = "incorrect header check", n.mode = 30;
|
|
2060
2060
|
break;
|
|
2061
2061
|
}
|
|
2062
|
-
if ((15 &
|
|
2062
|
+
if ((15 & I) != 8) {
|
|
2063
2063
|
w.msg = "unknown compression method", n.mode = 30;
|
|
2064
2064
|
break;
|
|
2065
2065
|
}
|
|
2066
|
-
if (
|
|
2066
|
+
if (z -= 4, e = 8 + (15 & (I >>>= 4)), n.wbits === 0)
|
|
2067
2067
|
n.wbits = e;
|
|
2068
2068
|
else if (e > n.wbits) {
|
|
2069
2069
|
w.msg = "invalid window size", n.mode = 30;
|
|
2070
2070
|
break;
|
|
2071
2071
|
}
|
|
2072
|
-
n.dmax = 1 << e, w.adler = n.check = 1, n.mode = 512 &
|
|
2072
|
+
n.dmax = 1 << e, w.adler = n.check = 1, n.mode = 512 & I ? 10 : 12, z = I = 0;
|
|
2073
2073
|
break;
|
|
2074
2074
|
case 2:
|
|
2075
|
-
for (;
|
|
2076
|
-
if (
|
|
2075
|
+
for (; z < 16; ) {
|
|
2076
|
+
if (H === 0)
|
|
2077
2077
|
break t;
|
|
2078
|
-
|
|
2078
|
+
H--, I += E[W++] << z, z += 8;
|
|
2079
2079
|
}
|
|
2080
|
-
if (n.flags =
|
|
2080
|
+
if (n.flags = I, (255 & n.flags) != 8) {
|
|
2081
2081
|
w.msg = "unknown compression method", n.mode = 30;
|
|
2082
2082
|
break;
|
|
2083
2083
|
}
|
|
@@ -2085,105 +2085,105 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2085
2085
|
w.msg = "unknown header flags set", n.mode = 30;
|
|
2086
2086
|
break;
|
|
2087
2087
|
}
|
|
2088
|
-
n.head && (n.head.text =
|
|
2088
|
+
n.head && (n.head.text = I >> 8 & 1), 512 & n.flags && (T[0] = 255 & I, T[1] = I >>> 8 & 255, n.check = i(n.check, T, 2, 0)), z = I = 0, n.mode = 3;
|
|
2089
2089
|
case 3:
|
|
2090
|
-
for (;
|
|
2091
|
-
if (
|
|
2090
|
+
for (; z < 32; ) {
|
|
2091
|
+
if (H === 0)
|
|
2092
2092
|
break t;
|
|
2093
|
-
|
|
2093
|
+
H--, I += E[W++] << z, z += 8;
|
|
2094
2094
|
}
|
|
2095
|
-
n.head && (n.head.time =
|
|
2095
|
+
n.head && (n.head.time = I), 512 & n.flags && (T[0] = 255 & I, T[1] = I >>> 8 & 255, T[2] = I >>> 16 & 255, T[3] = I >>> 24 & 255, n.check = i(n.check, T, 4, 0)), z = I = 0, n.mode = 4;
|
|
2096
2096
|
case 4:
|
|
2097
|
-
for (;
|
|
2098
|
-
if (
|
|
2097
|
+
for (; z < 16; ) {
|
|
2098
|
+
if (H === 0)
|
|
2099
2099
|
break t;
|
|
2100
|
-
|
|
2100
|
+
H--, I += E[W++] << z, z += 8;
|
|
2101
2101
|
}
|
|
2102
|
-
n.head && (n.head.xflags = 255 &
|
|
2102
|
+
n.head && (n.head.xflags = 255 & I, n.head.os = I >> 8), 512 & n.flags && (T[0] = 255 & I, T[1] = I >>> 8 & 255, n.check = i(n.check, T, 2, 0)), z = I = 0, n.mode = 5;
|
|
2103
2103
|
case 5:
|
|
2104
2104
|
if (1024 & n.flags) {
|
|
2105
|
-
for (;
|
|
2106
|
-
if (
|
|
2105
|
+
for (; z < 16; ) {
|
|
2106
|
+
if (H === 0)
|
|
2107
2107
|
break t;
|
|
2108
|
-
|
|
2108
|
+
H--, I += E[W++] << z, z += 8;
|
|
2109
2109
|
}
|
|
2110
|
-
n.length =
|
|
2110
|
+
n.length = I, n.head && (n.head.extra_len = I), 512 & n.flags && (T[0] = 255 & I, T[1] = I >>> 8 & 255, n.check = i(n.check, T, 2, 0)), z = I = 0;
|
|
2111
2111
|
} else
|
|
2112
2112
|
n.head && (n.head.extra = null);
|
|
2113
2113
|
n.mode = 6;
|
|
2114
2114
|
case 6:
|
|
2115
|
-
if (1024 & n.flags && (
|
|
2115
|
+
if (1024 & n.flags && (H < (j = n.length) && (j = H), j && (n.head && (e = n.head.extra_len - n.length, n.head.extra || (n.head.extra = new Array(n.head.extra_len)), o.arraySet(n.head.extra, E, W, j, e)), 512 & n.flags && (n.check = i(n.check, E, j, W)), H -= j, W += j, n.length -= j), n.length))
|
|
2116
2116
|
break t;
|
|
2117
2117
|
n.length = 0, n.mode = 7;
|
|
2118
2118
|
case 7:
|
|
2119
2119
|
if (2048 & n.flags) {
|
|
2120
|
-
if (
|
|
2120
|
+
if (H === 0)
|
|
2121
2121
|
break t;
|
|
2122
|
-
for (
|
|
2122
|
+
for (j = 0; e = E[W + j++], n.head && e && n.length < 65536 && (n.head.name += String.fromCharCode(e)), e && j < H; )
|
|
2123
2123
|
;
|
|
2124
|
-
if (512 & n.flags && (n.check = i(n.check, E,
|
|
2124
|
+
if (512 & n.flags && (n.check = i(n.check, E, j, W)), H -= j, W += j, e)
|
|
2125
2125
|
break t;
|
|
2126
2126
|
} else
|
|
2127
2127
|
n.head && (n.head.name = null);
|
|
2128
2128
|
n.length = 0, n.mode = 8;
|
|
2129
2129
|
case 8:
|
|
2130
2130
|
if (4096 & n.flags) {
|
|
2131
|
-
if (
|
|
2131
|
+
if (H === 0)
|
|
2132
2132
|
break t;
|
|
2133
|
-
for (
|
|
2133
|
+
for (j = 0; e = E[W + j++], n.head && e && n.length < 65536 && (n.head.comment += String.fromCharCode(e)), e && j < H; )
|
|
2134
2134
|
;
|
|
2135
|
-
if (512 & n.flags && (n.check = i(n.check, E,
|
|
2135
|
+
if (512 & n.flags && (n.check = i(n.check, E, j, W)), H -= j, W += j, e)
|
|
2136
2136
|
break t;
|
|
2137
2137
|
} else
|
|
2138
2138
|
n.head && (n.head.comment = null);
|
|
2139
2139
|
n.mode = 9;
|
|
2140
2140
|
case 9:
|
|
2141
2141
|
if (512 & n.flags) {
|
|
2142
|
-
for (;
|
|
2143
|
-
if (
|
|
2142
|
+
for (; z < 16; ) {
|
|
2143
|
+
if (H === 0)
|
|
2144
2144
|
break t;
|
|
2145
|
-
|
|
2145
|
+
H--, I += E[W++] << z, z += 8;
|
|
2146
2146
|
}
|
|
2147
|
-
if (
|
|
2147
|
+
if (I !== (65535 & n.check)) {
|
|
2148
2148
|
w.msg = "header crc mismatch", n.mode = 30;
|
|
2149
2149
|
break;
|
|
2150
2150
|
}
|
|
2151
|
-
|
|
2151
|
+
z = I = 0;
|
|
2152
2152
|
}
|
|
2153
2153
|
n.head && (n.head.hcrc = n.flags >> 9 & 1, n.head.done = !0), w.adler = n.check = 0, n.mode = 12;
|
|
2154
2154
|
break;
|
|
2155
2155
|
case 10:
|
|
2156
|
-
for (;
|
|
2157
|
-
if (
|
|
2156
|
+
for (; z < 32; ) {
|
|
2157
|
+
if (H === 0)
|
|
2158
2158
|
break t;
|
|
2159
|
-
|
|
2159
|
+
H--, I += E[W++] << z, z += 8;
|
|
2160
2160
|
}
|
|
2161
|
-
w.adler = n.check = c(
|
|
2161
|
+
w.adler = n.check = c(I), z = I = 0, n.mode = 11;
|
|
2162
2162
|
case 11:
|
|
2163
2163
|
if (n.havedict === 0)
|
|
2164
|
-
return w.next_out = it, w.avail_out = V, w.next_in =
|
|
2164
|
+
return w.next_out = it, w.avail_out = V, w.next_in = W, w.avail_in = H, n.hold = I, n.bits = z, 2;
|
|
2165
2165
|
w.adler = n.check = 1, n.mode = 12;
|
|
2166
2166
|
case 12:
|
|
2167
2167
|
if (B === 5 || B === 6)
|
|
2168
2168
|
break t;
|
|
2169
2169
|
case 13:
|
|
2170
2170
|
if (n.last) {
|
|
2171
|
-
|
|
2171
|
+
I >>>= 7 & z, z -= 7 & z, n.mode = 27;
|
|
2172
2172
|
break;
|
|
2173
2173
|
}
|
|
2174
|
-
for (;
|
|
2175
|
-
if (
|
|
2174
|
+
for (; z < 3; ) {
|
|
2175
|
+
if (H === 0)
|
|
2176
2176
|
break t;
|
|
2177
|
-
|
|
2177
|
+
H--, I += E[W++] << z, z += 8;
|
|
2178
2178
|
}
|
|
2179
|
-
switch (n.last = 1 &
|
|
2179
|
+
switch (n.last = 1 & I, z -= 1, 3 & (I >>>= 1)) {
|
|
2180
2180
|
case 0:
|
|
2181
2181
|
n.mode = 14;
|
|
2182
2182
|
break;
|
|
2183
2183
|
case 1:
|
|
2184
2184
|
if (U(n), n.mode = 20, B !== 6)
|
|
2185
2185
|
break;
|
|
2186
|
-
|
|
2186
|
+
I >>>= 2, z -= 2;
|
|
2187
2187
|
break t;
|
|
2188
2188
|
case 2:
|
|
2189
2189
|
n.mode = 17;
|
|
@@ -2191,99 +2191,99 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2191
2191
|
case 3:
|
|
2192
2192
|
w.msg = "invalid block type", n.mode = 30;
|
|
2193
2193
|
}
|
|
2194
|
-
|
|
2194
|
+
I >>>= 2, z -= 2;
|
|
2195
2195
|
break;
|
|
2196
2196
|
case 14:
|
|
2197
|
-
for (
|
|
2198
|
-
if (
|
|
2197
|
+
for (I >>>= 7 & z, z -= 7 & z; z < 32; ) {
|
|
2198
|
+
if (H === 0)
|
|
2199
2199
|
break t;
|
|
2200
|
-
|
|
2200
|
+
H--, I += E[W++] << z, z += 8;
|
|
2201
2201
|
}
|
|
2202
|
-
if ((65535 &
|
|
2202
|
+
if ((65535 & I) != (I >>> 16 ^ 65535)) {
|
|
2203
2203
|
w.msg = "invalid stored block lengths", n.mode = 30;
|
|
2204
2204
|
break;
|
|
2205
2205
|
}
|
|
2206
|
-
if (n.length = 65535 &
|
|
2206
|
+
if (n.length = 65535 & I, z = I = 0, n.mode = 15, B === 6)
|
|
2207
2207
|
break t;
|
|
2208
2208
|
case 15:
|
|
2209
2209
|
n.mode = 16;
|
|
2210
2210
|
case 16:
|
|
2211
|
-
if (
|
|
2212
|
-
if (
|
|
2211
|
+
if (j = n.length) {
|
|
2212
|
+
if (H < j && (j = H), V < j && (j = V), j === 0)
|
|
2213
2213
|
break t;
|
|
2214
|
-
o.arraySet(Y, E,
|
|
2214
|
+
o.arraySet(Y, E, W, j, it), H -= j, W += j, V -= j, it += j, n.length -= j;
|
|
2215
2215
|
break;
|
|
2216
2216
|
}
|
|
2217
2217
|
n.mode = 12;
|
|
2218
2218
|
break;
|
|
2219
2219
|
case 17:
|
|
2220
|
-
for (;
|
|
2221
|
-
if (
|
|
2220
|
+
for (; z < 14; ) {
|
|
2221
|
+
if (H === 0)
|
|
2222
2222
|
break t;
|
|
2223
|
-
|
|
2223
|
+
H--, I += E[W++] << z, z += 8;
|
|
2224
2224
|
}
|
|
2225
|
-
if (n.nlen = 257 + (31 &
|
|
2225
|
+
if (n.nlen = 257 + (31 & I), I >>>= 5, z -= 5, n.ndist = 1 + (31 & I), I >>>= 5, z -= 5, n.ncode = 4 + (15 & I), I >>>= 4, z -= 4, 286 < n.nlen || 30 < n.ndist) {
|
|
2226
2226
|
w.msg = "too many length or distance symbols", n.mode = 30;
|
|
2227
2227
|
break;
|
|
2228
2228
|
}
|
|
2229
2229
|
n.have = 0, n.mode = 18;
|
|
2230
2230
|
case 18:
|
|
2231
2231
|
for (; n.have < n.ncode; ) {
|
|
2232
|
-
for (;
|
|
2233
|
-
if (
|
|
2232
|
+
for (; z < 3; ) {
|
|
2233
|
+
if (H === 0)
|
|
2234
2234
|
break t;
|
|
2235
|
-
|
|
2235
|
+
H--, I += E[W++] << z, z += 8;
|
|
2236
2236
|
}
|
|
2237
|
-
n.lens[q[n.have++]] = 7 &
|
|
2237
|
+
n.lens[q[n.have++]] = 7 & I, I >>>= 3, z -= 3;
|
|
2238
2238
|
}
|
|
2239
2239
|
for (; n.have < 19; )
|
|
2240
2240
|
n.lens[q[n.have++]] = 0;
|
|
2241
|
-
if (n.lencode = n.lendyn, n.lenbits = 7, M = { bits: n.lenbits },
|
|
2241
|
+
if (n.lencode = n.lendyn, n.lenbits = 7, M = { bits: n.lenbits }, $ = g(0, n.lens, 0, 19, n.lencode, 0, n.work, M), n.lenbits = M.bits, $) {
|
|
2242
2242
|
w.msg = "invalid code lengths set", n.mode = 30;
|
|
2243
2243
|
break;
|
|
2244
2244
|
}
|
|
2245
2245
|
n.have = 0, n.mode = 19;
|
|
2246
2246
|
case 19:
|
|
2247
2247
|
for (; n.have < n.nlen + n.ndist; ) {
|
|
2248
|
-
for (; dt = (p = n.lencode[
|
|
2249
|
-
if (
|
|
2248
|
+
for (; dt = (p = n.lencode[I & (1 << n.lenbits) - 1]) >>> 16 & 255, pt = 65535 & p, !((ct = p >>> 24) <= z); ) {
|
|
2249
|
+
if (H === 0)
|
|
2250
2250
|
break t;
|
|
2251
|
-
|
|
2251
|
+
H--, I += E[W++] << z, z += 8;
|
|
2252
2252
|
}
|
|
2253
2253
|
if (pt < 16)
|
|
2254
|
-
|
|
2254
|
+
I >>>= ct, z -= ct, n.lens[n.have++] = pt;
|
|
2255
2255
|
else {
|
|
2256
2256
|
if (pt === 16) {
|
|
2257
|
-
for (y = ct + 2;
|
|
2258
|
-
if (
|
|
2257
|
+
for (y = ct + 2; z < y; ) {
|
|
2258
|
+
if (H === 0)
|
|
2259
2259
|
break t;
|
|
2260
|
-
|
|
2260
|
+
H--, I += E[W++] << z, z += 8;
|
|
2261
2261
|
}
|
|
2262
|
-
if (
|
|
2262
|
+
if (I >>>= ct, z -= ct, n.have === 0) {
|
|
2263
2263
|
w.msg = "invalid bit length repeat", n.mode = 30;
|
|
2264
2264
|
break;
|
|
2265
2265
|
}
|
|
2266
|
-
e = n.lens[n.have - 1],
|
|
2266
|
+
e = n.lens[n.have - 1], j = 3 + (3 & I), I >>>= 2, z -= 2;
|
|
2267
2267
|
} else if (pt === 17) {
|
|
2268
|
-
for (y = ct + 3;
|
|
2269
|
-
if (
|
|
2268
|
+
for (y = ct + 3; z < y; ) {
|
|
2269
|
+
if (H === 0)
|
|
2270
2270
|
break t;
|
|
2271
|
-
|
|
2271
|
+
H--, I += E[W++] << z, z += 8;
|
|
2272
2272
|
}
|
|
2273
|
-
|
|
2273
|
+
z -= ct, e = 0, j = 3 + (7 & (I >>>= ct)), I >>>= 3, z -= 3;
|
|
2274
2274
|
} else {
|
|
2275
|
-
for (y = ct + 7;
|
|
2276
|
-
if (
|
|
2275
|
+
for (y = ct + 7; z < y; ) {
|
|
2276
|
+
if (H === 0)
|
|
2277
2277
|
break t;
|
|
2278
|
-
|
|
2278
|
+
H--, I += E[W++] << z, z += 8;
|
|
2279
2279
|
}
|
|
2280
|
-
|
|
2280
|
+
z -= ct, e = 0, j = 11 + (127 & (I >>>= ct)), I >>>= 7, z -= 7;
|
|
2281
2281
|
}
|
|
2282
|
-
if (n.have +
|
|
2282
|
+
if (n.have + j > n.nlen + n.ndist) {
|
|
2283
2283
|
w.msg = "invalid bit length repeat", n.mode = 30;
|
|
2284
2284
|
break;
|
|
2285
2285
|
}
|
|
2286
|
-
for (;
|
|
2286
|
+
for (; j--; )
|
|
2287
2287
|
n.lens[n.have++] = e;
|
|
2288
2288
|
}
|
|
2289
2289
|
}
|
|
@@ -2293,11 +2293,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2293
2293
|
w.msg = "invalid code -- missing end-of-block", n.mode = 30;
|
|
2294
2294
|
break;
|
|
2295
2295
|
}
|
|
2296
|
-
if (n.lenbits = 9, M = { bits: n.lenbits },
|
|
2296
|
+
if (n.lenbits = 9, M = { bits: n.lenbits }, $ = g(_, n.lens, 0, n.nlen, n.lencode, 0, n.work, M), n.lenbits = M.bits, $) {
|
|
2297
2297
|
w.msg = "invalid literal/lengths set", n.mode = 30;
|
|
2298
2298
|
break;
|
|
2299
2299
|
}
|
|
2300
|
-
if (n.distbits = 6, n.distcode = n.distdyn, M = { bits: n.distbits },
|
|
2300
|
+
if (n.distbits = 6, n.distcode = n.distdyn, M = { bits: n.distbits }, $ = g(m, n.lens, n.nlen, n.ndist, n.distcode, 0, n.work, M), n.distbits = M.bits, $) {
|
|
2301
2301
|
w.msg = "invalid distances set", n.mode = 30;
|
|
2302
2302
|
break;
|
|
2303
2303
|
}
|
|
@@ -2306,24 +2306,24 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2306
2306
|
case 20:
|
|
2307
2307
|
n.mode = 21;
|
|
2308
2308
|
case 21:
|
|
2309
|
-
if (6 <=
|
|
2310
|
-
w.next_out = it, w.avail_out = V, w.next_in =
|
|
2309
|
+
if (6 <= H && 258 <= V) {
|
|
2310
|
+
w.next_out = it, w.avail_out = V, w.next_in = W, w.avail_in = H, n.hold = I, n.bits = z, d(w, Q), it = w.next_out, Y = w.output, V = w.avail_out, W = w.next_in, E = w.input, H = w.avail_in, I = n.hold, z = n.bits, n.mode === 12 && (n.back = -1);
|
|
2311
2311
|
break;
|
|
2312
2312
|
}
|
|
2313
|
-
for (n.back = 0; dt = (p = n.lencode[
|
|
2314
|
-
if (
|
|
2313
|
+
for (n.back = 0; dt = (p = n.lencode[I & (1 << n.lenbits) - 1]) >>> 16 & 255, pt = 65535 & p, !((ct = p >>> 24) <= z); ) {
|
|
2314
|
+
if (H === 0)
|
|
2315
2315
|
break t;
|
|
2316
|
-
|
|
2316
|
+
H--, I += E[W++] << z, z += 8;
|
|
2317
2317
|
}
|
|
2318
2318
|
if (dt && !(240 & dt)) {
|
|
2319
|
-
for (gt = ct, xt = dt, Ct = pt; dt = (p = n.lencode[Ct + ((
|
|
2320
|
-
if (
|
|
2319
|
+
for (gt = ct, xt = dt, Ct = pt; dt = (p = n.lencode[Ct + ((I & (1 << gt + xt) - 1) >> gt)]) >>> 16 & 255, pt = 65535 & p, !(gt + (ct = p >>> 24) <= z); ) {
|
|
2320
|
+
if (H === 0)
|
|
2321
2321
|
break t;
|
|
2322
|
-
|
|
2322
|
+
H--, I += E[W++] << z, z += 8;
|
|
2323
2323
|
}
|
|
2324
|
-
|
|
2324
|
+
I >>>= gt, z -= gt, n.back += gt;
|
|
2325
2325
|
}
|
|
2326
|
-
if (
|
|
2326
|
+
if (I >>>= ct, z -= ct, n.back += ct, n.length = pt, dt === 0) {
|
|
2327
2327
|
n.mode = 26;
|
|
2328
2328
|
break;
|
|
2329
2329
|
}
|
|
@@ -2338,41 +2338,41 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2338
2338
|
n.extra = 15 & dt, n.mode = 22;
|
|
2339
2339
|
case 22:
|
|
2340
2340
|
if (n.extra) {
|
|
2341
|
-
for (y = n.extra;
|
|
2342
|
-
if (
|
|
2341
|
+
for (y = n.extra; z < y; ) {
|
|
2342
|
+
if (H === 0)
|
|
2343
2343
|
break t;
|
|
2344
|
-
|
|
2344
|
+
H--, I += E[W++] << z, z += 8;
|
|
2345
2345
|
}
|
|
2346
|
-
n.length +=
|
|
2346
|
+
n.length += I & (1 << n.extra) - 1, I >>>= n.extra, z -= n.extra, n.back += n.extra;
|
|
2347
2347
|
}
|
|
2348
2348
|
n.was = n.length, n.mode = 23;
|
|
2349
2349
|
case 23:
|
|
2350
|
-
for (; dt = (p = n.distcode[
|
|
2351
|
-
if (
|
|
2350
|
+
for (; dt = (p = n.distcode[I & (1 << n.distbits) - 1]) >>> 16 & 255, pt = 65535 & p, !((ct = p >>> 24) <= z); ) {
|
|
2351
|
+
if (H === 0)
|
|
2352
2352
|
break t;
|
|
2353
|
-
|
|
2353
|
+
H--, I += E[W++] << z, z += 8;
|
|
2354
2354
|
}
|
|
2355
2355
|
if (!(240 & dt)) {
|
|
2356
|
-
for (gt = ct, xt = dt, Ct = pt; dt = (p = n.distcode[Ct + ((
|
|
2357
|
-
if (
|
|
2356
|
+
for (gt = ct, xt = dt, Ct = pt; dt = (p = n.distcode[Ct + ((I & (1 << gt + xt) - 1) >> gt)]) >>> 16 & 255, pt = 65535 & p, !(gt + (ct = p >>> 24) <= z); ) {
|
|
2357
|
+
if (H === 0)
|
|
2358
2358
|
break t;
|
|
2359
|
-
|
|
2359
|
+
H--, I += E[W++] << z, z += 8;
|
|
2360
2360
|
}
|
|
2361
|
-
|
|
2361
|
+
I >>>= gt, z -= gt, n.back += gt;
|
|
2362
2362
|
}
|
|
2363
|
-
if (
|
|
2363
|
+
if (I >>>= ct, z -= ct, n.back += ct, 64 & dt) {
|
|
2364
2364
|
w.msg = "invalid distance code", n.mode = 30;
|
|
2365
2365
|
break;
|
|
2366
2366
|
}
|
|
2367
2367
|
n.offset = pt, n.extra = 15 & dt, n.mode = 24;
|
|
2368
2368
|
case 24:
|
|
2369
2369
|
if (n.extra) {
|
|
2370
|
-
for (y = n.extra;
|
|
2371
|
-
if (
|
|
2370
|
+
for (y = n.extra; z < y; ) {
|
|
2371
|
+
if (H === 0)
|
|
2372
2372
|
break t;
|
|
2373
|
-
|
|
2373
|
+
H--, I += E[W++] << z, z += 8;
|
|
2374
2374
|
}
|
|
2375
|
-
n.offset +=
|
|
2375
|
+
n.offset += I & (1 << n.extra) - 1, I >>>= n.extra, z -= n.extra, n.back += n.extra;
|
|
2376
2376
|
}
|
|
2377
2377
|
if (n.offset > n.dmax) {
|
|
2378
2378
|
w.msg = "invalid distance too far back", n.mode = 30;
|
|
@@ -2382,15 +2382,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2382
2382
|
case 25:
|
|
2383
2383
|
if (V === 0)
|
|
2384
2384
|
break t;
|
|
2385
|
-
if (
|
|
2386
|
-
if ((
|
|
2385
|
+
if (j = Q - V, n.offset > j) {
|
|
2386
|
+
if ((j = n.offset - j) > n.whave && n.sane) {
|
|
2387
2387
|
w.msg = "invalid distance too far back", n.mode = 30;
|
|
2388
2388
|
break;
|
|
2389
2389
|
}
|
|
2390
|
-
lt =
|
|
2390
|
+
lt = j > n.wnext ? (j -= n.wnext, n.wsize - j) : n.wnext - j, j > n.length && (j = n.length), ht = n.window;
|
|
2391
2391
|
} else
|
|
2392
|
-
ht = Y, lt = it - n.offset,
|
|
2393
|
-
for (V <
|
|
2392
|
+
ht = Y, lt = it - n.offset, j = n.length;
|
|
2393
|
+
for (V < j && (j = V), V -= j, n.length -= j; Y[it++] = ht[lt++], --j; )
|
|
2394
2394
|
;
|
|
2395
2395
|
n.length === 0 && (n.mode = 21);
|
|
2396
2396
|
break;
|
|
@@ -2401,37 +2401,37 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2401
2401
|
break;
|
|
2402
2402
|
case 27:
|
|
2403
2403
|
if (n.wrap) {
|
|
2404
|
-
for (;
|
|
2405
|
-
if (
|
|
2404
|
+
for (; z < 32; ) {
|
|
2405
|
+
if (H === 0)
|
|
2406
2406
|
break t;
|
|
2407
|
-
|
|
2407
|
+
H--, I |= E[W++] << z, z += 8;
|
|
2408
2408
|
}
|
|
2409
|
-
if (Q -= V, w.total_out += Q, n.total += Q, Q && (w.adler = n.check = n.flags ? i(n.check, Y, Q, it - Q) : l(n.check, Y, Q, it - Q)), Q = V, (n.flags ?
|
|
2409
|
+
if (Q -= V, w.total_out += Q, n.total += Q, Q && (w.adler = n.check = n.flags ? i(n.check, Y, Q, it - Q) : l(n.check, Y, Q, it - Q)), Q = V, (n.flags ? I : c(I)) !== n.check) {
|
|
2410
2410
|
w.msg = "incorrect data check", n.mode = 30;
|
|
2411
2411
|
break;
|
|
2412
2412
|
}
|
|
2413
|
-
|
|
2413
|
+
z = I = 0;
|
|
2414
2414
|
}
|
|
2415
2415
|
n.mode = 28;
|
|
2416
2416
|
case 28:
|
|
2417
2417
|
if (n.wrap && n.flags) {
|
|
2418
|
-
for (;
|
|
2419
|
-
if (
|
|
2418
|
+
for (; z < 32; ) {
|
|
2419
|
+
if (H === 0)
|
|
2420
2420
|
break t;
|
|
2421
|
-
|
|
2421
|
+
H--, I += E[W++] << z, z += 8;
|
|
2422
2422
|
}
|
|
2423
|
-
if (
|
|
2423
|
+
if (I !== (4294967295 & n.total)) {
|
|
2424
2424
|
w.msg = "incorrect length check", n.mode = 30;
|
|
2425
2425
|
break;
|
|
2426
2426
|
}
|
|
2427
|
-
|
|
2427
|
+
z = I = 0;
|
|
2428
2428
|
}
|
|
2429
2429
|
n.mode = 29;
|
|
2430
2430
|
case 29:
|
|
2431
|
-
|
|
2431
|
+
$ = 1;
|
|
2432
2432
|
break t;
|
|
2433
2433
|
case 30:
|
|
2434
|
-
|
|
2434
|
+
$ = -3;
|
|
2435
2435
|
break t;
|
|
2436
2436
|
case 31:
|
|
2437
2437
|
return -4;
|
|
@@ -2439,7 +2439,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2439
2439
|
default:
|
|
2440
2440
|
return a;
|
|
2441
2441
|
}
|
|
2442
|
-
return w.next_out = it, w.avail_out = V, w.next_in =
|
|
2442
|
+
return w.next_out = it, w.avail_out = V, w.next_in = W, w.avail_in = H, n.hold = I, n.bits = z, (n.wsize || Q !== w.avail_out && n.mode < 30 && (n.mode < 27 || B !== 4)) && st(w, w.output, w.next_out, Q - w.avail_out) ? (n.mode = 31, -4) : (nt -= w.avail_in, Q -= w.avail_out, w.total_in += nt, w.total_out += Q, n.total += Q, n.wrap && Q && (w.adler = n.check = n.flags ? i(n.check, Y, Q, w.next_out - Q) : l(n.check, Y, Q, w.next_out - Q)), w.data_type = n.bits + (n.last ? 64 : 0) + (n.mode === 12 ? 128 : 0) + (n.mode === 20 || n.mode === 15 ? 256 : 0), (nt == 0 && Q === 0 || B === 4) && $ === v && ($ = -5), $);
|
|
2443
2443
|
}, u.inflateEnd = function(w) {
|
|
2444
2444
|
if (!w || !w.state)
|
|
2445
2445
|
return a;
|
|
@@ -2455,7 +2455,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2455
2455
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(s, k, u) {
|
|
2456
2456
|
var o = s("../utils/common"), l = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], i = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], d = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], g = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
|
|
2457
2457
|
k.exports = function(_, m, v, a, h, r, f, c) {
|
|
2458
|
-
var b, C, A, N, x, R, F, O, U, st = c.bits, w = 0, B = 0, n = 0, E = 0, Y = 0,
|
|
2458
|
+
var b, C, A, N, x, R, F, O, U, st = c.bits, w = 0, B = 0, n = 0, E = 0, Y = 0, W = 0, it = 0, H = 0, V = 0, I = 0, z = null, nt = 0, Q = new o.Buf16(16), j = new o.Buf16(16), lt = null, ht = 0;
|
|
2459
2459
|
for (w = 0; w <= 15; w++)
|
|
2460
2460
|
Q[w] = 0;
|
|
2461
2461
|
for (B = 0; B < a; B++)
|
|
@@ -2466,36 +2466,36 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2466
2466
|
return h[r++] = 20971520, h[r++] = 20971520, c.bits = 1, 0;
|
|
2467
2467
|
for (n = 1; n < E && Q[n] === 0; n++)
|
|
2468
2468
|
;
|
|
2469
|
-
for (Y < n && (Y = n), w =
|
|
2470
|
-
if (
|
|
2469
|
+
for (Y < n && (Y = n), w = H = 1; w <= 15; w++)
|
|
2470
|
+
if (H <<= 1, (H -= Q[w]) < 0)
|
|
2471
2471
|
return -1;
|
|
2472
|
-
if (0 <
|
|
2472
|
+
if (0 < H && (_ === 0 || E !== 1))
|
|
2473
2473
|
return -1;
|
|
2474
|
-
for (
|
|
2475
|
-
|
|
2474
|
+
for (j[1] = 0, w = 1; w < 15; w++)
|
|
2475
|
+
j[w + 1] = j[w] + Q[w];
|
|
2476
2476
|
for (B = 0; B < a; B++)
|
|
2477
|
-
m[v + B] !== 0 && (f[
|
|
2478
|
-
if (R = _ === 0 ? (
|
|
2477
|
+
m[v + B] !== 0 && (f[j[m[v + B]]++] = B);
|
|
2478
|
+
if (R = _ === 0 ? (z = lt = f, 19) : _ === 1 ? (z = l, nt -= 257, lt = i, ht -= 257, 256) : (z = d, lt = g, -1), w = n, x = r, it = B = I = 0, A = -1, N = (V = 1 << (W = Y)) - 1, _ === 1 && 852 < V || _ === 2 && 592 < V)
|
|
2479
2479
|
return 1;
|
|
2480
2480
|
for (; ; ) {
|
|
2481
|
-
for (F = w - it, U = f[B] < R ? (O = 0, f[B]) : f[B] > R ? (O = lt[ht + f[B]],
|
|
2481
|
+
for (F = w - it, U = f[B] < R ? (O = 0, f[B]) : f[B] > R ? (O = lt[ht + f[B]], z[nt + f[B]]) : (O = 96, 0), b = 1 << w - it, n = C = 1 << W; h[x + (I >> it) + (C -= b)] = F << 24 | O << 16 | U | 0, C !== 0; )
|
|
2482
2482
|
;
|
|
2483
|
-
for (b = 1 << w - 1;
|
|
2483
|
+
for (b = 1 << w - 1; I & b; )
|
|
2484
2484
|
b >>= 1;
|
|
2485
|
-
if (b !== 0 ? (
|
|
2485
|
+
if (b !== 0 ? (I &= b - 1, I += b) : I = 0, B++, --Q[w] == 0) {
|
|
2486
2486
|
if (w === E)
|
|
2487
2487
|
break;
|
|
2488
2488
|
w = m[v + f[B]];
|
|
2489
2489
|
}
|
|
2490
|
-
if (Y < w && (
|
|
2491
|
-
for (it === 0 && (it = Y), x += n,
|
|
2492
|
-
|
|
2493
|
-
if (V += 1 <<
|
|
2490
|
+
if (Y < w && (I & N) !== A) {
|
|
2491
|
+
for (it === 0 && (it = Y), x += n, H = 1 << (W = w - it); W + it < E && !((H -= Q[W + it]) <= 0); )
|
|
2492
|
+
W++, H <<= 1;
|
|
2493
|
+
if (V += 1 << W, _ === 1 && 852 < V || _ === 2 && 592 < V)
|
|
2494
2494
|
return 1;
|
|
2495
|
-
h[A =
|
|
2495
|
+
h[A = I & N] = Y << 24 | W << 16 | x - r | 0;
|
|
2496
2496
|
}
|
|
2497
2497
|
}
|
|
2498
|
-
return
|
|
2498
|
+
return I !== 0 && (h[x + I] = w - it << 24 | 64 << 16 | 0), c.bits = Y, 0;
|
|
2499
2499
|
};
|
|
2500
2500
|
}, { "../utils/common": 41 }], 51: [function(s, k, u) {
|
|
2501
2501
|
k.exports = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" };
|
|
@@ -2515,14 +2515,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2515
2515
|
d(n);
|
|
2516
2516
|
var E = new Array(_);
|
|
2517
2517
|
d(E);
|
|
2518
|
-
var Y,
|
|
2518
|
+
var Y, W, it, H = new Array(a);
|
|
2519
2519
|
function V(p, T, q, G, P) {
|
|
2520
2520
|
this.static_tree = p, this.extra_bits = T, this.extra_base = q, this.elems = G, this.max_length = P, this.has_stree = p && p.length;
|
|
2521
2521
|
}
|
|
2522
|
-
function
|
|
2522
|
+
function I(p, T) {
|
|
2523
2523
|
this.dyn_tree = p, this.max_code = 0, this.stat_desc = T;
|
|
2524
2524
|
}
|
|
2525
|
-
function
|
|
2525
|
+
function z(p) {
|
|
2526
2526
|
return p < 256 ? B[p] : B[256 + (p >>> 7)];
|
|
2527
2527
|
}
|
|
2528
2528
|
function nt(p, T) {
|
|
@@ -2531,7 +2531,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2531
2531
|
function Q(p, T, q) {
|
|
2532
2532
|
p.bi_valid > c - q ? (p.bi_buf |= T << p.bi_valid & 65535, nt(p, p.bi_buf), p.bi_buf = T >> c - p.bi_valid, p.bi_valid += q - c) : (p.bi_buf |= T << p.bi_valid & 65535, p.bi_valid += q);
|
|
2533
2533
|
}
|
|
2534
|
-
function
|
|
2534
|
+
function j(p, T, q) {
|
|
2535
2535
|
Q(p, q[2 * T], q[2 * T + 1]);
|
|
2536
2536
|
}
|
|
2537
2537
|
function lt(p, T) {
|
|
@@ -2573,9 +2573,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2573
2573
|
function xt(p, T, q) {
|
|
2574
2574
|
var G, P, X, ot, tt = 0;
|
|
2575
2575
|
if (p.last_lit !== 0)
|
|
2576
|
-
for (; G = p.pending_buf[p.d_buf + 2 * tt] << 8 | p.pending_buf[p.d_buf + 2 * tt + 1], P = p.pending_buf[p.l_buf + tt], tt++, G === 0 ?
|
|
2576
|
+
for (; G = p.pending_buf[p.d_buf + 2 * tt] << 8 | p.pending_buf[p.d_buf + 2 * tt + 1], P = p.pending_buf[p.l_buf + tt], tt++, G === 0 ? j(p, P, T) : (j(p, (X = n[P]) + m + 1, T), (ot = R[X]) !== 0 && Q(p, P -= E[X], ot), j(p, X = z(--G), q), (ot = F[X]) !== 0 && Q(p, G -= H[X], ot)), tt < p.last_lit; )
|
|
2577
2577
|
;
|
|
2578
|
-
|
|
2578
|
+
j(p, C, T);
|
|
2579
2579
|
}
|
|
2580
2580
|
function Ct(p, T) {
|
|
2581
2581
|
var q, G, P, X = T.dyn_tree, ot = T.stat_desc.static_tree, tt = T.stat_desc.has_stree, ut = T.stat_desc.elems, St = -1;
|
|
@@ -2587,8 +2587,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2587
2587
|
gt(p, X, q);
|
|
2588
2588
|
for (P = ut; q = p.heap[1], p.heap[1] = p.heap[p.heap_len--], gt(p, X, 1), G = p.heap[1], p.heap[--p.heap_max] = q, p.heap[--p.heap_max] = G, X[2 * P] = X[2 * q] + X[2 * G], p.depth[P] = (p.depth[q] >= p.depth[G] ? p.depth[q] : p.depth[G]) + 1, X[2 * q + 1] = X[2 * G + 1] = P, p.heap[1] = P++, gt(p, X, 1), 2 <= p.heap_len; )
|
|
2589
2589
|
;
|
|
2590
|
-
p.heap[--p.heap_max] = p.heap[1], function(mt,
|
|
2591
|
-
var Bt, Et, Ot, D, Z, et, L =
|
|
2590
|
+
p.heap[--p.heap_max] = p.heap[1], function(mt, It) {
|
|
2591
|
+
var Bt, Et, Ot, D, Z, et, L = It.dyn_tree, K = It.max_code, rt = It.stat_desc.static_tree, at = It.stat_desc.has_stree, ft = It.stat_desc.extra_bits, vt = It.stat_desc.extra_base, bt = It.stat_desc.max_length, Tt = 0;
|
|
2592
2592
|
for (D = 0; D <= f; D++)
|
|
2593
2593
|
mt.bl_count[D] = 0;
|
|
2594
2594
|
for (L[2 * mt.heap[mt.heap_max] + 1] = 0, Bt = mt.heap_max + 1; Bt < r; Bt++)
|
|
@@ -2610,19 +2610,19 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2610
2610
|
for (ot === 0 && (ut = 138, St = 3), T[2 * (q + 1) + 1] = 65535, G = 0; G <= q; G++)
|
|
2611
2611
|
P = ot, ot = T[2 * (G + 1) + 1], ++tt < ut && P === ot || (tt < St ? p.bl_tree[2 * P] += tt : P !== 0 ? (P !== X && p.bl_tree[2 * P]++, p.bl_tree[2 * A]++) : tt <= 10 ? p.bl_tree[2 * N]++ : p.bl_tree[2 * x]++, X = P, St = (tt = 0) === ot ? (ut = 138, 3) : P === ot ? (ut = 6, 3) : (ut = 7, 4));
|
|
2612
2612
|
}
|
|
2613
|
-
function
|
|
2613
|
+
function $(p, T, q) {
|
|
2614
2614
|
var G, P, X = -1, ot = T[1], tt = 0, ut = 7, St = 4;
|
|
2615
2615
|
for (ot === 0 && (ut = 138, St = 3), G = 0; G <= q; G++)
|
|
2616
2616
|
if (P = ot, ot = T[2 * (G + 1) + 1], !(++tt < ut && P === ot)) {
|
|
2617
2617
|
if (tt < St)
|
|
2618
|
-
for (;
|
|
2618
|
+
for (; j(p, P, p.bl_tree), --tt != 0; )
|
|
2619
2619
|
;
|
|
2620
2620
|
else
|
|
2621
|
-
P !== 0 ? (P !== X && (
|
|
2621
|
+
P !== 0 ? (P !== X && (j(p, P, p.bl_tree), tt--), j(p, A, p.bl_tree), Q(p, tt - 3, 2)) : tt <= 10 ? (j(p, N, p.bl_tree), Q(p, tt - 3, 3)) : (j(p, x, p.bl_tree), Q(p, tt - 11, 7));
|
|
2622
2622
|
X = P, St = (tt = 0) === ot ? (ut = 138, 3) : P === ot ? (ut = 6, 3) : (ut = 7, 4);
|
|
2623
2623
|
}
|
|
2624
2624
|
}
|
|
2625
|
-
d(
|
|
2625
|
+
d(H);
|
|
2626
2626
|
var M = !1;
|
|
2627
2627
|
function y(p, T, q, G) {
|
|
2628
2628
|
Q(p, (g << 1) + (G ? 1 : 0), 3), function(P, X, ot, tt) {
|
|
@@ -2636,10 +2636,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2636
2636
|
for (E[P] = G, T = 0; T < 1 << R[P]; T++)
|
|
2637
2637
|
n[G++] = P;
|
|
2638
2638
|
for (n[G - 1] = P, P = X = 0; P < 16; P++)
|
|
2639
|
-
for (
|
|
2639
|
+
for (H[P] = X, T = 0; T < 1 << F[P]; T++)
|
|
2640
2640
|
B[X++] = P;
|
|
2641
2641
|
for (X >>= 7; P < a; P++)
|
|
2642
|
-
for (
|
|
2642
|
+
for (H[P] = X << 7, T = 0; T < 1 << F[P] - 7; T++)
|
|
2643
2643
|
B[256 + X++] = P;
|
|
2644
2644
|
for (q = 0; q <= f; q++)
|
|
2645
2645
|
ot[q] = 0;
|
|
@@ -2653,8 +2653,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2653
2653
|
st[2 * T + 1] = 8, T++, ot[8]++;
|
|
2654
2654
|
for (ht(st, v + 1, ot), T = 0; T < a; T++)
|
|
2655
2655
|
w[2 * T + 1] = 5, w[2 * T] = lt(T, 5);
|
|
2656
|
-
Y = new V(st, R, m + 1, v, f),
|
|
2657
|
-
}(), M = !0), p.l_desc = new
|
|
2656
|
+
Y = new V(st, R, m + 1, v, f), W = new V(w, F, 0, a, f), it = new V(new Array(0), O, 0, h, b);
|
|
2657
|
+
}(), M = !0), p.l_desc = new I(p.dyn_ltree, Y), p.d_desc = new I(p.dyn_dtree, W), p.bl_desc = new I(p.bl_tree, it), p.bi_buf = 0, p.bi_valid = 0, ct(p);
|
|
2658
2658
|
}, u._tr_stored_block = y, u._tr_flush_block = function(p, T, q, G) {
|
|
2659
2659
|
var P, X, ot = 0;
|
|
2660
2660
|
0 < p.level ? (p.strm.data_type === 2 && (p.strm.data_type = function(tt) {
|
|
@@ -2674,15 +2674,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2674
2674
|
;
|
|
2675
2675
|
return tt.opt_len += 3 * (ut + 1) + 5 + 5 + 4, ut;
|
|
2676
2676
|
}(p), P = p.opt_len + 3 + 7 >>> 3, (X = p.static_len + 3 + 7 >>> 3) <= P && (P = X)) : P = X = q + 5, q + 4 <= P && T !== -1 ? y(p, T, q, G) : p.strategy === 4 || X === P ? (Q(p, 2 + (G ? 1 : 0), 3), xt(p, st, w)) : (Q(p, 4 + (G ? 1 : 0), 3), function(tt, ut, St, mt) {
|
|
2677
|
-
var
|
|
2678
|
-
for (Q(tt, ut - 257, 5), Q(tt, St - 1, 5), Q(tt, mt - 4, 4),
|
|
2679
|
-
Q(tt, tt.bl_tree[2 * U[
|
|
2680
|
-
|
|
2677
|
+
var It;
|
|
2678
|
+
for (Q(tt, ut - 257, 5), Q(tt, St - 1, 5), Q(tt, mt - 4, 4), It = 0; It < mt; It++)
|
|
2679
|
+
Q(tt, tt.bl_tree[2 * U[It] + 1], 3);
|
|
2680
|
+
$(tt, tt.dyn_ltree, ut - 1), $(tt, tt.dyn_dtree, St - 1);
|
|
2681
2681
|
}(p, p.l_desc.max_code + 1, p.d_desc.max_code + 1, ot + 1), xt(p, p.dyn_ltree, p.dyn_dtree)), ct(p), G && dt(p);
|
|
2682
2682
|
}, u._tr_tally = function(p, T, q) {
|
|
2683
|
-
return p.pending_buf[p.d_buf + 2 * p.last_lit] = T >>> 8 & 255, p.pending_buf[p.d_buf + 2 * p.last_lit + 1] = 255 & T, p.pending_buf[p.l_buf + p.last_lit] = 255 & q, p.last_lit++, T === 0 ? p.dyn_ltree[2 * q]++ : (p.matches++, T--, p.dyn_ltree[2 * (n[q] + m + 1)]++, p.dyn_dtree[2 *
|
|
2683
|
+
return p.pending_buf[p.d_buf + 2 * p.last_lit] = T >>> 8 & 255, p.pending_buf[p.d_buf + 2 * p.last_lit + 1] = 255 & T, p.pending_buf[p.l_buf + p.last_lit] = 255 & q, p.last_lit++, T === 0 ? p.dyn_ltree[2 * q]++ : (p.matches++, T--, p.dyn_ltree[2 * (n[q] + m + 1)]++, p.dyn_dtree[2 * z(T)]++), p.last_lit === p.lit_bufsize - 1;
|
|
2684
2684
|
}, u._tr_align = function(p) {
|
|
2685
|
-
Q(p, 2, 3),
|
|
2685
|
+
Q(p, 2, 3), j(p, C, st), function(T) {
|
|
2686
2686
|
T.bi_valid === 16 ? (nt(T, T.bi_buf), T.bi_buf = 0, T.bi_valid = 0) : 8 <= T.bi_valid && (T.pending_buf[T.pending++] = 255 & T.bi_buf, T.bi_buf >>= 8, T.bi_valid -= 8);
|
|
2687
2687
|
}(p);
|
|
2688
2688
|
};
|
|
@@ -2770,8 +2770,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
2770
2770
|
}).call(this, typeof le < "u" ? le : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2771
2771
|
}, {}] }, {}, [10])(10);
|
|
2772
2772
|
});
|
|
2773
|
-
})(
|
|
2774
|
-
var on =
|
|
2773
|
+
})(We);
|
|
2774
|
+
var on = We.exports;
|
|
2775
2775
|
const sn = /* @__PURE__ */ rn(on);
|
|
2776
2776
|
function ye(S) {
|
|
2777
2777
|
return S ? S.trim().toLowerCase().replace(/\s+/g, " ") : "";
|
|
@@ -2823,10 +2823,10 @@ function un() {
|
|
|
2823
2823
|
try {
|
|
2824
2824
|
let E;
|
|
2825
2825
|
if (typeof n == "string") {
|
|
2826
|
-
const
|
|
2827
|
-
if (
|
|
2828
|
-
throw new Error(`HTTP error! status: ${
|
|
2829
|
-
E = await
|
|
2826
|
+
const W = await fetch(n);
|
|
2827
|
+
if (!W.ok)
|
|
2828
|
+
throw new Error(`HTTP error! status: ${W.status}`);
|
|
2829
|
+
E = await W.arrayBuffer();
|
|
2830
2830
|
} else
|
|
2831
2831
|
n instanceof File ? E = await n.arrayBuffer() : E = n;
|
|
2832
2832
|
if (!E || E.byteLength === 0)
|
|
@@ -2834,20 +2834,20 @@ function un() {
|
|
|
2834
2834
|
h.current = await sn.loadAsync(E), await (async () => {
|
|
2835
2835
|
if (!h.current)
|
|
2836
2836
|
throw new Error("Zip not loaded");
|
|
2837
|
-
const
|
|
2838
|
-
if (
|
|
2837
|
+
const W = h.current.file("META-INF/container.xml");
|
|
2838
|
+
if (!W)
|
|
2839
2839
|
throw new Error("META-INF/container.xml not found.");
|
|
2840
|
-
const it = await
|
|
2841
|
-
if (!
|
|
2840
|
+
const it = await W.async("text"), H = new DOMParser(), I = H.parseFromString(it, "application/xml").querySelector('rootfile[media-type="application/oebps-package+xml"]'), z = I == null ? void 0 : I.getAttribute("full-path");
|
|
2841
|
+
if (!z)
|
|
2842
2842
|
throw new Error("OPF file path not found.");
|
|
2843
|
-
v.current =
|
|
2844
|
-
const nt = h.current.file(
|
|
2843
|
+
v.current = z.substring(0, z.lastIndexOf("/") + 1);
|
|
2844
|
+
const nt = h.current.file(z);
|
|
2845
2845
|
if (!nt)
|
|
2846
|
-
throw new Error(`OPF file not found at path: ${
|
|
2847
|
-
const Q = await nt.async("text"),
|
|
2848
|
-
if (
|
|
2846
|
+
throw new Error(`OPF file not found at path: ${z}`);
|
|
2847
|
+
const Q = await nt.async("text"), j = H.parseFromString(Q, "application/xml");
|
|
2848
|
+
if (j.querySelector("parsererror"))
|
|
2849
2849
|
throw new Error("Error parsing OPF file.");
|
|
2850
|
-
C(
|
|
2850
|
+
C(j), i(await cn(j)), await c.current(j);
|
|
2851
2851
|
})();
|
|
2852
2852
|
} catch (E) {
|
|
2853
2853
|
console.error("Error processing EPUB source:", E), m(E instanceof Error ? E.message : "Unknown error"), k(!1);
|
|
@@ -2862,44 +2862,44 @@ function un() {
|
|
|
2862
2862
|
return;
|
|
2863
2863
|
const E = {}, Y = {};
|
|
2864
2864
|
n.querySelectorAll("manifest > item").forEach((V) => {
|
|
2865
|
-
const
|
|
2866
|
-
if (
|
|
2867
|
-
const
|
|
2868
|
-
E[
|
|
2869
|
-
href:
|
|
2865
|
+
const I = V.getAttribute("id"), z = V.getAttribute("href"), nt = V.getAttribute("media-type"), Q = V.getAttribute("properties");
|
|
2866
|
+
if (I && z && nt) {
|
|
2867
|
+
const j = decodeURIComponent(z);
|
|
2868
|
+
E[I] = {
|
|
2869
|
+
href: j,
|
|
2870
2870
|
type: nt,
|
|
2871
2871
|
properties: Q
|
|
2872
|
-
}, Y[
|
|
2872
|
+
}, Y[j] = I;
|
|
2873
2873
|
}
|
|
2874
2874
|
}), await N(n, E, Y);
|
|
2875
|
-
const
|
|
2875
|
+
const W = Array.from(n.querySelectorAll("spine > itemref")).map((V) => V.getAttribute("idref"));
|
|
2876
2876
|
let it = "";
|
|
2877
|
-
const
|
|
2878
|
-
for (const V of
|
|
2877
|
+
const H = /* @__PURE__ */ new Set();
|
|
2878
|
+
for (const V of W) {
|
|
2879
2879
|
if (!V)
|
|
2880
2880
|
continue;
|
|
2881
|
-
const
|
|
2882
|
-
if (
|
|
2881
|
+
const I = E[V];
|
|
2882
|
+
if (I && (I.type.includes("html") || I.type.includes("xml")))
|
|
2883
2883
|
try {
|
|
2884
|
-
const
|
|
2884
|
+
const z = v.current + I.href, nt = h.current.file(z);
|
|
2885
2885
|
if (nt) {
|
|
2886
|
-
const Q = await nt.async("text"),
|
|
2887
|
-
it += `<div class="bok-chapter" id="${V}">${
|
|
2886
|
+
const Q = await nt.async("text"), j = await R(Q, I.type, V, I.href, Y);
|
|
2887
|
+
it += `<div class="bok-chapter" id="${V}">${j}</div>`;
|
|
2888
2888
|
}
|
|
2889
|
-
} catch (
|
|
2890
|
-
console.warn(`Failed to process spine item ${
|
|
2889
|
+
} catch (z) {
|
|
2890
|
+
console.warn(`Failed to process spine item ${I.href}:`, z);
|
|
2891
2891
|
}
|
|
2892
2892
|
}
|
|
2893
2893
|
for (const V in E) {
|
|
2894
|
-
const
|
|
2895
|
-
if (
|
|
2896
|
-
const
|
|
2897
|
-
if (!
|
|
2898
|
-
const nt = h.current.file(
|
|
2894
|
+
const I = E[V];
|
|
2895
|
+
if (I.type.includes("css")) {
|
|
2896
|
+
const z = v.current + I.href;
|
|
2897
|
+
if (!H.has(z)) {
|
|
2898
|
+
const nt = h.current.file(z);
|
|
2899
2899
|
if (nt) {
|
|
2900
2900
|
const Q = await nt.async("text");
|
|
2901
2901
|
a.current += w(Q) + `
|
|
2902
|
-
`,
|
|
2902
|
+
`, H.add(z);
|
|
2903
2903
|
}
|
|
2904
2904
|
}
|
|
2905
2905
|
}
|
|
@@ -2908,82 +2908,82 @@ function un() {
|
|
|
2908
2908
|
}
|
|
2909
2909
|
c.current = A;
|
|
2910
2910
|
async function N(n, E, Y) {
|
|
2911
|
-
let
|
|
2912
|
-
const
|
|
2911
|
+
let W = null, it = null;
|
|
2912
|
+
const H = Object.keys(E).find((lt) => {
|
|
2913
2913
|
var ht;
|
|
2914
2914
|
return E[lt].properties && ((ht = E[lt].properties) == null ? void 0 : ht.includes("nav"));
|
|
2915
2915
|
});
|
|
2916
|
-
if (
|
|
2917
|
-
it = E[
|
|
2916
|
+
if (H)
|
|
2917
|
+
it = E[H];
|
|
2918
2918
|
else {
|
|
2919
2919
|
const lt = n.querySelector("spine");
|
|
2920
|
-
|
|
2920
|
+
W = lt == null ? void 0 : lt.getAttribute("toc"), W && E[W] && (it = E[W]);
|
|
2921
2921
|
}
|
|
2922
2922
|
if (!it || !h.current) {
|
|
2923
2923
|
console.log("No TOC found.");
|
|
2924
2924
|
return;
|
|
2925
2925
|
}
|
|
2926
|
-
const V = v.current + it.href,
|
|
2927
|
-
if (!
|
|
2926
|
+
const V = v.current + it.href, I = h.current.file(V);
|
|
2927
|
+
if (!I)
|
|
2928
2928
|
return;
|
|
2929
|
-
const
|
|
2930
|
-
let
|
|
2929
|
+
const z = await I.async("text"), Q = new DOMParser().parseFromString(z, "application/xml");
|
|
2930
|
+
let j = [];
|
|
2931
2931
|
if (it.type.includes("ncx")) {
|
|
2932
2932
|
const lt = Array.from(Q.querySelectorAll("navMap > navPoint")), ht = (ct) => ct.map((dt) => {
|
|
2933
2933
|
var Ct, e;
|
|
2934
|
-
const pt = ((Ct = dt.querySelector("navLabel > text")) == null ? void 0 : Ct.textContent) || "Unnamed", gt = ((e = dt.querySelector("content")) == null ? void 0 : e.getAttribute("src")) || "", xt = Array.from(dt.children).filter((
|
|
2934
|
+
const pt = ((Ct = dt.querySelector("navLabel > text")) == null ? void 0 : Ct.textContent) || "Unnamed", gt = ((e = dt.querySelector("content")) == null ? void 0 : e.getAttribute("src")) || "", xt = Array.from(dt.children).filter(($) => $.tagName.toLowerCase() === "navpoint");
|
|
2935
2935
|
return {
|
|
2936
2936
|
label: pt,
|
|
2937
2937
|
href: x(gt, it.href, Y),
|
|
2938
2938
|
subitems: ht(xt)
|
|
2939
2939
|
};
|
|
2940
2940
|
});
|
|
2941
|
-
|
|
2941
|
+
j = ht(lt);
|
|
2942
2942
|
} else {
|
|
2943
2943
|
const lt = Q.querySelector("nav[epub\\:type='toc']") || Q.querySelector("nav"), ht = lt == null ? void 0 : lt.querySelector("ol"), ct = (dt) => dt ? Array.from(dt.children).filter((pt) => pt.tagName.toLowerCase() === "li").map((pt) => {
|
|
2944
|
-
var
|
|
2945
|
-
const gt = pt.querySelector(":scope > a") || pt.querySelector(":scope > span"), xt = ((
|
|
2944
|
+
var $;
|
|
2945
|
+
const gt = pt.querySelector(":scope > a") || pt.querySelector(":scope > span"), xt = (($ = gt == null ? void 0 : gt.textContent) == null ? void 0 : $.trim()) || "Unnamed", Ct = (gt == null ? void 0 : gt.getAttribute("href")) || "", e = pt.querySelector(":scope > ol");
|
|
2946
2946
|
return {
|
|
2947
2947
|
label: xt,
|
|
2948
2948
|
href: x(Ct, it.href, Y),
|
|
2949
2949
|
subitems: ct(e)
|
|
2950
2950
|
};
|
|
2951
2951
|
}) : [];
|
|
2952
|
-
ht && (
|
|
2952
|
+
ht && (j = ct(ht));
|
|
2953
2953
|
}
|
|
2954
|
-
console.log("Parsed TOC:",
|
|
2954
|
+
console.log("Parsed TOC:", j), g(j);
|
|
2955
2955
|
}
|
|
2956
2956
|
function x(n, E, Y) {
|
|
2957
2957
|
if (!n)
|
|
2958
2958
|
return "";
|
|
2959
|
-
const [
|
|
2959
|
+
const [W, it] = n.split("#"), H = Ae(E, W), V = Y[H];
|
|
2960
2960
|
return V ? it ? `#${V}_${it}` : `#${V}` : "";
|
|
2961
2961
|
}
|
|
2962
|
-
async function R(n, E, Y,
|
|
2963
|
-
let
|
|
2962
|
+
async function R(n, E, Y, W, it) {
|
|
2963
|
+
let H = [...n.matchAll(/<style[^>]*>([\s\S]*?)<\/style>/gi)].map((I) => I[1]).join(`
|
|
2964
2964
|
`);
|
|
2965
|
-
|
|
2965
|
+
H = w(H), a.current += H;
|
|
2966
2966
|
let V = n.replace(/<style[^>]*>[\s\S]*?<\/style>/gi, "");
|
|
2967
|
-
return V = V.replace(/<link[^>]*?>/gi, ""), V = V.replace(/<title[^>]*>[\s\S]*?<\/title>/gi, ""), V = await F(V, E, Y,
|
|
2967
|
+
return V = V.replace(/<link[^>]*?>/gi, ""), V = V.replace(/<title[^>]*>[\s\S]*?<\/title>/gi, ""), V = await F(V, E, Y, W, it), V;
|
|
2968
2968
|
}
|
|
2969
|
-
async function F(n, E, Y,
|
|
2969
|
+
async function F(n, E, Y, W, it) {
|
|
2970
2970
|
const V = new DOMParser().parseFromString(n, E);
|
|
2971
2971
|
if (V.querySelector("parsererror"))
|
|
2972
2972
|
return console.warn("Parser error in manipulateDom"), n;
|
|
2973
|
-
const
|
|
2974
|
-
for (const lt of
|
|
2973
|
+
const I = V.querySelectorAll("[id]");
|
|
2974
|
+
for (const lt of I) {
|
|
2975
2975
|
const ht = lt.getAttribute("id");
|
|
2976
2976
|
lt.setAttribute("id", `${Y}_${ht}`);
|
|
2977
2977
|
}
|
|
2978
|
-
const
|
|
2979
|
-
for (const lt of
|
|
2978
|
+
const z = V.querySelectorAll("a[href]");
|
|
2979
|
+
for (const lt of z) {
|
|
2980
2980
|
const ht = lt.getAttribute("href");
|
|
2981
2981
|
if (!(!ht || ht.startsWith("http") || ht.startsWith("mailto")))
|
|
2982
2982
|
if (ht.startsWith("#")) {
|
|
2983
2983
|
const ct = ht.substring(1);
|
|
2984
2984
|
lt.setAttribute("href", `#${Y}_${ct}`);
|
|
2985
2985
|
} else {
|
|
2986
|
-
const [ct, dt] = ht.split("#"), pt = Ae(
|
|
2986
|
+
const [ct, dt] = ht.split("#"), pt = Ae(W, ct), gt = it[pt];
|
|
2987
2987
|
gt && (dt ? lt.setAttribute("href", `#${gt}_${dt}`) : lt.setAttribute("href", `#${gt}`));
|
|
2988
2988
|
}
|
|
2989
2989
|
}
|
|
@@ -3012,13 +3012,13 @@ function un() {
|
|
|
3012
3012
|
}
|
|
3013
3013
|
}
|
|
3014
3014
|
async function st(n, E, Y) {
|
|
3015
|
-
var
|
|
3015
|
+
var W;
|
|
3016
3016
|
if (f.current[Y] === void 0) {
|
|
3017
|
-
const it = (
|
|
3017
|
+
const it = (W = h.current) == null ? void 0 : W.file(Y);
|
|
3018
3018
|
if (it)
|
|
3019
3019
|
try {
|
|
3020
|
-
const
|
|
3021
|
-
f.current[Y] = URL.createObjectURL(
|
|
3020
|
+
const H = await it.async("blob");
|
|
3021
|
+
f.current[Y] = URL.createObjectURL(H);
|
|
3022
3022
|
} catch {
|
|
3023
3023
|
f.current[Y] = "";
|
|
3024
3024
|
}
|
|
@@ -3031,9 +3031,9 @@ function un() {
|
|
|
3031
3031
|
const E = ["background-color", "color", "font-size", "font-family", "font-weight", "line-height", "text-align", "margin", "padding"];
|
|
3032
3032
|
let Y = n.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
3033
3033
|
Y = Y.replace(/(^|[^.#\w-])(html|body)(?![\w-])/gi, "butt-sex-masterr");
|
|
3034
|
-
for (const
|
|
3035
|
-
const it =
|
|
3036
|
-
Y = Y.replace(
|
|
3034
|
+
for (const W of E) {
|
|
3035
|
+
const it = W.replace(/[.*+?^${}()|[\]\\-]/g, "\\$&"), H = new RegExp(`${it}(?:-[\\w-]+)?\\s*:[^;{}]*;?`, "gi");
|
|
3036
|
+
Y = Y.replace(H, "");
|
|
3037
3037
|
}
|
|
3038
3038
|
return Y = Y.replace(/[^{}@]+\{\s*\}/g, ""), Y = Y.replace(/@media[^{]*\{\s*\}/g, ""), Y = Y.replace(/\n\s*\n/g, `
|
|
3039
3039
|
`), Y.trim();
|
|
@@ -3057,7 +3057,7 @@ function un() {
|
|
|
3057
3057
|
setIsLoading: k
|
|
3058
3058
|
};
|
|
3059
3059
|
}
|
|
3060
|
-
function
|
|
3060
|
+
function Ht(S, t) {
|
|
3061
3061
|
const [s, k] = Nt(() => {
|
|
3062
3062
|
if (typeof window > "u")
|
|
3063
3063
|
return t;
|
|
@@ -3124,7 +3124,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
3124
3124
|
}
|
|
3125
3125
|
process.env.NODE_ENV === "production" ? ve.exports = hn() : ve.exports = dn();
|
|
3126
3126
|
var Dt = ve.exports;
|
|
3127
|
-
function
|
|
3127
|
+
function He(S) {
|
|
3128
3128
|
const t = Dt.c(8);
|
|
3129
3129
|
let s;
|
|
3130
3130
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (s = {
|
|
@@ -3193,7 +3193,7 @@ function fn(S) {
|
|
|
3193
3193
|
return t[6] !== s ? (d = [s, k], t[6] = s, t[7] = d) : d = t[7], d;
|
|
3194
3194
|
}
|
|
3195
3195
|
const pn = (S, t, s, k) => {
|
|
3196
|
-
const u = Dt.c(21), [o, l] =
|
|
3196
|
+
const u = Dt.c(21), [o, l] = He(s), i = yt(null), d = yt(""), g = yt(!1), _ = yt(!1), m = yt(0), v = yt(0), a = yt(null);
|
|
3197
3197
|
let h;
|
|
3198
3198
|
u[0] !== S || u[1] !== t || u[2] !== l || u[3] !== o || u[4] !== k ? (h = (x, R) => {
|
|
3199
3199
|
const F = window.getSelection(), O = g.current || !!(F && F.rangeCount > 0 && !F.isCollapsed);
|
|
@@ -3247,8 +3247,8 @@ const pn = (S, t, s, k) => {
|
|
|
3247
3247
|
return;
|
|
3248
3248
|
const n = a.current;
|
|
3249
3249
|
if (a.current = null, n) {
|
|
3250
|
-
const it = B.pageX - n.x,
|
|
3251
|
-
if (Math.hypot(it,
|
|
3250
|
+
const it = B.pageX - n.x, H = B.pageY - n.y;
|
|
3251
|
+
if (Math.hypot(it, H) > 10)
|
|
3252
3252
|
return;
|
|
3253
3253
|
}
|
|
3254
3254
|
const {
|
|
@@ -3315,19 +3315,19 @@ function ie(S) {
|
|
|
3315
3315
|
} else
|
|
3316
3316
|
throw Error;
|
|
3317
3317
|
}
|
|
3318
|
-
const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19",
|
|
3318
|
+
const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", ze = {
|
|
3319
3319
|
toast: yn,
|
|
3320
3320
|
visible: vn
|
|
3321
|
-
},
|
|
3321
|
+
}, je = (S) => {
|
|
3322
3322
|
const t = Dt.c(5), {
|
|
3323
3323
|
message: s,
|
|
3324
3324
|
visible: k,
|
|
3325
3325
|
role: u,
|
|
3326
3326
|
ariaLive: o
|
|
3327
|
-
} = S, l = u === void 0 ? "status" : u, i = o === void 0 ? "polite" : o, d = `${
|
|
3327
|
+
} = S, l = u === void 0 ? "status" : u, i = o === void 0 ? "polite" : o, d = `${ze.toast} ${k ? ze.visible : ""}`;
|
|
3328
3328
|
let g;
|
|
3329
3329
|
return t[0] !== i || t[1] !== s || t[2] !== l || t[3] !== d ? (g = /* @__PURE__ */ J("div", { className: d, role: l, "aria-live": i, children: s }), t[0] = i, t[1] = s, t[2] = l, t[3] = d, t[4] = g) : g = t[4], g;
|
|
3330
|
-
}, ne = 12,
|
|
3330
|
+
}, ne = 12, Ie = 12, Re = 44, Oe = 94, Pe = 135, Be = 180, he = ({
|
|
3331
3331
|
anchorTop: S,
|
|
3332
3332
|
anchorBottom: t,
|
|
3333
3333
|
containerHeight: s,
|
|
@@ -3348,7 +3348,7 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3348
3348
|
containerWidth: t,
|
|
3349
3349
|
menuWidth: s
|
|
3350
3350
|
}) => {
|
|
3351
|
-
const k = s / 2 +
|
|
3351
|
+
const k = s / 2 + Ie, u = Math.max(k, t - s / 2 - Ie);
|
|
3352
3352
|
return Math.max(k, Math.min(u, S));
|
|
3353
3353
|
}, wn = Ze((S) => {
|
|
3354
3354
|
const t = Dt.c(5), {
|
|
@@ -3382,12 +3382,12 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3382
3382
|
onRemoveHighlight: c,
|
|
3383
3383
|
onUpdateHighlightColor: b
|
|
3384
3384
|
}, C) => {
|
|
3385
|
-
const A = yt(null), N = yt(!1), x = yt(null), R = yt(0), F = yt(0), O = yt(0), U = yt(null), st = yt(null), w = yt(null), [B, n] = Nt(null), [E, Y] = Nt(null), [
|
|
3385
|
+
const A = yt(null), N = yt(!1), x = yt(null), R = yt(0), F = yt(0), O = yt(0), U = yt(null), st = yt(null), w = yt(null), [B, n] = Nt(null), [E, Y] = Nt(null), [W, it] = Nt(!1), H = yt(null), [V, I, z] = He(_), [nt, Q] = fn(A), [j, lt] = Nt(1), [ht, ct] = Nt(0), dt = yt(!1), pt = s ? `bok_progress_${s}` : "", gt = t && t !== "Loading..." ? `bok_progress_${t}` : "", xt = yt(nt), Ct = yt(null);
|
|
3386
3386
|
wt(() => {
|
|
3387
3387
|
a && a(ht);
|
|
3388
3388
|
}, [ht, a]), wt(() => {
|
|
3389
|
-
v && v(
|
|
3390
|
-
}, [
|
|
3389
|
+
v && v(j);
|
|
3390
|
+
}, [j, v]), wt(() => {
|
|
3391
3391
|
xt.current = nt;
|
|
3392
3392
|
}, [nt]), wt(() => {
|
|
3393
3393
|
if (!pt)
|
|
@@ -3428,7 +3428,7 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3428
3428
|
if (!Z)
|
|
3429
3429
|
return;
|
|
3430
3430
|
Ct.current && cancelAnimationFrame(Ct.current);
|
|
3431
|
-
const et = Z.scrollLeft, L = D * V *
|
|
3431
|
+
const et = Z.scrollLeft, L = D * V * z, K = L - et, rt = 450, at = performance.now(), ft = (vt) => {
|
|
3432
3432
|
const bt = vt - at;
|
|
3433
3433
|
if (bt < rt) {
|
|
3434
3434
|
const Tt = kn(bt / rt);
|
|
@@ -3437,7 +3437,7 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3437
3437
|
Z.scrollLeft = L, Ct.current = null;
|
|
3438
3438
|
};
|
|
3439
3439
|
Ct.current = requestAnimationFrame(ft);
|
|
3440
|
-
}, [V,
|
|
3440
|
+
}, [V, z]), $ = At((D) => {
|
|
3441
3441
|
let Z = D;
|
|
3442
3442
|
Z < 0 && (Z = 0), Z >= ht && (Z = ht - 1), lt(Z), e(Z);
|
|
3443
3443
|
}, [ht, e]), M = At((D) => {
|
|
@@ -3453,7 +3453,7 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3453
3453
|
});
|
|
3454
3454
|
}, [ht, e]);
|
|
3455
3455
|
Me(C, () => ({
|
|
3456
|
-
goToPage:
|
|
3456
|
+
goToPage: $,
|
|
3457
3457
|
setProgress: M,
|
|
3458
3458
|
getProgress: () => xt.current,
|
|
3459
3459
|
findAndJumpToHref: (D) => {
|
|
@@ -3461,12 +3461,12 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3461
3461
|
if (et)
|
|
3462
3462
|
try {
|
|
3463
3463
|
const L = ie(et);
|
|
3464
|
-
|
|
3464
|
+
$(L);
|
|
3465
3465
|
} catch (L) {
|
|
3466
3466
|
console.warn("Could not calculate page for link", L);
|
|
3467
3467
|
}
|
|
3468
3468
|
}
|
|
3469
|
-
}), [
|
|
3469
|
+
}), [$, M]), pn(y, !!(g || B || E), _, m);
|
|
3470
3470
|
const T = At((D) => typeof CSS < "u" && CSS.escape ? CSS.escape(D) : D.replace(/[^a-zA-Z0-9_-]/g, "\\$&"), []), q = At((D) => {
|
|
3471
3471
|
var Z;
|
|
3472
3472
|
return D ? D.nodeType === Node.ELEMENT_NODE ? D.closest(".bok-chapter") : (Z = D.parentElement) == null ? void 0 : Z.closest(".bok-chapter") : null;
|
|
@@ -3637,7 +3637,7 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3637
3637
|
text: ft || void 0
|
|
3638
3638
|
};
|
|
3639
3639
|
f(vt), n(null), x.current = null, (bt = window.getSelection()) == null || bt.removeAllRanges();
|
|
3640
|
-
}, [q, X, f]),
|
|
3640
|
+
}, [q, X, f]), It = At((D) => {
|
|
3641
3641
|
if (D.text)
|
|
3642
3642
|
return D.text;
|
|
3643
3643
|
const Z = A.current;
|
|
@@ -3720,7 +3720,7 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3720
3720
|
};
|
|
3721
3721
|
return document.addEventListener("selectionchange", D), () => document.removeEventListener("selectionchange", D);
|
|
3722
3722
|
}, [St]), wt(() => () => {
|
|
3723
|
-
|
|
3723
|
+
H.current && clearTimeout(H.current), U.current && clearTimeout(U.current);
|
|
3724
3724
|
}, []), wt(() => {
|
|
3725
3725
|
(g || m) && (n(null), x.current = null, Y(null));
|
|
3726
3726
|
}, [g, m]), Se(() => {
|
|
@@ -3754,7 +3754,7 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3754
3754
|
if (!D)
|
|
3755
3755
|
return;
|
|
3756
3756
|
const Z = (et) => {
|
|
3757
|
-
var Ut,
|
|
3757
|
+
var Ut, $t;
|
|
3758
3758
|
const K = et.target.closest("span[data-highlight-id]");
|
|
3759
3759
|
if (!K)
|
|
3760
3760
|
return;
|
|
@@ -3786,7 +3786,7 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3786
3786
|
anchorTop: Tt,
|
|
3787
3787
|
anchorBottom: Lt,
|
|
3788
3788
|
placement: Ft
|
|
3789
|
-
}), (
|
|
3789
|
+
}), ($t = window.getSelection()) == null || $t.removeAllRanges();
|
|
3790
3790
|
};
|
|
3791
3791
|
return D.addEventListener("click", Z), () => D.removeEventListener("click", Z);
|
|
3792
3792
|
}, [_]), Se(() => {
|
|
@@ -3847,28 +3847,28 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3847
3847
|
if (vt)
|
|
3848
3848
|
try {
|
|
3849
3849
|
const bt = ie(vt);
|
|
3850
|
-
|
|
3850
|
+
$(bt);
|
|
3851
3851
|
} catch (bt) {
|
|
3852
3852
|
console.warn("Could not calculate page for link", bt);
|
|
3853
3853
|
}
|
|
3854
3854
|
}
|
|
3855
3855
|
};
|
|
3856
3856
|
return D.addEventListener("click", Z), () => D.removeEventListener("click", Z);
|
|
3857
|
-
}, [
|
|
3857
|
+
}, [$]), wt(() => {
|
|
3858
3858
|
const D = A.current;
|
|
3859
|
-
if (!D || V <= 0 ||
|
|
3859
|
+
if (!D || V <= 0 || I <= 0)
|
|
3860
3860
|
return;
|
|
3861
3861
|
k(!0);
|
|
3862
3862
|
const Z = setTimeout(() => {
|
|
3863
|
-
D.style.setProperty("--side-padding", `${i}px`), D.style.setProperty("--top-padding", `${l}px`), D.style.setProperty("--font-size", `${u}em`), D.style.setProperty("--line-height", String(o)), D.style.setProperty("--font-family", d), D.style.setProperty("--computed-width", `${V}px`), D.style.maxHeight = `${
|
|
3863
|
+
D.style.setProperty("--side-padding", `${i}px`), D.style.setProperty("--top-padding", `${l}px`), D.style.setProperty("--font-size", `${u}em`), D.style.setProperty("--line-height", String(o)), D.style.setProperty("--font-family", d), D.style.setProperty("--computed-width", `${V}px`), D.style.maxHeight = `${I}px`, D.offsetHeight, requestAnimationFrame(() => {
|
|
3864
3864
|
var rt;
|
|
3865
3865
|
if (!D)
|
|
3866
3866
|
return;
|
|
3867
|
-
const et = D.scrollWidth, L = V > 0 && et > 0 ? Math.round(et / V) : 0, K =
|
|
3867
|
+
const et = D.scrollWidth, L = V > 0 && et > 0 ? Math.round(et / V) : 0, K = z === 1 ? L : Math.round(L / 2);
|
|
3868
3868
|
if (ct(K), K > 0 && D.clientWidth > 0) {
|
|
3869
3869
|
const at = xt.current;
|
|
3870
3870
|
let ft = Math.round(K * at);
|
|
3871
|
-
ft = Math.max(0, Math.min(K - 1, ft)), lt(ft), D.scrollLeft = ft * V *
|
|
3871
|
+
ft = Math.max(0, Math.min(K - 1, ft)), lt(ft), D.scrollLeft = ft * V * z;
|
|
3872
3872
|
} else
|
|
3873
3873
|
lt(1);
|
|
3874
3874
|
k(!1), N.current || (N.current = !0, (rt = document.getElementById("root")) == null || rt.dispatchEvent(new CustomEvent("react-ready")));
|
|
@@ -3877,14 +3877,14 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3877
3877
|
return () => {
|
|
3878
3878
|
clearTimeout(Z), Ct.current && cancelAnimationFrame(Ct.current);
|
|
3879
3879
|
};
|
|
3880
|
-
}, [V,
|
|
3880
|
+
}, [V, I, i, l, u, o, d, z, S, t, k]), wt(() => {
|
|
3881
3881
|
const D = (Z) => {
|
|
3882
3882
|
Z.key === "ArrowLeft" ? (Z.preventDefault(), y(-1)) : Z.key === "ArrowRight" && (Z.preventDefault(), y(1));
|
|
3883
3883
|
};
|
|
3884
3884
|
return document.addEventListener("keydown", D), () => document.removeEventListener("keydown", D);
|
|
3885
3885
|
}, [y]);
|
|
3886
3886
|
const Et = E ? r.find((D) => D.id === E.id) : null, Ot = At(() => {
|
|
3887
|
-
it(!1), requestAnimationFrame(() => it(!0)),
|
|
3887
|
+
it(!1), requestAnimationFrame(() => it(!0)), H.current && clearTimeout(H.current), H.current = setTimeout(() => {
|
|
3888
3888
|
it(!1);
|
|
3889
3889
|
}, 1600);
|
|
3890
3890
|
}, []);
|
|
@@ -3920,7 +3920,7 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3920
3920
|
/* @__PURE__ */ _t("div", { className: "highlight-action-row", children: [
|
|
3921
3921
|
/* @__PURE__ */ J("button", { type: "button", className: "highlight-action-button", onClick: async () => {
|
|
3922
3922
|
if (Et) {
|
|
3923
|
-
const D =
|
|
3923
|
+
const D = It(Et);
|
|
3924
3924
|
await Bt(D), Ot();
|
|
3925
3925
|
}
|
|
3926
3926
|
Y(null);
|
|
@@ -3930,8 +3930,8 @@ const yn = "_toast_1nwn7_1", vn = "_visible_1nwn7_19", Ie = {
|
|
|
3930
3930
|
}, children: "Remove" })
|
|
3931
3931
|
] })
|
|
3932
3932
|
] }),
|
|
3933
|
-
/* @__PURE__ */ J(
|
|
3934
|
-
/* @__PURE__ */ J(bn, { pages: ht, currentPage:
|
|
3933
|
+
/* @__PURE__ */ J(je, { message: "Copied to clipboard", visible: W }),
|
|
3934
|
+
/* @__PURE__ */ J(bn, { pages: ht, currentPage: j })
|
|
3935
3935
|
] });
|
|
3936
3936
|
}), Sn = "_book_1bbsw_30", xn = "_page_1bbsw_69", re = {
|
|
3937
3937
|
"loading-screen": "_loading-screen_1bbsw_1",
|
|
@@ -4003,7 +4003,7 @@ const Nn = "_visible_1t17q_55 _panelVisible_7cmc0_60", Tn = "_title_1t17q_72", k
|
|
|
4003
4003
|
"option-value": "_option-value_1t17q_177",
|
|
4004
4004
|
"value-changed": "_value-changed_1t17q_195",
|
|
4005
4005
|
"fullscreen-button": "_fullscreen-button_1t17q_201"
|
|
4006
|
-
},
|
|
4006
|
+
}, Wt = {
|
|
4007
4007
|
"custom-select": "_custom-select_1nbnq_1",
|
|
4008
4008
|
"select-trigger": "_select-trigger_1nbnq_16",
|
|
4009
4009
|
"select-trigger-label": "_select-trigger-label_1nbnq_40",
|
|
@@ -4034,39 +4034,39 @@ function Le(S) {
|
|
|
4034
4034
|
t[2] !== s || t[3] !== k ? (m = s.find((x) => x.value === k) ?? s[0], t[2] = s, t[3] = k, t[4] = m) : m = t[4];
|
|
4035
4035
|
const v = m;
|
|
4036
4036
|
let a, h;
|
|
4037
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = () => i(
|
|
4037
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (a = () => i(zn), h = (x) => {
|
|
4038
4038
|
x.key === "Escape" && i(!1);
|
|
4039
4039
|
}, t[5] = a, t[6] = h) : (a = t[5], h = t[6]);
|
|
4040
4040
|
const r = v == null ? void 0 : v.label;
|
|
4041
4041
|
let f;
|
|
4042
|
-
t[7] !== r ? (f = /* @__PURE__ */ J("span", { className:
|
|
4043
|
-
const c = `${
|
|
4042
|
+
t[7] !== r ? (f = /* @__PURE__ */ J("span", { className: Wt["select-trigger-label"], children: r }), t[7] = r, t[8] = f) : f = t[8];
|
|
4043
|
+
const c = `${Wt["select-trigger-arrow"]} ${l ? Wt["select-trigger-arrow-open"] : ""}`;
|
|
4044
4044
|
let b;
|
|
4045
4045
|
t[9] !== c ? (b = /* @__PURE__ */ J("span", { className: c, "aria-hidden": "true", children: "▾" }), t[9] = c, t[10] = b) : b = t[10];
|
|
4046
4046
|
let C;
|
|
4047
|
-
t[11] !== o || t[12] !== l || t[13] !== f || t[14] !== b ? (C = /* @__PURE__ */ _t("button", { type: "button", className:
|
|
4047
|
+
t[11] !== o || t[12] !== l || t[13] !== f || t[14] !== b ? (C = /* @__PURE__ */ _t("button", { type: "button", className: Wt["select-trigger"], "aria-haspopup": "listbox", "aria-expanded": l, "aria-label": o, onClick: a, onKeyDown: h, children: [
|
|
4048
4048
|
f,
|
|
4049
4049
|
b
|
|
4050
4050
|
] }), t[11] = o, t[12] = l, t[13] = f, t[14] = b, t[15] = C) : C = t[15];
|
|
4051
4051
|
let A;
|
|
4052
|
-
t[16] !== o || t[17] !== l || t[18] !== u || t[19] !== s || t[20] !== k ? (A = l && /* @__PURE__ */ J("div", { className:
|
|
4052
|
+
t[16] !== o || t[17] !== l || t[18] !== u || t[19] !== s || t[20] !== k ? (A = l && /* @__PURE__ */ J("div", { className: Wt["select-menu"], role: "listbox", "aria-label": o, children: s.map((x) => {
|
|
4053
4053
|
const R = x.value === k;
|
|
4054
|
-
return /* @__PURE__ */ J("button", { type: "button", role: "option", "aria-selected": R, className: `${
|
|
4054
|
+
return /* @__PURE__ */ J("button", { type: "button", role: "option", "aria-selected": R, className: `${Wt["select-option"]} ${R ? Wt["select-option-active"] : ""}`, style: o === "Select font family" ? {
|
|
4055
4055
|
fontFamily: x.value
|
|
4056
4056
|
} : void 0, onClick: () => {
|
|
4057
4057
|
u(x.value), i(!1);
|
|
4058
4058
|
}, children: x.label }, x.value);
|
|
4059
4059
|
}) }), t[16] = o, t[17] = l, t[18] = u, t[19] = s, t[20] = k, t[21] = A) : A = t[21];
|
|
4060
4060
|
let N;
|
|
4061
|
-
return t[22] !== C || t[23] !== A ? (N = /* @__PURE__ */ _t("div", { className:
|
|
4061
|
+
return t[22] !== C || t[23] !== A ? (N = /* @__PURE__ */ _t("div", { className: Wt["custom-select"], ref: d, children: [
|
|
4062
4062
|
C,
|
|
4063
4063
|
A
|
|
4064
4064
|
] }), t[22] = C, t[23] = A, t[24] = N) : N = t[24], N;
|
|
4065
4065
|
}
|
|
4066
|
-
function
|
|
4066
|
+
function zn(S) {
|
|
4067
4067
|
return !S;
|
|
4068
4068
|
}
|
|
4069
|
-
function
|
|
4069
|
+
function In(S) {
|
|
4070
4070
|
const t = Dt.c(122), {
|
|
4071
4071
|
onClose: s,
|
|
4072
4072
|
fontSize: k,
|
|
@@ -4108,55 +4108,55 @@ function zn(S) {
|
|
|
4108
4108
|
let E;
|
|
4109
4109
|
t[7] !== f ? (E = Object.keys(f), t[7] = f, t[8] = E) : E = t[8];
|
|
4110
4110
|
const Y = E;
|
|
4111
|
-
let $;
|
|
4112
|
-
t[9] !== n ? ($ = n.map(Hn), t[9] = n, t[10] = $) : $ = t[10];
|
|
4113
|
-
const it = $;
|
|
4114
4111
|
let W;
|
|
4115
|
-
t[
|
|
4116
|
-
const
|
|
4117
|
-
let
|
|
4118
|
-
t[
|
|
4112
|
+
t[9] !== n ? (W = n.map(jn), t[9] = n, t[10] = W) : W = t[10];
|
|
4113
|
+
const it = W;
|
|
4114
|
+
let H;
|
|
4115
|
+
t[11] !== Y ? (H = Y.map(Hn), t[11] = Y, t[12] = H) : H = t[12];
|
|
4116
|
+
const V = H;
|
|
4117
|
+
let I;
|
|
4118
|
+
t[13] !== N ? (I = () => {
|
|
4119
4119
|
N();
|
|
4120
|
-
}, t[13] = N, t[14] =
|
|
4121
|
-
const
|
|
4120
|
+
}, t[13] = N, t[14] = I) : I = t[14];
|
|
4121
|
+
const z = I, nt = Wn, Q = $n, j = Un;
|
|
4122
4122
|
let lt;
|
|
4123
4123
|
t[15] !== m || t[16] !== o ? (lt = () => {
|
|
4124
|
-
o < 120 && (m(Mn),
|
|
4124
|
+
o < 120 && (m(Mn), j(F));
|
|
4125
4125
|
}, t[15] = m, t[16] = o, t[17] = lt) : lt = t[17];
|
|
4126
4126
|
const ht = lt;
|
|
4127
4127
|
let ct;
|
|
4128
4128
|
t[18] !== m || t[19] !== o ? (ct = () => {
|
|
4129
|
-
o > 0 && (m(Fn),
|
|
4129
|
+
o > 0 && (m(Fn), j(F));
|
|
4130
4130
|
}, t[18] = m, t[19] = o, t[20] = ct) : ct = t[20];
|
|
4131
4131
|
const dt = ct;
|
|
4132
4132
|
let pt;
|
|
4133
4133
|
t[21] !== l || t[22] !== v ? (pt = () => {
|
|
4134
|
-
l <= 70 && (v(Dn),
|
|
4134
|
+
l <= 70 && (v(Dn), j(O));
|
|
4135
4135
|
}, t[21] = l, t[22] = v, t[23] = pt) : pt = t[23];
|
|
4136
4136
|
const gt = pt;
|
|
4137
4137
|
let xt;
|
|
4138
4138
|
t[24] !== l || t[25] !== v ? (xt = () => {
|
|
4139
|
-
l - 5 > 0 && (v(Ln),
|
|
4139
|
+
l - 5 > 0 && (v(Ln), j(O));
|
|
4140
4140
|
}, t[24] = l, t[25] = v, t[26] = xt) : xt = t[26];
|
|
4141
4141
|
const Ct = xt;
|
|
4142
4142
|
let e;
|
|
4143
4143
|
t[27] !== k || t[28] !== g ? (e = () => {
|
|
4144
|
-
k < 3 && (g(Bn),
|
|
4144
|
+
k < 3 && (g(Bn), j(x));
|
|
4145
4145
|
}, t[27] = k, t[28] = g, t[29] = e) : e = t[29];
|
|
4146
|
-
const
|
|
4146
|
+
const $ = e;
|
|
4147
4147
|
let M;
|
|
4148
4148
|
t[30] !== k || t[31] !== g ? (M = () => {
|
|
4149
|
-
k - 0.2 > 0.6 && (g(Pn),
|
|
4149
|
+
k - 0.2 > 0.6 && (g(Pn), j(x));
|
|
4150
4150
|
}, t[30] = k, t[31] = g, t[32] = M) : M = t[32];
|
|
4151
4151
|
const y = M;
|
|
4152
4152
|
let p;
|
|
4153
4153
|
t[33] !== u || t[34] !== _ ? (p = () => {
|
|
4154
|
-
u < 2.2 && (_(On),
|
|
4154
|
+
u < 2.2 && (_(On), j(R));
|
|
4155
4155
|
}, t[33] = u, t[34] = _, t[35] = p) : p = t[35];
|
|
4156
4156
|
const T = p;
|
|
4157
4157
|
let q;
|
|
4158
4158
|
t[36] !== u || t[37] !== _ ? (q = () => {
|
|
4159
|
-
u > 1.1 && (_(Rn),
|
|
4159
|
+
u > 1.1 && (_(Rn), j(R));
|
|
4160
4160
|
}, t[36] = u, t[37] = _, t[38] = q) : q = t[38];
|
|
4161
4161
|
const G = q;
|
|
4162
4162
|
let P;
|
|
@@ -4177,11 +4177,11 @@ function zn(S) {
|
|
|
4177
4177
|
WebkitUserSelect: "none",
|
|
4178
4178
|
WebkitTouchCallout: "none"
|
|
4179
4179
|
}, t[44] = mt) : mt = t[44];
|
|
4180
|
-
let
|
|
4181
|
-
t[45] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
4180
|
+
let It;
|
|
4181
|
+
t[45] === Symbol.for("react.memo_cache_sentinel") ? (It = /* @__PURE__ */ J("h2", { className: kt.title, children: "Reader Options" }), t[45] = It) : It = t[45];
|
|
4182
4182
|
let Bt;
|
|
4183
4183
|
t[46] !== N ? (Bt = /* @__PURE__ */ _t("div", { className: kt["options-header"], children: [
|
|
4184
|
-
|
|
4184
|
+
It,
|
|
4185
4185
|
/* @__PURE__ */ J("button", { onClick: N, className: kt["close-button"], "aria-label": "Close menu", children: "✕" })
|
|
4186
4186
|
] }), t[46] = N, t[47] = Bt) : Bt = t[47];
|
|
4187
4187
|
let Et;
|
|
@@ -4207,7 +4207,7 @@ function zn(S) {
|
|
|
4207
4207
|
let rt;
|
|
4208
4208
|
t[63] !== K ? (rt = /* @__PURE__ */ J("span", { ref: x, className: kt["option-value"], children: K }), t[63] = K, t[64] = rt) : rt = t[64];
|
|
4209
4209
|
let at;
|
|
4210
|
-
t[65] !==
|
|
4210
|
+
t[65] !== $ ? (at = /* @__PURE__ */ J("button", { className: kt["stepper-button"], onClick: $, children: "+" }), t[65] = $, t[66] = at) : at = t[66];
|
|
4211
4211
|
let ft;
|
|
4212
4212
|
t[67] !== L || t[68] !== rt || t[69] !== at ? (ft = /* @__PURE__ */ _t("div", { className: kt["option-row"], children: [
|
|
4213
4213
|
et,
|
|
@@ -4241,21 +4241,21 @@ function zn(S) {
|
|
|
4241
4241
|
] }), t[80] = bt, t[81] = Lt, t[82] = Mt, t[83] = Ft) : Ft = t[83];
|
|
4242
4242
|
let Ut;
|
|
4243
4243
|
t[84] === Symbol.for("react.memo_cache_sentinel") ? (Ut = /* @__PURE__ */ J("div", { className: kt["option-label"], children: "Top padding" }), t[84] = Ut) : Ut = t[84];
|
|
4244
|
-
let
|
|
4245
|
-
t[85] !== dt ? (
|
|
4244
|
+
let $t;
|
|
4245
|
+
t[85] !== dt ? ($t = /* @__PURE__ */ J("button", { className: kt["stepper-button"], onClick: dt, children: "-" }), t[85] = dt, t[86] = $t) : $t = t[86];
|
|
4246
4246
|
let Zt;
|
|
4247
4247
|
t[87] !== o ? (Zt = /* @__PURE__ */ J("span", { ref: F, className: kt["option-value"], children: o }), t[87] = o, t[88] = Zt) : Zt = t[88];
|
|
4248
4248
|
let Gt;
|
|
4249
4249
|
t[89] !== ht ? (Gt = /* @__PURE__ */ J("button", { className: kt["stepper-button"], onClick: ht, children: "+" }), t[89] = ht, t[90] = Gt) : Gt = t[90];
|
|
4250
4250
|
let Kt;
|
|
4251
|
-
t[91] !==
|
|
4251
|
+
t[91] !== $t || t[92] !== Zt || t[93] !== Gt ? (Kt = /* @__PURE__ */ _t("div", { className: kt["option-row"], children: [
|
|
4252
4252
|
Ut,
|
|
4253
4253
|
/* @__PURE__ */ _t("div", { className: kt["option-controls"], children: [
|
|
4254
|
-
|
|
4254
|
+
$t,
|
|
4255
4255
|
Zt,
|
|
4256
4256
|
Gt
|
|
4257
4257
|
] })
|
|
4258
|
-
] }), t[91] =
|
|
4258
|
+
] }), t[91] = $t, t[92] = Zt, t[93] = Gt, t[94] = Kt) : Kt = t[94];
|
|
4259
4259
|
let oe;
|
|
4260
4260
|
t[95] === Symbol.for("react.memo_cache_sentinel") ? (oe = /* @__PURE__ */ J("div", { className: kt["option-label"], children: "Side padding" }), t[95] = oe) : oe = t[95];
|
|
4261
4261
|
let Vt;
|
|
@@ -4291,7 +4291,7 @@ function zn(S) {
|
|
|
4291
4291
|
Qt
|
|
4292
4292
|
] }), t[114] = St, t[115] = Bt, t[116] = Qt, t[117] = te) : te = t[117];
|
|
4293
4293
|
let ae;
|
|
4294
|
-
return t[118] !==
|
|
4294
|
+
return t[118] !== z || t[119] !== ut || t[120] !== te ? (ae = /* @__PURE__ */ J("div", { className: ut, onClick: z, onContextMenu: Q, children: te }), t[118] = z, t[119] = ut, t[120] = te, t[121] = ae) : ae = t[121], ae;
|
|
4295
4295
|
}
|
|
4296
4296
|
function Rn(S) {
|
|
4297
4297
|
return Math.max(1.1, Math.round((S - 0.1) * 10) / 10);
|
|
@@ -4323,19 +4323,19 @@ function Un(S) {
|
|
|
4323
4323
|
(t = S.current) == null || t.classList.remove(kt["value-changed"]);
|
|
4324
4324
|
}, 200));
|
|
4325
4325
|
}
|
|
4326
|
-
function
|
|
4326
|
+
function $n(S) {
|
|
4327
4327
|
S.preventDefault();
|
|
4328
4328
|
}
|
|
4329
|
-
function
|
|
4329
|
+
function Wn(S) {
|
|
4330
4330
|
S.stopPropagation();
|
|
4331
4331
|
}
|
|
4332
|
-
function
|
|
4332
|
+
function Hn(S) {
|
|
4333
4333
|
return {
|
|
4334
4334
|
label: S,
|
|
4335
4335
|
value: S
|
|
4336
4336
|
};
|
|
4337
4337
|
}
|
|
4338
|
-
function
|
|
4338
|
+
function jn(S) {
|
|
4339
4339
|
return {
|
|
4340
4340
|
label: S.displayName,
|
|
4341
4341
|
value: S.name
|
|
@@ -4382,8 +4382,8 @@ const qn = "_visible_1sqmo_34 _panelVisible_7cmc0_60", Rt = {
|
|
|
4382
4382
|
try {
|
|
4383
4383
|
const Ct = xt.href.replace("#", ""), e = document.getElementById(Ct);
|
|
4384
4384
|
if (e) {
|
|
4385
|
-
const
|
|
4386
|
-
ct[xt.href] =
|
|
4385
|
+
const $ = ie(e) + 1;
|
|
4386
|
+
ct[xt.href] = $;
|
|
4387
4387
|
}
|
|
4388
4388
|
} catch {
|
|
4389
4389
|
}
|
|
@@ -4409,16 +4409,16 @@ const qn = "_visible_1sqmo_34 _panelVisible_7cmc0_60", Rt = {
|
|
|
4409
4409
|
i(ct), _();
|
|
4410
4410
|
}, t[11] = _, t[12] = i, t[13] = x) : x = t[13];
|
|
4411
4411
|
const R = x, F = Gn;
|
|
4412
|
-
let O, U, st, w, B, n, E, Y,
|
|
4412
|
+
let O, U, st, w, B, n, E, Y, W, it;
|
|
4413
4413
|
if (t[14] !== _ || t[15] !== R || t[16] !== g || t[17] !== d || t[18] !== h || t[19] !== s) {
|
|
4414
4414
|
const ct = (pt, gt) => {
|
|
4415
4415
|
const xt = gt === void 0 ? 0 : gt;
|
|
4416
4416
|
return /* @__PURE__ */ J("ul", { className: xt === 0 ? Rt["toc-list"] : Rt["toc-sublist"], children: pt.map((Ct, e) => {
|
|
4417
|
-
const
|
|
4417
|
+
const $ = h[Ct.href];
|
|
4418
4418
|
return /* @__PURE__ */ _t("li", { children: [
|
|
4419
4419
|
/* @__PURE__ */ _t("div", { className: Rt["toc-item"], onClick: () => R(Ct.href), children: [
|
|
4420
4420
|
/* @__PURE__ */ J("span", { className: Rt["toc-label"], children: Ct.label }),
|
|
4421
|
-
|
|
4421
|
+
$ !== void 0 && /* @__PURE__ */ J("span", { className: Rt["toc-page-num"], children: $ })
|
|
4422
4422
|
] }),
|
|
4423
4423
|
Ct.subitems && Ct.subitems.length > 0 && ct(Ct.subitems, xt + 1)
|
|
4424
4424
|
] }, e);
|
|
@@ -4437,21 +4437,21 @@ const qn = "_visible_1sqmo_34 _panelVisible_7cmc0_60", Rt = {
|
|
|
4437
4437
|
t[31] === Symbol.for("react.memo_cache_sentinel") ? (dt = /* @__PURE__ */ J("h2", { children: "Table of Contents" }), t[31] = dt) : dt = t[31], t[32] !== _ ? (B = /* @__PURE__ */ _t("div", { className: Rt["nav-header"], children: [
|
|
4438
4438
|
dt,
|
|
4439
4439
|
/* @__PURE__ */ J("button", { onClick: _, className: Rt["close-button"], "aria-label": "Close menu", children: "✕" })
|
|
4440
|
-
] }), t[32] = _, t[33] = B) : B = t[33],
|
|
4440
|
+
] }), t[32] = _, t[33] = B) : B = t[33], W = Rt["toc-container"], it = s.length > 0 ? ct(s) : /* @__PURE__ */ J("div", { style: {
|
|
4441
4441
|
padding: "20px",
|
|
4442
4442
|
textAlign: "center",
|
|
4443
4443
|
opacity: 0.5
|
|
4444
|
-
}, children: "No chapters found" }), t[14] = _, t[15] = R, t[16] = g, t[17] = d, t[18] = h, t[19] = s, t[20] = O, t[21] = U, t[22] = st, t[23] = w, t[24] = B, t[25] = n, t[26] = E, t[27] = Y, t[28] =
|
|
4444
|
+
}, children: "No chapters found" }), t[14] = _, t[15] = R, t[16] = g, t[17] = d, t[18] = h, t[19] = s, t[20] = O, t[21] = U, t[22] = st, t[23] = w, t[24] = B, t[25] = n, t[26] = E, t[27] = Y, t[28] = W, t[29] = it;
|
|
4445
4445
|
} else
|
|
4446
|
-
O = t[20], U = t[21], st = t[22], w = t[23], B = t[24], n = t[25], E = t[26], Y = t[27],
|
|
4447
|
-
let
|
|
4448
|
-
t[34] !==
|
|
4446
|
+
O = t[20], U = t[21], st = t[22], w = t[23], B = t[24], n = t[25], E = t[26], Y = t[27], W = t[28], it = t[29];
|
|
4447
|
+
let H;
|
|
4448
|
+
t[34] !== W || t[35] !== it ? (H = /* @__PURE__ */ J("div", { className: W, children: it }), t[34] = W, t[35] = it, t[36] = H) : H = t[36];
|
|
4449
4449
|
let V;
|
|
4450
4450
|
t[37] === Symbol.for("react.memo_cache_sentinel") ? (V = (ct) => v(parseInt(ct.target.value) || 1), t[37] = V) : V = t[37];
|
|
4451
|
-
let z;
|
|
4452
|
-
t[38] !== N ? (z = (ct) => ct.key === "Enter" && N(), t[38] = N, t[39] = z) : z = t[39];
|
|
4453
4451
|
let I;
|
|
4454
|
-
t[
|
|
4452
|
+
t[38] !== N ? (I = (ct) => ct.key === "Enter" && N(), t[38] = N, t[39] = I) : I = t[39];
|
|
4453
|
+
let z;
|
|
4454
|
+
t[40] !== m || t[41] !== I ? (z = /* @__PURE__ */ J("input", { className: Rt["jumper-input"], type: "number", value: m, onChange: V, onKeyDown: I, onClick: Vn }), t[40] = m, t[41] = I, t[42] = z) : z = t[42];
|
|
4455
4455
|
let nt;
|
|
4456
4456
|
t[43] !== u ? (nt = /* @__PURE__ */ _t("span", { className: Rt["total-pages"], children: [
|
|
4457
4457
|
"of ",
|
|
@@ -4459,18 +4459,18 @@ const qn = "_visible_1sqmo_34 _panelVisible_7cmc0_60", Rt = {
|
|
|
4459
4459
|
] }), t[43] = u, t[44] = nt) : nt = t[44];
|
|
4460
4460
|
let Q;
|
|
4461
4461
|
t[45] !== N ? (Q = /* @__PURE__ */ J("button", { className: Rt["go-btn"], onClick: N, children: "Go" }), t[45] = N, t[46] = Q) : Q = t[46];
|
|
4462
|
-
let
|
|
4463
|
-
t[47] !==
|
|
4464
|
-
|
|
4462
|
+
let j;
|
|
4463
|
+
t[47] !== z || t[48] !== nt || t[49] !== Q ? (j = /* @__PURE__ */ J("div", { className: Rt["page-jumper"], children: /* @__PURE__ */ _t("div", { className: Rt["jumper-controls"], children: [
|
|
4464
|
+
z,
|
|
4465
4465
|
nt,
|
|
4466
4466
|
Q
|
|
4467
|
-
] }) }), t[47] =
|
|
4467
|
+
] }) }), t[47] = z, t[48] = nt, t[49] = Q, t[50] = j) : j = t[50];
|
|
4468
4468
|
let lt;
|
|
4469
|
-
t[51] !== O || t[52] !== U || t[53] !== st || t[54] !== w || t[55] !== B || t[56] !==
|
|
4469
|
+
t[51] !== O || t[52] !== U || t[53] !== st || t[54] !== w || t[55] !== B || t[56] !== H || t[57] !== j ? (lt = /* @__PURE__ */ _t("div", { className: O, onClick: U, onContextMenu: st, style: w, children: [
|
|
4470
4470
|
B,
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
] }), t[51] = O, t[52] = U, t[53] = st, t[54] = w, t[55] = B, t[56] =
|
|
4471
|
+
H,
|
|
4472
|
+
j
|
|
4473
|
+
] }), t[51] = O, t[52] = U, t[53] = st, t[54] = w, t[55] = B, t[56] = H, t[57] = j, t[58] = lt) : lt = t[58];
|
|
4474
4474
|
let ht;
|
|
4475
4475
|
return t[59] !== n || t[60] !== E || t[61] !== Y || t[62] !== lt ? (ht = /* @__PURE__ */ J("div", { className: n, onClick: E, onContextMenu: Y, children: lt }), t[59] = n, t[60] = E, t[61] = Y, t[62] = lt, t[63] = ht) : ht = t[63], ht;
|
|
4476
4476
|
};
|
|
@@ -4483,34 +4483,35 @@ function Kn(S) {
|
|
|
4483
4483
|
function Vn(S) {
|
|
4484
4484
|
return S.currentTarget.select();
|
|
4485
4485
|
}
|
|
4486
|
-
const Yn = "
|
|
4487
|
-
"highlights-overlay": "_highlights-
|
|
4488
|
-
"fade-out": "_fade-
|
|
4489
|
-
"highlights-menu": "_highlights-
|
|
4486
|
+
const Yn = "_visible_f3dpz_29 _panelVisible_7cmc0_60", zt = {
|
|
4487
|
+
"highlights-overlay": "_highlights-overlay_f3dpz_1 _overlay_7cmc0_1",
|
|
4488
|
+
"fade-out": "_fade-out_f3dpz_5 _overlayFadeOut_7cmc0_34",
|
|
4489
|
+
"highlights-menu": "_highlights-menu_f3dpz_9 _panel_7cmc0_43",
|
|
4490
4490
|
visible: Yn,
|
|
4491
|
-
"slide-down": "_slide-
|
|
4492
|
-
"highlights-header": "_highlights-
|
|
4493
|
-
"close-button": "_close-
|
|
4494
|
-
"highlights-container": "_highlights-
|
|
4495
|
-
"actions-backdrop": "_actions-
|
|
4496
|
-
"highlight-list": "_highlight-
|
|
4497
|
-
"highlight-item": "_highlight-
|
|
4498
|
-
"highlight-item--expanded": "_highlight-item--
|
|
4499
|
-
"highlight-row": "_highlight-
|
|
4500
|
-
"highlight-label": "_highlight-
|
|
4501
|
-
"highlight-meta": "_highlight-
|
|
4502
|
-
"highlight-
|
|
4503
|
-
"highlight-color
|
|
4504
|
-
"highlight-color--
|
|
4505
|
-
"highlight-color--
|
|
4506
|
-
"highlight-color--
|
|
4507
|
-
"highlight-
|
|
4508
|
-
"
|
|
4509
|
-
"
|
|
4510
|
-
"
|
|
4511
|
-
"
|
|
4512
|
-
"highlight-
|
|
4513
|
-
"
|
|
4491
|
+
"slide-down": "_slide-down_f3dpz_33 _panelSlideDown_7cmc0_66",
|
|
4492
|
+
"highlights-header": "_highlights-header_f3dpz_46",
|
|
4493
|
+
"close-button": "_close-button_f3dpz_62",
|
|
4494
|
+
"highlights-container": "_highlights-container_f3dpz_89",
|
|
4495
|
+
"actions-backdrop": "_actions-backdrop_f3dpz_98",
|
|
4496
|
+
"highlight-list": "_highlight-list_f3dpz_109",
|
|
4497
|
+
"highlight-item": "_highlight-item_f3dpz_115",
|
|
4498
|
+
"highlight-item--expanded": "_highlight-item--expanded_f3dpz_120",
|
|
4499
|
+
"highlight-row": "_highlight-row_f3dpz_124",
|
|
4500
|
+
"highlight-label": "_highlight-label_f3dpz_150",
|
|
4501
|
+
"highlight-meta": "_highlight-meta_f3dpz_155",
|
|
4502
|
+
"highlight-meta-top": "_highlight-meta-top_f3dpz_164",
|
|
4503
|
+
"highlight-color": "_highlight-color_f3dpz_172",
|
|
4504
|
+
"highlight-color--yellow": "_highlight-color--yellow_f3dpz_179",
|
|
4505
|
+
"highlight-color--red": "_highlight-color--red_f3dpz_183",
|
|
4506
|
+
"highlight-color--blue": "_highlight-color--blue_f3dpz_187",
|
|
4507
|
+
"highlight-color--purple": "_highlight-color--purple_f3dpz_191",
|
|
4508
|
+
"highlight-page-num": "_highlight-page-num_f3dpz_195",
|
|
4509
|
+
"actions-toggle": "_actions-toggle_f3dpz_203",
|
|
4510
|
+
"highlight-actions": "_highlight-actions_f3dpz_230",
|
|
4511
|
+
"reveal-actions": "_reveal-actions_f3dpz_1",
|
|
4512
|
+
"highlight-swatch-row": "_highlight-swatch-row_f3dpz_255",
|
|
4513
|
+
"highlight-action-row": "_highlight-action-row_f3dpz_261",
|
|
4514
|
+
"empty-state": "_empty-state_f3dpz_343"
|
|
4514
4515
|
}, Jn = ["yellow", "red", "blue", "purple"], Xn = ({
|
|
4515
4516
|
highlights: S,
|
|
4516
4517
|
onClose: t,
|
|
@@ -4580,22 +4581,24 @@ const Yn = "_visible_cjy0d_29 _panelVisible_7cmc0_60", It = {
|
|
|
4580
4581
|
}, 1600);
|
|
4581
4582
|
}, []), A = At((x) => {
|
|
4582
4583
|
x.preventDefault();
|
|
4583
|
-
}, []), N = () => /* @__PURE__ */ J("ul", { className:
|
|
4584
|
+
}, []), N = () => /* @__PURE__ */ J("ul", { className: zt["highlight-list"], children: S.map((x) => {
|
|
4584
4585
|
const R = _[x.id], F = c(x), O = F.length > 140 ? `${F.slice(0, 140)}…` : F;
|
|
4585
|
-
return /* @__PURE__ */ _t("li", { className: `${
|
|
4586
|
-
/* @__PURE__ */ _t("div", { className:
|
|
4587
|
-
/* @__PURE__ */ J("span", { className:
|
|
4588
|
-
/* @__PURE__ */ _t("div", { className:
|
|
4589
|
-
/* @__PURE__ */
|
|
4590
|
-
|
|
4591
|
-
|
|
4586
|
+
return /* @__PURE__ */ _t("li", { className: `${zt["highlight-item"]} ${d === x.id ? zt["highlight-item--expanded"] : ""}`, children: [
|
|
4587
|
+
/* @__PURE__ */ _t("div", { className: zt["highlight-row"], onClick: () => r(x), children: [
|
|
4588
|
+
/* @__PURE__ */ J("span", { className: zt["highlight-label"], children: O }),
|
|
4589
|
+
/* @__PURE__ */ _t("div", { className: zt["highlight-meta"], children: [
|
|
4590
|
+
/* @__PURE__ */ _t("div", { className: zt["highlight-meta-top"], children: [
|
|
4591
|
+
/* @__PURE__ */ J("span", { className: `${zt["highlight-color"]} ${zt[`highlight-color--${x.color}`]}`, "aria-hidden": "true" }),
|
|
4592
|
+
R !== void 0 && /* @__PURE__ */ J("span", { className: zt["highlight-page-num"], children: R })
|
|
4593
|
+
] }),
|
|
4594
|
+
/* @__PURE__ */ J("button", { type: "button", className: zt["actions-toggle"], onClick: (U) => f(U, x.id), "aria-label": "Highlight actions", "aria-expanded": d === x.id, "data-highlight-toggle": x.id, children: "⋯" })
|
|
4592
4595
|
] })
|
|
4593
4596
|
] }),
|
|
4594
|
-
d === x.id && /* @__PURE__ */ _t("div", { className:
|
|
4595
|
-
/* @__PURE__ */ J("div", { className:
|
|
4597
|
+
d === x.id && /* @__PURE__ */ _t("div", { className: zt["highlight-actions"], onClick: (U) => U.stopPropagation(), "data-highlight-actions": x.id, children: [
|
|
4598
|
+
/* @__PURE__ */ J("div", { className: zt["highlight-swatch-row"], children: Jn.map((U) => /* @__PURE__ */ J("button", { type: "button", className: `highlight-swatch highlight-swatch--${U}${x.color === U ? " highlight-swatch--active" : ""}`, onClick: () => {
|
|
4596
4599
|
u(x.id, U);
|
|
4597
4600
|
}, "aria-label": `Change highlight to ${U}` }, U)) }),
|
|
4598
|
-
/* @__PURE__ */ _t("div", { className:
|
|
4601
|
+
/* @__PURE__ */ _t("div", { className: zt["highlight-action-row"], children: [
|
|
4599
4602
|
/* @__PURE__ */ J("button", { type: "button", className: "highlight-action-button", onClick: async () => {
|
|
4600
4603
|
await b(F), C();
|
|
4601
4604
|
}, children: "Copy" }),
|
|
@@ -4604,26 +4607,26 @@ const Yn = "_visible_cjy0d_29 _panelVisible_7cmc0_60", It = {
|
|
|
4604
4607
|
] })
|
|
4605
4608
|
] }, x.id);
|
|
4606
4609
|
}) });
|
|
4607
|
-
return /* @__PURE__ */ _t("div", { className: `${
|
|
4610
|
+
return /* @__PURE__ */ _t("div", { className: `${zt["highlights-overlay"]} ${l ? zt["fade-out"] : ""}`, onClick: i, onContextMenu: A, children: [
|
|
4608
4611
|
/* @__PURE__ */ _t("div", { className: `
|
|
4609
|
-
${
|
|
4610
|
-
${o ?
|
|
4611
|
-
${l ?
|
|
4612
|
+
${zt["highlights-menu"]}
|
|
4613
|
+
${o ? zt.visible : ""}
|
|
4614
|
+
${l ? zt["slide-down"] : ""}
|
|
4612
4615
|
`, onClick: (x) => x.stopPropagation(), onContextMenu: A, style: {
|
|
4613
4616
|
userSelect: "none",
|
|
4614
4617
|
WebkitUserSelect: "none",
|
|
4615
4618
|
WebkitTouchCallout: "none"
|
|
4616
4619
|
}, children: [
|
|
4617
|
-
/* @__PURE__ */ _t("div", { className:
|
|
4620
|
+
/* @__PURE__ */ _t("div", { className: zt["highlights-header"], children: [
|
|
4618
4621
|
/* @__PURE__ */ J("h2", { children: "Highlights" }),
|
|
4619
|
-
/* @__PURE__ */ J("button", { onClick: i, className:
|
|
4622
|
+
/* @__PURE__ */ J("button", { onClick: i, className: zt["close-button"], "aria-label": "Close menu", children: "✕" })
|
|
4620
4623
|
] }),
|
|
4621
|
-
/* @__PURE__ */ _t("div", { className:
|
|
4622
|
-
d && /* @__PURE__ */ J("button", { type: "button", className:
|
|
4623
|
-
S.length > 0 ? N() : /* @__PURE__ */ J("div", { className:
|
|
4624
|
+
/* @__PURE__ */ _t("div", { className: zt["highlights-container"], children: [
|
|
4625
|
+
d && /* @__PURE__ */ J("button", { type: "button", className: zt["actions-backdrop"], onClick: () => g(null), "aria-label": "Close highlight actions" }),
|
|
4626
|
+
S.length > 0 ? N() : /* @__PURE__ */ J("div", { className: zt["empty-state"], children: "No highlights yet" })
|
|
4624
4627
|
] })
|
|
4625
4628
|
] }),
|
|
4626
|
-
/* @__PURE__ */ J(
|
|
4629
|
+
/* @__PURE__ */ J(je, { message: "Copied to clipboard", visible: v })
|
|
4627
4630
|
] });
|
|
4628
4631
|
}, Qn = "_overlay_qt7kv_61", tr = "_fadeIn_qt7kv_1", er = "_fadeOut_qt7kv_86", nr = "_interactionZone_qt7kv_92", rr = "_centerZone_qt7kv_103", ir = "_iconWrapper_qt7kv_115", or = "_pulse_qt7kv_1", sr = "_label_qt7kv_139", ar = "_bottomIconGroup_qt7kv_151", lr = "_bottomIconWrapper_qt7kv_158", cr = "_bounceArrow_qt7kv_181", ur = "_bounce_qt7kv_181", hr = "_dismissButton_qt7kv_191", dr = "_float_qt7kv_1", Pt = {
|
|
4629
4632
|
overlay: Qn,
|
|
@@ -4678,7 +4681,7 @@ const Yn = "_visible_cjy0d_29 _panelVisible_7cmc0_60", It = {
|
|
|
4678
4681
|
bottom: "80px"
|
|
4679
4682
|
}, t[7] = a) : a = t[7];
|
|
4680
4683
|
let h;
|
|
4681
|
-
t[8] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ J("div", { className: Pt.bottomIconWrapper, children: /* @__PURE__ */ J(
|
|
4684
|
+
t[8] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ J("div", { className: Pt.bottomIconWrapper, children: /* @__PURE__ */ J($e, { size: 20 }) }), t[8] = h) : h = t[8];
|
|
4682
4685
|
let r;
|
|
4683
4686
|
t[9] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ _t("div", { className: Pt.bottomIconGroup, style: a, children: [
|
|
4684
4687
|
h,
|
|
@@ -4704,7 +4707,7 @@ const Yn = "_visible_cjy0d_29 _panelVisible_7cmc0_60", It = {
|
|
|
4704
4707
|
function qt(S) {
|
|
4705
4708
|
return Number.isFinite(S) ? Math.max(0, Math.min(1, S)) : 0;
|
|
4706
4709
|
}
|
|
4707
|
-
function
|
|
4710
|
+
function jt(S) {
|
|
4708
4711
|
return S.map((t) => ({
|
|
4709
4712
|
...t
|
|
4710
4713
|
}));
|
|
@@ -4809,16 +4812,16 @@ const Sr = me(({
|
|
|
4809
4812
|
} = un(), N = xe(() => ({
|
|
4810
4813
|
...kr,
|
|
4811
4814
|
..._
|
|
4812
|
-
}), [_]), [x, R] = Nt("none"), [F, O] =
|
|
4815
|
+
}), [_]), [x, R] = Nt("none"), [F, O] = Ht("bok_global_side_padding", 20), [U, st] = Ht("bok_global_top_padding", 30), [w, B] = Ht("bok_global_fontsize", 1.4), [n, E] = Ht("bok_global_line_height", 1.5), [Y, W] = Ht("bok_global_font_family", m), [it, H] = Ht("bok_global_theme", "Amoled Dark"), [V, I] = Nt([]), z = yt([]), nt = yt(0), Q = yt(null), j = yt(null), [lt, ht] = Nt(0), [ct, dt] = Nt(0), [pt, gt] = Ht("bok_tutorial_shown", !1), [xt, Ct] = Nt(!pt), e = yt(0), $ = yt(null), M = yt(!1), y = yt(/* @__PURE__ */ new Map()), p = yt(/* @__PURE__ */ new Map()), T = yt(null), q = yt(/* @__PURE__ */ new Set()), G = yt(""), P = N[it] ? it : "Amoled Dark", X = h ? `bok_highlights_${h}` : "", ot = a && a !== "Loading..." ? `bok_highlights_${a}` : "";
|
|
4813
4816
|
wt(() => {
|
|
4814
|
-
|
|
4817
|
+
z.current = V;
|
|
4815
4818
|
}, [V]);
|
|
4816
4819
|
const tt = At((L) => {
|
|
4817
4820
|
yr(y.current, L), u && u(L);
|
|
4818
4821
|
}, [u]), ut = At(() => h ? {
|
|
4819
4822
|
bookId: h,
|
|
4820
4823
|
progress: qt(nt.current),
|
|
4821
|
-
highlights:
|
|
4824
|
+
highlights: jt(z.current)
|
|
4822
4825
|
} : null, [h]), St = At((L) => {
|
|
4823
4826
|
e.current += 1;
|
|
4824
4827
|
try {
|
|
@@ -4831,21 +4834,21 @@ const Sr = me(({
|
|
|
4831
4834
|
}, []), mt = At((L) => {
|
|
4832
4835
|
if (!h || L.bookId !== h)
|
|
4833
4836
|
return "rejected";
|
|
4834
|
-
const K =
|
|
4837
|
+
const K = j.current;
|
|
4835
4838
|
return K ? (St(() => {
|
|
4836
4839
|
if (typeof L.progress == "number") {
|
|
4837
4840
|
const rt = qt(L.progress);
|
|
4838
|
-
nt.current = rt,
|
|
4841
|
+
nt.current = rt, $.current = rt, K.setProgress(rt);
|
|
4839
4842
|
}
|
|
4840
4843
|
if (Array.isArray(L.highlights)) {
|
|
4841
|
-
const rt =
|
|
4842
|
-
|
|
4844
|
+
const rt = jt(L.highlights);
|
|
4845
|
+
z.current = rt, I(rt);
|
|
4843
4846
|
}
|
|
4844
4847
|
}), "applied") : (T.current = {
|
|
4845
4848
|
...L,
|
|
4846
|
-
highlights: L.highlights ?
|
|
4849
|
+
highlights: L.highlights ? jt(L.highlights) : void 0
|
|
4847
4850
|
}, "queued");
|
|
4848
|
-
}, [h, St]),
|
|
4851
|
+
}, [h, St]), It = At((L) => {
|
|
4849
4852
|
if (!h || L.bookId !== h || c)
|
|
4850
4853
|
return;
|
|
4851
4854
|
const K = _r(L);
|
|
@@ -4854,7 +4857,7 @@ const Sr = me(({
|
|
|
4854
4857
|
const rt = ut();
|
|
4855
4858
|
if (!rt)
|
|
4856
4859
|
return;
|
|
4857
|
-
const at = typeof L.progress == "number" ? qt(L.progress) : rt.progress, ft = Array.isArray(L.highlights) ?
|
|
4860
|
+
const at = typeof L.progress == "number" ? qt(L.progress) : rt.progress, ft = Array.isArray(L.highlights) ? jt(L.highlights) : jt(rt.highlights), vt = [];
|
|
4858
4861
|
br(rt.progress, L.progress) && vt.push("progress"), Array.isArray(L.highlights) && rt.highlights.length > 0 && ft.length > 0 && !pr(rt.highlights, ft) && vt.push("highlights");
|
|
4859
4862
|
const bt = !!L.forceApply;
|
|
4860
4863
|
if (vt.length > 0 && !bt) {
|
|
@@ -4894,8 +4897,8 @@ const Sr = me(({
|
|
|
4894
4897
|
if (L) {
|
|
4895
4898
|
const K = JSON.parse(L);
|
|
4896
4899
|
if (Array.isArray(K)) {
|
|
4897
|
-
const rt =
|
|
4898
|
-
|
|
4900
|
+
const rt = jt(K);
|
|
4901
|
+
z.current = rt, I(rt);
|
|
4899
4902
|
return;
|
|
4900
4903
|
}
|
|
4901
4904
|
}
|
|
@@ -4904,15 +4907,15 @@ const Sr = me(({
|
|
|
4904
4907
|
if (K) {
|
|
4905
4908
|
const rt = JSON.parse(K);
|
|
4906
4909
|
if (Array.isArray(rt)) {
|
|
4907
|
-
const at =
|
|
4908
|
-
|
|
4910
|
+
const at = jt(rt);
|
|
4911
|
+
z.current = at, I(at), localStorage.setItem(X, JSON.stringify(at));
|
|
4909
4912
|
return;
|
|
4910
4913
|
}
|
|
4911
4914
|
}
|
|
4912
4915
|
}
|
|
4913
|
-
|
|
4916
|
+
z.current = [], I([]);
|
|
4914
4917
|
} catch (L) {
|
|
4915
|
-
console.warn(`Error reading highlights for "${X}":`, L),
|
|
4918
|
+
console.warn(`Error reading highlights for "${X}":`, L), z.current = [], I([]);
|
|
4916
4919
|
}
|
|
4917
4920
|
}, [X, ot]), wt(() => {
|
|
4918
4921
|
if (X)
|
|
@@ -4922,17 +4925,17 @@ const Sr = me(({
|
|
|
4922
4925
|
console.warn(`Error saving highlights for "${X}":`, L);
|
|
4923
4926
|
}
|
|
4924
4927
|
}, [V, X]), wt(() => {
|
|
4925
|
-
o &&
|
|
4926
|
-
}, [
|
|
4927
|
-
if (c || !
|
|
4928
|
+
o && It(o);
|
|
4929
|
+
}, [It, o]), wt(() => {
|
|
4930
|
+
if (c || !j.current || !T.current)
|
|
4928
4931
|
return;
|
|
4929
4932
|
const L = T.current;
|
|
4930
4933
|
T.current = null, mt(L);
|
|
4931
4934
|
}, [mt, c, r]), wt(() => {
|
|
4932
|
-
y.current.clear(), p.current.forEach((L) => clearTimeout(L)), p.current.clear(), q.current.clear(), G.current = "", T.current = null,
|
|
4935
|
+
y.current.clear(), p.current.forEach((L) => clearTimeout(L)), p.current.clear(), q.current.clear(), G.current = "", T.current = null, $.current = null, M.current = !1, nt.current = 0;
|
|
4933
4936
|
}, [h]);
|
|
4934
4937
|
const Bt = At((L) => {
|
|
4935
|
-
|
|
4938
|
+
I((K) => [...K, L]), !(!h || e.current > 0) && tt({
|
|
4936
4939
|
type: "highlight.add",
|
|
4937
4940
|
mutationId: fe("hl_add"),
|
|
4938
4941
|
bookId: h,
|
|
@@ -4946,7 +4949,7 @@ const Sr = me(({
|
|
|
4946
4949
|
if (p.current.has(L))
|
|
4947
4950
|
return;
|
|
4948
4951
|
const K = () => {
|
|
4949
|
-
p.current.delete(L),
|
|
4952
|
+
p.current.delete(L), I((vt) => vt.filter((bt) => bt.id !== L)), !(!h || e.current > 0) && tt({
|
|
4950
4953
|
type: "highlight.remove",
|
|
4951
4954
|
mutationId: fe("hl_remove"),
|
|
4952
4955
|
bookId: h,
|
|
@@ -4964,7 +4967,7 @@ const Sr = me(({
|
|
|
4964
4967
|
const at = setTimeout(K, 300);
|
|
4965
4968
|
p.current.set(L, at);
|
|
4966
4969
|
}, [h, tt]), Ot = At((L, K) => {
|
|
4967
|
-
|
|
4970
|
+
I((rt) => rt.map((at) => at.id === L ? {
|
|
4968
4971
|
...at,
|
|
4969
4972
|
color: K
|
|
4970
4973
|
} : at)), !(!h || e.current > 0) && tt({
|
|
@@ -4978,10 +4981,10 @@ const Sr = me(({
|
|
|
4978
4981
|
}, [h, tt]), D = At((L) => {
|
|
4979
4982
|
const K = qt(L);
|
|
4980
4983
|
if (nt.current = K, !M.current) {
|
|
4981
|
-
M.current = !0,
|
|
4984
|
+
M.current = !0, $.current = K;
|
|
4982
4985
|
return;
|
|
4983
4986
|
}
|
|
4984
|
-
c || !h || e.current > 0 ||
|
|
4987
|
+
c || !h || e.current > 0 || $.current !== null && Math.abs($.current - K) <= we || ($.current = K, tt({
|
|
4985
4988
|
type: "progress.set",
|
|
4986
4989
|
mutationId: fe("progress"),
|
|
4987
4990
|
bookId: h,
|
|
@@ -5035,24 +5038,24 @@ const Sr = me(({
|
|
|
5035
5038
|
/* @__PURE__ */ J(En, { isLoading: c }),
|
|
5036
5039
|
r && /* @__PURE__ */ _t(pe, { children: [
|
|
5037
5040
|
xt && !c && /* @__PURE__ */ J(fr, { onDismiss: Z }),
|
|
5038
|
-
/* @__PURE__ */ J(Cn, { ref:
|
|
5039
|
-
x === "options" && /* @__PURE__ */ J(
|
|
5041
|
+
/* @__PURE__ */ J(Cn, { ref: j, content: r, title: a, bookId: h, setIsLoading: A, fontSize: w, lineHeight: n, topPadding: U, sidePadding: F, fontFamily: Y, isOptionMenuVisible: x !== "none", containerElementRef: Q, showTutorial: xt, onPageChange: ht, onPageCountChange: dt, onProgressChange: D, highlights: V, onAddHighlight: Bt, onRemoveHighlight: Et, onUpdateHighlightColor: Ot }),
|
|
5042
|
+
x === "options" && /* @__PURE__ */ J(In, { onClose: () => R("none"), fontSize: w, lineHeight: n, topPadding: U, padding: F, fontFamily: Y, theme: it, setTopPadding: st, setPadding: O, setFontSize: B, setLineHeight: E, setFontFamily: W, setTheme: H, allThemes: N, supportedFonts: g }),
|
|
5040
5043
|
x === "navigation" && !c && /* @__PURE__ */ J(Zn, { toc: f, currentPage: lt, totalPages: ct, onClose: () => R("none"), onGoToPage: (L) => {
|
|
5041
5044
|
var K;
|
|
5042
|
-
return (K =
|
|
5045
|
+
return (K = j.current) == null ? void 0 : K.goToPage(L);
|
|
5043
5046
|
}, onChapterClick: (L) => {
|
|
5044
5047
|
var K;
|
|
5045
|
-
return (K =
|
|
5048
|
+
return (K = j.current) == null ? void 0 : K.findAndJumpToHref(L);
|
|
5046
5049
|
} }),
|
|
5047
5050
|
x === "highlights" && !c && /* @__PURE__ */ J(Xn, { highlights: V, onClose: () => R("none"), onGoToPage: (L) => {
|
|
5048
5051
|
var K;
|
|
5049
|
-
return (K =
|
|
5052
|
+
return (K = j.current) == null ? void 0 : K.goToPage(L);
|
|
5050
5053
|
}, onRemoveHighlight: Et, onUpdateHighlightColor: Ot }),
|
|
5051
5054
|
x === "none" && !xt && !c && /* @__PURE__ */ _t("div", { className: "bottom-interaction-layer", children: [
|
|
5052
5055
|
/* @__PURE__ */ J("div", { className: "trigger-zone", onClick: () => R("highlights"), "aria-label": "Open Highlights" }),
|
|
5053
5056
|
/* @__PURE__ */ J("div", { className: "trigger-zone", onClick: () => R("navigation"), "aria-label": "Open Navigation" }),
|
|
5054
5057
|
/* @__PURE__ */ J("div", { className: "trigger-zone", onClick: () => R("options"), "aria-label": "Open Settings" }),
|
|
5055
|
-
/* @__PURE__ */ J("div", { className: "settings-icon", onClick: () => R("options"), "aria-label": "Open Settings", children: /* @__PURE__ */ J(
|
|
5058
|
+
/* @__PURE__ */ J("div", { className: "settings-icon", onClick: () => R("options"), "aria-label": "Open Settings", children: /* @__PURE__ */ J($e, { size: 16 }) }),
|
|
5056
5059
|
/* @__PURE__ */ J("div", { className: "highlights-icon", "aria-label": "Highlights", children: /* @__PURE__ */ J(Qe, { size: 16 }) })
|
|
5057
5060
|
] })
|
|
5058
5061
|
] }),
|