@prose-reader/react-reader 1.266.0 → 1.268.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/useReaderWithAnnotations.d.ts +8 -16
- package/dist/context/useReader.d.ts +8 -16
- package/dist/index.js +527 -509
- 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/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as e, jsxs as s, Fragment as
|
|
2
|
-
import { IconButton as
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { LuX as
|
|
6
|
-
import { signal as ne, useObserve as
|
|
7
|
-
import { Subject as
|
|
8
|
-
import { createPortal as
|
|
9
|
-
import { isPositionInArea as
|
|
10
|
-
import { isShallowEqual as
|
|
11
|
-
import { isShallowEqual as
|
|
12
|
-
import { BiFontSize as
|
|
13
|
-
import { BsBookmarks as
|
|
14
|
-
import { MdOutlineFitScreen as
|
|
15
|
-
import { RiGalleryView2 as
|
|
16
|
-
import { RxDoubleArrowUp as
|
|
17
|
-
import { HiOutlineInformationCircle as
|
|
18
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as ce } from "react/jsx-runtime";
|
|
2
|
+
import { IconButton as k, Portal as Ce, Dialog as T, List as B, Link as ve, Stack as O, Text as b, Tabs as P, Button as W, Presence as de, Box as _, createToaster as Je, Toaster as en, Toast as J, Spinner as nn, RadioGroup as re, Slider as M, HStack as F, For as tn, Fieldset as N, Heading as fe, Kbd as Me, Popover as ee, Progress as ae, chakra as on, Collapsible as me, Field as oe, Input as rn } from "@chakra-ui/react";
|
|
3
|
+
import * as A from "react";
|
|
4
|
+
import an, { createContext as ln, useContext as Be, memo as g, useState as w, useEffect as $, useCallback as z, useMemo as sn, useLayoutEffect as cn, useRef as dn } from "react";
|
|
5
|
+
import { LuX as un, LuNotebookPen as he, LuBookmark as hn, LuCheck as pn, LuArrowBigRight as gn, LuArrowBigLeft as fn, LuChevronDown as mn, LuCircleHelp as bn, LuTableOfContents as Sn, LuSearch as Cn, LuZoomOut as vn, LuZoomIn as xn, LuGalleryHorizontal as kn, LuCircleCheck as we } from "react-icons/lu";
|
|
6
|
+
import { signal as ne, useObserve as S, isDefined as Fe, useSubscribe as H, useConstant as ue, useSignalValue as be, useMemoCompare as In, useLiveRef as On, useSignalState as Rn } from "reactjrx";
|
|
7
|
+
import { Subject as zn, map as E, filter as le, switchMap as V, EMPTY as ye, of as pe, withLatestFrom as xe, NEVER as ke, startWith as Tn, distinctUntilChanged as _e, throttleTime as De, tap as Le, first as $e, combineLatest as Mn, mergeMap as wn, Observable as yn, skip as Pn, merge as Ne, timer as Ve, finalize as En, BehaviorSubject as An, animationFrameScheduler as Bn } from "rxjs";
|
|
8
|
+
import { createPortal as Fn } from "react-dom";
|
|
9
|
+
import { isPositionInArea as _n } from "@prose-reader/enhancer-gestures";
|
|
10
|
+
import { isShallowEqual as Dn } from "@prose-reader/shared";
|
|
11
|
+
import { isShallowEqual as Ln, observeIntersection as $n, isHtmlTagElement as Nn } from "@prose-reader/core";
|
|
12
|
+
import { BiFontSize as Vn } from "react-icons/bi";
|
|
13
|
+
import { BsBookmarks as Wn } from "react-icons/bs";
|
|
14
|
+
import { MdOutlineFitScreen as Hn, MdFullscreenExit as Gn, MdFullscreen as qn } from "react-icons/md";
|
|
15
|
+
import { RiGalleryView2 as jn } from "react-icons/ri";
|
|
16
|
+
import { RxDoubleArrowUp as Un, RxDoubleArrowLeft as Qn, RxDoubleArrowDown as Yn, RxDoubleArrowRight as Zn } from "react-icons/rx";
|
|
17
|
+
import { HiOutlineInformationCircle as Xn } from "react-icons/hi";
|
|
18
|
+
import Kn from "rc-slider";
|
|
19
19
|
import "rc-slider/assets/index.css";
|
|
20
|
-
import { IoIosArrowBack as
|
|
21
|
-
const
|
|
22
|
-
return /* @__PURE__ */ e(
|
|
23
|
-
}), G =
|
|
20
|
+
import { IoIosArrowBack as Jn, IoMdMore as et } from "react-icons/io";
|
|
21
|
+
const nt = "data-bookmark-area", We = 5, tt = A.forwardRef(function(t, o) {
|
|
22
|
+
return /* @__PURE__ */ e(k, { variant: "ghost", "aria-label": "Close", ref: o, ...t, children: t.children ?? /* @__PURE__ */ e(un, {}) });
|
|
23
|
+
}), G = A.forwardRef(function(t, o) {
|
|
24
24
|
const {
|
|
25
25
|
children: r,
|
|
26
26
|
portalled: i = !0,
|
|
@@ -28,35 +28,35 @@ const tt = "data-bookmark-area", He = 5, ot = E.forwardRef(function(t, o) {
|
|
|
28
28
|
backdrop: l = !0,
|
|
29
29
|
...c
|
|
30
30
|
} = t;
|
|
31
|
-
return /* @__PURE__ */ s(
|
|
32
|
-
l && /* @__PURE__ */ e(
|
|
33
|
-
/* @__PURE__ */ e(
|
|
31
|
+
return /* @__PURE__ */ s(Ce, { disabled: !i, container: a, children: [
|
|
32
|
+
l && /* @__PURE__ */ e(T.Backdrop, {}),
|
|
33
|
+
/* @__PURE__ */ e(T.Positioner, { children: /* @__PURE__ */ e(T.Content, { ref: o, ...c, asChild: !1, children: r }) })
|
|
34
34
|
] });
|
|
35
|
-
}), q =
|
|
35
|
+
}), q = A.forwardRef(function(t, o) {
|
|
36
36
|
return /* @__PURE__ */ e(
|
|
37
|
-
|
|
37
|
+
T.CloseTrigger,
|
|
38
38
|
{
|
|
39
39
|
position: "absolute",
|
|
40
40
|
top: "2",
|
|
41
41
|
insetEnd: "2",
|
|
42
42
|
...t,
|
|
43
43
|
asChild: !0,
|
|
44
|
-
children: /* @__PURE__ */ e(
|
|
44
|
+
children: /* @__PURE__ */ e(tt, { size: "sm", ref: o, children: t.children })
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
-
}), j =
|
|
48
|
-
|
|
49
|
-
const Z =
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const X =
|
|
47
|
+
}), j = T.Root, U = T.Footer, Q = T.Header, Y = T.Body;
|
|
48
|
+
T.Backdrop;
|
|
49
|
+
const Z = T.Title;
|
|
50
|
+
T.Description;
|
|
51
|
+
T.Trigger;
|
|
52
|
+
const X = T.ActionTrigger, He = () => ({
|
|
53
53
|
_quickMenuOpen: !1,
|
|
54
54
|
_onQuickMenuOpenChange: (n) => n,
|
|
55
55
|
reader: void 0,
|
|
56
56
|
quickMenuBottomBarBoundingBoxSignal: ne({
|
|
57
57
|
default: void 0
|
|
58
58
|
}),
|
|
59
|
-
notificationsSubject: new
|
|
59
|
+
notificationsSubject: new zn(),
|
|
60
60
|
refitMenuOpen: !1,
|
|
61
61
|
onRefitMenuOpenChange: () => {
|
|
62
62
|
},
|
|
@@ -65,33 +65,34 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
65
65
|
},
|
|
66
66
|
fontSizeMin: 0.2,
|
|
67
67
|
fontSizeMax: 5,
|
|
68
|
-
uncontrolledFontSize: 1
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
68
|
+
uncontrolledFontSize: 1,
|
|
69
|
+
enableFloatingProgress: !0
|
|
70
|
+
}), Ie = ln(
|
|
71
|
+
ne({ default: He() })
|
|
72
|
+
), y = (n) => {
|
|
73
|
+
const t = Be(Ie);
|
|
74
|
+
return S(t, n);
|
|
75
|
+
}, Ge = () => Be(Ie), m = () => {
|
|
76
|
+
const { reader: n } = y(["reader"]);
|
|
76
77
|
return n;
|
|
77
|
-
},
|
|
78
|
-
const t =
|
|
79
|
-
return { data:
|
|
78
|
+
}, qe = (n) => !!n && "__PROSE_READER_ENHANCER_SEARCH" in n, se = (n) => !!n && "__PROSE_READER_ENHANCER_ANNOTATIONS" in n, je = (n) => !!n && "__PROSE_READER_ENHANCER_GALLERY" in n, Ue = (n) => !!n && "__PROSE_READER_ENHANCER_REFIT" in n, ot = (n) => {
|
|
79
|
+
const t = m(), o = se(t) ? t : void 0;
|
|
80
|
+
return { data: S(
|
|
80
81
|
() => o?.annotations.annotations$.pipe(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
E((i) => i.find((a) => a.id === n)),
|
|
83
|
+
le(Fe),
|
|
84
|
+
V((i) => o.locateResource(i))
|
|
84
85
|
),
|
|
85
86
|
[o]
|
|
86
87
|
) };
|
|
87
|
-
},
|
|
88
|
+
}, Qe = ({
|
|
88
89
|
id: n,
|
|
89
90
|
onNavigate: t,
|
|
90
91
|
allowLeftIcon: o = !0
|
|
91
92
|
}) => {
|
|
92
|
-
const r =
|
|
93
|
+
const r = m(), { data: i } = ot(n), a = i?.meta.range?.toString() || i?.meta.node?.textContent;
|
|
93
94
|
return /* @__PURE__ */ e(B.Item, { children: /* @__PURE__ */ s(
|
|
94
|
-
|
|
95
|
+
ve,
|
|
95
96
|
{
|
|
96
97
|
href: "#",
|
|
97
98
|
onClick: () => {
|
|
@@ -99,13 +100,13 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
99
100
|
},
|
|
100
101
|
children: [
|
|
101
102
|
i?.resource?.notes ? /* @__PURE__ */ e(B.Indicator, { asChild: !0, children: /* @__PURE__ */ e(he, {}) }) : o ? /* @__PURE__ */ e(B.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ e(he, {}) }) : null,
|
|
102
|
-
/* @__PURE__ */ s(
|
|
103
|
-
a ? /* @__PURE__ */ e(
|
|
103
|
+
/* @__PURE__ */ s(O, { gap: 0, children: [
|
|
104
|
+
a ? /* @__PURE__ */ e(b, { lineClamp: 2, fontSize: "md", children: a }) : /* @__PURE__ */ s(b, { lineClamp: 2, fontSize: "md", fontStyle: "italic", children: [
|
|
104
105
|
"Page ",
|
|
105
106
|
(i?.meta.absolutePageIndex ?? 0) + 1
|
|
106
107
|
] }),
|
|
107
108
|
/* @__PURE__ */ e(
|
|
108
|
-
|
|
109
|
+
b,
|
|
109
110
|
{
|
|
110
111
|
fontStyle: "italic",
|
|
111
112
|
fontWeight: "bold",
|
|
@@ -117,42 +118,42 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
117
118
|
]
|
|
118
119
|
}
|
|
119
120
|
) });
|
|
120
|
-
},
|
|
121
|
-
const n =
|
|
122
|
-
return { data:
|
|
121
|
+
}, ge = () => {
|
|
122
|
+
const n = m(), t = se(n) ? n : void 0;
|
|
123
|
+
return { data: S(
|
|
123
124
|
() => t?.annotations.annotations$.pipe(
|
|
124
|
-
|
|
125
|
+
V(
|
|
125
126
|
(r) => t.locateResource(r)
|
|
126
127
|
)
|
|
127
128
|
),
|
|
128
129
|
[t]
|
|
129
130
|
) };
|
|
130
|
-
},
|
|
131
|
-
const { data: n } =
|
|
131
|
+
}, rt = () => {
|
|
132
|
+
const { data: n } = ge();
|
|
132
133
|
return {
|
|
133
134
|
data: n?.filter((t) => t.meta.isCfiRange)
|
|
134
135
|
};
|
|
135
|
-
},
|
|
136
|
-
const { data: t } =
|
|
136
|
+
}, it = ({ onNavigate: n }) => {
|
|
137
|
+
const { data: t } = rt();
|
|
137
138
|
return /* @__PURE__ */ e(B.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: t?.map((o) => /* @__PURE__ */ e(
|
|
138
|
-
|
|
139
|
+
Qe,
|
|
139
140
|
{
|
|
140
141
|
id: o.resource.id,
|
|
141
142
|
onNavigate: n
|
|
142
143
|
},
|
|
143
144
|
o.resource.id
|
|
144
145
|
)) });
|
|
145
|
-
},
|
|
146
|
-
const { data: n } =
|
|
146
|
+
}, at = () => {
|
|
147
|
+
const { data: n } = ge();
|
|
147
148
|
return {
|
|
148
149
|
data: n?.filter(
|
|
149
150
|
(t) => !t.meta.isCfiRange && !t.resource.notes
|
|
150
151
|
)
|
|
151
152
|
};
|
|
152
|
-
},
|
|
153
|
-
const { data: t } =
|
|
153
|
+
}, lt = ({ onNavigate: n }) => {
|
|
154
|
+
const { data: t } = at();
|
|
154
155
|
return /* @__PURE__ */ e(B.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: t?.map((o) => /* @__PURE__ */ e(
|
|
155
|
-
|
|
156
|
+
Qe,
|
|
156
157
|
{
|
|
157
158
|
id: o.resource.id,
|
|
158
159
|
onNavigate: n,
|
|
@@ -160,36 +161,36 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
160
161
|
},
|
|
161
162
|
o.resource.id
|
|
162
163
|
)) });
|
|
163
|
-
},
|
|
164
|
+
}, st = g(
|
|
164
165
|
({
|
|
165
166
|
onNavigate: n,
|
|
166
167
|
defaultTab: t
|
|
167
168
|
}) => {
|
|
168
|
-
const [o, r] =
|
|
169
|
+
const [o, r] = w(t ?? "bookmarks");
|
|
169
170
|
return /* @__PURE__ */ s(
|
|
170
|
-
|
|
171
|
+
P.Root,
|
|
171
172
|
{
|
|
172
173
|
value: o,
|
|
173
174
|
onValueChange: (i) => r(i.value),
|
|
174
175
|
children: [
|
|
175
|
-
/* @__PURE__ */ s(
|
|
176
|
-
/* @__PURE__ */ s(
|
|
177
|
-
/* @__PURE__ */ e(
|
|
176
|
+
/* @__PURE__ */ s(P.List, { children: [
|
|
177
|
+
/* @__PURE__ */ s(P.Trigger, { value: "bookmarks", children: [
|
|
178
|
+
/* @__PURE__ */ e(hn, {}),
|
|
178
179
|
"Bookmarks"
|
|
179
180
|
] }),
|
|
180
|
-
/* @__PURE__ */ s(
|
|
181
|
+
/* @__PURE__ */ s(P.Trigger, { value: "annotations", children: [
|
|
181
182
|
/* @__PURE__ */ e(he, {}),
|
|
182
183
|
"Annotations"
|
|
183
184
|
] }),
|
|
184
|
-
/* @__PURE__ */ e(
|
|
185
|
+
/* @__PURE__ */ e(P.Indicator, {})
|
|
185
186
|
] }),
|
|
186
|
-
/* @__PURE__ */ e(
|
|
187
|
-
/* @__PURE__ */ e(
|
|
187
|
+
/* @__PURE__ */ e(P.Content, { value: "bookmarks", children: /* @__PURE__ */ e(lt, { onNavigate: n }) }),
|
|
188
|
+
/* @__PURE__ */ e(P.Content, { value: "annotations", children: /* @__PURE__ */ e(it, { onNavigate: n }) })
|
|
188
189
|
]
|
|
189
190
|
}
|
|
190
191
|
);
|
|
191
192
|
}
|
|
192
|
-
),
|
|
193
|
+
), ct = g(
|
|
193
194
|
({
|
|
194
195
|
openWith: n,
|
|
195
196
|
setOpen: t,
|
|
@@ -206,7 +207,7 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
206
207
|
children: /* @__PURE__ */ s(G, { height: "100%", children: [
|
|
207
208
|
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(Z, { children: "Annotations" }) }),
|
|
208
209
|
/* @__PURE__ */ e(Y, { flex: 1, children: /* @__PURE__ */ e(
|
|
209
|
-
|
|
210
|
+
st,
|
|
210
211
|
{
|
|
211
212
|
onNavigate: o,
|
|
212
213
|
defaultTab: n
|
|
@@ -217,44 +218,44 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
217
218
|
] })
|
|
218
219
|
}
|
|
219
220
|
)
|
|
220
|
-
),
|
|
221
|
-
const t =
|
|
222
|
-
return o ? /* @__PURE__ */ e(
|
|
223
|
-
}),
|
|
221
|
+
), dt = g(({ children: n }) => {
|
|
222
|
+
const t = m(), o = S(() => t?.spine.element$, [t]);
|
|
223
|
+
return o ? /* @__PURE__ */ e(ce, { children: Fn(n, o) }) : null;
|
|
224
|
+
}), ut = ({
|
|
224
225
|
absolutePageIndex: n,
|
|
225
226
|
itemIndex: t
|
|
226
227
|
}) => {
|
|
227
|
-
const o =
|
|
228
|
+
const o = m();
|
|
228
229
|
return {
|
|
229
|
-
spineItem:
|
|
230
|
-
|
|
230
|
+
spineItem: S(() => o ? t !== void 0 ? pe(o.spine.spineItemsManager.get(t)) : n !== void 0 ? o.spine.pages.observeFromAbsolutePageIndex(n).pipe(
|
|
231
|
+
E((i) => o.spine.spineItemsManager.get(i?.itemIndex))
|
|
231
232
|
) : ye : ye, [t, n, o])
|
|
232
233
|
};
|
|
233
|
-
},
|
|
234
|
+
}, ht = ({
|
|
234
235
|
absolutePageIndex: n,
|
|
235
236
|
itemIndex: t
|
|
236
237
|
}) => {
|
|
237
|
-
const { spineItem: o } =
|
|
238
|
-
() => o?.isReady$ ??
|
|
238
|
+
const { spineItem: o } = ut({ absolutePageIndex: n, itemIndex: t }), r = S(
|
|
239
|
+
() => o?.isReady$ ?? pe(!1),
|
|
239
240
|
[o]
|
|
240
241
|
);
|
|
241
242
|
return { spineItem: o, isReady: r };
|
|
242
|
-
}, pt =
|
|
243
|
+
}, pt = g(
|
|
243
244
|
({
|
|
244
245
|
absolutePageIndex: n,
|
|
245
246
|
left: t,
|
|
246
247
|
top: o,
|
|
247
248
|
width: r
|
|
248
249
|
}) => {
|
|
249
|
-
const { isReady: i } =
|
|
250
|
+
const { isReady: i } = ht({
|
|
250
251
|
absolutePageIndex: n
|
|
251
|
-
}), { data: a } =
|
|
252
|
+
}), { data: a } = ge(), l = a?.find(
|
|
252
253
|
(d) => d?.meta?.absolutePageIndex === n && !d.meta.isCfiRange
|
|
253
254
|
);
|
|
254
255
|
if (!i) return null;
|
|
255
256
|
const c = r * 0.1 / 2;
|
|
256
257
|
return /* @__PURE__ */ e(
|
|
257
|
-
|
|
258
|
+
de,
|
|
258
259
|
{
|
|
259
260
|
present: !!l,
|
|
260
261
|
lazyMount: !0,
|
|
@@ -263,7 +264,7 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
263
264
|
children: /* @__PURE__ */ e(
|
|
264
265
|
_,
|
|
265
266
|
{
|
|
266
|
-
"data-bookmark-area":
|
|
267
|
+
"data-bookmark-area": nt,
|
|
267
268
|
position: "absolute",
|
|
268
269
|
left: t + r,
|
|
269
270
|
transform: "translateX(-100%)",
|
|
@@ -286,9 +287,9 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
286
287
|
}
|
|
287
288
|
);
|
|
288
289
|
}
|
|
289
|
-
),
|
|
290
|
-
const n =
|
|
291
|
-
return /* @__PURE__ */ e(
|
|
290
|
+
), gt = g(() => {
|
|
291
|
+
const n = m(), t = S(() => n?.layoutInfo$, [n]);
|
|
292
|
+
return /* @__PURE__ */ e(dt, { children: t?.pages.map(
|
|
292
293
|
({ absoluteLayout: { left: o, top: r, width: i } }, a) => /* @__PURE__ */ e(
|
|
293
294
|
pt,
|
|
294
295
|
{
|
|
@@ -300,16 +301,16 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
300
301
|
a
|
|
301
302
|
)
|
|
302
303
|
) });
|
|
303
|
-
}),
|
|
304
|
-
const n =
|
|
305
|
-
return
|
|
306
|
-
},
|
|
307
|
-
const n =
|
|
308
|
-
|
|
304
|
+
}), Ye = () => {
|
|
305
|
+
const n = m();
|
|
306
|
+
return se(n) ? n : void 0;
|
|
307
|
+
}, ft = () => {
|
|
308
|
+
const n = Ye(), { data: t } = ge();
|
|
309
|
+
$(() => n ? n.gestures.hooks.register(
|
|
309
310
|
"beforeTapGesture",
|
|
310
311
|
({ event$: r }) => r.pipe(
|
|
311
|
-
|
|
312
|
-
|
|
312
|
+
xe(n?.annotations.candidates$),
|
|
313
|
+
E(([i, a]) => {
|
|
313
314
|
if (!i.page) return !0;
|
|
314
315
|
const {
|
|
315
316
|
spineItem: l,
|
|
@@ -317,7 +318,7 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
317
318
|
spineItemPagePosition: d,
|
|
318
319
|
pageSize: u
|
|
319
320
|
} = i.page;
|
|
320
|
-
if (
|
|
321
|
+
if (_n(
|
|
321
322
|
d,
|
|
322
323
|
{
|
|
323
324
|
type: "corner",
|
|
@@ -332,11 +333,11 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
332
333
|
c
|
|
333
334
|
);
|
|
334
335
|
if (!h) return !0;
|
|
335
|
-
const
|
|
336
|
-
(
|
|
336
|
+
const C = t?.find(
|
|
337
|
+
(R) => R?.meta?.absolutePageIndex === h.absolutePageIndex && R.meta.range === void 0
|
|
337
338
|
);
|
|
338
|
-
if (
|
|
339
|
-
return n?.annotations.delete(
|
|
339
|
+
if (C)
|
|
340
|
+
return n?.annotations.delete(C.resource.id), !1;
|
|
340
341
|
if (a?.[h.absolutePageIndex])
|
|
341
342
|
return n?.annotations.annotateAbsolutePage({
|
|
342
343
|
absolutePageIndex: h.absolutePageIndex
|
|
@@ -346,8 +347,8 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
346
347
|
})
|
|
347
348
|
)
|
|
348
349
|
) : void 0, [n, t]);
|
|
349
|
-
},
|
|
350
|
-
const n =
|
|
350
|
+
}, mt = () => {
|
|
351
|
+
const n = Ye();
|
|
351
352
|
H(
|
|
352
353
|
() => (
|
|
353
354
|
/**
|
|
@@ -356,8 +357,8 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
356
357
|
n?.gestures.hooks.register(
|
|
357
358
|
"beforeTapGesture",
|
|
358
359
|
({ event$: t }) => t.pipe(
|
|
359
|
-
|
|
360
|
-
|
|
360
|
+
xe(n.selection.lastSelectionOnPointerdown$),
|
|
361
|
+
E(([{ event: o }, r]) => {
|
|
361
362
|
const i = o.event.target;
|
|
362
363
|
return !(i && n.annotations.isTargetWithinHighlight(i) || r);
|
|
363
364
|
})
|
|
@@ -366,24 +367,24 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
366
367
|
),
|
|
367
368
|
[n]
|
|
368
369
|
);
|
|
369
|
-
},
|
|
370
|
+
}, Se = Je({
|
|
370
371
|
placement: "bottom-end",
|
|
371
372
|
pauseOnPageIdle: !0
|
|
372
|
-
}),
|
|
373
|
-
n.type === "loading" ? /* @__PURE__ */ e(
|
|
374
|
-
/* @__PURE__ */ s(
|
|
373
|
+
}), bt = () => /* @__PURE__ */ e(Ce, { children: /* @__PURE__ */ e(en, { toaster: Se, insetInline: { mdDown: "4" }, children: (n) => /* @__PURE__ */ s(J.Root, { width: { md: "sm" }, children: [
|
|
374
|
+
n.type === "loading" ? /* @__PURE__ */ e(nn, { size: "sm", color: "blue.solid" }) : /* @__PURE__ */ e(J.Indicator, {}),
|
|
375
|
+
/* @__PURE__ */ s(O, { gap: "1", flex: "1", maxWidth: "100%", children: [
|
|
375
376
|
n.title && /* @__PURE__ */ e(J.Title, { children: n.title }),
|
|
376
377
|
n.description && /* @__PURE__ */ e(J.Description, { children: n.description })
|
|
377
378
|
] }),
|
|
378
379
|
n.action && /* @__PURE__ */ e(J.ActionTrigger, { children: n.action.label }),
|
|
379
380
|
n.meta?.closable && /* @__PURE__ */ e(J.CloseTrigger, {})
|
|
380
|
-
] }) }) }),
|
|
381
|
+
] }) }) }), St = ({
|
|
381
382
|
children: n,
|
|
382
383
|
...t
|
|
383
384
|
}) => {
|
|
384
|
-
const o = ue(() => ne({ default:
|
|
385
|
+
const o = ue(() => ne({ default: He() })), r = ue(
|
|
385
386
|
() => ne({ default: o.value.fontSizeMenuOpen })
|
|
386
|
-
), i =
|
|
387
|
+
), i = be(
|
|
387
388
|
r
|
|
388
389
|
), a = z(
|
|
389
390
|
(h) => {
|
|
@@ -392,9 +393,9 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
392
393
|
[r]
|
|
393
394
|
), l = z(
|
|
394
395
|
(h) => {
|
|
395
|
-
o.update((
|
|
396
|
-
...
|
|
397
|
-
_quickMenuOpen: typeof h == "function" ? h(
|
|
396
|
+
o.update((C) => ({
|
|
397
|
+
...C,
|
|
398
|
+
_quickMenuOpen: typeof h == "function" ? h(C._quickMenuOpen) : h
|
|
398
399
|
}));
|
|
399
400
|
},
|
|
400
401
|
[o]
|
|
@@ -405,10 +406,10 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
405
406
|
c.update(h);
|
|
406
407
|
},
|
|
407
408
|
[c]
|
|
408
|
-
), u =
|
|
409
|
+
), u = be(
|
|
409
410
|
c
|
|
410
|
-
), p =
|
|
411
|
-
return
|
|
411
|
+
), p = In(t, Dn);
|
|
412
|
+
return $(() => {
|
|
412
413
|
o.update((h) => ({
|
|
413
414
|
...h,
|
|
414
415
|
...p,
|
|
@@ -426,10 +427,10 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
426
427
|
a,
|
|
427
428
|
u,
|
|
428
429
|
d
|
|
429
|
-
]), /* @__PURE__ */ e(
|
|
430
|
-
},
|
|
431
|
-
({ children: n, ...t }) => /* @__PURE__ */ e(
|
|
432
|
-
), ie =
|
|
430
|
+
]), /* @__PURE__ */ e(Ie.Provider, { value: o, children: n });
|
|
431
|
+
}, Ct = g(
|
|
432
|
+
({ children: n, ...t }) => /* @__PURE__ */ e(St, { ...t, children: n })
|
|
433
|
+
), ie = A.forwardRef(
|
|
433
434
|
function(t, o) {
|
|
434
435
|
const { children: r, inputProps: i, rootRef: a, ...l } = t;
|
|
435
436
|
return /* @__PURE__ */ s(re.Item, { ref: a, ...l, children: [
|
|
@@ -438,7 +439,7 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
438
439
|
r && /* @__PURE__ */ e(re.ItemText, { children: r })
|
|
439
440
|
] });
|
|
440
441
|
}
|
|
441
|
-
),
|
|
442
|
+
), Ze = re.Root, Oe = A.forwardRef(
|
|
442
443
|
function(t, o) {
|
|
443
444
|
const { marks: r, label: i, showValue: a, ...l } = t, c = t.defaultValue ?? t.value, d = r?.map((p) => typeof p == "number" ? { value: p, label: void 0 } : p), u = !!d?.some((p) => p.label);
|
|
444
445
|
return /* @__PURE__ */ s(M.Root, { ref: o, thumbAlignment: "center", ...l, children: [
|
|
@@ -449,17 +450,17 @@ const X = O.ActionTrigger, Ge = () => ({
|
|
|
449
450
|
] }),
|
|
450
451
|
/* @__PURE__ */ s(M.Control, { "data-has-mark-label": u || void 0, children: [
|
|
451
452
|
/* @__PURE__ */ e(M.Track, { children: /* @__PURE__ */ e(M.Range, {}) }),
|
|
452
|
-
/* @__PURE__ */ e(
|
|
453
|
-
/* @__PURE__ */ e(
|
|
453
|
+
/* @__PURE__ */ e(vt, { value: c }),
|
|
454
|
+
/* @__PURE__ */ e(xt, { marks: d })
|
|
454
455
|
] })
|
|
455
456
|
] });
|
|
456
457
|
}
|
|
457
458
|
);
|
|
458
|
-
function
|
|
459
|
+
function vt(n) {
|
|
459
460
|
const { value: t } = n;
|
|
460
|
-
return /* @__PURE__ */ e(
|
|
461
|
+
return /* @__PURE__ */ e(tn, { each: t, children: (o, r) => /* @__PURE__ */ e(M.Thumb, { index: r, children: /* @__PURE__ */ e(M.HiddenInput, {}) }, r) });
|
|
461
462
|
}
|
|
462
|
-
const
|
|
463
|
+
const xt = A.forwardRef(
|
|
463
464
|
function(t, o) {
|
|
464
465
|
const { marks: r } = t;
|
|
465
466
|
return r?.length ? /* @__PURE__ */ e(M.MarkerGroup, { ref: o, children: r.map((i, a) => {
|
|
@@ -470,7 +471,7 @@ const kt = E.forwardRef(
|
|
|
470
471
|
] }, a);
|
|
471
472
|
}) }) : null;
|
|
472
473
|
}
|
|
473
|
-
),
|
|
474
|
+
), Re = [
|
|
474
475
|
{
|
|
475
476
|
value: "global",
|
|
476
477
|
references: ["global"]
|
|
@@ -483,15 +484,15 @@ const kt = E.forwardRef(
|
|
|
483
484
|
value: "screen",
|
|
484
485
|
references: ["mobile", "tablet", "desktop"]
|
|
485
486
|
}
|
|
486
|
-
],
|
|
487
|
+
], kt = Re.map((n) => n.value), Pe = Re.flatMap(
|
|
487
488
|
(n) => n.references
|
|
488
|
-
),
|
|
489
|
+
), It = (n) => {
|
|
489
490
|
if (n)
|
|
490
|
-
return
|
|
491
|
+
return Re.find(
|
|
491
492
|
(t) => t.references.includes(n)
|
|
492
493
|
)?.value;
|
|
493
|
-
},
|
|
494
|
-
const n =
|
|
494
|
+
}, Ot = g(() => {
|
|
495
|
+
const n = Ge(), {
|
|
495
496
|
fontSizeMenuOpen: t,
|
|
496
497
|
onFontSizeMenuOpenChange: o,
|
|
497
498
|
uncontrolledFontSize: r,
|
|
@@ -502,7 +503,7 @@ const kt = E.forwardRef(
|
|
|
502
503
|
fontSizeValues: d,
|
|
503
504
|
onFontSizeChange: u,
|
|
504
505
|
onFontSizeScopeChange: p
|
|
505
|
-
} =
|
|
506
|
+
} = y([
|
|
506
507
|
"fontSizeMenuOpen",
|
|
507
508
|
"onFontSizeMenuOpenChange",
|
|
508
509
|
"fontSize",
|
|
@@ -513,37 +514,37 @@ const kt = E.forwardRef(
|
|
|
513
514
|
"onFontSizeScopeChange",
|
|
514
515
|
"uncontrolledFontSize",
|
|
515
516
|
"fontSizeValues"
|
|
516
|
-
]), h =
|
|
517
|
+
]), h = On(u), [C, v] = w(
|
|
517
518
|
c ?? "global"
|
|
518
|
-
),
|
|
519
|
-
(
|
|
520
|
-
h.current ? h.current(
|
|
521
|
-
...
|
|
519
|
+
), R = z(
|
|
520
|
+
(f, K) => {
|
|
521
|
+
h.current ? h.current(f, K) : n.update((Ke) => ({
|
|
522
|
+
...Ke,
|
|
522
523
|
uncontrolledFontSize: K
|
|
523
524
|
}));
|
|
524
525
|
},
|
|
525
526
|
[h, n]
|
|
526
527
|
), D = z(
|
|
527
|
-
(
|
|
528
|
+
(f) => d?.[f] ?? i,
|
|
528
529
|
[i, d]
|
|
529
|
-
),
|
|
530
|
-
(
|
|
531
|
-
const K =
|
|
530
|
+
), x = z(
|
|
531
|
+
(f) => {
|
|
532
|
+
const K = f.value;
|
|
532
533
|
p?.(K);
|
|
533
534
|
},
|
|
534
535
|
[p]
|
|
535
|
-
),
|
|
536
|
-
|
|
537
|
-
}, []),
|
|
538
|
-
(
|
|
539
|
-
const K =
|
|
540
|
-
|
|
536
|
+
), L = z((f) => {
|
|
537
|
+
v(f.value);
|
|
538
|
+
}, []), I = z(
|
|
539
|
+
(f) => {
|
|
540
|
+
const K = f.value[0] ?? 0;
|
|
541
|
+
R(C, K / 100);
|
|
541
542
|
},
|
|
542
|
-
[
|
|
543
|
+
[R, C]
|
|
543
544
|
);
|
|
544
|
-
return
|
|
545
|
+
return $(
|
|
545
546
|
function() {
|
|
546
|
-
|
|
547
|
+
v(c ?? "global");
|
|
547
548
|
},
|
|
548
549
|
[c]
|
|
549
550
|
), /* @__PURE__ */ e(
|
|
@@ -551,53 +552,53 @@ const kt = E.forwardRef(
|
|
|
551
552
|
{
|
|
552
553
|
lazyMount: !0,
|
|
553
554
|
open: t,
|
|
554
|
-
onOpenChange: (
|
|
555
|
-
o(
|
|
555
|
+
onOpenChange: (f) => {
|
|
556
|
+
o(f.open);
|
|
556
557
|
},
|
|
557
558
|
placement: "center",
|
|
558
559
|
children: /* @__PURE__ */ s(G, { maxH: "40vh", overflow: "auto", children: [
|
|
559
560
|
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(Z, { children: "Font size" }) }),
|
|
560
|
-
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ s(
|
|
561
|
-
/* @__PURE__ */ s(
|
|
562
|
-
/* @__PURE__ */ e(
|
|
563
|
-
/* @__PURE__ */ e(
|
|
564
|
-
/* @__PURE__ */ e(
|
|
565
|
-
|
|
561
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ s(O, { gap: 4, flex: 1, children: [
|
|
562
|
+
/* @__PURE__ */ s(N.Root, { children: [
|
|
563
|
+
/* @__PURE__ */ e(N.Legend, { children: "Scope" }),
|
|
564
|
+
/* @__PURE__ */ e(N.HelperText, { children: "The scope to which apply the font size for this book." }),
|
|
565
|
+
/* @__PURE__ */ e(N.Content, { children: /* @__PURE__ */ e(
|
|
566
|
+
Ze,
|
|
566
567
|
{
|
|
567
|
-
onValueChange:
|
|
568
|
-
value:
|
|
568
|
+
onValueChange: x,
|
|
569
|
+
value: It(c) ?? "global",
|
|
569
570
|
disabled: !p,
|
|
570
|
-
children: /* @__PURE__ */ e(F, { gap: 2, children:
|
|
571
|
+
children: /* @__PURE__ */ e(F, { gap: 2, children: kt.map((f) => /* @__PURE__ */ e(ie, { value: f, children: f }, f)) })
|
|
571
572
|
}
|
|
572
573
|
) })
|
|
573
574
|
] }),
|
|
574
575
|
/* @__PURE__ */ s(
|
|
575
|
-
|
|
576
|
+
P.Root,
|
|
576
577
|
{
|
|
577
|
-
value:
|
|
578
|
-
onValueChange:
|
|
578
|
+
value: C,
|
|
579
|
+
onValueChange: L,
|
|
579
580
|
fitted: !1,
|
|
580
581
|
size: "sm",
|
|
581
582
|
children: [
|
|
582
|
-
/* @__PURE__ */ e(
|
|
583
|
-
|
|
583
|
+
/* @__PURE__ */ e(P.List, { children: Pe.map((f) => /* @__PURE__ */ s(
|
|
584
|
+
P.Trigger,
|
|
584
585
|
{
|
|
585
|
-
value:
|
|
586
|
+
value: f,
|
|
586
587
|
textTransform: "capitalize",
|
|
587
|
-
disabled:
|
|
588
|
+
disabled: f !== "global" && !c,
|
|
588
589
|
children: [
|
|
589
|
-
c ===
|
|
590
|
-
|
|
590
|
+
c === f && /* @__PURE__ */ e(pn, {}),
|
|
591
|
+
f
|
|
591
592
|
]
|
|
592
593
|
},
|
|
593
|
-
|
|
594
|
+
f
|
|
594
595
|
)) }),
|
|
595
|
-
Pe.map((
|
|
596
|
-
|
|
596
|
+
Pe.map((f) => /* @__PURE__ */ e(P.Content, { value: f, children: /* @__PURE__ */ e(
|
|
597
|
+
Oe,
|
|
597
598
|
{
|
|
598
599
|
label: "%",
|
|
599
|
-
value: [(D(
|
|
600
|
-
onValueChange:
|
|
600
|
+
value: [(D(f) ?? 1) * 100],
|
|
601
|
+
onValueChange: I,
|
|
601
602
|
showValue: !0,
|
|
602
603
|
marks: [
|
|
603
604
|
{ value: 100, label: "Publisher" },
|
|
@@ -615,7 +616,7 @@ const kt = E.forwardRef(
|
|
|
615
616
|
width: "100%",
|
|
616
617
|
step: 0.1 * 100
|
|
617
618
|
}
|
|
618
|
-
) },
|
|
619
|
+
) }, f))
|
|
619
620
|
]
|
|
620
621
|
}
|
|
621
622
|
)
|
|
@@ -625,13 +626,13 @@ const kt = E.forwardRef(
|
|
|
625
626
|
] })
|
|
626
627
|
}
|
|
627
628
|
);
|
|
628
|
-
}),
|
|
629
|
-
const n =
|
|
629
|
+
}), Rt = () => {
|
|
630
|
+
const n = m(), t = Ge(), { fontSize: o, uncontrolledFontSize: r } = y([
|
|
630
631
|
"fontSize",
|
|
631
632
|
"uncontrolledFontSize",
|
|
632
633
|
"onFontSizeChange"
|
|
633
634
|
]), i = o ?? r;
|
|
634
|
-
return
|
|
635
|
+
return $(
|
|
635
636
|
function() {
|
|
636
637
|
if (n && i) {
|
|
637
638
|
const l = setTimeout(() => {
|
|
@@ -645,7 +646,7 @@ const kt = E.forwardRef(
|
|
|
645
646
|
[n, i]
|
|
646
647
|
), H(
|
|
647
648
|
function() {
|
|
648
|
-
return n?.settings.values$.pipe(
|
|
649
|
+
return n?.settings.values$.pipe(E((l) => l.fontScale)).subscribe((l) => {
|
|
649
650
|
const c = t.value.fontSize ?? t.value.uncontrolledFontSize;
|
|
650
651
|
l !== c && (t.value.onFontSizeChange?.("internal", l), t.update((d) => ({
|
|
651
652
|
...d,
|
|
@@ -655,7 +656,7 @@ const kt = E.forwardRef(
|
|
|
655
656
|
},
|
|
656
657
|
[n, t]
|
|
657
658
|
), null;
|
|
658
|
-
},
|
|
659
|
+
}, zt = {
|
|
659
660
|
x: 0,
|
|
660
661
|
y: 0,
|
|
661
662
|
width: 0,
|
|
@@ -666,42 +667,42 @@ const kt = E.forwardRef(
|
|
|
666
667
|
right: 0
|
|
667
668
|
};
|
|
668
669
|
function Tt() {
|
|
669
|
-
const [n, t] =
|
|
670
|
+
const [n, t] = w(null), [o, r] = w(zt), i = sn(
|
|
670
671
|
() => new ResizeObserver((a) => {
|
|
671
672
|
if (a[0]) {
|
|
672
|
-
const { x: l, y: c, width: d, height: u, top: p, left: h, bottom:
|
|
673
|
-
r({ x: l, y: c, width: d, height: u, top: p, left: h, bottom:
|
|
673
|
+
const { x: l, y: c, width: d, height: u, top: p, left: h, bottom: C, right: v } = a[0].contentRect;
|
|
674
|
+
r({ x: l, y: c, width: d, height: u, top: p, left: h, bottom: C, right: v });
|
|
674
675
|
}
|
|
675
676
|
}),
|
|
676
677
|
[]
|
|
677
678
|
);
|
|
678
|
-
return
|
|
679
|
+
return cn(() => {
|
|
679
680
|
if (n)
|
|
680
681
|
return i.observe(n), () => {
|
|
681
682
|
i.disconnect();
|
|
682
683
|
};
|
|
683
684
|
}, [n, i]), [t, o, n];
|
|
684
685
|
}
|
|
685
|
-
const
|
|
686
|
-
const r =
|
|
686
|
+
const Mt = (n, t, o) => {
|
|
687
|
+
const r = m(), i = je(r) ? r : void 0;
|
|
687
688
|
H(() => {
|
|
688
|
-
if (!i || !n) return
|
|
689
|
+
if (!i || !n) return ke;
|
|
689
690
|
const a = t.layout.layout$.pipe(
|
|
690
691
|
Tn(t.layout.layoutInfo),
|
|
691
|
-
|
|
692
|
-
), l =
|
|
692
|
+
_e(Ln)
|
|
693
|
+
), l = $n(
|
|
693
694
|
n
|
|
694
|
-
).pipe(
|
|
695
|
+
).pipe(E((c) => c.some((d) => d.isIntersecting)));
|
|
695
696
|
return a.pipe(
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
697
|
+
De(100, void 0, { trailing: !0 }),
|
|
698
|
+
V(() => l.pipe(
|
|
699
|
+
Le((c) => {
|
|
699
700
|
c || (n.innerHTML = "");
|
|
700
701
|
}),
|
|
701
|
-
|
|
702
|
-
|
|
702
|
+
le((c) => c),
|
|
703
|
+
$e()
|
|
703
704
|
).pipe(
|
|
704
|
-
|
|
705
|
+
V(() => (n.innerHTML = "", i?.gallery.snapshot(
|
|
705
706
|
t,
|
|
706
707
|
n,
|
|
707
708
|
o
|
|
@@ -709,11 +710,11 @@ const wt = (n, t, o) => {
|
|
|
709
710
|
))
|
|
710
711
|
);
|
|
711
712
|
}, [i, t, o, n]);
|
|
712
|
-
},
|
|
713
|
+
}, wt = g(
|
|
713
714
|
({ item: n, onNavigated: t }) => {
|
|
714
|
-
const [o, r, i] = Tt(), a =
|
|
715
|
-
|
|
716
|
-
const l =
|
|
715
|
+
const [o, r, i] = Tt(), a = m();
|
|
716
|
+
Mt(i, n, r);
|
|
717
|
+
const l = S(
|
|
717
718
|
() => a?.locateResource(n, { mode: "shallow" }),
|
|
718
719
|
[a, n]
|
|
719
720
|
);
|
|
@@ -744,7 +745,7 @@ const wt = (n, t, o) => {
|
|
|
744
745
|
}
|
|
745
746
|
),
|
|
746
747
|
/* @__PURE__ */ s(
|
|
747
|
-
|
|
748
|
+
b,
|
|
748
749
|
{
|
|
749
750
|
position: "absolute",
|
|
750
751
|
bottom: 0,
|
|
@@ -764,9 +765,9 @@ const wt = (n, t, o) => {
|
|
|
764
765
|
}
|
|
765
766
|
);
|
|
766
767
|
}
|
|
767
|
-
),
|
|
768
|
+
), yt = g(
|
|
768
769
|
({ open: n, setOpen: t }) => {
|
|
769
|
-
const o =
|
|
770
|
+
const o = m(), r = S(() => o?.spineItemsManager.items$, [o]);
|
|
770
771
|
return /* @__PURE__ */ e(
|
|
771
772
|
j,
|
|
772
773
|
{
|
|
@@ -790,7 +791,7 @@ const wt = (n, t, o) => {
|
|
|
790
791
|
pt: 2,
|
|
791
792
|
"data-grid": !0,
|
|
792
793
|
children: r?.map((i) => /* @__PURE__ */ e(
|
|
793
|
-
|
|
794
|
+
wt,
|
|
794
795
|
{
|
|
795
796
|
item: i,
|
|
796
797
|
onNavigated: () => {
|
|
@@ -807,7 +808,7 @@ const wt = (n, t, o) => {
|
|
|
807
808
|
}
|
|
808
809
|
);
|
|
809
810
|
}
|
|
810
|
-
),
|
|
811
|
+
), Pt = "@prose-reader/react-reader", Et = "1.267.0", At = g(
|
|
811
812
|
({ open: n, setOpen: t }) => /* @__PURE__ */ e(
|
|
812
813
|
j,
|
|
813
814
|
{
|
|
@@ -828,29 +829,29 @@ const wt = (n, t, o) => {
|
|
|
828
829
|
flexDirection: "column",
|
|
829
830
|
gap: 4,
|
|
830
831
|
children: [
|
|
831
|
-
/* @__PURE__ */ s(
|
|
832
|
-
/* @__PURE__ */ e(
|
|
832
|
+
/* @__PURE__ */ s(O, { children: [
|
|
833
|
+
/* @__PURE__ */ e(fe, { mb: 2, as: "h3", size: "lg", children: "Shortcuts" }),
|
|
833
834
|
/* @__PURE__ */ s(F, { mb: 1, children: [
|
|
834
|
-
/* @__PURE__ */ e(
|
|
835
|
+
/* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(gn, {}) }),
|
|
835
836
|
" ",
|
|
836
|
-
/* @__PURE__ */ e(
|
|
837
|
+
/* @__PURE__ */ e(b, { children: "Navigate to right page" })
|
|
837
838
|
] }),
|
|
838
839
|
/* @__PURE__ */ s(F, { mb: 1, children: [
|
|
839
|
-
/* @__PURE__ */ e(
|
|
840
|
+
/* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(fn, {}) }),
|
|
840
841
|
" ",
|
|
841
|
-
/* @__PURE__ */ e(
|
|
842
|
+
/* @__PURE__ */ e(b, { children: "Navigate to left page" })
|
|
842
843
|
] })
|
|
843
844
|
] }),
|
|
844
|
-
/* @__PURE__ */ s(
|
|
845
|
-
/* @__PURE__ */ e(
|
|
846
|
-
/* @__PURE__ */ e(F, { mb: 1, children: /* @__PURE__ */ e(
|
|
845
|
+
/* @__PURE__ */ s(O, { children: [
|
|
846
|
+
/* @__PURE__ */ e(fe, { mb: 2, as: "h3", size: "lg", children: "Bookmarks" }),
|
|
847
|
+
/* @__PURE__ */ e(F, { mb: 1, children: /* @__PURE__ */ e(b, { children: "Tap on the top right corner of a page bookmark it" }) })
|
|
847
848
|
] }),
|
|
848
|
-
/* @__PURE__ */ s(
|
|
849
|
-
/* @__PURE__ */ e(
|
|
850
|
-
/* @__PURE__ */ s(
|
|
851
|
-
|
|
849
|
+
/* @__PURE__ */ s(O, { children: [
|
|
850
|
+
/* @__PURE__ */ e(fe, { mb: 2, as: "h3", size: "lg", children: "About" }),
|
|
851
|
+
/* @__PURE__ */ s(b, { children: [
|
|
852
|
+
Pt,
|
|
852
853
|
" version: ",
|
|
853
|
-
|
|
854
|
+
Et
|
|
854
855
|
] })
|
|
855
856
|
] })
|
|
856
857
|
]
|
|
@@ -862,10 +863,10 @@ const wt = (n, t, o) => {
|
|
|
862
863
|
}
|
|
863
864
|
)
|
|
864
865
|
), te = () => {
|
|
865
|
-
const n =
|
|
866
|
-
return
|
|
867
|
-
() => n ?
|
|
868
|
-
|
|
866
|
+
const n = m();
|
|
867
|
+
return S(
|
|
868
|
+
() => n ? Mn([n.pagination.state$, n.context]).pipe(
|
|
869
|
+
E(([t, o]) => {
|
|
869
870
|
const r = o.manifest?.spineItems.every(
|
|
870
871
|
(i) => i.mediaType?.startsWith("image/")
|
|
871
872
|
);
|
|
@@ -874,20 +875,45 @@ const wt = (n, t, o) => {
|
|
|
874
875
|
hasChapters: !o.isFullyPrePaginated && !r
|
|
875
876
|
};
|
|
876
877
|
})
|
|
877
|
-
) :
|
|
878
|
+
) : ke,
|
|
878
879
|
[n]
|
|
879
880
|
);
|
|
880
|
-
}, Ft = () => {
|
|
881
|
-
const
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
o
|
|
886
|
-
|
|
887
|
-
|
|
881
|
+
}, Bt = { _open: "fade-in", _closed: "fade-out" }, Ft = () => {
|
|
882
|
+
const { enableFloatingProgress: n, quickMenuOpen: t } = y([
|
|
883
|
+
"enableFloatingProgress",
|
|
884
|
+
"quickMenuOpen"
|
|
885
|
+
]), o = te(), r = Math.floor(
|
|
886
|
+
(o?.percentageEstimateOfBook ?? 0) * 100
|
|
887
|
+
), i = r > 0 ? r : 1;
|
|
888
|
+
return o?.percentageEstimateOfBook === void 0 || !n ? null : /* @__PURE__ */ e(
|
|
889
|
+
de,
|
|
890
|
+
{
|
|
891
|
+
present: !t,
|
|
892
|
+
animationName: Bt,
|
|
893
|
+
animationDuration: "moderate",
|
|
894
|
+
children: /* @__PURE__ */ e(
|
|
895
|
+
_,
|
|
896
|
+
{
|
|
897
|
+
position: "absolute",
|
|
898
|
+
right: 0,
|
|
899
|
+
bottom: 0,
|
|
900
|
+
p: 2,
|
|
901
|
+
WebkitTextStroke: "2px black",
|
|
902
|
+
paintOrder: "stroke fill",
|
|
903
|
+
pointerEvents: "none",
|
|
904
|
+
letterSpacing: 1,
|
|
905
|
+
color: "white",
|
|
906
|
+
children: /* @__PURE__ */ s(b, { fontSize: "md", children: [
|
|
907
|
+
i,
|
|
908
|
+
" %"
|
|
909
|
+
] })
|
|
910
|
+
}
|
|
911
|
+
)
|
|
912
|
+
}
|
|
913
|
+
);
|
|
888
914
|
}, _t = () => {
|
|
889
|
-
const [n, t] =
|
|
890
|
-
return
|
|
915
|
+
const [n, t] = w(/* @__PURE__ */ new Date());
|
|
916
|
+
return $(() => {
|
|
891
917
|
const o = setInterval(() => {
|
|
892
918
|
t(/* @__PURE__ */ new Date());
|
|
893
919
|
}, 6e4);
|
|
@@ -895,41 +921,26 @@ const wt = (n, t, o) => {
|
|
|
895
921
|
}, []), n;
|
|
896
922
|
}, Dt = (n) => {
|
|
897
923
|
const t = _t();
|
|
898
|
-
return /* @__PURE__ */ e(
|
|
924
|
+
return /* @__PURE__ */ e(b, { fontSize: "md", ...n, children: t.toLocaleTimeString(navigator.language, {
|
|
899
925
|
hour: "2-digit",
|
|
900
926
|
minute: "2-digit"
|
|
901
927
|
}) });
|
|
902
|
-
},
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
"
|
|
910
|
-
"
|
|
911
|
-
"
|
|
912
|
-
"
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
}, Lt = f(() => {
|
|
919
|
-
const [n] = fe();
|
|
920
|
-
return /* @__PURE__ */ e(
|
|
921
|
-
_,
|
|
922
|
-
{
|
|
923
|
-
position: "absolute",
|
|
924
|
-
left: 0,
|
|
925
|
-
bottom: 0,
|
|
926
|
-
p: 2,
|
|
927
|
-
color: n ? void 0 : "colorPalette.contrast",
|
|
928
|
-
children: /* @__PURE__ */ e(Dt, {})
|
|
929
|
-
}
|
|
930
|
-
);
|
|
931
|
-
}), $t = () => {
|
|
932
|
-
const n = b();
|
|
928
|
+
}, Lt = g(() => /* @__PURE__ */ e(
|
|
929
|
+
_,
|
|
930
|
+
{
|
|
931
|
+
position: "absolute",
|
|
932
|
+
left: 0,
|
|
933
|
+
bottom: 0,
|
|
934
|
+
p: 2,
|
|
935
|
+
color: "white",
|
|
936
|
+
WebkitTextStroke: "2px black",
|
|
937
|
+
paintOrder: "stroke fill",
|
|
938
|
+
pointerEvents: "none",
|
|
939
|
+
letterSpacing: 1,
|
|
940
|
+
children: /* @__PURE__ */ e(Dt, {})
|
|
941
|
+
}
|
|
942
|
+
)), $t = () => {
|
|
943
|
+
const n = m();
|
|
933
944
|
H(
|
|
934
945
|
() => n?.links$.subscribe((t) => {
|
|
935
946
|
if (t.type === "click" && Nn(t.target, "a")) {
|
|
@@ -942,18 +953,18 @@ const wt = (n, t, o) => {
|
|
|
942
953
|
}),
|
|
943
954
|
[n]
|
|
944
955
|
);
|
|
945
|
-
},
|
|
946
|
-
const { notificationsSubject: n } =
|
|
956
|
+
}, Nt = () => {
|
|
957
|
+
const { notificationsSubject: n } = y([
|
|
947
958
|
"notificationsSubject"
|
|
948
959
|
]);
|
|
949
960
|
H(
|
|
950
961
|
() => n.pipe(
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
const o = t.duration ?? 3e3, r = new
|
|
962
|
+
le(Fe),
|
|
963
|
+
wn((t) => {
|
|
964
|
+
const o = t.duration ?? 3e3, r = new yn((a) => {
|
|
954
965
|
try {
|
|
955
966
|
queueMicrotask(() => {
|
|
956
|
-
const l =
|
|
967
|
+
const l = Se.create({
|
|
957
968
|
title: t.title,
|
|
958
969
|
description: t.description,
|
|
959
970
|
duration: o
|
|
@@ -964,20 +975,20 @@ const wt = (n, t, o) => {
|
|
|
964
975
|
a.error(l);
|
|
965
976
|
}
|
|
966
977
|
}), i = n.pipe(
|
|
967
|
-
|
|
968
|
-
|
|
978
|
+
Pn(1),
|
|
979
|
+
le((a) => !!t.key && a?.key === t.key)
|
|
969
980
|
);
|
|
970
981
|
return r.pipe(
|
|
971
|
-
|
|
982
|
+
V(
|
|
972
983
|
(a) => Ne(
|
|
973
|
-
|
|
974
|
-
t.abort ??
|
|
984
|
+
Ve(o),
|
|
985
|
+
t.abort ?? ke,
|
|
975
986
|
i
|
|
976
987
|
).pipe(
|
|
977
|
-
|
|
978
|
-
|
|
988
|
+
$e(),
|
|
989
|
+
En(() => {
|
|
979
990
|
queueMicrotask(() => {
|
|
980
|
-
|
|
991
|
+
Se.dismiss(a);
|
|
981
992
|
});
|
|
982
993
|
})
|
|
983
994
|
)
|
|
@@ -987,7 +998,7 @@ const wt = (n, t, o) => {
|
|
|
987
998
|
),
|
|
988
999
|
[n]
|
|
989
1000
|
);
|
|
990
|
-
},
|
|
1001
|
+
}, Vt = A.forwardRef(
|
|
991
1002
|
function(t, o) {
|
|
992
1003
|
const {
|
|
993
1004
|
showArrow: r,
|
|
@@ -1004,7 +1015,7 @@ const wt = (n, t, o) => {
|
|
|
1004
1015
|
positioning: { ...d.positioning, gutter: 4 },
|
|
1005
1016
|
children: [
|
|
1006
1017
|
/* @__PURE__ */ e(ee.Trigger, { asChild: !0, children: i }),
|
|
1007
|
-
/* @__PURE__ */ e(
|
|
1018
|
+
/* @__PURE__ */ e(Ce, { disabled: !a, container: c, children: /* @__PURE__ */ e(ee.Positioner, { children: /* @__PURE__ */ s(
|
|
1008
1019
|
ee.Content,
|
|
1009
1020
|
{
|
|
1010
1021
|
width: "auto",
|
|
@@ -1023,29 +1034,29 @@ const wt = (n, t, o) => {
|
|
|
1023
1034
|
}
|
|
1024
1035
|
);
|
|
1025
1036
|
}
|
|
1026
|
-
), Wt =
|
|
1037
|
+
), Wt = A.forwardRef(function(t, o) {
|
|
1027
1038
|
const { children: r, ...i } = t;
|
|
1028
|
-
return /* @__PURE__ */ e(
|
|
1029
|
-
|
|
1039
|
+
return /* @__PURE__ */ e(Vt, { content: r, ...i, ref: o, children: /* @__PURE__ */ e(
|
|
1040
|
+
k,
|
|
1030
1041
|
{
|
|
1031
1042
|
variant: "ghost",
|
|
1032
1043
|
"aria-label": "info",
|
|
1033
1044
|
size: "2xs",
|
|
1034
1045
|
colorPalette: "gray",
|
|
1035
|
-
children: /* @__PURE__ */ e(
|
|
1046
|
+
children: /* @__PURE__ */ e(Xn, {})
|
|
1036
1047
|
}
|
|
1037
1048
|
) });
|
|
1038
|
-
}), Ht =
|
|
1039
|
-
return /* @__PURE__ */ e(
|
|
1049
|
+
}), Ht = A.forwardRef(function(t, o) {
|
|
1050
|
+
return /* @__PURE__ */ e(ae.Track, { ...t, ref: o, children: /* @__PURE__ */ e(ae.Range, {}) });
|
|
1040
1051
|
});
|
|
1041
|
-
|
|
1052
|
+
A.forwardRef(function(t, o) {
|
|
1042
1053
|
const { children: r, info: i, ...a } = t;
|
|
1043
|
-
return /* @__PURE__ */ s(
|
|
1054
|
+
return /* @__PURE__ */ s(ae.Label, { ...a, ref: o, children: [
|
|
1044
1055
|
r,
|
|
1045
1056
|
i && /* @__PURE__ */ e(Wt, { children: i })
|
|
1046
1057
|
] });
|
|
1047
1058
|
});
|
|
1048
|
-
const Gt =
|
|
1059
|
+
const Gt = ae.Root, qt = ae.ValueText, ze = () => {
|
|
1049
1060
|
const n = te(), t = n?.numberOfTotalPages === 1, o = (n?.beginNumberOfPagesInSpineItem ?? 0) > 1, r = (n?.endNumberOfPagesInSpineItem ?? 0) > 1, i = (n?.hasChapters ? n?.beginPageIndexInSpineItem : n?.beginAbsolutePageIndex) ?? 0, a = (n?.hasChapters ? n?.endPageIndexInSpineItem : n?.endAbsolutePageIndex) ?? 0, [l = 0, c = 0] = [
|
|
1050
1061
|
i,
|
|
1051
1062
|
a
|
|
@@ -1068,18 +1079,18 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1068
1079
|
rightPageIndex: r,
|
|
1069
1080
|
totalApproximatePages: i,
|
|
1070
1081
|
beginAndEndAreDifferent: a
|
|
1071
|
-
} =
|
|
1072
|
-
return /* @__PURE__ */ s(
|
|
1082
|
+
} = ze(), l = Math.round((n?.percentageEstimateOfBook ?? 0) * 100), c = (u) => u?.subChapter ? `${u.title} / ${c(u.subChapter)}` : u?.title || "", d = c(n?.beginChapterInfo);
|
|
1083
|
+
return /* @__PURE__ */ s(O, { alignItems: "center", gap: 1, maxW: "100%", overflow: "auto", children: [
|
|
1073
1084
|
/* @__PURE__ */ e(Gt, { value: l, size: "xs", width: 150, children: /* @__PURE__ */ s(F, { justifyContent: "space-between", children: [
|
|
1074
1085
|
/* @__PURE__ */ e(Ht, { width: 110 }),
|
|
1075
1086
|
/* @__PURE__ */ e(qt, { children: `${l}%` })
|
|
1076
1087
|
] }) }),
|
|
1077
|
-
/* @__PURE__ */ e(
|
|
1088
|
+
/* @__PURE__ */ e(b, { truncate: !0, maxWidth: "100%", fontSize: "sm", mt: 1, children: d ? `Chapter: ${d}` : " " }),
|
|
1078
1089
|
!t && /* @__PURE__ */ s(F, { children: [
|
|
1079
|
-
/* @__PURE__ */ e(
|
|
1080
|
-
!!n?.hasChapters && /* @__PURE__ */ s(
|
|
1081
|
-
/* @__PURE__ */ e(
|
|
1082
|
-
/* @__PURE__ */ s(
|
|
1090
|
+
/* @__PURE__ */ e(b, { fontSize: "xs", children: a ? `${o + 1} - ${r + 1} of ${i}` : `${o + 1} of ${i}` }),
|
|
1091
|
+
!!n?.hasChapters && /* @__PURE__ */ s(ce, { children: [
|
|
1092
|
+
/* @__PURE__ */ e(b, { children: "-" }),
|
|
1093
|
+
/* @__PURE__ */ s(b, { fontSize: "xs", children: [
|
|
1083
1094
|
"(",
|
|
1084
1095
|
(n?.beginAbsolutePageIndex ?? 0) + 1,
|
|
1085
1096
|
")"
|
|
@@ -1087,13 +1098,13 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1087
1098
|
] })
|
|
1088
1099
|
] })
|
|
1089
1100
|
] });
|
|
1090
|
-
},
|
|
1101
|
+
}, Xe = g(
|
|
1091
1102
|
({
|
|
1092
1103
|
children: n,
|
|
1093
1104
|
position: t,
|
|
1094
1105
|
...o
|
|
1095
1106
|
}) => /* @__PURE__ */ e(
|
|
1096
|
-
|
|
1107
|
+
de,
|
|
1097
1108
|
{
|
|
1098
1109
|
display: "flex",
|
|
1099
1110
|
flexDirection: "row",
|
|
@@ -1117,7 +1128,7 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1117
1128
|
children: n
|
|
1118
1129
|
}
|
|
1119
1130
|
)
|
|
1120
|
-
), Ut =
|
|
1131
|
+
), Ut = on(Kn), Qt = g((n) => /* @__PURE__ */ e(
|
|
1121
1132
|
_,
|
|
1122
1133
|
{
|
|
1123
1134
|
display: "contents",
|
|
@@ -1172,7 +1183,7 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1172
1183
|
)
|
|
1173
1184
|
}
|
|
1174
1185
|
)), Yt = () => {
|
|
1175
|
-
const t = te()?.isUsingSpread, { beginPageIndex: o, totalApproximatePages: r = 0 } =
|
|
1186
|
+
const t = te()?.isUsingSpread, { beginPageIndex: o, totalApproximatePages: r = 0 } = ze(), i = t ? Math.floor((o || 0) / 2) : o, [a, l] = Rn(
|
|
1176
1187
|
() => ne({
|
|
1177
1188
|
default: i || 0
|
|
1178
1189
|
})
|
|
@@ -1180,7 +1191,7 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1180
1191
|
0,
|
|
1181
1192
|
t ? Math.floor((r - 1) / 2) : r - 1
|
|
1182
1193
|
);
|
|
1183
|
-
return
|
|
1194
|
+
return $(() => {
|
|
1184
1195
|
l.update(i || 0);
|
|
1185
1196
|
}, [i, l]), {
|
|
1186
1197
|
value: a,
|
|
@@ -1189,17 +1200,17 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1189
1200
|
max: d
|
|
1190
1201
|
};
|
|
1191
1202
|
}, Zt = (n) => {
|
|
1192
|
-
const t =
|
|
1193
|
-
(
|
|
1194
|
-
const [
|
|
1195
|
-
h.update(
|
|
1196
|
-
const
|
|
1203
|
+
const t = m(), o = te(), { manifest: r } = S(() => t?.context, [t]) ?? {}, i = r?.readingDirection === "rtl", a = o?.isUsingSpread, { totalApproximatePages: l = 0, isBeginWithinChapter: c } = ze(), d = 1, u = c, { value: p, valueSignal: h, min: C, max: v } = Yt(), R = z(
|
|
1204
|
+
(x) => {
|
|
1205
|
+
const [L = 0] = Array.isArray(x) ? x : [x];
|
|
1206
|
+
h.update(L);
|
|
1207
|
+
const I = a ? Math.floor(L) * 2 : Math.floor(L);
|
|
1197
1208
|
u ? t?.navigation.goToPageOfSpineItem({
|
|
1198
|
-
pageIndex:
|
|
1209
|
+
pageIndex: I,
|
|
1199
1210
|
spineItemId: t.pagination.state.beginSpineItemIndex ?? 0,
|
|
1200
1211
|
animation: !1
|
|
1201
1212
|
}) : t?.navigation.goToAbsolutePageIndex({
|
|
1202
|
-
absolutePageIndex:
|
|
1213
|
+
absolutePageIndex: I,
|
|
1203
1214
|
animation: !1
|
|
1204
1215
|
});
|
|
1205
1216
|
},
|
|
@@ -1215,46 +1226,46 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1215
1226
|
Qt,
|
|
1216
1227
|
{
|
|
1217
1228
|
value: [p],
|
|
1218
|
-
max:
|
|
1219
|
-
min:
|
|
1229
|
+
max: v,
|
|
1230
|
+
min: C,
|
|
1220
1231
|
reverse: i,
|
|
1221
1232
|
step: d,
|
|
1222
|
-
onChange:
|
|
1233
|
+
onChange: R,
|
|
1223
1234
|
...n
|
|
1224
1235
|
}
|
|
1225
1236
|
);
|
|
1226
|
-
}, Xt =
|
|
1237
|
+
}, Xt = g(
|
|
1227
1238
|
({
|
|
1228
1239
|
open: n,
|
|
1229
1240
|
onItemClick: t
|
|
1230
1241
|
}) => {
|
|
1231
|
-
const o =
|
|
1242
|
+
const o = dn(null), r = m(), {
|
|
1232
1243
|
quickMenuBottomBarBoundingBoxSignal: i,
|
|
1233
1244
|
onFontSizeMenuOpenChange: a,
|
|
1234
1245
|
onRefitMenuOpenChange: l
|
|
1235
|
-
} =
|
|
1246
|
+
} = y([
|
|
1236
1247
|
"quickMenuBottomBarBoundingBoxSignal",
|
|
1237
1248
|
"onFontSizeMenuOpenChange",
|
|
1238
1249
|
"onRefitMenuOpenChange"
|
|
1239
|
-
]), c =
|
|
1250
|
+
]), c = S(() => r?.navigation.state$, [r]), d = S(() => r?.settings.values$, [r]), u = S(
|
|
1240
1251
|
() => r?.zoom.state$.pipe(
|
|
1241
|
-
|
|
1242
|
-
(
|
|
1252
|
+
E(
|
|
1253
|
+
(x) => x.currentScale > 1 ? "in" : x.currentScale < 1 ? "out" : void 0
|
|
1243
1254
|
)
|
|
1244
1255
|
),
|
|
1245
1256
|
[r]
|
|
1246
|
-
), p = u === "in", h = u === "out",
|
|
1247
|
-
return
|
|
1257
|
+
), p = u === "in", h = u === "out", C = d?.computedPageTurnMode === "scrollable", v = d?.computedPageTurnDirection === "vertical", [R, D] = w(!0);
|
|
1258
|
+
return $(() => {
|
|
1248
1259
|
if (!o.current) return;
|
|
1249
|
-
const
|
|
1250
|
-
for (const
|
|
1251
|
-
i.update(
|
|
1260
|
+
const x = new ResizeObserver((L) => {
|
|
1261
|
+
for (const I of L)
|
|
1262
|
+
i.update(I);
|
|
1252
1263
|
});
|
|
1253
|
-
return
|
|
1254
|
-
|
|
1264
|
+
return x.observe(o.current), () => {
|
|
1265
|
+
x.disconnect();
|
|
1255
1266
|
};
|
|
1256
1267
|
}, [i]), /* @__PURE__ */ s(
|
|
1257
|
-
|
|
1268
|
+
Xe,
|
|
1258
1269
|
{
|
|
1259
1270
|
present: n,
|
|
1260
1271
|
position: "bottom",
|
|
@@ -1275,7 +1286,7 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1275
1286
|
px: 4,
|
|
1276
1287
|
children: [
|
|
1277
1288
|
/* @__PURE__ */ e(
|
|
1278
|
-
|
|
1289
|
+
k,
|
|
1279
1290
|
{
|
|
1280
1291
|
"aria-label": "left",
|
|
1281
1292
|
size: "lg",
|
|
@@ -1283,11 +1294,11 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1283
1294
|
flexShrink: 0,
|
|
1284
1295
|
onClick: () => r?.navigation.goToLeftOrTopSpineItem(),
|
|
1285
1296
|
disabled: !c?.canGoLeftSpineItem && !c?.canGoTopSpineItem,
|
|
1286
|
-
children:
|
|
1297
|
+
children: v ? /* @__PURE__ */ e(Un, {}) : /* @__PURE__ */ e(Qn, {})
|
|
1287
1298
|
}
|
|
1288
1299
|
),
|
|
1289
1300
|
/* @__PURE__ */ s(
|
|
1290
|
-
|
|
1301
|
+
O,
|
|
1291
1302
|
{
|
|
1292
1303
|
flex: 1,
|
|
1293
1304
|
maxW: 400,
|
|
@@ -1311,7 +1322,7 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1311
1322
|
}
|
|
1312
1323
|
),
|
|
1313
1324
|
/* @__PURE__ */ e(
|
|
1314
|
-
|
|
1325
|
+
k,
|
|
1315
1326
|
{
|
|
1316
1327
|
"aria-label": "right",
|
|
1317
1328
|
size: "lg",
|
|
@@ -1321,72 +1332,72 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1321
1332
|
onClick: () => {
|
|
1322
1333
|
r?.navigation.goToRightOrBottomSpineItem();
|
|
1323
1334
|
},
|
|
1324
|
-
children:
|
|
1335
|
+
children: v ? /* @__PURE__ */ e(Yn, {}) : /* @__PURE__ */ e(Zn, {})
|
|
1325
1336
|
}
|
|
1326
1337
|
)
|
|
1327
1338
|
]
|
|
1328
1339
|
}
|
|
1329
1340
|
),
|
|
1330
1341
|
/* @__PURE__ */ e(F, { alignSelf: "stretch", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ s(
|
|
1331
|
-
|
|
1342
|
+
me.Root,
|
|
1332
1343
|
{
|
|
1333
|
-
open:
|
|
1344
|
+
open: R,
|
|
1334
1345
|
flex: 1,
|
|
1335
|
-
onOpenChange: ({ open:
|
|
1336
|
-
D(
|
|
1346
|
+
onOpenChange: ({ open: x }) => {
|
|
1347
|
+
D(x);
|
|
1337
1348
|
},
|
|
1338
1349
|
width: "100%",
|
|
1339
1350
|
children: [
|
|
1340
1351
|
/* @__PURE__ */ e(
|
|
1341
|
-
|
|
1352
|
+
me.Trigger,
|
|
1342
1353
|
{
|
|
1343
1354
|
paddingY: "3",
|
|
1344
1355
|
width: "100%",
|
|
1345
1356
|
display: "flex",
|
|
1346
1357
|
justifyContent: "center",
|
|
1347
1358
|
children: /* @__PURE__ */ e(
|
|
1348
|
-
|
|
1359
|
+
mn,
|
|
1349
1360
|
{
|
|
1350
1361
|
style: {
|
|
1351
|
-
transform:
|
|
1362
|
+
transform: R ? "rotate(0deg)" : "rotate(180deg)"
|
|
1352
1363
|
}
|
|
1353
1364
|
}
|
|
1354
1365
|
)
|
|
1355
1366
|
}
|
|
1356
1367
|
),
|
|
1357
|
-
/* @__PURE__ */ e(
|
|
1368
|
+
/* @__PURE__ */ e(me.Content, { display: "flex", justifyContent: "center", children: /* @__PURE__ */ s(_, { display: "flex", overflowX: "auto", px: 4, pb: 1, children: [
|
|
1358
1369
|
/* @__PURE__ */ e(
|
|
1359
|
-
|
|
1370
|
+
k,
|
|
1360
1371
|
{
|
|
1361
1372
|
"aria-label": "Help",
|
|
1362
1373
|
size: "lg",
|
|
1363
1374
|
variant: "ghost",
|
|
1364
1375
|
onClick: () => t("help"),
|
|
1365
|
-
children: /* @__PURE__ */ e(
|
|
1376
|
+
children: /* @__PURE__ */ e(bn, {})
|
|
1366
1377
|
}
|
|
1367
1378
|
),
|
|
1368
1379
|
/* @__PURE__ */ e(
|
|
1369
|
-
|
|
1380
|
+
k,
|
|
1370
1381
|
{
|
|
1371
1382
|
"aria-label": "Table of contents",
|
|
1372
1383
|
size: "lg",
|
|
1373
1384
|
variant: "ghost",
|
|
1374
1385
|
onClick: () => t("toc"),
|
|
1375
|
-
children: /* @__PURE__ */ e(
|
|
1386
|
+
children: /* @__PURE__ */ e(Sn, {})
|
|
1376
1387
|
}
|
|
1377
1388
|
),
|
|
1378
|
-
|
|
1379
|
-
|
|
1389
|
+
qe(r) && /* @__PURE__ */ e(
|
|
1390
|
+
k,
|
|
1380
1391
|
{
|
|
1381
1392
|
"aria-label": "Search",
|
|
1382
1393
|
size: "lg",
|
|
1383
1394
|
variant: "ghost",
|
|
1384
1395
|
onClick: () => t("search"),
|
|
1385
|
-
children: /* @__PURE__ */ e(
|
|
1396
|
+
children: /* @__PURE__ */ e(Cn, {})
|
|
1386
1397
|
}
|
|
1387
1398
|
),
|
|
1388
1399
|
/* @__PURE__ */ e(
|
|
1389
|
-
|
|
1400
|
+
k,
|
|
1390
1401
|
{
|
|
1391
1402
|
"aria-label": "Zoom",
|
|
1392
1403
|
size: "lg",
|
|
@@ -1397,11 +1408,11 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1397
1408
|
scale: 2
|
|
1398
1409
|
});
|
|
1399
1410
|
},
|
|
1400
|
-
children: p ? /* @__PURE__ */ e(
|
|
1411
|
+
children: p ? /* @__PURE__ */ e(vn, {}) : /* @__PURE__ */ e(xn, {})
|
|
1401
1412
|
}
|
|
1402
1413
|
),
|
|
1403
1414
|
/* @__PURE__ */ e(
|
|
1404
|
-
|
|
1415
|
+
k,
|
|
1405
1416
|
{
|
|
1406
1417
|
"aria-label": "font size",
|
|
1407
1418
|
size: "lg",
|
|
@@ -1409,21 +1420,21 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1409
1420
|
a(!0);
|
|
1410
1421
|
},
|
|
1411
1422
|
variant: "ghost",
|
|
1412
|
-
children: /* @__PURE__ */ e(
|
|
1423
|
+
children: /* @__PURE__ */ e(Vn, {})
|
|
1413
1424
|
}
|
|
1414
1425
|
),
|
|
1415
|
-
|
|
1416
|
-
|
|
1426
|
+
se(r) && /* @__PURE__ */ e(
|
|
1427
|
+
k,
|
|
1417
1428
|
{
|
|
1418
1429
|
"aria-label": "Bookmarks",
|
|
1419
1430
|
size: "lg",
|
|
1420
1431
|
variant: "ghost",
|
|
1421
1432
|
onClick: () => t("bookmarks"),
|
|
1422
|
-
children: /* @__PURE__ */ e(
|
|
1433
|
+
children: /* @__PURE__ */ e(Wn, {})
|
|
1423
1434
|
}
|
|
1424
1435
|
),
|
|
1425
|
-
|
|
1426
|
-
|
|
1436
|
+
se(r) && /* @__PURE__ */ e(
|
|
1437
|
+
k,
|
|
1427
1438
|
{
|
|
1428
1439
|
"aria-label": "Annotations",
|
|
1429
1440
|
size: "lg",
|
|
@@ -1432,8 +1443,8 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1432
1443
|
children: /* @__PURE__ */ e(he, {})
|
|
1433
1444
|
}
|
|
1434
1445
|
),
|
|
1435
|
-
|
|
1436
|
-
|
|
1446
|
+
Ue(r) && /* @__PURE__ */ e(
|
|
1447
|
+
k,
|
|
1437
1448
|
{
|
|
1438
1449
|
"aria-label": "Refit",
|
|
1439
1450
|
size: "lg",
|
|
@@ -1441,12 +1452,12 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1441
1452
|
onClick: () => {
|
|
1442
1453
|
l(!0);
|
|
1443
1454
|
},
|
|
1444
|
-
disabled: !
|
|
1445
|
-
children: /* @__PURE__ */ e(
|
|
1455
|
+
disabled: !C,
|
|
1456
|
+
children: /* @__PURE__ */ e(Hn, {})
|
|
1446
1457
|
}
|
|
1447
1458
|
),
|
|
1448
1459
|
/* @__PURE__ */ e(
|
|
1449
|
-
|
|
1460
|
+
k,
|
|
1450
1461
|
{
|
|
1451
1462
|
"aria-label": "Thumbnails",
|
|
1452
1463
|
size: "lg",
|
|
@@ -1457,17 +1468,17 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1457
1468
|
scale: 0.5
|
|
1458
1469
|
});
|
|
1459
1470
|
},
|
|
1460
|
-
children: /* @__PURE__ */ e(
|
|
1471
|
+
children: /* @__PURE__ */ e(kn, {})
|
|
1461
1472
|
}
|
|
1462
1473
|
),
|
|
1463
|
-
|
|
1464
|
-
|
|
1474
|
+
je(r) && /* @__PURE__ */ e(
|
|
1475
|
+
k,
|
|
1465
1476
|
{
|
|
1466
1477
|
"aria-label": "Gallery",
|
|
1467
1478
|
size: "lg",
|
|
1468
1479
|
variant: "ghost",
|
|
1469
1480
|
onClick: () => t("gallery"),
|
|
1470
|
-
children: /* @__PURE__ */ e(
|
|
1481
|
+
children: /* @__PURE__ */ e(jn, {})
|
|
1471
1482
|
}
|
|
1472
1483
|
)
|
|
1473
1484
|
] }) })
|
|
@@ -1479,12 +1490,12 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1479
1490
|
);
|
|
1480
1491
|
}
|
|
1481
1492
|
), Kt = () => {
|
|
1482
|
-
const [n, t] =
|
|
1493
|
+
const [n, t] = w(!1), o = z(() => document.fullscreenElement ? document.exitFullscreen().catch(console.error).then(() => {
|
|
1483
1494
|
t(!1);
|
|
1484
1495
|
}) : document.documentElement.requestFullscreen({ navigationUI: "hide" }).catch(console.error).then(() => {
|
|
1485
1496
|
t(!0);
|
|
1486
1497
|
}), []);
|
|
1487
|
-
return
|
|
1498
|
+
return $(() => {
|
|
1488
1499
|
function r() {
|
|
1489
1500
|
t(!!document.fullscreenElement);
|
|
1490
1501
|
}
|
|
@@ -1495,14 +1506,14 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1495
1506
|
isFullscreen: n,
|
|
1496
1507
|
onToggleFullscreenClick: o
|
|
1497
1508
|
};
|
|
1498
|
-
}, Jt =
|
|
1509
|
+
}, Jt = g(
|
|
1499
1510
|
({
|
|
1500
1511
|
open: n,
|
|
1501
1512
|
onItemClick: t
|
|
1502
1513
|
}) => {
|
|
1503
|
-
const o =
|
|
1514
|
+
const o = m(), r = S(() => o?.context.manifest$, [o]), { isFullscreen: i, onToggleFullscreenClick: a } = Kt();
|
|
1504
1515
|
return /* @__PURE__ */ s(
|
|
1505
|
-
|
|
1516
|
+
Xe,
|
|
1506
1517
|
{
|
|
1507
1518
|
present: n,
|
|
1508
1519
|
position: "top",
|
|
@@ -1510,18 +1521,18 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1510
1521
|
justifyContent: "space-between",
|
|
1511
1522
|
children: [
|
|
1512
1523
|
/* @__PURE__ */ e(
|
|
1513
|
-
|
|
1524
|
+
k,
|
|
1514
1525
|
{
|
|
1515
1526
|
"aria-label": "left",
|
|
1516
1527
|
size: "lg",
|
|
1517
1528
|
variant: "ghost",
|
|
1518
1529
|
flexShrink: 0,
|
|
1519
1530
|
onClick: () => t("back"),
|
|
1520
|
-
children: /* @__PURE__ */ e(
|
|
1531
|
+
children: /* @__PURE__ */ e(Jn, {})
|
|
1521
1532
|
}
|
|
1522
1533
|
),
|
|
1523
1534
|
/* @__PURE__ */ e(
|
|
1524
|
-
|
|
1535
|
+
O,
|
|
1525
1536
|
{
|
|
1526
1537
|
flex: 1,
|
|
1527
1538
|
maxW: 600,
|
|
@@ -1529,30 +1540,30 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1529
1540
|
alignItems: "center",
|
|
1530
1541
|
overflow: "auto",
|
|
1531
1542
|
px: 4,
|
|
1532
|
-
children: /* @__PURE__ */ e(
|
|
1543
|
+
children: /* @__PURE__ */ e(b, { truncate: !0, maxWidth: "100%", children: r?.title })
|
|
1533
1544
|
}
|
|
1534
1545
|
),
|
|
1535
1546
|
/* @__PURE__ */ s(F, { children: [
|
|
1536
1547
|
/* @__PURE__ */ e(
|
|
1537
|
-
|
|
1548
|
+
k,
|
|
1538
1549
|
{
|
|
1539
1550
|
"aria-label": "right",
|
|
1540
1551
|
size: "lg",
|
|
1541
1552
|
flexShrink: 0,
|
|
1542
1553
|
variant: "ghost",
|
|
1543
1554
|
onClick: () => t("more"),
|
|
1544
|
-
children: /* @__PURE__ */ e(
|
|
1555
|
+
children: /* @__PURE__ */ e(et, {})
|
|
1545
1556
|
}
|
|
1546
1557
|
),
|
|
1547
1558
|
/* @__PURE__ */ e(
|
|
1548
|
-
|
|
1559
|
+
k,
|
|
1549
1560
|
{
|
|
1550
1561
|
"aria-label": "right",
|
|
1551
1562
|
size: "lg",
|
|
1552
1563
|
flexShrink: 0,
|
|
1553
1564
|
variant: "ghost",
|
|
1554
1565
|
onClick: a,
|
|
1555
|
-
children: i ? /* @__PURE__ */ e(
|
|
1566
|
+
children: i ? /* @__PURE__ */ e(Gn, {}) : /* @__PURE__ */ e(qn, {})
|
|
1556
1567
|
}
|
|
1557
1568
|
)
|
|
1558
1569
|
] })
|
|
@@ -1560,15 +1571,31 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1560
1571
|
}
|
|
1561
1572
|
);
|
|
1562
1573
|
}
|
|
1563
|
-
),
|
|
1574
|
+
), Te = () => {
|
|
1575
|
+
const {
|
|
1576
|
+
quickMenuOpen: n,
|
|
1577
|
+
onQuickMenuOpenChange: t,
|
|
1578
|
+
_quickMenuOpen: o,
|
|
1579
|
+
_onQuickMenuOpenChange: r
|
|
1580
|
+
} = y([
|
|
1581
|
+
"quickMenuOpen",
|
|
1582
|
+
"onQuickMenuOpenChange",
|
|
1583
|
+
"_quickMenuOpen",
|
|
1584
|
+
"_onQuickMenuOpenChange"
|
|
1585
|
+
]);
|
|
1586
|
+
return [
|
|
1587
|
+
n ?? o,
|
|
1588
|
+
t ?? r
|
|
1589
|
+
];
|
|
1590
|
+
}, eo = g(
|
|
1564
1591
|
({
|
|
1565
1592
|
onItemClick: n
|
|
1566
1593
|
}) => {
|
|
1567
|
-
const [t] =
|
|
1594
|
+
const [t] = Te(), { refitMenuOpen: o, fontSizeMenuOpen: r } = y([
|
|
1568
1595
|
"refitMenuOpen",
|
|
1569
1596
|
"fontSizeMenuOpen"
|
|
1570
1597
|
]);
|
|
1571
|
-
return /* @__PURE__ */ s(
|
|
1598
|
+
return /* @__PURE__ */ s(ce, { children: [
|
|
1572
1599
|
/* @__PURE__ */ e(
|
|
1573
1600
|
Jt,
|
|
1574
1601
|
{
|
|
@@ -1586,18 +1613,18 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1586
1613
|
] });
|
|
1587
1614
|
}
|
|
1588
1615
|
), no = () => {
|
|
1589
|
-
const [n, t] =
|
|
1616
|
+
const [n, t] = Te(), o = m();
|
|
1590
1617
|
H(() => o?.gestures.gestures$.pipe(
|
|
1591
|
-
|
|
1592
|
-
|
|
1618
|
+
le((r) => r.type === "tap" && !r.handled),
|
|
1619
|
+
xe(
|
|
1593
1620
|
o.selection.selection$,
|
|
1594
1621
|
o.selection.lastSelectionOnPointerdown$
|
|
1595
1622
|
),
|
|
1596
|
-
|
|
1623
|
+
Le(([, r, i]) => {
|
|
1597
1624
|
t(r || i ? !1 : (a) => !a);
|
|
1598
1625
|
})
|
|
1599
1626
|
), [o]);
|
|
1600
|
-
}, to =
|
|
1627
|
+
}, to = A.forwardRef(
|
|
1601
1628
|
function(t, o) {
|
|
1602
1629
|
const { label: r, children: i, helperText: a, errorText: l, optionalText: c, ...d } = t;
|
|
1603
1630
|
return /* @__PURE__ */ s(oe.Root, { ref: o, ...d, children: [
|
|
@@ -1610,11 +1637,11 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1610
1637
|
l && /* @__PURE__ */ e(oe.ErrorText, { children: l })
|
|
1611
1638
|
] });
|
|
1612
1639
|
}
|
|
1613
|
-
), oo =
|
|
1614
|
-
const { refitMenuOpen: t, onRefitMenuOpenChange: o } =
|
|
1640
|
+
), oo = g(() => {
|
|
1641
|
+
const { refitMenuOpen: t, onRefitMenuOpenChange: o } = y([
|
|
1615
1642
|
"refitMenuOpen",
|
|
1616
1643
|
"onRefitMenuOpenChange"
|
|
1617
|
-
]), r =
|
|
1644
|
+
]), r = m(), i = Ue(r) ? r : void 0, a = S(
|
|
1618
1645
|
() => i?.refit.settings$,
|
|
1619
1646
|
[i]
|
|
1620
1647
|
);
|
|
@@ -1627,11 +1654,11 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1627
1654
|
placement: "center",
|
|
1628
1655
|
children: /* @__PURE__ */ s(G, { children: [
|
|
1629
1656
|
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(Z, { children: "Viewport fit" }) }),
|
|
1630
|
-
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ s(
|
|
1631
|
-
/* @__PURE__ */ e(
|
|
1632
|
-
/* @__PURE__ */ s(
|
|
1657
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ s(N.Root, { children: [
|
|
1658
|
+
/* @__PURE__ */ e(N.HelperText, { children: "Adjust the viewport for a more comfortable reading experience." }),
|
|
1659
|
+
/* @__PURE__ */ s(N.Content, { children: [
|
|
1633
1660
|
/* @__PURE__ */ e(to, { label: "Profile", children: /* @__PURE__ */ e(
|
|
1634
|
-
|
|
1661
|
+
Ze,
|
|
1635
1662
|
{
|
|
1636
1663
|
defaultValue: "fit",
|
|
1637
1664
|
onValueChange: (l) => {
|
|
@@ -1642,7 +1669,7 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1642
1669
|
});
|
|
1643
1670
|
},
|
|
1644
1671
|
value: a?.viewportFit ?? "fit",
|
|
1645
|
-
children: /* @__PURE__ */ s(
|
|
1672
|
+
children: /* @__PURE__ */ s(O, { gap: 2, children: [
|
|
1646
1673
|
/* @__PURE__ */ e(ie, { value: "desktop", children: "Desktop" }),
|
|
1647
1674
|
/* @__PURE__ */ e(ie, { value: "tablet", children: "Tablet" }),
|
|
1648
1675
|
/* @__PURE__ */ e(ie, { value: "fit", children: "Full width (default)" }),
|
|
@@ -1651,7 +1678,7 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1651
1678
|
}
|
|
1652
1679
|
) }),
|
|
1653
1680
|
/* @__PURE__ */ e(
|
|
1654
|
-
|
|
1681
|
+
Oe,
|
|
1655
1682
|
{
|
|
1656
1683
|
label: "Maximum width (%)",
|
|
1657
1684
|
showValue: !0,
|
|
@@ -1675,7 +1702,7 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1675
1702
|
] })
|
|
1676
1703
|
}
|
|
1677
1704
|
);
|
|
1678
|
-
}), ro =
|
|
1705
|
+
}), ro = g(
|
|
1679
1706
|
({
|
|
1680
1707
|
contextText: n = "",
|
|
1681
1708
|
startOffset: t = 0,
|
|
@@ -1695,7 +1722,7 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1695
1722
|
)
|
|
1696
1723
|
);
|
|
1697
1724
|
return /* @__PURE__ */ s(
|
|
1698
|
-
|
|
1725
|
+
ve,
|
|
1699
1726
|
{
|
|
1700
1727
|
href: r,
|
|
1701
1728
|
style: { margin: 5, overflow: "hidden" },
|
|
@@ -1707,30 +1734,30 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1707
1734
|
alignItems: "flex-start",
|
|
1708
1735
|
gap: 0,
|
|
1709
1736
|
children: [
|
|
1710
|
-
/* @__PURE__ */ s(
|
|
1737
|
+
/* @__PURE__ */ s(b, { lineClamp: 1, as: "cite", style: { display: "block" }, children: [
|
|
1711
1738
|
'"',
|
|
1712
1739
|
c,
|
|
1713
1740
|
/* @__PURE__ */ e("b", { children: o }),
|
|
1714
1741
|
d,
|
|
1715
1742
|
'"'
|
|
1716
1743
|
] }),
|
|
1717
|
-
/* @__PURE__ */ e(
|
|
1744
|
+
/* @__PURE__ */ e(b, { fontSize: "sm", color: "gray.500", style: { textDecoration: "none" }, children: `Book page: ${a !== void 0 ? a + 1 : "unknown (not loaded)"}` })
|
|
1718
1745
|
]
|
|
1719
1746
|
}
|
|
1720
1747
|
);
|
|
1721
1748
|
}
|
|
1722
1749
|
), io = 500, ao = () => {
|
|
1723
|
-
const n = ue(() => new
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
(a) => a === "" || !r ?
|
|
1727
|
-
|
|
1750
|
+
const n = ue(() => new An("")), t = S(n), o = m(), r = qe(o) ? o : void 0, i = S(() => n.pipe(
|
|
1751
|
+
_e(),
|
|
1752
|
+
V(
|
|
1753
|
+
(a) => a === "" || !r ? pe(void 0) : Ne(
|
|
1754
|
+
pe({
|
|
1728
1755
|
type: "start",
|
|
1729
1756
|
data: void 0
|
|
1730
1757
|
}),
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1758
|
+
Ve(io).pipe(
|
|
1759
|
+
V(() => r.search.search(a)),
|
|
1760
|
+
E((l) => ({ type: "end", data: l }))
|
|
1734
1761
|
)
|
|
1735
1762
|
)
|
|
1736
1763
|
)
|
|
@@ -1741,22 +1768,22 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1741
1768
|
status: i?.type ?? "idle",
|
|
1742
1769
|
data: i?.data
|
|
1743
1770
|
};
|
|
1744
|
-
}, lo =
|
|
1771
|
+
}, lo = g(
|
|
1745
1772
|
({ onNavigate: n }) => {
|
|
1746
|
-
const t =
|
|
1773
|
+
const t = m(), { value: o, setValue: r, status: i, data: a } = ao(), l = (u) => {
|
|
1747
1774
|
r(u.target.value);
|
|
1748
1775
|
}, c = z(
|
|
1749
1776
|
(u) => {
|
|
1750
1777
|
n(), t?.navigation.goToCfi(u);
|
|
1751
1778
|
},
|
|
1752
1779
|
[t, n]
|
|
1753
|
-
), d =
|
|
1780
|
+
), d = S(
|
|
1754
1781
|
() => t?.locateResource(a?.slice(0, 100) ?? []),
|
|
1755
1782
|
[a]
|
|
1756
1783
|
);
|
|
1757
|
-
return /* @__PURE__ */ s(
|
|
1784
|
+
return /* @__PURE__ */ s(O, { flex: 1, height: "100%", gap: 2, children: [
|
|
1758
1785
|
/* @__PURE__ */ e(
|
|
1759
|
-
|
|
1786
|
+
rn,
|
|
1760
1787
|
{
|
|
1761
1788
|
placeholder: "Type something...",
|
|
1762
1789
|
value: o,
|
|
@@ -1771,21 +1798,21 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1771
1798
|
}
|
|
1772
1799
|
),
|
|
1773
1800
|
/* @__PURE__ */ s(
|
|
1774
|
-
|
|
1801
|
+
O,
|
|
1775
1802
|
{
|
|
1776
1803
|
style: { overflow: "hidden", overflowY: "auto" },
|
|
1777
1804
|
overflow: "auto",
|
|
1778
1805
|
px: 4,
|
|
1779
1806
|
flex: 1,
|
|
1780
1807
|
children: [
|
|
1781
|
-
i === "start" && /* @__PURE__ */ e(
|
|
1782
|
-
a?.length === 0 && /* @__PURE__ */ e(
|
|
1783
|
-
i === "end" && (a?.length ?? 0) > 0 && /* @__PURE__ */ s(
|
|
1784
|
-
/* @__PURE__ */ s(
|
|
1808
|
+
i === "start" && /* @__PURE__ */ e(b, { children: "Searching ..." }),
|
|
1809
|
+
a?.length === 0 && /* @__PURE__ */ e(b, { children: "No results" }),
|
|
1810
|
+
i === "end" && (a?.length ?? 0) > 0 && /* @__PURE__ */ s(O, { children: [
|
|
1811
|
+
/* @__PURE__ */ s(b, { fontSize: "md", children: [
|
|
1785
1812
|
a?.length,
|
|
1786
1813
|
" result(s)"
|
|
1787
1814
|
] }),
|
|
1788
|
-
/* @__PURE__ */ e(
|
|
1815
|
+
/* @__PURE__ */ e(O, { gap: 0, children: d?.map((u, p) => /* @__PURE__ */ e(
|
|
1789
1816
|
ro,
|
|
1790
1817
|
{
|
|
1791
1818
|
contextText: u.meta?.range?.startContainer.parentElement?.textContent ?? "",
|
|
@@ -1804,7 +1831,7 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1804
1831
|
)
|
|
1805
1832
|
] });
|
|
1806
1833
|
}
|
|
1807
|
-
), so =
|
|
1834
|
+
), so = g(
|
|
1808
1835
|
({
|
|
1809
1836
|
open: n,
|
|
1810
1837
|
setOpen: t,
|
|
@@ -1826,25 +1853,25 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1826
1853
|
] })
|
|
1827
1854
|
}
|
|
1828
1855
|
)
|
|
1829
|
-
), co =
|
|
1856
|
+
), co = g(
|
|
1830
1857
|
({ onNavigate: n }) => {
|
|
1831
|
-
const t =
|
|
1858
|
+
const t = m(), { manifest: o, assumedRenditionLayout: r } = S(() => t?.context, [t]) ?? {}, { nav: i } = o ?? {}, a = te();
|
|
1832
1859
|
i?.toc;
|
|
1833
1860
|
const { beginSpineItemIndex: l, beginPageIndexInSpineItem: c } = a ?? {}, d = (r === "reflowable" ? c : l) || 0;
|
|
1834
1861
|
let u = a?.beginChapterInfo;
|
|
1835
1862
|
for (; u?.subChapter; )
|
|
1836
1863
|
u = u?.subChapter;
|
|
1837
|
-
const p = (h,
|
|
1864
|
+
const p = (h, C, v) => /* @__PURE__ */ s(an.Fragment, { children: [
|
|
1838
1865
|
/* @__PURE__ */ e(
|
|
1839
1866
|
B.Item,
|
|
1840
1867
|
{
|
|
1841
|
-
pl: 4 * (
|
|
1868
|
+
pl: 4 * (v + 1),
|
|
1842
1869
|
style: {
|
|
1843
1870
|
display: "flex",
|
|
1844
1871
|
alignItems: "center"
|
|
1845
1872
|
},
|
|
1846
1873
|
children: /* @__PURE__ */ s(
|
|
1847
|
-
|
|
1874
|
+
ve,
|
|
1848
1875
|
{
|
|
1849
1876
|
onClick: () => {
|
|
1850
1877
|
n(), t?.navigation.goToUrl(h.href);
|
|
@@ -1853,10 +1880,10 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1853
1880
|
children: [
|
|
1854
1881
|
u?.path === h.path && /* @__PURE__ */ e(B.Indicator, { asChild: !0, children: /* @__PURE__ */ e(we, {}) }),
|
|
1855
1882
|
u?.path !== h.path && /* @__PURE__ */ e(B.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ e(we, {}) }),
|
|
1856
|
-
/* @__PURE__ */ s(
|
|
1857
|
-
/* @__PURE__ */ e(
|
|
1883
|
+
/* @__PURE__ */ s(O, { gap: 0, children: [
|
|
1884
|
+
/* @__PURE__ */ e(b, { fontSize: "md", children: h.title || h.path }),
|
|
1858
1885
|
u?.path === h.path && /* @__PURE__ */ e(
|
|
1859
|
-
|
|
1886
|
+
b,
|
|
1860
1887
|
{
|
|
1861
1888
|
fontStyle: "italic",
|
|
1862
1889
|
fontWeight: "bold",
|
|
@@ -1871,12 +1898,12 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1871
1898
|
}
|
|
1872
1899
|
),
|
|
1873
1900
|
h.contents.length > 0 && /* @__PURE__ */ e(B.Root, { as: "div", gap: 2, children: h.contents.map(
|
|
1874
|
-
(
|
|
1901
|
+
(R, D) => p(R, D, v + 1)
|
|
1875
1902
|
) })
|
|
1876
|
-
] },
|
|
1877
|
-
return /* @__PURE__ */ e(B.Root, { gap: 3, overflowY: "auto", py: 4, flex: 1, children: i?.toc.map((h,
|
|
1903
|
+
] }, C);
|
|
1904
|
+
return /* @__PURE__ */ e(B.Root, { gap: 3, overflowY: "auto", py: 4, flex: 1, children: i?.toc.map((h, C) => p(h, C, 0)) });
|
|
1878
1905
|
}
|
|
1879
|
-
), uo =
|
|
1906
|
+
), uo = g(
|
|
1880
1907
|
({
|
|
1881
1908
|
open: n,
|
|
1882
1909
|
setOpen: t,
|
|
@@ -1899,46 +1926,46 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1899
1926
|
}
|
|
1900
1927
|
)
|
|
1901
1928
|
), ho = () => {
|
|
1902
|
-
const n =
|
|
1903
|
-
|
|
1929
|
+
const n = m(), { zoomMaxScale: t } = y(["zoomMaxScale"]);
|
|
1930
|
+
$(
|
|
1904
1931
|
function() {
|
|
1905
1932
|
n?.gestures.settings.update({
|
|
1906
|
-
zoomMaxScale: t ??
|
|
1933
|
+
zoomMaxScale: t ?? We
|
|
1907
1934
|
});
|
|
1908
1935
|
},
|
|
1909
1936
|
[n, t]
|
|
1910
1937
|
);
|
|
1911
|
-
}, Ee = 0.5, Ae = 1,
|
|
1938
|
+
}, Ee = 0.5, Ae = 1, po = (n, t, o, r) => {
|
|
1912
1939
|
if (n > t && n < t + r)
|
|
1913
1940
|
return t + r;
|
|
1914
1941
|
const i = Math.min(Math.max(n, t), o), a = Math.round((i - t) / r) * r + t;
|
|
1915
1942
|
return Math.round(a * 100) / 100;
|
|
1916
|
-
},
|
|
1917
|
-
const { quickMenuBottomBarBoundingBoxSignal: n, zoomMaxScale: t =
|
|
1943
|
+
}, go = g(() => {
|
|
1944
|
+
const { quickMenuBottomBarBoundingBoxSignal: n, zoomMaxScale: t = We } = y([
|
|
1918
1945
|
"quickMenuBottomBarBoundingBoxSignal",
|
|
1919
1946
|
"zoomMaxScale"
|
|
1920
|
-
]), o =
|
|
1947
|
+
]), o = be(
|
|
1921
1948
|
n
|
|
1922
|
-
), r =
|
|
1949
|
+
), r = m(), i = S(
|
|
1923
1950
|
() => r?.zoom.state$.pipe(
|
|
1924
|
-
|
|
1925
|
-
|
|
1951
|
+
E((d) => d.currentScale),
|
|
1952
|
+
De(100, Bn, {
|
|
1926
1953
|
leading: !0,
|
|
1927
1954
|
trailing: !0
|
|
1928
1955
|
})
|
|
1929
1956
|
),
|
|
1930
1957
|
[r]
|
|
1931
|
-
) ?? 1, a =
|
|
1932
|
-
() => r?.zoom.state$.pipe(
|
|
1958
|
+
) ?? 1, a = S(
|
|
1959
|
+
() => r?.zoom.state$.pipe(E((d) => d.isZooming)),
|
|
1933
1960
|
[r]
|
|
1934
|
-
) ?? !1, l =
|
|
1961
|
+
) ?? !1, l = po(
|
|
1935
1962
|
i,
|
|
1936
1963
|
Ae,
|
|
1937
1964
|
t,
|
|
1938
1965
|
Ee
|
|
1939
1966
|
), c = o?.borderBoxSize?.[0]?.blockSize ?? 1;
|
|
1940
1967
|
return /* @__PURE__ */ e(
|
|
1941
|
-
|
|
1968
|
+
de,
|
|
1942
1969
|
{
|
|
1943
1970
|
present: a && i > 1,
|
|
1944
1971
|
animationName: { _open: "fade-in", _closed: "fade-out" },
|
|
@@ -1951,7 +1978,7 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1951
1978
|
borderRadius: "md",
|
|
1952
1979
|
p: 4,
|
|
1953
1980
|
children: /* @__PURE__ */ e(
|
|
1954
|
-
|
|
1981
|
+
Oe,
|
|
1955
1982
|
{
|
|
1956
1983
|
value: [l],
|
|
1957
1984
|
min: Ae,
|
|
@@ -1968,28 +1995,27 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
1968
1995
|
)
|
|
1969
1996
|
}
|
|
1970
1997
|
);
|
|
1971
|
-
}),
|
|
1972
|
-
/* @__PURE__ */ e(
|
|
1973
|
-
/* @__PURE__ */ e(
|
|
1974
|
-
] }))),
|
|
1998
|
+
}), fo = { _open: "fade-in", _closed: "fade-out" }, mo = g(() => (ft(), null)), bo = g(() => (ho(), $t(), Nt(), no(), mt(), /* @__PURE__ */ s(ce, { children: [
|
|
1999
|
+
/* @__PURE__ */ e(Rt, {}),
|
|
2000
|
+
/* @__PURE__ */ e(mo, {})
|
|
2001
|
+
] }))), So = g(
|
|
1975
2002
|
({
|
|
1976
2003
|
children: n,
|
|
1977
2004
|
...t
|
|
1978
2005
|
}) => {
|
|
1979
|
-
const { enableFloatingTime: o,
|
|
2006
|
+
const { enableFloatingTime: o, onItemClick: r } = y([
|
|
1980
2007
|
"enableFloatingTime",
|
|
1981
|
-
"enableFloatingProgress",
|
|
1982
2008
|
"onItemClick"
|
|
1983
|
-
]), [
|
|
1984
|
-
|
|
1985
|
-
}, [
|
|
1986
|
-
(
|
|
1987
|
-
|
|
2009
|
+
]), [i, a] = w(!1), [l, c] = w(!1), [d, u] = w(!1), [p, h] = w(void 0), [C, v] = w(!1), [R, D] = Te(), x = z(() => {
|
|
2010
|
+
a(!1), c(!1), u(!1), h(void 0), D(!1), v(!1);
|
|
2011
|
+
}, [D]), L = z(
|
|
2012
|
+
(I) => {
|
|
2013
|
+
I === "annotations" ? h("annotations") : I === "search" ? u(!0) : I === "help" ? c(!0) : I === "toc" ? a(!0) : I === "bookmarks" ? h("bookmarks") : I === "gallery" && v(!0), r?.(I);
|
|
1988
2014
|
},
|
|
1989
|
-
[
|
|
2015
|
+
[r]
|
|
1990
2016
|
);
|
|
1991
|
-
return /* @__PURE__ */ s(
|
|
1992
|
-
/* @__PURE__ */ e(
|
|
2017
|
+
return /* @__PURE__ */ s(ce, { children: [
|
|
2018
|
+
/* @__PURE__ */ e(bo, {}),
|
|
1993
2019
|
/* @__PURE__ */ s(
|
|
1994
2020
|
_,
|
|
1995
2021
|
{
|
|
@@ -2003,75 +2029,67 @@ const Gt = le.Root, qt = le.ValueText, Me = () => {
|
|
|
2003
2029
|
...t,
|
|
2004
2030
|
children: [
|
|
2005
2031
|
n,
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
{
|
|
2009
|
-
present: !D,
|
|
2010
|
-
animationName: Be,
|
|
2011
|
-
animationDuration: "moderate",
|
|
2012
|
-
children: /* @__PURE__ */ e(Ft, {})
|
|
2013
|
-
}
|
|
2014
|
-
),
|
|
2015
|
-
/* @__PURE__ */ e(Pt, { open: I, setOpen: x }),
|
|
2032
|
+
/* @__PURE__ */ e(Ft, {}),
|
|
2033
|
+
/* @__PURE__ */ e(yt, { open: C, setOpen: v }),
|
|
2016
2034
|
/* @__PURE__ */ e(oo, {}),
|
|
2017
|
-
/* @__PURE__ */ e(eo, { onItemClick:
|
|
2018
|
-
/* @__PURE__ */ e(
|
|
2019
|
-
/* @__PURE__ */ e(
|
|
2020
|
-
/* @__PURE__ */ e(
|
|
2021
|
-
/* @__PURE__ */ e(
|
|
2035
|
+
/* @__PURE__ */ e(eo, { onItemClick: L }),
|
|
2036
|
+
/* @__PURE__ */ e(go, {}),
|
|
2037
|
+
/* @__PURE__ */ e(Ot, {}),
|
|
2038
|
+
/* @__PURE__ */ e(gt, {}),
|
|
2039
|
+
/* @__PURE__ */ e(At, { open: l, setOpen: c }),
|
|
2022
2040
|
/* @__PURE__ */ e(
|
|
2023
2041
|
uo,
|
|
2024
2042
|
{
|
|
2025
|
-
open:
|
|
2026
|
-
setOpen:
|
|
2027
|
-
onNavigate:
|
|
2043
|
+
open: i,
|
|
2044
|
+
setOpen: a,
|
|
2045
|
+
onNavigate: x
|
|
2028
2046
|
}
|
|
2029
2047
|
),
|
|
2030
2048
|
/* @__PURE__ */ e(
|
|
2031
2049
|
so,
|
|
2032
2050
|
{
|
|
2033
|
-
open:
|
|
2034
|
-
setOpen:
|
|
2035
|
-
onNavigate:
|
|
2051
|
+
open: d,
|
|
2052
|
+
setOpen: u,
|
|
2053
|
+
onNavigate: x
|
|
2036
2054
|
}
|
|
2037
2055
|
),
|
|
2038
2056
|
/* @__PURE__ */ e(
|
|
2039
|
-
|
|
2057
|
+
ct,
|
|
2040
2058
|
{
|
|
2041
|
-
openWith:
|
|
2042
|
-
setOpen: (
|
|
2043
|
-
onNavigate:
|
|
2059
|
+
openWith: p,
|
|
2060
|
+
setOpen: (I) => h(I ? "annotations" : void 0),
|
|
2061
|
+
onNavigate: x
|
|
2044
2062
|
}
|
|
2045
2063
|
),
|
|
2046
2064
|
/* @__PURE__ */ e(
|
|
2047
|
-
|
|
2065
|
+
de,
|
|
2048
2066
|
{
|
|
2049
|
-
present: o ||
|
|
2050
|
-
animationName:
|
|
2067
|
+
present: o || R,
|
|
2068
|
+
animationName: fo,
|
|
2051
2069
|
animationDuration: "slow",
|
|
2052
2070
|
overflow: "hidden",
|
|
2053
2071
|
children: /* @__PURE__ */ e(Lt, {})
|
|
2054
2072
|
}
|
|
2055
2073
|
),
|
|
2056
|
-
/* @__PURE__ */ e(
|
|
2074
|
+
/* @__PURE__ */ e(bt, {})
|
|
2057
2075
|
]
|
|
2058
2076
|
}
|
|
2059
2077
|
)
|
|
2060
2078
|
] });
|
|
2061
2079
|
}
|
|
2062
|
-
),
|
|
2080
|
+
), Lo = g(
|
|
2063
2081
|
({
|
|
2064
2082
|
children: n,
|
|
2065
2083
|
slots: t,
|
|
2066
2084
|
...o
|
|
2067
2085
|
}) => {
|
|
2068
2086
|
const { container: { props: r = {} } = {} } = t ?? {};
|
|
2069
|
-
return /* @__PURE__ */ e(
|
|
2087
|
+
return /* @__PURE__ */ e(Ct, { ...o, children: /* @__PURE__ */ e(So, { ...r, children: n }) });
|
|
2070
2088
|
}
|
|
2071
2089
|
);
|
|
2072
2090
|
export {
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2091
|
+
nt as BOOKMARK_AREA_DATA_ATTRIBUTE,
|
|
2092
|
+
We as MAX_ZOOM_SCALE,
|
|
2093
|
+
Lo as ReactReader
|
|
2076
2094
|
};
|
|
2077
2095
|
//# sourceMappingURL=index.js.map
|