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