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