@prose-reader/react-reader 1.229.0 → 1.231.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/annotations/bookmarks/{BookmarkPageButton.d.ts → BookmarkPageMarker.d.ts} +1 -1
- package/dist/annotations/bookmarks/useBookmarkOnCornerTap.d.ts +1 -0
- package/dist/annotations/useReaderWithAnnotations.d.ts +1 -1
- package/dist/context/ReactReaderProvider.d.ts +2 -1
- package/dist/context/context.d.ts +2 -1
- package/dist/context/useReader.d.ts +1 -1
- package/dist/context/useReaderContext.d.ts +1 -1
- package/dist/index.js +579 -549
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +2 -2
- package/dist/annotations/bookmarks/useCanBookmarkPage.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -1,93 +1,94 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { signal as
|
|
5
|
-
import { Subject as
|
|
6
|
-
import { IconButton as
|
|
7
|
-
import { LuX as
|
|
1
|
+
import { jsx as t, jsxs as c, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
+
import * as z from "react";
|
|
3
|
+
import ze, { createContext as Ee, memo as g, useMemo as ce, useEffect as j, useContext as Be, useState as k, useLayoutEffect as Me, useCallback as N } from "react";
|
|
4
|
+
import { signal as de, useSignalState as Ce, useConstant as Le, useLiveRef as $e, useSubscribe as E, useObserve as v, isDefined as Ie, useSignalValue as _e } from "reactjrx";
|
|
5
|
+
import { Subject as he, tap as ue, map as L, filter as ee, switchMap as F, of as Ne, withLatestFrom as Fe, NEVER as re, startWith as ye, distinctUntilChanged as Se, throttleTime as He, first as Te, combineLatest as We, EMPTY as je, finalize as ke, mergeMap as Ge, skip as we, merge as Ve, timer as Ye } from "rxjs";
|
|
6
|
+
import { IconButton as I, Portal as ge, Dialog as S, List as w, Link as pe, Stack as R, Text as f, Tabs as O, Button as G, Presence as te, Box as P, createToaster as Ue, Toaster as qe, Toast as B, Spinner as Qe, Heading as le, HStack as D, Kbd as xe, Popover as M, Progress as H, chakra as Ke, Collapsible as se, Input as Ze } from "@chakra-ui/react";
|
|
7
|
+
import { LuX as Xe, LuNotebookPen as ne, LuBookmark as Je, LuArrowBigRight as et, LuArrowBigLeft as tt, LuChevronDown as nt, LuCircleHelp as ot, LuTableOfContents as rt, LuSearch as it, LuGalleryHorizontal as st, LuCircleCheck as ve } from "react-icons/lu";
|
|
8
8
|
import { createPortal as lt } from "react-dom";
|
|
9
|
-
import {
|
|
10
|
-
import { isShallowEqual as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
9
|
+
import { isPositionInArea as at } from "@prose-reader/enhancer-gestures";
|
|
10
|
+
import { isShallowEqual as ct, observeIntersection as dt, isHtmlTagElement as ht } from "@prose-reader/core";
|
|
11
|
+
import { BsBookmarks as ut } from "react-icons/bs";
|
|
12
|
+
import { RiGalleryView2 as gt } from "react-icons/ri";
|
|
13
|
+
import { RxDoubleArrowUp as pt, RxDoubleArrowLeft as mt, RxDoubleArrowDown as ft, RxDoubleArrowRight as bt } from "react-icons/rx";
|
|
14
|
+
import { HiOutlineInformationCircle as xt } from "react-icons/hi";
|
|
15
|
+
import vt from "rc-slider";
|
|
15
16
|
import "rc-slider/assets/index.css";
|
|
16
|
-
import { IoIosArrowBack as
|
|
17
|
-
import { MdFullscreenExit as
|
|
18
|
-
const
|
|
17
|
+
import { IoIosArrowBack as Ct, IoMdMore as It } from "react-icons/io";
|
|
18
|
+
import { MdFullscreenExit as yt, MdFullscreen as St } from "react-icons/md";
|
|
19
|
+
const Pe = Ee({
|
|
19
20
|
reader: void 0,
|
|
20
|
-
quickMenuSignal:
|
|
21
|
-
notificationsSubject: new
|
|
22
|
-
}),
|
|
21
|
+
quickMenuSignal: de({ default: !1 }),
|
|
22
|
+
notificationsSubject: new he()
|
|
23
|
+
}), Nn = g(
|
|
23
24
|
({
|
|
24
25
|
children: e,
|
|
25
26
|
reader: n,
|
|
26
27
|
quickMenuOpen: o,
|
|
27
|
-
onQuickMenuOpenChange:
|
|
28
|
+
onQuickMenuOpenChange: r
|
|
28
29
|
}) => {
|
|
29
|
-
const [,
|
|
30
|
-
() =>
|
|
30
|
+
const [, i] = Ce(
|
|
31
|
+
() => de({
|
|
31
32
|
default: o
|
|
32
33
|
})
|
|
33
|
-
), s =
|
|
34
|
-
() => new
|
|
35
|
-
),
|
|
34
|
+
), s = Le(
|
|
35
|
+
() => new he()
|
|
36
|
+
), d = $e(r), l = ce(
|
|
36
37
|
() => ({
|
|
37
|
-
quickMenuSignal:
|
|
38
|
+
quickMenuSignal: i,
|
|
38
39
|
reader: n,
|
|
39
40
|
notificationsSubject: s
|
|
40
41
|
}),
|
|
41
|
-
[
|
|
42
|
+
[i, n, s]
|
|
42
43
|
);
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
}, [o,
|
|
46
|
-
() =>
|
|
47
|
-
[
|
|
48
|
-
), /* @__PURE__ */ t(
|
|
44
|
+
return j(() => {
|
|
45
|
+
i.setValue(o);
|
|
46
|
+
}, [o, i]), E(
|
|
47
|
+
() => i.pipe(ue(d.current)),
|
|
48
|
+
[i, d]
|
|
49
|
+
), /* @__PURE__ */ t(Pe.Provider, { value: l, children: e });
|
|
49
50
|
}
|
|
50
|
-
),
|
|
51
|
-
return /* @__PURE__ */ t(
|
|
52
|
-
}),
|
|
51
|
+
), Tt = z.forwardRef(function(n, o) {
|
|
52
|
+
return /* @__PURE__ */ t(I, { variant: "ghost", "aria-label": "Close", ref: o, ...n, children: n.children ?? /* @__PURE__ */ t(Xe, {}) });
|
|
53
|
+
}), V = z.forwardRef(function(n, o) {
|
|
53
54
|
const {
|
|
54
|
-
children:
|
|
55
|
-
portalled:
|
|
55
|
+
children: r,
|
|
56
|
+
portalled: i = !0,
|
|
56
57
|
portalRef: s,
|
|
57
|
-
backdrop:
|
|
58
|
-
...
|
|
58
|
+
backdrop: d = !0,
|
|
59
|
+
...l
|
|
59
60
|
} = n;
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
|
|
62
|
-
/* @__PURE__ */ t(
|
|
61
|
+
return /* @__PURE__ */ c(ge, { disabled: !i, container: s, children: [
|
|
62
|
+
d && /* @__PURE__ */ t(S.Backdrop, {}),
|
|
63
|
+
/* @__PURE__ */ t(S.Positioner, { children: /* @__PURE__ */ t(S.Content, { ref: o, ...l, asChild: !1, children: r }) })
|
|
63
64
|
] });
|
|
64
|
-
}),
|
|
65
|
+
}), Y = z.forwardRef(function(n, o) {
|
|
65
66
|
return /* @__PURE__ */ t(
|
|
66
|
-
|
|
67
|
+
S.CloseTrigger,
|
|
67
68
|
{
|
|
68
69
|
position: "absolute",
|
|
69
70
|
top: "2",
|
|
70
71
|
insetEnd: "2",
|
|
71
72
|
...n,
|
|
72
73
|
asChild: !0,
|
|
73
|
-
children: /* @__PURE__ */ t(
|
|
74
|
+
children: /* @__PURE__ */ t(Tt, { size: "sm", ref: o, children: n.children })
|
|
74
75
|
}
|
|
75
76
|
);
|
|
76
|
-
}),
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const X =
|
|
82
|
-
const { reader: e } =
|
|
77
|
+
}), U = S.Root, q = S.Footer, Q = S.Header, K = S.Body;
|
|
78
|
+
S.Backdrop;
|
|
79
|
+
const Z = S.Title;
|
|
80
|
+
S.Description;
|
|
81
|
+
S.Trigger;
|
|
82
|
+
const X = S.ActionTrigger, J = () => Be(Pe), p = () => {
|
|
83
|
+
const { reader: e } = J();
|
|
83
84
|
return e;
|
|
84
|
-
},
|
|
85
|
-
const n =
|
|
86
|
-
return { data:
|
|
85
|
+
}, Re = (e) => !!e && "__PROSE_READER_ENHANCER_SEARCH" in e, W = (e) => !!e && "__PROSE_READER_ENHANCER_ANNOTATIONS" in e, Ae = (e) => !!e && "__PROSE_READER_ENHANCER_GALLERY" in e, kt = (e) => {
|
|
86
|
+
const n = p(), o = W(n) ? n : void 0;
|
|
87
|
+
return { data: v(
|
|
87
88
|
() => o == null ? void 0 : o.annotations.annotations$.pipe(
|
|
88
|
-
L((
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
L((i) => i.find((s) => s.id === e)),
|
|
90
|
+
ee(Ie),
|
|
91
|
+
F((i) => o.locateResource(i))
|
|
91
92
|
),
|
|
92
93
|
[o]
|
|
93
94
|
) };
|
|
@@ -95,45 +96,45 @@ const X = k.ActionTrigger, Z = () => Me(Re), m = () => {
|
|
|
95
96
|
id: e,
|
|
96
97
|
onNavigate: n
|
|
97
98
|
}) => {
|
|
98
|
-
var
|
|
99
|
-
const o =
|
|
100
|
-
return /* @__PURE__ */ t(
|
|
101
|
-
|
|
99
|
+
var i, s;
|
|
100
|
+
const o = p(), { data: r } = kt(e);
|
|
101
|
+
return /* @__PURE__ */ t(w.Item, { children: /* @__PURE__ */ c(
|
|
102
|
+
pe,
|
|
102
103
|
{
|
|
103
104
|
href: "#",
|
|
104
105
|
onClick: () => {
|
|
105
|
-
n(), o == null || o.navigation.goToCfi((
|
|
106
|
+
n(), o == null || o.navigation.goToCfi((r == null ? void 0 : r.meta.cfi) ?? "");
|
|
106
107
|
},
|
|
107
108
|
children: [
|
|
108
|
-
(
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
/* @__PURE__ */ t(f, { lineClamp: 2, fontSize: "md", children:
|
|
109
|
+
(i = r == null ? void 0 : r.resource) != null && i.notes ? /* @__PURE__ */ t(w.Indicator, { asChild: !0, children: /* @__PURE__ */ t(ne, {}) }) : /* @__PURE__ */ t(w.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ t(ne, {}) }),
|
|
110
|
+
/* @__PURE__ */ c(R, { gap: 0, children: [
|
|
111
|
+
/* @__PURE__ */ t(f, { lineClamp: 2, fontSize: "md", children: r != null && r.meta.range ? r == null ? void 0 : r.meta.range.toString() : /* @__PURE__ */ t("i", { children: /* @__PURE__ */ t("b", { children: "unknown (not loaded)" }) }) }),
|
|
111
112
|
/* @__PURE__ */ t(
|
|
112
113
|
f,
|
|
113
114
|
{
|
|
114
115
|
fontStyle: "italic",
|
|
115
116
|
fontWeight: "bold",
|
|
116
117
|
fontSize: "sm",
|
|
117
|
-
children: `Book page: ${((s =
|
|
118
|
+
children: `Book page: ${((s = r == null ? void 0 : r.meta) == null ? void 0 : s.absolutePageIndex) !== void 0 ? r.meta.absolutePageIndex + 1 : "unknown (not loaded)"}`
|
|
118
119
|
}
|
|
119
120
|
)
|
|
120
121
|
] })
|
|
121
122
|
]
|
|
122
123
|
}
|
|
123
124
|
) });
|
|
124
|
-
},
|
|
125
|
-
const e =
|
|
126
|
-
return { data:
|
|
125
|
+
}, ie = () => {
|
|
126
|
+
const e = p(), n = W(e) ? e : void 0;
|
|
127
|
+
return { data: v(
|
|
127
128
|
() => n == null ? void 0 : n.annotations.annotations$.pipe(
|
|
128
|
-
|
|
129
|
-
(
|
|
129
|
+
F(
|
|
130
|
+
(r) => n.locateResource(r)
|
|
130
131
|
)
|
|
131
132
|
),
|
|
132
133
|
[n]
|
|
133
134
|
) };
|
|
134
|
-
},
|
|
135
|
-
const { data: n } =
|
|
136
|
-
return /* @__PURE__ */ t(
|
|
135
|
+
}, wt = ({ onNavigate: e }) => {
|
|
136
|
+
const { data: n } = ie();
|
|
137
|
+
return /* @__PURE__ */ t(w.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: n == null ? void 0 : n.map((o) => /* @__PURE__ */ t(
|
|
137
138
|
Oe,
|
|
138
139
|
{
|
|
139
140
|
id: o.resource.id,
|
|
@@ -142,13 +143,13 @@ const X = k.ActionTrigger, Z = () => Me(Re), m = () => {
|
|
|
142
143
|
o.resource.id
|
|
143
144
|
)) });
|
|
144
145
|
}, Pt = () => {
|
|
145
|
-
const { data: e } =
|
|
146
|
+
const { data: e } = ie();
|
|
146
147
|
return {
|
|
147
148
|
data: e == null ? void 0 : e.filter((n) => !n.meta.range)
|
|
148
149
|
};
|
|
149
|
-
},
|
|
150
|
+
}, Rt = ({ onNavigate: e }) => {
|
|
150
151
|
const { data: n } = Pt();
|
|
151
|
-
return /* @__PURE__ */ t(
|
|
152
|
+
return /* @__PURE__ */ t(w.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: n == null ? void 0 : n.map((o) => /* @__PURE__ */ t(
|
|
152
153
|
Oe,
|
|
153
154
|
{
|
|
154
155
|
id: o.resource.id,
|
|
@@ -156,76 +157,76 @@ const X = k.ActionTrigger, Z = () => Me(Re), m = () => {
|
|
|
156
157
|
},
|
|
157
158
|
o.resource.id
|
|
158
159
|
)) });
|
|
159
|
-
},
|
|
160
|
+
}, At = g(
|
|
160
161
|
({
|
|
161
162
|
onNavigate: e,
|
|
162
163
|
defaultTab: n
|
|
163
164
|
}) => {
|
|
164
|
-
const [o,
|
|
165
|
-
return /* @__PURE__ */
|
|
165
|
+
const [o, r] = k(n ?? "bookmarks");
|
|
166
|
+
return /* @__PURE__ */ c(
|
|
166
167
|
O.Root,
|
|
167
168
|
{
|
|
168
169
|
value: o,
|
|
169
|
-
onValueChange: (
|
|
170
|
+
onValueChange: (i) => r(i.value),
|
|
170
171
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ c(O.List, { children: [
|
|
173
|
+
/* @__PURE__ */ c(O.Trigger, { value: "bookmarks", children: [
|
|
173
174
|
/* @__PURE__ */ t(Je, {}),
|
|
174
175
|
"Bookmarks"
|
|
175
176
|
] }),
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */ t(
|
|
177
|
+
/* @__PURE__ */ c(O.Trigger, { value: "annotations", children: [
|
|
178
|
+
/* @__PURE__ */ t(ne, {}),
|
|
178
179
|
"Annotations"
|
|
179
180
|
] }),
|
|
180
181
|
/* @__PURE__ */ t(O.Indicator, {})
|
|
181
182
|
] }),
|
|
182
|
-
/* @__PURE__ */ t(O.Content, { value: "bookmarks", children: /* @__PURE__ */ t(
|
|
183
|
-
/* @__PURE__ */ t(O.Content, { value: "annotations", children: /* @__PURE__ */ t(
|
|
183
|
+
/* @__PURE__ */ t(O.Content, { value: "bookmarks", children: /* @__PURE__ */ t(Rt, { onNavigate: e }) }),
|
|
184
|
+
/* @__PURE__ */ t(O.Content, { value: "annotations", children: /* @__PURE__ */ t(wt, { onNavigate: e }) })
|
|
184
185
|
]
|
|
185
186
|
}
|
|
186
187
|
);
|
|
187
188
|
}
|
|
188
|
-
),
|
|
189
|
+
), Ot = g(
|
|
189
190
|
({
|
|
190
191
|
openWith: e,
|
|
191
192
|
setOpen: n,
|
|
192
193
|
onNavigate: o
|
|
193
194
|
}) => /* @__PURE__ */ t(
|
|
194
|
-
|
|
195
|
+
U,
|
|
195
196
|
{
|
|
196
197
|
lazyMount: !0,
|
|
197
198
|
placement: "center",
|
|
198
199
|
open: !!e,
|
|
199
|
-
onOpenChange: (
|
|
200
|
+
onOpenChange: (r) => n(r.open),
|
|
200
201
|
size: { mdDown: "full", md: "lg" },
|
|
201
202
|
scrollBehavior: "inside",
|
|
202
|
-
children: /* @__PURE__ */
|
|
203
|
-
/* @__PURE__ */ t(
|
|
204
|
-
/* @__PURE__ */ t(
|
|
205
|
-
|
|
203
|
+
children: /* @__PURE__ */ c(V, { height: "100%", children: [
|
|
204
|
+
/* @__PURE__ */ t(Q, { children: /* @__PURE__ */ t(Z, { children: "Annotations" }) }),
|
|
205
|
+
/* @__PURE__ */ t(K, { flex: 1, children: /* @__PURE__ */ t(
|
|
206
|
+
At,
|
|
206
207
|
{
|
|
207
208
|
onNavigate: o,
|
|
208
209
|
defaultTab: e
|
|
209
210
|
}
|
|
210
211
|
) }),
|
|
211
|
-
/* @__PURE__ */ t(
|
|
212
|
-
/* @__PURE__ */ t(
|
|
212
|
+
/* @__PURE__ */ t(q, { children: /* @__PURE__ */ t(X, { asChild: !0, children: /* @__PURE__ */ t(G, { variant: "outline", children: "Cancel" }) }) }),
|
|
213
|
+
/* @__PURE__ */ t(Y, {})
|
|
213
214
|
] })
|
|
214
215
|
}
|
|
215
216
|
)
|
|
216
|
-
), Dt =
|
|
217
|
-
const n =
|
|
218
|
-
return o ? /* @__PURE__ */ t(
|
|
219
|
-
}),
|
|
217
|
+
), Dt = g(({ children: e }) => {
|
|
218
|
+
const n = p(), o = v(() => n == null ? void 0 : n.spine.element$, [n]);
|
|
219
|
+
return o ? /* @__PURE__ */ t(oe, { children: lt(e, o) }) : null;
|
|
220
|
+
}), zt = ({
|
|
220
221
|
absolutePageIndex: e,
|
|
221
222
|
itemIndex: n
|
|
222
223
|
}) => {
|
|
223
|
-
const o =
|
|
224
|
+
const o = p(), r = v(
|
|
224
225
|
() => o == null ? void 0 : o.spine.spineItemsManager.items$,
|
|
225
226
|
[o]
|
|
226
227
|
);
|
|
227
228
|
return {
|
|
228
|
-
spineItem:
|
|
229
|
+
spineItem: ce(() => {
|
|
229
230
|
if (n !== void 0)
|
|
230
231
|
return o == null ? void 0 : o.spine.spineItemsManager.get(n);
|
|
231
232
|
if (e !== void 0) {
|
|
@@ -234,123 +235,143 @@ const X = k.ActionTrigger, Z = () => Me(Re), m = () => {
|
|
|
234
235
|
})) ?? {};
|
|
235
236
|
return o == null ? void 0 : o.spine.spineItemsManager.get(s);
|
|
236
237
|
}
|
|
237
|
-
}, [n, e, o,
|
|
238
|
+
}, [n, e, o, r])
|
|
238
239
|
};
|
|
239
240
|
}, Et = ({
|
|
240
241
|
absolutePageIndex: e,
|
|
241
242
|
itemIndex: n
|
|
242
243
|
}) => {
|
|
243
|
-
const { spineItem: o } =
|
|
244
|
-
return
|
|
245
|
-
() => (o == null ? void 0 : o.isReady$) ??
|
|
244
|
+
const { spineItem: o } = zt({ absolutePageIndex: e, itemIndex: n });
|
|
245
|
+
return v(
|
|
246
|
+
() => (o == null ? void 0 : o.isReady$) ?? Ne(!1),
|
|
246
247
|
[o]
|
|
247
248
|
);
|
|
248
|
-
},
|
|
249
|
-
const e = m();
|
|
250
|
-
return j(e) ? e : void 0;
|
|
251
|
-
}, Lt = (e) => {
|
|
252
|
-
const n = ze();
|
|
253
|
-
return b(
|
|
254
|
-
() => n == null ? void 0 : n.annotations.candidates$.pipe(
|
|
255
|
-
L((o) => o[e])
|
|
256
|
-
),
|
|
257
|
-
[n]
|
|
258
|
-
);
|
|
259
|
-
}, _t = p(
|
|
249
|
+
}, Bt = "data-bookmark-area", Mt = g(
|
|
260
250
|
({
|
|
261
251
|
absolutePageIndex: e,
|
|
262
252
|
left: n,
|
|
263
253
|
top: o,
|
|
264
|
-
width:
|
|
254
|
+
width: r
|
|
265
255
|
}) => {
|
|
266
|
-
const
|
|
267
|
-
(
|
|
268
|
-
var
|
|
269
|
-
return ((
|
|
256
|
+
const i = Et({ absolutePageIndex: e }), { data: s } = ie(), d = s == null ? void 0 : s.find(
|
|
257
|
+
(u) => {
|
|
258
|
+
var a;
|
|
259
|
+
return ((a = u == null ? void 0 : u.meta) == null ? void 0 : a.absolutePageIndex) === e && u.meta.range === void 0;
|
|
270
260
|
}
|
|
271
|
-
)
|
|
272
|
-
|
|
273
|
-
|
|
261
|
+
);
|
|
262
|
+
if (!i) return null;
|
|
263
|
+
const l = r * 0.1 / 2;
|
|
264
|
+
return /* @__PURE__ */ t(
|
|
265
|
+
te,
|
|
274
266
|
{
|
|
275
|
-
present:
|
|
267
|
+
present: !!d,
|
|
276
268
|
lazyMount: !0,
|
|
277
269
|
animationName: { _open: "fade-in", _closed: "fade-out" },
|
|
278
270
|
animationDuration: "moderate",
|
|
279
271
|
children: /* @__PURE__ */ t(
|
|
280
|
-
|
|
272
|
+
P,
|
|
281
273
|
{
|
|
282
|
-
"data-bookmark-area":
|
|
274
|
+
"data-bookmark-area": Bt,
|
|
283
275
|
position: "absolute",
|
|
284
|
-
left: n +
|
|
276
|
+
left: n + r,
|
|
285
277
|
transform: "translateX(-100%)",
|
|
278
|
+
pointerEvents: "none",
|
|
286
279
|
top: o,
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
_icon: { boxSize: "36px" },
|
|
300
|
-
children: /* @__PURE__ */ t(ct, {})
|
|
301
|
-
}
|
|
302
|
-
) : /* @__PURE__ */ t(
|
|
303
|
-
v,
|
|
304
|
-
{
|
|
305
|
-
"aria-label": "bookmark",
|
|
306
|
-
onClick: () => {
|
|
307
|
-
r == null || r.annotations.annotateAbsolutePage({
|
|
308
|
-
absolutePageIndex: e
|
|
309
|
-
});
|
|
310
|
-
},
|
|
311
|
-
size: "lg",
|
|
312
|
-
bgColor: "white",
|
|
313
|
-
opacity: 0.5,
|
|
314
|
-
_hover: { opacity: 1 },
|
|
315
|
-
variant: "ghost",
|
|
316
|
-
_icon: { boxSize: "36px" },
|
|
317
|
-
children: /* @__PURE__ */ t(at, {})
|
|
318
|
-
}
|
|
319
|
-
)
|
|
280
|
+
width: l,
|
|
281
|
+
height: l,
|
|
282
|
+
_before: {
|
|
283
|
+
content: '""',
|
|
284
|
+
position: "absolute",
|
|
285
|
+
top: 0,
|
|
286
|
+
left: 0,
|
|
287
|
+
width: 0,
|
|
288
|
+
height: 0,
|
|
289
|
+
borderTop: `${l}px solid #03030373`,
|
|
290
|
+
borderLeft: `${l}px solid transparent`
|
|
291
|
+
}
|
|
320
292
|
}
|
|
321
293
|
)
|
|
322
294
|
}
|
|
323
295
|
);
|
|
324
296
|
}
|
|
325
|
-
),
|
|
326
|
-
const e =
|
|
297
|
+
), Lt = g(() => {
|
|
298
|
+
const e = p(), n = v(() => e == null ? void 0 : e.layoutInfo$, [e]);
|
|
327
299
|
return /* @__PURE__ */ t(Dt, { children: n == null ? void 0 : n.pages.map(
|
|
328
|
-
({ absoluteLayout: { left: o, top:
|
|
329
|
-
|
|
300
|
+
({ absoluteLayout: { left: o, top: r, width: i } }, s) => /* @__PURE__ */ t(
|
|
301
|
+
Mt,
|
|
330
302
|
{
|
|
331
303
|
absolutePageIndex: s,
|
|
332
304
|
left: o,
|
|
333
|
-
top:
|
|
334
|
-
width:
|
|
305
|
+
top: r,
|
|
306
|
+
width: i
|
|
335
307
|
},
|
|
336
308
|
s
|
|
337
309
|
)
|
|
338
310
|
) });
|
|
339
|
-
}),
|
|
311
|
+
}), $t = () => {
|
|
312
|
+
const e = p();
|
|
313
|
+
return W(e) ? e : void 0;
|
|
314
|
+
}, _t = () => {
|
|
315
|
+
const e = $t(), { data: n } = ie();
|
|
316
|
+
j(() => e ? e.gestures.hooks.register(
|
|
317
|
+
"beforeTapGesture",
|
|
318
|
+
({ event$: r }) => r.pipe(
|
|
319
|
+
Fe(e == null ? void 0 : e.annotations.candidates$),
|
|
320
|
+
L(([i, s]) => {
|
|
321
|
+
if (!i.page) return !0;
|
|
322
|
+
const {
|
|
323
|
+
spineItem: d,
|
|
324
|
+
spineItemPageIndex: l,
|
|
325
|
+
spineItemPagePosition: u,
|
|
326
|
+
pageSize: a
|
|
327
|
+
} = i.page;
|
|
328
|
+
if (at(
|
|
329
|
+
u,
|
|
330
|
+
{
|
|
331
|
+
type: "corner",
|
|
332
|
+
corner: "top-right",
|
|
333
|
+
size: 10,
|
|
334
|
+
unit: "%"
|
|
335
|
+
},
|
|
336
|
+
a
|
|
337
|
+
)) {
|
|
338
|
+
const h = e.spine.pages.fromSpineItemPageIndex(
|
|
339
|
+
d,
|
|
340
|
+
l
|
|
341
|
+
);
|
|
342
|
+
if (!h) return !0;
|
|
343
|
+
const b = n == null ? void 0 : n.find(
|
|
344
|
+
(C) => {
|
|
345
|
+
var T;
|
|
346
|
+
return ((T = C == null ? void 0 : C.meta) == null ? void 0 : T.absolutePageIndex) === h.absolutePageIndex && C.meta.range === void 0;
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
if (b)
|
|
350
|
+
return e == null || e.annotations.delete(b.resource.id), !1;
|
|
351
|
+
if (s == null ? void 0 : s[h.absolutePageIndex])
|
|
352
|
+
return e == null || e.annotations.annotateAbsolutePage({
|
|
353
|
+
absolutePageIndex: h.absolutePageIndex
|
|
354
|
+
}), !1;
|
|
355
|
+
}
|
|
356
|
+
return !0;
|
|
357
|
+
})
|
|
358
|
+
)
|
|
359
|
+
) : void 0, [e, n]);
|
|
360
|
+
}, ae = Ue({
|
|
340
361
|
placement: "bottom-end",
|
|
341
362
|
pauseOnPageIdle: !0
|
|
342
|
-
}), Nt = () => /* @__PURE__ */ t(
|
|
363
|
+
}), Nt = () => /* @__PURE__ */ t(ge, { children: /* @__PURE__ */ t(qe, { toaster: ae, insetInline: { mdDown: "4" }, children: (e) => {
|
|
343
364
|
var n;
|
|
344
|
-
return /* @__PURE__ */
|
|
345
|
-
e.type === "loading" ? /* @__PURE__ */ t(Qe, { size: "sm", color: "blue.solid" }) : /* @__PURE__ */ t(
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
-
e.title && /* @__PURE__ */ t(
|
|
348
|
-
e.description && /* @__PURE__ */ t(
|
|
365
|
+
return /* @__PURE__ */ c(B.Root, { width: { md: "sm" }, children: [
|
|
366
|
+
e.type === "loading" ? /* @__PURE__ */ t(Qe, { size: "sm", color: "blue.solid" }) : /* @__PURE__ */ t(B.Indicator, {}),
|
|
367
|
+
/* @__PURE__ */ c(R, { gap: "1", flex: "1", maxWidth: "100%", children: [
|
|
368
|
+
e.title && /* @__PURE__ */ t(B.Title, { children: e.title }),
|
|
369
|
+
e.description && /* @__PURE__ */ t(B.Description, { children: e.description })
|
|
349
370
|
] }),
|
|
350
|
-
e.action && /* @__PURE__ */ t(
|
|
351
|
-
((n = e.meta) == null ? void 0 : n.closable) && /* @__PURE__ */ t(
|
|
371
|
+
e.action && /* @__PURE__ */ t(B.ActionTrigger, { children: e.action.label }),
|
|
372
|
+
((n = e.meta) == null ? void 0 : n.closable) && /* @__PURE__ */ t(B.CloseTrigger, {})
|
|
352
373
|
] });
|
|
353
|
-
} }) }),
|
|
374
|
+
} }) }), Ft = {
|
|
354
375
|
x: 0,
|
|
355
376
|
y: 0,
|
|
356
377
|
width: 0,
|
|
@@ -360,64 +381,64 @@ const X = k.ActionTrigger, Z = () => Me(Re), m = () => {
|
|
|
360
381
|
bottom: 0,
|
|
361
382
|
right: 0
|
|
362
383
|
};
|
|
363
|
-
function
|
|
364
|
-
const [e, n] =
|
|
384
|
+
function Ht() {
|
|
385
|
+
const [e, n] = k(null), [o, r] = k(Ft), i = ce(
|
|
365
386
|
() => new ResizeObserver((s) => {
|
|
366
387
|
if (s[0]) {
|
|
367
|
-
const { x:
|
|
368
|
-
|
|
388
|
+
const { x: d, y: l, width: u, height: a, top: m, left: h, bottom: b, right: y } = s[0].contentRect;
|
|
389
|
+
r({ x: d, y: l, width: u, height: a, top: m, left: h, bottom: b, right: y });
|
|
369
390
|
}
|
|
370
391
|
}),
|
|
371
392
|
[]
|
|
372
393
|
);
|
|
373
|
-
return
|
|
394
|
+
return Me(() => {
|
|
374
395
|
if (e)
|
|
375
|
-
return
|
|
376
|
-
|
|
396
|
+
return i.observe(e), () => {
|
|
397
|
+
i.disconnect();
|
|
377
398
|
};
|
|
378
|
-
}, [e,
|
|
399
|
+
}, [e, i]), [n, o, e];
|
|
379
400
|
}
|
|
380
|
-
const
|
|
381
|
-
const
|
|
382
|
-
|
|
383
|
-
if (!
|
|
401
|
+
const Wt = (e, n, o) => {
|
|
402
|
+
const r = p(), i = Ae(r) ? r : void 0;
|
|
403
|
+
E(() => {
|
|
404
|
+
if (!i || !e) return re;
|
|
384
405
|
const s = n.layout.layout$.pipe(
|
|
385
406
|
ye(n.layout.layoutInfo),
|
|
386
|
-
|
|
387
|
-
),
|
|
407
|
+
Se(ct)
|
|
408
|
+
), d = dt(
|
|
388
409
|
e
|
|
389
|
-
).pipe(L((
|
|
410
|
+
).pipe(L((l) => l.some((u) => u.isIntersecting)));
|
|
390
411
|
return s.pipe(
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
412
|
+
He(100, void 0, { trailing: !0 }),
|
|
413
|
+
F(() => d.pipe(
|
|
414
|
+
ue((l) => {
|
|
415
|
+
l || (e.innerHTML = "");
|
|
395
416
|
}),
|
|
396
|
-
|
|
397
|
-
|
|
417
|
+
ee((l) => l),
|
|
418
|
+
Te()
|
|
398
419
|
).pipe(
|
|
399
|
-
|
|
420
|
+
F(() => (e.innerHTML = "", i == null ? void 0 : i.gallery.snapshot(
|
|
400
421
|
n,
|
|
401
422
|
e,
|
|
402
423
|
o
|
|
403
424
|
)))
|
|
404
425
|
))
|
|
405
426
|
);
|
|
406
|
-
}, [
|
|
407
|
-
},
|
|
427
|
+
}, [i, n, o, e]);
|
|
428
|
+
}, jt = g(
|
|
408
429
|
({
|
|
409
430
|
item: e,
|
|
410
431
|
onNavigated: n
|
|
411
432
|
}) => {
|
|
412
|
-
var
|
|
413
|
-
const [o,
|
|
414
|
-
|
|
415
|
-
const
|
|
433
|
+
var l;
|
|
434
|
+
const [o, r, i] = Ht(), s = p();
|
|
435
|
+
Wt(i, e, r);
|
|
436
|
+
const d = v(
|
|
416
437
|
() => s == null ? void 0 : s.locateResource(e, { mode: "shallow" }),
|
|
417
438
|
[s, e]
|
|
418
439
|
);
|
|
419
|
-
return /* @__PURE__ */
|
|
420
|
-
|
|
440
|
+
return /* @__PURE__ */ c(
|
|
441
|
+
P,
|
|
421
442
|
{
|
|
422
443
|
width: "100%",
|
|
423
444
|
aspectRatio: "2/3",
|
|
@@ -433,7 +454,7 @@ const jt = (e, n, o) => {
|
|
|
433
454
|
},
|
|
434
455
|
children: [
|
|
435
456
|
/* @__PURE__ */ t(
|
|
436
|
-
|
|
457
|
+
P,
|
|
437
458
|
{
|
|
438
459
|
height: "100%",
|
|
439
460
|
width: "100%",
|
|
@@ -442,7 +463,7 @@ const jt = (e, n, o) => {
|
|
|
442
463
|
ref: o
|
|
443
464
|
}
|
|
444
465
|
),
|
|
445
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ c(
|
|
446
467
|
f,
|
|
447
468
|
{
|
|
448
469
|
position: "absolute",
|
|
@@ -455,7 +476,7 @@ const jt = (e, n, o) => {
|
|
|
455
476
|
fontSize: "xs",
|
|
456
477
|
children: [
|
|
457
478
|
"Page ",
|
|
458
|
-
(((
|
|
479
|
+
(((l = d == null ? void 0 : d.meta) == null ? void 0 : l.absolutePageIndex) ?? 0) + 1
|
|
459
480
|
]
|
|
460
481
|
}
|
|
461
482
|
)
|
|
@@ -463,25 +484,25 @@ const jt = (e, n, o) => {
|
|
|
463
484
|
}
|
|
464
485
|
);
|
|
465
486
|
}
|
|
466
|
-
), Gt =
|
|
487
|
+
), Gt = g(
|
|
467
488
|
({
|
|
468
489
|
open: e,
|
|
469
490
|
setOpen: n
|
|
470
491
|
}) => {
|
|
471
|
-
const o =
|
|
492
|
+
const o = p(), r = v(() => o == null ? void 0 : o.spineItemsManager.items$, [o]);
|
|
472
493
|
return /* @__PURE__ */ t(
|
|
473
|
-
|
|
494
|
+
U,
|
|
474
495
|
{
|
|
475
496
|
lazyMount: !0,
|
|
476
497
|
placement: "center",
|
|
477
498
|
open: e,
|
|
478
|
-
onOpenChange: (
|
|
499
|
+
onOpenChange: (i) => n(i.open),
|
|
479
500
|
size: { mdDown: "full", md: "lg" },
|
|
480
501
|
scrollBehavior: "inside",
|
|
481
|
-
children: /* @__PURE__ */
|
|
482
|
-
/* @__PURE__ */ t(
|
|
483
|
-
/* @__PURE__ */ t(
|
|
484
|
-
|
|
502
|
+
children: /* @__PURE__ */ c(V, { height: "100%", children: [
|
|
503
|
+
/* @__PURE__ */ t(Q, { children: /* @__PURE__ */ t(Z, { children: "Gallery" }) }),
|
|
504
|
+
/* @__PURE__ */ t(K, { children: /* @__PURE__ */ t(
|
|
505
|
+
P,
|
|
485
506
|
{
|
|
486
507
|
gridTemplateColumns: [
|
|
487
508
|
"repeat(2, minmax(0, 1fr))",
|
|
@@ -491,30 +512,30 @@ const jt = (e, n, o) => {
|
|
|
491
512
|
gap: [2, 4],
|
|
492
513
|
pt: 2,
|
|
493
514
|
"data-grid": !0,
|
|
494
|
-
children:
|
|
495
|
-
|
|
515
|
+
children: r == null ? void 0 : r.map((i) => /* @__PURE__ */ t(
|
|
516
|
+
jt,
|
|
496
517
|
{
|
|
497
|
-
item:
|
|
518
|
+
item: i,
|
|
498
519
|
onNavigated: () => {
|
|
499
520
|
n(!1);
|
|
500
521
|
}
|
|
501
522
|
},
|
|
502
|
-
|
|
523
|
+
i.item.id
|
|
503
524
|
))
|
|
504
525
|
}
|
|
505
526
|
) }),
|
|
506
|
-
/* @__PURE__ */ t(
|
|
507
|
-
/* @__PURE__ */ t(
|
|
527
|
+
/* @__PURE__ */ t(q, { children: /* @__PURE__ */ t(X, { asChild: !0, children: /* @__PURE__ */ t(G, { variant: "outline", children: "Cancel" }) }) }),
|
|
528
|
+
/* @__PURE__ */ t(Y, {})
|
|
508
529
|
] })
|
|
509
530
|
}
|
|
510
531
|
);
|
|
511
532
|
}
|
|
512
|
-
), Vt = "@prose-reader/react-reader", Yt = "1.
|
|
533
|
+
), Vt = "@prose-reader/react-reader", Yt = "1.230.0", Ut = g(
|
|
513
534
|
({
|
|
514
535
|
open: e,
|
|
515
536
|
setOpen: n
|
|
516
537
|
}) => /* @__PURE__ */ t(
|
|
517
|
-
|
|
538
|
+
U,
|
|
518
539
|
{
|
|
519
540
|
lazyMount: !0,
|
|
520
541
|
placement: "center",
|
|
@@ -522,63 +543,63 @@ const jt = (e, n, o) => {
|
|
|
522
543
|
onOpenChange: (o) => n(o.open),
|
|
523
544
|
size: { mdDown: "full", md: "lg" },
|
|
524
545
|
scrollBehavior: "inside",
|
|
525
|
-
children: /* @__PURE__ */
|
|
526
|
-
/* @__PURE__ */ t(
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
-
/* @__PURE__ */ t(
|
|
529
|
-
/* @__PURE__ */
|
|
546
|
+
children: /* @__PURE__ */ c(V, { children: [
|
|
547
|
+
/* @__PURE__ */ t(Q, { children: /* @__PURE__ */ t(Z, { children: "Help" }) }),
|
|
548
|
+
/* @__PURE__ */ c(K, { overflowY: "auto", flex: 1, children: [
|
|
549
|
+
/* @__PURE__ */ t(le, { mb: 2, as: "h3", size: "lg", children: "Shortcuts" }),
|
|
550
|
+
/* @__PURE__ */ c(D, { mb: 1, children: [
|
|
530
551
|
/* @__PURE__ */ t(xe, { children: /* @__PURE__ */ t(et, {}) }),
|
|
531
552
|
" ",
|
|
532
553
|
/* @__PURE__ */ t(f, { children: "Navigate to right page" })
|
|
533
554
|
] }),
|
|
534
|
-
/* @__PURE__ */
|
|
555
|
+
/* @__PURE__ */ c(D, { mb: 1, children: [
|
|
535
556
|
/* @__PURE__ */ t(xe, { children: /* @__PURE__ */ t(tt, {}) }),
|
|
536
557
|
" ",
|
|
537
558
|
/* @__PURE__ */ t(f, { children: "Navigate to left page" })
|
|
538
559
|
] }),
|
|
539
|
-
/* @__PURE__ */ t(
|
|
540
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ t(le, { mb: 2, mt: 4, as: "h3", size: "lg", children: "About" }),
|
|
561
|
+
/* @__PURE__ */ c(f, { children: [
|
|
541
562
|
Vt,
|
|
542
563
|
" version: ",
|
|
543
564
|
Yt
|
|
544
565
|
] })
|
|
545
566
|
] }),
|
|
546
|
-
/* @__PURE__ */ t(
|
|
547
|
-
/* @__PURE__ */ t(
|
|
567
|
+
/* @__PURE__ */ t(q, { children: /* @__PURE__ */ t(X, { asChild: !0, children: /* @__PURE__ */ t(G, { variant: "outline", children: "Cancel" }) }) }),
|
|
568
|
+
/* @__PURE__ */ t(Y, {})
|
|
548
569
|
] })
|
|
549
570
|
}
|
|
550
571
|
)
|
|
551
|
-
),
|
|
552
|
-
const e =
|
|
553
|
-
return
|
|
554
|
-
() => e ?
|
|
572
|
+
), $ = () => {
|
|
573
|
+
const e = p();
|
|
574
|
+
return v(
|
|
575
|
+
() => e ? We([e.pagination.state$, e.context.state$]).pipe(
|
|
555
576
|
L(([n, o]) => {
|
|
556
|
-
var
|
|
557
|
-
const
|
|
577
|
+
var i;
|
|
578
|
+
const r = (i = o.manifest) == null ? void 0 : i.spineItems.every(
|
|
558
579
|
(s) => {
|
|
559
|
-
var
|
|
560
|
-
return (
|
|
580
|
+
var d;
|
|
581
|
+
return (d = s.mediaType) == null ? void 0 : d.startsWith("image/");
|
|
561
582
|
}
|
|
562
583
|
);
|
|
563
584
|
return {
|
|
564
585
|
...n,
|
|
565
|
-
hasChapters: !o.isFullyPrePaginated && !
|
|
586
|
+
hasChapters: !o.isFullyPrePaginated && !r
|
|
566
587
|
};
|
|
567
588
|
})
|
|
568
|
-
) :
|
|
589
|
+
) : re,
|
|
569
590
|
[e]
|
|
570
591
|
);
|
|
571
592
|
}, qt = () => {
|
|
572
|
-
const e =
|
|
593
|
+
const e = $(), n = Math.floor(
|
|
573
594
|
((e == null ? void 0 : e.percentageEstimateOfBook) ?? 0) * 100
|
|
574
595
|
), o = n > 0 ? n : 1;
|
|
575
|
-
return (e == null ? void 0 : e.percentageEstimateOfBook) === void 0 ? null : /* @__PURE__ */ t(
|
|
596
|
+
return (e == null ? void 0 : e.percentageEstimateOfBook) === void 0 ? null : /* @__PURE__ */ t(P, { position: "absolute", right: 0, bottom: 0, p: 2, color: "black", children: /* @__PURE__ */ c(f, { fontSize: "sm", children: [
|
|
576
597
|
o,
|
|
577
598
|
" %"
|
|
578
599
|
] }) });
|
|
579
600
|
}, Qt = () => {
|
|
580
|
-
const [e, n] =
|
|
581
|
-
return
|
|
601
|
+
const [e, n] = k(/* @__PURE__ */ new Date());
|
|
602
|
+
return j(() => {
|
|
582
603
|
const o = setInterval(() => {
|
|
583
604
|
n(/* @__PURE__ */ new Date());
|
|
584
605
|
}, 6e4);
|
|
@@ -591,12 +612,12 @@ const jt = (e, n, o) => {
|
|
|
591
612
|
minute: "2-digit"
|
|
592
613
|
}) });
|
|
593
614
|
}, me = () => {
|
|
594
|
-
const { quickMenuSignal: e } =
|
|
595
|
-
return [
|
|
596
|
-
},
|
|
615
|
+
const { quickMenuSignal: e } = J();
|
|
616
|
+
return [_e(e), e.setValue, e];
|
|
617
|
+
}, Zt = () => {
|
|
597
618
|
const [e] = me();
|
|
598
619
|
return /* @__PURE__ */ t(
|
|
599
|
-
|
|
620
|
+
P,
|
|
600
621
|
{
|
|
601
622
|
position: "absolute",
|
|
602
623
|
left: 0,
|
|
@@ -606,11 +627,11 @@ const jt = (e, n, o) => {
|
|
|
606
627
|
children: /* @__PURE__ */ t(Kt, {})
|
|
607
628
|
}
|
|
608
629
|
);
|
|
609
|
-
},
|
|
610
|
-
const e =
|
|
611
|
-
|
|
630
|
+
}, Xt = () => {
|
|
631
|
+
const e = p();
|
|
632
|
+
E(
|
|
612
633
|
() => e == null ? void 0 : e.links$.subscribe((n) => {
|
|
613
|
-
if (n.type === "click" &&
|
|
634
|
+
if (n.type === "click" && ht(n.target, "a")) {
|
|
614
635
|
if (!n.target.href) return;
|
|
615
636
|
const o = new URL(n.target.href);
|
|
616
637
|
window.location.host !== o.host && confirm(
|
|
@@ -621,20 +642,20 @@ const jt = (e, n, o) => {
|
|
|
621
642
|
[e]
|
|
622
643
|
);
|
|
623
644
|
}, Jt = () => {
|
|
624
|
-
const e =
|
|
625
|
-
|
|
645
|
+
const e = p(), { notificationsSubject: n } = J();
|
|
646
|
+
E(
|
|
626
647
|
() => e == null ? void 0 : e.zoom.isZooming$.pipe(
|
|
627
|
-
|
|
628
|
-
if (!o) return
|
|
629
|
-
const
|
|
648
|
+
F((o) => {
|
|
649
|
+
if (!o) return je;
|
|
650
|
+
const r = new he();
|
|
630
651
|
return n.next({
|
|
631
652
|
key: "zoom",
|
|
632
653
|
title: "Zooming",
|
|
633
654
|
duration: 999999,
|
|
634
|
-
abort:
|
|
635
|
-
}),
|
|
636
|
-
|
|
637
|
-
|
|
655
|
+
abort: r
|
|
656
|
+
}), re.pipe(
|
|
657
|
+
ke(() => {
|
|
658
|
+
r.next(), r.complete();
|
|
638
659
|
})
|
|
639
660
|
);
|
|
640
661
|
})
|
|
@@ -642,13 +663,13 @@ const jt = (e, n, o) => {
|
|
|
642
663
|
[e]
|
|
643
664
|
);
|
|
644
665
|
}, en = () => {
|
|
645
|
-
const e =
|
|
646
|
-
|
|
666
|
+
const e = p(), { notificationsSubject: n } = J();
|
|
667
|
+
E(
|
|
647
668
|
() => e == null ? void 0 : e.settings.values$.pipe(
|
|
648
669
|
L(({ fontScale: o }) => o),
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
670
|
+
Se(),
|
|
671
|
+
we(1),
|
|
672
|
+
ue((o) => {
|
|
652
673
|
n.next({
|
|
653
674
|
key: "fontScaleChange",
|
|
654
675
|
title: "Font size changed",
|
|
@@ -659,51 +680,51 @@ const jt = (e, n, o) => {
|
|
|
659
680
|
[e, n]
|
|
660
681
|
);
|
|
661
682
|
}, tn = () => {
|
|
662
|
-
const { notificationsSubject: e } =
|
|
663
|
-
en(), Jt(),
|
|
683
|
+
const { notificationsSubject: e } = J();
|
|
684
|
+
en(), Jt(), E(
|
|
664
685
|
() => e.pipe(
|
|
665
|
-
|
|
686
|
+
ee(Ie),
|
|
666
687
|
Ge((n) => {
|
|
667
|
-
const o = n.duration ?? 3e3,
|
|
688
|
+
const o = n.duration ?? 3e3, r = ae.create({
|
|
668
689
|
title: n.title,
|
|
669
690
|
description: n.description,
|
|
670
691
|
duration: o
|
|
671
|
-
}),
|
|
672
|
-
|
|
673
|
-
|
|
692
|
+
}), i = e.pipe(
|
|
693
|
+
we(1),
|
|
694
|
+
ee((s) => !!n.key && (s == null ? void 0 : s.key) === n.key)
|
|
674
695
|
);
|
|
675
696
|
return Ve(
|
|
676
697
|
Ye(o),
|
|
677
|
-
n.abort ??
|
|
678
|
-
|
|
698
|
+
n.abort ?? re,
|
|
699
|
+
i
|
|
679
700
|
).pipe(
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
701
|
+
Te(),
|
|
702
|
+
ke(() => {
|
|
703
|
+
ae.dismiss(r);
|
|
683
704
|
})
|
|
684
705
|
);
|
|
685
706
|
})
|
|
686
707
|
),
|
|
687
708
|
[e]
|
|
688
709
|
);
|
|
689
|
-
}, nn =
|
|
710
|
+
}, nn = z.forwardRef(
|
|
690
711
|
function(n, o) {
|
|
691
712
|
const {
|
|
692
|
-
showArrow:
|
|
693
|
-
children:
|
|
713
|
+
showArrow: r,
|
|
714
|
+
children: i,
|
|
694
715
|
portalled: s = !0,
|
|
695
|
-
content:
|
|
696
|
-
portalRef:
|
|
716
|
+
content: d,
|
|
717
|
+
portalRef: l,
|
|
697
718
|
...u
|
|
698
719
|
} = n;
|
|
699
|
-
return /* @__PURE__ */
|
|
720
|
+
return /* @__PURE__ */ c(
|
|
700
721
|
M.Root,
|
|
701
722
|
{
|
|
702
723
|
...u,
|
|
703
724
|
positioning: { ...u.positioning, gutter: 4 },
|
|
704
725
|
children: [
|
|
705
|
-
/* @__PURE__ */ t(M.Trigger, { asChild: !0, children:
|
|
706
|
-
/* @__PURE__ */ t(
|
|
726
|
+
/* @__PURE__ */ t(M.Trigger, { asChild: !0, children: i }),
|
|
727
|
+
/* @__PURE__ */ t(ge, { disabled: !s, container: l, children: /* @__PURE__ */ t(M.Positioner, { children: /* @__PURE__ */ c(
|
|
707
728
|
M.Content,
|
|
708
729
|
{
|
|
709
730
|
width: "auto",
|
|
@@ -713,8 +734,8 @@ const jt = (e, n, o) => {
|
|
|
713
734
|
rounded: "sm",
|
|
714
735
|
ref: o,
|
|
715
736
|
children: [
|
|
716
|
-
|
|
717
|
-
|
|
737
|
+
r && /* @__PURE__ */ t(M.Arrow, { children: /* @__PURE__ */ t(M.ArrowTip, {}) }),
|
|
738
|
+
d
|
|
718
739
|
]
|
|
719
740
|
}
|
|
720
741
|
) }) })
|
|
@@ -722,63 +743,63 @@ const jt = (e, n, o) => {
|
|
|
722
743
|
}
|
|
723
744
|
);
|
|
724
745
|
}
|
|
725
|
-
), on =
|
|
726
|
-
const { children:
|
|
727
|
-
return /* @__PURE__ */ t(nn, { content:
|
|
728
|
-
|
|
746
|
+
), on = z.forwardRef(function(n, o) {
|
|
747
|
+
const { children: r, ...i } = n;
|
|
748
|
+
return /* @__PURE__ */ t(nn, { content: r, ...i, ref: o, children: /* @__PURE__ */ t(
|
|
749
|
+
I,
|
|
729
750
|
{
|
|
730
751
|
variant: "ghost",
|
|
731
752
|
"aria-label": "info",
|
|
732
753
|
size: "2xs",
|
|
733
754
|
colorPalette: "gray",
|
|
734
|
-
children: /* @__PURE__ */ t(
|
|
755
|
+
children: /* @__PURE__ */ t(xt, {})
|
|
735
756
|
}
|
|
736
757
|
) });
|
|
737
|
-
}), rn =
|
|
738
|
-
return /* @__PURE__ */ t(
|
|
758
|
+
}), rn = z.forwardRef(function(n, o) {
|
|
759
|
+
return /* @__PURE__ */ t(H.Track, { ...n, ref: o, children: /* @__PURE__ */ t(H.Range, {}) });
|
|
739
760
|
});
|
|
740
|
-
|
|
741
|
-
const { children:
|
|
742
|
-
return /* @__PURE__ */
|
|
743
|
-
|
|
744
|
-
|
|
761
|
+
z.forwardRef(function(n, o) {
|
|
762
|
+
const { children: r, info: i, ...s } = n;
|
|
763
|
+
return /* @__PURE__ */ c(H.Label, { ...s, ref: o, children: [
|
|
764
|
+
r,
|
|
765
|
+
i && /* @__PURE__ */ t(on, { children: i })
|
|
745
766
|
] });
|
|
746
767
|
});
|
|
747
|
-
const sn =
|
|
748
|
-
const e =
|
|
749
|
-
|
|
768
|
+
const sn = H.Root, ln = H.ValueText, fe = () => {
|
|
769
|
+
const e = $(), n = (e == null ? void 0 : e.numberOfTotalPages) === 1, o = ((e == null ? void 0 : e.beginNumberOfPagesInSpineItem) ?? 0) > 1, r = ((e == null ? void 0 : e.endNumberOfPagesInSpineItem) ?? 0) > 1, i = (e != null && e.hasChapters ? e == null ? void 0 : e.beginPageIndexInSpineItem : e == null ? void 0 : e.beginAbsolutePageIndex) ?? 0, s = (e != null && e.hasChapters ? e == null ? void 0 : e.endPageIndexInSpineItem : e == null ? void 0 : e.endAbsolutePageIndex) ?? 0, [d = 0, l = 0] = [
|
|
770
|
+
i,
|
|
750
771
|
s
|
|
751
|
-
].sort((
|
|
772
|
+
].sort((m, h) => m - h), u = (e == null ? void 0 : e.beginPageIndexInSpineItem) !== (e == null ? void 0 : e.endPageIndexInSpineItem) || (e == null ? void 0 : e.beginSpineItemIndex) !== (e == null ? void 0 : e.endSpineItemIndex), a = e != null && e.hasChapters ? e == null ? void 0 : e.beginNumberOfPagesInSpineItem : e == null ? void 0 : e.numberOfTotalPages;
|
|
752
773
|
return {
|
|
753
774
|
hasOnlyOnePage: n,
|
|
754
|
-
beginPageIndex:
|
|
775
|
+
beginPageIndex: i,
|
|
755
776
|
endPageIndex: s,
|
|
756
777
|
isBeginWithinChapter: o,
|
|
757
|
-
isEndWithinChapter:
|
|
778
|
+
isEndWithinChapter: r,
|
|
758
779
|
beginAndEndAreDifferent: u,
|
|
759
|
-
totalApproximatePages:
|
|
760
|
-
leftPageIndex:
|
|
761
|
-
rightPageIndex:
|
|
780
|
+
totalApproximatePages: a,
|
|
781
|
+
leftPageIndex: d,
|
|
782
|
+
rightPageIndex: l
|
|
762
783
|
};
|
|
763
784
|
}, an = () => {
|
|
764
|
-
const e =
|
|
785
|
+
const e = $(), {
|
|
765
786
|
hasOnlyOnePage: n,
|
|
766
787
|
leftPageIndex: o,
|
|
767
|
-
rightPageIndex:
|
|
768
|
-
totalApproximatePages:
|
|
788
|
+
rightPageIndex: r,
|
|
789
|
+
totalApproximatePages: i,
|
|
769
790
|
beginAndEndAreDifferent: s
|
|
770
|
-
} = fe(),
|
|
771
|
-
return /* @__PURE__ */
|
|
772
|
-
/* @__PURE__ */ t(sn, { value:
|
|
791
|
+
} = fe(), d = Math.round(((e == null ? void 0 : e.percentageEstimateOfBook) ?? 0) * 100), l = (a) => a != null && a.subChapter ? `${a.title} / ${l(a.subChapter)}` : (a == null ? void 0 : a.title) || "", u = l(e == null ? void 0 : e.beginChapterInfo);
|
|
792
|
+
return /* @__PURE__ */ c(R, { alignItems: "center", gap: 1, maxW: "100%", overflow: "auto", children: [
|
|
793
|
+
/* @__PURE__ */ t(sn, { value: d, size: "xs", width: 150, children: /* @__PURE__ */ c(D, { justifyContent: "space-between", children: [
|
|
773
794
|
/* @__PURE__ */ t(rn, { width: 110 }),
|
|
774
|
-
/* @__PURE__ */ t(ln, { children: `${
|
|
795
|
+
/* @__PURE__ */ t(ln, { children: `${d}%` })
|
|
775
796
|
] }) }),
|
|
776
797
|
/* @__PURE__ */ t(f, { truncate: !0, maxWidth: "100%", fontSize: "sm", mt: 1, children: u ? `Chapter: ${u}` : " " }),
|
|
777
|
-
!n && /* @__PURE__ */
|
|
778
|
-
/* @__PURE__ */ t(f, { fontSize: "xs", children: s ? `${o + 1} - ${
|
|
779
|
-
!!(e != null && e.hasChapters) && /* @__PURE__ */
|
|
798
|
+
!n && /* @__PURE__ */ c(D, { children: [
|
|
799
|
+
/* @__PURE__ */ t(f, { fontSize: "xs", children: s ? `${o + 1} - ${r + 1} of ${i}` : `${o + 1} of ${i}` }),
|
|
800
|
+
!!(e != null && e.hasChapters) && /* @__PURE__ */ c(oe, { children: [
|
|
780
801
|
/* @__PURE__ */ t(f, { children: "-" }),
|
|
781
|
-
/* @__PURE__ */
|
|
802
|
+
/* @__PURE__ */ c(f, { fontSize: "xs", children: [
|
|
782
803
|
"(",
|
|
783
804
|
((e == null ? void 0 : e.beginAbsolutePageIndex) ?? 0) + 1,
|
|
784
805
|
")"
|
|
@@ -786,13 +807,13 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
786
807
|
] })
|
|
787
808
|
] })
|
|
788
809
|
] });
|
|
789
|
-
}, De =
|
|
810
|
+
}, De = g(
|
|
790
811
|
({
|
|
791
812
|
children: e,
|
|
792
813
|
position: n,
|
|
793
814
|
...o
|
|
794
815
|
}) => /* @__PURE__ */ t(
|
|
795
|
-
|
|
816
|
+
te,
|
|
796
817
|
{
|
|
797
818
|
display: "flex",
|
|
798
819
|
flexDirection: "row",
|
|
@@ -816,8 +837,8 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
816
837
|
children: e
|
|
817
838
|
}
|
|
818
839
|
)
|
|
819
|
-
), cn = Ke(
|
|
820
|
-
|
|
840
|
+
), cn = Ke(vt), dn = g((e) => /* @__PURE__ */ t(
|
|
841
|
+
P,
|
|
821
842
|
{
|
|
822
843
|
display: "contents",
|
|
823
844
|
css: {
|
|
@@ -871,64 +892,64 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
871
892
|
)
|
|
872
893
|
}
|
|
873
894
|
)), hn = () => {
|
|
874
|
-
const e =
|
|
875
|
-
() =>
|
|
876
|
-
default:
|
|
895
|
+
const e = $(), n = e == null ? void 0 : e.isUsingSpread, { beginPageIndex: o, totalApproximatePages: r = 0 } = fe(), i = n ? Math.floor((o || 0) / 2) : o, [s, d] = Ce(
|
|
896
|
+
() => de({
|
|
897
|
+
default: i || 0
|
|
877
898
|
})
|
|
878
|
-
),
|
|
899
|
+
), l = 0, u = Math.max(
|
|
879
900
|
0,
|
|
880
|
-
n ? Math.floor((
|
|
901
|
+
n ? Math.floor((r - 1) / 2) : r - 1
|
|
881
902
|
);
|
|
882
|
-
return
|
|
883
|
-
|
|
884
|
-
}, [
|
|
903
|
+
return j(() => {
|
|
904
|
+
d.update(i || 0);
|
|
905
|
+
}, [i, d]), {
|
|
885
906
|
value: s,
|
|
886
|
-
valueSignal:
|
|
887
|
-
min:
|
|
907
|
+
valueSignal: d,
|
|
908
|
+
min: l,
|
|
888
909
|
max: u
|
|
889
910
|
};
|
|
890
911
|
}, un = (e) => {
|
|
891
|
-
const n =
|
|
912
|
+
const n = p(), o = $(), { manifest: r } = v(() => n == null ? void 0 : n.context.state$, [n]) ?? {}, i = (r == null ? void 0 : r.readingDirection) === "rtl", s = o == null ? void 0 : o.isUsingSpread, { totalApproximatePages: d = 0, isBeginWithinChapter: l } = fe(), u = 1, a = l, { value: m, valueSignal: h, min: b, max: y } = hn(), C = N(
|
|
892
913
|
(A) => {
|
|
893
914
|
const [x = 0] = Array.isArray(A) ? A : [A];
|
|
894
915
|
h.setValue(x);
|
|
895
|
-
const
|
|
896
|
-
|
|
897
|
-
pageIndex:
|
|
916
|
+
const _ = s ? Math.floor(x) * 2 : Math.floor(x);
|
|
917
|
+
a ? n == null || n.navigation.goToPageOfSpineItem({
|
|
918
|
+
pageIndex: _,
|
|
898
919
|
spineItemId: n.pagination.state.beginSpineItemIndex ?? 0,
|
|
899
920
|
animation: !1
|
|
900
921
|
}) : n == null || n.navigation.goToAbsolutePageIndex({
|
|
901
|
-
absolutePageIndex:
|
|
922
|
+
absolutePageIndex: _,
|
|
902
923
|
animation: !1
|
|
903
924
|
});
|
|
904
925
|
},
|
|
905
|
-
[n, s, h,
|
|
926
|
+
[n, s, h, a]
|
|
906
927
|
);
|
|
907
|
-
return
|
|
928
|
+
return E(
|
|
908
929
|
() => n == null ? void 0 : n.navigation.throttleLock({
|
|
909
930
|
duration: 100,
|
|
910
931
|
trigger: h.subject
|
|
911
932
|
}),
|
|
912
933
|
[n, h]
|
|
913
|
-
),
|
|
934
|
+
), d === 1 || s && d === 2 ? /* @__PURE__ */ t(P, { style: e.style }) : /* @__PURE__ */ t(
|
|
914
935
|
dn,
|
|
915
936
|
{
|
|
916
|
-
value: [
|
|
937
|
+
value: [m],
|
|
917
938
|
max: y,
|
|
918
|
-
min:
|
|
919
|
-
reverse:
|
|
939
|
+
min: b,
|
|
940
|
+
reverse: i,
|
|
920
941
|
step: u,
|
|
921
|
-
onChange:
|
|
942
|
+
onChange: C,
|
|
922
943
|
...e
|
|
923
944
|
}
|
|
924
945
|
);
|
|
925
|
-
}, gn =
|
|
946
|
+
}, gn = g(
|
|
926
947
|
({
|
|
927
948
|
open: e,
|
|
928
949
|
onItemClick: n
|
|
929
950
|
}) => {
|
|
930
|
-
const o =
|
|
931
|
-
return /* @__PURE__ */
|
|
951
|
+
const o = p(), r = v(() => o == null ? void 0 : o.navigation.state$, [o]), i = v(() => o == null ? void 0 : o.settings.values$, [o]), s = (i == null ? void 0 : i.computedPageTurnDirection) === "vertical", [d, l] = k(!0);
|
|
952
|
+
return /* @__PURE__ */ c(
|
|
932
953
|
De,
|
|
933
954
|
{
|
|
934
955
|
present: e,
|
|
@@ -938,69 +959,78 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
938
959
|
overflow: "auto",
|
|
939
960
|
pb: 8,
|
|
940
961
|
children: [
|
|
941
|
-
/* @__PURE__ */
|
|
942
|
-
|
|
943
|
-
v,
|
|
944
|
-
{
|
|
945
|
-
"aria-label": "left",
|
|
946
|
-
size: "lg",
|
|
947
|
-
variant: "ghost",
|
|
948
|
-
flexShrink: 0,
|
|
949
|
-
onClick: () => o == null ? void 0 : o.navigation.goToLeftOrTopSpineItem(),
|
|
950
|
-
disabled: !(i != null && i.canGoLeftSpineItem) && !(i != null && i.canGoTopSpineItem),
|
|
951
|
-
children: s ? /* @__PURE__ */ t(mt, {}) : /* @__PURE__ */ t(ft, {})
|
|
952
|
-
}
|
|
953
|
-
),
|
|
954
|
-
/* @__PURE__ */ a(
|
|
955
|
-
P,
|
|
956
|
-
{
|
|
957
|
-
flex: 1,
|
|
958
|
-
maxW: 400,
|
|
959
|
-
gap: 2,
|
|
960
|
-
alignItems: "center",
|
|
961
|
-
overflow: "auto",
|
|
962
|
-
px: 4,
|
|
963
|
-
children: [
|
|
964
|
-
/* @__PURE__ */ t(an, {}),
|
|
965
|
-
/* @__PURE__ */ t(
|
|
966
|
-
un,
|
|
967
|
-
{
|
|
968
|
-
style: {
|
|
969
|
-
width: "100%",
|
|
970
|
-
maxWidth: "300px",
|
|
971
|
-
height: "35px"
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
)
|
|
975
|
-
]
|
|
976
|
-
}
|
|
977
|
-
),
|
|
978
|
-
/* @__PURE__ */ t(
|
|
979
|
-
v,
|
|
980
|
-
{
|
|
981
|
-
"aria-label": "right",
|
|
982
|
-
size: "lg",
|
|
983
|
-
flexShrink: 0,
|
|
984
|
-
variant: "ghost",
|
|
985
|
-
disabled: !(i != null && i.canGoRightSpineItem) && !(i != null && i.canGoBottomSpineItem),
|
|
986
|
-
onClick: () => {
|
|
987
|
-
o == null || o.navigation.goToRightOrBottomSpineItem();
|
|
988
|
-
},
|
|
989
|
-
children: s ? /* @__PURE__ */ t(bt, {}) : /* @__PURE__ */ t(xt, {})
|
|
990
|
-
}
|
|
991
|
-
)
|
|
992
|
-
] }),
|
|
993
|
-
/* @__PURE__ */ t(z, { alignSelf: "stretch", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ a(
|
|
994
|
-
re.Root,
|
|
962
|
+
/* @__PURE__ */ c(
|
|
963
|
+
D,
|
|
995
964
|
{
|
|
996
|
-
|
|
965
|
+
flex: 1,
|
|
966
|
+
alignItems: "center",
|
|
967
|
+
justifyContent: "center",
|
|
968
|
+
maxWidth: "100%",
|
|
969
|
+
children: [
|
|
970
|
+
/* @__PURE__ */ t(
|
|
971
|
+
I,
|
|
972
|
+
{
|
|
973
|
+
"aria-label": "left",
|
|
974
|
+
size: "lg",
|
|
975
|
+
variant: "ghost",
|
|
976
|
+
flexShrink: 0,
|
|
977
|
+
onClick: () => o == null ? void 0 : o.navigation.goToLeftOrTopSpineItem(),
|
|
978
|
+
disabled: !(r != null && r.canGoLeftSpineItem) && !(r != null && r.canGoTopSpineItem),
|
|
979
|
+
children: s ? /* @__PURE__ */ t(pt, {}) : /* @__PURE__ */ t(mt, {})
|
|
980
|
+
}
|
|
981
|
+
),
|
|
982
|
+
/* @__PURE__ */ c(
|
|
983
|
+
R,
|
|
984
|
+
{
|
|
985
|
+
flex: 1,
|
|
986
|
+
maxW: 400,
|
|
987
|
+
gap: 2,
|
|
988
|
+
alignItems: "center",
|
|
989
|
+
overflow: "auto",
|
|
990
|
+
px: 4,
|
|
991
|
+
children: [
|
|
992
|
+
/* @__PURE__ */ t(an, {}),
|
|
993
|
+
/* @__PURE__ */ t(
|
|
994
|
+
un,
|
|
995
|
+
{
|
|
996
|
+
style: {
|
|
997
|
+
width: "100%",
|
|
998
|
+
maxWidth: "300px",
|
|
999
|
+
height: "35px"
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
)
|
|
1003
|
+
]
|
|
1004
|
+
}
|
|
1005
|
+
),
|
|
1006
|
+
/* @__PURE__ */ t(
|
|
1007
|
+
I,
|
|
1008
|
+
{
|
|
1009
|
+
"aria-label": "right",
|
|
1010
|
+
size: "lg",
|
|
1011
|
+
flexShrink: 0,
|
|
1012
|
+
variant: "ghost",
|
|
1013
|
+
disabled: !(r != null && r.canGoRightSpineItem) && !(r != null && r.canGoBottomSpineItem),
|
|
1014
|
+
onClick: () => {
|
|
1015
|
+
o == null || o.navigation.goToRightOrBottomSpineItem();
|
|
1016
|
+
},
|
|
1017
|
+
children: s ? /* @__PURE__ */ t(ft, {}) : /* @__PURE__ */ t(bt, {})
|
|
1018
|
+
}
|
|
1019
|
+
)
|
|
1020
|
+
]
|
|
1021
|
+
}
|
|
1022
|
+
),
|
|
1023
|
+
/* @__PURE__ */ t(D, { alignSelf: "stretch", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ c(
|
|
1024
|
+
se.Root,
|
|
1025
|
+
{
|
|
1026
|
+
open: d,
|
|
997
1027
|
flex: 1,
|
|
998
1028
|
onOpenChange: ({ open: u }) => {
|
|
999
|
-
|
|
1029
|
+
l(u);
|
|
1000
1030
|
},
|
|
1001
1031
|
children: [
|
|
1002
1032
|
/* @__PURE__ */ t(
|
|
1003
|
-
|
|
1033
|
+
se.Trigger,
|
|
1004
1034
|
{
|
|
1005
1035
|
paddingY: "3",
|
|
1006
1036
|
width: "100%",
|
|
@@ -1010,15 +1040,15 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1010
1040
|
nt,
|
|
1011
1041
|
{
|
|
1012
1042
|
style: {
|
|
1013
|
-
transform:
|
|
1043
|
+
transform: d ? "rotate(0deg)" : "rotate(180deg)"
|
|
1014
1044
|
}
|
|
1015
1045
|
}
|
|
1016
1046
|
)
|
|
1017
1047
|
}
|
|
1018
1048
|
),
|
|
1019
|
-
/* @__PURE__ */
|
|
1049
|
+
/* @__PURE__ */ c(se.Content, { display: "flex", justifyContent: "center", children: [
|
|
1020
1050
|
/* @__PURE__ */ t(
|
|
1021
|
-
|
|
1051
|
+
I,
|
|
1022
1052
|
{
|
|
1023
1053
|
"aria-label": "Help",
|
|
1024
1054
|
size: "lg",
|
|
@@ -1028,47 +1058,47 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1028
1058
|
}
|
|
1029
1059
|
),
|
|
1030
1060
|
/* @__PURE__ */ t(
|
|
1031
|
-
|
|
1061
|
+
I,
|
|
1032
1062
|
{
|
|
1033
1063
|
"aria-label": "Table of contents",
|
|
1034
1064
|
size: "lg",
|
|
1035
1065
|
variant: "ghost",
|
|
1036
1066
|
onClick: () => n("toc"),
|
|
1037
|
-
children: /* @__PURE__ */ t(
|
|
1067
|
+
children: /* @__PURE__ */ t(rt, {})
|
|
1038
1068
|
}
|
|
1039
1069
|
),
|
|
1040
|
-
|
|
1041
|
-
|
|
1070
|
+
Re(o) && /* @__PURE__ */ t(
|
|
1071
|
+
I,
|
|
1042
1072
|
{
|
|
1043
1073
|
"aria-label": "Search",
|
|
1044
1074
|
size: "lg",
|
|
1045
1075
|
variant: "ghost",
|
|
1046
1076
|
onClick: () => n("search"),
|
|
1047
|
-
children: /* @__PURE__ */ t(
|
|
1077
|
+
children: /* @__PURE__ */ t(it, {})
|
|
1048
1078
|
}
|
|
1049
1079
|
),
|
|
1050
|
-
|
|
1051
|
-
|
|
1080
|
+
W(o) && /* @__PURE__ */ t(
|
|
1081
|
+
I,
|
|
1052
1082
|
{
|
|
1053
1083
|
"aria-label": "Bookmarks",
|
|
1054
1084
|
size: "lg",
|
|
1055
1085
|
variant: "ghost",
|
|
1056
1086
|
onClick: () => n("bookmarks"),
|
|
1057
|
-
children: /* @__PURE__ */ t(
|
|
1087
|
+
children: /* @__PURE__ */ t(ut, {})
|
|
1058
1088
|
}
|
|
1059
1089
|
),
|
|
1060
|
-
|
|
1061
|
-
|
|
1090
|
+
W(o) && /* @__PURE__ */ t(
|
|
1091
|
+
I,
|
|
1062
1092
|
{
|
|
1063
1093
|
"aria-label": "Annotations",
|
|
1064
1094
|
size: "lg",
|
|
1065
1095
|
variant: "ghost",
|
|
1066
1096
|
onClick: () => n("annotations"),
|
|
1067
|
-
children: /* @__PURE__ */ t(
|
|
1097
|
+
children: /* @__PURE__ */ t(ne, {})
|
|
1068
1098
|
}
|
|
1069
1099
|
),
|
|
1070
1100
|
/* @__PURE__ */ t(
|
|
1071
|
-
|
|
1101
|
+
I,
|
|
1072
1102
|
{
|
|
1073
1103
|
"aria-label": "Thumbnails",
|
|
1074
1104
|
size: "lg",
|
|
@@ -1082,13 +1112,13 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1082
1112
|
}
|
|
1083
1113
|
),
|
|
1084
1114
|
Ae(o) && /* @__PURE__ */ t(
|
|
1085
|
-
|
|
1115
|
+
I,
|
|
1086
1116
|
{
|
|
1087
1117
|
"aria-label": "Gallery",
|
|
1088
1118
|
size: "lg",
|
|
1089
1119
|
variant: "ghost",
|
|
1090
1120
|
onClick: () => n("gallery"),
|
|
1091
|
-
children: /* @__PURE__ */ t(
|
|
1121
|
+
children: /* @__PURE__ */ t(gt, {})
|
|
1092
1122
|
}
|
|
1093
1123
|
)
|
|
1094
1124
|
] })
|
|
@@ -1100,29 +1130,29 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1100
1130
|
);
|
|
1101
1131
|
}
|
|
1102
1132
|
), pn = () => {
|
|
1103
|
-
const [e, n] =
|
|
1133
|
+
const [e, n] = k(!1), o = N(() => document.fullscreenElement ? document.exitFullscreen().catch(console.error).then(() => {
|
|
1104
1134
|
n(!1);
|
|
1105
1135
|
}) : document.documentElement.requestFullscreen({ navigationUI: "hide" }).catch(console.error).then(() => {
|
|
1106
1136
|
n(!0);
|
|
1107
1137
|
}), []);
|
|
1108
|
-
return
|
|
1109
|
-
function
|
|
1138
|
+
return j(() => {
|
|
1139
|
+
function r() {
|
|
1110
1140
|
n(!!document.fullscreenElement);
|
|
1111
1141
|
}
|
|
1112
|
-
return document.addEventListener("fullscreenchange",
|
|
1113
|
-
document.removeEventListener("fullscreenchange",
|
|
1142
|
+
return document.addEventListener("fullscreenchange", r), () => {
|
|
1143
|
+
document.removeEventListener("fullscreenchange", r);
|
|
1114
1144
|
};
|
|
1115
1145
|
}, []), {
|
|
1116
1146
|
isFullscreen: e,
|
|
1117
1147
|
onToggleFullscreenClick: o
|
|
1118
1148
|
};
|
|
1119
|
-
}, mn =
|
|
1149
|
+
}, mn = g(
|
|
1120
1150
|
({
|
|
1121
1151
|
open: e,
|
|
1122
1152
|
onItemClick: n
|
|
1123
1153
|
}) => {
|
|
1124
|
-
const o =
|
|
1125
|
-
return /* @__PURE__ */
|
|
1154
|
+
const o = p(), r = v(() => o == null ? void 0 : o.context.manifest$, [o]), { isFullscreen: i, onToggleFullscreenClick: s } = pn();
|
|
1155
|
+
return /* @__PURE__ */ c(
|
|
1126
1156
|
De,
|
|
1127
1157
|
{
|
|
1128
1158
|
present: e,
|
|
@@ -1131,18 +1161,18 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1131
1161
|
justifyContent: "space-between",
|
|
1132
1162
|
children: [
|
|
1133
1163
|
/* @__PURE__ */ t(
|
|
1134
|
-
|
|
1164
|
+
I,
|
|
1135
1165
|
{
|
|
1136
1166
|
"aria-label": "left",
|
|
1137
1167
|
size: "lg",
|
|
1138
1168
|
variant: "ghost",
|
|
1139
1169
|
flexShrink: 0,
|
|
1140
1170
|
onClick: () => n("back"),
|
|
1141
|
-
children: /* @__PURE__ */ t(
|
|
1171
|
+
children: /* @__PURE__ */ t(Ct, {})
|
|
1142
1172
|
}
|
|
1143
1173
|
),
|
|
1144
1174
|
/* @__PURE__ */ t(
|
|
1145
|
-
|
|
1175
|
+
R,
|
|
1146
1176
|
{
|
|
1147
1177
|
flex: 1,
|
|
1148
1178
|
maxW: 600,
|
|
@@ -1150,30 +1180,30 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1150
1180
|
alignItems: "center",
|
|
1151
1181
|
overflow: "auto",
|
|
1152
1182
|
px: 4,
|
|
1153
|
-
children: /* @__PURE__ */ t(f, { truncate: !0, maxWidth: "100%", children:
|
|
1183
|
+
children: /* @__PURE__ */ t(f, { truncate: !0, maxWidth: "100%", children: r == null ? void 0 : r.title })
|
|
1154
1184
|
}
|
|
1155
1185
|
),
|
|
1156
|
-
/* @__PURE__ */
|
|
1186
|
+
/* @__PURE__ */ c(D, { children: [
|
|
1157
1187
|
/* @__PURE__ */ t(
|
|
1158
|
-
|
|
1188
|
+
I,
|
|
1159
1189
|
{
|
|
1160
1190
|
"aria-label": "right",
|
|
1161
1191
|
size: "lg",
|
|
1162
1192
|
flexShrink: 0,
|
|
1163
1193
|
variant: "ghost",
|
|
1164
1194
|
onClick: () => n("more"),
|
|
1165
|
-
children: /* @__PURE__ */ t(
|
|
1195
|
+
children: /* @__PURE__ */ t(It, {})
|
|
1166
1196
|
}
|
|
1167
1197
|
),
|
|
1168
1198
|
/* @__PURE__ */ t(
|
|
1169
|
-
|
|
1199
|
+
I,
|
|
1170
1200
|
{
|
|
1171
1201
|
"aria-label": "right",
|
|
1172
1202
|
size: "lg",
|
|
1173
1203
|
flexShrink: 0,
|
|
1174
1204
|
variant: "ghost",
|
|
1175
1205
|
onClick: s,
|
|
1176
|
-
children:
|
|
1206
|
+
children: i ? /* @__PURE__ */ t(yt, {}) : /* @__PURE__ */ t(St, {})
|
|
1177
1207
|
}
|
|
1178
1208
|
)
|
|
1179
1209
|
] })
|
|
@@ -1181,26 +1211,26 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1181
1211
|
}
|
|
1182
1212
|
);
|
|
1183
1213
|
}
|
|
1184
|
-
), fn =
|
|
1214
|
+
), fn = g(
|
|
1185
1215
|
({
|
|
1186
1216
|
onItemClick: e
|
|
1187
1217
|
}) => {
|
|
1188
1218
|
const [n] = me();
|
|
1189
|
-
return /* @__PURE__ */
|
|
1219
|
+
return /* @__PURE__ */ c(oe, { children: [
|
|
1190
1220
|
/* @__PURE__ */ t(mn, { open: n, onItemClick: e }),
|
|
1191
1221
|
/* @__PURE__ */ t(gn, { open: n, onItemClick: e })
|
|
1192
1222
|
] });
|
|
1193
1223
|
}
|
|
1194
|
-
), bn =
|
|
1224
|
+
), bn = g(
|
|
1195
1225
|
({
|
|
1196
1226
|
contextText: e = "",
|
|
1197
1227
|
startOffset: n = 0,
|
|
1198
1228
|
text: o,
|
|
1199
|
-
cfi:
|
|
1200
|
-
onClick:
|
|
1229
|
+
cfi: r = "#",
|
|
1230
|
+
onClick: i,
|
|
1201
1231
|
absolutePageIndex: s
|
|
1202
1232
|
}) => {
|
|
1203
|
-
const
|
|
1233
|
+
const l = e.substring(
|
|
1204
1234
|
Math.max(n - 15, 0),
|
|
1205
1235
|
Math.max(n, 0)
|
|
1206
1236
|
), u = e.substring(
|
|
@@ -1210,22 +1240,22 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1210
1240
|
e.length - 1
|
|
1211
1241
|
)
|
|
1212
1242
|
);
|
|
1213
|
-
return /* @__PURE__ */
|
|
1214
|
-
|
|
1243
|
+
return /* @__PURE__ */ c(
|
|
1244
|
+
pe,
|
|
1215
1245
|
{
|
|
1216
|
-
href:
|
|
1246
|
+
href: r,
|
|
1217
1247
|
style: { margin: 5, overflow: "hidden" },
|
|
1218
|
-
onClick: (
|
|
1219
|
-
|
|
1248
|
+
onClick: (a) => {
|
|
1249
|
+
a.preventDefault(), i(r);
|
|
1220
1250
|
},
|
|
1221
1251
|
display: "flex",
|
|
1222
1252
|
flexDirection: "column",
|
|
1223
1253
|
alignItems: "flex-start",
|
|
1224
1254
|
gap: 0,
|
|
1225
1255
|
children: [
|
|
1226
|
-
/* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ c(f, { lineClamp: 1, as: "cite", style: { display: "block" }, children: [
|
|
1227
1257
|
'"',
|
|
1228
|
-
|
|
1258
|
+
l,
|
|
1229
1259
|
/* @__PURE__ */ t("b", { children: o }),
|
|
1230
1260
|
u,
|
|
1231
1261
|
'"'
|
|
@@ -1235,30 +1265,30 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1235
1265
|
}
|
|
1236
1266
|
);
|
|
1237
1267
|
}
|
|
1238
|
-
), xn =
|
|
1268
|
+
), xn = g(
|
|
1239
1269
|
({
|
|
1240
1270
|
onNavigate: e
|
|
1241
1271
|
}) => {
|
|
1242
|
-
const [n, o] =
|
|
1272
|
+
const [n, o] = k(""), r = p(), i = Re(r) ? r : void 0, s = (h) => {
|
|
1243
1273
|
o(h.target.value);
|
|
1244
|
-
},
|
|
1274
|
+
}, d = N(
|
|
1245
1275
|
(h) => {
|
|
1246
|
-
e(),
|
|
1276
|
+
e(), r == null || r.navigation.goToCfi(h);
|
|
1247
1277
|
},
|
|
1248
|
-
[
|
|
1249
|
-
),
|
|
1250
|
-
() =>
|
|
1278
|
+
[r, e]
|
|
1279
|
+
), l = v(
|
|
1280
|
+
() => i == null ? void 0 : i.search.search(n).pipe(
|
|
1251
1281
|
L((h) => ({ type: "end", data: h })),
|
|
1252
1282
|
ye({ type: "start" })
|
|
1253
1283
|
),
|
|
1254
|
-
[
|
|
1255
|
-
), u = (
|
|
1256
|
-
() =>
|
|
1257
|
-
[
|
|
1284
|
+
[r, n]
|
|
1285
|
+
), u = (l == null ? void 0 : l.type) === "start", a = (l == null ? void 0 : l.type) === "end" ? l.data : [], m = v(
|
|
1286
|
+
() => r == null ? void 0 : r.locateResource(a.slice(0, 100)),
|
|
1287
|
+
[a]
|
|
1258
1288
|
);
|
|
1259
|
-
return /* @__PURE__ */
|
|
1260
|
-
/* @__PURE__ */ t(
|
|
1261
|
-
|
|
1289
|
+
return /* @__PURE__ */ c(R, { flex: 1, height: "100%", children: [
|
|
1290
|
+
/* @__PURE__ */ t(P, { px: 4, children: /* @__PURE__ */ t(
|
|
1291
|
+
Ze,
|
|
1262
1292
|
{
|
|
1263
1293
|
placeholder: "Type something...",
|
|
1264
1294
|
value: n,
|
|
@@ -1266,8 +1296,8 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1266
1296
|
borderRadius: 0
|
|
1267
1297
|
}
|
|
1268
1298
|
) }),
|
|
1269
|
-
/* @__PURE__ */
|
|
1270
|
-
|
|
1299
|
+
/* @__PURE__ */ c(
|
|
1300
|
+
P,
|
|
1271
1301
|
{
|
|
1272
1302
|
px: 4,
|
|
1273
1303
|
pb: 4,
|
|
@@ -1276,26 +1306,26 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1276
1306
|
style: { overflow: "hidden", overflowY: "auto" },
|
|
1277
1307
|
children: [
|
|
1278
1308
|
u && /* @__PURE__ */ t(f, { children: "Searching ..." }),
|
|
1279
|
-
!u &&
|
|
1280
|
-
!u &&
|
|
1281
|
-
/* @__PURE__ */
|
|
1282
|
-
|
|
1309
|
+
!u && a.length === 0 && /* @__PURE__ */ t("p", { children: "There are no results" }),
|
|
1310
|
+
!u && a.length >= 0 && /* @__PURE__ */ c(R, { children: [
|
|
1311
|
+
/* @__PURE__ */ c(le, { as: "h2", size: "md", children: [
|
|
1312
|
+
a.length,
|
|
1283
1313
|
" result(s)"
|
|
1284
1314
|
] }),
|
|
1285
|
-
/* @__PURE__ */ t(
|
|
1286
|
-
var y,
|
|
1315
|
+
/* @__PURE__ */ t(R, { gap: 0, children: m == null ? void 0 : m.map((h, b) => {
|
|
1316
|
+
var y, C, T, A, x, _, be;
|
|
1287
1317
|
return /* @__PURE__ */ t(
|
|
1288
1318
|
bn,
|
|
1289
1319
|
{
|
|
1290
|
-
contextText: ((
|
|
1320
|
+
contextText: ((T = (C = (y = h.meta) == null ? void 0 : y.range) == null ? void 0 : C.startContainer.parentElement) == null ? void 0 : T.textContent) ?? "",
|
|
1291
1321
|
pageIndex: (A = h.meta) == null ? void 0 : A.itemPageIndex,
|
|
1292
|
-
startOffset: ((
|
|
1322
|
+
startOffset: ((_ = (x = h.meta) == null ? void 0 : x.range) == null ? void 0 : _.startOffset) ?? 0,
|
|
1293
1323
|
text: n,
|
|
1294
1324
|
cfi: h.meta.cfi,
|
|
1295
|
-
onClick:
|
|
1325
|
+
onClick: d,
|
|
1296
1326
|
absolutePageIndex: (be = h.meta) == null ? void 0 : be.absolutePageIndex
|
|
1297
1327
|
},
|
|
1298
|
-
|
|
1328
|
+
b
|
|
1299
1329
|
);
|
|
1300
1330
|
}) })
|
|
1301
1331
|
] })
|
|
@@ -1304,60 +1334,60 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1304
1334
|
)
|
|
1305
1335
|
] });
|
|
1306
1336
|
}
|
|
1307
|
-
), vn =
|
|
1337
|
+
), vn = g(
|
|
1308
1338
|
({
|
|
1309
1339
|
open: e,
|
|
1310
1340
|
setOpen: n,
|
|
1311
1341
|
onNavigate: o
|
|
1312
1342
|
}) => /* @__PURE__ */ t(
|
|
1313
|
-
|
|
1343
|
+
U,
|
|
1314
1344
|
{
|
|
1315
1345
|
lazyMount: !0,
|
|
1316
1346
|
placement: "center",
|
|
1317
1347
|
open: e,
|
|
1318
|
-
onOpenChange: (
|
|
1348
|
+
onOpenChange: (r) => n(r.open),
|
|
1319
1349
|
size: { mdDown: "full", md: "lg" },
|
|
1320
1350
|
scrollBehavior: "inside",
|
|
1321
|
-
children: /* @__PURE__ */
|
|
1322
|
-
/* @__PURE__ */ t(
|
|
1323
|
-
/* @__PURE__ */ t(
|
|
1324
|
-
/* @__PURE__ */ t(
|
|
1325
|
-
/* @__PURE__ */ t(
|
|
1351
|
+
children: /* @__PURE__ */ c(V, { height: "100%", children: [
|
|
1352
|
+
/* @__PURE__ */ t(Q, { children: /* @__PURE__ */ t(Z, { children: "Search" }) }),
|
|
1353
|
+
/* @__PURE__ */ t(K, { flex: 1, children: /* @__PURE__ */ t(xn, { onNavigate: o }) }),
|
|
1354
|
+
/* @__PURE__ */ t(q, { children: /* @__PURE__ */ t(X, { asChild: !0, children: /* @__PURE__ */ t(G, { variant: "outline", children: "Cancel" }) }) }),
|
|
1355
|
+
/* @__PURE__ */ t(Y, {})
|
|
1326
1356
|
] })
|
|
1327
1357
|
}
|
|
1328
1358
|
)
|
|
1329
|
-
), Cn =
|
|
1359
|
+
), Cn = g(
|
|
1330
1360
|
({
|
|
1331
1361
|
onNavigate: e
|
|
1332
1362
|
}) => {
|
|
1333
|
-
const n =
|
|
1334
|
-
|
|
1335
|
-
const { beginSpineItemIndex:
|
|
1336
|
-
let
|
|
1337
|
-
for (;
|
|
1338
|
-
|
|
1339
|
-
const
|
|
1363
|
+
const n = p(), { manifest: o, assumedRenditionLayout: r } = v(() => n == null ? void 0 : n.context.state$, [n]) ?? {}, { nav: i } = o ?? {}, s = $();
|
|
1364
|
+
i != null && i.toc;
|
|
1365
|
+
const { beginSpineItemIndex: d, beginPageIndexInSpineItem: l } = s ?? {}, u = (r === "reflowable" ? l : d) || 0;
|
|
1366
|
+
let a = s == null ? void 0 : s.beginChapterInfo;
|
|
1367
|
+
for (; a != null && a.subChapter; )
|
|
1368
|
+
a = a == null ? void 0 : a.subChapter;
|
|
1369
|
+
const m = (h, b, y) => /* @__PURE__ */ c(ze.Fragment, { children: [
|
|
1340
1370
|
/* @__PURE__ */ t(
|
|
1341
|
-
|
|
1371
|
+
w.Item,
|
|
1342
1372
|
{
|
|
1343
1373
|
pl: 4 * (y + 1),
|
|
1344
1374
|
style: {
|
|
1345
1375
|
display: "flex",
|
|
1346
1376
|
alignItems: "center"
|
|
1347
1377
|
},
|
|
1348
|
-
children: /* @__PURE__ */
|
|
1349
|
-
|
|
1378
|
+
children: /* @__PURE__ */ c(
|
|
1379
|
+
pe,
|
|
1350
1380
|
{
|
|
1351
1381
|
onClick: () => {
|
|
1352
1382
|
e(), n == null || n.navigation.goToUrl(h.href);
|
|
1353
1383
|
},
|
|
1354
1384
|
href: "#",
|
|
1355
1385
|
children: [
|
|
1356
|
-
(
|
|
1357
|
-
(
|
|
1358
|
-
/* @__PURE__ */
|
|
1386
|
+
(a == null ? void 0 : a.path) === h.path && /* @__PURE__ */ t(w.Indicator, { asChild: !0, children: /* @__PURE__ */ t(ve, {}) }),
|
|
1387
|
+
(a == null ? void 0 : a.path) !== h.path && /* @__PURE__ */ t(w.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ t(ve, {}) }),
|
|
1388
|
+
/* @__PURE__ */ c(R, { gap: 0, children: [
|
|
1359
1389
|
/* @__PURE__ */ t(f, { fontSize: "md", children: h.title || h.path }),
|
|
1360
|
-
(
|
|
1390
|
+
(a == null ? void 0 : a.path) === h.path && /* @__PURE__ */ t(
|
|
1361
1391
|
f,
|
|
1362
1392
|
{
|
|
1363
1393
|
fontStyle: "italic",
|
|
@@ -1372,50 +1402,50 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1372
1402
|
)
|
|
1373
1403
|
}
|
|
1374
1404
|
),
|
|
1375
|
-
h.contents.length > 0 && /* @__PURE__ */ t(
|
|
1376
|
-
(
|
|
1405
|
+
h.contents.length > 0 && /* @__PURE__ */ t(w.Root, { as: "div", gap: 2, children: h.contents.map(
|
|
1406
|
+
(C, T) => m(C, T, y + 1)
|
|
1377
1407
|
) })
|
|
1378
|
-
] },
|
|
1379
|
-
return /* @__PURE__ */ t(
|
|
1408
|
+
] }, b);
|
|
1409
|
+
return /* @__PURE__ */ t(w.Root, { gap: 3, overflowY: "auto", py: 4, flex: 1, children: i == null ? void 0 : i.toc.map((h, b) => m(h, b, 0)) });
|
|
1380
1410
|
}
|
|
1381
|
-
),
|
|
1411
|
+
), In = g(
|
|
1382
1412
|
({
|
|
1383
1413
|
open: e,
|
|
1384
1414
|
setOpen: n,
|
|
1385
1415
|
onNavigate: o
|
|
1386
1416
|
}) => /* @__PURE__ */ t(
|
|
1387
|
-
|
|
1417
|
+
U,
|
|
1388
1418
|
{
|
|
1389
1419
|
lazyMount: !0,
|
|
1390
1420
|
placement: "center",
|
|
1391
1421
|
open: e,
|
|
1392
|
-
onOpenChange: (
|
|
1422
|
+
onOpenChange: (r) => n(r.open),
|
|
1393
1423
|
size: { mdDown: "full", md: "lg" },
|
|
1394
1424
|
scrollBehavior: "inside",
|
|
1395
|
-
children: /* @__PURE__ */
|
|
1396
|
-
/* @__PURE__ */ t(
|
|
1397
|
-
/* @__PURE__ */ t(
|
|
1398
|
-
/* @__PURE__ */ t(
|
|
1399
|
-
/* @__PURE__ */ t(
|
|
1425
|
+
children: /* @__PURE__ */ c(V, { children: [
|
|
1426
|
+
/* @__PURE__ */ t(Q, { children: /* @__PURE__ */ t(Z, { children: "Table of Contents" }) }),
|
|
1427
|
+
/* @__PURE__ */ t(K, { overflowY: "auto", flex: 1, children: /* @__PURE__ */ t(Cn, { onNavigate: o }) }),
|
|
1428
|
+
/* @__PURE__ */ t(q, { children: /* @__PURE__ */ t(X, { asChild: !0, children: /* @__PURE__ */ t(G, { variant: "outline", children: "Cancel" }) }) }),
|
|
1429
|
+
/* @__PURE__ */ t(Y, {})
|
|
1400
1430
|
] })
|
|
1401
1431
|
}
|
|
1402
1432
|
)
|
|
1403
|
-
),
|
|
1433
|
+
), Fn = ({
|
|
1404
1434
|
enableFloatingTime: e = !0,
|
|
1405
1435
|
enableFloatingProgress: n = !0,
|
|
1406
1436
|
onItemClick: o
|
|
1407
1437
|
}) => {
|
|
1408
|
-
const [
|
|
1409
|
-
|
|
1410
|
-
}, [
|
|
1438
|
+
const [r, i] = k(!1), [s, d] = k(!1), [l, u] = k(!1), [a, m] = k(void 0), [h, b] = k(!1), [y, C] = me(), T = N(() => {
|
|
1439
|
+
i(!1), d(!1), u(!1), m(void 0), C(!1), b(!1);
|
|
1440
|
+
}, [C]), A = N(
|
|
1411
1441
|
(x) => {
|
|
1412
|
-
x === "annotations" ?
|
|
1442
|
+
x === "annotations" ? m("annotations") : x === "search" ? u(!0) : x === "help" ? d(!0) : x === "toc" ? i(!0) : x === "bookmarks" ? m("bookmarks") : x === "gallery" && b(!0), o == null || o(x);
|
|
1413
1443
|
},
|
|
1414
1444
|
[o]
|
|
1415
1445
|
);
|
|
1416
|
-
return
|
|
1446
|
+
return Xt(), tn(), _t(), /* @__PURE__ */ c(oe, { children: [
|
|
1417
1447
|
n && /* @__PURE__ */ t(
|
|
1418
|
-
|
|
1448
|
+
te,
|
|
1419
1449
|
{
|
|
1420
1450
|
present: !y,
|
|
1421
1451
|
animationName: { _open: "fade-in", _closed: "fade-out" },
|
|
@@ -1423,50 +1453,50 @@ const sn = F.Root, ln = F.ValueText, fe = () => {
|
|
|
1423
1453
|
children: /* @__PURE__ */ t(qt, {})
|
|
1424
1454
|
}
|
|
1425
1455
|
),
|
|
1426
|
-
/* @__PURE__ */ t(Gt, { open: h, setOpen:
|
|
1456
|
+
/* @__PURE__ */ t(Gt, { open: h, setOpen: b }),
|
|
1427
1457
|
/* @__PURE__ */ t(fn, { onItemClick: A }),
|
|
1428
|
-
/* @__PURE__ */ t(
|
|
1429
|
-
/* @__PURE__ */ t(Ut, { open: s, setOpen:
|
|
1458
|
+
/* @__PURE__ */ t(Lt, {}),
|
|
1459
|
+
/* @__PURE__ */ t(Ut, { open: s, setOpen: d }),
|
|
1430
1460
|
/* @__PURE__ */ t(
|
|
1431
|
-
|
|
1461
|
+
In,
|
|
1432
1462
|
{
|
|
1433
|
-
open:
|
|
1434
|
-
setOpen:
|
|
1435
|
-
onNavigate:
|
|
1463
|
+
open: r,
|
|
1464
|
+
setOpen: i,
|
|
1465
|
+
onNavigate: T
|
|
1436
1466
|
}
|
|
1437
1467
|
),
|
|
1438
1468
|
/* @__PURE__ */ t(
|
|
1439
1469
|
vn,
|
|
1440
1470
|
{
|
|
1441
|
-
open:
|
|
1471
|
+
open: l,
|
|
1442
1472
|
setOpen: u,
|
|
1443
|
-
onNavigate:
|
|
1473
|
+
onNavigate: T
|
|
1444
1474
|
}
|
|
1445
1475
|
),
|
|
1446
1476
|
/* @__PURE__ */ t(
|
|
1447
|
-
|
|
1477
|
+
Ot,
|
|
1448
1478
|
{
|
|
1449
|
-
openWith:
|
|
1450
|
-
setOpen: (x) =>
|
|
1451
|
-
onNavigate:
|
|
1479
|
+
openWith: a,
|
|
1480
|
+
setOpen: (x) => m(x ? "annotations" : void 0),
|
|
1481
|
+
onNavigate: T
|
|
1452
1482
|
}
|
|
1453
1483
|
),
|
|
1454
1484
|
/* @__PURE__ */ t(
|
|
1455
|
-
|
|
1485
|
+
te,
|
|
1456
1486
|
{
|
|
1457
1487
|
present: e || y,
|
|
1458
1488
|
animationName: { _open: "fade-in", _closed: "fade-out" },
|
|
1459
1489
|
animationDuration: "slow",
|
|
1460
1490
|
overflow: "hidden",
|
|
1461
|
-
children: /* @__PURE__ */ t(
|
|
1491
|
+
children: /* @__PURE__ */ t(Zt, {})
|
|
1462
1492
|
}
|
|
1463
1493
|
),
|
|
1464
1494
|
/* @__PURE__ */ t(Nt, {})
|
|
1465
1495
|
] });
|
|
1466
1496
|
};
|
|
1467
1497
|
export {
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1498
|
+
Bt as BOOKMARK_AREA_DATA_ATTRIBUTE,
|
|
1499
|
+
Fn as ReactReader,
|
|
1500
|
+
Nn as ReactReaderProvider
|
|
1471
1501
|
};
|
|
1472
1502
|
//# sourceMappingURL=index.js.map
|