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