bok-reader 0.6.7 → 0.6.8

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 CHANGED
@@ -1,19 +1,19 @@
1
1
  import { jsxs as yt, jsx as tt, Fragment as Xt } from "react/jsx-runtime";
2
- import Ce, { forwardRef as Qt, createElement as ne, useState as Et, useRef as bt, useCallback as St, useEffect as _t, memo as ze, useImperativeHandle as xe, useLayoutEffect as ce, useMemo as ue } from "react";
2
+ import Ce, { forwardRef as Qt, createElement as ne, useState as Et, useRef as bt, useCallback as xt, useEffect as _t, memo as ze, useImperativeHandle as Se, useLayoutEffect as ce, useMemo as ue } from "react";
3
3
  import './main.css';/**
4
4
  * @license lucide-react v0.555.0 - ISC
5
5
  *
6
6
  * This source code is licensed under the ISC license.
7
7
  * See the LICENSE file in the root directory of this source tree.
8
8
  */
9
- const Re = (x) => x.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Oe = (x) => x.replace(
9
+ const Re = (S) => S.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Oe = (S) => S.replace(
10
10
  /^([A-Z])|[\s-_]+(\w)/g,
11
11
  (t, s, k) => k ? k.toUpperCase() : s.toLowerCase()
12
- ), he = (x) => {
13
- const t = Oe(x);
12
+ ), he = (S) => {
13
+ const t = Oe(S);
14
14
  return t.charAt(0).toUpperCase() + t.slice(1);
15
- }, Se = (...x) => x.filter((t, s, k) => !!t && t.trim() !== "" && k.indexOf(t) === s).join(" ").trim(), Pe = (x) => {
16
- for (const t in x)
15
+ }, xe = (...S) => S.filter((t, s, k) => !!t && t.trim() !== "" && k.indexOf(t) === s).join(" ").trim(), Pe = (S) => {
16
+ for (const t in S)
17
17
  if (t.startsWith("aria-") || t === "role" || t === "title")
18
18
  return !0;
19
19
  };
@@ -42,7 +42,7 @@ var Be = {
42
42
  */
43
43
  const Le = Qt(
44
44
  ({
45
- color: x = "currentColor",
45
+ color: S = "currentColor",
46
46
  size: t = 24,
47
47
  strokeWidth: s = 2,
48
48
  absoluteStrokeWidth: k,
@@ -57,9 +57,9 @@ const Le = Qt(
57
57
  ...Be,
58
58
  width: t,
59
59
  height: t,
60
- stroke: x,
60
+ stroke: S,
61
61
  strokeWidth: k ? Number(s) * 24 / Number(t) : s,
62
- className: Se("lucide", c),
62
+ className: xe("lucide", c),
63
63
  ...!a && !Pe(r) && { "aria-hidden": "true" },
64
64
  ...r
65
65
  },
@@ -75,20 +75,20 @@ const Le = Qt(
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
77
  */
78
- const se = (x, t) => {
78
+ const se = (S, t) => {
79
79
  const s = Qt(
80
80
  ({ className: k, ...c }, a) => ne(Le, {
81
81
  ref: a,
82
82
  iconNode: t,
83
- className: Se(
84
- `lucide-${Re(he(x))}`,
85
- `lucide-${x}`,
83
+ className: xe(
84
+ `lucide-${Re(he(S))}`,
85
+ `lucide-${S}`,
86
86
  k
87
87
  ),
88
88
  ...c
89
89
  })
90
90
  );
91
- return s.displayName = he(x), s;
91
+ return s.displayName = he(S), s;
92
92
  };
93
93
  /**
94
94
  * @license lucide-react v0.555.0 - ISC
@@ -128,11 +128,11 @@ const $e = [
128
128
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
129
129
  ], Ee = se("settings", $e);
130
130
  var Zt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
131
- function We(x) {
132
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
131
+ function We(S) {
132
+ return S && S.__esModule && Object.prototype.hasOwnProperty.call(S, "default") ? S.default : S;
133
133
  }
134
- function Gt(x) {
135
- throw new Error('Could not dynamically require "' + x + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
134
+ function Gt(S) {
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
137
  var Ae = { exports: {} };
138
138
  /*!
@@ -146,9 +146,9 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js
146
146
  JSZip uses the library pako released under the MIT license :
147
147
  https://github.com/nodeca/pako/blob/main/LICENSE
148
148
  */
149
- (function(x, t) {
149
+ (function(S, t) {
150
150
  (function(s) {
151
- x.exports = s();
151
+ S.exports = s();
152
152
  })(function() {
153
153
  return function s(k, c, a) {
154
154
  function u(_, y) {
@@ -176,8 +176,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
176
176
  }({ 1: [function(s, k, c) {
177
177
  var a = s("./utils"), u = s("./support"), r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
178
178
  c.encode = function(h) {
179
- for (var _, y, g, v, o, d, i, f = [], l = 0, m = h.length, C = m, S = a.getTypeOf(h) !== "string"; l < h.length; )
180
- C = m - l, g = S ? (_ = h[l++], y = l < m ? h[l++] : 0, l < m ? h[l++] : 0) : (_ = h.charCodeAt(l++), y = l < m ? h.charCodeAt(l++) : 0, l < m ? h.charCodeAt(l++) : 0), v = _ >> 2, o = (3 & _) << 4 | y >> 4, d = 1 < C ? (15 & y) << 2 | g >> 6 : 64, i = 2 < C ? 63 & g : 64, f.push(r.charAt(v) + r.charAt(o) + r.charAt(d) + r.charAt(i));
179
+ for (var _, y, g, v, o, d, i, f = [], l = 0, m = h.length, C = m, x = a.getTypeOf(h) !== "string"; l < h.length; )
180
+ C = m - l, g = x ? (_ = h[l++], y = l < m ? h[l++] : 0, l < m ? h[l++] : 0) : (_ = h.charCodeAt(l++), y = l < m ? h.charCodeAt(l++) : 0, l < m ? h.charCodeAt(l++) : 0), v = _ >> 2, o = (3 & _) << 4 | y >> 4, d = 1 < C ? (15 & y) << 2 | g >> 6 : 64, i = 2 < C ? 63 & g : 64, f.push(r.charAt(v) + r.charAt(o) + r.charAt(d) + r.charAt(i));
181
181
  return f.join("");
182
182
  }, c.decode = function(h) {
183
183
  var _, y, g, v, o, d, i = 0, f = 0, l = "data:";
@@ -273,7 +273,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
273
273
  return f;
274
274
  }
275
275
  function u(o, d, i, f, l, m) {
276
- var C, S, A = o.file, N = o.compression, O = m !== _.utf8encode, F = r.transformTo("string", m(A.name)), P = r.transformTo("string", _.utf8encode(A.name)), j = A.comment, nt = r.transformTo("string", m(j)), w = r.transformTo("string", _.utf8encode(j)), L = P.length !== A.name.length, n = w.length !== j.length, z = "", J = "", $ = "", et = A.dir, H = A.date, Y = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
276
+ var C, x, A = o.file, N = o.compression, O = m !== _.utf8encode, F = r.transformTo("string", m(A.name)), P = r.transformTo("string", _.utf8encode(A.name)), j = A.comment, nt = r.transformTo("string", m(j)), w = r.transformTo("string", _.utf8encode(j)), L = P.length !== A.name.length, n = w.length !== j.length, z = "", J = "", $ = "", et = A.dir, H = A.date, Y = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
277
277
  d && !i || (Y.crc32 = o.crc32, Y.compressedSize = o.compressedSize, Y.uncompressedSize = o.uncompressedSize);
278
278
  var I = 0;
279
279
  d && (I |= 8), O || !L && !n || (I |= 2048);
@@ -283,10 +283,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
283
283
  return Z || (ft = ct ? 16893 : 33204), (65535 & ft) << 16;
284
284
  }(A.unixPermissions, et)) : (rt = 20, R |= function(Z) {
285
285
  return 63 & (Z || 0);
286
- }(A.dosPermissions)), C = H.getUTCHours(), C <<= 6, C |= H.getUTCMinutes(), C <<= 5, C |= H.getUTCSeconds() / 2, S = H.getUTCFullYear() - 1980, S <<= 4, S |= H.getUTCMonth() + 1, S <<= 5, S |= H.getUTCDate(), L && (J = a(1, 1) + a(y(F), 4) + P, z += "up" + a(J.length, 2) + J), n && ($ = a(1, 1) + a(y(nt), 4) + w, z += "uc" + a($.length, 2) + $);
286
+ }(A.dosPermissions)), C = H.getUTCHours(), C <<= 6, C |= H.getUTCMinutes(), C <<= 5, C |= H.getUTCSeconds() / 2, x = H.getUTCFullYear() - 1980, x <<= 4, x |= H.getUTCMonth() + 1, x <<= 5, x |= H.getUTCDate(), L && (J = a(1, 1) + a(y(F), 4) + P, z += "up" + a(J.length, 2) + J), n && ($ = a(1, 1) + a(y(nt), 4) + w, z += "uc" + a($.length, 2) + $);
287
287
  var X = "";
288
288
  return X += `
289
- \0`, X += a(I, 2), X += N.magic, X += a(C, 2), X += a(S, 2), X += a(Y.crc32, 4), X += a(Y.compressedSize, 4), X += a(Y.uncompressedSize, 4), X += a(F.length, 2), X += a(z.length, 2), { fileRecord: g.LOCAL_FILE_HEADER + X + F + z, dirRecord: g.CENTRAL_FILE_HEADER + a(rt, 2) + X + a(nt.length, 2) + "\0\0\0\0" + a(R, 4) + a(f, 4) + F + z + nt };
289
+ \0`, X += a(I, 2), X += N.magic, X += a(C, 2), X += a(x, 2), X += a(Y.crc32, 4), X += a(Y.compressedSize, 4), X += a(Y.uncompressedSize, 4), X += a(F.length, 2), X += a(z.length, 2), { fileRecord: g.LOCAL_FILE_HEADER + X + F + z, dirRecord: g.CENTRAL_FILE_HEADER + a(rt, 2) + X + a(nt.length, 2) + "\0\0\0\0" + a(R, 4) + a(f, 4) + F + z + nt };
290
290
  }
291
291
  var r = s("../utils"), h = s("../stream/GenericWorker"), _ = s("../utf8"), y = s("../crc32"), g = s("../signature");
292
292
  function v(o, d, i, f) {
@@ -317,8 +317,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
317
317
  }, v.prototype.flush = function() {
318
318
  for (var o = this.bytesWritten, d = 0; d < this.dirRecords.length; d++)
319
319
  this.push({ data: this.dirRecords[d], meta: { percent: 100 } });
320
- var i = this.bytesWritten - o, f = function(l, m, C, S, A) {
321
- var N = r.transformTo("string", A(S));
320
+ var i = this.bytesWritten - o, f = function(l, m, C, x, A) {
321
+ var N = r.transformTo("string", A(x));
322
322
  return g.CENTRAL_DIRECTORY_END + "\0\0\0\0" + a(l, 2) + a(l, 2) + a(m, 4) + a(C, 4) + a(N.length, 2) + N;
323
323
  }(this.dirRecords.length, i, o, this.zipComment, this.encodeFileName);
324
324
  this.push({ data: f, meta: { percent: 100 } });
@@ -359,9 +359,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
359
359
  r.forEach(function(v, o) {
360
360
  g++;
361
361
  var d = function(m, C) {
362
- var S = m || C, A = a[S];
362
+ var x = m || C, A = a[x];
363
363
  if (!A)
364
- throw new Error(S + " is not a valid compression method !");
364
+ throw new Error(x + " is not a valid compression method !");
365
365
  return A;
366
366
  }(o.options.compression, h.compression), i = o.options.compressionOptions || h.compressionOptions || {}, f = o.dir, l = o.date;
367
367
  o._compressWorker(d, i).withStreamInfo("file", { name: v, dir: f, date: l, comment: o.comment || "", unixPermissions: o.unixPermissions, dosPermissions: o.dosPermissions }).pipe(y);
@@ -412,8 +412,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
412
412
  return u.Promise.all(f);
413
413
  }).then(function(i) {
414
414
  for (var f = i.shift(), l = f.files, m = 0; m < l.length; m++) {
415
- var C = l[m], S = C.fileNameStr, A = a.resolve(C.fileNameStr);
416
- d.file(A, C.decompressed, { binary: !0, optimizedBinaryString: !0, date: C.date, dir: C.dir, comment: C.fileCommentStr.length ? C.fileCommentStr : null, unixPermissions: C.unixPermissions, dosPermissions: C.dosPermissions, createFolders: o.createFolders }), C.dir || (d.file(A).unsafeOriginalName = S);
415
+ var C = l[m], x = C.fileNameStr, A = a.resolve(C.fileNameStr);
416
+ d.file(A, C.decompressed, { binary: !0, optimizedBinaryString: !0, date: C.date, dir: C.dir, comment: C.fileCommentStr.length ? C.fileCommentStr : null, unixPermissions: C.unixPermissions, dosPermissions: C.dosPermissions, createFolders: o.createFolders }), C.dir || (d.file(A).unsafeOriginalName = x);
417
417
  }
418
418
  return f.zipComment.length && (d.comment = f.zipComment), d;
419
419
  });
@@ -493,7 +493,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
493
493
  function C(A) {
494
494
  return Object.prototype.toString.call(A) === "[object RegExp]";
495
495
  }
496
- var S = { load: function() {
496
+ var x = { load: function() {
497
497
  throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
498
498
  }, forEach: function(A) {
499
499
  var N, O, F;
@@ -554,7 +554,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
554
554
  }, generateNodeStream: function(A, N) {
555
555
  return (A = A || {}).type || (A.type = "nodebuffer"), this.generateInternalStream(A).toNodejsStream(N);
556
556
  } };
557
- k.exports = S;
557
+ k.exports = x;
558
558
  }, { "./compressedObject": 2, "./defaults": 5, "./generate": 9, "./nodejs/NodejsStreamInputAdapter": 12, "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31, "./utils": 32, "./zipObject": 35 }], 16: [function(s, k, c) {
559
559
  k.exports = s("stream");
560
560
  }, { stream: void 0 }], 17: [function(s, k, c) {
@@ -790,7 +790,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
790
790
  }
791
791
  function v(d, i) {
792
792
  return new y.Promise(function(f, l) {
793
- var m = [], C = d._internalType, S = d._outputType, A = d._mimeType;
793
+ var m = [], C = d._internalType, x = d._outputType, A = d._mimeType;
794
794
  d.on("data", function(N, O) {
795
795
  m.push(N), i && i(O);
796
796
  }).on("error", function(N) {
@@ -806,7 +806,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
806
806
  default:
807
807
  return a.transformTo(O, F);
808
808
  }
809
- }(S, function(O, F) {
809
+ }(x, function(O, F) {
810
810
  var P, j = 0, nt = null, w = 0;
811
811
  for (P = 0; P < F.length; P++)
812
812
  w += F[P].length;
@@ -900,27 +900,27 @@ https://github.com/nodeca/pako/blob/main/LICENSE
900
900
  }
901
901
  c.utf8encode = function(o) {
902
902
  return u.nodebuffer ? r.newBufferFrom(o, "utf-8") : function(d) {
903
- var i, f, l, m, C, S = d.length, A = 0;
904
- for (m = 0; m < S; m++)
905
- (64512 & (f = d.charCodeAt(m))) == 55296 && m + 1 < S && (64512 & (l = d.charCodeAt(m + 1))) == 56320 && (f = 65536 + (f - 55296 << 10) + (l - 56320), m++), A += f < 128 ? 1 : f < 2048 ? 2 : f < 65536 ? 3 : 4;
903
+ var i, f, l, m, C, x = d.length, A = 0;
904
+ for (m = 0; m < x; m++)
905
+ (64512 & (f = d.charCodeAt(m))) == 55296 && m + 1 < x && (64512 & (l = d.charCodeAt(m + 1))) == 56320 && (f = 65536 + (f - 55296 << 10) + (l - 56320), m++), A += f < 128 ? 1 : f < 2048 ? 2 : f < 65536 ? 3 : 4;
906
906
  for (i = u.uint8array ? new Uint8Array(A) : new Array(A), m = C = 0; C < A; m++)
907
- (64512 & (f = d.charCodeAt(m))) == 55296 && m + 1 < S && (64512 & (l = d.charCodeAt(m + 1))) == 56320 && (f = 65536 + (f - 55296 << 10) + (l - 56320), m++), f < 128 ? i[C++] = f : (f < 2048 ? i[C++] = 192 | f >>> 6 : (f < 65536 ? i[C++] = 224 | f >>> 12 : (i[C++] = 240 | f >>> 18, i[C++] = 128 | f >>> 12 & 63), i[C++] = 128 | f >>> 6 & 63), i[C++] = 128 | 63 & f);
907
+ (64512 & (f = d.charCodeAt(m))) == 55296 && m + 1 < x && (64512 & (l = d.charCodeAt(m + 1))) == 56320 && (f = 65536 + (f - 55296 << 10) + (l - 56320), m++), f < 128 ? i[C++] = f : (f < 2048 ? i[C++] = 192 | f >>> 6 : (f < 65536 ? i[C++] = 224 | f >>> 12 : (i[C++] = 240 | f >>> 18, i[C++] = 128 | f >>> 12 & 63), i[C++] = 128 | f >>> 6 & 63), i[C++] = 128 | 63 & f);
908
908
  return i;
909
909
  }(o);
910
910
  }, c.utf8decode = function(o) {
911
911
  return u.nodebuffer ? a.transformTo("nodebuffer", o).toString("utf-8") : function(d) {
912
- var i, f, l, m, C = d.length, S = new Array(2 * C);
912
+ var i, f, l, m, C = d.length, x = new Array(2 * C);
913
913
  for (i = f = 0; i < C; )
914
914
  if ((l = d[i++]) < 128)
915
- S[f++] = l;
915
+ x[f++] = l;
916
916
  else if (4 < (m = _[l]))
917
- S[f++] = 65533, i += m - 1;
917
+ x[f++] = 65533, i += m - 1;
918
918
  else {
919
919
  for (l &= m === 2 ? 31 : m === 3 ? 15 : 7; 1 < m && i < C; )
920
920
  l = l << 6 | 63 & d[i++], m--;
921
- 1 < m ? S[f++] = 65533 : l < 65536 ? S[f++] = l : (l -= 65536, S[f++] = 55296 | l >> 10 & 1023, S[f++] = 56320 | 1023 & l);
921
+ 1 < m ? x[f++] = 65533 : l < 65536 ? x[f++] = l : (l -= 65536, x[f++] = 55296 | l >> 10 & 1023, x[f++] = 56320 | 1023 & l);
922
922
  }
923
- return S.length !== f && (S.subarray ? S = S.subarray(0, f) : S.length = f), a.applyFromCharCode(S);
923
+ return x.length !== f && (x.subarray ? x = x.subarray(0, f) : x.length = f), a.applyFromCharCode(x);
924
924
  }(o = a.transformTo(u.uint8array ? "uint8array" : "array", o));
925
925
  }, a.inherits(g, h), g.prototype.processChunk = function(o) {
926
926
  var d = a.transformTo(u.uint8array ? "uint8array" : "array", o.data);
@@ -933,10 +933,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
933
933
  this.leftOver = null;
934
934
  }
935
935
  var f = function(m, C) {
936
- var S;
937
- for ((C = C || m.length) > m.length && (C = m.length), S = C - 1; 0 <= S && (192 & m[S]) == 128; )
938
- S--;
939
- return S < 0 || S === 0 ? C : S + _[m[S]] > C ? S : C;
936
+ var x;
937
+ for ((C = C || m.length) > m.length && (C = m.length), x = C - 1; 0 <= x && (192 & m[x]) == 128; )
938
+ x--;
939
+ return x < 0 || x === 0 ? C : x + _[m[x]] > C ? x : C;
940
940
  }(d), l = d;
941
941
  f !== d.length && (u.uint8array ? (l = d.subarray(0, f), this.leftOver = d.subarray(f, d.length)) : (l = d.slice(0, f), this.leftOver = d.slice(f, d.length))), this.push({ data: c.utf8decode(l), meta: o.meta });
942
942
  }, g.prototype.flush = function() {
@@ -968,11 +968,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
968
968
  }
969
969
  };
970
970
  var g = { stringifyByChunk: function(i, f, l) {
971
- var m = [], C = 0, S = i.length;
972
- if (S <= l)
971
+ var m = [], C = 0, x = i.length;
972
+ if (x <= l)
973
973
  return String.fromCharCode.apply(null, i);
974
- for (; C < S; )
975
- f === "array" || f === "nodebuffer" ? m.push(String.fromCharCode.apply(null, i.slice(C, Math.min(C + l, S)))) : m.push(String.fromCharCode.apply(null, i.subarray(C, Math.min(C + l, S)))), C += l;
974
+ for (; C < x; )
975
+ f === "array" || f === "nodebuffer" ? m.push(String.fromCharCode.apply(null, i.slice(C, Math.min(C + l, x)))) : m.push(String.fromCharCode.apply(null, i.subarray(C, Math.min(C + l, x)))), C += l;
976
976
  return m.join("");
977
977
  }, stringifyByChar: function(i) {
978
978
  for (var f = "", l = 0; l < i.length; l++)
@@ -1080,20 +1080,20 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1080
1080
  Object.prototype.hasOwnProperty.call(arguments[i], f) && l[f] === void 0 && (l[f] = arguments[i][f]);
1081
1081
  return l;
1082
1082
  }, c.prepareContent = function(i, f, l, m, C) {
1083
- return h.Promise.resolve(f).then(function(S) {
1084
- return a.blob && (S instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(S)) !== -1) && typeof FileReader < "u" ? new h.Promise(function(A, N) {
1083
+ return h.Promise.resolve(f).then(function(x) {
1084
+ return a.blob && (x instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(x)) !== -1) && typeof FileReader < "u" ? new h.Promise(function(A, N) {
1085
1085
  var O = new FileReader();
1086
1086
  O.onload = function(F) {
1087
1087
  A(F.target.result);
1088
1088
  }, O.onerror = function(F) {
1089
1089
  N(F.target.error);
1090
- }, O.readAsArrayBuffer(S);
1091
- }) : S;
1092
- }).then(function(S) {
1093
- var A = c.getTypeOf(S);
1094
- return A ? (A === "arraybuffer" ? S = c.transformTo("uint8array", S) : A === "string" && (C ? S = u.decode(S) : l && m !== !0 && (S = function(N) {
1090
+ }, O.readAsArrayBuffer(x);
1091
+ }) : x;
1092
+ }).then(function(x) {
1093
+ var A = c.getTypeOf(x);
1094
+ return A ? (A === "arraybuffer" ? x = c.transformTo("uint8array", x) : A === "string" && (C ? x = u.decode(x) : l && m !== !0 && (x = function(N) {
1095
1095
  return y(N, a.uint8array ? new Uint8Array(N.length) : new Array(N.length));
1096
- }(S))), S) : h.Promise.reject(new Error("Can't read the data of '" + i + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
1096
+ }(x))), x) : h.Promise.reject(new Error("Can't read the data of '" + i + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
1097
1097
  });
1098
1098
  };
1099
1099
  }, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(s, k, c) {
@@ -1322,13 +1322,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1322
1322
  }
1323
1323
  function o(l, m, C) {
1324
1324
  a(function() {
1325
- var S;
1325
+ var x;
1326
1326
  try {
1327
- S = m(C);
1327
+ x = m(C);
1328
1328
  } catch (A) {
1329
1329
  return r.reject(l, A);
1330
1330
  }
1331
- S === l ? r.reject(l, new TypeError("Cannot resolve promise with itself")) : r.resolve(l, S);
1331
+ x === l ? r.reject(l, new TypeError("Cannot resolve promise with itself")) : r.resolve(l, x);
1332
1332
  });
1333
1333
  }
1334
1334
  function d(l) {
@@ -1340,23 +1340,23 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1340
1340
  }
1341
1341
  function i(l, m) {
1342
1342
  var C = !1;
1343
- function S(O) {
1343
+ function x(O) {
1344
1344
  C || (C = !0, r.reject(l, O));
1345
1345
  }
1346
1346
  function A(O) {
1347
1347
  C || (C = !0, r.resolve(l, O));
1348
1348
  }
1349
1349
  var N = f(function() {
1350
- m(A, S);
1350
+ m(A, x);
1351
1351
  });
1352
- N.status === "error" && S(N.value);
1352
+ N.status === "error" && x(N.value);
1353
1353
  }
1354
1354
  function f(l, m) {
1355
1355
  var C = {};
1356
1356
  try {
1357
1357
  C.value = l(m), C.status = "success";
1358
- } catch (S) {
1359
- C.status = "error", C.value = S;
1358
+ } catch (x) {
1359
+ C.status = "error", C.value = x;
1360
1360
  }
1361
1361
  return C;
1362
1362
  }
@@ -1392,9 +1392,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1392
1392
  var C = f(d, m);
1393
1393
  if (C.status === "error")
1394
1394
  return r.reject(l, C.value);
1395
- var S = C.value;
1396
- if (S)
1397
- i(l, S);
1395
+ var x = C.value;
1396
+ if (x)
1397
+ i(l, x);
1398
1398
  else {
1399
1399
  l.state = _, l.outcome = m;
1400
1400
  for (var A = -1, N = l.queue.length; ++A < N; )
@@ -1403,7 +1403,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1403
1403
  return l;
1404
1404
  }, r.reject = function(l, m) {
1405
1405
  l.state = h, l.outcome = m;
1406
- for (var C = -1, S = l.queue.length; ++C < S; )
1406
+ for (var C = -1, x = l.queue.length; ++C < x; )
1407
1407
  l.queue[C].callRejected(m);
1408
1408
  return l;
1409
1409
  }, g.resolve = function(l) {
@@ -1415,7 +1415,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1415
1415
  var m = this;
1416
1416
  if (Object.prototype.toString.call(l) !== "[object Array]")
1417
1417
  return this.reject(new TypeError("must be an array"));
1418
- var C = l.length, S = !1;
1418
+ var C = l.length, x = !1;
1419
1419
  if (!C)
1420
1420
  return this.resolve([]);
1421
1421
  for (var A = new Array(C), N = 0, O = -1, F = new this(u); ++O < C; )
@@ -1423,23 +1423,23 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1423
1423
  return F;
1424
1424
  function P(j, nt) {
1425
1425
  m.resolve(j).then(function(w) {
1426
- A[nt] = w, ++N !== C || S || (S = !0, r.resolve(F, A));
1426
+ A[nt] = w, ++N !== C || x || (x = !0, r.resolve(F, A));
1427
1427
  }, function(w) {
1428
- S || (S = !0, r.reject(F, w));
1428
+ x || (x = !0, r.reject(F, w));
1429
1429
  });
1430
1430
  }
1431
1431
  }, g.race = function(l) {
1432
1432
  var m = this;
1433
1433
  if (Object.prototype.toString.call(l) !== "[object Array]")
1434
1434
  return this.reject(new TypeError("must be an array"));
1435
- var C = l.length, S = !1;
1435
+ var C = l.length, x = !1;
1436
1436
  if (!C)
1437
1437
  return this.resolve([]);
1438
1438
  for (var A = -1, N = new this(u); ++A < C; )
1439
1439
  O = l[A], m.resolve(O).then(function(F) {
1440
- S || (S = !0, r.resolve(N, F));
1440
+ x || (x = !0, r.resolve(N, F));
1441
1441
  }, function(F) {
1442
- S || (S = !0, r.reject(N, F));
1442
+ x || (x = !0, r.reject(N, F));
1443
1443
  });
1444
1444
  var O;
1445
1445
  return N;
@@ -1459,8 +1459,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1459
1459
  if (C !== g)
1460
1460
  throw new Error(h[C]);
1461
1461
  if (m.header && a.deflateSetHeader(this.strm, m.header), m.dictionary) {
1462
- var S;
1463
- if (S = typeof m.dictionary == "string" ? r.string2buf(m.dictionary) : y.call(m.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(m.dictionary) : m.dictionary, (C = a.deflateSetDictionary(this.strm, S)) !== g)
1462
+ var x;
1463
+ if (x = typeof m.dictionary == "string" ? r.string2buf(m.dictionary) : y.call(m.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(m.dictionary) : m.dictionary, (C = a.deflateSetDictionary(this.strm, x)) !== g)
1464
1464
  throw new Error(h[C]);
1465
1465
  this._dict_set = !0;
1466
1466
  }
@@ -1472,16 +1472,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1472
1472
  return C.result;
1473
1473
  }
1474
1474
  i.prototype.push = function(l, m) {
1475
- var C, S, A = this.strm, N = this.options.chunkSize;
1475
+ var C, x, A = this.strm, N = this.options.chunkSize;
1476
1476
  if (this.ended)
1477
1477
  return !1;
1478
- S = m === ~~m ? m : m === !0 ? 4 : 0, typeof l == "string" ? A.input = r.string2buf(l) : y.call(l) === "[object ArrayBuffer]" ? A.input = new Uint8Array(l) : A.input = l, A.next_in = 0, A.avail_in = A.input.length;
1478
+ x = m === ~~m ? m : m === !0 ? 4 : 0, typeof l == "string" ? A.input = r.string2buf(l) : y.call(l) === "[object ArrayBuffer]" ? A.input = new Uint8Array(l) : A.input = l, A.next_in = 0, A.avail_in = A.input.length;
1479
1479
  do {
1480
- if (A.avail_out === 0 && (A.output = new u.Buf8(N), A.next_out = 0, A.avail_out = N), (C = a.deflate(A, S)) !== 1 && C !== g)
1480
+ if (A.avail_out === 0 && (A.output = new u.Buf8(N), A.next_out = 0, A.avail_out = N), (C = a.deflate(A, x)) !== 1 && C !== g)
1481
1481
  return this.onEnd(C), !(this.ended = !0);
1482
- A.avail_out !== 0 && (A.avail_in !== 0 || S !== 4 && S !== 2) || (this.options.to === "string" ? this.onData(r.buf2binstring(u.shrinkBuf(A.output, A.next_out))) : this.onData(u.shrinkBuf(A.output, A.next_out)));
1482
+ A.avail_out !== 0 && (A.avail_in !== 0 || x !== 4 && x !== 2) || (this.options.to === "string" ? this.onData(r.buf2binstring(u.shrinkBuf(A.output, A.next_out))) : this.onData(u.shrinkBuf(A.output, A.next_out)));
1483
1483
  } while ((0 < A.avail_in || A.avail_out === 0) && C !== 1);
1484
- return S === 4 ? (C = a.deflateEnd(this.strm), this.onEnd(C), this.ended = !0, C === g) : S !== 2 || (this.onEnd(g), !(A.avail_out = 0));
1484
+ return x === 4 ? (C = a.deflateEnd(this.strm), this.onEnd(C), this.ended = !0, C === g) : x !== 2 || (this.onEnd(g), !(A.avail_out = 0));
1485
1485
  }, i.prototype.onData = function(l) {
1486
1486
  this.chunks.push(l);
1487
1487
  }, i.prototype.onEnd = function(l) {
@@ -1511,14 +1511,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1511
1511
  return l.result;
1512
1512
  }
1513
1513
  o.prototype.push = function(i, f) {
1514
- var l, m, C, S, A, N, O = this.strm, F = this.options.chunkSize, P = this.options.dictionary, j = !1;
1514
+ var l, m, C, x, A, N, O = this.strm, F = this.options.chunkSize, P = this.options.dictionary, j = !1;
1515
1515
  if (this.ended)
1516
1516
  return !1;
1517
1517
  m = f === ~~f ? f : f === !0 ? h.Z_FINISH : h.Z_NO_FLUSH, typeof i == "string" ? O.input = r.binstring2buf(i) : v.call(i) === "[object ArrayBuffer]" ? O.input = new Uint8Array(i) : O.input = i, O.next_in = 0, O.avail_in = O.input.length;
1518
1518
  do {
1519
1519
  if (O.avail_out === 0 && (O.output = new u.Buf8(F), O.next_out = 0, O.avail_out = F), (l = a.inflate(O, h.Z_NO_FLUSH)) === h.Z_NEED_DICT && P && (N = typeof P == "string" ? r.string2buf(P) : v.call(P) === "[object ArrayBuffer]" ? new Uint8Array(P) : P, l = a.inflateSetDictionary(this.strm, N)), l === h.Z_BUF_ERROR && j === !0 && (l = h.Z_OK, j = !1), l !== h.Z_STREAM_END && l !== h.Z_OK)
1520
1520
  return this.onEnd(l), !(this.ended = !0);
1521
- O.next_out && (O.avail_out !== 0 && l !== h.Z_STREAM_END && (O.avail_in !== 0 || m !== h.Z_FINISH && m !== h.Z_SYNC_FLUSH) || (this.options.to === "string" ? (C = r.utf8border(O.output, O.next_out), S = O.next_out - C, A = r.buf2string(O.output, C), O.next_out = S, O.avail_out = F - S, S && u.arraySet(O.output, O.output, C, S, 0), this.onData(A)) : this.onData(u.shrinkBuf(O.output, O.next_out)))), O.avail_in === 0 && O.avail_out === 0 && (j = !0);
1521
+ O.next_out && (O.avail_out !== 0 && l !== h.Z_STREAM_END && (O.avail_in !== 0 || m !== h.Z_FINISH && m !== h.Z_SYNC_FLUSH) || (this.options.to === "string" ? (C = r.utf8border(O.output, O.next_out), x = O.next_out - C, A = r.buf2string(O.output, C), O.next_out = x, O.avail_out = F - x, x && u.arraySet(O.output, O.output, C, x, 0), this.onData(A)) : this.onData(u.shrinkBuf(O.output, O.next_out)))), O.avail_in === 0 && O.avail_out === 0 && (j = !0);
1522
1522
  } while ((0 < O.avail_in || O.avail_out === 0) && l !== h.Z_STREAM_END);
1523
1523
  return l === h.Z_STREAM_END && (m = h.Z_FINISH), m === h.Z_FINISH ? (l = a.inflateEnd(this.strm), this.onEnd(l), this.ended = !0, l === h.Z_OK) : m !== h.Z_SYNC_FLUSH || (this.onEnd(h.Z_OK), !(O.avail_out = 0));
1524
1524
  }, o.prototype.onData = function(i) {
@@ -1648,7 +1648,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1648
1648
  return -1 ^ u;
1649
1649
  };
1650
1650
  }, {}], 46: [function(s, k, c) {
1651
- var a, u = s("../utils/common"), r = s("./trees"), h = s("./adler32"), _ = s("./crc32"), y = s("./messages"), g = 0, v = 4, o = 0, d = -2, i = -1, f = 4, l = 2, m = 8, C = 9, S = 286, A = 30, N = 19, O = 2 * S + 1, F = 15, P = 3, j = 258, nt = j + P + 1, w = 42, L = 113, n = 1, z = 2, J = 3, $ = 4;
1651
+ var a, u = s("../utils/common"), r = s("./trees"), h = s("./adler32"), _ = s("./crc32"), y = s("./messages"), g = 0, v = 4, o = 0, d = -2, i = -1, f = 4, l = 2, m = 8, C = 9, x = 286, A = 30, N = 19, O = 2 * x + 1, F = 15, P = 3, j = 258, nt = j + P + 1, w = 42, L = 113, n = 1, z = 2, J = 3, $ = 4;
1652
1652
  function et(e, W) {
1653
1653
  return e.msg = y[W], W;
1654
1654
  }
@@ -1754,7 +1754,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1754
1754
  this.good_length = e, this.max_lazy = W, this.nice_length = M, this.max_chain = b, this.func = p;
1755
1755
  }
1756
1756
  function pt() {
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 = m, 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 u.Buf16(2 * O), this.dyn_dtree = new u.Buf16(2 * (2 * A + 1)), this.bl_tree = new u.Buf16(2 * (2 * N + 1)), Y(this.dyn_ltree), Y(this.dyn_dtree), Y(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new u.Buf16(F + 1), this.heap = new u.Buf16(2 * S + 1), Y(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new u.Buf16(2 * S + 1), Y(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;
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 = m, 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 u.Buf16(2 * O), this.dyn_dtree = new u.Buf16(2 * (2 * A + 1)), this.bl_tree = new u.Buf16(2 * (2 * N + 1)), Y(this.dyn_ltree), Y(this.dyn_dtree), Y(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new u.Buf16(F + 1), this.heap = new u.Buf16(2 * x + 1), Y(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new u.Buf16(2 * x + 1), Y(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 ht(e) {
1760
1760
  var W;
@@ -1906,11 +1906,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1906
1906
  };
1907
1907
  }, {}], 48: [function(s, k, c) {
1908
1908
  k.exports = function(a, u) {
1909
- var r, h, _, y, g, v, o, d, i, f, l, m, C, S, A, N, O, F, P, j, nt, w, L, n, z;
1910
- r = a.state, h = a.next_in, n = a.input, _ = h + (a.avail_in - 5), y = a.next_out, z = a.output, g = y - (u - a.avail_out), v = y + (a.avail_out - 257), o = r.dmax, d = r.wsize, i = r.whave, f = r.wnext, l = r.window, m = r.hold, C = r.bits, S = r.lencode, A = r.distcode, N = (1 << r.lenbits) - 1, O = (1 << r.distbits) - 1;
1909
+ var r, h, _, y, g, v, o, d, i, f, l, m, C, x, A, N, O, F, P, j, nt, w, L, n, z;
1910
+ r = a.state, h = a.next_in, n = a.input, _ = h + (a.avail_in - 5), y = a.next_out, z = a.output, g = y - (u - a.avail_out), v = y + (a.avail_out - 257), o = r.dmax, d = r.wsize, i = r.whave, f = r.wnext, l = r.window, m = r.hold, C = r.bits, x = r.lencode, A = r.distcode, N = (1 << r.lenbits) - 1, O = (1 << r.distbits) - 1;
1911
1911
  t:
1912
1912
  do {
1913
- C < 15 && (m += n[h++] << C, C += 8, m += n[h++] << C, C += 8), F = S[m & N];
1913
+ C < 15 && (m += n[h++] << C, C += 8, m += n[h++] << C, C += 8), F = x[m & N];
1914
1914
  e:
1915
1915
  for (; ; ) {
1916
1916
  if (m >>>= P = F >>> 24, C -= P, (P = F >>> 16 & 255) === 0)
@@ -1918,7 +1918,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1918
1918
  else {
1919
1919
  if (!(16 & P)) {
1920
1920
  if (!(64 & P)) {
1921
- F = S[(65535 & F) + (m & (1 << P) - 1)];
1921
+ F = x[(65535 & F) + (m & (1 << P) - 1)];
1922
1922
  continue e;
1923
1923
  }
1924
1924
  if (32 & P) {
@@ -1997,13 +1997,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
1997
1997
  var L;
1998
1998
  return w && w.state ? (L = w.state, w.total_in = w.total_out = L.total = 0, w.msg = "", L.wrap && (w.adler = 1 & L.wrap), L.mode = d, L.last = 0, L.havedict = 0, L.dmax = 32768, L.head = null, L.hold = 0, L.bits = 0, L.lencode = L.lendyn = new a.Buf32(i), L.distcode = L.distdyn = new a.Buf32(f), L.sane = 1, L.back = -1, v) : o;
1999
1999
  }
2000
- function S(w) {
2000
+ function x(w) {
2001
2001
  var L;
2002
2002
  return w && w.state ? ((L = w.state).wsize = 0, L.whave = 0, L.wnext = 0, C(w)) : o;
2003
2003
  }
2004
2004
  function A(w, L) {
2005
2005
  var n, z;
2006
- return w && w.state ? (z = w.state, L < 0 ? (n = 0, L = -L) : (n = 1 + (L >> 4), L < 48 && (L &= 15)), L && (L < 8 || 15 < L) ? o : (z.window !== null && z.wbits !== L && (z.window = null), z.wrap = n, z.wbits = L, S(w))) : o;
2006
+ return w && w.state ? (z = w.state, L < 0 ? (n = 0, L = -L) : (n = 1 + (L >> 4), L < 48 && (L &= 15)), L && (L < 8 || 15 < L) ? o : (z.window !== null && z.wbits !== L && (z.window = null), z.wrap = n, z.wbits = L, x(w))) : o;
2007
2007
  }
2008
2008
  function N(w, L) {
2009
2009
  var n, z;
@@ -2031,7 +2031,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
2031
2031
  var J, $ = w.state;
2032
2032
  return $.window === null && ($.wsize = 1 << $.wbits, $.wnext = 0, $.whave = 0, $.window = new a.Buf8($.wsize)), z >= $.wsize ? (a.arraySet($.window, L, n - $.wsize, $.wsize, 0), $.wnext = 0, $.whave = $.wsize) : (z < (J = $.wsize - $.wnext) && (J = z), a.arraySet($.window, L, n - z, J, $.wnext), (z -= J) ? (a.arraySet($.window, L, n - z, z, 0), $.wnext = z, $.whave = $.wsize) : ($.wnext += J, $.wnext === $.wsize && ($.wnext = 0), $.whave < $.wsize && ($.whave += J))), 0;
2033
2033
  }
2034
- c.inflateReset = S, c.inflateReset2 = A, c.inflateResetKeep = C, c.inflateInit = function(w) {
2034
+ c.inflateReset = x, c.inflateReset2 = A, c.inflateResetKeep = C, c.inflateInit = function(w) {
2035
2035
  return N(w, 15);
2036
2036
  }, c.inflateInit2 = N, c.inflate = function(w, L) {
2037
2037
  var n, z, J, $, et, H, Y, I, R, rt, X, Z, ct, ft, ot, ut, pt, ht, kt, vt, e, W, M, b, p = 0, T = new a.Buf8(4), q = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
@@ -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, c) {
2456
2456
  var a = s("../utils/common"), u = [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], r = [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], h = [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], _ = [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(y, g, v, o, d, i, f, l) {
2458
- var m, C, S, A, N, O, F, P, j, nt = l.bits, w = 0, L = 0, n = 0, z = 0, J = 0, $ = 0, et = 0, H = 0, Y = 0, I = 0, R = null, rt = 0, X = new a.Buf16(16), Z = new a.Buf16(16), ct = null, ft = 0;
2458
+ var m, C, x, A, N, O, F, P, j, nt = l.bits, w = 0, L = 0, n = 0, z = 0, J = 0, $ = 0, et = 0, H = 0, Y = 0, I = 0, R = null, rt = 0, X = new a.Buf16(16), Z = new a.Buf16(16), ct = null, ft = 0;
2459
2459
  for (w = 0; w <= 15; w++)
2460
2460
  X[w] = 0;
2461
2461
  for (L = 0; L < o; L++)
@@ -2475,7 +2475,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
2475
2475
  Z[w + 1] = Z[w] + X[w];
2476
2476
  for (L = 0; L < o; L++)
2477
2477
  g[v + L] !== 0 && (f[Z[g[v + L]]++] = L);
2478
- if (O = y === 0 ? (R = ct = f, 19) : y === 1 ? (R = u, rt -= 257, ct = r, ft -= 257, 256) : (R = h, ct = _, -1), w = n, N = i, et = L = I = 0, S = -1, A = (Y = 1 << ($ = J)) - 1, y === 1 && 852 < Y || y === 2 && 592 < Y)
2478
+ if (O = y === 0 ? (R = ct = f, 19) : y === 1 ? (R = u, rt -= 257, ct = r, ft -= 257, 256) : (R = h, ct = _, -1), w = n, N = i, et = L = I = 0, x = -1, A = (Y = 1 << ($ = J)) - 1, y === 1 && 852 < Y || y === 2 && 592 < Y)
2479
2479
  return 1;
2480
2480
  for (; ; ) {
2481
2481
  for (F = w - et, j = f[L] < O ? (P = 0, f[L]) : f[L] > O ? (P = ct[ft + f[L]], R[rt + f[L]]) : (P = 96, 0), m = 1 << w - et, n = C = 1 << $; d[N + (I >> et) + (C -= m)] = F << 24 | P << 16 | j | 0, C !== 0; )
@@ -2487,12 +2487,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
2487
2487
  break;
2488
2488
  w = g[v + f[L]];
2489
2489
  }
2490
- if (J < w && (I & A) !== S) {
2490
+ if (J < w && (I & A) !== x) {
2491
2491
  for (et === 0 && (et = J), N += n, H = 1 << ($ = w - et); $ + et < z && !((H -= X[$ + et]) <= 0); )
2492
2492
  $++, H <<= 1;
2493
2493
  if (Y += 1 << $, y === 1 && 852 < Y || y === 2 && 592 < Y)
2494
2494
  return 1;
2495
- d[S = I & A] = J << 24 | $ << 16 | N - i | 0;
2495
+ d[x = I & A] = J << 24 | $ << 16 | N - i | 0;
2496
2496
  }
2497
2497
  }
2498
2498
  return I !== 0 && (d[N + I] = w - et << 24 | 64 << 16 | 0), l.bits = J, 0;
@@ -2505,7 +2505,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
2505
2505
  for (var T = p.length; 0 <= --T; )
2506
2506
  p[T] = 0;
2507
2507
  }
2508
- var _ = 0, y = 29, g = 256, v = g + 1 + y, o = 30, d = 19, i = 2 * v + 1, f = 15, l = 16, m = 7, C = 256, S = 16, A = 17, N = 18, O = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], F = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], P = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], j = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], nt = new Array(2 * (v + 2));
2508
+ var _ = 0, y = 29, g = 256, v = g + 1 + y, o = 30, d = 19, i = 2 * v + 1, f = 15, l = 16, m = 7, C = 256, x = 16, A = 17, N = 18, O = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], F = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], P = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], j = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], nt = new Array(2 * (v + 2));
2509
2509
  h(nt);
2510
2510
  var w = new Array(2 * o);
2511
2511
  h(w);
@@ -2588,11 +2588,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
2588
2588
  for (B = lt; q = p.heap[1], p.heap[1] = p.heap[p.heap_len--], ht(p, V, 1), G = p.heap[1], p.heap[--p.heap_max] = q, p.heap[--p.heap_max] = G, V[2 * B] = V[2 * q] + V[2 * G], p.depth[B] = (p.depth[q] >= p.depth[G] ? p.depth[q] : p.depth[G]) + 1, V[2 * q + 1] = V[2 * G + 1] = B, p.heap[1] = B++, ht(p, V, 1), 2 <= p.heap_len; )
2589
2589
  ;
2590
2590
  p.heap[--p.heap_max] = p.heap[1], function(mt, Ct) {
2591
- var Rt, E, D, U, K, st, at = Ct.dyn_tree, dt = Ct.max_code, gt = Ct.stat_desc.static_tree, At = Ct.stat_desc.has_stree, xt = Ct.stat_desc.extra_bits, Ot = Ct.stat_desc.extra_base, Pt = Ct.stat_desc.max_length, Lt = 0;
2591
+ var Rt, E, D, U, K, st, at = Ct.dyn_tree, dt = Ct.max_code, gt = Ct.stat_desc.static_tree, At = Ct.stat_desc.has_stree, St = Ct.stat_desc.extra_bits, Ot = Ct.stat_desc.extra_base, Pt = Ct.stat_desc.max_length, Lt = 0;
2592
2592
  for (U = 0; U <= f; U++)
2593
2593
  mt.bl_count[U] = 0;
2594
2594
  for (at[2 * mt.heap[mt.heap_max] + 1] = 0, Rt = mt.heap_max + 1; Rt < i; Rt++)
2595
- Pt < (U = at[2 * at[2 * (E = mt.heap[Rt]) + 1] + 1] + 1) && (U = Pt, Lt++), at[2 * E + 1] = U, dt < E || (mt.bl_count[U]++, K = 0, Ot <= E && (K = xt[E - Ot]), st = at[2 * E], mt.opt_len += st * (U + K), At && (mt.static_len += st * (gt[2 * E + 1] + K)));
2595
+ Pt < (U = at[2 * at[2 * (E = mt.heap[Rt]) + 1] + 1] + 1) && (U = Pt, Lt++), at[2 * E + 1] = U, dt < E || (mt.bl_count[U]++, K = 0, Ot <= E && (K = St[E - Ot]), st = at[2 * E], mt.opt_len += st * (U + K), At && (mt.static_len += st * (gt[2 * E + 1] + K)));
2596
2596
  if (Lt !== 0) {
2597
2597
  do {
2598
2598
  for (U = Pt - 1; mt.bl_count[U] === 0; )
@@ -2608,7 +2608,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
2608
2608
  function e(p, T, q) {
2609
2609
  var G, B, V = -1, it = T[1], Q = 0, lt = 7, wt = 4;
2610
2610
  for (it === 0 && (lt = 138, wt = 3), T[2 * (q + 1) + 1] = 65535, G = 0; G <= q; G++)
2611
- B = it, it = T[2 * (G + 1) + 1], ++Q < lt && B === it || (Q < wt ? p.bl_tree[2 * B] += Q : B !== 0 ? (B !== V && p.bl_tree[2 * B]++, p.bl_tree[2 * S]++) : Q <= 10 ? p.bl_tree[2 * A]++ : p.bl_tree[2 * N]++, V = B, wt = (Q = 0) === it ? (lt = 138, 3) : B === it ? (lt = 6, 3) : (lt = 7, 4));
2611
+ B = it, it = T[2 * (G + 1) + 1], ++Q < lt && B === it || (Q < wt ? p.bl_tree[2 * B] += Q : B !== 0 ? (B !== V && p.bl_tree[2 * B]++, p.bl_tree[2 * x]++) : Q <= 10 ? p.bl_tree[2 * A]++ : p.bl_tree[2 * N]++, V = B, wt = (Q = 0) === it ? (lt = 138, 3) : B === it ? (lt = 6, 3) : (lt = 7, 4));
2612
2612
  }
2613
2613
  function W(p, T, q) {
2614
2614
  var G, B, V = -1, it = T[1], Q = 0, lt = 7, wt = 4;
@@ -2618,7 +2618,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
2618
2618
  for (; Z(p, B, p.bl_tree), --Q != 0; )
2619
2619
  ;
2620
2620
  else
2621
- B !== 0 ? (B !== V && (Z(p, B, p.bl_tree), Q--), Z(p, S, p.bl_tree), X(p, Q - 3, 2)) : Q <= 10 ? (Z(p, A, p.bl_tree), X(p, Q - 3, 3)) : (Z(p, N, p.bl_tree), X(p, Q - 11, 7));
2621
+ B !== 0 ? (B !== V && (Z(p, B, p.bl_tree), Q--), Z(p, x, p.bl_tree), X(p, Q - 3, 2)) : Q <= 10 ? (Z(p, A, p.bl_tree), X(p, Q - 3, 3)) : (Z(p, N, p.bl_tree), X(p, Q - 11, 7));
2622
2622
  V = B, wt = (Q = 0) === it ? (lt = 138, 3) : B === it ? (lt = 6, 3) : (lt = 7, 4);
2623
2623
  }
2624
2624
  }
@@ -2695,46 +2695,46 @@ https://github.com/nodeca/pako/blob/main/LICENSE
2695
2695
  (function(u, r) {
2696
2696
  if (!u.setImmediate) {
2697
2697
  var h, _, y, g, v = 1, o = {}, d = !1, i = u.document, f = Object.getPrototypeOf && Object.getPrototypeOf(u);
2698
- f = f && f.setTimeout ? f : u, h = {}.toString.call(u.process) === "[object process]" ? function(S) {
2698
+ f = f && f.setTimeout ? f : u, h = {}.toString.call(u.process) === "[object process]" ? function(x) {
2699
2699
  process.nextTick(function() {
2700
- m(S);
2700
+ m(x);
2701
2701
  });
2702
2702
  } : function() {
2703
2703
  if (u.postMessage && !u.importScripts) {
2704
- var S = !0, A = u.onmessage;
2704
+ var x = !0, A = u.onmessage;
2705
2705
  return u.onmessage = function() {
2706
- S = !1;
2707
- }, u.postMessage("", "*"), u.onmessage = A, S;
2706
+ x = !1;
2707
+ }, u.postMessage("", "*"), u.onmessage = A, x;
2708
2708
  }
2709
- }() ? (g = "setImmediate$" + Math.random() + "$", u.addEventListener ? u.addEventListener("message", C, !1) : u.attachEvent("onmessage", C), function(S) {
2710
- u.postMessage(g + S, "*");
2711
- }) : u.MessageChannel ? ((y = new MessageChannel()).port1.onmessage = function(S) {
2712
- m(S.data);
2713
- }, function(S) {
2714
- y.port2.postMessage(S);
2715
- }) : i && "onreadystatechange" in i.createElement("script") ? (_ = i.documentElement, function(S) {
2709
+ }() ? (g = "setImmediate$" + Math.random() + "$", u.addEventListener ? u.addEventListener("message", C, !1) : u.attachEvent("onmessage", C), function(x) {
2710
+ u.postMessage(g + x, "*");
2711
+ }) : u.MessageChannel ? ((y = new MessageChannel()).port1.onmessage = function(x) {
2712
+ m(x.data);
2713
+ }, function(x) {
2714
+ y.port2.postMessage(x);
2715
+ }) : i && "onreadystatechange" in i.createElement("script") ? (_ = i.documentElement, function(x) {
2716
2716
  var A = i.createElement("script");
2717
2717
  A.onreadystatechange = function() {
2718
- m(S), A.onreadystatechange = null, _.removeChild(A), A = null;
2718
+ m(x), A.onreadystatechange = null, _.removeChild(A), A = null;
2719
2719
  }, _.appendChild(A);
2720
- }) : function(S) {
2721
- setTimeout(m, 0, S);
2722
- }, f.setImmediate = function(S) {
2723
- typeof S != "function" && (S = new Function("" + S));
2720
+ }) : function(x) {
2721
+ setTimeout(m, 0, x);
2722
+ }, f.setImmediate = function(x) {
2723
+ typeof x != "function" && (x = new Function("" + x));
2724
2724
  for (var A = new Array(arguments.length - 1), N = 0; N < A.length; N++)
2725
2725
  A[N] = arguments[N + 1];
2726
- var O = { callback: S, args: A };
2726
+ var O = { callback: x, args: A };
2727
2727
  return o[v] = O, h(v), v++;
2728
2728
  }, f.clearImmediate = l;
2729
2729
  }
2730
- function l(S) {
2731
- delete o[S];
2730
+ function l(x) {
2731
+ delete o[x];
2732
2732
  }
2733
- function m(S) {
2733
+ function m(x) {
2734
2734
  if (d)
2735
- setTimeout(m, 0, S);
2735
+ setTimeout(m, 0, x);
2736
2736
  else {
2737
- var A = o[S];
2737
+ var A = o[x];
2738
2738
  if (A) {
2739
2739
  d = !0;
2740
2740
  try {
@@ -2758,13 +2758,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
2758
2758
  }
2759
2759
  })(A);
2760
2760
  } finally {
2761
- l(S), d = !1;
2761
+ l(x), d = !1;
2762
2762
  }
2763
2763
  }
2764
2764
  }
2765
2765
  }
2766
- function C(S) {
2767
- S.source === u && typeof S.data == "string" && S.data.indexOf(g) === 0 && m(+S.data.slice(g.length));
2766
+ function C(x) {
2767
+ x.source === u && typeof x.data == "string" && x.data.indexOf(g) === 0 && m(+x.data.slice(g.length));
2768
2768
  }
2769
2769
  })(typeof self > "u" ? a === void 0 ? this : a : self);
2770
2770
  }).call(this, typeof Zt < "u" ? Zt : typeof self < "u" ? self : typeof window < "u" ? window : {});
@@ -2773,16 +2773,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
2773
2773
  })(Ae);
2774
2774
  var je = Ae.exports;
2775
2775
  const He = /* @__PURE__ */ We(je);
2776
- function re(x) {
2777
- return x ? x.trim().toLowerCase().replace(/\s+/g, " ") : "";
2776
+ function re(S) {
2777
+ return S ? S.trim().toLowerCase().replace(/\s+/g, " ") : "";
2778
2778
  }
2779
- function Kt(x, t) {
2780
- const s = x.querySelector(t);
2779
+ function Kt(S, t) {
2780
+ const s = S.querySelector(t);
2781
2781
  return re(s == null ? void 0 : s.textContent);
2782
2782
  }
2783
- function qe(x) {
2783
+ function qe(S) {
2784
2784
  var y;
2785
- const t = x.querySelector("package"), s = ((y = t == null ? void 0 : t.getAttribute("unique-identifier")) == null ? void 0 : y.trim()) ?? "", k = Array.from(x.querySelectorAll("metadata > dc\\:identifier, metadata > identifier"));
2785
+ const t = S.querySelector("package"), s = ((y = t == null ? void 0 : t.getAttribute("unique-identifier")) == null ? void 0 : y.trim()) ?? "", k = Array.from(S.querySelectorAll("metadata > dc\\:identifier, metadata > identifier"));
2786
2786
  let c = "";
2787
2787
  if (s) {
2788
2788
  const g = k.find((v) => v.getAttribute("id") === s);
@@ -2790,26 +2790,26 @@ function qe(x) {
2790
2790
  }
2791
2791
  if (!c && k.length > 0 && (c = re(k[0].textContent)), c)
2792
2792
  return `id=${c}`;
2793
- const a = Kt(x, "metadata > dc\\:title, metadata > title"), u = Kt(x, "metadata > dc\\:creator, metadata > creator"), r = Kt(x, "metadata > dc\\:language, metadata > language"), h = Kt(x, "metadata > dc\\:publisher, metadata > publisher"), _ = `title=${a}|creator=${u}|language=${r}|publisher=${h}`;
2793
+ const a = Kt(S, "metadata > dc\\:title, metadata > title"), u = Kt(S, "metadata > dc\\:creator, metadata > creator"), r = Kt(S, "metadata > dc\\:language, metadata > language"), h = Kt(S, "metadata > dc\\:publisher, metadata > publisher"), _ = `title=${a}|creator=${u}|language=${r}|publisher=${h}`;
2794
2794
  return _ === "title=|creator=|language=|publisher=" ? "unknown-book" : _;
2795
2795
  }
2796
- async function Ze(x) {
2796
+ async function Ze(S) {
2797
2797
  var s;
2798
2798
  if ((s = globalThis.crypto) != null && s.subtle && typeof TextEncoder < "u") {
2799
- const k = new TextEncoder().encode(x), c = await globalThis.crypto.subtle.digest("SHA-256", k);
2799
+ const k = new TextEncoder().encode(S), c = await globalThis.crypto.subtle.digest("SHA-256", k);
2800
2800
  return Array.from(new Uint8Array(c)).map((a) => a.toString(16).padStart(2, "0")).join("");
2801
2801
  }
2802
2802
  let t = 5381;
2803
- for (let k = 0; k < x.length; k += 1)
2804
- t = (t << 5) + t ^ x.charCodeAt(k);
2803
+ for (let k = 0; k < S.length; k += 1)
2804
+ t = (t << 5) + t ^ S.charCodeAt(k);
2805
2805
  return (t >>> 0).toString(16).padStart(8, "0");
2806
2806
  }
2807
- async function Ge(x) {
2808
- const t = qe(x);
2807
+ async function Ge(S) {
2808
+ const t = qe(S);
2809
2809
  return `bok_${(await Ze(t)).slice(0, 32)}`;
2810
2810
  }
2811
- function de(x, t) {
2812
- const s = x.split("/");
2811
+ function de(S, t) {
2812
+ const s = S.split("/");
2813
2813
  s.pop();
2814
2814
  const k = t.split("/");
2815
2815
  for (const c of k)
@@ -2817,8 +2817,8 @@ function de(x, t) {
2817
2817
  return s.join("/");
2818
2818
  }
2819
2819
  function Ke() {
2820
- const [x, t] = Et(""), [s, k] = Et(!0), [c, a] = Et(""), [u, r] = Et(""), [h, _] = Et([]), [y, g] = Et(null), v = bt(""), o = bt(""), d = bt(null), i = bt(null), f = bt({}), l = bt(async () => {
2821
- }), m = St(async (n) => {
2820
+ const [S, t] = Et(""), [s, k] = Et(!0), [c, a] = Et(""), [u, r] = Et(""), [h, _] = Et([]), [y, g] = Et(null), v = bt(""), o = bt(""), d = bt(null), i = bt(null), f = bt({}), l = bt(async () => {
2821
+ }), m = xt(async (n) => {
2822
2822
  k(!0), t(""), _([]), a("Loading..."), r(""), g(null), v.current = "", o.current = "", f.current = {}, i.current && (document.head.removeChild(i.current), URL.revokeObjectURL(i.current.href), i.current = null);
2823
2823
  try {
2824
2824
  let z;
@@ -2857,7 +2857,7 @@ function Ke() {
2857
2857
  const z = n.querySelector("metadata > dc\\:title") || n.querySelector("metadata > title");
2858
2858
  a((z == null ? void 0 : z.textContent) || "Untitled Book");
2859
2859
  }
2860
- async function S(n) {
2860
+ async function x(n) {
2861
2861
  if (!d.current)
2862
2862
  return;
2863
2863
  const z = {}, J = {};
@@ -2906,7 +2906,7 @@ function Ke() {
2906
2906
  }
2907
2907
  L(), t(et);
2908
2908
  }
2909
- l.current = S;
2909
+ l.current = x;
2910
2910
  async function A(n, z, J) {
2911
2911
  let $ = null, et = null;
2912
2912
  const H = Object.keys(z).find((ct) => {
@@ -3049,7 +3049,7 @@ function Ke() {
3049
3049
  return {
3050
3050
  title: c,
3051
3051
  bookId: u,
3052
- rawContent: x,
3052
+ rawContent: S,
3053
3053
  toc: h,
3054
3054
  isLoading: s,
3055
3055
  error: y,
@@ -3057,24 +3057,24 @@ function Ke() {
3057
3057
  setIsLoading: k
3058
3058
  };
3059
3059
  }
3060
- function jt(x, t) {
3060
+ function jt(S, t) {
3061
3061
  const [s, k] = Et(() => {
3062
3062
  if (typeof window > "u")
3063
3063
  return t;
3064
3064
  try {
3065
- const c = localStorage.getItem(x);
3065
+ const c = localStorage.getItem(S);
3066
3066
  return c ? JSON.parse(c) : t;
3067
3067
  } catch (c) {
3068
- return console.warn(`Error reading localStorage key "${x}":`, c), t;
3068
+ return console.warn(`Error reading localStorage key "${S}":`, c), t;
3069
3069
  }
3070
3070
  });
3071
3071
  return _t(() => {
3072
3072
  try {
3073
- s !== void 0 && localStorage.setItem(x, JSON.stringify(s));
3073
+ s !== void 0 && localStorage.setItem(S, JSON.stringify(s));
3074
3074
  } catch (c) {
3075
- console.warn(`Error saving localStorage key "${x}":`, c);
3075
+ console.warn(`Error saving localStorage key "${S}":`, c);
3076
3076
  }
3077
- }, [x, s]), [s, k];
3077
+ }, [S, s]), [s, k];
3078
3078
  }
3079
3079
  var ie = { exports: {} }, te = {};
3080
3080
  /**
@@ -3091,9 +3091,9 @@ function Ye() {
3091
3091
  if (fe)
3092
3092
  return te;
3093
3093
  fe = 1;
3094
- var x = Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
3094
+ var S = Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
3095
3095
  return te.c = function(t) {
3096
- return x.H.useMemoCache(t);
3096
+ return S.H.useMemoCache(t);
3097
3097
  }, te;
3098
3098
  }
3099
3099
  var ee = {};
@@ -3109,9 +3109,9 @@ var ee = {};
3109
3109
  var pe;
3110
3110
  function Ve() {
3111
3111
  return pe || (pe = 1, process.env.NODE_ENV !== "production" && function() {
3112
- var x = Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
3112
+ var S = Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
3113
3113
  ee.c = function(t) {
3114
- var s = x.H;
3114
+ var s = S.H;
3115
3115
  return s === null && console.error(
3116
3116
  `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
3117
3117
  1. You might have mismatching versions of React and the renderer (such as React DOM)
@@ -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" ? ie.exports = Ye() : ie.exports = Ve();
3126
3126
  var Bt = ie.exports;
3127
- function Ne(x) {
3127
+ function Ne(S) {
3128
3128
  const t = Bt.c(8);
3129
3129
  let s;
3130
3130
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (s = {
@@ -3134,8 +3134,8 @@ function Ne(x) {
3134
3134
  }, t[0] = s) : s = t[0];
3135
3135
  const [k, c] = Et(s);
3136
3136
  let a, u;
3137
- t[1] !== x ? (a = () => {
3138
- const h = x == null ? void 0 : x.current, _ = () => {
3137
+ t[1] !== S ? (a = () => {
3138
+ const h = S == null ? void 0 : S.current, _ = () => {
3139
3139
  if (h) {
3140
3140
  const y = h.getBoundingClientRect(), g = y.height < y.width;
3141
3141
  c((v) => {
@@ -3160,23 +3160,23 @@ function Ne(x) {
3160
3160
  y.unobserve(h);
3161
3161
  };
3162
3162
  }
3163
- }, u = [x], t[1] = x, t[2] = a, t[3] = u) : (a = t[2], u = t[3]), _t(a, u);
3163
+ }, u = [S], t[1] = S, t[2] = a, t[3] = u) : (a = t[2], u = t[3]), _t(a, u);
3164
3164
  let r;
3165
3165
  return t[4] !== k.height || t[5] !== k.noOfPages || t[6] !== k.width ? (r = [k.width, k.height, k.noOfPages], t[4] = k.height, t[5] = k.noOfPages, t[6] = k.width, t[7] = r) : r = t[7], r;
3166
3166
  }
3167
- function Je(x) {
3167
+ function Je(S) {
3168
3168
  const t = Bt.c(8), [s, k] = Et(0);
3169
3169
  let c;
3170
- t[0] !== x ? (c = () => {
3171
- if (x.current) {
3172
- const _ = x.current.scrollWidth, y = x.current.scrollLeft, g = _ > 0 ? y / _ : 0;
3170
+ t[0] !== S ? (c = () => {
3171
+ if (S.current) {
3172
+ const _ = S.current.scrollWidth, y = S.current.scrollLeft, g = _ > 0 ? y / _ : 0;
3173
3173
  k(g);
3174
3174
  }
3175
- }, t[0] = x, t[1] = c) : c = t[1];
3175
+ }, t[0] = S, t[1] = c) : c = t[1];
3176
3176
  const a = c;
3177
3177
  let u, r;
3178
- t[2] !== x || t[3] !== a ? (u = () => {
3179
- const _ = x.current;
3178
+ t[2] !== S || t[3] !== a ? (u = () => {
3179
+ const _ = S.current;
3180
3180
  if (!_)
3181
3181
  return;
3182
3182
  let y = null;
@@ -3188,25 +3188,25 @@ function Je(x) {
3188
3188
  return _.addEventListener("scroll", g), a(), () => {
3189
3189
  y && clearTimeout(y), _.removeEventListener("scroll", g);
3190
3190
  };
3191
- }, r = [a, x], t[2] = x, t[3] = a, t[4] = u, t[5] = r) : (u = t[4], r = t[5]), _t(u, r);
3191
+ }, r = [a, S], t[2] = S, t[3] = a, t[4] = u, t[5] = r) : (u = t[4], r = t[5]), _t(u, r);
3192
3192
  let h;
3193
3193
  return t[6] !== s ? (h = [s, k], t[6] = s, t[7] = h) : h = t[7], h;
3194
3194
  }
3195
- const Xe = (x, t, s, k) => {
3195
+ const Xe = (S, t, s, k) => {
3196
3196
  const c = Bt.c(21), [a, u] = Ne(s), r = bt(null), h = bt(""), _ = bt(!1), y = bt(!1), g = bt(0), v = bt(0), o = bt(null);
3197
3197
  let d;
3198
- c[0] !== x || c[1] !== t || c[2] !== u || c[3] !== a || c[4] !== k ? (d = (N, O) => {
3198
+ c[0] !== S || c[1] !== t || c[2] !== u || c[3] !== a || c[4] !== k ? (d = (N, O) => {
3199
3199
  const F = window.getSelection(), P = _.current || !!(F && F.rangeCount > 0 && !F.isCollapsed);
3200
3200
  if (Date.now() < v.current || !P && g.current > 0 && Date.now() - g.current < 500 || P)
3201
3201
  return !1;
3202
3202
  if (!t && !k) {
3203
3203
  if (N / a <= 0.4 && O / u < 0.8)
3204
- return x(-1), !0;
3204
+ return S(-1), !0;
3205
3205
  if (N / a > 0.4 && O / u < 0.8)
3206
- return x(1), !0;
3206
+ return S(1), !0;
3207
3207
  }
3208
3208
  return !1;
3209
- }, c[0] = x, c[1] = t, c[2] = u, c[3] = a, c[4] = k, c[5] = d) : d = c[5];
3209
+ }, c[0] = S, c[1] = t, c[2] = u, c[3] = a, c[4] = k, c[5] = d) : d = c[5];
3210
3210
  const i = d;
3211
3211
  let f, l;
3212
3212
  c[6] === Symbol.for("react.memo_cache_sentinel") ? (f = () => {
@@ -3266,8 +3266,8 @@ const Xe = (x, t, s, k) => {
3266
3266
  }, c[8] = i, c[9] = m) : m = c[9];
3267
3267
  let C;
3268
3268
  c[10] !== i || c[11] !== a ? (C = [a, i], c[10] = i, c[11] = a, c[12] = C) : C = c[12], _t(m, C);
3269
- let S;
3270
- c[13] !== s || c[14] !== i ? (S = () => {
3269
+ let x;
3270
+ c[13] !== s || c[14] !== i ? (x = () => {
3271
3271
  const N = s.current, O = () => {
3272
3272
  const P = window.getSelection();
3273
3273
  y.current = _.current || !!(P && P.rangeCount > 0 && !P.isCollapsed), r.current = window.setTimeout(Qe, 200);
@@ -3286,20 +3286,20 @@ const Xe = (x, t, s, k) => {
3286
3286
  return N == null || N.addEventListener("mousedown", O), N == null || N.addEventListener("mouseup", F), () => {
3287
3287
  N == null || N.removeEventListener("mousedown", O), N == null || N.removeEventListener("mouseup", F);
3288
3288
  };
3289
- }, c[13] = s, c[14] = i, c[15] = S) : S = c[15];
3289
+ }, c[13] = s, c[14] = i, c[15] = x) : x = c[15];
3290
3290
  let A;
3291
- c[16] !== s || c[17] !== i || c[18] !== t || c[19] !== a ? (A = [a, t, i, s], c[16] = s, c[17] = i, c[18] = t, c[19] = a, c[20] = A) : A = c[20], _t(S, A);
3291
+ c[16] !== s || c[17] !== i || c[18] !== t || c[19] !== a ? (A = [a, t, i, s], c[16] = s, c[17] = i, c[18] = t, c[19] = a, c[20] = A) : A = c[20], _t(x, A);
3292
3292
  };
3293
3293
  function Qe() {
3294
3294
  }
3295
3295
  const tn = "_pageNumber_c6j17_1", en = {
3296
3296
  pageNumber: tn
3297
3297
  };
3298
- function nn(x) {
3298
+ function nn(S) {
3299
3299
  const t = Bt.c(3), {
3300
3300
  currentPage: s,
3301
3301
  pages: k
3302
- } = x, c = s + 1;
3302
+ } = S, c = s + 1;
3303
3303
  let a;
3304
3304
  return t[0] !== k || t[1] !== c ? (a = /* @__PURE__ */ yt("div", { className: en.pageNumber, children: [
3305
3305
  c,
@@ -3307,10 +3307,10 @@ function nn(x) {
3307
3307
  k
3308
3308
  ] }), t[0] = k, t[1] = c, t[2] = a) : a = t[2], a;
3309
3309
  }
3310
- function Ht(x) {
3310
+ function Ht(S) {
3311
3311
  const t = document.getElementById("bok-main-element");
3312
3312
  if (t !== null) {
3313
- const s = t.getBoundingClientRect().width, k = x.offsetLeft;
3313
+ const s = t.getBoundingClientRect().width, k = S.offsetLeft;
3314
3314
  return Math.floor(k / s);
3315
3315
  } else
3316
3316
  throw Error;
@@ -3318,24 +3318,24 @@ function Ht(x) {
3318
3318
  const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3319
3319
  toast: rn,
3320
3320
  visible: on
3321
- }, Te = (x) => {
3321
+ }, Te = (S) => {
3322
3322
  const t = Bt.c(5), {
3323
3323
  message: s,
3324
3324
  visible: k,
3325
3325
  role: c,
3326
3326
  ariaLive: a
3327
- } = x, u = c === void 0 ? "status" : c, r = a === void 0 ? "polite" : a, h = `${me.toast} ${k ? me.visible : ""}`;
3327
+ } = S, u = c === void 0 ? "status" : c, r = a === void 0 ? "polite" : a, h = `${me.toast} ${k ? me.visible : ""}`;
3328
3328
  let _;
3329
3329
  return t[0] !== r || t[1] !== s || t[2] !== u || t[3] !== h ? (_ = /* @__PURE__ */ tt("div", { className: h, role: u, "aria-live": r, children: s }), t[0] = r, t[1] = s, t[2] = u, t[3] = h, t[4] = _) : _ = t[4], _;
3330
3330
  }, Ut = 12, ge = 12, _e = 44, be = 94, ye = 135, ve = 180, Yt = ({
3331
- anchorTop: x,
3331
+ anchorTop: S,
3332
3332
  anchorBottom: t,
3333
3333
  containerHeight: s,
3334
3334
  menuHeight: k
3335
3335
  }) => {
3336
- if (x - Ut >= k)
3336
+ if (S - Ut >= k)
3337
3337
  return {
3338
- top: Math.max(Ut, x - k - Ut),
3338
+ top: Math.max(Ut, S - k - Ut),
3339
3339
  placement: "above"
3340
3340
  };
3341
3341
  const c = Math.max(Ut, s - k - Ut);
@@ -3344,25 +3344,25 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3344
3344
  placement: "below"
3345
3345
  };
3346
3346
  }, Vt = ({
3347
- anchorLeft: x,
3347
+ anchorLeft: S,
3348
3348
  containerWidth: t,
3349
3349
  menuWidth: s
3350
3350
  }) => {
3351
3351
  const k = s / 2 + ge, c = Math.max(k, t - s / 2 - ge);
3352
- return Math.max(k, Math.min(c, x));
3353
- }, sn = ze((x) => {
3352
+ return Math.max(k, Math.min(c, S));
3353
+ }, sn = ze((S) => {
3354
3354
  const t = Bt.c(5), {
3355
3355
  content: s,
3356
3356
  bookRef: k
3357
- } = x;
3357
+ } = S;
3358
3358
  let c;
3359
3359
  t[0] !== s ? (c = {
3360
3360
  __html: s
3361
3361
  }, t[0] = s, t[1] = c) : c = t[1];
3362
3362
  let a;
3363
3363
  return t[2] !== k || t[3] !== c ? (a = /* @__PURE__ */ tt("div", { ref: k, dangerouslySetInnerHTML: c, className: "book-page", id: "bok-main-element" }), t[2] = k, t[3] = c, t[4] = a) : a = t[4], a;
3364
- }, (x, t) => x.content === t.content), an = (x) => 1 + 1.7 * Math.pow(x - 1, 3) + 0.7 * Math.pow(x - 1, 2), ln = Qt(({
3365
- content: x,
3364
+ }, (S, t) => S.content === t.content), an = (S) => 1 + 1.7 * Math.pow(S - 1, 3) + 0.7 * Math.pow(S - 1, 2), ln = Qt(({
3365
+ content: S,
3366
3366
  title: t,
3367
3367
  bookId: s,
3368
3368
  setIsLoading: k,
@@ -3380,7 +3380,7 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3380
3380
  onRemoveHighlight: i,
3381
3381
  onUpdateHighlightColor: f
3382
3382
  }, l) => {
3383
- const m = bt(null), C = bt(!1), S = bt(null), A = bt(0), N = bt(0), O = bt(0), F = bt(null), P = bt(null), j = bt(null), [nt, w] = Et(null), [L, n] = Et(null), [z, J] = Et(!1), $ = bt(null), [et, H, Y] = Ne(h), [I, R] = Je(m), [rt, X] = Et(1), [Z, ct] = Et(0), ft = bt(!1), ot = s ? `bok_progress_${s}` : "", ut = t && t !== "Loading..." ? `bok_progress_${t}` : "", pt = bt(I), ht = bt(null);
3383
+ const m = bt(null), C = bt(!1), x = bt(null), A = bt(0), N = bt(0), O = bt(0), F = bt(null), P = bt(null), j = bt(null), [nt, w] = Et(null), [L, n] = Et(null), [z, J] = Et(!1), $ = bt(null), [et, H, Y] = Ne(h), [I, R] = Je(m), [rt, X] = Et(1), [Z, ct] = Et(0), ft = bt(!1), ot = s ? `bok_progress_${s}` : "", ut = t && t !== "Loading..." ? `bok_progress_${t}` : "", pt = bt(I), ht = bt(null);
3384
3384
  _t(() => {
3385
3385
  g && g(Z);
3386
3386
  }, [Z, g]), _t(() => {
@@ -3421,36 +3421,36 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3421
3421
  }, [I, ot]), _t(() => {
3422
3422
  v && v(I);
3423
3423
  }, [v, I]);
3424
- const kt = St((E) => {
3424
+ const kt = xt((E) => {
3425
3425
  const D = m.current;
3426
3426
  if (!D)
3427
3427
  return;
3428
3428
  ht.current && cancelAnimationFrame(ht.current);
3429
3429
  const U = D.scrollLeft, K = E * et * Y, st = K - U, at = 450, dt = performance.now(), gt = (At) => {
3430
- const xt = At - dt;
3431
- if (xt < at) {
3432
- const Ot = an(xt / at);
3430
+ const St = At - dt;
3431
+ if (St < at) {
3432
+ const Ot = an(St / at);
3433
3433
  D.scrollLeft = U + st * Ot, ht.current = requestAnimationFrame(gt);
3434
3434
  } else
3435
3435
  D.scrollLeft = K, ht.current = null;
3436
3436
  };
3437
3437
  ht.current = requestAnimationFrame(gt);
3438
- }, [et, Y]), vt = St((E) => {
3438
+ }, [et, Y]), vt = xt((E) => {
3439
3439
  let D = E;
3440
3440
  D < 0 && (D = 0), D >= Z && (D = Z - 1), X(D), kt(D);
3441
- }, [Z, kt]), e = St((E) => {
3441
+ }, [Z, kt]), e = xt((E) => {
3442
3442
  const D = Math.max(0, Math.min(1, E));
3443
3443
  if (R(D), Z <= 0)
3444
3444
  return;
3445
3445
  let U = Math.round(Z * D);
3446
3446
  U = Math.max(0, Math.min(Z - 1, U)), X(U), kt(U);
3447
- }, [Z, kt, R]), W = St((E) => {
3447
+ }, [Z, kt, R]), W = xt((E) => {
3448
3448
  X((D) => {
3449
3449
  let U = D + E;
3450
3450
  return U < 0 && (U = 0), U >= Z && (U = Z - 1), kt(U), U;
3451
3451
  });
3452
3452
  }, [Z, kt]);
3453
- xe(l, () => ({
3453
+ Se(l, () => ({
3454
3454
  goToPage: vt,
3455
3455
  setProgress: e,
3456
3456
  getProgress: () => pt.current,
@@ -3465,10 +3465,10 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3465
3465
  }
3466
3466
  }
3467
3467
  }), [vt, e]), Xe(W, !!(r || nt || L), h, _);
3468
- const b = St((E) => typeof CSS < "u" && CSS.escape ? CSS.escape(E) : E.replace(/[^a-zA-Z0-9_-]/g, "\\$&"), []), p = St((E) => {
3468
+ const b = xt((E) => typeof CSS < "u" && CSS.escape ? CSS.escape(E) : E.replace(/[^a-zA-Z0-9_-]/g, "\\$&"), []), p = xt((E) => {
3469
3469
  var D;
3470
3470
  return E ? E.nodeType === Node.ELEMENT_NODE ? E.closest(".bok-chapter") : (D = E.parentElement) == null ? void 0 : D.closest(".bok-chapter") : null;
3471
- }, []), T = St((E) => document.createTreeWalker(E, NodeFilter.SHOW_TEXT, {
3471
+ }, []), T = xt((E) => document.createTreeWalker(E, NodeFilter.SHOW_TEXT, {
3472
3472
  acceptNode: (D) => {
3473
3473
  if (!D.nodeValue || D.nodeValue.length === 0)
3474
3474
  return NodeFilter.FILTER_REJECT;
@@ -3478,13 +3478,13 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3478
3478
  const K = U.tagName.toLowerCase();
3479
3479
  return K === "script" || K === "style" ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
3480
3480
  }
3481
- }), []), q = St((E) => {
3481
+ }), []), q = xt((E) => {
3482
3482
  const D = T(E), U = [];
3483
3483
  let K = D.nextNode();
3484
3484
  for (; K; )
3485
3485
  U.push(K), K = D.nextNode();
3486
3486
  return U;
3487
- }, [T]), G = St((E, D, U) => {
3487
+ }, [T]), G = xt((E, D, U) => {
3488
3488
  const K = document.createRange();
3489
3489
  K.selectNodeContents(E);
3490
3490
  try {
@@ -3499,10 +3499,10 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3499
3499
  const gt = dt;
3500
3500
  if (K.comparePoint(gt, 0) === 1)
3501
3501
  break;
3502
- const xt = K.comparePoint(gt, gt.length);
3503
- if (xt === 0)
3502
+ const St = K.comparePoint(gt, gt.length);
3503
+ if (St === 0)
3504
3504
  st += gt.length;
3505
- else if (xt === 1) {
3505
+ else if (St === 1) {
3506
3506
  try {
3507
3507
  const Ot = document.createRange();
3508
3508
  Ot.setStart(gt, 0), Ot.setEnd(K.endContainer, K.endOffset);
@@ -3516,7 +3516,7 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3516
3516
  dt = at.nextNode();
3517
3517
  }
3518
3518
  return st;
3519
- }, [T]), B = St((E, D, U, K) => {
3519
+ }, [T]), B = xt((E, D, U, K) => {
3520
3520
  if (D >= U)
3521
3521
  return;
3522
3522
  let st = E;
@@ -3525,7 +3525,7 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3525
3525
  at.setAttribute("data-highlight-id", K.id), at.setAttribute("data-highlight-color", K.color), at.className = `bok-highlight bok-highlight--${K.color}`;
3526
3526
  const dt = st.parentNode;
3527
3527
  dt && (dt.insertBefore(at, st), at.appendChild(st));
3528
- }, []), V = St((E, D) => {
3528
+ }, []), V = xt((E, D) => {
3529
3529
  if (D.end <= D.start)
3530
3530
  return;
3531
3531
  const U = q(E);
@@ -3538,10 +3538,10 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3538
3538
  }
3539
3539
  if (dt >= D.end)
3540
3540
  break;
3541
- const At = Math.max(D.start, dt) - dt, xt = Math.min(D.end, gt) - dt;
3542
- B(st, At, xt, D), K += at;
3541
+ const At = Math.max(D.start, dt) - dt, St = Math.min(D.end, gt) - dt;
3542
+ B(st, At, St, D), K += at;
3543
3543
  }
3544
- }, [q, B]), it = St(() => {
3544
+ }, [q, B]), it = xt(() => {
3545
3545
  const E = m.current;
3546
3546
  if (!(!E || (E.querySelectorAll("span[data-highlight-id]").forEach((K) => {
3547
3547
  const st = K.parentNode;
@@ -3557,24 +3557,24 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3557
3557
  const st = E.querySelector(`#${b(K.chapterId)}`);
3558
3558
  st && V(st, K);
3559
3559
  }
3560
- }, [V, b, o]), Q = St(() => {
3560
+ }, [V, b, o]), Q = xt(() => {
3561
3561
  var qt;
3562
3562
  if (r || _)
3563
3563
  return;
3564
3564
  const E = window.getSelection();
3565
3565
  if (!E || E.rangeCount === 0 || E.isCollapsed) {
3566
- w(null), S.current = null;
3566
+ w(null), x.current = null;
3567
3567
  return;
3568
3568
  }
3569
3569
  const D = E.getRangeAt(0), U = m.current;
3570
3570
  if (!U || !U.contains(D.commonAncestorContainer)) {
3571
- w(null), S.current = null;
3571
+ w(null), x.current = null;
3572
3572
  return;
3573
3573
  }
3574
3574
  n(null);
3575
3575
  const K = p(D.startContainer), st = p(D.endContainer);
3576
3576
  if (!K || !st || K !== st) {
3577
- w(null), S.current = null;
3577
+ w(null), x.current = null;
3578
3578
  return;
3579
3579
  }
3580
3580
  const at = (qt = h.current) == null ? void 0 : qt.getBoundingClientRect();
@@ -3589,41 +3589,41 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3589
3589
  anchorLeft: gt,
3590
3590
  containerWidth: at.width,
3591
3591
  menuWidth: ye
3592
- }), xt = dt.top - at.top, Ot = dt.bottom - at.top, {
3592
+ }), St = dt.top - at.top, Ot = dt.bottom - at.top, {
3593
3593
  top: Pt,
3594
3594
  placement: Lt
3595
3595
  } = Yt({
3596
- anchorTop: xt,
3596
+ anchorTop: St,
3597
3597
  anchorBottom: Ot,
3598
3598
  containerHeight: at.height,
3599
3599
  menuHeight: _e
3600
3600
  });
3601
- S.current = D.cloneRange(), A.current = Date.now(), w({
3601
+ x.current = D.cloneRange(), A.current = Date.now(), w({
3602
3602
  left: At,
3603
3603
  anchorLeft: gt,
3604
3604
  top: Pt,
3605
- anchorTop: xt,
3605
+ anchorTop: St,
3606
3606
  anchorBottom: Ot,
3607
3607
  placement: Lt
3608
3608
  });
3609
- }, [h, p, r, _]), lt = St((E) => {
3610
- var xt;
3611
- const D = S.current;
3609
+ }, [h, p, r, _]), lt = xt((E) => {
3610
+ var St;
3611
+ const D = x.current;
3612
3612
  if (!D)
3613
3613
  return;
3614
3614
  const U = p(D.startContainer), K = p(D.endContainer);
3615
3615
  if (!U || !K || U !== K) {
3616
- w(null), S.current = null;
3616
+ w(null), x.current = null;
3617
3617
  return;
3618
3618
  }
3619
3619
  const st = U.id;
3620
3620
  if (!st) {
3621
- w(null), S.current = null;
3621
+ w(null), x.current = null;
3622
3622
  return;
3623
3623
  }
3624
3624
  const at = G(U, D.startContainer, D.startOffset), dt = G(U, D.endContainer, D.endOffset);
3625
3625
  if (dt <= at) {
3626
- w(null), S.current = null;
3626
+ w(null), x.current = null;
3627
3627
  return;
3628
3628
  }
3629
3629
  const gt = D.toString().trim(), At = {
@@ -3634,8 +3634,8 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3634
3634
  color: E,
3635
3635
  text: gt || void 0
3636
3636
  };
3637
- d(At), w(null), S.current = null, (xt = window.getSelection()) == null || xt.removeAllRanges();
3638
- }, [p, G, d]), wt = St((E) => {
3637
+ d(At), w(null), x.current = null, (St = window.getSelection()) == null || St.removeAllRanges();
3638
+ }, [p, G, d]), wt = xt((E) => {
3639
3639
  if (E.text)
3640
3640
  return E.text;
3641
3641
  const D = m.current;
@@ -3647,18 +3647,18 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3647
3647
  const K = q(U);
3648
3648
  let st = 0, at = "";
3649
3649
  for (const dt of K) {
3650
- const gt = dt.length, At = st, xt = st + gt;
3651
- if (xt <= E.start) {
3650
+ const gt = dt.length, At = st, St = st + gt;
3651
+ if (St <= E.start) {
3652
3652
  st += gt;
3653
3653
  continue;
3654
3654
  }
3655
3655
  if (At >= E.end)
3656
3656
  break;
3657
- const Ot = Math.max(E.start, At) - At, Pt = Math.min(E.end, xt) - At;
3657
+ const Ot = Math.max(E.start, At) - At, Pt = Math.min(E.end, St) - At;
3658
3658
  at += dt.data.slice(Ot, Pt), st += gt;
3659
3659
  }
3660
3660
  return at;
3661
- }, [b, q]), mt = St(async (E) => {
3661
+ }, [b, q]), mt = xt(async (E) => {
3662
3662
  var U;
3663
3663
  if (!E)
3664
3664
  return;
@@ -3681,7 +3681,7 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3681
3681
  }, []);
3682
3682
  _t(() => {
3683
3683
  it();
3684
- }, [it, x]), _t(() => {
3684
+ }, [it, S]), _t(() => {
3685
3685
  const E = m.current;
3686
3686
  if (!E)
3687
3687
  return;
@@ -3714,13 +3714,13 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3714
3714
  }, 250);
3715
3715
  return;
3716
3716
  }
3717
- (!D || D.isCollapsed) && (F.current && (clearTimeout(F.current), F.current = null), w(null), S.current = null);
3717
+ (!D || D.isCollapsed) && (F.current && (clearTimeout(F.current), F.current = null), w(null), x.current = null);
3718
3718
  };
3719
3719
  return document.addEventListener("selectionchange", E), () => document.removeEventListener("selectionchange", E);
3720
3720
  }, [Q]), _t(() => () => {
3721
3721
  $.current && clearTimeout($.current), F.current && clearTimeout(F.current);
3722
3722
  }, []), _t(() => {
3723
- (r || _) && (w(null), S.current = null, n(null));
3723
+ (r || _) && (w(null), x.current = null, n(null));
3724
3724
  }, [r, _]), ce(() => {
3725
3725
  var dt, gt, At;
3726
3726
  if (!nt)
@@ -3741,8 +3741,8 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3741
3741
  containerWidth: E.width,
3742
3742
  menuWidth: U
3743
3743
  });
3744
- (Math.abs(at - nt.left) > 0.5 || Math.abs(K - nt.top) > 0.5 || st !== nt.placement) && w((xt) => xt && {
3745
- ...xt,
3744
+ (Math.abs(at - nt.left) > 0.5 || Math.abs(K - nt.top) > 0.5 || st !== nt.placement) && w((St) => St && {
3745
+ ...St,
3746
3746
  left: at,
3747
3747
  top: K,
3748
3748
  placement: st
@@ -3756,14 +3756,14 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3756
3756
  const st = U.target.closest("span[data-highlight-id]");
3757
3757
  if (!st)
3758
3758
  return;
3759
- U.preventDefault(), U.stopPropagation(), w(null), S.current = null;
3759
+ U.preventDefault(), U.stopPropagation(), w(null), x.current = null;
3760
3760
  const at = st.getAttribute("data-highlight-id");
3761
3761
  if (!at)
3762
3762
  return;
3763
3763
  const dt = (Wt = h.current) == null ? void 0 : Wt.getBoundingClientRect(), gt = st.getBoundingClientRect();
3764
3764
  if (!dt)
3765
3765
  return;
3766
- const At = gt.left + gt.width / 2 - dt.left, xt = Vt({
3766
+ const At = gt.left + gt.width / 2 - dt.left, St = Vt({
3767
3767
  anchorLeft: At,
3768
3768
  containerWidth: dt.width,
3769
3769
  menuWidth: ve
@@ -3778,7 +3778,7 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3778
3778
  });
3779
3779
  n({
3780
3780
  id: at,
3781
- left: xt,
3781
+ left: St,
3782
3782
  anchorLeft: At,
3783
3783
  top: Lt,
3784
3784
  anchorTop: Ot,
@@ -3807,8 +3807,8 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3807
3807
  containerWidth: E.width,
3808
3808
  menuWidth: U
3809
3809
  });
3810
- (Math.abs(at - L.left) > 0.5 || Math.abs(K - L.top) > 0.5 || st !== L.placement) && n((xt) => xt && {
3811
- ...xt,
3810
+ (Math.abs(at - L.left) > 0.5 || Math.abs(K - L.top) > 0.5 || st !== L.placement) && n((St) => St && {
3811
+ ...St,
3812
3812
  left: at,
3813
3813
  top: K,
3814
3814
  placement: st
@@ -3844,10 +3844,10 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3844
3844
  const dt = st.getAttribute("href"), gt = decodeURIComponent(dt.substring(1)), At = document.getElementById(gt);
3845
3845
  if (At)
3846
3846
  try {
3847
- const xt = Ht(At);
3848
- vt(xt);
3849
- } catch (xt) {
3850
- console.warn("Could not calculate page for link", xt);
3847
+ const St = Ht(At);
3848
+ vt(St);
3849
+ } catch (St) {
3850
+ console.warn("Could not calculate page for link", St);
3851
3851
  }
3852
3852
  }
3853
3853
  };
@@ -3875,19 +3875,19 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3875
3875
  return () => {
3876
3876
  clearTimeout(D), ht.current && cancelAnimationFrame(ht.current);
3877
3877
  };
3878
- }, [et, H, a, c, u, Y, x, t, k]), _t(() => {
3878
+ }, [et, H, a, c, u, Y, S, t, k]), _t(() => {
3879
3879
  const E = (D) => {
3880
3880
  D.key === "ArrowLeft" ? (D.preventDefault(), W(-1)) : D.key === "ArrowRight" && (D.preventDefault(), W(1));
3881
3881
  };
3882
3882
  return document.addEventListener("keydown", E), () => document.removeEventListener("keydown", E);
3883
3883
  }, [W]);
3884
- const Ct = L ? o.find((E) => E.id === L.id) : null, Rt = St(() => {
3884
+ const Ct = L ? o.find((E) => E.id === L.id) : null, Rt = xt(() => {
3885
3885
  J(!1), requestAnimationFrame(() => J(!0)), $.current && clearTimeout($.current), $.current = setTimeout(() => {
3886
3886
  J(!1);
3887
3887
  }, 1600);
3888
3888
  }, []);
3889
3889
  return /* @__PURE__ */ yt(Xt, { children: [
3890
- /* @__PURE__ */ tt(sn, { content: x, bookRef: m }),
3890
+ /* @__PURE__ */ tt(sn, { content: S, bookRef: m }),
3891
3891
  nt && !r && !_ && /* @__PURE__ */ yt("div", { ref: P, className: "highlight-menu", "data-placement": nt.placement, style: {
3892
3892
  left: `${nt.left}px`,
3893
3893
  top: `${nt.top}px`
@@ -3938,10 +3938,10 @@ const rn = "_toast_1nwn7_1", on = "_visible_1nwn7_19", me = {
3938
3938
  page: un,
3939
3939
  "page-turn": "_page-turn_1bbsw_1"
3940
3940
  };
3941
- function hn(x) {
3941
+ function hn(S) {
3942
3942
  const t = Bt.c(3), {
3943
3943
  isLoading: s
3944
- } = x, k = s ? $t["loading-screen"] : $t["loading-screen-gon"];
3944
+ } = S, k = s ? $t["loading-screen"] : $t["loading-screen-gon"];
3945
3945
  let c;
3946
3946
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ yt("div", { className: $t.book, children: [
3947
3947
  /* @__PURE__ */ tt("div", { className: $t.page }),
@@ -3954,7 +3954,7 @@ function hn(x) {
3954
3954
  function dn() {
3955
3955
  document.documentElement.requestFullscreen && (document.fullscreenElement ? document.exitFullscreen && document.exitFullscreen() : document.documentElement.requestFullscreen());
3956
3956
  }
3957
- function ae(x, t) {
3957
+ function ae(S, t) {
3958
3958
  const s = Bt.c(9), k = t === void 0 ? 350 : t, [c, a] = Et(!1), [u, r] = Et(!1), h = bt(null);
3959
3959
  let _, y;
3960
3960
  s[0] === Symbol.for("react.memo_cache_sentinel") ? (_ = () => {
@@ -3968,13 +3968,13 @@ function ae(x, t) {
3968
3968
  };
3969
3969
  }, y = [], s[0] = _, s[1] = y) : (_ = s[0], y = s[1]), _t(_, y);
3970
3970
  let g;
3971
- s[2] !== k || s[3] !== x ? (g = () => {
3971
+ s[2] !== k || s[3] !== S ? (g = () => {
3972
3972
  requestAnimationFrame(() => {
3973
3973
  a(!1), r(!0);
3974
3974
  }), h.current !== null && window.clearTimeout(h.current), h.current = window.setTimeout(() => {
3975
- x();
3975
+ S();
3976
3976
  }, k);
3977
- }, s[2] = k, s[3] = x, s[4] = g) : g = s[4];
3977
+ }, s[2] = k, s[3] = S, s[4] = g) : g = s[4];
3978
3978
  const v = g;
3979
3979
  let o;
3980
3980
  return s[5] !== v || s[6] !== u || s[7] !== c ? (o = {
@@ -4000,24 +4000,24 @@ const fn = "_visible_ebh2c_35 _panelVisible_7cmc0_60", pn = "_title_ebh2c_52", N
4000
4000
  "value-changed": "_value-changed_ebh2c_174",
4001
4001
  "fullscreen-button": "_fullscreen-button_ebh2c_180"
4002
4002
  }, Dt = {
4003
- "custom-select": "_custom-select_1xi6z_1",
4004
- "select-trigger": "_select-trigger_1xi6z_16",
4005
- "select-trigger-label": "_select-trigger-label_1xi6z_40",
4006
- "select-trigger-arrow": "_select-trigger-arrow_1xi6z_46",
4007
- "select-trigger-arrow-open": "_select-trigger-arrow-open_1xi6z_52",
4008
- "select-menu": "_select-menu_1xi6z_56",
4009
- "dropdown-pop-in": "_dropdown-pop-in_1xi6z_1",
4010
- "select-option": "_select-option_1xi6z_74",
4011
- "dropdown-option-fade": "_dropdown-option-fade_1xi6z_1",
4012
- "select-option-active": "_select-option-active_1xi6z_133"
4003
+ "custom-select": "_custom-select_9v5vm_1",
4004
+ "select-trigger": "_select-trigger_9v5vm_16",
4005
+ "select-trigger-label": "_select-trigger-label_9v5vm_40",
4006
+ "select-trigger-arrow": "_select-trigger-arrow_9v5vm_46",
4007
+ "select-trigger-arrow-open": "_select-trigger-arrow-open_9v5vm_52",
4008
+ "select-menu": "_select-menu_9v5vm_56",
4009
+ "dropdown-pop-in": "_dropdown-pop-in_9v5vm_1",
4010
+ "select-option": "_select-option_9v5vm_74",
4011
+ "dropdown-option-fade": "_dropdown-option-fade_9v5vm_1",
4012
+ "select-option-active": "_select-option-active_9v5vm_121"
4013
4013
  };
4014
- function we(x) {
4014
+ function we(S) {
4015
4015
  const t = Bt.c(25), {
4016
4016
  options: s,
4017
4017
  value: k,
4018
4018
  onChange: c,
4019
4019
  ariaLabel: a
4020
- } = x, [u, r] = Et(!1), h = bt(null);
4020
+ } = S, [u, r] = Et(!1), h = bt(null);
4021
4021
  let _, y;
4022
4022
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (_ = () => {
4023
4023
  const N = (O) => {
@@ -4044,23 +4044,25 @@ function we(x) {
4044
4044
  f,
4045
4045
  m
4046
4046
  ] }), t[11] = a, t[12] = u, t[13] = f, t[14] = m, t[15] = C) : C = t[15];
4047
- let S;
4048
- t[16] !== a || t[17] !== u || t[18] !== c || t[19] !== s || t[20] !== k ? (S = u && /* @__PURE__ */ tt("div", { className: Dt["select-menu"], role: "listbox", "aria-label": a, children: s.map((N) => {
4047
+ let x;
4048
+ t[16] !== a || t[17] !== u || t[18] !== c || t[19] !== s || t[20] !== k ? (x = u && /* @__PURE__ */ tt("div", { className: Dt["select-menu"], role: "listbox", "aria-label": a, children: s.map((N) => {
4049
4049
  const O = N.value === k;
4050
- return /* @__PURE__ */ tt("button", { type: "button", role: "option", "aria-selected": O, className: `${Dt["select-option"]} ${O ? Dt["select-option-active"] : ""}`, onClick: () => {
4050
+ return /* @__PURE__ */ tt("button", { type: "button", role: "option", "aria-selected": O, className: `${Dt["select-option"]} ${O ? Dt["select-option-active"] : ""}`, style: a === "Select font family" ? {
4051
+ fontFamily: N.value
4052
+ } : void 0, onClick: () => {
4051
4053
  c(N.value), r(!1);
4052
4054
  }, children: N.label }, N.value);
4053
- }) }), t[16] = a, t[17] = u, t[18] = c, t[19] = s, t[20] = k, t[21] = S) : S = t[21];
4055
+ }) }), t[16] = a, t[17] = u, t[18] = c, t[19] = s, t[20] = k, t[21] = x) : x = t[21];
4054
4056
  let A;
4055
- return t[22] !== C || t[23] !== S ? (A = /* @__PURE__ */ yt("div", { className: Dt["custom-select"], ref: h, children: [
4057
+ return t[22] !== C || t[23] !== x ? (A = /* @__PURE__ */ yt("div", { className: Dt["custom-select"], ref: h, children: [
4056
4058
  C,
4057
- S
4058
- ] }), t[22] = C, t[23] = S, t[24] = A) : A = t[24], A;
4059
+ x
4060
+ ] }), t[22] = C, t[23] = x, t[24] = A) : A = t[24], A;
4059
4061
  }
4060
- function mn(x) {
4061
- return !x;
4062
+ function mn(S) {
4063
+ return !S;
4062
4064
  }
4063
- function gn(x) {
4065
+ function gn(S) {
4064
4066
  const t = Bt.c(84), {
4065
4067
  onClose: s,
4066
4068
  fontSize: k,
@@ -4073,7 +4075,7 @@ function gn(x) {
4073
4075
  setFontFamily: y,
4074
4076
  supportedFonts: g,
4075
4077
  allThemes: v
4076
- } = x;
4078
+ } = S;
4077
4079
  let o;
4078
4080
  t[0] !== g ? (o = g === void 0 ? [] : g, t[0] = g, t[1] = o) : o = t[1];
4079
4081
  const d = o, {
@@ -4081,8 +4083,8 @@ function gn(x) {
4081
4083
  isClosing: f,
4082
4084
  closeMenu: l
4083
4085
  } = ae(s), m = bt(null), C = bt(null);
4084
- let S, A, N;
4085
- t[2] === Symbol.for("react.memo_cache_sentinel") ? (S = {
4086
+ let x, A, N;
4087
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (x = {
4086
4088
  displayName: "Literata",
4087
4089
  name: "Literata"
4088
4090
  }, A = {
@@ -4091,18 +4093,18 @@ function gn(x) {
4091
4093
  }, N = {
4092
4094
  displayName: "Courier New",
4093
4095
  name: "Courier New"
4094
- }, t[2] = S, t[3] = A, t[4] = N) : (S = t[2], A = t[3], N = t[4]);
4096
+ }, t[2] = x, t[3] = A, t[4] = N) : (x = t[2], A = t[3], N = t[4]);
4095
4097
  let O;
4096
- t[5] !== d ? (O = [S, A, N, ...d], t[5] = d, t[6] = O) : O = t[6];
4098
+ t[5] !== d ? (O = [x, A, N, ...d], t[5] = d, t[6] = O) : O = t[6];
4097
4099
  const F = O;
4098
4100
  let P;
4099
4101
  t[7] !== v ? (P = Object.keys(v), t[7] = v, t[8] = P) : P = t[8];
4100
4102
  const j = P;
4101
4103
  let nt;
4102
- t[9] !== F ? (nt = F.map(Sn), t[9] = F, t[10] = nt) : nt = t[10];
4104
+ t[9] !== F ? (nt = F.map(xn), t[9] = F, t[10] = nt) : nt = t[10];
4103
4105
  const w = nt;
4104
4106
  let L;
4105
- t[11] !== j ? (L = j.map(xn), t[11] = j, t[12] = L) : L = t[12];
4107
+ t[11] !== j ? (L = j.map(Sn), t[11] = j, t[12] = L) : L = t[12];
4106
4108
  const n = L;
4107
4109
  let z;
4108
4110
  t[13] !== l ? (z = () => {
@@ -4220,40 +4222,40 @@ function gn(x) {
4220
4222
  let st;
4221
4223
  return t[80] !== J || t[81] !== kt || t[82] !== K ? (st = /* @__PURE__ */ tt("div", { className: kt, onClick: J, onContextMenu: et, children: K }), t[80] = J, t[81] = kt, t[82] = K, t[83] = st) : st = t[83], st;
4222
4224
  }
4223
- function _n(x) {
4224
- return x - 0.2;
4225
+ function _n(S) {
4226
+ return S - 0.2;
4225
4227
  }
4226
- function bn(x) {
4227
- return x + 0.2;
4228
+ function bn(S) {
4229
+ return S + 0.2;
4228
4230
  }
4229
- function yn(x) {
4230
- return x - 5;
4231
+ function yn(S) {
4232
+ return S - 5;
4231
4233
  }
4232
- function vn(x) {
4233
- return x + 5;
4234
+ function vn(S) {
4235
+ return S + 5;
4234
4236
  }
4235
- function wn(x) {
4236
- x.current && (x.current.classList.add(Nt["value-changed"]), setTimeout(() => {
4237
+ function wn(S) {
4238
+ S.current && (S.current.classList.add(Nt["value-changed"]), setTimeout(() => {
4237
4239
  var t;
4238
- (t = x.current) == null || t.classList.remove(Nt["value-changed"]);
4240
+ (t = S.current) == null || t.classList.remove(Nt["value-changed"]);
4239
4241
  }, 200));
4240
4242
  }
4241
- function kn(x) {
4242
- x.preventDefault();
4243
+ function kn(S) {
4244
+ S.preventDefault();
4243
4245
  }
4244
- function Cn(x) {
4245
- x.stopPropagation();
4246
+ function Cn(S) {
4247
+ S.stopPropagation();
4246
4248
  }
4247
- function xn(x) {
4249
+ function Sn(S) {
4248
4250
  return {
4249
- label: x,
4250
- value: x
4251
+ label: S,
4252
+ value: S
4251
4253
  };
4252
4254
  }
4253
- function Sn(x) {
4255
+ function xn(S) {
4254
4256
  return {
4255
- label: x.displayName,
4256
- value: x.name
4257
+ label: S.displayName,
4258
+ value: S.name
4257
4259
  };
4258
4260
  }
4259
4261
  const En = "_visible_1sqmo_34 _panelVisible_7cmc0_60", It = {
@@ -4274,7 +4276,7 @@ const En = "_visible_1sqmo_34 _panelVisible_7cmc0_60", It = {
4274
4276
  "jumper-input": "_jumper-input_1sqmo_160",
4275
4277
  "total-pages": "_total-pages_1sqmo_186",
4276
4278
  "go-btn": "_go-btn_1sqmo_193"
4277
- }, An = (x) => {
4279
+ }, An = (S) => {
4278
4280
  const t = Bt.c(64), {
4279
4281
  toc: s,
4280
4282
  currentPage: k,
@@ -4282,7 +4284,7 @@ const En = "_visible_1sqmo_34 _panelVisible_7cmc0_60", It = {
4282
4284
  onClose: a,
4283
4285
  onGoToPage: u,
4284
4286
  onChapterClick: r
4285
- } = x, {
4287
+ } = S, {
4286
4288
  isVisible: h,
4287
4289
  isClosing: _,
4288
4290
  closeMenu: y
@@ -4313,12 +4315,12 @@ const En = "_visible_1sqmo_34 _panelVisible_7cmc0_60", It = {
4313
4315
  t[4] !== k ? (m = () => {
4314
4316
  v(k + 1);
4315
4317
  }, C = [k], t[4] = k, t[5] = m, t[6] = C) : (m = t[5], C = t[6]), _t(m, C);
4316
- let S;
4317
- t[7] !== g || t[8] !== u || t[9] !== c ? (S = () => {
4318
+ let x;
4319
+ t[7] !== g || t[8] !== u || t[9] !== c ? (x = () => {
4318
4320
  const ot = Math.max(1, Math.min(c, g));
4319
4321
  u(ot - 1);
4320
- }, t[7] = g, t[8] = u, t[9] = c, t[10] = S) : S = t[10];
4321
- const A = S;
4322
+ }, t[7] = g, t[8] = u, t[9] = c, t[10] = x) : x = t[10];
4323
+ const A = x;
4322
4324
  let N;
4323
4325
  t[11] !== y || t[12] !== r ? (N = (ot) => {
4324
4326
  r(ot), y();
@@ -4389,14 +4391,14 @@ const En = "_visible_1sqmo_34 _panelVisible_7cmc0_60", It = {
4389
4391
  let ft;
4390
4392
  return t[59] !== n || t[60] !== z || t[61] !== J || t[62] !== ct ? (ft = /* @__PURE__ */ tt("div", { className: n, onClick: z, onContextMenu: J, children: ct }), t[59] = n, t[60] = z, t[61] = J, t[62] = ct, t[63] = ft) : ft = t[63], ft;
4391
4393
  };
4392
- function Nn(x) {
4393
- x.preventDefault();
4394
+ function Nn(S) {
4395
+ S.preventDefault();
4394
4396
  }
4395
- function Tn(x) {
4396
- return x.stopPropagation();
4397
+ function Tn(S) {
4398
+ return S.stopPropagation();
4397
4399
  }
4398
- function In(x) {
4399
- return x.currentTarget.select();
4400
+ function In(S) {
4401
+ return S.currentTarget.select();
4400
4402
  }
4401
4403
  const zn = "_visible_15uts_29 _panelVisible_7cmc0_60", Tt = {
4402
4404
  "highlights-overlay": "_highlights-overlay_15uts_1 _overlay_7cmc0_1",
@@ -4424,7 +4426,7 @@ const zn = "_visible_15uts_29 _panelVisible_7cmc0_60", Tt = {
4424
4426
  "highlight-action-row": "_highlight-action-row_15uts_207",
4425
4427
  "empty-state": "_empty-state_15uts_212"
4426
4428
  }, Rn = ["yellow", "red", "blue", "purple"], On = ({
4427
- highlights: x,
4429
+ highlights: S,
4428
4430
  onClose: t,
4429
4431
  onGoToPage: s,
4430
4432
  onRemoveHighlight: k,
@@ -4437,7 +4439,7 @@ const zn = "_visible_15uts_29 _panelVisible_7cmc0_60", Tt = {
4437
4439
  } = ae(t), [h, _] = Et(null), [y, g] = Et({}), [v, o] = Et(!1), d = bt(null);
4438
4440
  _t(() => {
4439
4441
  const N = {}, O = setTimeout(() => {
4440
- x.forEach((F) => {
4442
+ S.forEach((F) => {
4441
4443
  try {
4442
4444
  const j = document.querySelector(`span[data-highlight-id="${F.id}"]`) || document.getElementById(F.chapterId);
4443
4445
  j instanceof HTMLElement && (N[F.id] = Ht(j) + 1);
@@ -4446,10 +4448,10 @@ const zn = "_visible_15uts_29 _panelVisible_7cmc0_60", Tt = {
4446
4448
  }), g(N);
4447
4449
  }, 100);
4448
4450
  return () => clearTimeout(O);
4449
- }, [x]), _t(() => () => {
4451
+ }, [S]), _t(() => () => {
4450
4452
  d.current && clearTimeout(d.current);
4451
4453
  }, []);
4452
- const i = St((N) => {
4454
+ const i = xt((N) => {
4453
4455
  try {
4454
4456
  const F = document.querySelector(`span[data-highlight-id="${N.id}"]`) || document.getElementById(N.chapterId);
4455
4457
  if (F instanceof HTMLElement) {
@@ -4486,13 +4488,13 @@ const zn = "_visible_15uts_29 _panelVisible_7cmc0_60", Tt = {
4486
4488
  } finally {
4487
4489
  document.body.removeChild(O);
4488
4490
  }
4489
- }, C = St(() => {
4491
+ }, C = xt(() => {
4490
4492
  o(!1), requestAnimationFrame(() => o(!0)), d.current && clearTimeout(d.current), d.current = setTimeout(() => {
4491
4493
  o(!1);
4492
4494
  }, 1600);
4493
- }, []), S = St((N) => {
4495
+ }, []), x = xt((N) => {
4494
4496
  N.preventDefault();
4495
- }, []), A = () => /* @__PURE__ */ tt("ul", { className: Tt["highlight-list"], children: x.map((N) => {
4497
+ }, []), A = () => /* @__PURE__ */ tt("ul", { className: Tt["highlight-list"], children: S.map((N) => {
4496
4498
  const O = y[N.id], F = l(N), P = F.length > 140 ? `${F.slice(0, 140)}…` : F;
4497
4499
  return /* @__PURE__ */ yt("li", { className: Tt["highlight-item"], children: [
4498
4500
  /* @__PURE__ */ yt("div", { className: Tt["highlight-row"], onClick: () => i(N), children: [
@@ -4516,12 +4518,12 @@ const zn = "_visible_15uts_29 _panelVisible_7cmc0_60", Tt = {
4516
4518
  ] })
4517
4519
  ] }, N.id);
4518
4520
  }) });
4519
- return /* @__PURE__ */ yt("div", { className: `${Tt["highlights-overlay"]} ${u ? Tt["fade-out"] : ""}`, onClick: r, onContextMenu: S, children: [
4521
+ return /* @__PURE__ */ yt("div", { className: `${Tt["highlights-overlay"]} ${u ? Tt["fade-out"] : ""}`, onClick: r, onContextMenu: x, children: [
4520
4522
  /* @__PURE__ */ yt("div", { className: `
4521
4523
  ${Tt["highlights-menu"]}
4522
4524
  ${a ? Tt.visible : ""}
4523
4525
  ${u ? Tt["slide-down"] : ""}
4524
- `, onClick: (N) => N.stopPropagation(), onContextMenu: S, style: {
4526
+ `, onClick: (N) => N.stopPropagation(), onContextMenu: x, style: {
4525
4527
  userSelect: "none",
4526
4528
  WebkitUserSelect: "none",
4527
4529
  WebkitTouchCallout: "none"
@@ -4530,7 +4532,7 @@ const zn = "_visible_15uts_29 _panelVisible_7cmc0_60", Tt = {
4530
4532
  /* @__PURE__ */ tt("h2", { children: "Highlights" }),
4531
4533
  /* @__PURE__ */ tt("button", { onClick: r, className: Tt["close-button"], "aria-label": "Close menu", children: "✕" })
4532
4534
  ] }),
4533
- /* @__PURE__ */ tt("div", { className: Tt["highlights-container"], children: x.length > 0 ? A() : /* @__PURE__ */ tt("div", { className: Tt["empty-state"], children: "No highlights yet" }) })
4535
+ /* @__PURE__ */ tt("div", { className: Tt["highlights-container"], children: S.length > 0 ? A() : /* @__PURE__ */ tt("div", { className: Tt["empty-state"], children: "No highlights yet" }) })
4534
4536
  ] }),
4535
4537
  /* @__PURE__ */ tt(Te, { message: "Copied to clipboard", visible: v })
4536
4538
  ] });
@@ -4549,10 +4551,10 @@ const zn = "_visible_15uts_29 _panelVisible_7cmc0_60", Tt = {
4549
4551
  bounce: qn,
4550
4552
  dismissButton: Zn,
4551
4553
  float: Gn
4552
- }, Kn = (x) => {
4554
+ }, Kn = (S) => {
4553
4555
  const t = Bt.c(16), {
4554
4556
  onDismiss: s
4555
- } = x, [k, c] = Et(!1);
4557
+ } = S, [k, c] = Et(!1);
4556
4558
  let a;
4557
4559
  t[0] !== s ? (a = () => {
4558
4560
  c(!0), setTimeout(s, 400);
@@ -4610,29 +4612,29 @@ const zn = "_visible_15uts_29 _panelVisible_7cmc0_60", Tt = {
4610
4612
  f
4611
4613
  ] }), t[12] = u, t[13] = f, t[14] = r, t[15] = l) : l = t[15], l;
4612
4614
  }, oe = 1e-4;
4613
- function Mt(x) {
4614
- return Number.isFinite(x) ? Math.max(0, Math.min(1, x)) : 0;
4615
+ function Mt(S) {
4616
+ return Number.isFinite(S) ? Math.max(0, Math.min(1, S)) : 0;
4615
4617
  }
4616
- function Ft(x) {
4617
- return x.map((t) => ({
4618
+ function Ft(S) {
4619
+ return S.map((t) => ({
4618
4620
  ...t
4619
4621
  }));
4620
4622
  }
4621
- function Ie(x) {
4622
- return `${x.id}:${x.chapterId}:${x.start}:${x.end}:${x.color}:${x.text ?? ""}`;
4623
+ function Ie(S) {
4624
+ return `${S.id}:${S.chapterId}:${S.start}:${S.end}:${S.color}:${S.text ?? ""}`;
4623
4625
  }
4624
- function ke(x) {
4626
+ function ke(S) {
4625
4627
  const t = /* @__PURE__ */ new Map();
4626
- for (const s of x) {
4628
+ for (const s of S) {
4627
4629
  const k = Ie(s);
4628
4630
  t.set(k, (t.get(k) ?? 0) + 1);
4629
4631
  }
4630
4632
  return t;
4631
4633
  }
4632
- function Yn(x, t) {
4633
- if (x.length !== t.length)
4634
+ function Yn(S, t) {
4635
+ if (S.length !== t.length)
4634
4636
  return !1;
4635
- const s = ke(x), k = ke(t);
4637
+ const s = ke(S), k = ke(t);
4636
4638
  if (s.size !== k.size)
4637
4639
  return !1;
4638
4640
  for (const [c, a] of s)
@@ -4640,42 +4642,42 @@ function Yn(x, t) {
4640
4642
  return !1;
4641
4643
  return !0;
4642
4644
  }
4643
- function Vn(x) {
4645
+ function Vn(S) {
4644
4646
  let t = 2166136261;
4645
- for (let s = 0; s < x.length; s += 1)
4646
- t ^= x.charCodeAt(s), t = Math.imul(t, 16777619);
4647
+ for (let s = 0; s < S.length; s += 1)
4648
+ t ^= S.charCodeAt(s), t = Math.imul(t, 16777619);
4647
4649
  return t >>> 0;
4648
4650
  }
4649
- function Jn(x) {
4650
- if (!x)
4651
+ function Jn(S) {
4652
+ if (!S)
4651
4653
  return "none";
4652
4654
  let t = 0, s = 0, k = 0;
4653
- for (const c of x) {
4655
+ for (const c of S) {
4654
4656
  const a = Vn(Ie(c));
4655
4657
  t = t + a >>> 0, s = (s ^ a) >>> 0, k = k + Math.imul(a, 2654435761) >>> 0;
4656
4658
  }
4657
- return `${x.length}:${t.toString(16)}:${s.toString(16)}:${k.toString(16)}`;
4659
+ return `${S.length}:${t.toString(16)}:${s.toString(16)}:${k.toString(16)}`;
4658
4660
  }
4659
- function Xn(x) {
4660
- const t = x.revision !== void 0 ? String(x.revision) : "none", s = typeof x.progress == "number" ? Mt(x.progress).toFixed(6) : "none", k = Jn(x.highlights), c = x.forceApply ? "1" : "0";
4661
- return `${x.bookId}|${t}|${s}|${k}|${c}`;
4661
+ function Xn(S) {
4662
+ const t = S.revision !== void 0 ? String(S.revision) : "none", s = typeof S.progress == "number" ? Mt(S.progress).toFixed(6) : "none", k = Jn(S.highlights), c = S.forceApply ? "1" : "0";
4663
+ return `${S.bookId}|${t}|${s}|${k}|${c}`;
4662
4664
  }
4663
- function Qn(x, t) {
4665
+ function Qn(S, t) {
4664
4666
  if (typeof t != "number")
4665
4667
  return !1;
4666
- const s = Mt(x), k = Mt(t);
4668
+ const s = Mt(S), k = Mt(t);
4667
4669
  return s <= oe ? !1 : Math.abs(s - k) > oe;
4668
4670
  }
4669
- function tr(x, t) {
4670
- x.set(t.mutationId, t);
4671
+ function tr(S, t) {
4672
+ S.set(t.mutationId, t);
4671
4673
  }
4672
- function er(x) {
4673
- return Array.from(x.values()).sort((t, s) => t.emittedAt - s.emittedAt);
4674
+ function er(S) {
4675
+ return Array.from(S.values()).sort((t, s) => t.emittedAt - s.emittedAt);
4674
4676
  }
4675
- function nr(x, t) {
4677
+ function nr(S, t) {
4676
4678
  const s = Array.isArray(t) ? t : [t];
4677
4679
  for (const k of s)
4678
- x.delete(k);
4680
+ S.delete(k);
4679
4681
  }
4680
4682
  const rr = {
4681
4683
  "Da Vinci": {
@@ -4689,11 +4691,11 @@ const rr = {
4689
4691
  "--color-tint": "#c9f"
4690
4692
  }
4691
4693
  }, ir = {};
4692
- function Jt(x) {
4693
- return typeof crypto < "u" && "randomUUID" in crypto ? `${x}_${crypto.randomUUID()}` : `${x}_${Date.now()}_${Math.random().toString(36).slice(2, 10)}`;
4694
+ function Jt(S) {
4695
+ return typeof crypto < "u" && "randomUUID" in crypto ? `${S}_${crypto.randomUUID()}` : `${S}_${Date.now()}_${Math.random().toString(36).slice(2, 10)}`;
4694
4696
  }
4695
4697
  const or = Qt(({
4696
- epubDataSource: x,
4698
+ epubDataSource: S,
4697
4699
  onTitleChange: t,
4698
4700
  onLoadingChange: s,
4699
4701
  onError: k,
@@ -4714,7 +4716,7 @@ const or = Qt(({
4714
4716
  isLoading: l,
4715
4717
  error: m,
4716
4718
  loadEpub: C,
4717
- setIsLoading: S
4719
+ setIsLoading: x
4718
4720
  } = Ke(), A = ue(() => ({
4719
4721
  ...rr,
4720
4722
  ...y
@@ -4722,13 +4724,13 @@ const or = Qt(({
4722
4724
  _t(() => {
4723
4725
  et.current = J;
4724
4726
  }, [J]);
4725
- const q = St((E) => {
4727
+ const q = xt((E) => {
4726
4728
  tr(vt.current, E), c && c(E);
4727
- }, [c]), G = St(() => d ? {
4729
+ }, [c]), G = xt(() => d ? {
4728
4730
  bookId: d,
4729
4731
  progress: Mt(H.current),
4730
4732
  highlights: Ft(et.current)
4731
- } : null, [d]), B = St((E) => {
4733
+ } : null, [d]), B = xt((E) => {
4732
4734
  pt.current += 1;
4733
4735
  try {
4734
4736
  E();
@@ -4737,7 +4739,7 @@ const or = Qt(({
4737
4739
  pt.current = Math.max(0, pt.current - 1);
4738
4740
  }, 0);
4739
4741
  }
4740
- }, []), V = St((E) => {
4742
+ }, []), V = xt((E) => {
4741
4743
  if (!d || E.bookId !== d)
4742
4744
  return "rejected";
4743
4745
  const D = I.current;
@@ -4754,7 +4756,7 @@ const or = Qt(({
4754
4756
  ...E,
4755
4757
  highlights: E.highlights ? Ft(E.highlights) : void 0
4756
4758
  }, "queued");
4757
- }, [d, B]), it = St((E) => {
4759
+ }, [d, B]), it = xt((E) => {
4758
4760
  if (!d || E.bookId !== d || l)
4759
4761
  return;
4760
4762
  const D = Xn(E);
@@ -4783,7 +4785,7 @@ const or = Qt(({
4783
4785
  }
4784
4786
  V(E) !== "rejected" && (W.current.add(D), M.current = "");
4785
4787
  }, [V, d, G, l, u]);
4786
- xe(v, () => ({
4788
+ Se(v, () => ({
4787
4789
  getSyncSnapshot: G,
4788
4790
  applySyncState: (E, D) => {
4789
4791
  const U = D == null ? void 0 : D.forceApply, K = U === void 0 ? E : {
@@ -4840,7 +4842,7 @@ const or = Qt(({
4840
4842
  }, [V, l, i]), _t(() => {
4841
4843
  vt.current.clear(), W.current.clear(), M.current = "", e.current = null, ht.current = null, kt.current = !1, H.current = 0;
4842
4844
  }, [d]);
4843
- const Q = St((E) => {
4845
+ const Q = xt((E) => {
4844
4846
  $((D) => [...D, E]), !(!d || pt.current > 0) && q({
4845
4847
  type: "highlight.add",
4846
4848
  mutationId: Jt("hl_add"),
@@ -4850,7 +4852,7 @@ const or = Qt(({
4850
4852
  ...E
4851
4853
  }
4852
4854
  });
4853
- }, [d, q]), lt = St((E) => {
4855
+ }, [d, q]), lt = xt((E) => {
4854
4856
  $((D) => D.filter((U) => U.id !== E)), !(!d || pt.current > 0) && q({
4855
4857
  type: "highlight.remove",
4856
4858
  mutationId: Jt("hl_remove"),
@@ -4858,7 +4860,7 @@ const or = Qt(({
4858
4860
  emittedAt: Date.now(),
4859
4861
  highlightId: E
4860
4862
  });
4861
- }, [d, q]), wt = St((E, D) => {
4863
+ }, [d, q]), wt = xt((E, D) => {
4862
4864
  $((U) => U.map((K) => K.id === E ? {
4863
4865
  ...K,
4864
4866
  color: D
@@ -4870,7 +4872,7 @@ const or = Qt(({
4870
4872
  highlightId: E,
4871
4873
  color: D
4872
4874
  });
4873
- }, [d, q]), mt = St((E) => {
4875
+ }, [d, q]), mt = xt((E) => {
4874
4876
  const D = Mt(E);
4875
4877
  if (H.current = D, !kt.current) {
4876
4878
  kt.current = !0, ht.current = D;
@@ -4900,8 +4902,8 @@ const or = Qt(({
4900
4902
  ut(!1), ft(!0);
4901
4903
  };
4902
4904
  _t(() => {
4903
- x && C(x);
4904
- }, [x, C]), _t(() => {
4905
+ S && C(S);
4906
+ }, [S, C]), _t(() => {
4905
4907
  t && t(o);
4906
4908
  }, [o, t]), _t(() => {
4907
4909
  s && s(l);
@@ -4929,7 +4931,7 @@ const or = Qt(({
4929
4931
  /* @__PURE__ */ tt(hn, { isLoading: l }),
4930
4932
  i && /* @__PURE__ */ yt(Xt, { children: [
4931
4933
  ot && !l && /* @__PURE__ */ tt(Kn, { onDismiss: Ct }),
4932
- /* @__PURE__ */ tt(ln, { ref: I, content: i, title: o, bookId: d, setIsLoading: S, fontSize: j, sidePadding: F, fontFamily: w, isOptionMenuVisible: N !== "none", containerElementRef: Y, showTutorial: ot, onPageChange: rt, onPageCountChange: Z, onProgressChange: mt, highlights: J, onAddHighlight: Q, onRemoveHighlight: lt, onUpdateHighlightColor: wt }),
4934
+ /* @__PURE__ */ tt(ln, { ref: I, content: i, title: o, bookId: d, setIsLoading: x, fontSize: j, sidePadding: F, fontFamily: w, isOptionMenuVisible: N !== "none", containerElementRef: Y, showTutorial: ot, onPageChange: rt, onPageCountChange: Z, onProgressChange: mt, highlights: J, onAddHighlight: Q, onRemoveHighlight: lt, onUpdateHighlightColor: wt }),
4933
4935
  N === "options" && /* @__PURE__ */ tt(gn, { onClose: () => O("none"), fontSize: j, padding: F, fontFamily: w, theme: n, setPadding: P, setFontSize: nt, setFontFamily: L, setTheme: z, allThemes: A, supportedFonts: _ }),
4934
4936
  N === "navigation" && !l && /* @__PURE__ */ tt(An, { toc: f, currentPage: R, totalPages: X, onClose: () => O("none"), onGoToPage: (E) => {
4935
4937
  var D;
@@ -4950,7 +4952,7 @@ const or = Qt(({
4950
4952
  /* @__PURE__ */ tt("div", { className: "highlights-icon", "aria-label": "Highlights", children: /* @__PURE__ */ tt(Fe, { size: 16 }) })
4951
4953
  ] })
4952
4954
  ] }),
4953
- !x && !l && !m && /* @__PURE__ */ tt("div", { style: {
4955
+ !S && !l && !m && /* @__PURE__ */ tt("div", { style: {
4954
4956
  padding: "20px",
4955
4957
  textAlign: "center"
4956
4958
  }, children: "No EPUB loaded." })