@prose-reader/react-reader 1.258.0 → 1.259.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/ReactReader.d.ts +11 -5
- package/dist/common/useMemoCompare.d.ts +1 -0
- package/dist/context/ReactReaderProvider.d.ts +5 -11
- package/dist/context/context.d.ts +16 -9
- package/dist/index.d.ts +0 -1
- package/dist/index.js +630 -631
- 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,23 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as l, Fragment as de } from "react/jsx-runtime";
|
|
2
|
+
import { IconButton as R, Portal as ve, Dialog as z, List as A, Link as xe, Stack as O, Text as b, Tabs as E, Button as W, Presence as le, Box as F, createToaster as Je, Toaster as en, Toast as ee, Spinner as nn, RadioGroup as re, Slider as w, HStack as D, For as tn, useMediaQuery as on, Fieldset as $, Heading as be, Kbd as Me, Popover as ne, Progress as se, chakra as rn, Collapsible as Ce, Field as oe, Input as an } from "@chakra-ui/react";
|
|
3
|
+
import * as B from "react";
|
|
4
|
+
import ln, { createContext as sn, useContext as De, memo as g, useState as y, useEffect as q, useRef as Fe, useMemo as _e, useCallback as M, useLayoutEffect as cn } from "react";
|
|
5
|
+
import { LuX as dn, LuNotebookPen as he, LuBookmark as un, LuCheck as hn, LuArrowBigRight as pn, LuArrowBigLeft as gn, LuChevronDown as fn, LuCircleHelp as mn, LuTableOfContents as bn, LuSearch as Cn, LuZoomOut as Sn, LuZoomIn as vn, LuGalleryHorizontal as xn, LuCircleCheck as ze } from "react-icons/lu";
|
|
6
|
+
import { signal as N, useObserve as C, isDefined as Le, useConstant as ie, useSignalValue as ue, useLiveRef as kn, useSubscribe as fe, useSignalState as In } from "reactjrx";
|
|
7
|
+
import { Subject as Rn, map as L, filter as pe, switchMap as H, EMPTY as we, of as ge, withLatestFrom as On, NEVER as ke, startWith as Tn, distinctUntilChanged as Ve, throttleTime as $e, tap as Mn, first as Ne, combineLatest as zn, mergeMap as wn, Observable as yn, skip as Pn, merge as He, timer as We, finalize as En, BehaviorSubject as Bn, animationFrameScheduler as An } from "rxjs";
|
|
8
8
|
import { createPortal as Dn } from "react-dom";
|
|
9
9
|
import { isPositionInArea as Fn } from "@prose-reader/enhancer-gestures";
|
|
10
|
-
import { isShallowEqual as _n
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import Xn from "
|
|
10
|
+
import { isShallowEqual as _n } from "@prose-reader/shared";
|
|
11
|
+
import { isShallowEqual as Ln, observeIntersection as Vn, isHtmlTagElement as $n } from "@prose-reader/core";
|
|
12
|
+
import { BiFontSize as Nn } from "react-icons/bi";
|
|
13
|
+
import { BsBookmarks as Hn } from "react-icons/bs";
|
|
14
|
+
import { MdOutlineFitScreen as Wn, MdFullscreenExit as qn, MdFullscreen as Gn } from "react-icons/md";
|
|
15
|
+
import { RiGalleryView2 as jn } from "react-icons/ri";
|
|
16
|
+
import { RxDoubleArrowUp as Qn, RxDoubleArrowLeft as Un, 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";
|
|
18
19
|
import "rc-slider/assets/index.css";
|
|
19
|
-
import { IoIosArrowBack as
|
|
20
|
-
const
|
|
20
|
+
import { IoIosArrowBack as Jn, IoMdMore as et } from "react-icons/io";
|
|
21
|
+
const nt = "data-bookmark-area", tt = B.forwardRef(function(t, o) {
|
|
22
|
+
return /* @__PURE__ */ e(R, { variant: "ghost", "aria-label": "Close", ref: o, ...t, children: t.children ?? /* @__PURE__ */ e(dn, {}) });
|
|
23
|
+
}), G = B.forwardRef(function(t, o) {
|
|
24
|
+
const {
|
|
25
|
+
children: r,
|
|
26
|
+
portalled: i = !0,
|
|
27
|
+
portalRef: a,
|
|
28
|
+
backdrop: s = !0,
|
|
29
|
+
...c
|
|
30
|
+
} = t;
|
|
31
|
+
return /* @__PURE__ */ l(ve, { disabled: !i, container: a, children: [
|
|
32
|
+
s && /* @__PURE__ */ e(z.Backdrop, {}),
|
|
33
|
+
/* @__PURE__ */ e(z.Positioner, { children: /* @__PURE__ */ e(z.Content, { ref: o, ...c, asChild: !1, children: r }) })
|
|
34
|
+
] });
|
|
35
|
+
}), j = B.forwardRef(function(t, o) {
|
|
36
|
+
return /* @__PURE__ */ e(
|
|
37
|
+
z.CloseTrigger,
|
|
38
|
+
{
|
|
39
|
+
position: "absolute",
|
|
40
|
+
top: "2",
|
|
41
|
+
insetEnd: "2",
|
|
42
|
+
...t,
|
|
43
|
+
asChild: !0,
|
|
44
|
+
children: /* @__PURE__ */ e(tt, { size: "sm", ref: o, children: t.children })
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}), Q = z.Root, U = z.Footer, Y = z.Header, Z = z.Body;
|
|
48
|
+
z.Backdrop;
|
|
49
|
+
const X = z.Title;
|
|
50
|
+
z.Description;
|
|
51
|
+
z.Trigger;
|
|
52
|
+
const K = z.ActionTrigger, qe = () => ({
|
|
21
53
|
reader: void 0,
|
|
22
54
|
quickMenuOpen: !1,
|
|
23
55
|
onQuickMenuOpenChange: () => {
|
|
@@ -25,7 +57,7 @@ const et = "data-bookmark-area", We = () => ({
|
|
|
25
57
|
quickMenuBottomBarBoundingBoxSignal: N({
|
|
26
58
|
default: void 0
|
|
27
59
|
}),
|
|
28
|
-
notificationsSubject: new
|
|
60
|
+
notificationsSubject: new Rn(),
|
|
29
61
|
refitMenuOpen: !1,
|
|
30
62
|
onRefitMenuOpenChange: () => {
|
|
31
63
|
},
|
|
@@ -35,160 +67,39 @@ const et = "data-bookmark-area", We = () => ({
|
|
|
35
67
|
fontSizeMin: 0.2,
|
|
36
68
|
fontSizeMax: 5,
|
|
37
69
|
uncontrolledFontSize: 1
|
|
38
|
-
}),
|
|
39
|
-
N({ default:
|
|
40
|
-
),
|
|
41
|
-
const t =
|
|
70
|
+
}), Ie = sn(
|
|
71
|
+
N({ default: qe() })
|
|
72
|
+
), _ = (n) => {
|
|
73
|
+
const t = De(Ie);
|
|
42
74
|
return C(t, n);
|
|
43
|
-
},
|
|
44
|
-
const { reader: n } =
|
|
75
|
+
}, ot = () => De(Ie), S = () => {
|
|
76
|
+
const { reader: n } = _(["reader"]);
|
|
45
77
|
return n;
|
|
46
|
-
}, Ge = (n) => !!n && "__PROSE_READER_ENHANCER_SEARCH" in n,
|
|
47
|
-
const
|
|
48
|
-
"fontSize",
|
|
49
|
-
"uncontrolledFontSize"
|
|
50
|
-
]), r = t ?? o;
|
|
51
|
-
return G(() => {
|
|
52
|
-
if (n && r) {
|
|
53
|
-
const i = setTimeout(() => {
|
|
54
|
-
n.settings.update({
|
|
55
|
-
fontScale: r
|
|
56
|
-
});
|
|
57
|
-
}, 200);
|
|
58
|
-
return () => clearTimeout(i);
|
|
59
|
-
}
|
|
60
|
-
}, [n, r]), null;
|
|
61
|
-
}, ot = ({
|
|
62
|
-
children: n,
|
|
63
|
-
onQuickMenuOpenChange: t,
|
|
64
|
-
quickMenuOpen: o,
|
|
65
|
-
fontSizeScope: r,
|
|
66
|
-
onFontSizeScopeChange: i,
|
|
67
|
-
fontSize: a,
|
|
68
|
-
onFontSizeChange: s,
|
|
69
|
-
...c
|
|
70
|
-
}) => {
|
|
71
|
-
const d = ie(() => N({ default: We() })), u = ie(
|
|
72
|
-
() => N({ default: d.value.fontSizeMenuOpen })
|
|
73
|
-
), p = ue(
|
|
74
|
-
u
|
|
75
|
-
), h = z(
|
|
76
|
-
(L) => {
|
|
77
|
-
u.update(L);
|
|
78
|
-
},
|
|
79
|
-
[u]
|
|
80
|
-
), m = ie(
|
|
81
|
-
() => N({ default: d.value.quickMenuOpen })
|
|
82
|
-
), x = z(
|
|
83
|
-
(L) => {
|
|
84
|
-
m.update(L);
|
|
85
|
-
},
|
|
86
|
-
[m]
|
|
87
|
-
), k = ue(
|
|
88
|
-
m
|
|
89
|
-
), T = o ?? k, S = t ?? x, R = ie(
|
|
90
|
-
() => N({ default: d.value.refitMenuOpen })
|
|
91
|
-
), E = z(
|
|
92
|
-
(L) => {
|
|
93
|
-
R.update(L);
|
|
94
|
-
},
|
|
95
|
-
[R]
|
|
96
|
-
), M = ue(
|
|
97
|
-
R
|
|
98
|
-
);
|
|
99
|
-
return G(() => {
|
|
100
|
-
d.update((L) => ({
|
|
101
|
-
...L,
|
|
102
|
-
...c,
|
|
103
|
-
onQuickMenuOpenChange: S,
|
|
104
|
-
quickMenuOpen: T,
|
|
105
|
-
onFontSizeMenuOpenChange: h,
|
|
106
|
-
fontSizeMenuOpen: p,
|
|
107
|
-
onRefitMenuOpenChange: E,
|
|
108
|
-
refitMenuOpen: M,
|
|
109
|
-
fontSizeScope: r,
|
|
110
|
-
onFontSizeScopeChange: i,
|
|
111
|
-
fontSize: a,
|
|
112
|
-
onFontSizeChange: s
|
|
113
|
-
}));
|
|
114
|
-
}, [
|
|
115
|
-
...Object.values(c),
|
|
116
|
-
T,
|
|
117
|
-
S,
|
|
118
|
-
r,
|
|
119
|
-
i,
|
|
120
|
-
a,
|
|
121
|
-
s,
|
|
122
|
-
d,
|
|
123
|
-
p,
|
|
124
|
-
h,
|
|
125
|
-
M,
|
|
126
|
-
E
|
|
127
|
-
]), /* @__PURE__ */ e(Re.Provider, { value: d, children: n });
|
|
128
|
-
}, Eo = f(
|
|
129
|
-
({
|
|
130
|
-
children: n,
|
|
131
|
-
...t
|
|
132
|
-
}) => /* @__PURE__ */ l(ot, { ...t, children: [
|
|
133
|
-
/* @__PURE__ */ e(tt, {}),
|
|
134
|
-
n
|
|
135
|
-
] })
|
|
136
|
-
), rt = A.forwardRef(function(t, o) {
|
|
137
|
-
return /* @__PURE__ */ e(I, { variant: "ghost", "aria-label": "Close", ref: o, ...t, children: t.children ?? /* @__PURE__ */ e(In, {}) });
|
|
138
|
-
}), j = A.forwardRef(function(t, o) {
|
|
139
|
-
const {
|
|
140
|
-
children: r,
|
|
141
|
-
portalled: i = !0,
|
|
142
|
-
portalRef: a,
|
|
143
|
-
backdrop: s = !0,
|
|
144
|
-
...c
|
|
145
|
-
} = t;
|
|
146
|
-
return /* @__PURE__ */ l(ke, { disabled: !i, container: a, children: [
|
|
147
|
-
s && /* @__PURE__ */ e(w.Backdrop, {}),
|
|
148
|
-
/* @__PURE__ */ e(w.Positioner, { children: /* @__PURE__ */ e(w.Content, { ref: o, ...c, asChild: !1, children: r }) })
|
|
149
|
-
] });
|
|
150
|
-
}), Q = A.forwardRef(function(t, o) {
|
|
151
|
-
return /* @__PURE__ */ e(
|
|
152
|
-
w.CloseTrigger,
|
|
153
|
-
{
|
|
154
|
-
position: "absolute",
|
|
155
|
-
top: "2",
|
|
156
|
-
insetEnd: "2",
|
|
157
|
-
...t,
|
|
158
|
-
asChild: !0,
|
|
159
|
-
children: /* @__PURE__ */ e(rt, { size: "sm", ref: o, children: t.children })
|
|
160
|
-
}
|
|
161
|
-
);
|
|
162
|
-
}), U = w.Root, Y = w.Footer, Z = w.Header, X = w.Body;
|
|
163
|
-
w.Backdrop;
|
|
164
|
-
const K = w.Title;
|
|
165
|
-
w.Description;
|
|
166
|
-
w.Trigger;
|
|
167
|
-
const J = w.ActionTrigger, it = (n) => {
|
|
168
|
-
const t = v(), o = de(t) ? t : void 0;
|
|
78
|
+
}, Ge = (n) => !!n && "__PROSE_READER_ENHANCER_SEARCH" in n, ce = (n) => !!n && "__PROSE_READER_ENHANCER_ANNOTATIONS" in n, je = (n) => !!n && "__PROSE_READER_ENHANCER_GALLERY" in n, Qe = (n) => !!n && "__PROSE_READER_ENHANCER_REFIT" in n, rt = (n) => {
|
|
79
|
+
const t = S(), o = ce(t) ? t : void 0;
|
|
169
80
|
return { data: C(
|
|
170
81
|
() => o?.annotations.annotations$.pipe(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
82
|
+
L((i) => i.find((a) => a.id === n)),
|
|
83
|
+
pe(Le),
|
|
84
|
+
H((i) => o.locateResource(i))
|
|
174
85
|
),
|
|
175
86
|
[o]
|
|
176
87
|
) };
|
|
177
|
-
},
|
|
88
|
+
}, Ue = ({
|
|
178
89
|
id: n,
|
|
179
90
|
onNavigate: t,
|
|
180
91
|
allowLeftIcon: o = !0
|
|
181
92
|
}) => {
|
|
182
|
-
const r =
|
|
183
|
-
return /* @__PURE__ */ e(
|
|
184
|
-
|
|
93
|
+
const r = S(), { data: i } = rt(n), a = i?.meta.range?.toString() || i?.meta.node?.textContent;
|
|
94
|
+
return /* @__PURE__ */ e(A.Item, { children: /* @__PURE__ */ l(
|
|
95
|
+
xe,
|
|
185
96
|
{
|
|
186
97
|
href: "#",
|
|
187
98
|
onClick: () => {
|
|
188
99
|
t(), r?.navigation.goToCfi(i?.meta.cfi ?? "");
|
|
189
100
|
},
|
|
190
101
|
children: [
|
|
191
|
-
i?.resource?.notes ? /* @__PURE__ */ e(
|
|
102
|
+
i?.resource?.notes ? /* @__PURE__ */ e(A.Indicator, { asChild: !0, children: /* @__PURE__ */ e(he, {}) }) : o ? /* @__PURE__ */ e(A.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ e(he, {}) }) : null,
|
|
192
103
|
/* @__PURE__ */ l(O, { gap: 0, children: [
|
|
193
104
|
a ? /* @__PURE__ */ e(b, { lineClamp: 2, fontSize: "md", children: a }) : /* @__PURE__ */ l(b, { lineClamp: 2, fontSize: "md", fontStyle: "italic", children: [
|
|
194
105
|
"Page ",
|
|
@@ -207,42 +118,42 @@ const J = w.ActionTrigger, it = (n) => {
|
|
|
207
118
|
]
|
|
208
119
|
}
|
|
209
120
|
) });
|
|
210
|
-
},
|
|
211
|
-
const n =
|
|
121
|
+
}, me = () => {
|
|
122
|
+
const n = S(), t = ce(n) ? n : void 0;
|
|
212
123
|
return { data: C(
|
|
213
124
|
() => t?.annotations.annotations$.pipe(
|
|
214
|
-
|
|
125
|
+
H(
|
|
215
126
|
(r) => t.locateResource(r)
|
|
216
127
|
)
|
|
217
128
|
),
|
|
218
129
|
[t]
|
|
219
130
|
) };
|
|
220
|
-
},
|
|
221
|
-
const { data: n } =
|
|
131
|
+
}, it = () => {
|
|
132
|
+
const { data: n } = me();
|
|
222
133
|
return {
|
|
223
134
|
data: n?.filter((t) => t.meta.isCfiRange)
|
|
224
135
|
};
|
|
225
|
-
},
|
|
226
|
-
const { data: t } =
|
|
227
|
-
return /* @__PURE__ */ e(
|
|
228
|
-
|
|
136
|
+
}, at = ({ onNavigate: n }) => {
|
|
137
|
+
const { data: t } = it();
|
|
138
|
+
return /* @__PURE__ */ e(A.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: t?.map((o) => /* @__PURE__ */ e(
|
|
139
|
+
Ue,
|
|
229
140
|
{
|
|
230
141
|
id: o.resource.id,
|
|
231
142
|
onNavigate: n
|
|
232
143
|
},
|
|
233
144
|
o.resource.id
|
|
234
145
|
)) });
|
|
235
|
-
},
|
|
236
|
-
const { data: n } =
|
|
146
|
+
}, lt = () => {
|
|
147
|
+
const { data: n } = me();
|
|
237
148
|
return {
|
|
238
149
|
data: n?.filter(
|
|
239
150
|
(t) => !t.meta.isCfiRange && !t.resource.notes
|
|
240
151
|
)
|
|
241
152
|
};
|
|
242
|
-
},
|
|
243
|
-
const { data: t } =
|
|
244
|
-
return /* @__PURE__ */ e(
|
|
245
|
-
|
|
153
|
+
}, st = ({ onNavigate: n }) => {
|
|
154
|
+
const { data: t } = lt();
|
|
155
|
+
return /* @__PURE__ */ e(A.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: t?.map((o) => /* @__PURE__ */ e(
|
|
156
|
+
Ue,
|
|
246
157
|
{
|
|
247
158
|
id: o.resource.id,
|
|
248
159
|
onNavigate: n,
|
|
@@ -250,42 +161,42 @@ const J = w.ActionTrigger, it = (n) => {
|
|
|
250
161
|
},
|
|
251
162
|
o.resource.id
|
|
252
163
|
)) });
|
|
253
|
-
},
|
|
164
|
+
}, ct = g(
|
|
254
165
|
({
|
|
255
166
|
onNavigate: n,
|
|
256
167
|
defaultTab: t
|
|
257
168
|
}) => {
|
|
258
|
-
const [o, r] =
|
|
169
|
+
const [o, r] = y(t ?? "bookmarks");
|
|
259
170
|
return /* @__PURE__ */ l(
|
|
260
|
-
|
|
171
|
+
E.Root,
|
|
261
172
|
{
|
|
262
173
|
value: o,
|
|
263
174
|
onValueChange: (i) => r(i.value),
|
|
264
175
|
children: [
|
|
265
|
-
/* @__PURE__ */ l(
|
|
266
|
-
/* @__PURE__ */ l(
|
|
267
|
-
/* @__PURE__ */ e(
|
|
176
|
+
/* @__PURE__ */ l(E.List, { children: [
|
|
177
|
+
/* @__PURE__ */ l(E.Trigger, { value: "bookmarks", children: [
|
|
178
|
+
/* @__PURE__ */ e(un, {}),
|
|
268
179
|
"Bookmarks"
|
|
269
180
|
] }),
|
|
270
|
-
/* @__PURE__ */ l(
|
|
271
|
-
/* @__PURE__ */ e(
|
|
181
|
+
/* @__PURE__ */ l(E.Trigger, { value: "annotations", children: [
|
|
182
|
+
/* @__PURE__ */ e(he, {}),
|
|
272
183
|
"Annotations"
|
|
273
184
|
] }),
|
|
274
|
-
/* @__PURE__ */ e(
|
|
185
|
+
/* @__PURE__ */ e(E.Indicator, {})
|
|
275
186
|
] }),
|
|
276
|
-
/* @__PURE__ */ e(
|
|
277
|
-
/* @__PURE__ */ e(
|
|
187
|
+
/* @__PURE__ */ e(E.Content, { value: "bookmarks", children: /* @__PURE__ */ e(st, { onNavigate: n }) }),
|
|
188
|
+
/* @__PURE__ */ e(E.Content, { value: "annotations", children: /* @__PURE__ */ e(at, { onNavigate: n }) })
|
|
278
189
|
]
|
|
279
190
|
}
|
|
280
191
|
);
|
|
281
192
|
}
|
|
282
|
-
),
|
|
193
|
+
), dt = g(
|
|
283
194
|
({
|
|
284
195
|
openWith: n,
|
|
285
196
|
setOpen: t,
|
|
286
197
|
onNavigate: o
|
|
287
198
|
}) => /* @__PURE__ */ e(
|
|
288
|
-
|
|
199
|
+
Q,
|
|
289
200
|
{
|
|
290
201
|
lazyMount: !0,
|
|
291
202
|
placement: "center",
|
|
@@ -293,67 +204,67 @@ const J = w.ActionTrigger, it = (n) => {
|
|
|
293
204
|
onOpenChange: (r) => t(r.open),
|
|
294
205
|
size: { mdDown: "full", md: "lg" },
|
|
295
206
|
scrollBehavior: "inside",
|
|
296
|
-
children: /* @__PURE__ */ l(
|
|
297
|
-
/* @__PURE__ */ e(
|
|
298
|
-
/* @__PURE__ */ e(
|
|
299
|
-
|
|
207
|
+
children: /* @__PURE__ */ l(G, { height: "100%", children: [
|
|
208
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Annotations" }) }),
|
|
209
|
+
/* @__PURE__ */ e(Z, { flex: 1, children: /* @__PURE__ */ e(
|
|
210
|
+
ct,
|
|
300
211
|
{
|
|
301
212
|
onNavigate: o,
|
|
302
213
|
defaultTab: n
|
|
303
214
|
}
|
|
304
215
|
) }),
|
|
305
|
-
/* @__PURE__ */ e(
|
|
306
|
-
/* @__PURE__ */ e(
|
|
216
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(W, { variant: "outline", children: "Cancel" }) }) }),
|
|
217
|
+
/* @__PURE__ */ e(j, {})
|
|
307
218
|
] })
|
|
308
219
|
}
|
|
309
220
|
)
|
|
310
|
-
),
|
|
311
|
-
const t =
|
|
312
|
-
return o ? /* @__PURE__ */ e(
|
|
313
|
-
}),
|
|
221
|
+
), ut = g(({ children: n }) => {
|
|
222
|
+
const t = S(), o = C(() => t?.spine.element$, [t]);
|
|
223
|
+
return o ? /* @__PURE__ */ e(de, { children: Dn(n, o) }) : null;
|
|
224
|
+
}), ht = ({
|
|
314
225
|
absolutePageIndex: n,
|
|
315
226
|
itemIndex: t
|
|
316
227
|
}) => {
|
|
317
|
-
const o =
|
|
228
|
+
const o = S();
|
|
318
229
|
return {
|
|
319
|
-
spineItem: C(() => o ? t !== void 0 ?
|
|
320
|
-
|
|
321
|
-
) :
|
|
230
|
+
spineItem: C(() => o ? t !== void 0 ? ge(o.spine.spineItemsManager.get(t)) : n !== void 0 ? o.spine.pages.observeFromAbsolutePageIndex(n).pipe(
|
|
231
|
+
L((i) => o.spine.spineItemsManager.get(i?.itemIndex))
|
|
232
|
+
) : we : we, [t, n, o])
|
|
322
233
|
};
|
|
323
|
-
},
|
|
234
|
+
}, pt = ({
|
|
324
235
|
absolutePageIndex: n,
|
|
325
236
|
itemIndex: t
|
|
326
237
|
}) => {
|
|
327
|
-
const { spineItem: o } =
|
|
328
|
-
() => o?.isReady$ ??
|
|
238
|
+
const { spineItem: o } = ht({ absolutePageIndex: n, itemIndex: t }), r = C(
|
|
239
|
+
() => o?.isReady$ ?? ge(!1),
|
|
329
240
|
[o]
|
|
330
241
|
);
|
|
331
242
|
return { spineItem: o, isReady: r };
|
|
332
|
-
},
|
|
243
|
+
}, gt = g(
|
|
333
244
|
({
|
|
334
245
|
absolutePageIndex: n,
|
|
335
246
|
left: t,
|
|
336
247
|
top: o,
|
|
337
248
|
width: r
|
|
338
249
|
}) => {
|
|
339
|
-
const { isReady: i } =
|
|
250
|
+
const { isReady: i } = pt({
|
|
340
251
|
absolutePageIndex: n
|
|
341
|
-
}), { data: a } =
|
|
252
|
+
}), { data: a } = me(), s = a?.find(
|
|
342
253
|
(d) => d?.meta?.absolutePageIndex === n && d.meta.range === void 0
|
|
343
254
|
);
|
|
344
255
|
if (!i) return null;
|
|
345
256
|
const c = r * 0.1 / 2;
|
|
346
257
|
return /* @__PURE__ */ e(
|
|
347
|
-
|
|
258
|
+
le,
|
|
348
259
|
{
|
|
349
260
|
present: !!s,
|
|
350
261
|
lazyMount: !0,
|
|
351
262
|
animationName: { _open: "fade-in", _closed: "fade-out" },
|
|
352
263
|
animationDuration: "moderate",
|
|
353
264
|
children: /* @__PURE__ */ e(
|
|
354
|
-
|
|
265
|
+
F,
|
|
355
266
|
{
|
|
356
|
-
"data-bookmark-area":
|
|
267
|
+
"data-bookmark-area": nt,
|
|
357
268
|
position: "absolute",
|
|
358
269
|
left: t + r,
|
|
359
270
|
transform: "translateX(-100%)",
|
|
@@ -376,11 +287,11 @@ const J = w.ActionTrigger, it = (n) => {
|
|
|
376
287
|
}
|
|
377
288
|
);
|
|
378
289
|
}
|
|
379
|
-
),
|
|
380
|
-
const n =
|
|
381
|
-
return /* @__PURE__ */ e(
|
|
290
|
+
), ft = g(() => {
|
|
291
|
+
const n = S(), t = C(() => n?.layoutInfo$, [n]);
|
|
292
|
+
return /* @__PURE__ */ e(ut, { children: t?.pages.map(
|
|
382
293
|
({ absoluteLayout: { left: o, top: r, width: i } }, a) => /* @__PURE__ */ e(
|
|
383
|
-
|
|
294
|
+
gt,
|
|
384
295
|
{
|
|
385
296
|
absolutePageIndex: a,
|
|
386
297
|
left: o,
|
|
@@ -390,16 +301,16 @@ const J = w.ActionTrigger, it = (n) => {
|
|
|
390
301
|
a
|
|
391
302
|
)
|
|
392
303
|
) });
|
|
393
|
-
}),
|
|
394
|
-
const n =
|
|
395
|
-
return
|
|
396
|
-
},
|
|
397
|
-
const n =
|
|
398
|
-
|
|
304
|
+
}), mt = () => {
|
|
305
|
+
const n = S();
|
|
306
|
+
return ce(n) ? n : void 0;
|
|
307
|
+
}, bt = () => {
|
|
308
|
+
const n = mt(), { data: t } = me();
|
|
309
|
+
q(() => n ? n.gestures.hooks.register(
|
|
399
310
|
"beforeTapGesture",
|
|
400
311
|
({ event$: r }) => r.pipe(
|
|
401
|
-
|
|
402
|
-
|
|
312
|
+
On(n?.annotations.candidates$),
|
|
313
|
+
L(([i, a]) => {
|
|
403
314
|
if (!i.page) return !0;
|
|
404
315
|
const {
|
|
405
316
|
spineItem: s,
|
|
@@ -423,7 +334,7 @@ const J = w.ActionTrigger, it = (n) => {
|
|
|
423
334
|
);
|
|
424
335
|
if (!h) return !0;
|
|
425
336
|
const m = t?.find(
|
|
426
|
-
(
|
|
337
|
+
(I) => I?.meta?.absolutePageIndex === h.absolutePageIndex && I.meta.range === void 0
|
|
427
338
|
);
|
|
428
339
|
if (m)
|
|
429
340
|
return n?.annotations.delete(m.resource.id), !1;
|
|
@@ -436,66 +347,126 @@ const J = w.ActionTrigger, it = (n) => {
|
|
|
436
347
|
})
|
|
437
348
|
)
|
|
438
349
|
) : void 0, [n, t]);
|
|
439
|
-
}, Se =
|
|
350
|
+
}, Se = Je({
|
|
440
351
|
placement: "bottom-end",
|
|
441
352
|
pauseOnPageIdle: !0
|
|
442
|
-
}),
|
|
443
|
-
n.type === "loading" ? /* @__PURE__ */ e(
|
|
353
|
+
}), Ct = () => /* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(en, { toaster: Se, insetInline: { mdDown: "4" }, children: (n) => /* @__PURE__ */ l(ee.Root, { width: { md: "sm" }, children: [
|
|
354
|
+
n.type === "loading" ? /* @__PURE__ */ e(nn, { size: "sm", color: "blue.solid" }) : /* @__PURE__ */ e(ee.Indicator, {}),
|
|
444
355
|
/* @__PURE__ */ l(O, { gap: "1", flex: "1", maxWidth: "100%", children: [
|
|
445
|
-
n.title && /* @__PURE__ */ e(
|
|
446
|
-
n.description && /* @__PURE__ */ e(
|
|
356
|
+
n.title && /* @__PURE__ */ e(ee.Title, { children: n.title }),
|
|
357
|
+
n.description && /* @__PURE__ */ e(ee.Description, { children: n.description })
|
|
447
358
|
] }),
|
|
448
|
-
n.action && /* @__PURE__ */ e(
|
|
449
|
-
n.meta?.closable && /* @__PURE__ */ e(
|
|
450
|
-
] }) }) }),
|
|
359
|
+
n.action && /* @__PURE__ */ e(ee.ActionTrigger, { children: n.action.label }),
|
|
360
|
+
n.meta?.closable && /* @__PURE__ */ e(ee.CloseTrigger, {})
|
|
361
|
+
] }) }) }), St = (n, t) => {
|
|
362
|
+
const o = Fe({ value: n });
|
|
363
|
+
return _e(() => t(n, o.current.value) ? o.current.value : (o.current = { value: n }, n), [n, t]);
|
|
364
|
+
}, vt = ({
|
|
365
|
+
children: n,
|
|
366
|
+
onQuickMenuOpenChange: t,
|
|
367
|
+
quickMenuOpen: o,
|
|
368
|
+
...r
|
|
369
|
+
}) => {
|
|
370
|
+
const i = ie(() => N({ default: qe() })), a = ie(
|
|
371
|
+
() => N({ default: i.value.fontSizeMenuOpen })
|
|
372
|
+
), s = ue(
|
|
373
|
+
a
|
|
374
|
+
), c = M(
|
|
375
|
+
(k) => {
|
|
376
|
+
a.update(k);
|
|
377
|
+
},
|
|
378
|
+
[a]
|
|
379
|
+
), d = ie(
|
|
380
|
+
() => N({ default: i.value.quickMenuOpen })
|
|
381
|
+
), u = M(
|
|
382
|
+
(k) => {
|
|
383
|
+
d.update(k);
|
|
384
|
+
},
|
|
385
|
+
[d]
|
|
386
|
+
), p = ue(
|
|
387
|
+
d
|
|
388
|
+
), h = o ?? p, m = t ?? u, v = ie(
|
|
389
|
+
() => N({ default: i.value.refitMenuOpen })
|
|
390
|
+
), I = M(
|
|
391
|
+
(k) => {
|
|
392
|
+
v.update(k);
|
|
393
|
+
},
|
|
394
|
+
[v]
|
|
395
|
+
), T = ue(
|
|
396
|
+
v
|
|
397
|
+
), x = St(r, _n);
|
|
398
|
+
return q(() => {
|
|
399
|
+
i.update((k) => ({
|
|
400
|
+
...k,
|
|
401
|
+
...x,
|
|
402
|
+
onQuickMenuOpenChange: m,
|
|
403
|
+
quickMenuOpen: h,
|
|
404
|
+
onFontSizeMenuOpenChange: c,
|
|
405
|
+
fontSizeMenuOpen: s,
|
|
406
|
+
onRefitMenuOpenChange: I,
|
|
407
|
+
refitMenuOpen: T
|
|
408
|
+
}));
|
|
409
|
+
}, [
|
|
410
|
+
x,
|
|
411
|
+
h,
|
|
412
|
+
m,
|
|
413
|
+
i,
|
|
414
|
+
s,
|
|
415
|
+
c,
|
|
416
|
+
T,
|
|
417
|
+
I
|
|
418
|
+
]), /* @__PURE__ */ e(Ie.Provider, { value: i, children: n });
|
|
419
|
+
}, xt = g(
|
|
420
|
+
({ children: n, ...t }) => /* @__PURE__ */ e(vt, { ...t, children: n })
|
|
421
|
+
), ae = B.forwardRef(
|
|
451
422
|
function(t, o) {
|
|
452
423
|
const { children: r, inputProps: i, rootRef: a, ...s } = t;
|
|
453
|
-
return /* @__PURE__ */ l(
|
|
454
|
-
/* @__PURE__ */ e(
|
|
455
|
-
/* @__PURE__ */ e(
|
|
456
|
-
r && /* @__PURE__ */ e(
|
|
424
|
+
return /* @__PURE__ */ l(re.Item, { ref: a, ...s, children: [
|
|
425
|
+
/* @__PURE__ */ e(re.ItemHiddenInput, { ref: o, ...i }),
|
|
426
|
+
/* @__PURE__ */ e(re.ItemIndicator, {}),
|
|
427
|
+
r && /* @__PURE__ */ e(re.ItemText, { children: r })
|
|
457
428
|
] });
|
|
458
429
|
}
|
|
459
|
-
),
|
|
430
|
+
), Ye = re.Root, Re = B.forwardRef(
|
|
460
431
|
function(t, o) {
|
|
461
432
|
const { marks: r, label: i, showValue: a, ...s } = 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);
|
|
462
|
-
return /* @__PURE__ */ l(
|
|
463
|
-
i && !a && /* @__PURE__ */ e(
|
|
464
|
-
i && a && /* @__PURE__ */ l(
|
|
465
|
-
/* @__PURE__ */ e(
|
|
466
|
-
/* @__PURE__ */ e(
|
|
433
|
+
return /* @__PURE__ */ l(w.Root, { ref: o, thumbAlignment: "center", ...s, children: [
|
|
434
|
+
i && !a && /* @__PURE__ */ e(w.Label, { children: i }),
|
|
435
|
+
i && a && /* @__PURE__ */ l(D, { justify: "space-between", children: [
|
|
436
|
+
/* @__PURE__ */ e(w.Label, { children: i }),
|
|
437
|
+
/* @__PURE__ */ e(w.ValueText, {})
|
|
467
438
|
] }),
|
|
468
|
-
/* @__PURE__ */ l(
|
|
469
|
-
/* @__PURE__ */ e(
|
|
470
|
-
/* @__PURE__ */ e(
|
|
471
|
-
/* @__PURE__ */ e(
|
|
439
|
+
/* @__PURE__ */ l(w.Control, { "data-has-mark-label": u || void 0, children: [
|
|
440
|
+
/* @__PURE__ */ e(w.Track, { children: /* @__PURE__ */ e(w.Range, {}) }),
|
|
441
|
+
/* @__PURE__ */ e(kt, { value: c }),
|
|
442
|
+
/* @__PURE__ */ e(It, { marks: d })
|
|
472
443
|
] })
|
|
473
444
|
] });
|
|
474
445
|
}
|
|
475
446
|
);
|
|
476
|
-
function
|
|
447
|
+
function kt(n) {
|
|
477
448
|
const { value: t } = n;
|
|
478
|
-
return /* @__PURE__ */ e(
|
|
449
|
+
return /* @__PURE__ */ e(tn, { each: t, children: (o, r) => /* @__PURE__ */ e(w.Thumb, { index: r, children: /* @__PURE__ */ e(w.HiddenInput, {}) }, r) });
|
|
479
450
|
}
|
|
480
|
-
const
|
|
451
|
+
const It = B.forwardRef(
|
|
481
452
|
function(t, o) {
|
|
482
453
|
const { marks: r } = t;
|
|
483
|
-
return r?.length ? /* @__PURE__ */ e(
|
|
454
|
+
return r?.length ? /* @__PURE__ */ e(w.MarkerGroup, { ref: o, children: r.map((i, a) => {
|
|
484
455
|
const s = typeof i == "number" ? i : i.value, c = typeof i == "number" ? void 0 : i.label;
|
|
485
|
-
return /* @__PURE__ */ l(
|
|
486
|
-
/* @__PURE__ */ e(
|
|
456
|
+
return /* @__PURE__ */ l(w.Marker, { value: s, children: [
|
|
457
|
+
/* @__PURE__ */ e(w.MarkerIndicator, {}),
|
|
487
458
|
c
|
|
488
459
|
] }, a);
|
|
489
460
|
}) }) : null;
|
|
490
461
|
}
|
|
491
|
-
),
|
|
462
|
+
), Rt = ["global", "book", "device"], ye = [
|
|
492
463
|
"global",
|
|
493
464
|
"book",
|
|
494
465
|
"mobile",
|
|
495
466
|
"tablet",
|
|
496
467
|
"desktop"
|
|
497
|
-
],
|
|
498
|
-
const n =
|
|
468
|
+
], Ot = "(max-width: 767px)", Tt = "(max-width: 1023px)", Mt = g(() => {
|
|
469
|
+
const n = ot(), {
|
|
499
470
|
fontSizeMenuOpen: t,
|
|
500
471
|
onFontSizeMenuOpenChange: o,
|
|
501
472
|
uncontrolledFontSize: r,
|
|
@@ -505,7 +476,7 @@ const xt = A.forwardRef(
|
|
|
505
476
|
fontSizeScope: c,
|
|
506
477
|
onFontSizeChange: d,
|
|
507
478
|
onFontSizeScopeChange: u
|
|
508
|
-
} =
|
|
479
|
+
} = _([
|
|
509
480
|
"fontSizeMenuOpen",
|
|
510
481
|
"onFontSizeMenuOpenChange",
|
|
511
482
|
"fontSize",
|
|
@@ -515,23 +486,23 @@ const xt = A.forwardRef(
|
|
|
515
486
|
"onFontSizeChange",
|
|
516
487
|
"onFontSizeScopeChange",
|
|
517
488
|
"uncontrolledFontSize"
|
|
518
|
-
]), p =
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
]), [
|
|
489
|
+
]), p = kn(d), [h, m] = on([
|
|
490
|
+
Ot,
|
|
491
|
+
Tt
|
|
492
|
+
]), [v, I] = y(
|
|
522
493
|
c ?? "global"
|
|
523
|
-
), T =
|
|
524
|
-
(
|
|
525
|
-
p.current ? p.current(
|
|
526
|
-
...
|
|
527
|
-
fontSize:
|
|
494
|
+
), T = M(
|
|
495
|
+
(f, J) => {
|
|
496
|
+
p.current ? p.current(f, J) : n.update((Ke) => ({
|
|
497
|
+
...Ke,
|
|
498
|
+
fontSize: J
|
|
528
499
|
}));
|
|
529
500
|
},
|
|
530
501
|
[p, n]
|
|
531
|
-
),
|
|
532
|
-
(
|
|
502
|
+
), x = M(
|
|
503
|
+
(f) => i,
|
|
533
504
|
[i]
|
|
534
|
-
),
|
|
505
|
+
), k = {
|
|
535
506
|
showValue: !0,
|
|
536
507
|
max: s * 100,
|
|
537
508
|
min: a * 100,
|
|
@@ -542,77 +513,92 @@ const xt = A.forwardRef(
|
|
|
542
513
|
{ value: a * 100, label: `${a * 100}%` },
|
|
543
514
|
{ value: s * 100, label: `${s * 100}%` }
|
|
544
515
|
]
|
|
545
|
-
},
|
|
546
|
-
(
|
|
547
|
-
const
|
|
548
|
-
u?.(
|
|
516
|
+
}, V = M(
|
|
517
|
+
(f) => {
|
|
518
|
+
const J = f.value;
|
|
519
|
+
u?.(J);
|
|
549
520
|
},
|
|
550
521
|
[u]
|
|
551
|
-
),
|
|
552
|
-
|
|
553
|
-
}, []),
|
|
554
|
-
(
|
|
555
|
-
const
|
|
556
|
-
T(
|
|
522
|
+
), P = M((f) => {
|
|
523
|
+
I(f.value);
|
|
524
|
+
}, []), Xe = M(
|
|
525
|
+
(f) => {
|
|
526
|
+
const J = f.value[0] ?? 0;
|
|
527
|
+
T(v, J / 100);
|
|
557
528
|
},
|
|
558
|
-
[T,
|
|
529
|
+
[T, v]
|
|
559
530
|
);
|
|
560
531
|
return /* @__PURE__ */ e(
|
|
561
|
-
|
|
532
|
+
Q,
|
|
562
533
|
{
|
|
563
534
|
lazyMount: !0,
|
|
564
535
|
open: t,
|
|
565
|
-
onOpenChange: (
|
|
566
|
-
o(
|
|
536
|
+
onOpenChange: (f) => {
|
|
537
|
+
o(f.open);
|
|
567
538
|
},
|
|
568
539
|
placement: "center",
|
|
569
|
-
children: /* @__PURE__ */ l(
|
|
570
|
-
/* @__PURE__ */ e(
|
|
571
|
-
/* @__PURE__ */ e(
|
|
572
|
-
/* @__PURE__ */ l(
|
|
573
|
-
/* @__PURE__ */ e(
|
|
574
|
-
/* @__PURE__ */ e(
|
|
575
|
-
/* @__PURE__ */ e(
|
|
576
|
-
|
|
540
|
+
children: /* @__PURE__ */ l(G, { maxH: "40vh", overflow: "auto", children: [
|
|
541
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Font size" }) }),
|
|
542
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ l(O, { gap: 4, flex: 1, children: [
|
|
543
|
+
/* @__PURE__ */ l($.Root, { children: [
|
|
544
|
+
/* @__PURE__ */ e($.Legend, { children: "Scope" }),
|
|
545
|
+
/* @__PURE__ */ e($.HelperText, { children: "The scope to which apply the font size for this book." }),
|
|
546
|
+
/* @__PURE__ */ e($.Content, { children: /* @__PURE__ */ e(
|
|
547
|
+
Ye,
|
|
577
548
|
{
|
|
578
|
-
onValueChange:
|
|
549
|
+
onValueChange: V,
|
|
579
550
|
value: c ?? "global",
|
|
580
551
|
disabled: !c,
|
|
581
|
-
children: /* @__PURE__ */ e(
|
|
552
|
+
children: /* @__PURE__ */ e(D, { gap: 2, children: Rt.map((f) => /* @__PURE__ */ e(ae, { value: f, children: f === "device" ? h ? "device (Mobile)" : m ? "device (Tablet)" : "device (Desktop)" : f }, f)) })
|
|
582
553
|
}
|
|
583
554
|
) })
|
|
584
555
|
] }),
|
|
585
|
-
/* @__PURE__ */ l(
|
|
586
|
-
/* @__PURE__ */ e(
|
|
587
|
-
|
|
556
|
+
/* @__PURE__ */ l(E.Root, { value: v, onValueChange: P, children: [
|
|
557
|
+
/* @__PURE__ */ e(E.List, { children: ye.map((f) => /* @__PURE__ */ l(
|
|
558
|
+
E.Trigger,
|
|
588
559
|
{
|
|
589
|
-
value:
|
|
560
|
+
value: f,
|
|
590
561
|
textTransform: "capitalize",
|
|
591
|
-
disabled:
|
|
562
|
+
disabled: f !== "global" && !c,
|
|
592
563
|
children: [
|
|
593
|
-
c ===
|
|
594
|
-
|
|
564
|
+
c === f && /* @__PURE__ */ e(hn, {}),
|
|
565
|
+
f
|
|
595
566
|
]
|
|
596
567
|
},
|
|
597
|
-
|
|
568
|
+
f
|
|
598
569
|
)) }),
|
|
599
|
-
|
|
600
|
-
|
|
570
|
+
ye.map((f) => /* @__PURE__ */ e(E.Content, { value: f, children: /* @__PURE__ */ e(
|
|
571
|
+
Re,
|
|
601
572
|
{
|
|
602
573
|
label: "%",
|
|
603
|
-
value: [(
|
|
604
|
-
onValueChange:
|
|
605
|
-
...
|
|
574
|
+
value: [(x(f) ?? 1) * 100],
|
|
575
|
+
onValueChange: Xe,
|
|
576
|
+
...k
|
|
606
577
|
}
|
|
607
|
-
) },
|
|
578
|
+
) }, f))
|
|
608
579
|
] })
|
|
609
580
|
] }) }),
|
|
610
|
-
/* @__PURE__ */ e(
|
|
611
|
-
/* @__PURE__ */ e(
|
|
581
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(W, { variant: "outline", children: "Close" }) }) }),
|
|
582
|
+
/* @__PURE__ */ e(j, {})
|
|
612
583
|
] })
|
|
613
584
|
}
|
|
614
585
|
);
|
|
615
|
-
}),
|
|
586
|
+
}), zt = () => {
|
|
587
|
+
const n = S(), { fontSize: t, uncontrolledFontSize: o } = _([
|
|
588
|
+
"fontSize",
|
|
589
|
+
"uncontrolledFontSize"
|
|
590
|
+
]), r = t ?? o;
|
|
591
|
+
return q(() => {
|
|
592
|
+
if (n && r) {
|
|
593
|
+
const i = setTimeout(() => {
|
|
594
|
+
n.settings.update({
|
|
595
|
+
fontScale: r
|
|
596
|
+
});
|
|
597
|
+
}, 200);
|
|
598
|
+
return () => clearTimeout(i);
|
|
599
|
+
}
|
|
600
|
+
}, [n, r]), null;
|
|
601
|
+
}, wt = {
|
|
616
602
|
x: 0,
|
|
617
603
|
y: 0,
|
|
618
604
|
width: 0,
|
|
@@ -622,43 +608,43 @@ const xt = A.forwardRef(
|
|
|
622
608
|
bottom: 0,
|
|
623
609
|
right: 0
|
|
624
610
|
};
|
|
625
|
-
function
|
|
626
|
-
const [n, t] =
|
|
611
|
+
function yt() {
|
|
612
|
+
const [n, t] = y(null), [o, r] = y(wt), i = _e(
|
|
627
613
|
() => new ResizeObserver((a) => {
|
|
628
614
|
if (a[0]) {
|
|
629
|
-
const { x: s, y: c, width: d, height: u, top: p, left: h, bottom: m, right:
|
|
630
|
-
r({ x: s, y: c, width: d, height: u, top: p, left: h, bottom: m, right:
|
|
615
|
+
const { x: s, y: c, width: d, height: u, top: p, left: h, bottom: m, right: v } = a[0].contentRect;
|
|
616
|
+
r({ x: s, y: c, width: d, height: u, top: p, left: h, bottom: m, right: v });
|
|
631
617
|
}
|
|
632
618
|
}),
|
|
633
619
|
[]
|
|
634
620
|
);
|
|
635
|
-
return
|
|
621
|
+
return cn(() => {
|
|
636
622
|
if (n)
|
|
637
623
|
return i.observe(n), () => {
|
|
638
624
|
i.disconnect();
|
|
639
625
|
};
|
|
640
626
|
}, [n, i]), [t, o, n];
|
|
641
627
|
}
|
|
642
|
-
const
|
|
643
|
-
const r =
|
|
644
|
-
|
|
645
|
-
if (!i || !n) return
|
|
628
|
+
const Pt = (n, t, o) => {
|
|
629
|
+
const r = S(), i = je(r) ? r : void 0;
|
|
630
|
+
fe(() => {
|
|
631
|
+
if (!i || !n) return ke;
|
|
646
632
|
const a = t.layout.layout$.pipe(
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
), s =
|
|
633
|
+
Tn(t.layout.layoutInfo),
|
|
634
|
+
Ve(Ln)
|
|
635
|
+
), s = Vn(
|
|
650
636
|
n
|
|
651
|
-
).pipe(
|
|
637
|
+
).pipe(L((c) => c.some((d) => d.isIntersecting)));
|
|
652
638
|
return a.pipe(
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
639
|
+
$e(100, void 0, { trailing: !0 }),
|
|
640
|
+
H(() => s.pipe(
|
|
641
|
+
Mn((c) => {
|
|
656
642
|
c || (n.innerHTML = "");
|
|
657
643
|
}),
|
|
658
|
-
|
|
659
|
-
|
|
644
|
+
pe((c) => c),
|
|
645
|
+
Ne()
|
|
660
646
|
).pipe(
|
|
661
|
-
|
|
647
|
+
H(() => (n.innerHTML = "", i?.gallery.snapshot(
|
|
662
648
|
t,
|
|
663
649
|
n,
|
|
664
650
|
o
|
|
@@ -666,16 +652,16 @@ const zt = (n, t, o) => {
|
|
|
666
652
|
))
|
|
667
653
|
);
|
|
668
654
|
}, [i, t, o, n]);
|
|
669
|
-
},
|
|
655
|
+
}, Et = g(
|
|
670
656
|
({ item: n, onNavigated: t }) => {
|
|
671
|
-
const [o, r, i] =
|
|
672
|
-
|
|
657
|
+
const [o, r, i] = yt(), a = S();
|
|
658
|
+
Pt(i, n, r);
|
|
673
659
|
const s = C(
|
|
674
660
|
() => a?.locateResource(n, { mode: "shallow" }),
|
|
675
661
|
[a, n]
|
|
676
662
|
);
|
|
677
663
|
return /* @__PURE__ */ l(
|
|
678
|
-
|
|
664
|
+
F,
|
|
679
665
|
{
|
|
680
666
|
width: "100%",
|
|
681
667
|
aspectRatio: "2/3",
|
|
@@ -691,7 +677,7 @@ const zt = (n, t, o) => {
|
|
|
691
677
|
},
|
|
692
678
|
children: [
|
|
693
679
|
/* @__PURE__ */ e(
|
|
694
|
-
|
|
680
|
+
F,
|
|
695
681
|
{
|
|
696
682
|
height: "100%",
|
|
697
683
|
width: "100%",
|
|
@@ -721,11 +707,11 @@ const zt = (n, t, o) => {
|
|
|
721
707
|
}
|
|
722
708
|
);
|
|
723
709
|
}
|
|
724
|
-
),
|
|
710
|
+
), Bt = g(
|
|
725
711
|
({ open: n, setOpen: t }) => {
|
|
726
|
-
const o =
|
|
712
|
+
const o = S(), r = C(() => o?.spineItemsManager.items$, [o]);
|
|
727
713
|
return /* @__PURE__ */ e(
|
|
728
|
-
|
|
714
|
+
Q,
|
|
729
715
|
{
|
|
730
716
|
lazyMount: !0,
|
|
731
717
|
placement: "center",
|
|
@@ -733,10 +719,10 @@ const zt = (n, t, o) => {
|
|
|
733
719
|
onOpenChange: (i) => t(i.open),
|
|
734
720
|
size: { mdDown: "full", md: "lg" },
|
|
735
721
|
scrollBehavior: "inside",
|
|
736
|
-
children: /* @__PURE__ */ l(
|
|
737
|
-
/* @__PURE__ */ e(
|
|
738
|
-
/* @__PURE__ */ e(
|
|
739
|
-
|
|
722
|
+
children: /* @__PURE__ */ l(G, { height: "100%", children: [
|
|
723
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Gallery" }) }),
|
|
724
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(
|
|
725
|
+
F,
|
|
740
726
|
{
|
|
741
727
|
gridTemplateColumns: [
|
|
742
728
|
"repeat(2, minmax(0, 1fr))",
|
|
@@ -747,7 +733,7 @@ const zt = (n, t, o) => {
|
|
|
747
733
|
pt: 2,
|
|
748
734
|
"data-grid": !0,
|
|
749
735
|
children: r?.map((i) => /* @__PURE__ */ e(
|
|
750
|
-
|
|
736
|
+
Et,
|
|
751
737
|
{
|
|
752
738
|
item: i,
|
|
753
739
|
onNavigated: () => {
|
|
@@ -758,15 +744,15 @@ const zt = (n, t, o) => {
|
|
|
758
744
|
))
|
|
759
745
|
}
|
|
760
746
|
) }),
|
|
761
|
-
/* @__PURE__ */ e(
|
|
762
|
-
/* @__PURE__ */ e(
|
|
747
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(W, { variant: "outline", children: "Cancel" }) }) }),
|
|
748
|
+
/* @__PURE__ */ e(j, {})
|
|
763
749
|
] })
|
|
764
750
|
}
|
|
765
751
|
);
|
|
766
752
|
}
|
|
767
|
-
),
|
|
753
|
+
), At = "@prose-reader/react-reader", Dt = "1.258.0", Ft = g(
|
|
768
754
|
({ open: n, setOpen: t }) => /* @__PURE__ */ e(
|
|
769
|
-
|
|
755
|
+
Q,
|
|
770
756
|
{
|
|
771
757
|
lazyMount: !0,
|
|
772
758
|
placement: "center",
|
|
@@ -774,10 +760,10 @@ const zt = (n, t, o) => {
|
|
|
774
760
|
onOpenChange: (o) => t(o.open),
|
|
775
761
|
size: { mdDown: "full", md: "lg" },
|
|
776
762
|
scrollBehavior: "inside",
|
|
777
|
-
children: /* @__PURE__ */ l(
|
|
778
|
-
/* @__PURE__ */ e(
|
|
763
|
+
children: /* @__PURE__ */ l(G, { children: [
|
|
764
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Help" }) }),
|
|
779
765
|
/* @__PURE__ */ l(
|
|
780
|
-
|
|
766
|
+
Z,
|
|
781
767
|
{
|
|
782
768
|
overflowY: "auto",
|
|
783
769
|
flex: 1,
|
|
@@ -786,43 +772,43 @@ const zt = (n, t, o) => {
|
|
|
786
772
|
gap: 4,
|
|
787
773
|
children: [
|
|
788
774
|
/* @__PURE__ */ l(O, { children: [
|
|
789
|
-
/* @__PURE__ */ e(
|
|
790
|
-
/* @__PURE__ */ l(
|
|
791
|
-
/* @__PURE__ */ e(
|
|
775
|
+
/* @__PURE__ */ e(be, { mb: 2, as: "h3", size: "lg", children: "Shortcuts" }),
|
|
776
|
+
/* @__PURE__ */ l(D, { mb: 1, children: [
|
|
777
|
+
/* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(pn, {}) }),
|
|
792
778
|
" ",
|
|
793
779
|
/* @__PURE__ */ e(b, { children: "Navigate to right page" })
|
|
794
780
|
] }),
|
|
795
|
-
/* @__PURE__ */ l(
|
|
796
|
-
/* @__PURE__ */ e(
|
|
781
|
+
/* @__PURE__ */ l(D, { mb: 1, children: [
|
|
782
|
+
/* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(gn, {}) }),
|
|
797
783
|
" ",
|
|
798
784
|
/* @__PURE__ */ e(b, { children: "Navigate to left page" })
|
|
799
785
|
] })
|
|
800
786
|
] }),
|
|
801
787
|
/* @__PURE__ */ l(O, { children: [
|
|
802
|
-
/* @__PURE__ */ e(
|
|
803
|
-
/* @__PURE__ */ e(
|
|
788
|
+
/* @__PURE__ */ e(be, { mb: 2, as: "h3", size: "lg", children: "Bookmarks" }),
|
|
789
|
+
/* @__PURE__ */ e(D, { mb: 1, children: /* @__PURE__ */ e(b, { children: "Tap on the top right corner of a page bookmark it" }) })
|
|
804
790
|
] }),
|
|
805
791
|
/* @__PURE__ */ l(O, { children: [
|
|
806
|
-
/* @__PURE__ */ e(
|
|
792
|
+
/* @__PURE__ */ e(be, { mb: 2, as: "h3", size: "lg", children: "About" }),
|
|
807
793
|
/* @__PURE__ */ l(b, { children: [
|
|
808
|
-
|
|
794
|
+
At,
|
|
809
795
|
" version: ",
|
|
810
|
-
|
|
796
|
+
Dt
|
|
811
797
|
] })
|
|
812
798
|
] })
|
|
813
799
|
]
|
|
814
800
|
}
|
|
815
801
|
),
|
|
816
|
-
/* @__PURE__ */ e(
|
|
817
|
-
/* @__PURE__ */ e(
|
|
802
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(W, { variant: "outline", children: "Cancel" }) }) }),
|
|
803
|
+
/* @__PURE__ */ e(j, {})
|
|
818
804
|
] })
|
|
819
805
|
}
|
|
820
806
|
)
|
|
821
|
-
),
|
|
822
|
-
const n =
|
|
807
|
+
), te = () => {
|
|
808
|
+
const n = S();
|
|
823
809
|
return C(
|
|
824
|
-
() => n ?
|
|
825
|
-
|
|
810
|
+
() => n ? zn([n.pagination.state$, n.context]).pipe(
|
|
811
|
+
L(([t, o]) => {
|
|
826
812
|
const r = o.manifest?.spineItems.every(
|
|
827
813
|
(i) => i.mediaType?.startsWith("image/")
|
|
828
814
|
);
|
|
@@ -831,55 +817,55 @@ const zt = (n, t, o) => {
|
|
|
831
817
|
hasChapters: !o.isFullyPrePaginated && !r
|
|
832
818
|
};
|
|
833
819
|
})
|
|
834
|
-
) :
|
|
820
|
+
) : ke,
|
|
835
821
|
[n]
|
|
836
822
|
);
|
|
837
|
-
},
|
|
838
|
-
const n =
|
|
823
|
+
}, _t = () => {
|
|
824
|
+
const n = te(), t = Math.floor(
|
|
839
825
|
(n?.percentageEstimateOfBook ?? 0) * 100
|
|
840
826
|
), o = t > 0 ? t : 1;
|
|
841
|
-
return n?.percentageEstimateOfBook === void 0 ? null : /* @__PURE__ */ e(
|
|
827
|
+
return n?.percentageEstimateOfBook === void 0 ? null : /* @__PURE__ */ e(F, { position: "absolute", right: 0, bottom: 0, p: 2, color: "black", children: /* @__PURE__ */ l(b, { fontSize: "sm", children: [
|
|
842
828
|
o,
|
|
843
829
|
" %"
|
|
844
830
|
] }) });
|
|
845
|
-
},
|
|
846
|
-
const [n, t] =
|
|
847
|
-
return
|
|
831
|
+
}, Lt = () => {
|
|
832
|
+
const [n, t] = y(/* @__PURE__ */ new Date());
|
|
833
|
+
return q(() => {
|
|
848
834
|
const o = setInterval(() => {
|
|
849
835
|
t(/* @__PURE__ */ new Date());
|
|
850
836
|
}, 6e4);
|
|
851
837
|
return () => clearInterval(o);
|
|
852
838
|
}, []), n;
|
|
853
|
-
},
|
|
854
|
-
const t =
|
|
839
|
+
}, Vt = (n) => {
|
|
840
|
+
const t = Lt();
|
|
855
841
|
return /* @__PURE__ */ e(b, { fontSize: "xs", ...n, children: t.toLocaleTimeString(navigator.language, {
|
|
856
842
|
hour: "2-digit",
|
|
857
843
|
minute: "2-digit"
|
|
858
844
|
}) });
|
|
859
|
-
},
|
|
860
|
-
const { quickMenuOpen: n, onQuickMenuOpenChange: t } =
|
|
845
|
+
}, Oe = () => {
|
|
846
|
+
const { quickMenuOpen: n, onQuickMenuOpenChange: t } = _([
|
|
861
847
|
"quickMenuOpen",
|
|
862
848
|
"onQuickMenuOpenChange"
|
|
863
849
|
]);
|
|
864
850
|
return [n, t];
|
|
865
|
-
},
|
|
866
|
-
const [n] =
|
|
851
|
+
}, $t = g(() => {
|
|
852
|
+
const [n] = Oe();
|
|
867
853
|
return /* @__PURE__ */ e(
|
|
868
|
-
|
|
854
|
+
F,
|
|
869
855
|
{
|
|
870
856
|
position: "absolute",
|
|
871
857
|
left: 0,
|
|
872
858
|
bottom: 0,
|
|
873
859
|
p: 2,
|
|
874
860
|
color: n ? void 0 : "colorPalette.contrast",
|
|
875
|
-
children: /* @__PURE__ */ e(
|
|
861
|
+
children: /* @__PURE__ */ e(Vt, {})
|
|
876
862
|
}
|
|
877
863
|
);
|
|
878
|
-
}),
|
|
879
|
-
const n =
|
|
880
|
-
|
|
864
|
+
}), Nt = () => {
|
|
865
|
+
const n = S();
|
|
866
|
+
fe(
|
|
881
867
|
() => n?.links$.subscribe((t) => {
|
|
882
|
-
if (t.type === "click" &&
|
|
868
|
+
if (t.type === "click" && $n(t.target, "a")) {
|
|
883
869
|
if (!t.target.href) return;
|
|
884
870
|
const o = new URL(t.target.href);
|
|
885
871
|
window.location.host !== o.host && confirm(
|
|
@@ -889,15 +875,15 @@ const zt = (n, t, o) => {
|
|
|
889
875
|
}),
|
|
890
876
|
[n]
|
|
891
877
|
);
|
|
892
|
-
},
|
|
893
|
-
const { notificationsSubject: n } =
|
|
878
|
+
}, Ht = () => {
|
|
879
|
+
const { notificationsSubject: n } = _([
|
|
894
880
|
"notificationsSubject"
|
|
895
881
|
]);
|
|
896
|
-
|
|
882
|
+
fe(
|
|
897
883
|
() => n.pipe(
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
const o = t.duration ?? 3e3, r = new
|
|
884
|
+
pe(Le),
|
|
885
|
+
wn((t) => {
|
|
886
|
+
const o = t.duration ?? 3e3, r = new yn((a) => {
|
|
901
887
|
try {
|
|
902
888
|
queueMicrotask(() => {
|
|
903
889
|
const s = Se.create({
|
|
@@ -911,18 +897,18 @@ const zt = (n, t, o) => {
|
|
|
911
897
|
a.error(s);
|
|
912
898
|
}
|
|
913
899
|
}), i = n.pipe(
|
|
914
|
-
|
|
915
|
-
|
|
900
|
+
Pn(1),
|
|
901
|
+
pe((a) => !!t.key && a?.key === t.key)
|
|
916
902
|
);
|
|
917
903
|
return r.pipe(
|
|
918
|
-
|
|
919
|
-
(a) =>
|
|
920
|
-
|
|
921
|
-
t.abort ??
|
|
904
|
+
H(
|
|
905
|
+
(a) => He(
|
|
906
|
+
We(o),
|
|
907
|
+
t.abort ?? ke,
|
|
922
908
|
i
|
|
923
909
|
).pipe(
|
|
924
|
-
|
|
925
|
-
|
|
910
|
+
Ne(),
|
|
911
|
+
En(() => {
|
|
926
912
|
queueMicrotask(() => {
|
|
927
913
|
Se.dismiss(a);
|
|
928
914
|
});
|
|
@@ -934,7 +920,7 @@ const zt = (n, t, o) => {
|
|
|
934
920
|
),
|
|
935
921
|
[n]
|
|
936
922
|
);
|
|
937
|
-
},
|
|
923
|
+
}, Wt = B.forwardRef(
|
|
938
924
|
function(t, o) {
|
|
939
925
|
const {
|
|
940
926
|
showArrow: r,
|
|
@@ -945,14 +931,14 @@ const zt = (n, t, o) => {
|
|
|
945
931
|
...d
|
|
946
932
|
} = t;
|
|
947
933
|
return /* @__PURE__ */ l(
|
|
948
|
-
|
|
934
|
+
ne.Root,
|
|
949
935
|
{
|
|
950
936
|
...d,
|
|
951
937
|
positioning: { ...d.positioning, gutter: 4 },
|
|
952
938
|
children: [
|
|
953
|
-
/* @__PURE__ */ e(
|
|
954
|
-
/* @__PURE__ */ e(
|
|
955
|
-
|
|
939
|
+
/* @__PURE__ */ e(ne.Trigger, { asChild: !0, children: i }),
|
|
940
|
+
/* @__PURE__ */ e(ve, { disabled: !a, container: c, children: /* @__PURE__ */ e(ne.Positioner, { children: /* @__PURE__ */ l(
|
|
941
|
+
ne.Content,
|
|
956
942
|
{
|
|
957
943
|
width: "auto",
|
|
958
944
|
px: "2",
|
|
@@ -961,7 +947,7 @@ const zt = (n, t, o) => {
|
|
|
961
947
|
rounded: "sm",
|
|
962
948
|
ref: o,
|
|
963
949
|
children: [
|
|
964
|
-
r && /* @__PURE__ */ e(
|
|
950
|
+
r && /* @__PURE__ */ e(ne.Arrow, { children: /* @__PURE__ */ e(ne.ArrowTip, {}) }),
|
|
965
951
|
s
|
|
966
952
|
]
|
|
967
953
|
}
|
|
@@ -970,30 +956,30 @@ const zt = (n, t, o) => {
|
|
|
970
956
|
}
|
|
971
957
|
);
|
|
972
958
|
}
|
|
973
|
-
),
|
|
959
|
+
), qt = B.forwardRef(function(t, o) {
|
|
974
960
|
const { children: r, ...i } = t;
|
|
975
|
-
return /* @__PURE__ */ e(
|
|
976
|
-
|
|
961
|
+
return /* @__PURE__ */ e(Wt, { content: r, ...i, ref: o, children: /* @__PURE__ */ e(
|
|
962
|
+
R,
|
|
977
963
|
{
|
|
978
964
|
variant: "ghost",
|
|
979
965
|
"aria-label": "info",
|
|
980
966
|
size: "2xs",
|
|
981
967
|
colorPalette: "gray",
|
|
982
|
-
children: /* @__PURE__ */ e(
|
|
968
|
+
children: /* @__PURE__ */ e(Xn, {})
|
|
983
969
|
}
|
|
984
970
|
) });
|
|
985
|
-
}),
|
|
986
|
-
return /* @__PURE__ */ e(
|
|
971
|
+
}), Gt = B.forwardRef(function(t, o) {
|
|
972
|
+
return /* @__PURE__ */ e(se.Track, { ...t, ref: o, children: /* @__PURE__ */ e(se.Range, {}) });
|
|
987
973
|
});
|
|
988
|
-
|
|
974
|
+
B.forwardRef(function(t, o) {
|
|
989
975
|
const { children: r, info: i, ...a } = t;
|
|
990
|
-
return /* @__PURE__ */ l(
|
|
976
|
+
return /* @__PURE__ */ l(se.Label, { ...a, ref: o, children: [
|
|
991
977
|
r,
|
|
992
|
-
i && /* @__PURE__ */ e(
|
|
978
|
+
i && /* @__PURE__ */ e(qt, { children: i })
|
|
993
979
|
] });
|
|
994
980
|
});
|
|
995
|
-
const
|
|
996
|
-
const n =
|
|
981
|
+
const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
982
|
+
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, [s = 0, c = 0] = [
|
|
997
983
|
i,
|
|
998
984
|
a
|
|
999
985
|
].sort((p, h) => p - h), d = n?.beginPageIndexInSpineItem !== n?.endPageIndexInSpineItem || n?.beginSpineItemIndex !== n?.endSpineItemIndex, u = n?.hasChapters ? n?.beginNumberOfPagesInSpineItem : n?.numberOfTotalPages;
|
|
@@ -1008,8 +994,8 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1008
994
|
leftPageIndex: s,
|
|
1009
995
|
rightPageIndex: c
|
|
1010
996
|
};
|
|
1011
|
-
},
|
|
1012
|
-
const n =
|
|
997
|
+
}, Ut = () => {
|
|
998
|
+
const n = te(), {
|
|
1013
999
|
hasOnlyOnePage: t,
|
|
1014
1000
|
leftPageIndex: o,
|
|
1015
1001
|
rightPageIndex: r,
|
|
@@ -1017,14 +1003,14 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1017
1003
|
beginAndEndAreDifferent: a
|
|
1018
1004
|
} = Te(), s = Math.round((n?.percentageEstimateOfBook ?? 0) * 100), c = (u) => u?.subChapter ? `${u.title} / ${c(u.subChapter)}` : u?.title || "", d = c(n?.beginChapterInfo);
|
|
1019
1005
|
return /* @__PURE__ */ l(O, { alignItems: "center", gap: 1, maxW: "100%", overflow: "auto", children: [
|
|
1020
|
-
/* @__PURE__ */ e(
|
|
1021
|
-
/* @__PURE__ */ e(
|
|
1022
|
-
/* @__PURE__ */ e(
|
|
1006
|
+
/* @__PURE__ */ e(jt, { value: s, size: "xs", width: 150, children: /* @__PURE__ */ l(D, { justifyContent: "space-between", children: [
|
|
1007
|
+
/* @__PURE__ */ e(Gt, { width: 110 }),
|
|
1008
|
+
/* @__PURE__ */ e(Qt, { children: `${s}%` })
|
|
1023
1009
|
] }) }),
|
|
1024
1010
|
/* @__PURE__ */ e(b, { truncate: !0, maxWidth: "100%", fontSize: "sm", mt: 1, children: d ? `Chapter: ${d}` : " " }),
|
|
1025
|
-
!t && /* @__PURE__ */ l(
|
|
1011
|
+
!t && /* @__PURE__ */ l(D, { children: [
|
|
1026
1012
|
/* @__PURE__ */ e(b, { fontSize: "xs", children: a ? `${o + 1} - ${r + 1} of ${i}` : `${o + 1} of ${i}` }),
|
|
1027
|
-
!!n?.hasChapters && /* @__PURE__ */ l(
|
|
1013
|
+
!!n?.hasChapters && /* @__PURE__ */ l(de, { children: [
|
|
1028
1014
|
/* @__PURE__ */ e(b, { children: "-" }),
|
|
1029
1015
|
/* @__PURE__ */ l(b, { fontSize: "xs", children: [
|
|
1030
1016
|
"(",
|
|
@@ -1034,13 +1020,13 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1034
1020
|
] })
|
|
1035
1021
|
] })
|
|
1036
1022
|
] });
|
|
1037
|
-
},
|
|
1023
|
+
}, Ze = g(
|
|
1038
1024
|
({
|
|
1039
1025
|
children: n,
|
|
1040
1026
|
position: t,
|
|
1041
1027
|
...o
|
|
1042
1028
|
}) => /* @__PURE__ */ e(
|
|
1043
|
-
|
|
1029
|
+
le,
|
|
1044
1030
|
{
|
|
1045
1031
|
display: "flex",
|
|
1046
1032
|
flexDirection: "row",
|
|
@@ -1064,8 +1050,8 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1064
1050
|
children: n
|
|
1065
1051
|
}
|
|
1066
1052
|
)
|
|
1067
|
-
),
|
|
1068
|
-
|
|
1053
|
+
), Yt = rn(Kn), Zt = g((n) => /* @__PURE__ */ e(
|
|
1054
|
+
F,
|
|
1069
1055
|
{
|
|
1070
1056
|
display: "contents",
|
|
1071
1057
|
css: {
|
|
@@ -1074,7 +1060,7 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1074
1060
|
"--color-solid": "colors.colorPalette.solid"
|
|
1075
1061
|
},
|
|
1076
1062
|
children: /* @__PURE__ */ e(
|
|
1077
|
-
|
|
1063
|
+
Yt,
|
|
1078
1064
|
{
|
|
1079
1065
|
keyboard: !1,
|
|
1080
1066
|
style: {
|
|
@@ -1118,8 +1104,8 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1118
1104
|
}
|
|
1119
1105
|
)
|
|
1120
1106
|
}
|
|
1121
|
-
)),
|
|
1122
|
-
const t =
|
|
1107
|
+
)), Xt = () => {
|
|
1108
|
+
const t = te()?.isUsingSpread, { beginPageIndex: o, totalApproximatePages: r = 0 } = Te(), i = t ? Math.floor((o || 0) / 2) : o, [a, s] = In(
|
|
1123
1109
|
() => N({
|
|
1124
1110
|
default: i || 0
|
|
1125
1111
|
})
|
|
@@ -1127,7 +1113,7 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1127
1113
|
0,
|
|
1128
1114
|
t ? Math.floor((r - 1) / 2) : r - 1
|
|
1129
1115
|
);
|
|
1130
|
-
return
|
|
1116
|
+
return q(() => {
|
|
1131
1117
|
s.update(i || 0);
|
|
1132
1118
|
}, [i, s]), {
|
|
1133
1119
|
value: a,
|
|
@@ -1135,73 +1121,73 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1135
1121
|
min: c,
|
|
1136
1122
|
max: d
|
|
1137
1123
|
};
|
|
1138
|
-
},
|
|
1139
|
-
const t =
|
|
1140
|
-
(
|
|
1141
|
-
const [
|
|
1142
|
-
h.update(
|
|
1143
|
-
const
|
|
1124
|
+
}, Kt = (n) => {
|
|
1125
|
+
const t = S(), o = te(), { manifest: r } = C(() => t?.context, [t]) ?? {}, i = r?.readingDirection === "rtl", a = o?.isUsingSpread, { totalApproximatePages: s = 0, isBeginWithinChapter: c } = Te(), d = 1, u = c, { value: p, valueSignal: h, min: m, max: v } = Xt(), I = M(
|
|
1126
|
+
(x) => {
|
|
1127
|
+
const [k = 0] = Array.isArray(x) ? x : [x];
|
|
1128
|
+
h.update(k);
|
|
1129
|
+
const V = a ? Math.floor(k) * 2 : Math.floor(k);
|
|
1144
1130
|
u ? t?.navigation.goToPageOfSpineItem({
|
|
1145
|
-
pageIndex:
|
|
1131
|
+
pageIndex: V,
|
|
1146
1132
|
spineItemId: t.pagination.state.beginSpineItemIndex ?? 0,
|
|
1147
1133
|
animation: !1
|
|
1148
1134
|
}) : t?.navigation.goToAbsolutePageIndex({
|
|
1149
|
-
absolutePageIndex:
|
|
1135
|
+
absolutePageIndex: V,
|
|
1150
1136
|
animation: !1
|
|
1151
1137
|
});
|
|
1152
1138
|
},
|
|
1153
1139
|
[t, a, h, u]
|
|
1154
1140
|
);
|
|
1155
|
-
return
|
|
1141
|
+
return fe(
|
|
1156
1142
|
() => t?.navigation.throttleLock({
|
|
1157
1143
|
duration: 100,
|
|
1158
1144
|
trigger: h.subject
|
|
1159
1145
|
}),
|
|
1160
1146
|
[t, h]
|
|
1161
|
-
), s === 1 || a && s === 2 ? /* @__PURE__ */ e(
|
|
1162
|
-
|
|
1147
|
+
), s === 1 || a && s === 2 ? /* @__PURE__ */ e(F, { style: n.style }) : /* @__PURE__ */ e(
|
|
1148
|
+
Zt,
|
|
1163
1149
|
{
|
|
1164
1150
|
value: [p],
|
|
1165
|
-
max:
|
|
1151
|
+
max: v,
|
|
1166
1152
|
min: m,
|
|
1167
1153
|
reverse: i,
|
|
1168
1154
|
step: d,
|
|
1169
|
-
onChange:
|
|
1155
|
+
onChange: I,
|
|
1170
1156
|
...n
|
|
1171
1157
|
}
|
|
1172
1158
|
);
|
|
1173
|
-
},
|
|
1159
|
+
}, Jt = g(
|
|
1174
1160
|
({
|
|
1175
1161
|
open: n,
|
|
1176
1162
|
onItemClick: t
|
|
1177
1163
|
}) => {
|
|
1178
|
-
const o =
|
|
1164
|
+
const o = Fe(null), r = S(), {
|
|
1179
1165
|
quickMenuBottomBarBoundingBoxSignal: i,
|
|
1180
1166
|
onFontSizeMenuOpenChange: a,
|
|
1181
1167
|
onRefitMenuOpenChange: s
|
|
1182
|
-
} =
|
|
1168
|
+
} = _([
|
|
1183
1169
|
"quickMenuBottomBarBoundingBoxSignal",
|
|
1184
1170
|
"onFontSizeMenuOpenChange",
|
|
1185
1171
|
"onRefitMenuOpenChange"
|
|
1186
1172
|
]), c = C(() => r?.navigation.state$, [r]), d = C(() => r?.settings.values$, [r]), u = C(
|
|
1187
1173
|
() => r?.zoom.state$.pipe(
|
|
1188
|
-
|
|
1189
|
-
(
|
|
1174
|
+
L(
|
|
1175
|
+
(x) => x.currentScale > 1 ? "in" : x.currentScale < 1 ? "out" : void 0
|
|
1190
1176
|
)
|
|
1191
1177
|
),
|
|
1192
1178
|
[r]
|
|
1193
|
-
), p = u === "in", h = u === "out", m = d?.computedPageTurnMode === "scrollable",
|
|
1194
|
-
return
|
|
1179
|
+
), p = u === "in", h = u === "out", m = d?.computedPageTurnMode === "scrollable", v = d?.computedPageTurnDirection === "vertical", [I, T] = y(!0);
|
|
1180
|
+
return q(() => {
|
|
1195
1181
|
if (!o.current) return;
|
|
1196
|
-
const
|
|
1197
|
-
for (const
|
|
1198
|
-
i.update(
|
|
1182
|
+
const x = new ResizeObserver((k) => {
|
|
1183
|
+
for (const V of k)
|
|
1184
|
+
i.update(V);
|
|
1199
1185
|
});
|
|
1200
|
-
return
|
|
1201
|
-
|
|
1186
|
+
return x.observe(o.current), () => {
|
|
1187
|
+
x.disconnect();
|
|
1202
1188
|
};
|
|
1203
1189
|
}, [i]), /* @__PURE__ */ l(
|
|
1204
|
-
|
|
1190
|
+
Ze,
|
|
1205
1191
|
{
|
|
1206
1192
|
present: n,
|
|
1207
1193
|
position: "bottom",
|
|
@@ -1213,7 +1199,7 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1213
1199
|
ref: o,
|
|
1214
1200
|
children: [
|
|
1215
1201
|
/* @__PURE__ */ l(
|
|
1216
|
-
|
|
1202
|
+
D,
|
|
1217
1203
|
{
|
|
1218
1204
|
flex: 1,
|
|
1219
1205
|
alignItems: "center",
|
|
@@ -1222,7 +1208,7 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1222
1208
|
px: 4,
|
|
1223
1209
|
children: [
|
|
1224
1210
|
/* @__PURE__ */ e(
|
|
1225
|
-
|
|
1211
|
+
R,
|
|
1226
1212
|
{
|
|
1227
1213
|
"aria-label": "left",
|
|
1228
1214
|
size: "lg",
|
|
@@ -1230,7 +1216,7 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1230
1216
|
flexShrink: 0,
|
|
1231
1217
|
onClick: () => r?.navigation.goToLeftOrTopSpineItem(),
|
|
1232
1218
|
disabled: !c?.canGoLeftSpineItem && !c?.canGoTopSpineItem,
|
|
1233
|
-
children:
|
|
1219
|
+
children: v ? /* @__PURE__ */ e(Qn, {}) : /* @__PURE__ */ e(Un, {})
|
|
1234
1220
|
}
|
|
1235
1221
|
),
|
|
1236
1222
|
/* @__PURE__ */ l(
|
|
@@ -1243,9 +1229,9 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1243
1229
|
overflow: "auto",
|
|
1244
1230
|
px: 4,
|
|
1245
1231
|
children: [
|
|
1246
|
-
/* @__PURE__ */ e(
|
|
1232
|
+
/* @__PURE__ */ e(Ut, {}),
|
|
1247
1233
|
/* @__PURE__ */ e(
|
|
1248
|
-
|
|
1234
|
+
Kt,
|
|
1249
1235
|
{
|
|
1250
1236
|
style: {
|
|
1251
1237
|
width: "100%",
|
|
@@ -1258,7 +1244,7 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1258
1244
|
}
|
|
1259
1245
|
),
|
|
1260
1246
|
/* @__PURE__ */ e(
|
|
1261
|
-
|
|
1247
|
+
R,
|
|
1262
1248
|
{
|
|
1263
1249
|
"aria-label": "right",
|
|
1264
1250
|
size: "lg",
|
|
@@ -1268,72 +1254,72 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1268
1254
|
onClick: () => {
|
|
1269
1255
|
r?.navigation.goToRightOrBottomSpineItem();
|
|
1270
1256
|
},
|
|
1271
|
-
children:
|
|
1257
|
+
children: v ? /* @__PURE__ */ e(Yn, {}) : /* @__PURE__ */ e(Zn, {})
|
|
1272
1258
|
}
|
|
1273
1259
|
)
|
|
1274
1260
|
]
|
|
1275
1261
|
}
|
|
1276
1262
|
),
|
|
1277
|
-
/* @__PURE__ */ e(
|
|
1278
|
-
|
|
1263
|
+
/* @__PURE__ */ e(D, { alignSelf: "stretch", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ l(
|
|
1264
|
+
Ce.Root,
|
|
1279
1265
|
{
|
|
1280
|
-
open:
|
|
1266
|
+
open: I,
|
|
1281
1267
|
flex: 1,
|
|
1282
|
-
onOpenChange: ({ open:
|
|
1283
|
-
T(
|
|
1268
|
+
onOpenChange: ({ open: x }) => {
|
|
1269
|
+
T(x);
|
|
1284
1270
|
},
|
|
1285
1271
|
width: "100%",
|
|
1286
1272
|
children: [
|
|
1287
1273
|
/* @__PURE__ */ e(
|
|
1288
|
-
|
|
1274
|
+
Ce.Trigger,
|
|
1289
1275
|
{
|
|
1290
1276
|
paddingY: "3",
|
|
1291
1277
|
width: "100%",
|
|
1292
1278
|
display: "flex",
|
|
1293
1279
|
justifyContent: "center",
|
|
1294
1280
|
children: /* @__PURE__ */ e(
|
|
1295
|
-
|
|
1281
|
+
fn,
|
|
1296
1282
|
{
|
|
1297
1283
|
style: {
|
|
1298
|
-
transform:
|
|
1284
|
+
transform: I ? "rotate(0deg)" : "rotate(180deg)"
|
|
1299
1285
|
}
|
|
1300
1286
|
}
|
|
1301
1287
|
)
|
|
1302
1288
|
}
|
|
1303
1289
|
),
|
|
1304
|
-
/* @__PURE__ */ e(
|
|
1290
|
+
/* @__PURE__ */ e(Ce.Content, { display: "flex", justifyContent: "center", children: /* @__PURE__ */ l(F, { display: "flex", overflowX: "auto", px: 4, pb: 1, children: [
|
|
1305
1291
|
/* @__PURE__ */ e(
|
|
1306
|
-
|
|
1292
|
+
R,
|
|
1307
1293
|
{
|
|
1308
1294
|
"aria-label": "Help",
|
|
1309
1295
|
size: "lg",
|
|
1310
1296
|
variant: "ghost",
|
|
1311
1297
|
onClick: () => t("help"),
|
|
1312
|
-
children: /* @__PURE__ */ e(
|
|
1298
|
+
children: /* @__PURE__ */ e(mn, {})
|
|
1313
1299
|
}
|
|
1314
1300
|
),
|
|
1315
1301
|
/* @__PURE__ */ e(
|
|
1316
|
-
|
|
1302
|
+
R,
|
|
1317
1303
|
{
|
|
1318
1304
|
"aria-label": "Table of contents",
|
|
1319
1305
|
size: "lg",
|
|
1320
1306
|
variant: "ghost",
|
|
1321
1307
|
onClick: () => t("toc"),
|
|
1322
|
-
children: /* @__PURE__ */ e(
|
|
1308
|
+
children: /* @__PURE__ */ e(bn, {})
|
|
1323
1309
|
}
|
|
1324
1310
|
),
|
|
1325
1311
|
Ge(r) && /* @__PURE__ */ e(
|
|
1326
|
-
|
|
1312
|
+
R,
|
|
1327
1313
|
{
|
|
1328
1314
|
"aria-label": "Search",
|
|
1329
1315
|
size: "lg",
|
|
1330
1316
|
variant: "ghost",
|
|
1331
1317
|
onClick: () => t("search"),
|
|
1332
|
-
children: /* @__PURE__ */ e(
|
|
1318
|
+
children: /* @__PURE__ */ e(Cn, {})
|
|
1333
1319
|
}
|
|
1334
1320
|
),
|
|
1335
1321
|
/* @__PURE__ */ e(
|
|
1336
|
-
|
|
1322
|
+
R,
|
|
1337
1323
|
{
|
|
1338
1324
|
"aria-label": "Zoom",
|
|
1339
1325
|
size: "lg",
|
|
@@ -1344,11 +1330,11 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1344
1330
|
scale: 2
|
|
1345
1331
|
});
|
|
1346
1332
|
},
|
|
1347
|
-
children: p ? /* @__PURE__ */ e(
|
|
1333
|
+
children: p ? /* @__PURE__ */ e(Sn, {}) : /* @__PURE__ */ e(vn, {})
|
|
1348
1334
|
}
|
|
1349
1335
|
),
|
|
1350
1336
|
/* @__PURE__ */ e(
|
|
1351
|
-
|
|
1337
|
+
R,
|
|
1352
1338
|
{
|
|
1353
1339
|
"aria-label": "font size",
|
|
1354
1340
|
size: "lg",
|
|
@@ -1356,31 +1342,31 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1356
1342
|
a(!0);
|
|
1357
1343
|
},
|
|
1358
1344
|
variant: "ghost",
|
|
1359
|
-
children: /* @__PURE__ */ e(
|
|
1345
|
+
children: /* @__PURE__ */ e(Nn, {})
|
|
1360
1346
|
}
|
|
1361
1347
|
),
|
|
1362
|
-
|
|
1363
|
-
|
|
1348
|
+
ce(r) && /* @__PURE__ */ e(
|
|
1349
|
+
R,
|
|
1364
1350
|
{
|
|
1365
1351
|
"aria-label": "Bookmarks",
|
|
1366
1352
|
size: "lg",
|
|
1367
1353
|
variant: "ghost",
|
|
1368
1354
|
onClick: () => t("bookmarks"),
|
|
1369
|
-
children: /* @__PURE__ */ e(
|
|
1355
|
+
children: /* @__PURE__ */ e(Hn, {})
|
|
1370
1356
|
}
|
|
1371
1357
|
),
|
|
1372
|
-
|
|
1373
|
-
|
|
1358
|
+
ce(r) && /* @__PURE__ */ e(
|
|
1359
|
+
R,
|
|
1374
1360
|
{
|
|
1375
1361
|
"aria-label": "Annotations",
|
|
1376
1362
|
size: "lg",
|
|
1377
1363
|
variant: "ghost",
|
|
1378
1364
|
onClick: () => t("annotations"),
|
|
1379
|
-
children: /* @__PURE__ */ e(
|
|
1365
|
+
children: /* @__PURE__ */ e(he, {})
|
|
1380
1366
|
}
|
|
1381
1367
|
),
|
|
1382
|
-
|
|
1383
|
-
|
|
1368
|
+
Qe(r) && /* @__PURE__ */ e(
|
|
1369
|
+
R,
|
|
1384
1370
|
{
|
|
1385
1371
|
"aria-label": "Refit",
|
|
1386
1372
|
size: "lg",
|
|
@@ -1389,11 +1375,11 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1389
1375
|
s(!0);
|
|
1390
1376
|
},
|
|
1391
1377
|
disabled: !m,
|
|
1392
|
-
children: /* @__PURE__ */ e(
|
|
1378
|
+
children: /* @__PURE__ */ e(Wn, {})
|
|
1393
1379
|
}
|
|
1394
1380
|
),
|
|
1395
1381
|
/* @__PURE__ */ e(
|
|
1396
|
-
|
|
1382
|
+
R,
|
|
1397
1383
|
{
|
|
1398
1384
|
"aria-label": "Thumbnails",
|
|
1399
1385
|
size: "lg",
|
|
@@ -1404,17 +1390,17 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1404
1390
|
scale: 0.5
|
|
1405
1391
|
});
|
|
1406
1392
|
},
|
|
1407
|
-
children: /* @__PURE__ */ e(
|
|
1393
|
+
children: /* @__PURE__ */ e(xn, {})
|
|
1408
1394
|
}
|
|
1409
1395
|
),
|
|
1410
|
-
|
|
1411
|
-
|
|
1396
|
+
je(r) && /* @__PURE__ */ e(
|
|
1397
|
+
R,
|
|
1412
1398
|
{
|
|
1413
1399
|
"aria-label": "Gallery",
|
|
1414
1400
|
size: "lg",
|
|
1415
1401
|
variant: "ghost",
|
|
1416
1402
|
onClick: () => t("gallery"),
|
|
1417
|
-
children: /* @__PURE__ */ e(
|
|
1403
|
+
children: /* @__PURE__ */ e(jn, {})
|
|
1418
1404
|
}
|
|
1419
1405
|
)
|
|
1420
1406
|
] }) })
|
|
@@ -1425,13 +1411,13 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1425
1411
|
}
|
|
1426
1412
|
);
|
|
1427
1413
|
}
|
|
1428
|
-
),
|
|
1429
|
-
const [n, t] =
|
|
1414
|
+
), eo = () => {
|
|
1415
|
+
const [n, t] = y(!1), o = M(() => document.fullscreenElement ? document.exitFullscreen().catch(console.error).then(() => {
|
|
1430
1416
|
t(!1);
|
|
1431
1417
|
}) : document.documentElement.requestFullscreen({ navigationUI: "hide" }).catch(console.error).then(() => {
|
|
1432
1418
|
t(!0);
|
|
1433
1419
|
}), []);
|
|
1434
|
-
return
|
|
1420
|
+
return q(() => {
|
|
1435
1421
|
function r() {
|
|
1436
1422
|
t(!!document.fullscreenElement);
|
|
1437
1423
|
}
|
|
@@ -1442,14 +1428,14 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1442
1428
|
isFullscreen: n,
|
|
1443
1429
|
onToggleFullscreenClick: o
|
|
1444
1430
|
};
|
|
1445
|
-
},
|
|
1431
|
+
}, no = g(
|
|
1446
1432
|
({
|
|
1447
1433
|
open: n,
|
|
1448
1434
|
onItemClick: t
|
|
1449
1435
|
}) => {
|
|
1450
|
-
const o =
|
|
1436
|
+
const o = S(), r = C(() => o?.context.manifest$, [o]), { isFullscreen: i, onToggleFullscreenClick: a } = eo();
|
|
1451
1437
|
return /* @__PURE__ */ l(
|
|
1452
|
-
|
|
1438
|
+
Ze,
|
|
1453
1439
|
{
|
|
1454
1440
|
present: n,
|
|
1455
1441
|
position: "top",
|
|
@@ -1457,14 +1443,14 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1457
1443
|
justifyContent: "space-between",
|
|
1458
1444
|
children: [
|
|
1459
1445
|
/* @__PURE__ */ e(
|
|
1460
|
-
|
|
1446
|
+
R,
|
|
1461
1447
|
{
|
|
1462
1448
|
"aria-label": "left",
|
|
1463
1449
|
size: "lg",
|
|
1464
1450
|
variant: "ghost",
|
|
1465
1451
|
flexShrink: 0,
|
|
1466
1452
|
onClick: () => t("back"),
|
|
1467
|
-
children: /* @__PURE__ */ e(
|
|
1453
|
+
children: /* @__PURE__ */ e(Jn, {})
|
|
1468
1454
|
}
|
|
1469
1455
|
),
|
|
1470
1456
|
/* @__PURE__ */ e(
|
|
@@ -1479,27 +1465,27 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1479
1465
|
children: /* @__PURE__ */ e(b, { truncate: !0, maxWidth: "100%", children: r?.title })
|
|
1480
1466
|
}
|
|
1481
1467
|
),
|
|
1482
|
-
/* @__PURE__ */ l(
|
|
1468
|
+
/* @__PURE__ */ l(D, { children: [
|
|
1483
1469
|
/* @__PURE__ */ e(
|
|
1484
|
-
|
|
1470
|
+
R,
|
|
1485
1471
|
{
|
|
1486
1472
|
"aria-label": "right",
|
|
1487
1473
|
size: "lg",
|
|
1488
1474
|
flexShrink: 0,
|
|
1489
1475
|
variant: "ghost",
|
|
1490
1476
|
onClick: () => t("more"),
|
|
1491
|
-
children: /* @__PURE__ */ e(
|
|
1477
|
+
children: /* @__PURE__ */ e(et, {})
|
|
1492
1478
|
}
|
|
1493
1479
|
),
|
|
1494
1480
|
/* @__PURE__ */ e(
|
|
1495
|
-
|
|
1481
|
+
R,
|
|
1496
1482
|
{
|
|
1497
1483
|
"aria-label": "right",
|
|
1498
1484
|
size: "lg",
|
|
1499
1485
|
flexShrink: 0,
|
|
1500
1486
|
variant: "ghost",
|
|
1501
1487
|
onClick: a,
|
|
1502
|
-
children: i ? /* @__PURE__ */ e(
|
|
1488
|
+
children: i ? /* @__PURE__ */ e(qn, {}) : /* @__PURE__ */ e(Gn, {})
|
|
1503
1489
|
}
|
|
1504
1490
|
)
|
|
1505
1491
|
] })
|
|
@@ -1507,24 +1493,24 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1507
1493
|
}
|
|
1508
1494
|
);
|
|
1509
1495
|
}
|
|
1510
|
-
),
|
|
1496
|
+
), to = g(
|
|
1511
1497
|
({
|
|
1512
1498
|
onItemClick: n
|
|
1513
1499
|
}) => {
|
|
1514
|
-
const [t] =
|
|
1500
|
+
const [t] = Oe(), { refitMenuOpen: o, fontSizeMenuOpen: r } = _([
|
|
1515
1501
|
"refitMenuOpen",
|
|
1516
1502
|
"fontSizeMenuOpen"
|
|
1517
1503
|
]);
|
|
1518
|
-
return /* @__PURE__ */ l(
|
|
1504
|
+
return /* @__PURE__ */ l(de, { children: [
|
|
1519
1505
|
/* @__PURE__ */ e(
|
|
1520
|
-
|
|
1506
|
+
no,
|
|
1521
1507
|
{
|
|
1522
1508
|
open: t && !o && !r,
|
|
1523
1509
|
onItemClick: n
|
|
1524
1510
|
}
|
|
1525
1511
|
),
|
|
1526
1512
|
/* @__PURE__ */ e(
|
|
1527
|
-
|
|
1513
|
+
Jt,
|
|
1528
1514
|
{
|
|
1529
1515
|
open: t && !o && !r,
|
|
1530
1516
|
onItemClick: n
|
|
@@ -1532,41 +1518,41 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1532
1518
|
)
|
|
1533
1519
|
] });
|
|
1534
1520
|
}
|
|
1535
|
-
),
|
|
1521
|
+
), oo = B.forwardRef(
|
|
1536
1522
|
function(t, o) {
|
|
1537
1523
|
const { label: r, children: i, helperText: a, errorText: s, optionalText: c, ...d } = t;
|
|
1538
|
-
return /* @__PURE__ */ l(
|
|
1539
|
-
r && /* @__PURE__ */ l(
|
|
1524
|
+
return /* @__PURE__ */ l(oe.Root, { ref: o, ...d, children: [
|
|
1525
|
+
r && /* @__PURE__ */ l(oe.Label, { children: [
|
|
1540
1526
|
r,
|
|
1541
|
-
/* @__PURE__ */ e(
|
|
1527
|
+
/* @__PURE__ */ e(oe.RequiredIndicator, { fallback: c })
|
|
1542
1528
|
] }),
|
|
1543
1529
|
i,
|
|
1544
|
-
a && /* @__PURE__ */ e(
|
|
1545
|
-
s && /* @__PURE__ */ e(
|
|
1530
|
+
a && /* @__PURE__ */ e(oe.HelperText, { children: a }),
|
|
1531
|
+
s && /* @__PURE__ */ e(oe.ErrorText, { children: s })
|
|
1546
1532
|
] });
|
|
1547
1533
|
}
|
|
1548
|
-
),
|
|
1549
|
-
const { refitMenuOpen: t, onRefitMenuOpenChange: o } =
|
|
1534
|
+
), ro = g(() => {
|
|
1535
|
+
const { refitMenuOpen: t, onRefitMenuOpenChange: o } = _([
|
|
1550
1536
|
"refitMenuOpen",
|
|
1551
1537
|
"onRefitMenuOpenChange"
|
|
1552
|
-
]), r =
|
|
1538
|
+
]), r = S(), i = Qe(r) ? r : void 0, a = C(
|
|
1553
1539
|
() => i?.refit.settings$,
|
|
1554
1540
|
[i]
|
|
1555
1541
|
);
|
|
1556
1542
|
return /* @__PURE__ */ e(
|
|
1557
|
-
|
|
1543
|
+
Q,
|
|
1558
1544
|
{
|
|
1559
1545
|
lazyMount: !0,
|
|
1560
1546
|
open: t,
|
|
1561
1547
|
onOpenChange: (s) => o(s.open),
|
|
1562
1548
|
placement: "center",
|
|
1563
|
-
children: /* @__PURE__ */ l(
|
|
1564
|
-
/* @__PURE__ */ e(
|
|
1565
|
-
/* @__PURE__ */ e(
|
|
1566
|
-
/* @__PURE__ */ e(
|
|
1567
|
-
/* @__PURE__ */ l(
|
|
1568
|
-
/* @__PURE__ */ e(
|
|
1569
|
-
|
|
1549
|
+
children: /* @__PURE__ */ l(G, { children: [
|
|
1550
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Viewport fit" }) }),
|
|
1551
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ l($.Root, { children: [
|
|
1552
|
+
/* @__PURE__ */ e($.HelperText, { children: "Adjust the viewport for a more comfortable reading experience." }),
|
|
1553
|
+
/* @__PURE__ */ l($.Content, { children: [
|
|
1554
|
+
/* @__PURE__ */ e(oo, { label: "Profile", children: /* @__PURE__ */ e(
|
|
1555
|
+
Ye,
|
|
1570
1556
|
{
|
|
1571
1557
|
defaultValue: "fit",
|
|
1572
1558
|
onValueChange: (s) => {
|
|
@@ -1578,15 +1564,15 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1578
1564
|
},
|
|
1579
1565
|
value: a?.viewportFit ?? "fit",
|
|
1580
1566
|
children: /* @__PURE__ */ l(O, { gap: 2, children: [
|
|
1581
|
-
/* @__PURE__ */ e(
|
|
1582
|
-
/* @__PURE__ */ e(
|
|
1583
|
-
/* @__PURE__ */ e(
|
|
1584
|
-
/* @__PURE__ */ e(
|
|
1567
|
+
/* @__PURE__ */ e(ae, { value: "desktop", children: "Desktop" }),
|
|
1568
|
+
/* @__PURE__ */ e(ae, { value: "tablet", children: "Tablet" }),
|
|
1569
|
+
/* @__PURE__ */ e(ae, { value: "fit", children: "Full width (default)" }),
|
|
1570
|
+
/* @__PURE__ */ e(ae, { value: "custom", children: "Custom" })
|
|
1585
1571
|
] })
|
|
1586
1572
|
}
|
|
1587
1573
|
) }),
|
|
1588
1574
|
/* @__PURE__ */ e(
|
|
1589
|
-
|
|
1575
|
+
Re,
|
|
1590
1576
|
{
|
|
1591
1577
|
label: "Maximum width (%)",
|
|
1592
1578
|
showValue: !0,
|
|
@@ -1605,12 +1591,12 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1605
1591
|
)
|
|
1606
1592
|
] })
|
|
1607
1593
|
] }) }),
|
|
1608
|
-
/* @__PURE__ */ e(
|
|
1609
|
-
/* @__PURE__ */ e(
|
|
1594
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(W, { variant: "outline", children: "Close" }) }) }),
|
|
1595
|
+
/* @__PURE__ */ e(j, {})
|
|
1610
1596
|
] })
|
|
1611
1597
|
}
|
|
1612
1598
|
);
|
|
1613
|
-
}),
|
|
1599
|
+
}), io = g(
|
|
1614
1600
|
({
|
|
1615
1601
|
contextText: n = "",
|
|
1616
1602
|
startOffset: t = 0,
|
|
@@ -1630,7 +1616,7 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1630
1616
|
)
|
|
1631
1617
|
);
|
|
1632
1618
|
return /* @__PURE__ */ l(
|
|
1633
|
-
|
|
1619
|
+
xe,
|
|
1634
1620
|
{
|
|
1635
1621
|
href: r,
|
|
1636
1622
|
style: { margin: 5, overflow: "hidden" },
|
|
@@ -1654,18 +1640,18 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1654
1640
|
}
|
|
1655
1641
|
);
|
|
1656
1642
|
}
|
|
1657
|
-
),
|
|
1658
|
-
const n = ie(() => new
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
(a) => a === "" || !r ?
|
|
1662
|
-
|
|
1643
|
+
), ao = 500, lo = () => {
|
|
1644
|
+
const n = ie(() => new Bn("")), t = C(n), o = S(), r = Ge(o) ? o : void 0, i = C(() => n.pipe(
|
|
1645
|
+
Ve(),
|
|
1646
|
+
H(
|
|
1647
|
+
(a) => a === "" || !r ? ge(void 0) : He(
|
|
1648
|
+
ge({
|
|
1663
1649
|
type: "start",
|
|
1664
1650
|
data: void 0
|
|
1665
1651
|
}),
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1652
|
+
We(ao).pipe(
|
|
1653
|
+
H(() => r.search.search(a)),
|
|
1654
|
+
L((s) => ({ type: "end", data: s }))
|
|
1669
1655
|
)
|
|
1670
1656
|
)
|
|
1671
1657
|
)
|
|
@@ -1676,11 +1662,11 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1676
1662
|
status: i?.type ?? "idle",
|
|
1677
1663
|
data: i?.data
|
|
1678
1664
|
};
|
|
1679
|
-
},
|
|
1665
|
+
}, so = g(
|
|
1680
1666
|
({ onNavigate: n }) => {
|
|
1681
|
-
const t =
|
|
1667
|
+
const t = S(), { value: o, setValue: r, status: i, data: a } = lo(), s = (u) => {
|
|
1682
1668
|
r(u.target.value);
|
|
1683
|
-
}, c =
|
|
1669
|
+
}, c = M(
|
|
1684
1670
|
(u) => {
|
|
1685
1671
|
n(), t?.navigation.goToCfi(u);
|
|
1686
1672
|
},
|
|
@@ -1691,7 +1677,7 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1691
1677
|
);
|
|
1692
1678
|
return /* @__PURE__ */ l(O, { flex: 1, height: "100%", gap: 2, children: [
|
|
1693
1679
|
/* @__PURE__ */ e(
|
|
1694
|
-
|
|
1680
|
+
an,
|
|
1695
1681
|
{
|
|
1696
1682
|
placeholder: "Type something...",
|
|
1697
1683
|
value: o,
|
|
@@ -1721,7 +1707,7 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1721
1707
|
" result(s)"
|
|
1722
1708
|
] }),
|
|
1723
1709
|
/* @__PURE__ */ e(O, { gap: 0, children: d?.map((u, p) => /* @__PURE__ */ e(
|
|
1724
|
-
|
|
1710
|
+
io,
|
|
1725
1711
|
{
|
|
1726
1712
|
contextText: u.meta?.range?.startContainer.parentElement?.textContent ?? "",
|
|
1727
1713
|
pageIndex: u.meta?.itemPageIndex,
|
|
@@ -1739,13 +1725,13 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1739
1725
|
)
|
|
1740
1726
|
] });
|
|
1741
1727
|
}
|
|
1742
|
-
),
|
|
1728
|
+
), co = g(
|
|
1743
1729
|
({
|
|
1744
1730
|
open: n,
|
|
1745
1731
|
setOpen: t,
|
|
1746
1732
|
onNavigate: o
|
|
1747
1733
|
}) => /* @__PURE__ */ e(
|
|
1748
|
-
|
|
1734
|
+
Q,
|
|
1749
1735
|
{
|
|
1750
1736
|
lazyMount: !0,
|
|
1751
1737
|
placement: "center",
|
|
@@ -1753,41 +1739,41 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1753
1739
|
onOpenChange: (r) => t(r.open),
|
|
1754
1740
|
size: { mdDown: "full", md: "lg" },
|
|
1755
1741
|
scrollBehavior: "inside",
|
|
1756
|
-
children: /* @__PURE__ */ l(
|
|
1757
|
-
/* @__PURE__ */ e(
|
|
1758
|
-
/* @__PURE__ */ e(
|
|
1759
|
-
/* @__PURE__ */ e(
|
|
1760
|
-
/* @__PURE__ */ e(
|
|
1742
|
+
children: /* @__PURE__ */ l(G, { height: "100%", children: [
|
|
1743
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Search" }) }),
|
|
1744
|
+
/* @__PURE__ */ e(Z, { flex: 1, p: 0, children: /* @__PURE__ */ e(so, { onNavigate: o }) }),
|
|
1745
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(W, { variant: "outline", children: "Cancel" }) }) }),
|
|
1746
|
+
/* @__PURE__ */ e(j, {})
|
|
1761
1747
|
] })
|
|
1762
1748
|
}
|
|
1763
1749
|
)
|
|
1764
|
-
),
|
|
1750
|
+
), uo = g(
|
|
1765
1751
|
({ onNavigate: n }) => {
|
|
1766
|
-
const t =
|
|
1752
|
+
const t = S(), { manifest: o, assumedRenditionLayout: r } = C(() => t?.context, [t]) ?? {}, { nav: i } = o ?? {}, a = te();
|
|
1767
1753
|
i?.toc;
|
|
1768
1754
|
const { beginSpineItemIndex: s, beginPageIndexInSpineItem: c } = a ?? {}, d = (r === "reflowable" ? c : s) || 0;
|
|
1769
1755
|
let u = a?.beginChapterInfo;
|
|
1770
1756
|
for (; u?.subChapter; )
|
|
1771
1757
|
u = u?.subChapter;
|
|
1772
|
-
const p = (h, m,
|
|
1758
|
+
const p = (h, m, v) => /* @__PURE__ */ l(ln.Fragment, { children: [
|
|
1773
1759
|
/* @__PURE__ */ e(
|
|
1774
|
-
|
|
1760
|
+
A.Item,
|
|
1775
1761
|
{
|
|
1776
|
-
pl: 4 * (
|
|
1762
|
+
pl: 4 * (v + 1),
|
|
1777
1763
|
style: {
|
|
1778
1764
|
display: "flex",
|
|
1779
1765
|
alignItems: "center"
|
|
1780
1766
|
},
|
|
1781
1767
|
children: /* @__PURE__ */ l(
|
|
1782
|
-
|
|
1768
|
+
xe,
|
|
1783
1769
|
{
|
|
1784
1770
|
onClick: () => {
|
|
1785
1771
|
n(), t?.navigation.goToUrl(h.href);
|
|
1786
1772
|
},
|
|
1787
1773
|
href: "#",
|
|
1788
1774
|
children: [
|
|
1789
|
-
u?.path === h.path && /* @__PURE__ */ e(
|
|
1790
|
-
u?.path !== h.path && /* @__PURE__ */ e(
|
|
1775
|
+
u?.path === h.path && /* @__PURE__ */ e(A.Indicator, { asChild: !0, children: /* @__PURE__ */ e(ze, {}) }),
|
|
1776
|
+
u?.path !== h.path && /* @__PURE__ */ e(A.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ e(ze, {}) }),
|
|
1791
1777
|
/* @__PURE__ */ l(O, { gap: 0, children: [
|
|
1792
1778
|
/* @__PURE__ */ e(b, { fontSize: "md", children: h.title || h.path }),
|
|
1793
1779
|
u?.path === h.path && /* @__PURE__ */ e(
|
|
@@ -1805,19 +1791,19 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1805
1791
|
)
|
|
1806
1792
|
}
|
|
1807
1793
|
),
|
|
1808
|
-
h.contents.length > 0 && /* @__PURE__ */ e(
|
|
1809
|
-
(
|
|
1794
|
+
h.contents.length > 0 && /* @__PURE__ */ e(A.Root, { as: "div", gap: 2, children: h.contents.map(
|
|
1795
|
+
(I, T) => p(I, T, v + 1)
|
|
1810
1796
|
) })
|
|
1811
1797
|
] }, m);
|
|
1812
|
-
return /* @__PURE__ */ e(
|
|
1798
|
+
return /* @__PURE__ */ e(A.Root, { gap: 3, overflowY: "auto", py: 4, flex: 1, children: i?.toc.map((h, m) => p(h, m, 0)) });
|
|
1813
1799
|
}
|
|
1814
|
-
),
|
|
1800
|
+
), ho = g(
|
|
1815
1801
|
({
|
|
1816
1802
|
open: n,
|
|
1817
1803
|
setOpen: t,
|
|
1818
1804
|
onNavigate: o
|
|
1819
1805
|
}) => /* @__PURE__ */ e(
|
|
1820
|
-
|
|
1806
|
+
Q,
|
|
1821
1807
|
{
|
|
1822
1808
|
lazyMount: !0,
|
|
1823
1809
|
placement: "center",
|
|
@@ -1825,44 +1811,44 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1825
1811
|
onOpenChange: (r) => t(r.open),
|
|
1826
1812
|
size: { mdDown: "full", md: "lg" },
|
|
1827
1813
|
scrollBehavior: "inside",
|
|
1828
|
-
children: /* @__PURE__ */ l(
|
|
1829
|
-
/* @__PURE__ */ e(
|
|
1830
|
-
/* @__PURE__ */ e(
|
|
1831
|
-
/* @__PURE__ */ e(
|
|
1832
|
-
/* @__PURE__ */ e(
|
|
1814
|
+
children: /* @__PURE__ */ l(G, { children: [
|
|
1815
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Table of Contents" }) }),
|
|
1816
|
+
/* @__PURE__ */ e(Z, { overflowY: "auto", flex: 1, children: /* @__PURE__ */ e(uo, { onNavigate: o }) }),
|
|
1817
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(W, { variant: "outline", children: "Cancel" }) }) }),
|
|
1818
|
+
/* @__PURE__ */ e(j, {})
|
|
1833
1819
|
] })
|
|
1834
1820
|
}
|
|
1835
1821
|
)
|
|
1836
|
-
),
|
|
1822
|
+
), Pe = 0.5, Ee = 1, Be = 5, po = (n, t, o, r) => {
|
|
1837
1823
|
if (n > t && n < t + r)
|
|
1838
1824
|
return t + r;
|
|
1839
1825
|
const i = Math.min(Math.max(n, t), o), a = Math.round((i - t) / r) * r + t;
|
|
1840
1826
|
return Math.round(a * 100) / 100;
|
|
1841
|
-
},
|
|
1842
|
-
const { quickMenuBottomBarBoundingBoxSignal: n } =
|
|
1827
|
+
}, go = g(() => {
|
|
1828
|
+
const { quickMenuBottomBarBoundingBoxSignal: n } = _([
|
|
1843
1829
|
"quickMenuBottomBarBoundingBoxSignal"
|
|
1844
1830
|
]), t = ue(
|
|
1845
1831
|
n
|
|
1846
|
-
), o =
|
|
1832
|
+
), o = S(), r = C(
|
|
1847
1833
|
() => o?.zoom.state$.pipe(
|
|
1848
|
-
|
|
1849
|
-
|
|
1834
|
+
L((c) => c.currentScale),
|
|
1835
|
+
$e(100, An, {
|
|
1850
1836
|
leading: !0,
|
|
1851
1837
|
trailing: !0
|
|
1852
1838
|
})
|
|
1853
1839
|
),
|
|
1854
1840
|
[o]
|
|
1855
1841
|
) ?? 1, i = C(
|
|
1856
|
-
() => o?.zoom.state$.pipe(
|
|
1842
|
+
() => o?.zoom.state$.pipe(L((c) => c.isZooming)),
|
|
1857
1843
|
[o]
|
|
1858
|
-
) ?? !1, a =
|
|
1844
|
+
) ?? !1, a = po(
|
|
1859
1845
|
r,
|
|
1846
|
+
Ee,
|
|
1860
1847
|
Be,
|
|
1861
|
-
|
|
1862
|
-
Ee
|
|
1848
|
+
Pe
|
|
1863
1849
|
), s = t?.borderBoxSize?.[0]?.blockSize ?? 1;
|
|
1864
1850
|
return /* @__PURE__ */ e(
|
|
1865
|
-
|
|
1851
|
+
le,
|
|
1866
1852
|
{
|
|
1867
1853
|
present: i && r > 1,
|
|
1868
1854
|
animationName: { _open: "fade-in", _closed: "fade-out" },
|
|
@@ -1875,12 +1861,12 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1875
1861
|
borderRadius: "md",
|
|
1876
1862
|
p: 4,
|
|
1877
1863
|
children: /* @__PURE__ */ e(
|
|
1878
|
-
|
|
1864
|
+
Re,
|
|
1879
1865
|
{
|
|
1880
1866
|
value: [a],
|
|
1881
|
-
min:
|
|
1882
|
-
max:
|
|
1883
|
-
step:
|
|
1867
|
+
min: Ee,
|
|
1868
|
+
max: Be,
|
|
1869
|
+
step: Pe,
|
|
1884
1870
|
minWidth: 200,
|
|
1885
1871
|
onValueChange: (c) => {
|
|
1886
1872
|
const d = c.value?.[0] ?? 1;
|
|
@@ -1890,26 +1876,30 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1890
1876
|
)
|
|
1891
1877
|
}
|
|
1892
1878
|
);
|
|
1893
|
-
}),
|
|
1879
|
+
}), Ae = { _open: "fade-in", _closed: "fade-out" }, fo = g(() => (bt(), null)), mo = g(() => (Nt(), Ht(), /* @__PURE__ */ l(de, { children: [
|
|
1880
|
+
/* @__PURE__ */ e(zt, {}),
|
|
1881
|
+
/* @__PURE__ */ e(fo, {})
|
|
1882
|
+
] }))), bo = g(
|
|
1894
1883
|
({
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
onItemClick: o,
|
|
1898
|
-
children: r,
|
|
1899
|
-
...i
|
|
1884
|
+
children: n,
|
|
1885
|
+
...t
|
|
1900
1886
|
}) => {
|
|
1901
|
-
const
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1887
|
+
const { enableFloatingTime: o, enableFloatingProgress: r, onItemClick: i } = _([
|
|
1888
|
+
"enableFloatingTime",
|
|
1889
|
+
"enableFloatingProgress",
|
|
1890
|
+
"onItemClick"
|
|
1891
|
+
]), [a, s] = y(!1), [c, d] = y(!1), [u, p] = y(!1), [h, m] = y(void 0), [v, I] = y(!1), [T, x] = Oe(), k = M(() => {
|
|
1892
|
+
s(!1), d(!1), p(!1), m(void 0), x(!1), I(!1);
|
|
1893
|
+
}, [x]), V = M(
|
|
1894
|
+
(P) => {
|
|
1895
|
+
P === "annotations" ? m("annotations") : P === "search" ? p(!0) : P === "help" ? d(!0) : P === "toc" ? s(!0) : P === "bookmarks" ? m("bookmarks") : P === "gallery" && I(!0), i?.(P);
|
|
1906
1896
|
},
|
|
1907
|
-
[
|
|
1897
|
+
[i]
|
|
1908
1898
|
);
|
|
1909
|
-
return /* @__PURE__ */ l(
|
|
1910
|
-
/* @__PURE__ */ e(
|
|
1899
|
+
return /* @__PURE__ */ l(de, { children: [
|
|
1900
|
+
/* @__PURE__ */ e(mo, {}),
|
|
1911
1901
|
/* @__PURE__ */ l(
|
|
1912
|
-
|
|
1902
|
+
F,
|
|
1913
1903
|
{
|
|
1914
1904
|
position: "absolute",
|
|
1915
1905
|
top: 0,
|
|
@@ -1918,69 +1908,78 @@ const Wt = ce.Root, Gt = ce.ValueText, Te = () => {
|
|
|
1918
1908
|
width: "100%",
|
|
1919
1909
|
overflow: "hidden",
|
|
1920
1910
|
"data-prose-react-reader": !0,
|
|
1921
|
-
...
|
|
1911
|
+
...t,
|
|
1922
1912
|
children: [
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1913
|
+
n,
|
|
1914
|
+
r && /* @__PURE__ */ e(
|
|
1915
|
+
le,
|
|
1926
1916
|
{
|
|
1927
1917
|
present: !T,
|
|
1928
|
-
animationName:
|
|
1918
|
+
animationName: Ae,
|
|
1929
1919
|
animationDuration: "moderate",
|
|
1930
|
-
children: /* @__PURE__ */ e(
|
|
1920
|
+
children: /* @__PURE__ */ e(_t, {})
|
|
1931
1921
|
}
|
|
1932
1922
|
),
|
|
1933
|
-
/* @__PURE__ */ e(
|
|
1934
|
-
/* @__PURE__ */ e(
|
|
1935
|
-
/* @__PURE__ */ e(
|
|
1936
|
-
/* @__PURE__ */ e(
|
|
1937
|
-
/* @__PURE__ */ e(
|
|
1938
|
-
/* @__PURE__ */ e(
|
|
1939
|
-
/* @__PURE__ */ e(
|
|
1923
|
+
/* @__PURE__ */ e(Bt, { open: v, setOpen: I }),
|
|
1924
|
+
/* @__PURE__ */ e(ro, {}),
|
|
1925
|
+
/* @__PURE__ */ e(to, { onItemClick: V }),
|
|
1926
|
+
/* @__PURE__ */ e(go, {}),
|
|
1927
|
+
/* @__PURE__ */ e(Mt, {}),
|
|
1928
|
+
/* @__PURE__ */ e(ft, {}),
|
|
1929
|
+
/* @__PURE__ */ e(Ft, { open: c, setOpen: d }),
|
|
1940
1930
|
/* @__PURE__ */ e(
|
|
1941
|
-
|
|
1931
|
+
ho,
|
|
1942
1932
|
{
|
|
1943
1933
|
open: a,
|
|
1944
1934
|
setOpen: s,
|
|
1945
|
-
onNavigate:
|
|
1935
|
+
onNavigate: k
|
|
1946
1936
|
}
|
|
1947
1937
|
),
|
|
1948
1938
|
/* @__PURE__ */ e(
|
|
1949
|
-
|
|
1939
|
+
co,
|
|
1950
1940
|
{
|
|
1951
1941
|
open: u,
|
|
1952
1942
|
setOpen: p,
|
|
1953
|
-
onNavigate:
|
|
1943
|
+
onNavigate: k
|
|
1954
1944
|
}
|
|
1955
1945
|
),
|
|
1956
1946
|
/* @__PURE__ */ e(
|
|
1957
|
-
|
|
1947
|
+
dt,
|
|
1958
1948
|
{
|
|
1959
1949
|
openWith: h,
|
|
1960
|
-
setOpen: (
|
|
1961
|
-
onNavigate:
|
|
1950
|
+
setOpen: (P) => m(P ? "annotations" : void 0),
|
|
1951
|
+
onNavigate: k
|
|
1962
1952
|
}
|
|
1963
1953
|
),
|
|
1964
1954
|
/* @__PURE__ */ e(
|
|
1965
|
-
|
|
1955
|
+
le,
|
|
1966
1956
|
{
|
|
1967
|
-
present:
|
|
1968
|
-
animationName:
|
|
1957
|
+
present: o || T,
|
|
1958
|
+
animationName: Ae,
|
|
1969
1959
|
animationDuration: "slow",
|
|
1970
1960
|
overflow: "hidden",
|
|
1971
|
-
children: /* @__PURE__ */ e(
|
|
1961
|
+
children: /* @__PURE__ */ e($t, {})
|
|
1972
1962
|
}
|
|
1973
1963
|
),
|
|
1974
|
-
/* @__PURE__ */ e(
|
|
1964
|
+
/* @__PURE__ */ e(Ct, {})
|
|
1975
1965
|
]
|
|
1976
1966
|
}
|
|
1977
1967
|
)
|
|
1978
1968
|
] });
|
|
1979
1969
|
}
|
|
1970
|
+
), _o = g(
|
|
1971
|
+
({
|
|
1972
|
+
children: n,
|
|
1973
|
+
slots: t,
|
|
1974
|
+
...o
|
|
1975
|
+
}) => {
|
|
1976
|
+
const { container: { props: r = {} } = {} } = t ?? {};
|
|
1977
|
+
return /* @__PURE__ */ e(xt, { ...o, children: /* @__PURE__ */ e(bo, { ...r, children: n }) });
|
|
1978
|
+
}
|
|
1980
1979
|
);
|
|
1981
1980
|
export {
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1981
|
+
nt as BOOKMARK_AREA_DATA_ATTRIBUTE,
|
|
1982
|
+
bo as InnerReactReader,
|
|
1983
|
+
_o as ReactReader
|
|
1985
1984
|
};
|
|
1986
1985
|
//# sourceMappingURL=index.js.map
|