@prose-reader/core 1.245.0 → 1.247.0
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/enhancers/layout/fixIframeScrollbar.d.ts +2 -0
- package/dist/enhancers/navigation/resolvers/{getNavigationForRightSinglePage.d.ts → getNavigationForRightOrBottomSinglePage.d.ts} +1 -1
- package/dist/enhancers/navigation/resolvers/getSpineItemPositionForRightPage.d.ts +1 -1
- package/dist/index.js +409 -405
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +16 -16
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { switchMap as w, of as v, fromEvent as Y, take as wt, map as S, from as
|
|
2
|
-
import { Report as un, isShallowEqual as
|
|
3
|
-
import { isShallowEqual as
|
|
4
|
-
import { switchMap as _, first as $t, map as J, distinctUntilChanged as
|
|
1
|
+
import { switchMap as w, of as v, fromEvent as Y, take as wt, map as S, from as O, takeUntil as T, Observable as te, defer as ke, Subject as j, combineLatest as k, merge as x, EMPTY as G, withLatestFrom as D, NEVER as ge, tap as P, share as R, BehaviorSubject as W, filter as L, first as U, mergeMap as Pe, endWith as me, finalize as le, catchError as xt, lastValueFrom as tn, scheduled as nn, animationFrameScheduler as se, exhaustMap as Ue, debounceTime as Se, distinctUntilChanged as z, throttleTime as on, startWith as Q, shareReplay as Z, switchScan as sn, defaultIfEmpty as rn, forkJoin as an, delay as ve, timer as $e, ReplaySubject as it, identity as we, skip as Pt, reduce as cn, concatMap as ot } from "rxjs";
|
|
2
|
+
import { Report as un, isShallowEqual as N, shallowMergeIfDefined as xe, getParentPath as ln, parseContentType as pn, detectMimeTypeFromName as Le, arrayEqual as dn } from "@prose-reader/shared";
|
|
3
|
+
import { isShallowEqual as Zs } from "@prose-reader/shared";
|
|
4
|
+
import { switchMap as _, first as $t, map as J, distinctUntilChanged as pe, startWith as gn, shareReplay as Me, tap as V, pairwise as hn, take as mn, takeUntil as q, filter as oe, debounceTime as fn, skip as Tt, mergeMap as yn, catchError as st } from "rxjs/operators";
|
|
5
5
|
import { generate as ze, parse as Ft, isIndirectionOnly as Sn, isParsedCfiRange as In, resolve as bn } from "@prose-reader/cfi";
|
|
6
6
|
import { isDefined as Ge } from "reactjrx";
|
|
7
7
|
const rt = (n, e) => {
|
|
@@ -11,7 +11,7 @@ const rt = (n, e) => {
|
|
|
11
11
|
if (!n?.contentDocument?.head) return;
|
|
12
12
|
const o = n.contentDocument.createElement("style");
|
|
13
13
|
o.id = e, o.innerHTML = t, i ? n.contentDocument.head.prepend(o) : n.contentDocument.head.appendChild(o);
|
|
14
|
-
},
|
|
14
|
+
}, Vs = (n, e) => {
|
|
15
15
|
if (n?.contentDocument?.head) {
|
|
16
16
|
const t = n.contentDocument.getElementById(e);
|
|
17
17
|
t && t.remove();
|
|
@@ -50,7 +50,7 @@ const rt = (n, e) => {
|
|
|
50
50
|
), xn = (n) => n.pipe(
|
|
51
51
|
w((e) => {
|
|
52
52
|
const t = e?.contentDocument?.fonts.ready;
|
|
53
|
-
return t ?
|
|
53
|
+
return t ? O(t).pipe(S(() => e)) : v(void 0);
|
|
54
54
|
})
|
|
55
55
|
), Pn = (n) => (e) => {
|
|
56
56
|
const t = n(e), i = new IntersectionObserver((o) => {
|
|
@@ -224,7 +224,7 @@ const En = (n, e) => {
|
|
|
224
224
|
// JavaScript files
|
|
225
225
|
].join(",");
|
|
226
226
|
return Array.from(n?.querySelectorAll(e) || []);
|
|
227
|
-
},
|
|
227
|
+
}, On = (n) => {
|
|
228
228
|
if (Mt(n).forEach((t) => {
|
|
229
229
|
const i = t.getAttribute("src") || t.getAttribute("href");
|
|
230
230
|
i?.startsWith("blob:") && n?.defaultView?.URL.revokeObjectURL(i);
|
|
@@ -259,7 +259,7 @@ function Et(n) {
|
|
|
259
259
|
// biome-ignore lint/suspicious/noExplicitAny: TODO
|
|
260
260
|
) && n.nodeType === Node.ELEMENT_NODE;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function Nn(n, e) {
|
|
263
263
|
return Et(n) && n.tagName.toLowerCase() === e.toLowerCase();
|
|
264
264
|
}
|
|
265
265
|
function Vn(n) {
|
|
@@ -389,7 +389,7 @@ const De = ({
|
|
|
389
389
|
[i]: o
|
|
390
390
|
} : t,
|
|
391
391
|
{}
|
|
392
|
-
)), Ke = (n) => (e) => e.pipe(Dt(n),
|
|
392
|
+
)), Ke = (n) => (e) => e.pipe(Dt(n), pe(N));
|
|
393
393
|
function Qe(n) {
|
|
394
394
|
return new te((e) => {
|
|
395
395
|
const t = new ResizeObserver((i) => {
|
|
@@ -437,7 +437,7 @@ const ct = (n, e) => new te((t) => {
|
|
|
437
437
|
});
|
|
438
438
|
return i.observe(n, e), () => i.disconnect();
|
|
439
439
|
});
|
|
440
|
-
function
|
|
440
|
+
function js(n, e) {
|
|
441
441
|
return new te((t) => {
|
|
442
442
|
const i = new IntersectionObserver((o) => {
|
|
443
443
|
t.next(o);
|
|
@@ -488,14 +488,14 @@ class At {
|
|
|
488
488
|
watch(e) {
|
|
489
489
|
return Array.isArray(e) ? this.values$.pipe(Ke(e)) : this.values$.pipe(
|
|
490
490
|
J((t) => t[e]),
|
|
491
|
-
|
|
491
|
+
pe(N)
|
|
492
492
|
);
|
|
493
493
|
}
|
|
494
494
|
destroy() {
|
|
495
495
|
this.outputSettingsUpdateSubject.complete();
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
const
|
|
498
|
+
const ks = (n) => {
|
|
499
499
|
const e = new FileReader();
|
|
500
500
|
return new Promise((t) => {
|
|
501
501
|
e.addEventListener(
|
|
@@ -512,7 +512,7 @@ let _n = class extends At {
|
|
|
512
512
|
return e;
|
|
513
513
|
}
|
|
514
514
|
hasSettingsChanged(e) {
|
|
515
|
-
return !
|
|
515
|
+
return !N(this.outputSettings, e);
|
|
516
516
|
}
|
|
517
517
|
getCleanedParentInputSettings(e) {
|
|
518
518
|
const {
|
|
@@ -620,7 +620,7 @@ const Hn = (n) => (e) => {
|
|
|
620
620
|
...e.map((t) => t.watch("isLoaded").pipe(
|
|
621
621
|
w(() => {
|
|
622
622
|
const i = t.renderer.getDocumentFrame();
|
|
623
|
-
if (!i || !i?.contentDocument) return
|
|
623
|
+
if (!i || !i?.contentDocument) return ge;
|
|
624
624
|
const s = Array.from(
|
|
625
625
|
i.contentDocument.querySelectorAll("a")
|
|
626
626
|
).map(
|
|
@@ -648,7 +648,7 @@ const Fe = class Fe extends B {
|
|
|
648
648
|
constructor(e) {
|
|
649
649
|
super(), this.triggerSubject = new j(), this.stateSubject = new W("idle"), this.unload$ = this.triggerSubject.pipe(
|
|
650
650
|
D(this.stateSubject),
|
|
651
|
-
|
|
651
|
+
L(
|
|
652
652
|
([o, s]) => o.type === "unload" && s !== "idle" && s !== "unloading"
|
|
653
653
|
),
|
|
654
654
|
S(() => {
|
|
@@ -656,7 +656,7 @@ const Fe = class Fe extends B {
|
|
|
656
656
|
R()
|
|
657
657
|
), this.load$ = this.triggerSubject.pipe(
|
|
658
658
|
D(this.stateSubject),
|
|
659
|
-
|
|
659
|
+
L(
|
|
660
660
|
([o, s]) => o.type === "load" && s !== "loaded" && s !== "loading"
|
|
661
661
|
),
|
|
662
662
|
S(() => {
|
|
@@ -665,7 +665,7 @@ const Fe = class Fe extends B {
|
|
|
665
665
|
), this.context = e.context, this.settings = e.settings, this.hookManager = e.hookManager, this.item = e.item, this.containerElement = e.containerElement, this.resourcesHandler = e.resourcesHandler, this.viewport = e.viewport;
|
|
666
666
|
const t = this.triggerSubject.pipe(
|
|
667
667
|
D(this.stateSubject),
|
|
668
|
-
|
|
668
|
+
L(
|
|
669
669
|
([o, s]) => o.type === "unload" && s !== "idle" && s !== "unloading"
|
|
670
670
|
),
|
|
671
671
|
S(() => {
|
|
@@ -751,7 +751,7 @@ const Fe = class Fe extends B {
|
|
|
751
751
|
}
|
|
752
752
|
};
|
|
753
753
|
}),
|
|
754
|
-
|
|
754
|
+
le(() => {
|
|
755
755
|
e.complete();
|
|
756
756
|
}),
|
|
757
757
|
xt((t) => (E.error(t), v(void 0)))
|
|
@@ -798,7 +798,7 @@ class et {
|
|
|
798
798
|
return e instanceof Response ? e : e instanceof URL ? fetch(e) : e;
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
|
-
const
|
|
801
|
+
const Ot = (n, e) => {
|
|
802
802
|
const t = n.startsWith("file://"), i = t ? n.replace("file://", "http://") : n, o = new URL(e, i).toString();
|
|
803
803
|
return t ? o.replace("http://", "file://") : o;
|
|
804
804
|
}, qn = async (n, e, t, i, o) => {
|
|
@@ -818,7 +818,7 @@ const Nt = (n, e) => {
|
|
|
818
818
|
return d;
|
|
819
819
|
const m = d.match(/url\(['"]?([^'"]+)['"]?\)/);
|
|
820
820
|
if (!m) return d;
|
|
821
|
-
const y = m[1] ?? "", f = i.manifest?.items.find(({ href: I }) => `${
|
|
821
|
+
const y = m[1] ?? "", f = i.manifest?.items.find(({ href: I }) => `${Ot(t, y).toLowerCase()}`.endsWith(
|
|
822
822
|
`${I.toLowerCase()}`
|
|
823
823
|
));
|
|
824
824
|
if (f) {
|
|
@@ -852,14 +852,14 @@ const Nt = (n, e) => {
|
|
|
852
852
|
}, Gn = (n, e, t, i, o) => {
|
|
853
853
|
const s = e.getAttribute("src") || e.getAttribute("href");
|
|
854
854
|
if (!s) return v(null);
|
|
855
|
-
const r = i.manifest?.items.find(({ href: c }) => `${
|
|
855
|
+
const r = i.manifest?.items.find(({ href: c }) => `${Ot(t, s).toLowerCase()}`.endsWith(
|
|
856
856
|
`${c.toLowerCase()}`
|
|
857
857
|
));
|
|
858
858
|
if (!r) return v(null);
|
|
859
859
|
const a = new et(r, o);
|
|
860
|
-
return
|
|
860
|
+
return O(a.getResource()).pipe(
|
|
861
861
|
Pe(
|
|
862
|
-
(c) => c instanceof Response ?
|
|
862
|
+
(c) => c instanceof Response ? O(c.blob()) : v(void 0)
|
|
863
863
|
),
|
|
864
864
|
Pe((c) => {
|
|
865
865
|
if (!c)
|
|
@@ -906,8 +906,8 @@ const Nt = (n, e) => {
|
|
|
906
906
|
return k(a).pipe(S(() => o));
|
|
907
907
|
})
|
|
908
908
|
), Jn = (n) => {
|
|
909
|
-
|
|
910
|
-
},
|
|
909
|
+
On(n?.contentDocument);
|
|
910
|
+
}, zs = "@prose-reader/core", Ws = 0, _s = 200, Kn = [".xhtml", ".html", ".htm"], de = "prose-reader", Qn = `data-${de}-id`, ei = `${de}-viewport`, ti = async (n, e) => {
|
|
911
911
|
if (typeof n == "string") return n;
|
|
912
912
|
const t = pn(n.headers.get("Content-Type") || "") || Le(e.href);
|
|
913
913
|
if (["image/jpg", "image/jpeg", "image/png", "image/webp"].some(
|
|
@@ -951,7 +951,7 @@ const Nt = (n, e) => {
|
|
|
951
951
|
}) => {
|
|
952
952
|
const t = (i) => ti(i, n);
|
|
953
953
|
return (i) => i.pipe(
|
|
954
|
-
w((o) =>
|
|
954
|
+
w((o) => O(e.getResource()).pipe(
|
|
955
955
|
w((s) => s instanceof URL && n.href.startsWith(window.location.origin) && // we have an encoding and it's a valid html
|
|
956
956
|
(n.mediaType && [
|
|
957
957
|
"application/xhtml+xml",
|
|
@@ -961,11 +961,11 @@ const Nt = (n, e) => {
|
|
|
961
961
|
].includes(n.mediaType) || // no encoding ? then try to detect html
|
|
962
962
|
!n.mediaType && Kn.some(
|
|
963
963
|
(a) => n.href.endsWith(a)
|
|
964
|
-
)) ? (o?.setAttribute("src", n.href), v(o)) : (s instanceof URL ?
|
|
964
|
+
)) ? (o?.setAttribute("src", n.href), v(o)) : (s instanceof URL ? O(e.fetchResource()) : v(s)).pipe(
|
|
965
965
|
w((a) => {
|
|
966
966
|
if (!(a instanceof Response))
|
|
967
967
|
throw new Error("Invalid resource");
|
|
968
|
-
return
|
|
968
|
+
return O(t(a));
|
|
969
969
|
}),
|
|
970
970
|
P((a) => {
|
|
971
971
|
if (a) {
|
|
@@ -996,7 +996,7 @@ const Nt = (n, e) => {
|
|
|
996
996
|
border: 0px none transparent;
|
|
997
997
|
padding: 0px;
|
|
998
998
|
`, n.setAttribute("role", "main"), n;
|
|
999
|
-
},
|
|
999
|
+
}, Nt = () => `
|
|
1000
1000
|
body {
|
|
1001
1001
|
margin: 0;
|
|
1002
1002
|
}
|
|
@@ -1019,7 +1019,7 @@ const Nt = (n, e) => {
|
|
|
1019
1019
|
enableTouch: e,
|
|
1020
1020
|
spreadPosition: t
|
|
1021
1021
|
}, i) => `
|
|
1022
|
-
${
|
|
1022
|
+
${Nt()}
|
|
1023
1023
|
body {
|
|
1024
1024
|
${i ? "" : `
|
|
1025
1025
|
display: flex;
|
|
@@ -1109,7 +1109,7 @@ const Nt = (n, e) => {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
return { width: c, height: i };
|
|
1111
1111
|
}, ai = () => `
|
|
1112
|
-
${
|
|
1112
|
+
${Nt()}
|
|
1113
1113
|
html {
|
|
1114
1114
|
width: 100%;
|
|
1115
1115
|
height: 100%;
|
|
@@ -1374,7 +1374,7 @@ class di extends fe {
|
|
|
1374
1374
|
return v(c);
|
|
1375
1375
|
}
|
|
1376
1376
|
onRenderHeadless() {
|
|
1377
|
-
return
|
|
1377
|
+
return O(this.resourcesHandler.fetchResource()).pipe(
|
|
1378
1378
|
w((e) => {
|
|
1379
1379
|
if (e instanceof Response) {
|
|
1380
1380
|
const t = e.headers.get("content-type") ?? "";
|
|
@@ -1384,7 +1384,7 @@ class di extends fe {
|
|
|
1384
1384
|
"text/html",
|
|
1385
1385
|
"text/xml"
|
|
1386
1386
|
].includes(t))
|
|
1387
|
-
return
|
|
1387
|
+
return O(e.text()).pipe(
|
|
1388
1388
|
S((o) => new DOMParser().parseFromString(
|
|
1389
1389
|
o,
|
|
1390
1390
|
t
|
|
@@ -1439,7 +1439,7 @@ const gi = (n) => (e) => {
|
|
|
1439
1439
|
links$: i
|
|
1440
1440
|
};
|
|
1441
1441
|
};
|
|
1442
|
-
function
|
|
1442
|
+
function ue(n) {
|
|
1443
1443
|
return n != null;
|
|
1444
1444
|
}
|
|
1445
1445
|
class tt {
|
|
@@ -1477,20 +1477,20 @@ class jt {
|
|
|
1477
1477
|
this.x = e.x, this.y = e.y;
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
|
-
class
|
|
1480
|
+
class M extends jt {
|
|
1481
1481
|
constructor() {
|
|
1482
1482
|
super(...arguments), this.__symbol = "SpinePosition";
|
|
1483
1483
|
}
|
|
1484
1484
|
static from(e) {
|
|
1485
|
-
return new
|
|
1485
|
+
return new M(e);
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
|
-
class
|
|
1488
|
+
class re extends jt {
|
|
1489
1489
|
constructor() {
|
|
1490
1490
|
super(...arguments), this.__symbol = "UnboundSpinePosition";
|
|
1491
1491
|
}
|
|
1492
1492
|
static from(e) {
|
|
1493
|
-
return new
|
|
1493
|
+
return new re(e);
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
const fi = (n, e) => {
|
|
@@ -1499,7 +1499,7 @@ const fi = (n, e) => {
|
|
|
1499
1499
|
x: u / a,
|
|
1500
1500
|
y: l / c
|
|
1501
1501
|
};
|
|
1502
|
-
}, yi = (n, e) => new
|
|
1502
|
+
}, yi = (n, e) => new re(
|
|
1503
1503
|
fi(n, e)
|
|
1504
1504
|
), Si = (n) => ({
|
|
1505
1505
|
getSpinePositionFromClientPosition: (e) => n.spine.element ? yi(e, n.spine.element) : void 0
|
|
@@ -1515,7 +1515,7 @@ const fi = (n, e) => {
|
|
|
1515
1515
|
visibility: hidden;
|
|
1516
1516
|
`, c.appendChild(e), () => {
|
|
1517
1517
|
e?.remove(), e = void 0;
|
|
1518
|
-
})) :
|
|
1518
|
+
})) : ge)
|
|
1519
1519
|
), i = (c) => nn(c, se).pipe(
|
|
1520
1520
|
V(() => {
|
|
1521
1521
|
e?.style.setProperty(
|
|
@@ -1534,7 +1534,7 @@ const fi = (n, e) => {
|
|
|
1534
1534
|
mn(1)
|
|
1535
1535
|
), a = n.settings.values$.pipe(
|
|
1536
1536
|
J(() => n.settings.values.computedPageTurnMode),
|
|
1537
|
-
|
|
1537
|
+
pe()
|
|
1538
1538
|
).pipe(
|
|
1539
1539
|
_(
|
|
1540
1540
|
(c) => c === "controlled" ? o.pipe(_(() => s)) : i(v(void 0))
|
|
@@ -1543,6 +1543,10 @@ const fi = (n, e) => {
|
|
|
1543
1543
|
);
|
|
1544
1544
|
return x(t, a);
|
|
1545
1545
|
}, bi = (n) => {
|
|
1546
|
+
n.hookManager.register("item.onDocumentLoad", ({ itemId: e }) => {
|
|
1547
|
+
n.spineItemsManager.get(e)?.renderer.getDocumentFrame()?.setAttribute("scrolling", "no");
|
|
1548
|
+
});
|
|
1549
|
+
}, vi = (n) => {
|
|
1546
1550
|
n.hookManager.register(
|
|
1547
1551
|
"item.onAfterLayout",
|
|
1548
1552
|
({ item: e, blankPagePosition: t, minimumWidth: i }) => {
|
|
@@ -1559,7 +1563,7 @@ const fi = (n, e) => {
|
|
|
1559
1563
|
}
|
|
1560
1564
|
}
|
|
1561
1565
|
);
|
|
1562
|
-
},
|
|
1566
|
+
}, wi = (n) => n.spineItemsManager.items$.pipe(
|
|
1563
1567
|
w(
|
|
1564
1568
|
(e) => x(
|
|
1565
1569
|
...e.map(
|
|
@@ -1572,12 +1576,12 @@ const fi = (n, e) => {
|
|
|
1572
1576
|
)
|
|
1573
1577
|
)
|
|
1574
1578
|
);
|
|
1575
|
-
let
|
|
1579
|
+
let xi = class extends At {
|
|
1576
1580
|
computeOutputSettings(e) {
|
|
1577
1581
|
return e;
|
|
1578
1582
|
}
|
|
1579
1583
|
hasSettingsChanged(e) {
|
|
1580
|
-
return !
|
|
1584
|
+
return !N(this.outputSettings, e);
|
|
1581
1585
|
}
|
|
1582
1586
|
getCleanedParentInputSettings(e) {
|
|
1583
1587
|
const {
|
|
@@ -1598,7 +1602,7 @@ let wi = class extends At {
|
|
|
1598
1602
|
};
|
|
1599
1603
|
}
|
|
1600
1604
|
};
|
|
1601
|
-
const
|
|
1605
|
+
const Pi = (n) => k([
|
|
1602
1606
|
n.viewport.watch(["width", "height"]),
|
|
1603
1607
|
n.context.watch("manifest")
|
|
1604
1608
|
]).pipe(
|
|
@@ -1606,13 +1610,13 @@ const xi = (n) => k([
|
|
|
1606
1610
|
const o = e > t;
|
|
1607
1611
|
return !o && i?.renditionSpread === "portrait" ? n.settings.update({ spreadMode: !0 }) : o && (i?.renditionSpread === void 0 || i?.renditionSpread === "auto" || i?.renditionSpread === "landscape" || i?.renditionSpread === "both") ? n.settings.update({ spreadMode: !0 }) : n.settings.update({ spreadMode: !1 });
|
|
1608
1612
|
})
|
|
1609
|
-
),
|
|
1613
|
+
), $i = (n) => (e) => {
|
|
1610
1614
|
const {
|
|
1611
1615
|
pageHorizontalMargin: t,
|
|
1612
1616
|
pageVerticalMargin: i,
|
|
1613
1617
|
layoutAutoResize: o,
|
|
1614
1618
|
layoutLayerTransition: s
|
|
1615
|
-
} = e, r = n(e), a = new
|
|
1619
|
+
} = e, r = n(e), a = new xi(
|
|
1616
1620
|
{
|
|
1617
1621
|
pageHorizontalMargin: t,
|
|
1618
1622
|
pageVerticalMargin: i,
|
|
@@ -1659,7 +1663,7 @@ const xi = (n) => k([
|
|
|
1659
1663
|
`
|
|
1660
1664
|
);
|
|
1661
1665
|
}
|
|
1662
|
-
}), bi(r), r.hookManager.register(
|
|
1666
|
+
}), vi(r), bi(r), r.hookManager.register(
|
|
1663
1667
|
"item.onDocumentCreated",
|
|
1664
1668
|
({ documentContainer: d }) => {
|
|
1665
1669
|
d.style.opacity = "0", a.values.layoutLayerTransition && (d.style.transition = "opacity 300ms");
|
|
@@ -1677,10 +1681,10 @@ const xi = (n) => k([
|
|
|
1677
1681
|
), u = a.values$.pipe(
|
|
1678
1682
|
oe(({ layoutAutoResize: d }) => d === "container"),
|
|
1679
1683
|
_(() => r.context.watch("rootElement")),
|
|
1680
|
-
oe(
|
|
1684
|
+
oe(ue),
|
|
1681
1685
|
_((d) => Qe(d)),
|
|
1682
1686
|
fn(100),
|
|
1683
|
-
oe(
|
|
1687
|
+
oe(ue),
|
|
1684
1688
|
V(() => {
|
|
1685
1689
|
r?.layout();
|
|
1686
1690
|
})
|
|
@@ -1694,7 +1698,7 @@ const xi = (n) => k([
|
|
|
1694
1698
|
).subscribe();
|
|
1695
1699
|
const p = r.spine.pages.pipe(
|
|
1696
1700
|
Me({ refCount: !0, bufferSize: 1 })
|
|
1697
|
-
), g =
|
|
1701
|
+
), g = wi(r), h = Pi(r);
|
|
1698
1702
|
return x(
|
|
1699
1703
|
c,
|
|
1700
1704
|
l,
|
|
@@ -1712,7 +1716,7 @@ const xi = (n) => k([
|
|
|
1712
1716
|
layoutInfo$: p,
|
|
1713
1717
|
coordinates: Si(r)
|
|
1714
1718
|
};
|
|
1715
|
-
},
|
|
1719
|
+
}, Ti = `${de}-enhancer-loading`, kt = `${Ti}-container`, Fi = (n, e) => {
|
|
1716
1720
|
const t = n.ownerDocument.createElement("div");
|
|
1717
1721
|
return t.classList.add(kt), t.style.cssText = `
|
|
1718
1722
|
height: 100%;
|
|
@@ -1730,7 +1734,7 @@ const xi = (n) => k([
|
|
|
1730
1734
|
background-color: white;
|
|
1731
1735
|
z-index: 1;
|
|
1732
1736
|
`, t;
|
|
1733
|
-
},
|
|
1737
|
+
}, Li = ({
|
|
1734
1738
|
container: n,
|
|
1735
1739
|
item: e
|
|
1736
1740
|
}) => {
|
|
@@ -1747,8 +1751,8 @@ const xi = (n) => k([
|
|
|
1747
1751
|
max-width: 300px;
|
|
1748
1752
|
width: 80%;
|
|
1749
1753
|
`, n.appendChild(t), n.appendChild(i), n;
|
|
1750
|
-
},
|
|
1751
|
-
const { loadingElementCreate: t =
|
|
1754
|
+
}, Mi = (n) => (e) => {
|
|
1755
|
+
const { loadingElementCreate: t = Li } = e, i = n(e), o = (c) => v(
|
|
1752
1756
|
c.reduce((u, { item: l, element: p }) => {
|
|
1753
1757
|
p.style.zIndex = "0";
|
|
1754
1758
|
const g = p.querySelector(
|
|
@@ -1757,7 +1761,7 @@ const xi = (n) => k([
|
|
|
1757
1761
|
if (g instanceof HTMLElement)
|
|
1758
1762
|
return u[l.id] = g, u;
|
|
1759
1763
|
const h = t({
|
|
1760
|
-
container:
|
|
1764
|
+
container: Fi(p, i.viewport),
|
|
1761
1765
|
item: l
|
|
1762
1766
|
});
|
|
1763
1767
|
return p.appendChild(h), u[l.id] = h, u;
|
|
@@ -1767,7 +1771,7 @@ const xi = (n) => k([
|
|
|
1767
1771
|
width: i.viewport.absoluteViewport.width,
|
|
1768
1772
|
theme: u
|
|
1769
1773
|
})),
|
|
1770
|
-
|
|
1774
|
+
pe(N),
|
|
1771
1775
|
V(({ width: u, theme: l }) => {
|
|
1772
1776
|
Object.values(c).forEach((p) => {
|
|
1773
1777
|
p.style.setProperty("max-width", `${u}px`), p.style.setProperty(
|
|
@@ -1808,7 +1812,7 @@ const xi = (n) => k([
|
|
|
1808
1812
|
}
|
|
1809
1813
|
};
|
|
1810
1814
|
};
|
|
1811
|
-
class
|
|
1815
|
+
class Ci extends fe {
|
|
1812
1816
|
getImageElement() {
|
|
1813
1817
|
const e = this.documentContainer;
|
|
1814
1818
|
if (e instanceof HTMLImageElement)
|
|
@@ -1816,12 +1820,12 @@ class Mi extends fe {
|
|
|
1816
1820
|
}
|
|
1817
1821
|
onCreateDocument() {
|
|
1818
1822
|
const e = this.containerElement.ownerDocument.createElement("img");
|
|
1819
|
-
return
|
|
1823
|
+
return O(this.resourcesHandler.getResource()).pipe(
|
|
1820
1824
|
w((t) => {
|
|
1821
1825
|
if (this.setDocumentContainer(e), e.style.objectFit = "contain", e.style.userSelect = "none", t instanceof URL)
|
|
1822
1826
|
return v(t.href);
|
|
1823
1827
|
if (t instanceof Response)
|
|
1824
|
-
return
|
|
1828
|
+
return O(t.blob()).pipe(
|
|
1825
1829
|
S((i) => URL.createObjectURL(i))
|
|
1826
1830
|
);
|
|
1827
1831
|
throw new Error("Invalid resource");
|
|
@@ -1860,12 +1864,12 @@ class Mi extends fe {
|
|
|
1860
1864
|
getDocumentFrame() {
|
|
1861
1865
|
}
|
|
1862
1866
|
}
|
|
1863
|
-
const
|
|
1867
|
+
const Ei = (n) => (e) => {
|
|
1864
1868
|
const t = n({
|
|
1865
1869
|
...e,
|
|
1866
1870
|
getRenderer(r) {
|
|
1867
1871
|
const a = e.getRenderer?.(r), u = !!(r.mediaType ?? Le(r.href))?.startsWith("image/");
|
|
1868
|
-
return !a && u ? (l) => new
|
|
1872
|
+
return !a && u ? (l) => new Ci(l) : a;
|
|
1869
1873
|
}
|
|
1870
1874
|
}), i = new IntersectionObserver(
|
|
1871
1875
|
(r) => {
|
|
@@ -1913,15 +1917,15 @@ const Ci = (n) => (e) => {
|
|
|
1913
1917
|
i.disconnect(), o.disconnect(), t.destroy();
|
|
1914
1918
|
}
|
|
1915
1919
|
};
|
|
1916
|
-
},
|
|
1920
|
+
}, Di = (n, e) => n.links$.pipe(
|
|
1917
1921
|
P((t) => {
|
|
1918
|
-
if (!
|
|
1922
|
+
if (!Nn(t.target, "a") || t.type !== "click") return;
|
|
1919
1923
|
const i = new URL(t.target.href), o = `${i.origin}${i.pathname}`;
|
|
1920
1924
|
n.context.manifest?.spineItems.some(
|
|
1921
1925
|
(r) => r.href === o
|
|
1922
1926
|
) && e.goToUrl(i);
|
|
1923
1927
|
})
|
|
1924
|
-
), ie = E.namespace("navigation"),
|
|
1928
|
+
), ie = E.namespace("navigation"), Ri = ({
|
|
1925
1929
|
position: n,
|
|
1926
1930
|
spineItem: e,
|
|
1927
1931
|
pageHeight: t,
|
|
@@ -1953,7 +1957,7 @@ const Ci = (n) => (e) => {
|
|
|
1953
1957
|
const u = o.getSpineItemPositionFromSpinePosition(
|
|
1954
1958
|
n,
|
|
1955
1959
|
a
|
|
1956
|
-
), l =
|
|
1960
|
+
), l = Ri({
|
|
1957
1961
|
position: u,
|
|
1958
1962
|
spineItem: a,
|
|
1959
1963
|
pageHeight: s.pageSize.height,
|
|
@@ -1967,15 +1971,15 @@ const Ci = (n) => (e) => {
|
|
|
1967
1971
|
spineItemPosition: l,
|
|
1968
1972
|
spineItem: a
|
|
1969
1973
|
}) : e.fromUnboundSpinePosition(
|
|
1970
|
-
r === "horizontal" ? new
|
|
1974
|
+
r === "horizontal" ? new M({
|
|
1971
1975
|
x: n.x - s.pageSize.width,
|
|
1972
1976
|
y: 0
|
|
1973
|
-
}) : new
|
|
1977
|
+
}) : new M({
|
|
1974
1978
|
y: n.y - s.pageSize.height,
|
|
1975
1979
|
x: 0
|
|
1976
1980
|
})
|
|
1977
1981
|
);
|
|
1978
|
-
},
|
|
1982
|
+
}, Ai = ({
|
|
1979
1983
|
position: n,
|
|
1980
1984
|
spineItem: e,
|
|
1981
1985
|
context: t,
|
|
@@ -2019,7 +2023,7 @@ const Ci = (n) => (e) => {
|
|
|
2019
2023
|
return i.getAdjustedPositionForSpread(l);
|
|
2020
2024
|
}
|
|
2021
2025
|
return i.getAdjustedPositionForSpread(u);
|
|
2022
|
-
},
|
|
2026
|
+
}, Oi = ({
|
|
2023
2027
|
position: n,
|
|
2024
2028
|
spineItem: e,
|
|
2025
2029
|
pageHeight: t,
|
|
@@ -2051,7 +2055,7 @@ const Ci = (n) => (e) => {
|
|
|
2051
2055
|
const u = o.getSpineItemPositionFromSpinePosition(
|
|
2052
2056
|
n,
|
|
2053
2057
|
a
|
|
2054
|
-
), l =
|
|
2058
|
+
), l = Oi({
|
|
2055
2059
|
position: u,
|
|
2056
2060
|
spineItem: a,
|
|
2057
2061
|
pageHeight: s.pageSize.height,
|
|
@@ -2065,10 +2069,10 @@ const Ci = (n) => (e) => {
|
|
|
2065
2069
|
spineItemPosition: l,
|
|
2066
2070
|
spineItem: a
|
|
2067
2071
|
}) : e.fromUnboundSpinePosition(
|
|
2068
|
-
r === "horizontal" ? new
|
|
2072
|
+
r === "horizontal" ? new re({
|
|
2069
2073
|
x: n.x + s.pageSize.width,
|
|
2070
2074
|
y: 0
|
|
2071
|
-
}) : new
|
|
2075
|
+
}) : new re({
|
|
2072
2076
|
y: n.y + s.pageSize.height,
|
|
2073
2077
|
x: 0
|
|
2074
2078
|
})
|
|
@@ -2121,9 +2125,9 @@ const Ci = (n) => (e) => {
|
|
|
2121
2125
|
}
|
|
2122
2126
|
return i.getAdjustedPositionForSpread(u);
|
|
2123
2127
|
};
|
|
2124
|
-
class
|
|
2128
|
+
class Vi {
|
|
2125
2129
|
constructor(e) {
|
|
2126
|
-
this.reader = e, this.movingLastDelta = { x: 0, y: 0 }, this.movingLastPosition = new
|
|
2130
|
+
this.reader = e, this.movingLastDelta = { x: 0, y: 0 }, this.movingLastPosition = new M({ x: 0, y: 0 }), this.unlock = void 0;
|
|
2127
2131
|
}
|
|
2128
2132
|
turnRight() {
|
|
2129
2133
|
return this.turnRightOrBottom();
|
|
@@ -2158,7 +2162,7 @@ class Oi {
|
|
|
2158
2162
|
turnLeftOrTop() {
|
|
2159
2163
|
const e = this.reader.navigation.getNavigation(), t = this.reader.spineItemsManager.get(e.spineItem);
|
|
2160
2164
|
if (!t) return;
|
|
2161
|
-
const i =
|
|
2165
|
+
const i = Ai({
|
|
2162
2166
|
context: this.reader.context,
|
|
2163
2167
|
navigationResolver: this.reader.navigation.navigationResolver,
|
|
2164
2168
|
position: e.position,
|
|
@@ -2300,9 +2304,9 @@ class Oi {
|
|
|
2300
2304
|
}
|
|
2301
2305
|
}
|
|
2302
2306
|
}
|
|
2303
|
-
class
|
|
2307
|
+
class ji {
|
|
2304
2308
|
constructor(e) {
|
|
2305
|
-
this.reader = e, this.lastDelta = { x: 0, y: 0 }, this.lastPosition = new
|
|
2309
|
+
this.reader = e, this.lastDelta = { x: 0, y: 0 }, this.lastPosition = new M({ x: 0, y: 0 }), this.lastStartPosition = new M({ x: 0, y: 0 }), this.unlock = void 0;
|
|
2306
2310
|
}
|
|
2307
2311
|
moveTo(e, { final: t, start: i } = {}) {
|
|
2308
2312
|
if (this.reader.settings.values.computedPageTurnMode === "scrollable") {
|
|
@@ -2320,7 +2324,7 @@ class Vi {
|
|
|
2320
2324
|
), l = Math.floor(
|
|
2321
2325
|
o === "horizontal" ? 0 : this.lastPosition.y - c / r
|
|
2322
2326
|
);
|
|
2323
|
-
s = new
|
|
2327
|
+
s = new M({
|
|
2324
2328
|
x: u,
|
|
2325
2329
|
y: l
|
|
2326
2330
|
}), this.lastDelta = e;
|
|
@@ -2339,8 +2343,8 @@ class Vi {
|
|
|
2339
2343
|
});
|
|
2340
2344
|
}
|
|
2341
2345
|
}
|
|
2342
|
-
const
|
|
2343
|
-
class
|
|
2346
|
+
const ki = 500;
|
|
2347
|
+
class Ui extends B {
|
|
2344
2348
|
constructor(e, t) {
|
|
2345
2349
|
super(), this.scrollNavigationController = e, this.locker = t, this.navigationSubject = new j(), this.navigation$ = this.navigationSubject.asObservable();
|
|
2346
2350
|
const i = this.scrollNavigationController.userScroll$.pipe(
|
|
@@ -2351,7 +2355,7 @@ class ki extends B {
|
|
|
2351
2355
|
v(o)
|
|
2352
2356
|
).pipe(
|
|
2353
2357
|
Se(
|
|
2354
|
-
|
|
2358
|
+
ki,
|
|
2355
2359
|
se
|
|
2356
2360
|
),
|
|
2357
2361
|
U(),
|
|
@@ -2365,7 +2369,7 @@ class ki extends B {
|
|
|
2365
2369
|
position: r
|
|
2366
2370
|
});
|
|
2367
2371
|
}),
|
|
2368
|
-
|
|
2372
|
+
le(() => {
|
|
2369
2373
|
s();
|
|
2370
2374
|
})
|
|
2371
2375
|
);
|
|
@@ -2374,7 +2378,7 @@ class ki extends B {
|
|
|
2374
2378
|
x(i).pipe(T(this.destroy$)).subscribe();
|
|
2375
2379
|
}
|
|
2376
2380
|
}
|
|
2377
|
-
const
|
|
2381
|
+
const zi = (n) => n.pagination.state$.pipe(
|
|
2378
2382
|
D(n.context.manifest$, n.settings.values$),
|
|
2379
2383
|
S(
|
|
2380
2384
|
([
|
|
@@ -2393,8 +2397,8 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2393
2397
|
};
|
|
2394
2398
|
}
|
|
2395
2399
|
),
|
|
2396
|
-
z(
|
|
2397
|
-
),
|
|
2400
|
+
z(N)
|
|
2401
|
+
), Wi = ({ reader: n, duration: e }) => (t) => {
|
|
2398
2402
|
let i;
|
|
2399
2403
|
const o = () => {
|
|
2400
2404
|
i?.(), i = void 0;
|
|
@@ -2408,13 +2412,13 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2408
2412
|
leading: !0
|
|
2409
2413
|
}),
|
|
2410
2414
|
P(o),
|
|
2411
|
-
|
|
2415
|
+
le(o)
|
|
2412
2416
|
);
|
|
2413
|
-
},
|
|
2414
|
-
const t = n(e), i =
|
|
2417
|
+
}, _i = (n) => (e) => {
|
|
2418
|
+
const t = n(e), i = zi(t), o = new Vi(t), s = new ji(t), r = new Ui(
|
|
2415
2419
|
t.navigation.scrollNavigationController,
|
|
2416
2420
|
t.navigation.locker
|
|
2417
|
-
), a =
|
|
2421
|
+
), a = Di(t, o), c = r.navigation$.pipe(
|
|
2418
2422
|
P((p) => {
|
|
2419
2423
|
t.navigation.navigate(p);
|
|
2420
2424
|
})
|
|
@@ -2431,7 +2435,7 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2431
2435
|
navigation: {
|
|
2432
2436
|
...t.navigation,
|
|
2433
2437
|
state$: i,
|
|
2434
|
-
throttleLock: ({ duration: p, trigger: g }) => g.pipe(
|
|
2438
|
+
throttleLock: ({ duration: p, trigger: g }) => g.pipe(Wi({ duration: p, reader: t })),
|
|
2435
2439
|
moveTo: s.moveTo.bind(s),
|
|
2436
2440
|
turnBottom: o.turnBottom.bind(o),
|
|
2437
2441
|
turnTop: o.turnTop.bind(o),
|
|
@@ -2479,19 +2483,19 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2479
2483
|
}
|
|
2480
2484
|
return o;
|
|
2481
2485
|
}, void 0);
|
|
2482
|
-
},
|
|
2486
|
+
}, Hi = (n, e) => {
|
|
2483
2487
|
const { href: t } = e;
|
|
2484
2488
|
return Ut(t, n.nav?.toc ?? [], n);
|
|
2485
|
-
},
|
|
2489
|
+
}, Bi = (n) => {
|
|
2486
2490
|
const e = n.context.manifest, t = n.spineItemsManager.items;
|
|
2487
2491
|
return e ? t.reduce(
|
|
2488
|
-
(i, { item: o }) => (i[o.id] =
|
|
2492
|
+
(i, { item: o }) => (i[o.id] = Hi(e, o), i),
|
|
2489
2493
|
{}
|
|
2490
2494
|
) : {};
|
|
2491
|
-
},
|
|
2495
|
+
}, Xi = (n) => n.spineItemsManager.items$.pipe(
|
|
2492
2496
|
Q([]),
|
|
2493
|
-
S(() =>
|
|
2494
|
-
),
|
|
2497
|
+
S(() => Bi(n))
|
|
2498
|
+
), Yi = (n, e, t) => n + e * t, qi = (n, e, t) => {
|
|
2495
2499
|
const { height: i, width: o } = t.layout.layoutInfo, { top: s, left: r } = n.spine.getSpineItemSpineLayoutInfo(t);
|
|
2496
2500
|
return n.settings.values.computedPageTurnDirection === "vertical" ? Math.max(
|
|
2497
2501
|
0,
|
|
@@ -2506,7 +2510,7 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2506
2510
|
(e.x - r + n.viewport.absoluteViewport.width) / o
|
|
2507
2511
|
)
|
|
2508
2512
|
);
|
|
2509
|
-
},
|
|
2513
|
+
}, Gi = (n, e, t, i, o) => o.isReady$.pipe(
|
|
2510
2514
|
U(),
|
|
2511
2515
|
D(n.layoutInfo$),
|
|
2512
2516
|
S(([s, r]) => {
|
|
@@ -2516,17 +2520,17 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2516
2520
|
let m = (t + 1) * (d / h);
|
|
2517
2521
|
!c && o.renditionLayout === "reflowable" && !s && (m = 0);
|
|
2518
2522
|
let y = l + m;
|
|
2519
|
-
return a.manifest?.renditionFlow === "scrolled-continuous" && (s ? m =
|
|
2523
|
+
return a.manifest?.renditionFlow === "scrolled-continuous" && (s ? m = qi(
|
|
2520
2524
|
n,
|
|
2521
2525
|
i,
|
|
2522
2526
|
o
|
|
2523
|
-
) : m = 0, y =
|
|
2527
|
+
) : m = 0, y = Yi(
|
|
2524
2528
|
l,
|
|
2525
2529
|
d,
|
|
2526
2530
|
m
|
|
2527
2531
|
)), e === u - 1 && t === h - 1 && y > 0.99 ? 1 : y;
|
|
2528
2532
|
})
|
|
2529
|
-
),
|
|
2533
|
+
), Zi = (n) => n.spine.layout$.pipe(
|
|
2530
2534
|
Se(10, se),
|
|
2531
2535
|
D(n.pagination.state$),
|
|
2532
2536
|
S(() => ({
|
|
@@ -2539,12 +2543,12 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2539
2543
|
*/
|
|
2540
2544
|
numberOfTotalPages: n.spine.pages.value.pages.length
|
|
2541
2545
|
})),
|
|
2542
|
-
z(
|
|
2546
|
+
z(N),
|
|
2543
2547
|
Q({
|
|
2544
2548
|
numberOfPagesPerItems: [],
|
|
2545
2549
|
numberOfTotalPages: 0
|
|
2546
2550
|
})
|
|
2547
|
-
),
|
|
2551
|
+
), Ji = (n, e, t, i) => {
|
|
2548
2552
|
const o = e.beginSpineItemIndex !== void 0 ? n.spineItemsManager.get(e.beginSpineItemIndex) : void 0, s = e.endSpineItemIndex !== void 0 ? n.spineItemsManager.get(e.endSpineItemIndex) : void 0;
|
|
2549
2553
|
return v({
|
|
2550
2554
|
...e,
|
|
@@ -2575,7 +2579,7 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2575
2579
|
// hasPreviousChapter: (reader.spine.spineItemIndex || 0) < (manifest.readingOrder.length - 1),
|
|
2576
2580
|
// numberOfSpineItems: context.manifest?.readingOrder.length,
|
|
2577
2581
|
});
|
|
2578
|
-
},
|
|
2582
|
+
}, Ki = (n) => k([
|
|
2579
2583
|
n.pagination.state$,
|
|
2580
2584
|
// Usually pagination change if layout changes (number of pages) however it is especially
|
|
2581
2585
|
// useful for like webtoon where you still have one page but only the layout will give you the final size
|
|
@@ -2584,7 +2588,7 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2584
2588
|
]).pipe(
|
|
2585
2589
|
w(([e]) => {
|
|
2586
2590
|
const t = e.endSpineItemIndex !== void 0 ? n.spineItemsManager.get(e.endSpineItemIndex) : void 0;
|
|
2587
|
-
return t ?
|
|
2591
|
+
return t ? Gi(
|
|
2588
2592
|
n,
|
|
2589
2593
|
e.endSpineItemIndex ?? 0,
|
|
2590
2594
|
e.endPageIndexInSpineItem || 0,
|
|
@@ -2592,8 +2596,8 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2592
2596
|
t
|
|
2593
2597
|
) : v(0);
|
|
2594
2598
|
})
|
|
2595
|
-
),
|
|
2596
|
-
const e =
|
|
2599
|
+
), Qi = (n) => {
|
|
2600
|
+
const e = Xi(n), t = Zi(n), i = new W({
|
|
2597
2601
|
...n.pagination.state,
|
|
2598
2602
|
beginChapterInfo: void 0,
|
|
2599
2603
|
beginCfi: void 0,
|
|
@@ -2611,10 +2615,10 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2611
2615
|
}), o = k([
|
|
2612
2616
|
n.pagination.state$,
|
|
2613
2617
|
e,
|
|
2614
|
-
|
|
2618
|
+
Ki(n)
|
|
2615
2619
|
]).pipe(
|
|
2616
2620
|
w(
|
|
2617
|
-
([r, a, c]) =>
|
|
2621
|
+
([r, a, c]) => Ji(
|
|
2618
2622
|
n,
|
|
2619
2623
|
r,
|
|
2620
2624
|
a,
|
|
@@ -2626,7 +2630,7 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2626
2630
|
}))
|
|
2627
2631
|
)
|
|
2628
2632
|
),
|
|
2629
|
-
z(
|
|
2633
|
+
z(N)
|
|
2630
2634
|
);
|
|
2631
2635
|
return { paginationInfo$: k([
|
|
2632
2636
|
o,
|
|
@@ -2649,7 +2653,7 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2649
2653
|
}),
|
|
2650
2654
|
Z(1)
|
|
2651
2655
|
), getPaginationInfo: () => i.value };
|
|
2652
|
-
},
|
|
2656
|
+
}, he = (n) => ze({
|
|
2653
2657
|
spineIndex: n.index,
|
|
2654
2658
|
spineId: n.id
|
|
2655
2659
|
}), zt = ({
|
|
@@ -2658,7 +2662,7 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2658
2662
|
item: t
|
|
2659
2663
|
}) => {
|
|
2660
2664
|
const i = "ownerDocument" in n ? n.ownerDocument : n.startContainer.ownerDocument;
|
|
2661
|
-
return !i || !i?.documentElement || n === i ?
|
|
2665
|
+
return !i || !i?.documentElement || n === i ? he(t) : Vn(n) ? ze({
|
|
2662
2666
|
start: {
|
|
2663
2667
|
node: n.startContainer,
|
|
2664
2668
|
offset: n.startOffset,
|
|
@@ -2689,15 +2693,15 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2689
2693
|
nodeOrRange: o.node,
|
|
2690
2694
|
offset: o.offset,
|
|
2691
2695
|
item: e.item
|
|
2692
|
-
}).trim() :
|
|
2693
|
-
},
|
|
2696
|
+
}).trim() : he(e.item);
|
|
2697
|
+
}, eo = (n, e) => zt({
|
|
2694
2698
|
nodeOrRange: n,
|
|
2695
2699
|
item: e
|
|
2696
|
-
}),
|
|
2700
|
+
}), Bs = (n) => n.index.toString(), dt = (n) => n[0]?.index === 6 && n.length > 1, Be = (n) => {
|
|
2697
2701
|
const e = Ft(n);
|
|
2698
2702
|
return Sn(e);
|
|
2699
|
-
},
|
|
2700
|
-
const e = Ft(n), s = ((
|
|
2703
|
+
}, to = (n) => Array.isArray(n) ? n[0] && dt(n[0]) ? n[0] : void 0 : n.parent[0] && dt(n.parent[0]) ? n.parent[0] : void 0, nt = (n) => {
|
|
2704
|
+
const e = Ft(n), s = ((to(e) ?? [])[1]?.index ?? 2) / 2 - 1, r = In(e), a = r ? e.end.at(-1)?.at(-1)?.offset : e.at(-1)?.at(-1)?.offset;
|
|
2701
2705
|
return {
|
|
2702
2706
|
isCfiRange: r,
|
|
2703
2707
|
cleanedCfi: n,
|
|
@@ -2747,7 +2751,7 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2747
2751
|
spineItem: o,
|
|
2748
2752
|
node: null
|
|
2749
2753
|
};
|
|
2750
|
-
},
|
|
2754
|
+
}, no = (n, e) => {
|
|
2751
2755
|
if ("cfi" in e) {
|
|
2752
2756
|
const { itemIndex: s, ...r } = n.cfi.parseCfi(e.cfi);
|
|
2753
2757
|
return {
|
|
@@ -2760,14 +2764,14 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2760
2764
|
const t = n.spineItemsManager.get(e);
|
|
2761
2765
|
if (!t)
|
|
2762
2766
|
throw new Error("Spine item not found");
|
|
2763
|
-
const i =
|
|
2767
|
+
const i = he(t.item);
|
|
2764
2768
|
return {
|
|
2765
2769
|
...n.cfi.parseCfi(i),
|
|
2766
|
-
cfi:
|
|
2770
|
+
cfi: he(t.item),
|
|
2767
2771
|
itemIndex: t.index,
|
|
2768
2772
|
node: null
|
|
2769
2773
|
};
|
|
2770
|
-
},
|
|
2774
|
+
}, io = (n, e) => {
|
|
2771
2775
|
let t = n?.itemPageIndex;
|
|
2772
2776
|
const { itemIndex: i, ...o } = e.cfi.parseCfi(n.cfi), s = e.spineItemsManager.get(i);
|
|
2773
2777
|
return s ? Rt().pipe(
|
|
@@ -2800,7 +2804,7 @@ const Ui = (n) => n.pagination.state$.pipe(
|
|
|
2800
2804
|
})
|
|
2801
2805
|
) : v({ ...n, itemIndex: i, ...o });
|
|
2802
2806
|
};
|
|
2803
|
-
class
|
|
2807
|
+
class oo {
|
|
2804
2808
|
constructor(e) {
|
|
2805
2809
|
this.reader = e, this.locatorsByKey = /* @__PURE__ */ new Map(), this.deregisterMemoizedStream = (t) => {
|
|
2806
2810
|
const i = this.locatorsByKey.get(t);
|
|
@@ -2808,14 +2812,14 @@ class io {
|
|
|
2808
2812
|
}, this.locate = (t, i) => {
|
|
2809
2813
|
const o = {
|
|
2810
2814
|
resource: t,
|
|
2811
|
-
meta:
|
|
2815
|
+
meta: no(this.reader, t)
|
|
2812
2816
|
};
|
|
2813
2817
|
return at(() => {
|
|
2814
2818
|
const s = this.reader.spineItemsManager.get(
|
|
2815
2819
|
o.meta.itemIndex ?? 0
|
|
2816
2820
|
), r = s?.renditionLayout === "reflowable", a = i.mode === "shallow" || !r || !s ? () => {
|
|
2817
2821
|
} : this.reader.spine.spineItemsLoader.forceOpen([s.index]), c = "cfi" in t ? t.cfi : void 0, u = c ? this.locatorsByKey.get(c) : void 0, l = (g) => g.pipe(
|
|
2818
|
-
|
|
2822
|
+
le(() => {
|
|
2819
2823
|
c && this.deregisterMemoizedStream(c), setTimeout(() => {
|
|
2820
2824
|
a();
|
|
2821
2825
|
}, 1e3);
|
|
@@ -2833,7 +2837,7 @@ class io {
|
|
|
2833
2837
|
const p = this.reader.spine.layout$.pipe(
|
|
2834
2838
|
Se(10),
|
|
2835
2839
|
Q(o),
|
|
2836
|
-
sn((g) =>
|
|
2840
|
+
sn((g) => io(g.meta, this.reader).pipe(
|
|
2837
2841
|
S((h) => ({
|
|
2838
2842
|
...g,
|
|
2839
2843
|
meta: h
|
|
@@ -2856,10 +2860,10 @@ class io {
|
|
|
2856
2860
|
) : this.locate(e, t ?? {});
|
|
2857
2861
|
}
|
|
2858
2862
|
}
|
|
2859
|
-
const
|
|
2860
|
-
const t = n(e), { paginationInfo$: i, getPaginationInfo: o } =
|
|
2863
|
+
const so = (n) => (e) => {
|
|
2864
|
+
const t = n(e), { paginationInfo$: i, getPaginationInfo: o } = Qi(t);
|
|
2861
2865
|
i.pipe(T(t.$.destroy$)).subscribe();
|
|
2862
|
-
const s = new
|
|
2866
|
+
const s = new oo(t);
|
|
2863
2867
|
return {
|
|
2864
2868
|
...t,
|
|
2865
2869
|
locateResource: s.locateResource.bind(s),
|
|
@@ -2873,7 +2877,7 @@ const oo = (n) => (e) => {
|
|
|
2873
2877
|
}
|
|
2874
2878
|
}
|
|
2875
2879
|
};
|
|
2876
|
-
},
|
|
2880
|
+
}, ro = (n) => ({
|
|
2877
2881
|
put: (s, r) => new Promise((a, c) => {
|
|
2878
2882
|
const u = n.transaction(["store"], "readwrite");
|
|
2879
2883
|
u.onerror = (g) => {
|
|
@@ -2930,11 +2934,11 @@ const oo = (n) => (e) => {
|
|
|
2930
2934
|
i.onerror = (o) => {
|
|
2931
2935
|
t(o);
|
|
2932
2936
|
}, i.onsuccess = () => {
|
|
2933
|
-
e(
|
|
2937
|
+
e(ro(i.result));
|
|
2934
2938
|
}, i.onupgradeneeded = () => {
|
|
2935
2939
|
i.result.createObjectStore("store");
|
|
2936
2940
|
};
|
|
2937
|
-
}),
|
|
2941
|
+
}), ao = (n) => {
|
|
2938
2942
|
let e = Date.now().toString();
|
|
2939
2943
|
const t = new j(), i = (c) => {
|
|
2940
2944
|
if (typeof c == "string" || typeof c == "object") {
|
|
@@ -2956,10 +2960,10 @@ const oo = (n) => (e) => {
|
|
|
2956
2960
|
t.asObservable().pipe(
|
|
2957
2961
|
yn(({ id: c, data: u }) => {
|
|
2958
2962
|
const l = i(c);
|
|
2959
|
-
return l ?
|
|
2960
|
-
an([Ae("prose-reader"),
|
|
2963
|
+
return l ? O(
|
|
2964
|
+
an([Ae("prose-reader"), O(u.blob())])
|
|
2961
2965
|
).pipe(
|
|
2962
|
-
_(([p, g]) =>
|
|
2966
|
+
_(([p, g]) => O(p.put(`${e}_${l.id}`, g))),
|
|
2963
2967
|
st((p) => (E.error(p), G))
|
|
2964
2968
|
) : G;
|
|
2965
2969
|
}),
|
|
@@ -2971,15 +2975,15 @@ const oo = (n) => (e) => {
|
|
|
2971
2975
|
})
|
|
2972
2976
|
);
|
|
2973
2977
|
return x(r).pipe(
|
|
2974
|
-
_(() => (E.debug("Cleanup up old cache..."),
|
|
2978
|
+
_(() => (E.debug("Cleanup up old cache..."), O(Ae("prose-reader")).pipe(
|
|
2975
2979
|
_(
|
|
2976
|
-
(c) =>
|
|
2980
|
+
(c) => O(c.keys()).pipe(
|
|
2977
2981
|
J(
|
|
2978
2982
|
(u) => u.filter((l) => !l.toString().startsWith(e))
|
|
2979
2983
|
),
|
|
2980
2984
|
_((u) => {
|
|
2981
2985
|
const l = u.map((p) => c.remove(p));
|
|
2982
|
-
return
|
|
2986
|
+
return O(Promise.all(l));
|
|
2983
2987
|
})
|
|
2984
2988
|
)
|
|
2985
2989
|
),
|
|
@@ -2992,8 +2996,8 @@ const oo = (n) => (e) => {
|
|
|
2992
2996
|
t.complete();
|
|
2993
2997
|
}
|
|
2994
2998
|
};
|
|
2995
|
-
},
|
|
2996
|
-
const t = n(e), i =
|
|
2999
|
+
}, co = (n) => (e) => {
|
|
3000
|
+
const t = n(e), i = ao(t.context);
|
|
2997
3001
|
return {
|
|
2998
3002
|
...t,
|
|
2999
3003
|
// $: {
|
|
@@ -3005,7 +3009,7 @@ const oo = (n) => (e) => {
|
|
|
3005
3009
|
}
|
|
3006
3010
|
// load,
|
|
3007
3011
|
};
|
|
3008
|
-
},
|
|
3012
|
+
}, uo = (n, e) => {
|
|
3009
3013
|
const t = n.node.ownerDocument?.createRange(), i = n.node.compareDocumentPosition(e.node);
|
|
3010
3014
|
if (t) {
|
|
3011
3015
|
try {
|
|
@@ -3025,14 +3029,14 @@ const oo = (n) => (e) => {
|
|
|
3025
3029
|
}
|
|
3026
3030
|
return t;
|
|
3027
3031
|
}
|
|
3028
|
-
},
|
|
3032
|
+
}, lo = ({
|
|
3029
3033
|
selection: n,
|
|
3030
3034
|
spineItem: e
|
|
3031
3035
|
}) => {
|
|
3032
3036
|
const { anchorNode: t, anchorOffset: i, focusNode: o, focusOffset: s } = n;
|
|
3033
3037
|
if (!(!t || !o))
|
|
3034
3038
|
try {
|
|
3035
|
-
return
|
|
3039
|
+
return uo(
|
|
3036
3040
|
{ node: t, offset: i },
|
|
3037
3041
|
{ node: o, offset: s }
|
|
3038
3042
|
);
|
|
@@ -3044,24 +3048,24 @@ const oo = (n) => (e) => {
|
|
|
3044
3048
|
return;
|
|
3045
3049
|
}
|
|
3046
3050
|
};
|
|
3047
|
-
class
|
|
3051
|
+
class po extends B {
|
|
3048
3052
|
constructor(e) {
|
|
3049
3053
|
super();
|
|
3050
3054
|
const t = e.contentDocument || e.contentWindow?.document;
|
|
3051
3055
|
if (!t)
|
|
3052
|
-
this.selectionChange$ =
|
|
3056
|
+
this.selectionChange$ = ge, this.selectionOver$ = ge;
|
|
3053
3057
|
else {
|
|
3054
3058
|
const i = ct(t.body, {
|
|
3055
3059
|
childList: !0,
|
|
3056
3060
|
subtree: !0
|
|
3057
3061
|
}).pipe(
|
|
3058
|
-
|
|
3062
|
+
L(
|
|
3059
3063
|
(s) => !!s.find((r) => r.type === "childList" && r.removedNodes.length)
|
|
3060
3064
|
)
|
|
3061
3065
|
), o = e.parentElement ? ct(e.parentElement, {
|
|
3062
3066
|
childList: !0
|
|
3063
3067
|
}).pipe(
|
|
3064
|
-
|
|
3068
|
+
L(
|
|
3065
3069
|
(s) => !!s.find(
|
|
3066
3070
|
(r) => Array.from(r.removedNodes).includes(e)
|
|
3067
3071
|
)
|
|
@@ -3091,7 +3095,7 @@ class lo extends B {
|
|
|
3091
3095
|
const r = t.getSelection();
|
|
3092
3096
|
return r && !r.isCollapsed ? [s, r] : void 0;
|
|
3093
3097
|
}),
|
|
3094
|
-
|
|
3098
|
+
L(ue)
|
|
3095
3099
|
)
|
|
3096
3100
|
),
|
|
3097
3101
|
T(x(o, this.destroy$))
|
|
@@ -3099,11 +3103,11 @@ class lo extends B {
|
|
|
3099
3103
|
}
|
|
3100
3104
|
}
|
|
3101
3105
|
}
|
|
3102
|
-
const
|
|
3106
|
+
const go = (n) => n.watch("isLoaded").pipe(
|
|
3103
3107
|
w(() => {
|
|
3104
3108
|
const e = n.renderer.getDocumentFrame(), t = e?.contentDocument || e?.contentWindow?.document;
|
|
3105
|
-
if (!e || !t) return
|
|
3106
|
-
const i = new
|
|
3109
|
+
if (!e || !t) return ge;
|
|
3110
|
+
const i = new po(e);
|
|
3107
3111
|
return x(
|
|
3108
3112
|
i.selectionChange$.pipe(
|
|
3109
3113
|
S((o) => {
|
|
@@ -3124,20 +3128,20 @@ const po = (n) => n.watch("isLoaded").pipe(
|
|
|
3124
3128
|
).pipe(
|
|
3125
3129
|
T(n.unloaded$),
|
|
3126
3130
|
me(void 0),
|
|
3127
|
-
|
|
3131
|
+
le(() => {
|
|
3128
3132
|
i.destroy();
|
|
3129
3133
|
})
|
|
3130
3134
|
);
|
|
3131
3135
|
}),
|
|
3132
3136
|
z()
|
|
3133
|
-
),
|
|
3137
|
+
), ho = (n) => (e) => {
|
|
3134
3138
|
const t = n(e);
|
|
3135
3139
|
let i;
|
|
3136
3140
|
const o = t.spineItemsManager.items$.pipe(
|
|
3137
3141
|
w((l) => {
|
|
3138
3142
|
const p = l.map((g) => {
|
|
3139
3143
|
const h = t.spineItemsManager.getSpineItemIndex(g) ?? 0;
|
|
3140
|
-
return
|
|
3144
|
+
return go(g).pipe(
|
|
3141
3145
|
S((d) => {
|
|
3142
3146
|
if (d)
|
|
3143
3147
|
return {
|
|
@@ -3158,18 +3162,18 @@ const po = (n) => n.watch("isLoaded").pipe(
|
|
|
3158
3162
|
), s = o, r = o.pipe(
|
|
3159
3163
|
S((l) => !!l),
|
|
3160
3164
|
z(),
|
|
3161
|
-
|
|
3165
|
+
L((l) => l),
|
|
3162
3166
|
R()
|
|
3163
3167
|
), a = r.pipe(
|
|
3164
3168
|
w(() => s),
|
|
3165
3169
|
z(),
|
|
3166
|
-
|
|
3170
|
+
L((l) => !l),
|
|
3167
3171
|
R()
|
|
3168
3172
|
), c = o.pipe(
|
|
3169
|
-
|
|
3173
|
+
L((l) => l?.type === "over"),
|
|
3170
3174
|
R()
|
|
3171
3175
|
), u = t.context.watch("rootElement").pipe(
|
|
3172
|
-
|
|
3176
|
+
L(Ge),
|
|
3173
3177
|
w((l) => Y(l, "pointerdown")),
|
|
3174
3178
|
D(s),
|
|
3175
3179
|
S(([, l]) => l),
|
|
@@ -3185,7 +3189,7 @@ const po = (n) => n.watch("isLoaded").pipe(
|
|
|
3185
3189
|
selectionOver$: c,
|
|
3186
3190
|
lastSelectionOnPointerdown$: u,
|
|
3187
3191
|
getSelection: () => i,
|
|
3188
|
-
createOrderedRangeFromSelection:
|
|
3192
|
+
createOrderedRangeFromSelection: lo
|
|
3189
3193
|
}
|
|
3190
3194
|
};
|
|
3191
3195
|
}, gt = [
|
|
@@ -3203,7 +3207,7 @@ const po = (n) => n.watch("isLoaded").pipe(
|
|
|
3203
3207
|
backgroundColor: "#191717",
|
|
3204
3208
|
foregroundColor: "#f1ebeb"
|
|
3205
3209
|
}
|
|
3206
|
-
],
|
|
3210
|
+
], mo = (n) => (e) => {
|
|
3207
3211
|
const t = n(e), i = new W(
|
|
3208
3212
|
e.theme ?? "bright"
|
|
3209
3213
|
), o = () => {
|
|
@@ -3268,15 +3272,15 @@ const po = (n) => n.watch("isLoaded").pipe(
|
|
|
3268
3272
|
}
|
|
3269
3273
|
}
|
|
3270
3274
|
};
|
|
3271
|
-
},
|
|
3275
|
+
}, fo = (n) => (e) => ({
|
|
3272
3276
|
...n(e),
|
|
3273
3277
|
utils: {
|
|
3274
3278
|
isOrIsWithinValidLink: (o) => !!(Et(o) && (o.nodeName === "a" ? o : o.closest("a"))?.getAttribute("href"))
|
|
3275
3279
|
}
|
|
3276
3280
|
});
|
|
3277
3281
|
navigator.userAgent.indexOf("") > -1 && navigator.userAgent.indexOf("Chrome") <= -1;
|
|
3278
|
-
const
|
|
3279
|
-
class
|
|
3282
|
+
const yo = (n) => (e) => n(e);
|
|
3283
|
+
class ae extends te {
|
|
3280
3284
|
constructor(e) {
|
|
3281
3285
|
super((t) => this.stateSubject.pipe(T(this._destroy$)).subscribe(t)), this._destroy$ = new j(), this.destroy$ = this._destroy$.asObservable(), this.stateSubject = new W(e);
|
|
3282
3286
|
}
|
|
@@ -3288,12 +3292,12 @@ class re extends te {
|
|
|
3288
3292
|
*/
|
|
3289
3293
|
mergeCompare(e) {
|
|
3290
3294
|
const t = { ...this.value, ...e };
|
|
3291
|
-
|
|
3295
|
+
N(this.value, t) || this.stateSubject.next(t);
|
|
3292
3296
|
}
|
|
3293
3297
|
watch(e) {
|
|
3294
3298
|
return Array.isArray(e) ? this.stateSubject.pipe(Ke(e)) : this.stateSubject.pipe(
|
|
3295
3299
|
S((t) => t[e]),
|
|
3296
|
-
z(
|
|
3300
|
+
z(N)
|
|
3297
3301
|
);
|
|
3298
3302
|
}
|
|
3299
3303
|
get value() {
|
|
@@ -3303,7 +3307,7 @@ class re extends te {
|
|
|
3303
3307
|
this.stateSubject.complete(), this._destroy$.complete();
|
|
3304
3308
|
}
|
|
3305
3309
|
}
|
|
3306
|
-
class _t extends
|
|
3310
|
+
class _t extends ae {
|
|
3307
3311
|
constructor(e) {
|
|
3308
3312
|
super({
|
|
3309
3313
|
element: void 0,
|
|
@@ -3313,13 +3317,13 @@ class _t extends re {
|
|
|
3313
3317
|
}), this.reader = e;
|
|
3314
3318
|
}
|
|
3315
3319
|
}
|
|
3316
|
-
const
|
|
3317
|
-
class
|
|
3320
|
+
const Oe = 200;
|
|
3321
|
+
class So extends _t {
|
|
3318
3322
|
constructor(e) {
|
|
3319
3323
|
super(e), this.watch("isZooming").pipe(
|
|
3320
|
-
|
|
3324
|
+
L((t) => !t),
|
|
3321
3325
|
w(
|
|
3322
|
-
() => $e(
|
|
3326
|
+
() => $e(Oe).pipe(
|
|
3323
3327
|
P(() => {
|
|
3324
3328
|
this.reader.viewport.value.element.style.transition = "";
|
|
3325
3329
|
})
|
|
@@ -3327,7 +3331,7 @@ class yo extends _t {
|
|
|
3327
3331
|
)
|
|
3328
3332
|
), this.watch("currentScale").pipe(
|
|
3329
3333
|
w(
|
|
3330
|
-
() => $e(
|
|
3334
|
+
() => $e(Oe).pipe(
|
|
3331
3335
|
P(() => {
|
|
3332
3336
|
this.reader.layout();
|
|
3333
3337
|
})
|
|
@@ -3358,7 +3362,7 @@ class yo extends _t {
|
|
|
3358
3362
|
const a = e.cloneNode();
|
|
3359
3363
|
a.src = e.src, a.style.setProperty("height", "100%"), a.style.setProperty("width", "100%"), a.style.setProperty("object-fit", "contain"), a.style.setProperty("pointer-events", "none"), r.appendChild(a), o.appendChild(r);
|
|
3360
3364
|
}
|
|
3361
|
-
i && !e && (s.style.transition = `transform ${
|
|
3365
|
+
i && !e && (s.style.transition = `transform ${Oe}ms`), this.setScale(t), this.mergeCompare({
|
|
3362
3366
|
element: r,
|
|
3363
3367
|
isZooming: !0,
|
|
3364
3368
|
currentScale: t,
|
|
@@ -3402,11 +3406,11 @@ class yo extends _t {
|
|
|
3402
3406
|
});
|
|
3403
3407
|
}
|
|
3404
3408
|
}
|
|
3405
|
-
const
|
|
3409
|
+
const Io = (n, e, t, i, o) => {
|
|
3406
3410
|
const s = n.clientWidth, r = n.clientHeight, a = n.scrollLeft, c = n.scrollTop, u = a + s / 2 - i, l = c + r / 2 - o, p = t / e, g = u * p, h = l * p, d = g - s / 2 + i, m = h - r / 2 + o;
|
|
3407
3411
|
return { newScrollLeft: d, newScrollTop: m };
|
|
3408
3412
|
};
|
|
3409
|
-
class
|
|
3413
|
+
class bo extends _t {
|
|
3410
3414
|
enter({ scale: e = 1 } = {}) {
|
|
3411
3415
|
this.value.isZooming || (this.setScale(e), this.mergeCompare({
|
|
3412
3416
|
currentPosition: { x: 0, y: 0 },
|
|
@@ -3429,7 +3433,7 @@ class Io extends _t {
|
|
|
3429
3433
|
setScale(e) {
|
|
3430
3434
|
const t = this.reader.viewport.value.element, i = this.reader.navigation.scrollNavigationController.value.element, o = this.reader.navigation.scrollNavigationController.value.element;
|
|
3431
3435
|
if (!t || !o) return;
|
|
3432
|
-
const s = this.reader.viewport.scaleFactor, r = t.offsetLeft, a = t.offsetTop, { newScrollLeft: c, newScrollTop: u } =
|
|
3436
|
+
const s = this.reader.viewport.scaleFactor, r = t.offsetLeft, a = t.offsetTop, { newScrollLeft: c, newScrollTop: u } = Io(
|
|
3433
3437
|
i ?? An(),
|
|
3434
3438
|
s,
|
|
3435
3439
|
e,
|
|
@@ -3452,8 +3456,8 @@ class Io extends _t {
|
|
|
3452
3456
|
});
|
|
3453
3457
|
}
|
|
3454
3458
|
}
|
|
3455
|
-
const
|
|
3456
|
-
const t = n(e), i = new
|
|
3459
|
+
const vo = (n) => (e) => {
|
|
3460
|
+
const t = n(e), i = new So(t), o = new bo(t), s = new W(o);
|
|
3457
3461
|
return {
|
|
3458
3462
|
...t,
|
|
3459
3463
|
destroy: () => {
|
|
@@ -3474,26 +3478,26 @@ const bo = (n) => (e) => {
|
|
|
3474
3478
|
}
|
|
3475
3479
|
};
|
|
3476
3480
|
}, Ht = (n) => n?.renditionLayout === "pre-paginated" || n?.spineItems.every((e) => e.renditionLayout === "pre-paginated");
|
|
3477
|
-
class
|
|
3481
|
+
class wo {
|
|
3478
3482
|
constructor() {
|
|
3479
3483
|
this.navigationSubject = new it(1), this.viewportStateSubject = new W("free"), this.paginationSubject = new it(), this.navigationIsLockedSubject = new W(!1), this.pagination$ = this.paginationSubject.asObservable(), this.navigationUnlocked$ = this.navigationIsLockedSubject.pipe(
|
|
3480
3484
|
z(),
|
|
3481
|
-
|
|
3485
|
+
L((e) => !e)
|
|
3482
3486
|
), this.viewportState$ = this.viewportStateSubject.asObservable(), this.viewportFree$ = this.viewportState$.pipe(
|
|
3483
|
-
|
|
3487
|
+
L((e) => e === "free")
|
|
3484
3488
|
), this.viewportBusy$ = this.viewportState$.pipe(
|
|
3485
|
-
|
|
3489
|
+
L((e) => e === "busy")
|
|
3486
3490
|
), this.navigation$ = this.navigationSubject.asObservable();
|
|
3487
3491
|
}
|
|
3488
3492
|
}
|
|
3489
|
-
class
|
|
3493
|
+
class xo extends ae {
|
|
3490
3494
|
constructor() {
|
|
3491
3495
|
super({
|
|
3492
3496
|
assumedRenditionLayout: "reflowable"
|
|
3493
|
-
}), this.bridgeEvent = new
|
|
3497
|
+
}), this.bridgeEvent = new wo(), this.manifest$ = this.pipe(
|
|
3494
3498
|
J((e) => e.manifest),
|
|
3495
|
-
oe(
|
|
3496
|
-
|
|
3499
|
+
oe(ue),
|
|
3500
|
+
pe()
|
|
3497
3501
|
), this.isRTL = () => this.value.manifest?.readingDirection === "rtl";
|
|
3498
3502
|
}
|
|
3499
3503
|
update(e) {
|
|
@@ -3514,7 +3518,7 @@ class wo extends re {
|
|
|
3514
3518
|
return this.manifest?.readingDirection;
|
|
3515
3519
|
}
|
|
3516
3520
|
}
|
|
3517
|
-
class
|
|
3521
|
+
class Po extends ae {
|
|
3518
3522
|
constructor(e, t) {
|
|
3519
3523
|
super({
|
|
3520
3524
|
supportedPageTurnAnimation: ["fade", "none", "slide"],
|
|
@@ -3531,7 +3535,7 @@ class xo extends re {
|
|
|
3531
3535
|
renditionLayout: i?.renditionLayout,
|
|
3532
3536
|
computedPageTurnMode: s
|
|
3533
3537
|
})),
|
|
3534
|
-
z(
|
|
3538
|
+
z(N),
|
|
3535
3539
|
S(
|
|
3536
3540
|
({
|
|
3537
3541
|
hasVerticalWriting: i,
|
|
@@ -3549,7 +3553,7 @@ class xo extends re {
|
|
|
3549
3553
|
).subscribe(this.next.bind(this));
|
|
3550
3554
|
}
|
|
3551
3555
|
}
|
|
3552
|
-
class
|
|
3556
|
+
class $o {
|
|
3553
3557
|
constructor() {
|
|
3554
3558
|
this._hooks = [], this._hookExecutions = [];
|
|
3555
3559
|
}
|
|
@@ -3611,30 +3615,30 @@ class Po {
|
|
|
3611
3615
|
return k(s);
|
|
3612
3616
|
}
|
|
3613
3617
|
}
|
|
3614
|
-
const
|
|
3618
|
+
const To = (n) => ({
|
|
3615
3619
|
x: -n.x,
|
|
3616
3620
|
y: -n.y
|
|
3617
|
-
}),
|
|
3621
|
+
}), Fo = (n) => n instanceof DOMMatrix ? new M({
|
|
3618
3622
|
x: -n.e,
|
|
3619
3623
|
y: -n.f
|
|
3620
|
-
}) : new
|
|
3624
|
+
}) : new M({
|
|
3621
3625
|
x: -n.x,
|
|
3622
3626
|
y: -n.y
|
|
3623
|
-
}),
|
|
3624
|
-
class
|
|
3627
|
+
}), Lo = "navigation/ViewportNavigator", ht = E.namespace(Lo);
|
|
3628
|
+
class Mo extends B {
|
|
3625
3629
|
constructor(e, t, i, o, s) {
|
|
3626
3630
|
super(), this.settings = e, this.hookManager = t, this.context = i, this.spine = o, this.viewport = s, this.navigateSubject = new j(), this.element$ = new W(
|
|
3627
3631
|
document.createElement("div")
|
|
3628
3632
|
);
|
|
3629
3633
|
const r = this.spine.element$.pipe(
|
|
3630
|
-
|
|
3634
|
+
L(Ge),
|
|
3631
3635
|
D(this.element$),
|
|
3632
3636
|
P(([l, p]) => {
|
|
3633
3637
|
p.style.cssText = `
|
|
3634
3638
|
height: 100%;
|
|
3635
3639
|
width: 100%;
|
|
3636
3640
|
position: relative;
|
|
3637
|
-
`, p.className = `${
|
|
3641
|
+
`, p.className = `${de}-controlled-navigator`, p.innerHTML = "", p.appendChild(l), this.viewport.value.element.appendChild(p), this.element$.next(p);
|
|
3638
3642
|
})
|
|
3639
3643
|
), a = e.watch([
|
|
3640
3644
|
"computedPageTurnDirection",
|
|
@@ -3733,7 +3737,7 @@ class Lo extends B {
|
|
|
3733
3737
|
* for remark about flicker / fonts smoothing
|
|
3734
3738
|
*/
|
|
3735
3739
|
setViewportPosition(e) {
|
|
3736
|
-
const t = this.element$.getValue(), i =
|
|
3740
|
+
const t = this.element$.getValue(), i = To(e);
|
|
3737
3741
|
t.style.transform = `translate(${i.x}px, ${i.y}px)`, this.hookManager.execute("onViewportOffsetAdjust", void 0, {});
|
|
3738
3742
|
}
|
|
3739
3743
|
navigate(e) {
|
|
@@ -3746,19 +3750,19 @@ class Lo extends B {
|
|
|
3746
3750
|
get viewportPosition() {
|
|
3747
3751
|
const e = this.element$.getValue(), t = window.getComputedStyle(e), i = t.transform || t.webkitTransform;
|
|
3748
3752
|
if (!i || i === "none")
|
|
3749
|
-
return new
|
|
3753
|
+
return new M({ x: 0, y: 0 });
|
|
3750
3754
|
const o = new DOMMatrix(i);
|
|
3751
|
-
return
|
|
3755
|
+
return Fo(o);
|
|
3752
3756
|
}
|
|
3753
3757
|
}
|
|
3754
|
-
class
|
|
3758
|
+
class Co {
|
|
3755
3759
|
constructor(e) {
|
|
3756
3760
|
this.x = e.x, this.y = e.y;
|
|
3757
3761
|
}
|
|
3758
3762
|
}
|
|
3759
|
-
class mt extends
|
|
3763
|
+
class mt extends Co {
|
|
3760
3764
|
}
|
|
3761
|
-
class
|
|
3765
|
+
class Eo extends ae {
|
|
3762
3766
|
constructor(e, t, i, o, s) {
|
|
3763
3767
|
super({
|
|
3764
3768
|
element: void 0
|
|
@@ -3790,7 +3794,7 @@ class Co extends re {
|
|
|
3790
3794
|
position: relative;
|
|
3791
3795
|
overflow-y: scroll;
|
|
3792
3796
|
overflow-x: hidden;
|
|
3793
|
-
`, g.className = `${
|
|
3797
|
+
`, g.className = `${de}-scroll-navigator`, g.appendChild(this.viewport.value.element), p.appendChild(g), this.update({ element: g });
|
|
3794
3798
|
})
|
|
3795
3799
|
), a = k([
|
|
3796
3800
|
t.watch(["computedPageTurnMode"]),
|
|
@@ -3807,11 +3811,11 @@ class Co extends re {
|
|
|
3807
3811
|
);
|
|
3808
3812
|
const u = x(
|
|
3809
3813
|
o.element$.pipe(
|
|
3810
|
-
|
|
3814
|
+
L(ue),
|
|
3811
3815
|
w((p) => Qe(p))
|
|
3812
3816
|
),
|
|
3813
3817
|
o.element$.pipe(
|
|
3814
|
-
|
|
3818
|
+
L(ue),
|
|
3815
3819
|
w((p) => Y(p, "scroll"))
|
|
3816
3820
|
),
|
|
3817
3821
|
o.spineItemsObserver.itemResize$
|
|
@@ -3834,13 +3838,13 @@ class Co extends re {
|
|
|
3834
3838
|
Z(1)
|
|
3835
3839
|
);
|
|
3836
3840
|
this.userScroll$ = this.watch("element").pipe(
|
|
3837
|
-
|
|
3841
|
+
L(ue),
|
|
3838
3842
|
w(
|
|
3839
3843
|
(p) => t.watch(["computedPageTurnMode"]).pipe(
|
|
3840
3844
|
w(
|
|
3841
|
-
({ computedPageTurnMode: g }) => g === "controlled" ?
|
|
3845
|
+
({ computedPageTurnMode: g }) => g === "controlled" ? ge : Y(p, "scroll").pipe(
|
|
3842
3846
|
D(l),
|
|
3843
|
-
|
|
3847
|
+
L(
|
|
3844
3848
|
([, h]) => !h
|
|
3845
3849
|
),
|
|
3846
3850
|
S(([h]) => h)
|
|
@@ -3859,7 +3863,7 @@ class Co extends re {
|
|
|
3859
3863
|
}
|
|
3860
3864
|
fromScrollPosition(e) {
|
|
3861
3865
|
const t = this.viewport.scaleFactor;
|
|
3862
|
-
return new
|
|
3866
|
+
return new re({
|
|
3863
3867
|
x: e.x / t,
|
|
3864
3868
|
y: e.y / t
|
|
3865
3869
|
});
|
|
@@ -3879,7 +3883,7 @@ class Co extends re {
|
|
|
3879
3883
|
});
|
|
3880
3884
|
}
|
|
3881
3885
|
}
|
|
3882
|
-
const
|
|
3886
|
+
const Do = () => (n) => n.pipe(
|
|
3883
3887
|
S(({ navigation: e, pagination: t, ...i }) => ({
|
|
3884
3888
|
navigation: {
|
|
3885
3889
|
...e,
|
|
@@ -3887,9 +3891,9 @@ const Eo = () => (n) => n.pipe(
|
|
|
3887
3891
|
},
|
|
3888
3892
|
...i
|
|
3889
3893
|
}))
|
|
3890
|
-
),
|
|
3894
|
+
), Ro = (n, e, t) => n.bridgeEvent.pagination$.pipe(
|
|
3891
3895
|
D(e),
|
|
3892
|
-
|
|
3896
|
+
L(
|
|
3893
3897
|
([i, o]) => i.navigationId === o.id
|
|
3894
3898
|
),
|
|
3895
3899
|
/**
|
|
@@ -3898,13 +3902,13 @@ const Eo = () => (n) => n.pipe(
|
|
|
3898
3902
|
* the user to an invalid location.
|
|
3899
3903
|
*/
|
|
3900
3904
|
w(([i, o]) => (t.spineItemsManager.get(o.spineItem)?.isReady$.pipe(U()) ?? v(!1)).pipe(
|
|
3901
|
-
|
|
3905
|
+
L((r) => r),
|
|
3902
3906
|
S(() => ({
|
|
3903
3907
|
pagination: i,
|
|
3904
3908
|
navigation: o
|
|
3905
3909
|
}))
|
|
3906
3910
|
)),
|
|
3907
|
-
|
|
3911
|
+
Do(),
|
|
3908
3912
|
z(
|
|
3909
3913
|
(i, o) => i.navigation.paginationBeginCfi === o.navigation.paginationBeginCfi
|
|
3910
3914
|
),
|
|
@@ -3916,7 +3920,7 @@ const Eo = () => (n) => n.pipe(
|
|
|
3916
3920
|
}
|
|
3917
3921
|
})
|
|
3918
3922
|
)
|
|
3919
|
-
),
|
|
3923
|
+
), Ao = ({ navigationResolver: n }) => (e) => e.pipe(
|
|
3920
3924
|
S(([t, i]) => {
|
|
3921
3925
|
const o = {
|
|
3922
3926
|
type: "api",
|
|
@@ -3948,7 +3952,7 @@ const Eo = () => (n) => n.pipe(
|
|
|
3948
3952
|
navigation: o
|
|
3949
3953
|
};
|
|
3950
3954
|
})
|
|
3951
|
-
),
|
|
3955
|
+
), Oo = ({ navigationResolver: n }) => (e) => e.pipe(
|
|
3952
3956
|
S((t) => {
|
|
3953
3957
|
if (t.navigation.cfi) {
|
|
3954
3958
|
const i = n.getNavigationForCfi(
|
|
@@ -3969,7 +3973,7 @@ const Eo = () => (n) => n.pipe(
|
|
|
3969
3973
|
navigation: n,
|
|
3970
3974
|
previousNavigation: e,
|
|
3971
3975
|
settings: t
|
|
3972
|
-
}) => n.directionFromLastNavigation ? n.directionFromLastNavigation : n.url !== void 0 || n.cfi !== void 0 ? "anchor" : e.spineItem === void 0 || n.spineItem || !n.position ? "forward" : t.values.computedPageTurnDirection === "vertical" ? n.position.y > e.position.y || n.position.y === e.position.y && e.directionFromLastNavigation !== "backward" ? "forward" : "backward" : Math.abs(n.position.x) > Math.abs(e.position.x) || n.position.x === e.position.x && e.directionFromLastNavigation !== "backward" ? "forward" : "backward",
|
|
3976
|
+
}) => n.directionFromLastNavigation ? n.directionFromLastNavigation : n.url !== void 0 || n.cfi !== void 0 ? "anchor" : e.spineItem === void 0 || n.spineItem || !n.position ? "forward" : t.values.computedPageTurnDirection === "vertical" ? n.position.y > e.position.y || n.position.y === e.position.y && e.directionFromLastNavigation !== "backward" ? "forward" : "backward" : Math.abs(n.position.x) > Math.abs(e.position.x) || n.position.x === e.position.x && e.directionFromLastNavigation !== "backward" ? "forward" : "backward", Vo = ({
|
|
3973
3977
|
context: n,
|
|
3974
3978
|
settings: e
|
|
3975
3979
|
}) => (t) => t.pipe(
|
|
@@ -3988,7 +3992,7 @@ const Eo = () => (n) => n.pipe(
|
|
|
3988
3992
|
direction: s
|
|
3989
3993
|
};
|
|
3990
3994
|
})
|
|
3991
|
-
),
|
|
3995
|
+
), jo = ({
|
|
3992
3996
|
spineItemsManager: n,
|
|
3993
3997
|
navigationResolver: e,
|
|
3994
3998
|
settings: t
|
|
@@ -4019,7 +4023,7 @@ const Eo = () => (n) => n.pipe(
|
|
|
4019
4023
|
},
|
|
4020
4024
|
...s
|
|
4021
4025
|
};
|
|
4022
|
-
const a = e.getNavigationForSpineIndexOrId(r), c = t.values.computedPageTurnMode === "scrollable" ? new
|
|
4026
|
+
const a = e.getNavigationForSpineIndexOrId(r), c = t.values.computedPageTurnMode === "scrollable" ? new re({
|
|
4023
4027
|
x: a.x + s.previousNavigation.position.x,
|
|
4024
4028
|
y: a.y
|
|
4025
4029
|
}) : e.fromUnboundSpinePosition(a);
|
|
@@ -4113,7 +4117,7 @@ const Eo = () => (n) => n.pipe(
|
|
|
4113
4117
|
)
|
|
4114
4118
|
);
|
|
4115
4119
|
})
|
|
4116
|
-
),
|
|
4120
|
+
), Ne = ({
|
|
4117
4121
|
settings: n,
|
|
4118
4122
|
spineItemsManager: e,
|
|
4119
4123
|
spineLocator: t,
|
|
@@ -4157,7 +4161,7 @@ const Eo = () => (n) => n.pipe(
|
|
|
4157
4161
|
...a
|
|
4158
4162
|
}))
|
|
4159
4163
|
);
|
|
4160
|
-
},
|
|
4164
|
+
}, ko = ({ navigationResolver: n }) => (e) => e.pipe(
|
|
4161
4165
|
S((t) => {
|
|
4162
4166
|
if (t.navigation.url) {
|
|
4163
4167
|
const i = n.getNavigationForUrl(
|
|
@@ -4190,7 +4194,7 @@ class Bt {
|
|
|
4190
4194
|
};
|
|
4191
4195
|
}
|
|
4192
4196
|
}
|
|
4193
|
-
const
|
|
4197
|
+
const Uo = ({
|
|
4194
4198
|
spineLocator: n,
|
|
4195
4199
|
navigation: e,
|
|
4196
4200
|
navigationResolver: t,
|
|
@@ -4246,8 +4250,8 @@ const ko = ({
|
|
|
4246
4250
|
}
|
|
4247
4251
|
return c ? t.getNavigationForPosition(e.position) : t.getNavigationForSpineIndexOrId(s);
|
|
4248
4252
|
})
|
|
4249
|
-
) : v(new
|
|
4250
|
-
},
|
|
4253
|
+
) : v(new M({ x: 0, y: 0 }));
|
|
4254
|
+
}, zo = ({
|
|
4251
4255
|
navigation: n,
|
|
4252
4256
|
spineLocator: e,
|
|
4253
4257
|
spineItemsManager: t,
|
|
@@ -4256,7 +4260,7 @@ const ko = ({
|
|
|
4256
4260
|
spine: s
|
|
4257
4261
|
}) => {
|
|
4258
4262
|
const { spineItem: r } = n, a = t.get(r);
|
|
4259
|
-
if (!a) return new
|
|
4263
|
+
if (!a) return new M({ x: 0, y: 0 });
|
|
4260
4264
|
const { height: c, top: u } = s.getSpineItemSpineLayoutInfo(a), l = e.isPositionWithinSpineItem(
|
|
4261
4265
|
n.position,
|
|
4262
4266
|
a
|
|
@@ -4316,7 +4320,7 @@ const ko = ({
|
|
|
4316
4320
|
}
|
|
4317
4321
|
}
|
|
4318
4322
|
return n.position;
|
|
4319
|
-
},
|
|
4323
|
+
}, Wo = ({
|
|
4320
4324
|
navigation: n,
|
|
4321
4325
|
spineItemsManager: e,
|
|
4322
4326
|
settings: t,
|
|
@@ -4324,7 +4328,7 @@ const ko = ({
|
|
|
4324
4328
|
navigationResolver: o,
|
|
4325
4329
|
spine: s
|
|
4326
4330
|
}) => t.values.computedPageTurnMode === "scrollable" ? v(
|
|
4327
|
-
|
|
4331
|
+
zo({
|
|
4328
4332
|
navigation: n,
|
|
4329
4333
|
spineLocator: i,
|
|
4330
4334
|
navigationResolver: o,
|
|
@@ -4332,7 +4336,7 @@ const ko = ({
|
|
|
4332
4336
|
spineItemsManager: e,
|
|
4333
4337
|
spine: s
|
|
4334
4338
|
})
|
|
4335
|
-
) :
|
|
4339
|
+
) : Uo({
|
|
4336
4340
|
navigation: n,
|
|
4337
4341
|
spineLocator: i,
|
|
4338
4342
|
navigationResolver: o,
|
|
@@ -4344,7 +4348,7 @@ const ko = ({
|
|
|
4344
4348
|
context: t,
|
|
4345
4349
|
spine: i
|
|
4346
4350
|
}) => (o) => o.pipe(
|
|
4347
|
-
w((s) =>
|
|
4351
|
+
w((s) => Wo({
|
|
4348
4352
|
spineLocator: i.locator,
|
|
4349
4353
|
navigation: s.navigation,
|
|
4350
4354
|
navigationResolver: e,
|
|
@@ -4361,12 +4365,12 @@ const ko = ({
|
|
|
4361
4365
|
}
|
|
4362
4366
|
}))
|
|
4363
4367
|
))
|
|
4364
|
-
),
|
|
4365
|
-
class
|
|
4368
|
+
), _o = "navigation/InternalNavigator", Ho = E.namespace(_o);
|
|
4369
|
+
class Bo extends B {
|
|
4366
4370
|
constructor(e, t, i, o, s, r, a, c) {
|
|
4367
4371
|
super(), this.settings = e, this.context = t, this.userNavigation$ = i, this.controlledNavigationController = o, this.scrollNavigationController = s, this.navigationResolver = r, this.spine = a, this.isUserLocked$ = c, this.navigationSubject = new W({
|
|
4368
4372
|
animation: !1,
|
|
4369
|
-
position: new
|
|
4373
|
+
position: new M({ x: 0, y: 0 }),
|
|
4370
4374
|
meta: {
|
|
4371
4375
|
triggeredBy: "user"
|
|
4372
4376
|
},
|
|
@@ -4379,37 +4383,37 @@ class Ho extends B {
|
|
|
4379
4383
|
id: I
|
|
4380
4384
|
})),
|
|
4381
4385
|
z(
|
|
4382
|
-
({ position: f, ...I }, { position: b, ...F }) =>
|
|
4386
|
+
({ position: f, ...I }, { position: b, ...F }) => N(I, F) && N(f, b)
|
|
4383
4387
|
),
|
|
4384
4388
|
Z(1)
|
|
4385
4389
|
), this.locker = new Bt();
|
|
4386
4390
|
const u = i.pipe(
|
|
4387
4391
|
D(this.navigationSubject),
|
|
4388
|
-
|
|
4392
|
+
Ao({
|
|
4389
4393
|
navigationResolver: r
|
|
4390
4394
|
}),
|
|
4391
4395
|
/**
|
|
4392
4396
|
* Url lookup is heavier so we start with it to fill
|
|
4393
4397
|
* as much information as needed to reduce later lookup
|
|
4394
4398
|
*/
|
|
4395
|
-
|
|
4399
|
+
ko({
|
|
4396
4400
|
navigationResolver: r
|
|
4397
4401
|
}),
|
|
4398
4402
|
/**
|
|
4399
4403
|
* Cfi lookup is heavier so we start with it to fill
|
|
4400
4404
|
* as much information as needed to reduce later lookup
|
|
4401
4405
|
*/
|
|
4402
|
-
|
|
4406
|
+
Oo({
|
|
4403
4407
|
navigationResolver: r
|
|
4404
4408
|
}),
|
|
4405
|
-
|
|
4409
|
+
Vo({ context: t, settings: e }),
|
|
4406
4410
|
ft({
|
|
4407
4411
|
navigationResolver: r,
|
|
4408
4412
|
settings: e,
|
|
4409
4413
|
spineItemsManager: a.spineItemsManager,
|
|
4410
4414
|
spineLocator: a.locator
|
|
4411
4415
|
}),
|
|
4412
|
-
|
|
4416
|
+
Ne({
|
|
4413
4417
|
navigationResolver: r,
|
|
4414
4418
|
settings: e,
|
|
4415
4419
|
spineItemsManager: a.spineItemsManager,
|
|
@@ -4419,7 +4423,7 @@ class Ho extends B {
|
|
|
4419
4423
|
spine: a
|
|
4420
4424
|
})
|
|
4421
4425
|
).pipe(
|
|
4422
|
-
|
|
4426
|
+
jo({
|
|
4423
4427
|
navigationResolver: r,
|
|
4424
4428
|
spineItemsManager: a.spineItemsManager,
|
|
4425
4429
|
settings: e
|
|
@@ -4436,7 +4440,7 @@ class Ho extends B {
|
|
|
4436
4440
|
})
|
|
4437
4441
|
);
|
|
4438
4442
|
}),
|
|
4439
|
-
|
|
4443
|
+
Ne({
|
|
4440
4444
|
spineItemsManager: a.spineItemsManager,
|
|
4441
4445
|
spineLocator: a.locator,
|
|
4442
4446
|
settings: e,
|
|
@@ -4446,11 +4450,11 @@ class Ho extends B {
|
|
|
4446
4450
|
R()
|
|
4447
4451
|
), l = u.pipe(
|
|
4448
4452
|
D(c),
|
|
4449
|
-
|
|
4453
|
+
L(([, f]) => f),
|
|
4450
4454
|
w(([f]) => {
|
|
4451
4455
|
const I = this.locker.lock();
|
|
4452
4456
|
return c.pipe(
|
|
4453
|
-
|
|
4457
|
+
L((b) => !b),
|
|
4454
4458
|
U(),
|
|
4455
4459
|
S(
|
|
4456
4460
|
() => ({
|
|
@@ -4458,7 +4462,7 @@ class Ho extends B {
|
|
|
4458
4462
|
animation: "snap"
|
|
4459
4463
|
})
|
|
4460
4464
|
),
|
|
4461
|
-
|
|
4465
|
+
le(() => {
|
|
4462
4466
|
I();
|
|
4463
4467
|
}),
|
|
4464
4468
|
T(u)
|
|
@@ -4472,7 +4476,7 @@ class Ho extends B {
|
|
|
4472
4476
|
w(() => v(null).pipe(
|
|
4473
4477
|
w(
|
|
4474
4478
|
() => c.pipe(
|
|
4475
|
-
|
|
4479
|
+
L((f) => !f),
|
|
4476
4480
|
U()
|
|
4477
4481
|
)
|
|
4478
4482
|
),
|
|
@@ -4528,7 +4532,7 @@ class Ho extends B {
|
|
|
4528
4532
|
yt({
|
|
4529
4533
|
spine: a
|
|
4530
4534
|
}),
|
|
4531
|
-
|
|
4535
|
+
Ne({
|
|
4532
4536
|
spineItemsManager: a.spineItemsManager,
|
|
4533
4537
|
spineLocator: a.locator,
|
|
4534
4538
|
settings: e,
|
|
@@ -4536,7 +4540,7 @@ class Ho extends B {
|
|
|
4536
4540
|
}),
|
|
4537
4541
|
S(({ navigation: f }) => f),
|
|
4538
4542
|
R()
|
|
4539
|
-
), h =
|
|
4543
|
+
), h = Ro(
|
|
4540
4544
|
t,
|
|
4541
4545
|
this.navigationSubject,
|
|
4542
4546
|
a
|
|
@@ -4546,7 +4550,7 @@ class Ho extends B {
|
|
|
4546
4550
|
h
|
|
4547
4551
|
), m = (f) => f.pipe(
|
|
4548
4552
|
P(([I, b]) => {
|
|
4549
|
-
|
|
4553
|
+
Ho.info(
|
|
4550
4554
|
`navigation updated from ${I.meta.triggeredBy} of type ${I.type}`,
|
|
4551
4555
|
{
|
|
4552
4556
|
previousNavigation: b,
|
|
@@ -4556,7 +4560,7 @@ class Ho extends B {
|
|
|
4556
4560
|
})
|
|
4557
4561
|
), y = (f) => f.pipe(
|
|
4558
4562
|
P(([I, b]) => {
|
|
4559
|
-
const F = I.type === "scroll", $ = I.meta.triggeredBy === "pagination", A = I.meta.triggeredBy === "restoration", X =
|
|
4563
|
+
const F = I.type === "scroll", $ = I.meta.triggeredBy === "pagination", A = I.meta.triggeredBy === "restoration", X = N(
|
|
4560
4564
|
b.position,
|
|
4561
4565
|
I.position
|
|
4562
4566
|
);
|
|
@@ -4573,7 +4577,7 @@ class Ho extends B {
|
|
|
4573
4577
|
* Explicitly trust the unbound position to be valid at this point.
|
|
4574
4578
|
* Thanks to consolidation and restoration.
|
|
4575
4579
|
*/
|
|
4576
|
-
position:
|
|
4580
|
+
position: M.from(H.position)
|
|
4577
4581
|
});
|
|
4578
4582
|
})
|
|
4579
4583
|
);
|
|
@@ -4604,7 +4608,7 @@ const Te = (n, e, t) => {
|
|
|
4604
4608
|
}, It = (n, e, t) => {
|
|
4605
4609
|
const i = [...Array(t)].map((o, s) => s * e);
|
|
4606
4610
|
return n <= 0 || t === 0 ? 0 : n >= t * e ? t - 1 : i.findIndex((o) => n < o + e) ?? 0;
|
|
4607
|
-
},
|
|
4611
|
+
}, Xo = ({
|
|
4608
4612
|
itemWidth: n,
|
|
4609
4613
|
itemHeight: e,
|
|
4610
4614
|
spineItemPosition: t
|
|
@@ -4630,7 +4634,7 @@ const Te = (n, e, t) => {
|
|
|
4630
4634
|
pageTurnMode: a,
|
|
4631
4635
|
isRTL: c
|
|
4632
4636
|
}) => {
|
|
4633
|
-
const l =
|
|
4637
|
+
const l = Xo({
|
|
4634
4638
|
spineItemPosition: t,
|
|
4635
4639
|
itemHeight: e,
|
|
4636
4640
|
itemWidth: n
|
|
@@ -4647,7 +4651,7 @@ const Te = (n, e, t) => {
|
|
|
4647
4651
|
return It(t.y, s, p);
|
|
4648
4652
|
const g = It(l, o, p);
|
|
4649
4653
|
return c ? p - 1 - g : g;
|
|
4650
|
-
},
|
|
4654
|
+
}, Yo = ({
|
|
4651
4655
|
pageIndex: n,
|
|
4652
4656
|
itemLayout: e,
|
|
4653
4657
|
context: t,
|
|
@@ -4700,7 +4704,7 @@ const Te = (n, e, t) => {
|
|
|
4700
4704
|
getSpineItemPositionFromPageIndex: ({
|
|
4701
4705
|
pageIndex: a,
|
|
4702
4706
|
spineItem: c
|
|
4703
|
-
}) =>
|
|
4707
|
+
}) => Yo({
|
|
4704
4708
|
context: n,
|
|
4705
4709
|
isUsingVerticalWriting: !!c.isUsingVerticalWriting(),
|
|
4706
4710
|
itemLayout: c.layout.layoutInfo,
|
|
@@ -4771,7 +4775,7 @@ const Te = (n, e, t) => {
|
|
|
4771
4775
|
});
|
|
4772
4776
|
}
|
|
4773
4777
|
};
|
|
4774
|
-
},
|
|
4778
|
+
}, qo = ({
|
|
4775
4779
|
context: n,
|
|
4776
4780
|
settings: e,
|
|
4777
4781
|
viewport: t
|
|
@@ -4814,13 +4818,13 @@ function qt({
|
|
|
4814
4818
|
), a = r.bottom, c = Math.max(0, n.y), u = Math.min(c, a);
|
|
4815
4819
|
if (e) {
|
|
4816
4820
|
const h = Math.min(o, n.x), d = Math.max(h, r.left);
|
|
4817
|
-
return new
|
|
4821
|
+
return new M({
|
|
4818
4822
|
x: d,
|
|
4819
4823
|
y: u
|
|
4820
4824
|
});
|
|
4821
4825
|
}
|
|
4822
4826
|
const l = r.right, p = Math.max(0, n.x), g = Math.min(p, l);
|
|
4823
|
-
return new
|
|
4827
|
+
return new M({
|
|
4824
4828
|
x: g,
|
|
4825
4829
|
y: u
|
|
4826
4830
|
});
|
|
@@ -4841,16 +4845,16 @@ const vt = ({
|
|
|
4841
4845
|
viewportWidth: o
|
|
4842
4846
|
}), a = i.get(
|
|
4843
4847
|
i.items.length - 1
|
|
4844
|
-
), c = s.getSpineItemSpineLayoutInfo(a), u = c.bottom - t, l = Math.min(r.
|
|
4848
|
+
), c = s.getSpineItemSpineLayoutInfo(a), u = c.bottom - t, l = Math.min(r.y, u);
|
|
4845
4849
|
if (e) {
|
|
4846
4850
|
const g = Math.min(0, r.x);
|
|
4847
|
-
return new
|
|
4851
|
+
return new M({
|
|
4848
4852
|
x: g,
|
|
4849
4853
|
y: l
|
|
4850
4854
|
});
|
|
4851
4855
|
}
|
|
4852
4856
|
const p = c.right - o;
|
|
4853
|
-
return new
|
|
4857
|
+
return new M({
|
|
4854
4858
|
x: Math.min(r.x, p),
|
|
4855
4859
|
y: l
|
|
4856
4860
|
});
|
|
@@ -4860,7 +4864,7 @@ const vt = ({
|
|
|
4860
4864
|
visibleAreaRectWidth: i
|
|
4861
4865
|
}) => {
|
|
4862
4866
|
const s = n % i !== 0 ? n - t : n;
|
|
4863
|
-
return new
|
|
4867
|
+
return new M({ x: s, y: e });
|
|
4864
4868
|
}, Ye = ({
|
|
4865
4869
|
viewportPosition: n,
|
|
4866
4870
|
spineLocator: e,
|
|
@@ -4885,8 +4889,8 @@ const vt = ({
|
|
|
4885
4889
|
visibleAreaRectWidth: i.absoluteViewport.width
|
|
4886
4890
|
});
|
|
4887
4891
|
}
|
|
4888
|
-
return new
|
|
4889
|
-
},
|
|
4892
|
+
return new M({ x: 0, y: 0 });
|
|
4893
|
+
}, Go = ({
|
|
4890
4894
|
pageIndex: n,
|
|
4891
4895
|
spineItemsManager: e,
|
|
4892
4896
|
spineItemId: t,
|
|
@@ -4898,7 +4902,7 @@ const vt = ({
|
|
|
4898
4902
|
if (!r) {
|
|
4899
4903
|
const u = n * s.pageSize.width;
|
|
4900
4904
|
return Ye({
|
|
4901
|
-
viewportPosition: new
|
|
4905
|
+
viewportPosition: new M({ x: u, y: 0 }),
|
|
4902
4906
|
spineItemNavigationResolver: o,
|
|
4903
4907
|
spineLocator: i,
|
|
4904
4908
|
viewport: s
|
|
@@ -4916,28 +4920,28 @@ const vt = ({
|
|
|
4916
4920
|
pageSizeWidth: s.pageSize.width,
|
|
4917
4921
|
visibleAreaRectWidth: s.absoluteViewport.width
|
|
4918
4922
|
});
|
|
4919
|
-
},
|
|
4923
|
+
}, Zo = (n, e) => {
|
|
4920
4924
|
if (e && e instanceof HTMLIFrameElement)
|
|
4921
4925
|
return n.startsWith("#") ? e.contentDocument?.getElementById(
|
|
4922
4926
|
n.replace("#", "")
|
|
4923
4927
|
) : e.contentDocument?.querySelector(n);
|
|
4924
|
-
},
|
|
4928
|
+
}, Jo = ({
|
|
4925
4929
|
anchor: n,
|
|
4926
4930
|
spineItem: e,
|
|
4927
4931
|
spine: t
|
|
4928
4932
|
}) => {
|
|
4929
|
-
const i =
|
|
4933
|
+
const i = Zo(
|
|
4930
4934
|
n,
|
|
4931
4935
|
e.renderer.getDocumentFrame()
|
|
4932
4936
|
);
|
|
4933
4937
|
return i ? t.spineItemLocator.getSpineItemPositionFromNode(i, 0, e)?.x ?? 0 : 0;
|
|
4934
|
-
},
|
|
4938
|
+
}, Ko = ({
|
|
4935
4939
|
anchor: n,
|
|
4936
4940
|
spineItem: e,
|
|
4937
4941
|
spineLocator: t,
|
|
4938
4942
|
spine: i
|
|
4939
4943
|
}) => {
|
|
4940
|
-
const o =
|
|
4944
|
+
const o = Jo({
|
|
4941
4945
|
anchor: n,
|
|
4942
4946
|
spineItem: e,
|
|
4943
4947
|
spine: i
|
|
@@ -4946,7 +4950,7 @@ const vt = ({
|
|
|
4946
4950
|
spineItemPosition: new C({ x: o, y: 0 }),
|
|
4947
4951
|
spineItem: e
|
|
4948
4952
|
});
|
|
4949
|
-
},
|
|
4953
|
+
}, Qo = ({
|
|
4950
4954
|
anchor: n,
|
|
4951
4955
|
spineItem: e,
|
|
4952
4956
|
spineLocator: t,
|
|
@@ -4954,7 +4958,7 @@ const vt = ({
|
|
|
4954
4958
|
pageSizeWidth: o,
|
|
4955
4959
|
visibleAreaRectWidth: s
|
|
4956
4960
|
}) => {
|
|
4957
|
-
const r =
|
|
4961
|
+
const r = Ko({
|
|
4958
4962
|
anchor: n,
|
|
4959
4963
|
spineItem: e,
|
|
4960
4964
|
spineLocator: t,
|
|
@@ -4965,7 +4969,7 @@ const vt = ({
|
|
|
4965
4969
|
pageSizeWidth: o,
|
|
4966
4970
|
visibleAreaRectWidth: s
|
|
4967
4971
|
});
|
|
4968
|
-
},
|
|
4972
|
+
}, es = ({
|
|
4969
4973
|
spine: n,
|
|
4970
4974
|
spineItemsManager: e,
|
|
4971
4975
|
spineLocator: t,
|
|
@@ -4981,7 +4985,7 @@ const vt = ({
|
|
|
4981
4985
|
if (u) {
|
|
4982
4986
|
const l = e.get(u.id);
|
|
4983
4987
|
if (l) {
|
|
4984
|
-
const p =
|
|
4988
|
+
const p = Qo({
|
|
4985
4989
|
anchor: a.hash,
|
|
4986
4990
|
spineItem: l,
|
|
4987
4991
|
spine: n,
|
|
@@ -5004,7 +5008,7 @@ const vt = ({
|
|
|
5004
5008
|
console.error(a);
|
|
5005
5009
|
return;
|
|
5006
5010
|
}
|
|
5007
|
-
},
|
|
5011
|
+
}, ts = ({
|
|
5008
5012
|
spineItem: n,
|
|
5009
5013
|
spineItemPosition: e,
|
|
5010
5014
|
spineLocator: t,
|
|
@@ -5023,7 +5027,7 @@ const vt = ({
|
|
|
5023
5027
|
pageSizeWidth: o.pageSize.width,
|
|
5024
5028
|
visibleAreaRectWidth: o.absoluteViewport.width
|
|
5025
5029
|
});
|
|
5026
|
-
},
|
|
5030
|
+
}, ns = "spineNavigator", is = ({
|
|
5027
5031
|
context: n,
|
|
5028
5032
|
spineItemsManager: e,
|
|
5029
5033
|
locator: t,
|
|
@@ -5031,13 +5035,13 @@ const vt = ({
|
|
|
5031
5035
|
spine: o,
|
|
5032
5036
|
viewport: s
|
|
5033
5037
|
}) => {
|
|
5034
|
-
const r =
|
|
5038
|
+
const r = qo({
|
|
5035
5039
|
context: n,
|
|
5036
5040
|
settings: i,
|
|
5037
5041
|
viewport: s
|
|
5038
5042
|
});
|
|
5039
5043
|
return {
|
|
5040
|
-
getNavigationForUrl: (h) =>
|
|
5044
|
+
getNavigationForUrl: (h) => es({
|
|
5041
5045
|
context: n,
|
|
5042
5046
|
spineItemsManager: e,
|
|
5043
5047
|
spineLocator: t,
|
|
@@ -5046,14 +5050,14 @@ const vt = ({
|
|
|
5046
5050
|
visibleAreaRectWidth: s.absoluteViewport.width,
|
|
5047
5051
|
spine: o
|
|
5048
5052
|
}),
|
|
5049
|
-
getNavigationForSpineItemPage: (h) =>
|
|
5053
|
+
getNavigationForSpineItemPage: (h) => Go({
|
|
5050
5054
|
...h,
|
|
5051
5055
|
spineItemsManager: e,
|
|
5052
5056
|
spineItemNavigationResolver: r,
|
|
5053
5057
|
spineLocator: t,
|
|
5054
5058
|
viewport: s
|
|
5055
5059
|
}),
|
|
5056
|
-
getNavigationFromSpineItemPosition: (h) =>
|
|
5060
|
+
getNavigationFromSpineItemPosition: (h) => ts({
|
|
5057
5061
|
...h,
|
|
5058
5062
|
spineItemLocator: t.spineItemLocator,
|
|
5059
5063
|
spineLocator: t,
|
|
@@ -5065,7 +5069,7 @@ const vt = ({
|
|
|
5065
5069
|
spineItemsManager: e
|
|
5066
5070
|
});
|
|
5067
5071
|
if (!d) {
|
|
5068
|
-
E.warn(
|
|
5072
|
+
E.warn(ns, `unable to detect item id from cfi ${h}`);
|
|
5069
5073
|
return;
|
|
5070
5074
|
}
|
|
5071
5075
|
const f = m ? r.getNavigationFromNode(d, m, y) : new C({ x: 0, y: 0 }), I = t.getSpinePositionFromSpineItemPosition({
|
|
@@ -5099,7 +5103,7 @@ const vt = ({
|
|
|
5099
5103
|
visibleAreaRectWidth: s.absoluteViewport.width
|
|
5100
5104
|
});
|
|
5101
5105
|
}
|
|
5102
|
-
return new
|
|
5106
|
+
return new M({ x: 0, y: 0 });
|
|
5103
5107
|
},
|
|
5104
5108
|
getNavigationForPosition: (h) => Ye({
|
|
5105
5109
|
viewportPosition: h,
|
|
@@ -5109,7 +5113,7 @@ const vt = ({
|
|
|
5109
5113
|
}),
|
|
5110
5114
|
getMostPredominantNavigationForPosition: (h) => {
|
|
5111
5115
|
const d = i.values.computedPageTurnDirection, m = 0.5, y = d === "horizontal" ? h.x + s.absoluteViewport.width * m : 0, f = d === "horizontal" ? 0 : h.y + s.absoluteViewport.height * m, I = vt({
|
|
5112
|
-
position: new
|
|
5116
|
+
position: new M({
|
|
5113
5117
|
x: y,
|
|
5114
5118
|
y: f
|
|
5115
5119
|
}),
|
|
@@ -5150,7 +5154,7 @@ const vt = ({
|
|
|
5150
5154
|
}),
|
|
5151
5155
|
spineItemNavigator: r
|
|
5152
5156
|
};
|
|
5153
|
-
},
|
|
5157
|
+
}, os = ({
|
|
5154
5158
|
spineItemsManager: n,
|
|
5155
5159
|
context: e,
|
|
5156
5160
|
hookManager: t,
|
|
@@ -5158,26 +5162,26 @@ const vt = ({
|
|
|
5158
5162
|
settings: o,
|
|
5159
5163
|
viewport: s
|
|
5160
5164
|
}) => {
|
|
5161
|
-
const r = new j(), a = r.asObservable(), c = new Bt(), u =
|
|
5165
|
+
const r = new j(), a = r.asObservable(), c = new Bt(), u = is({
|
|
5162
5166
|
context: e,
|
|
5163
5167
|
settings: o,
|
|
5164
5168
|
spineItemsManager: n,
|
|
5165
5169
|
locator: i.locator,
|
|
5166
5170
|
spine: i,
|
|
5167
5171
|
viewport: s
|
|
5168
|
-
}), l = new
|
|
5172
|
+
}), l = new Mo(
|
|
5169
5173
|
o,
|
|
5170
5174
|
t,
|
|
5171
5175
|
e,
|
|
5172
5176
|
i,
|
|
5173
5177
|
s
|
|
5174
|
-
), p = new
|
|
5178
|
+
), p = new Eo(
|
|
5175
5179
|
s,
|
|
5176
5180
|
o,
|
|
5177
5181
|
t,
|
|
5178
5182
|
i,
|
|
5179
5183
|
e
|
|
5180
|
-
), g = new
|
|
5184
|
+
), g = new Bo(
|
|
5181
5185
|
o,
|
|
5182
5186
|
e,
|
|
5183
5187
|
a,
|
|
@@ -5193,7 +5197,7 @@ const vt = ({
|
|
|
5193
5197
|
g.locker.isLocked$
|
|
5194
5198
|
]).pipe(
|
|
5195
5199
|
J((y) => y.some((f) => f) ? "busy" : "free"),
|
|
5196
|
-
|
|
5200
|
+
pe(),
|
|
5197
5201
|
Me(1)
|
|
5198
5202
|
);
|
|
5199
5203
|
return {
|
|
@@ -5216,7 +5220,7 @@ const vt = ({
|
|
|
5216
5220
|
navigation$: g.navigation$
|
|
5217
5221
|
};
|
|
5218
5222
|
};
|
|
5219
|
-
class
|
|
5223
|
+
class ss extends ae {
|
|
5220
5224
|
constructor(e, t) {
|
|
5221
5225
|
super({
|
|
5222
5226
|
beginPageIndexInSpineItem: void 0,
|
|
@@ -5234,7 +5238,7 @@ class os extends re {
|
|
|
5234
5238
|
this.mergeCompare(e);
|
|
5235
5239
|
}
|
|
5236
5240
|
}
|
|
5237
|
-
class
|
|
5241
|
+
class rs extends B {
|
|
5238
5242
|
constructor(e, t, i, o, s) {
|
|
5239
5243
|
super(), this.context = e, this.pagination = t, this.spineItemsManager = i, this.spine = o, this.spineItemLocator = s;
|
|
5240
5244
|
const r = x(
|
|
@@ -5268,7 +5272,7 @@ class ss extends B {
|
|
|
5268
5272
|
}) ?? {}, { endPageIndex: b = 0 } = c({
|
|
5269
5273
|
spineItem: m,
|
|
5270
5274
|
position: l
|
|
5271
|
-
}) ?? {}, F = y === void 0 || Be(y) || p.beginSpineItemIndex !== g, $ = p.endSpineItemIndex !== h || f === void 0 || Be(f), A = F ?
|
|
5275
|
+
}) ?? {}, F = y === void 0 || Be(y) || p.beginSpineItemIndex !== g, $ = p.endSpineItemIndex !== h || f === void 0 || Be(f), A = F ? he(d.item) : y, X = $ ? he(m.item) : f, H = d.numberOfPages, ne = m.numberOfPages;
|
|
5272
5276
|
this.pagination.update({
|
|
5273
5277
|
beginCfi: A,
|
|
5274
5278
|
beginNumberOfPagesInSpineItem: H,
|
|
@@ -5312,11 +5316,11 @@ class ss extends B {
|
|
|
5312
5316
|
x(r, a).pipe(T(this.destroy$)).subscribe();
|
|
5313
5317
|
}
|
|
5314
5318
|
}
|
|
5315
|
-
const
|
|
5319
|
+
const as = ({
|
|
5316
5320
|
manifest: n,
|
|
5317
5321
|
spreadMode: e
|
|
5318
5322
|
}) => n?.renditionFlow === "scrolled-continuous" ? !1 : e;
|
|
5319
|
-
class
|
|
5323
|
+
class cs extends B {
|
|
5320
5324
|
constructor(e) {
|
|
5321
5325
|
super();
|
|
5322
5326
|
const t = {
|
|
@@ -5326,7 +5330,7 @@ class as extends B {
|
|
|
5326
5330
|
this.inputSettings = t, this.outputSettingsUpdateSubject = new j(), this._settings$ = this.outputSettingsUpdateSubject.asObservable().pipe(Z(1)), this._settings$.subscribe();
|
|
5327
5331
|
}
|
|
5328
5332
|
_prepareUpdate(e) {
|
|
5329
|
-
const t = xe(this.inputSettings, e), i = this.getOutputSettings(t), o = !
|
|
5333
|
+
const t = xe(this.inputSettings, e), i = this.getOutputSettings(t), o = !N(this.outputSettings, i);
|
|
5330
5334
|
return {
|
|
5331
5335
|
hasChanged: o,
|
|
5332
5336
|
state: i,
|
|
@@ -5354,14 +5358,14 @@ class as extends B {
|
|
|
5354
5358
|
watch(e) {
|
|
5355
5359
|
return this.values$.pipe(
|
|
5356
5360
|
Dt(e),
|
|
5357
|
-
z(
|
|
5361
|
+
z(N)
|
|
5358
5362
|
);
|
|
5359
5363
|
}
|
|
5360
5364
|
destroy() {
|
|
5361
5365
|
super.destroy(), this.outputSettingsUpdateSubject.complete();
|
|
5362
5366
|
}
|
|
5363
5367
|
}
|
|
5364
|
-
class
|
|
5368
|
+
class us extends cs {
|
|
5365
5369
|
constructor(e, t) {
|
|
5366
5370
|
super(e), this.context = t, t.watch(["manifest", "hasVerticalWriting"]).pipe(
|
|
5367
5371
|
P(() => this.update(this.values)),
|
|
@@ -5374,7 +5378,7 @@ class cs extends as {
|
|
|
5374
5378
|
computedPageTurnAnimation: e.pageTurnAnimation,
|
|
5375
5379
|
computedPageTurnMode: e.pageTurnMode,
|
|
5376
5380
|
computedPageTurnAnimationDuration: 0,
|
|
5377
|
-
computedSpreadMode:
|
|
5381
|
+
computedSpreadMode: as({
|
|
5378
5382
|
spreadMode: e.spreadMode,
|
|
5379
5383
|
manifest: t
|
|
5380
5384
|
})
|
|
@@ -5400,7 +5404,7 @@ class cs extends as {
|
|
|
5400
5404
|
};
|
|
5401
5405
|
}
|
|
5402
5406
|
}
|
|
5403
|
-
class
|
|
5407
|
+
class ls extends fe {
|
|
5404
5408
|
onUnload() {
|
|
5405
5409
|
return G;
|
|
5406
5410
|
}
|
|
@@ -5419,14 +5423,14 @@ class us extends fe {
|
|
|
5419
5423
|
getDocumentFrame() {
|
|
5420
5424
|
}
|
|
5421
5425
|
}
|
|
5422
|
-
class
|
|
5426
|
+
class ps extends B {
|
|
5423
5427
|
constructor(e, t, i, o, s, r, a) {
|
|
5424
5428
|
super(), this.item = e, this.containerElement = t, this.context = i, this.hookManager = o, this.renderer = s, this.settings = r, this.viewport = a, this.layoutTriggerSubject = new j(), this.lastLayout = null, this.applyDimsAfterLayout = ({
|
|
5425
5429
|
blankPagePosition: c,
|
|
5426
5430
|
minimumWidth: u
|
|
5427
5431
|
}) => (l) => l.pipe(
|
|
5428
5432
|
S((p) => {
|
|
5429
|
-
const g =
|
|
5433
|
+
const g = N(
|
|
5430
5434
|
this.lastLayout?.pageSize,
|
|
5431
5435
|
this.viewport.pageSize
|
|
5432
5436
|
) ? this.lastLayout : void 0, { width: h, height: d } = g ?? {}, { width: m = h, height: y = d } = p ?? {}, { width: f, height: I } = this.viewport.pageSize, b = this.validateDimension(
|
|
@@ -5486,7 +5490,7 @@ class ls extends B {
|
|
|
5486
5490
|
}),
|
|
5487
5491
|
R()
|
|
5488
5492
|
), this.layout$ = this.layoutProcess$.pipe(
|
|
5489
|
-
|
|
5493
|
+
L((c) => c.type === "end"),
|
|
5490
5494
|
S((c) => c.data),
|
|
5491
5495
|
R()
|
|
5492
5496
|
);
|
|
@@ -5504,7 +5508,7 @@ class ls extends B {
|
|
|
5504
5508
|
};
|
|
5505
5509
|
}
|
|
5506
5510
|
}
|
|
5507
|
-
class Gt extends
|
|
5511
|
+
class Gt extends ae {
|
|
5508
5512
|
constructor(e, t, i, o, s, r, a) {
|
|
5509
5513
|
super({
|
|
5510
5514
|
isLoaded: !1,
|
|
@@ -5520,7 +5524,7 @@ class Gt extends re {
|
|
|
5520
5524
|
});
|
|
5521
5525
|
}, this.destroy = () => {
|
|
5522
5526
|
super.destroy(), this.containerElement.remove(), this.renderer.destroy();
|
|
5523
|
-
}, this.isUsingVerticalWriting = () => !!this.renderer.writingMode?.startsWith("vertical"), this.containerElement =
|
|
5527
|
+
}, this.isUsingVerticalWriting = () => !!this.renderer.writingMode?.startsWith("vertical"), this.containerElement = ds(
|
|
5524
5528
|
t,
|
|
5525
5529
|
e,
|
|
5526
5530
|
s
|
|
@@ -5536,7 +5540,7 @@ class Gt extends re {
|
|
|
5536
5540
|
resourcesHandler: this.resourcesHandler,
|
|
5537
5541
|
viewport: this.viewport
|
|
5538
5542
|
};
|
|
5539
|
-
this.renderer = c ? c(u) : new
|
|
5543
|
+
this.renderer = c ? c(u) : new ls(u), this.layout = new ps(
|
|
5540
5544
|
e,
|
|
5541
5545
|
this.containerElement,
|
|
5542
5546
|
i,
|
|
@@ -5597,7 +5601,7 @@ class Gt extends re {
|
|
|
5597
5601
|
}
|
|
5598
5602
|
get unloaded$() {
|
|
5599
5603
|
return this.renderer.state$.pipe(
|
|
5600
|
-
|
|
5604
|
+
pe(),
|
|
5601
5605
|
oe((e) => e !== "idle"),
|
|
5602
5606
|
_(
|
|
5603
5607
|
() => this.renderer.state$.pipe(
|
|
@@ -5622,14 +5626,14 @@ class Gt extends re {
|
|
|
5622
5626
|
});
|
|
5623
5627
|
}
|
|
5624
5628
|
}
|
|
5625
|
-
const
|
|
5629
|
+
const ds = (n, e, t) => {
|
|
5626
5630
|
const i = n.ownerDocument.createElement("div");
|
|
5627
5631
|
return i.classList.add("spineItem"), i.classList.add(`spineItem-${e.renditionLayout ?? "reflowable"}`), i.style.cssText = `
|
|
5628
5632
|
position: absolute;
|
|
5629
5633
|
overflow: hidden;
|
|
5630
5634
|
`, i.dataset.isReady = "false", t.execute("item.onBeforeContainerCreated", void 0, { element: i }), i;
|
|
5631
5635
|
};
|
|
5632
|
-
class
|
|
5636
|
+
class gs extends B {
|
|
5633
5637
|
constructor(e, t, i, o, s) {
|
|
5634
5638
|
super(), this.context = e, this.spineItemsManager = t, this.spineLocator = i, this.settings = o, this.spineLayout = s, this.forcedOpenSubject = new W([]);
|
|
5635
5639
|
const r = this.forcedOpenSubject.pipe(
|
|
@@ -5682,7 +5686,7 @@ class ds extends B {
|
|
|
5682
5686
|
}
|
|
5683
5687
|
const Zt = (n, e, t) => {
|
|
5684
5688
|
const i = (t.width - e.width) / 2, o = (t.height - e.height) / 2;
|
|
5685
|
-
return new
|
|
5689
|
+
return new re({
|
|
5686
5690
|
x: n.x - i,
|
|
5687
5691
|
y: n.y - o
|
|
5688
5692
|
});
|
|
@@ -5705,17 +5709,17 @@ class ye extends DOMRect {
|
|
|
5705
5709
|
return new ye(i.x, i.y, i.width, i.height);
|
|
5706
5710
|
}
|
|
5707
5711
|
}
|
|
5708
|
-
class
|
|
5712
|
+
class hs {
|
|
5709
5713
|
constructor({ width: e, height: t }) {
|
|
5710
5714
|
this.__symbol = Symbol("AbsoluteViewport"), this.width = e, this.height = t;
|
|
5711
5715
|
}
|
|
5712
5716
|
}
|
|
5713
|
-
class
|
|
5717
|
+
class ms {
|
|
5714
5718
|
constructor({ width: e, height: t }) {
|
|
5715
5719
|
this.__symbol = Symbol("RelativeViewport"), this.width = e, this.height = t;
|
|
5716
5720
|
}
|
|
5717
5721
|
}
|
|
5718
|
-
const
|
|
5722
|
+
const fs = ({
|
|
5719
5723
|
pageIndex: n,
|
|
5720
5724
|
spineItemOrId: e,
|
|
5721
5725
|
spineItemsManager: t
|
|
@@ -5737,7 +5741,7 @@ const ms = ({
|
|
|
5737
5741
|
{ currentAbsolutePage: 0, found: !1 }
|
|
5738
5742
|
);
|
|
5739
5743
|
return s;
|
|
5740
|
-
},
|
|
5744
|
+
}, ys = ({
|
|
5741
5745
|
itemHeight: n,
|
|
5742
5746
|
itemWidth: e,
|
|
5743
5747
|
visibleWidthOfItem: t,
|
|
@@ -5746,7 +5750,7 @@ const ms = ({
|
|
|
5746
5750
|
}) => {
|
|
5747
5751
|
const s = t / e, r = i / n;
|
|
5748
5752
|
return o.type === "percentage" ? s >= o.value && r >= o.value : t >= o.value && i >= o.value;
|
|
5749
|
-
},
|
|
5753
|
+
}, Ss = ({
|
|
5750
5754
|
visibleWidthOfItem: n,
|
|
5751
5755
|
visibleHeightOfItem: e,
|
|
5752
5756
|
threshold: t,
|
|
@@ -5778,14 +5782,14 @@ const ms = ({
|
|
|
5778
5782
|
Math.min(n, g) - Math.max(i, p)
|
|
5779
5783
|
);
|
|
5780
5784
|
if (h <= 0 || d <= 0) return { visible: !1 };
|
|
5781
|
-
const y =
|
|
5785
|
+
const y = Ss({
|
|
5782
5786
|
threshold: r,
|
|
5783
5787
|
visibleHeightOfItem: d,
|
|
5784
5788
|
visibleWidthOfItem: h,
|
|
5785
5789
|
viewportPosition: a
|
|
5786
5790
|
});
|
|
5787
5791
|
return c ? { visible: y } : {
|
|
5788
|
-
visible:
|
|
5792
|
+
visible: ys({
|
|
5789
5793
|
itemHeight: s,
|
|
5790
5794
|
itemWidth: o,
|
|
5791
5795
|
threshold: r,
|
|
@@ -5806,10 +5810,10 @@ const ms = ({
|
|
|
5806
5810
|
}, je = ({
|
|
5807
5811
|
spineItemPosition: n,
|
|
5808
5812
|
itemLayout: { left: e, top: t }
|
|
5809
|
-
}) => new
|
|
5813
|
+
}) => new M({
|
|
5810
5814
|
x: e + n.x,
|
|
5811
5815
|
y: t + n.y
|
|
5812
|
-
}),
|
|
5816
|
+
}), Is = ({
|
|
5813
5817
|
position: n,
|
|
5814
5818
|
threshold: e,
|
|
5815
5819
|
restrictToScreen: t,
|
|
@@ -5847,7 +5851,7 @@ const ms = ({
|
|
|
5847
5851
|
beginIndex: p ?? 0,
|
|
5848
5852
|
endIndex: g ?? 0
|
|
5849
5853
|
};
|
|
5850
|
-
},
|
|
5854
|
+
}, bs = ({
|
|
5851
5855
|
spineItemsManager: n,
|
|
5852
5856
|
context: e,
|
|
5853
5857
|
spineItemLocator: t,
|
|
@@ -5897,7 +5901,7 @@ const ms = ({
|
|
|
5897
5901
|
const Ee = t.getSpineItemPositionFromPageIndex({
|
|
5898
5902
|
pageIndex: Ie,
|
|
5899
5903
|
spineItem: y
|
|
5900
|
-
}),
|
|
5904
|
+
}), ce = je({
|
|
5901
5905
|
spineItemPosition: Ee,
|
|
5902
5906
|
itemLayout: o.getSpineItemSpineLayoutInfo(y)
|
|
5903
5907
|
});
|
|
@@ -5906,21 +5910,21 @@ const ms = ({
|
|
|
5906
5910
|
absolutePosition: {
|
|
5907
5911
|
width: b.pageSize.width,
|
|
5908
5912
|
height: b.pageSize.height,
|
|
5909
|
-
left:
|
|
5910
|
-
top:
|
|
5911
|
-
bottom:
|
|
5912
|
-
right:
|
|
5913
|
+
left: ce.x,
|
|
5914
|
+
top: ce.y,
|
|
5915
|
+
bottom: ce.y + b.pageSize.height,
|
|
5916
|
+
right: ce.x + b.pageSize.width
|
|
5913
5917
|
}
|
|
5914
5918
|
};
|
|
5915
5919
|
}).reduce(
|
|
5916
5920
|
(ne, { absolutePosition: Ie, index: Ee }) => {
|
|
5917
|
-
const
|
|
5921
|
+
const ce = I ? b.absoluteViewport : b.relativeViewport, Kt = Zt(
|
|
5918
5922
|
d,
|
|
5919
5923
|
b.absoluteViewport,
|
|
5920
|
-
|
|
5924
|
+
ce
|
|
5921
5925
|
), Qt = ye.from(
|
|
5922
5926
|
Kt,
|
|
5923
|
-
|
|
5927
|
+
ce
|
|
5924
5928
|
), { visible: en } = Jt({
|
|
5925
5929
|
viewportPosition: Qt,
|
|
5926
5930
|
restrictToScreen: f,
|
|
@@ -5951,7 +5955,7 @@ const ms = ({
|
|
|
5951
5955
|
/**
|
|
5952
5956
|
* @deprecated use Pages
|
|
5953
5957
|
*/
|
|
5954
|
-
_getAbsolutePageIndexFromPageIndex: (d) =>
|
|
5958
|
+
_getAbsolutePageIndexFromPageIndex: (d) => fs({
|
|
5955
5959
|
...d,
|
|
5956
5960
|
spineItemsManager: n
|
|
5957
5961
|
}),
|
|
@@ -5992,7 +5996,7 @@ const ms = ({
|
|
|
5992
5996
|
}),
|
|
5993
5997
|
getSpineItemFromIframe: c,
|
|
5994
5998
|
getSpineItemPageIndexFromNode: u,
|
|
5995
|
-
getVisibleSpineItemsFromPosition: (d) =>
|
|
5999
|
+
getVisibleSpineItemsFromPosition: (d) => Is({
|
|
5996
6000
|
spineItemsManager: n,
|
|
5997
6001
|
spineLayout: o,
|
|
5998
6002
|
viewport: s,
|
|
@@ -6015,7 +6019,7 @@ const ms = ({
|
|
|
6015
6019
|
});
|
|
6016
6020
|
}
|
|
6017
6021
|
};
|
|
6018
|
-
},
|
|
6022
|
+
}, vs = E.namespace("spine"), ws = ({
|
|
6019
6023
|
position: n,
|
|
6020
6024
|
pageSize: e
|
|
6021
6025
|
}) => new mi({
|
|
@@ -6027,7 +6031,7 @@ const ms = ({
|
|
|
6027
6031
|
bottom: n.y + e.height,
|
|
6028
6032
|
right: n.x + e.width
|
|
6029
6033
|
});
|
|
6030
|
-
class
|
|
6034
|
+
class xs extends ae {
|
|
6031
6035
|
constructor(e, t, i, o, s, r) {
|
|
6032
6036
|
super({ pages: [] }), this.spineLayout = e, this.spineItemsManager = t, this.spineItemLocator = i, this.context = o, this.locator = s, this.viewport = r, this.fromSpineItemPageIndex = (a, c) => this.value.pages.find(
|
|
6033
6037
|
(u) => u.itemIndex === a.index && u.pageIndex === c
|
|
@@ -6045,7 +6049,7 @@ class ws extends re {
|
|
|
6045
6049
|
spineItemPosition: f
|
|
6046
6050
|
});
|
|
6047
6051
|
return {
|
|
6048
|
-
absoluteLayout:
|
|
6052
|
+
absoluteLayout: ws({
|
|
6049
6053
|
pageSize: a,
|
|
6050
6054
|
position: I
|
|
6051
6055
|
}),
|
|
@@ -6084,12 +6088,12 @@ class ws extends re {
|
|
|
6084
6088
|
})
|
|
6085
6089
|
);
|
|
6086
6090
|
}),
|
|
6087
|
-
S((a) => (
|
|
6091
|
+
S((a) => (vs.info("Pages layout", a), { pages: a })),
|
|
6088
6092
|
R()
|
|
6089
6093
|
), this.layout$.pipe(T(this.destroy$)).subscribe(this.next.bind(this));
|
|
6090
6094
|
}
|
|
6091
6095
|
}
|
|
6092
|
-
class
|
|
6096
|
+
class Ps extends B {
|
|
6093
6097
|
constructor(e, t) {
|
|
6094
6098
|
super(), this.spineItemsManager = e, this.spineLocator = t, this.itemIsReady$ = this.spineItemsManager.items$.pipe(
|
|
6095
6099
|
w((i) => {
|
|
@@ -6112,7 +6116,7 @@ class xs extends B {
|
|
|
6112
6116
|
);
|
|
6113
6117
|
}
|
|
6114
6118
|
}
|
|
6115
|
-
const
|
|
6119
|
+
const $s = ({
|
|
6116
6120
|
horizontalOffset: n,
|
|
6117
6121
|
verticalOffset: e,
|
|
6118
6122
|
context: t,
|
|
@@ -6182,7 +6186,7 @@ const Ps = ({
|
|
|
6182
6186
|
})
|
|
6183
6187
|
);
|
|
6184
6188
|
};
|
|
6185
|
-
class
|
|
6189
|
+
class Ts extends B {
|
|
6186
6190
|
constructor(e, t, i, o) {
|
|
6187
6191
|
super(), this.spineItemsManager = e, this.context = t, this.settings = i, this.viewport = o, this.layoutSubject = new j(), this.spineItemsRelativeLayouts = [], e.items$.pipe(
|
|
6188
6192
|
P(() => {
|
|
@@ -6220,18 +6224,18 @@ class $s extends B {
|
|
|
6220
6224
|
// queue layout until previous layout is done
|
|
6221
6225
|
Ue(
|
|
6222
6226
|
() => s.pipe(
|
|
6223
|
-
|
|
6227
|
+
L((r) => !r),
|
|
6224
6228
|
U()
|
|
6225
6229
|
)
|
|
6226
6230
|
),
|
|
6227
6231
|
Ue(() => {
|
|
6228
6232
|
s.next(!0);
|
|
6229
6233
|
const r = this.context.manifest, a = Ht(r) ?? !1;
|
|
6230
|
-
return
|
|
6234
|
+
return O(this.spineItemsManager.items).pipe(
|
|
6231
6235
|
cn(
|
|
6232
6236
|
(u, l, p) => u.pipe(
|
|
6233
6237
|
ot(
|
|
6234
|
-
({ horizontalOffset: g, verticalOffset: h }) =>
|
|
6238
|
+
({ horizontalOffset: g, verticalOffset: h }) => $s({
|
|
6235
6239
|
context: this.context,
|
|
6236
6240
|
horizontalOffset: g,
|
|
6237
6241
|
index: p,
|
|
@@ -6258,7 +6262,7 @@ class $s extends B {
|
|
|
6258
6262
|
v({ horizontalOffset: 0, verticalOffset: 0 })
|
|
6259
6263
|
),
|
|
6260
6264
|
ot((u) => u),
|
|
6261
|
-
|
|
6265
|
+
le(() => {
|
|
6262
6266
|
s.next(!1);
|
|
6263
6267
|
})
|
|
6264
6268
|
);
|
|
@@ -6289,32 +6293,32 @@ class $s extends B {
|
|
|
6289
6293
|
super.destroy(), this.layoutSubject.complete();
|
|
6290
6294
|
}
|
|
6291
6295
|
}
|
|
6292
|
-
class
|
|
6296
|
+
class Fs extends B {
|
|
6293
6297
|
constructor(e, t, i, o, s, r, a) {
|
|
6294
6298
|
super(), this.context = e, this.pagination = t, this.spineItemsManager = i, this.spineItemLocator = o, this.settings = s, this.hookManager = r, this.viewport = a, this.elementSubject = new W(
|
|
6295
6299
|
void 0
|
|
6296
|
-
), this.element$ = this.elementSubject.asObservable(), this.spineLayout = new
|
|
6300
|
+
), this.element$ = this.elementSubject.asObservable(), this.spineLayout = new Ts(
|
|
6297
6301
|
i,
|
|
6298
6302
|
e,
|
|
6299
6303
|
s,
|
|
6300
6304
|
a
|
|
6301
|
-
), this.locator =
|
|
6305
|
+
), this.locator = bs({
|
|
6302
6306
|
context: e,
|
|
6303
6307
|
spineItemsManager: i,
|
|
6304
6308
|
spineItemLocator: o,
|
|
6305
6309
|
settings: s,
|
|
6306
6310
|
spineLayout: this.spineLayout,
|
|
6307
6311
|
viewport: a
|
|
6308
|
-
}), this.spineItemsLoader = new
|
|
6312
|
+
}), this.spineItemsLoader = new gs(
|
|
6309
6313
|
this.context,
|
|
6310
6314
|
i,
|
|
6311
6315
|
this.locator,
|
|
6312
6316
|
s,
|
|
6313
6317
|
this.spineLayout
|
|
6314
|
-
), this.spineItemsObserver = new
|
|
6318
|
+
), this.spineItemsObserver = new Ps(
|
|
6315
6319
|
i,
|
|
6316
6320
|
this.locator
|
|
6317
|
-
), this.pages = new
|
|
6321
|
+
), this.pages = new xs(
|
|
6318
6322
|
this.spineLayout,
|
|
6319
6323
|
this.spineItemsManager,
|
|
6320
6324
|
this.spineItemLocator,
|
|
@@ -6329,7 +6333,7 @@ class Ts extends B {
|
|
|
6329
6333
|
p.style.cssText = `
|
|
6330
6334
|
height: 100%;
|
|
6331
6335
|
position: relative;
|
|
6332
|
-
`, p.className = `${
|
|
6336
|
+
`, p.className = `${de}-spine`, this.elementSubject.next(p);
|
|
6333
6337
|
})
|
|
6334
6338
|
), u = k([
|
|
6335
6339
|
this.context.manifest$,
|
|
@@ -6370,7 +6374,7 @@ class Ts extends B {
|
|
|
6370
6374
|
super.destroy(), this.pages.destroy(), this.spineItemsLoader.destroy(), this.elementSubject.getValue()?.remove(), this.elementSubject.complete();
|
|
6371
6375
|
}
|
|
6372
6376
|
}
|
|
6373
|
-
class
|
|
6377
|
+
class Ls extends B {
|
|
6374
6378
|
constructor(e, t) {
|
|
6375
6379
|
super(), this.context = e, this.settings = t, this.orderedSpineItemsSubject = new W([]), this.items$ = this.orderedSpineItemsSubject.asObservable();
|
|
6376
6380
|
}
|
|
@@ -6411,7 +6415,7 @@ class Fs extends B {
|
|
|
6411
6415
|
this.orderedSpineItemsSubject.value.forEach((e) => e.destroy());
|
|
6412
6416
|
}
|
|
6413
6417
|
}
|
|
6414
|
-
class
|
|
6418
|
+
class Ms extends ae {
|
|
6415
6419
|
constructor(e, t) {
|
|
6416
6420
|
const i = document.createElement("div");
|
|
6417
6421
|
i.style.cssText = `
|
|
@@ -6459,7 +6463,7 @@ class Ls extends re {
|
|
|
6459
6463
|
});
|
|
6460
6464
|
}
|
|
6461
6465
|
get absoluteViewport() {
|
|
6462
|
-
return new
|
|
6466
|
+
return new hs({
|
|
6463
6467
|
width: this.value.width,
|
|
6464
6468
|
height: this.value.height
|
|
6465
6469
|
});
|
|
@@ -6487,18 +6491,18 @@ class Ls extends re {
|
|
|
6487
6491
|
*/
|
|
6488
6492
|
get relativeViewport() {
|
|
6489
6493
|
const e = this.absoluteViewport, t = this.scaleFactor;
|
|
6490
|
-
return new
|
|
6494
|
+
return new ms({
|
|
6491
6495
|
width: e.width / t,
|
|
6492
6496
|
height: e.height / t
|
|
6493
6497
|
});
|
|
6494
6498
|
}
|
|
6495
6499
|
}
|
|
6496
|
-
const
|
|
6497
|
-
const e = crypto.randomUUID(), t = new j(), i = new j(), o = new
|
|
6500
|
+
const Cs = (n) => {
|
|
6501
|
+
const e = crypto.randomUUID(), t = new j(), i = new j(), o = new $o(), s = new xo(), r = new us(n, s), a = new Po(s, r), c = new Ls(s, r), u = new Ms(s, r), l = Yt({
|
|
6498
6502
|
context: s,
|
|
6499
6503
|
settings: r,
|
|
6500
6504
|
viewport: u
|
|
6501
|
-
}), p = new
|
|
6505
|
+
}), p = new ss(s, c), g = new Fs(
|
|
6502
6506
|
s,
|
|
6503
6507
|
p,
|
|
6504
6508
|
c,
|
|
@@ -6506,14 +6510,14 @@ const Ms = (n) => {
|
|
|
6506
6510
|
r,
|
|
6507
6511
|
o,
|
|
6508
6512
|
u
|
|
6509
|
-
), h =
|
|
6513
|
+
), h = os({
|
|
6510
6514
|
context: s,
|
|
6511
6515
|
spineItemsManager: c,
|
|
6512
6516
|
hookManager: o,
|
|
6513
6517
|
spine: g,
|
|
6514
6518
|
settings: r,
|
|
6515
6519
|
viewport: u
|
|
6516
|
-
}), d = new
|
|
6520
|
+
}), d = new rs(
|
|
6517
6521
|
s,
|
|
6518
6522
|
p,
|
|
6519
6523
|
c,
|
|
@@ -6532,7 +6536,7 @@ const Ms = (n) => {
|
|
|
6532
6536
|
return;
|
|
6533
6537
|
}
|
|
6534
6538
|
E.log("load", { options: $ });
|
|
6535
|
-
const H =
|
|
6539
|
+
const H = Es(A, e);
|
|
6536
6540
|
s.update({
|
|
6537
6541
|
manifest: X,
|
|
6538
6542
|
rootElement: H
|
|
@@ -6552,7 +6556,7 @@ const Ms = (n) => {
|
|
|
6552
6556
|
spine: g,
|
|
6553
6557
|
hookManager: o,
|
|
6554
6558
|
cfi: {
|
|
6555
|
-
generateCfiFromRange:
|
|
6559
|
+
generateCfiFromRange: eo,
|
|
6556
6560
|
parseCfi: nt,
|
|
6557
6561
|
generateCfiForSpineItemPage: ($) => He({
|
|
6558
6562
|
...$,
|
|
@@ -6593,31 +6597,31 @@ const Ms = (n) => {
|
|
|
6593
6597
|
destroy$: i
|
|
6594
6598
|
}
|
|
6595
6599
|
};
|
|
6596
|
-
},
|
|
6600
|
+
}, Es = (n, e) => (n.style.cssText = `
|
|
6597
6601
|
${n.style.cssText}
|
|
6598
6602
|
background-color: white;
|
|
6599
6603
|
position: relative;
|
|
6600
|
-
`, n.classList.add(`${
|
|
6604
|
+
`, n.classList.add(`${de}-reader`), n.setAttribute(Qn, e), n), Xs = (
|
|
6601
6605
|
//__
|
|
6602
|
-
|
|
6606
|
+
ho(
|
|
6603
6607
|
Bn(
|
|
6604
|
-
|
|
6605
|
-
|
|
6608
|
+
Mi(
|
|
6609
|
+
yo(
|
|
6606
6610
|
Hn(
|
|
6607
6611
|
Pn(
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
+
co(
|
|
6613
|
+
fo(
|
|
6614
|
+
vo(
|
|
6615
|
+
_i(
|
|
6612
6616
|
gi(
|
|
6613
|
-
|
|
6617
|
+
Ei(
|
|
6614
6618
|
$n(
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6619
|
+
mo(
|
|
6620
|
+
so(
|
|
6621
|
+
$i(
|
|
6618
6622
|
zn(
|
|
6619
6623
|
// __
|
|
6620
|
-
|
|
6624
|
+
Cs
|
|
6621
6625
|
)
|
|
6622
6626
|
)
|
|
6623
6627
|
)
|
|
@@ -6635,75 +6639,75 @@ const Ms = (n) => {
|
|
|
6635
6639
|
)
|
|
6636
6640
|
)
|
|
6637
6641
|
)
|
|
6638
|
-
),
|
|
6642
|
+
), Ys = (n) => (e) => n(e);
|
|
6639
6643
|
export {
|
|
6640
6644
|
jt as AbstractSpinePosition,
|
|
6641
|
-
|
|
6642
|
-
|
|
6645
|
+
xo as Context,
|
|
6646
|
+
Mo as ControlledNavigationController,
|
|
6643
6647
|
B as DestroyableClass,
|
|
6644
6648
|
fe as DocumentRenderer,
|
|
6645
|
-
|
|
6649
|
+
Po as Features,
|
|
6646
6650
|
Qn as HTML_ATTRIBUTE_DATA_READER_ID,
|
|
6647
6651
|
ei as HTML_ATTRIBUTE_VIEWPORT_CLASSNAME,
|
|
6648
|
-
|
|
6649
|
-
|
|
6652
|
+
de as HTML_PREFIX,
|
|
6653
|
+
$o as HookManager,
|
|
6650
6654
|
Kn as ITEM_EXTENSION_VALID_FOR_FRAME_SRC,
|
|
6651
|
-
|
|
6655
|
+
Bo as InternalNavigator,
|
|
6652
6656
|
tt as LayoutEntry,
|
|
6653
6657
|
Bt as Locker,
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6658
|
+
_s as PAGINATION_UPDATE_AFTER_VIEWPORT_ADJUSTMENT_DEBOUNCE,
|
|
6659
|
+
zs as PROSE_READER_NAMESPACE,
|
|
6660
|
+
xs as Pages,
|
|
6661
|
+
ss as Pagination,
|
|
6662
|
+
rs as PaginationController,
|
|
6663
|
+
ae as ReactiveEntity,
|
|
6660
6664
|
et as ResourceHandler,
|
|
6661
|
-
|
|
6662
|
-
|
|
6665
|
+
oo as ResourcesLocator,
|
|
6666
|
+
Eo as ScrollNavigationController,
|
|
6663
6667
|
mt as ScrollPosition,
|
|
6664
|
-
|
|
6665
|
-
|
|
6668
|
+
cs as SettingsManager,
|
|
6669
|
+
Fs as Spine,
|
|
6666
6670
|
Gt as SpineItem,
|
|
6667
6671
|
hi as SpineItemPageLayout,
|
|
6668
6672
|
mi as SpineItemPageSpineLayout,
|
|
6669
6673
|
C as SpineItemPosition,
|
|
6670
6674
|
_e as SpineItemSpineLayout,
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6675
|
+
Ls as SpineItemsManager,
|
|
6676
|
+
Ps as SpineItemsObserver,
|
|
6677
|
+
M as SpinePosition,
|
|
6674
6678
|
Re as UnboundSpineItemPagePosition,
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6679
|
+
re as UnboundSpinePosition,
|
|
6680
|
+
Ws as VIEWPORT_ADJUSTMENT_THROTTLE,
|
|
6681
|
+
Ms as Viewport,
|
|
6682
|
+
io as consolidate,
|
|
6683
|
+
Xs as createReader,
|
|
6680
6684
|
at as deferIdle,
|
|
6681
6685
|
Wn as deferNextResult,
|
|
6682
6686
|
He as generateCfiForSpineItemPage,
|
|
6683
|
-
|
|
6684
|
-
|
|
6687
|
+
eo as generateCfiFromRange,
|
|
6688
|
+
he as generateRootCfi,
|
|
6685
6689
|
rt as getAttributeValueFromString,
|
|
6686
|
-
|
|
6690
|
+
ks as getBase64FromBlob,
|
|
6687
6691
|
Ze as getFrameViewportInfo,
|
|
6688
|
-
|
|
6692
|
+
Bs as getItemAnchor,
|
|
6689
6693
|
gi as htmlEnhancer,
|
|
6690
6694
|
Rt as idle,
|
|
6691
6695
|
vn as injectCSS,
|
|
6692
6696
|
Et as isHtmlElement,
|
|
6693
|
-
|
|
6697
|
+
Nn as isHtmlTagElement,
|
|
6694
6698
|
Be as isRootCfi,
|
|
6695
|
-
|
|
6696
|
-
|
|
6699
|
+
Zs as isShallowEqual,
|
|
6700
|
+
$i as layoutEnhancer,
|
|
6697
6701
|
Dt as mapKeysTo,
|
|
6698
|
-
|
|
6702
|
+
js as observeIntersection,
|
|
6699
6703
|
ct as observeMutation,
|
|
6700
6704
|
Qe as observeResize,
|
|
6701
|
-
|
|
6705
|
+
so as paginationEnhancer,
|
|
6702
6706
|
nt as parseCfi,
|
|
6703
|
-
|
|
6707
|
+
Vs as removeCSS,
|
|
6704
6708
|
Wt as resolveCfi,
|
|
6705
|
-
|
|
6706
|
-
|
|
6709
|
+
Ys as rootEnhancer,
|
|
6710
|
+
ws as spinePositionToSpineItemSpineLayout,
|
|
6707
6711
|
ee as upsertCSSToFrame,
|
|
6708
6712
|
wn as waitForFrameLoad,
|
|
6709
6713
|
xn as waitForFrameReady,
|