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