@peeekpage/viewer 0.3.19 → 0.4.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/index.d.ts +7 -0
- package/dist/index.js +546 -339
- package/dist/peeekviewer.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsxs as h, jsx as a, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
1
|
+
import { jsxs as h, jsx as a, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y, useRef as H, useEffect as T, useCallback as D, useMemo as tt } from "react";
|
|
3
|
+
const nt = /* @__PURE__ */ new Set(["http:", "https:"]);
|
|
4
|
+
function V(t) {
|
|
5
5
|
if (typeof t != "string") return null;
|
|
6
6
|
const e = t.trim();
|
|
7
7
|
if (e === "" || e.includes(" ")) return null;
|
|
8
8
|
const n = typeof window < "u" ? window.location.href : void 0;
|
|
9
|
-
let
|
|
9
|
+
let o;
|
|
10
10
|
try {
|
|
11
|
-
|
|
11
|
+
o = new URL(e, n);
|
|
12
12
|
} catch {
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
|
-
return
|
|
15
|
+
return nt.has(o.protocol) ? o.href : null;
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const at = /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, ot = /^rgba?\([ \t]*\d{1,3}[ \t]*,[ \t]*\d{1,3}[ \t]*,[ \t]*\d{1,3}[ \t]*(?:,[ \t]*(?:0|1|0?\.\d+)[ \t]*)?\)$/;
|
|
18
18
|
function ge(t) {
|
|
19
19
|
if (typeof t != "string") return null;
|
|
20
20
|
const e = t.trim();
|
|
21
|
-
return
|
|
21
|
+
return at.test(e) || ot.test(e) ? e : null;
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
function
|
|
23
|
+
const rt = /url\(|image\(|image-set\(|element\(|expression|@|\/\*|;|\{|\}|<|>|\\/i, lt = /^(repeating-)?(linear|radial|conic)-gradient\([a-z0-9#.,%()\/\s-]*\)$/i, it = /^hsla?\([a-z0-9.,%\/\s-]*\)$/i;
|
|
24
|
+
function st(t) {
|
|
25
25
|
if (typeof t != "string") return null;
|
|
26
26
|
const e = t.trim();
|
|
27
|
-
if (e === "" ||
|
|
27
|
+
if (e === "" || rt.test(e)) return null;
|
|
28
28
|
const n = ge(e);
|
|
29
|
-
return n !== null ? n :
|
|
29
|
+
return n !== null ? n : it.test(e) || lt.test(e) ? e : null;
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const ct = ["en", "pt-BR"], Pe = {
|
|
32
32
|
prev: "Previous page",
|
|
33
33
|
next: "Next page",
|
|
34
34
|
zoom: "Zoom level",
|
|
@@ -45,8 +45,12 @@ const qe = ["en", "pt-BR"], pe = {
|
|
|
45
45
|
about: "About",
|
|
46
46
|
aboutTagline: "Embeddable document viewer by Peeek Page",
|
|
47
47
|
aboutDescription: "Peeek Viewer shows document pages that live in your own storage, so your files stay yours.",
|
|
48
|
-
aboutClose: "Close"
|
|
49
|
-
|
|
48
|
+
aboutClose: "Close",
|
|
49
|
+
goToPage: "Go to page",
|
|
50
|
+
rotate: "Rotate page",
|
|
51
|
+
singlePage: "Single page",
|
|
52
|
+
doublePage: "Two pages"
|
|
53
|
+
}, ut = {
|
|
50
54
|
prev: "Página anterior",
|
|
51
55
|
next: "Próxima página",
|
|
52
56
|
zoom: "Nível de zoom",
|
|
@@ -63,88 +67,99 @@ const qe = ["en", "pt-BR"], pe = {
|
|
|
63
67
|
about: "Sobre",
|
|
64
68
|
aboutTagline: "Visualizador de documentos incorporável do Peeek Page",
|
|
65
69
|
aboutDescription: "O Peeek Viewer exibe as páginas de documentos que ficam no seu próprio armazenamento, então seus arquivos continuam seus.",
|
|
66
|
-
aboutClose: "Fechar"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
aboutClose: "Fechar",
|
|
71
|
+
goToPage: "Ir para a página",
|
|
72
|
+
rotate: "Girar página",
|
|
73
|
+
singlePage: "Página única",
|
|
74
|
+
doublePage: "Duas páginas"
|
|
75
|
+
}, dt = { en: Pe, "pt-BR": ut };
|
|
76
|
+
function gt(t) {
|
|
77
|
+
return dt[t] ?? Pe;
|
|
70
78
|
}
|
|
71
|
-
const
|
|
72
|
-
function
|
|
79
|
+
const ft = "#6E79D6";
|
|
80
|
+
function P(t, e) {
|
|
73
81
|
return typeof t == "boolean" ? t : e;
|
|
74
82
|
}
|
|
75
|
-
function
|
|
83
|
+
function q(t, e, n) {
|
|
76
84
|
return e.includes(t) ? t : n;
|
|
77
85
|
}
|
|
78
|
-
function
|
|
86
|
+
function mt(t) {
|
|
79
87
|
return {
|
|
80
88
|
src: typeof t.src == "string" ? t.src : "",
|
|
81
|
-
mode:
|
|
82
|
-
logo:
|
|
83
|
-
logoLink:
|
|
84
|
-
accentColor: ge(t.accentColor) ??
|
|
85
|
-
background:
|
|
86
|
-
backgroundColor:
|
|
87
|
-
backgroundImage:
|
|
88
|
-
layout:
|
|
89
|
-
fillHeight:
|
|
90
|
-
pageShadows:
|
|
91
|
-
rtl:
|
|
92
|
-
animateInteractions:
|
|
93
|
-
skin:
|
|
94
|
-
language:
|
|
95
|
-
autoTransition:
|
|
89
|
+
mode: q(t.mode, ["flip", "coverflow"], "flip"),
|
|
90
|
+
logo: V(t.logo),
|
|
91
|
+
logoLink: V(t.logoLink),
|
|
92
|
+
accentColor: ge(t.accentColor) ?? ft,
|
|
93
|
+
background: q(t.background, ["color", "image", "transparent"], "color"),
|
|
94
|
+
backgroundColor: st(t.backgroundColor),
|
|
95
|
+
backgroundImage: V(t.backgroundImage),
|
|
96
|
+
layout: q(t.layout, ["single", "double"], "double"),
|
|
97
|
+
fillHeight: P(t.fillHeight, !1),
|
|
98
|
+
pageShadows: P(t.pageShadows, !0),
|
|
99
|
+
rtl: P(t.rtl, !1),
|
|
100
|
+
animateInteractions: P(t.animateInteractions, !0),
|
|
101
|
+
skin: q(t.skin, ["classic", "minimal", "showcase"], "classic"),
|
|
102
|
+
language: q(t.language, ct, "en"),
|
|
103
|
+
autoTransition: P(t.autoTransition, !1),
|
|
96
104
|
autoTransitionInterval: typeof t.autoTransitionInterval == "number" && t.autoTransitionInterval > 0 ? t.autoTransitionInterval : 5e3,
|
|
97
|
-
navigationControls:
|
|
98
|
-
fullscreen:
|
|
99
|
-
arrows:
|
|
100
|
-
navigationBar:
|
|
101
|
-
pagesOverview:
|
|
102
|
-
downloadUrl:
|
|
103
|
-
aboutButton:
|
|
105
|
+
navigationControls: P(t.navigationControls, !0),
|
|
106
|
+
fullscreen: P(t.fullscreen, !0),
|
|
107
|
+
arrows: P(t.arrows, !0),
|
|
108
|
+
navigationBar: P(t.navigationBar, !0),
|
|
109
|
+
pagesOverview: P(t.pagesOverview, !0),
|
|
110
|
+
downloadUrl: V(t.downloadUrl),
|
|
111
|
+
aboutButton: P(t.aboutButton, !0),
|
|
112
|
+
goToPage: P(t.goToPage, !0),
|
|
113
|
+
rotateControl: P(t.rotateControl, !0),
|
|
114
|
+
layoutToggle: P(t.layoutToggle, !0),
|
|
115
|
+
pageCurl: P(t.pageCurl, !0),
|
|
116
|
+
loadingImage: V(t.loadingImage),
|
|
117
|
+
loadingCaption: typeof t.loadingCaption == "string" && t.loadingCaption.length > 0 ? t.loadingCaption : null,
|
|
118
|
+
loadingColor: ge(t.loadingColor),
|
|
104
119
|
pollInterval: typeof t.pollInterval == "number" && t.pollInterval > 0 ? t.pollInterval : 2e3,
|
|
105
120
|
className: typeof t.className == "string" ? t.className : ""
|
|
106
121
|
};
|
|
107
122
|
}
|
|
108
|
-
const
|
|
109
|
-
function
|
|
123
|
+
const fe = 5e3;
|
|
124
|
+
function J(t) {
|
|
110
125
|
return typeof t == "string" ? t : "";
|
|
111
126
|
}
|
|
112
|
-
function
|
|
127
|
+
function pt(t) {
|
|
113
128
|
if (t === null || typeof t != "object" || Array.isArray(t))
|
|
114
129
|
return { ok: !1, error: "manifest is not an object" };
|
|
115
130
|
const e = t;
|
|
116
131
|
if (!Array.isArray(e.pages))
|
|
117
132
|
return { ok: !1, error: "manifest.pages is missing or not an array" };
|
|
118
|
-
if (e.pages.length >
|
|
133
|
+
if (e.pages.length > fe)
|
|
119
134
|
return { ok: !1, error: "manifest.pages exceeds the maximum" };
|
|
120
|
-
const n = e.total_pages,
|
|
121
|
-
if (
|
|
135
|
+
const n = e.total_pages, o = typeof n == "number" && Number.isFinite(n) && n >= 0 ? n : e.pages.length;
|
|
136
|
+
if (o > fe)
|
|
122
137
|
return { ok: !1, error: "manifest.total_pages exceeds the maximum" };
|
|
123
138
|
const l = [];
|
|
124
|
-
for (const
|
|
125
|
-
if (
|
|
126
|
-
const i =
|
|
139
|
+
for (const g of e.pages) {
|
|
140
|
+
if (g === null || typeof g != "object") continue;
|
|
141
|
+
const i = V(g.url);
|
|
127
142
|
i && l.push(i);
|
|
128
143
|
}
|
|
129
144
|
if (l.length === 0)
|
|
130
145
|
return { ok: !1, error: "manifest has no usable pages" };
|
|
131
146
|
const c = e.status === "wip" ? "wip" : "done", p = e.metadata && typeof e.metadata == "object" ? e.metadata : {}, b = {
|
|
132
|
-
fileId:
|
|
133
|
-
filename:
|
|
134
|
-
creationDate:
|
|
135
|
-
fileSize:
|
|
136
|
-
mimeType:
|
|
147
|
+
fileId: J(p.file_id),
|
|
148
|
+
filename: J(p.filename),
|
|
149
|
+
creationDate: J(p.creation_date),
|
|
150
|
+
fileSize: J(p.file_size),
|
|
151
|
+
mimeType: J(p.mime_type)
|
|
137
152
|
};
|
|
138
153
|
return {
|
|
139
154
|
ok: !0,
|
|
140
|
-
value: { status: c, totalPages:
|
|
155
|
+
value: { status: c, totalPages: o, pages: l, metadata: b }
|
|
141
156
|
};
|
|
142
157
|
}
|
|
143
|
-
function
|
|
144
|
-
if (!Array.isArray(t) || t.length >
|
|
158
|
+
function bt(t, e) {
|
|
159
|
+
if (!Array.isArray(t) || t.length > fe) return null;
|
|
145
160
|
const n = [];
|
|
146
161
|
for (const l of t) {
|
|
147
|
-
const c =
|
|
162
|
+
const c = V(l);
|
|
148
163
|
c && n.push(c);
|
|
149
164
|
}
|
|
150
165
|
return n.length === 0 ? null : {
|
|
@@ -160,14 +175,14 @@ function rt(t, e) {
|
|
|
160
175
|
}
|
|
161
176
|
};
|
|
162
177
|
}
|
|
163
|
-
function
|
|
164
|
-
const [n,
|
|
178
|
+
function ht(t, e) {
|
|
179
|
+
const [n, o] = y("loading"), [l, c] = y(null), [p, b] = y(null), g = H(null);
|
|
165
180
|
return T(() => {
|
|
166
181
|
let i = !1;
|
|
167
|
-
if (
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
},
|
|
182
|
+
if (o("loading"), c(null), b(null), !t) return;
|
|
183
|
+
const k = () => {
|
|
184
|
+
g.current !== null && (clearTimeout(g.current), g.current = null);
|
|
185
|
+
}, _ = async () => {
|
|
171
186
|
let u;
|
|
172
187
|
try {
|
|
173
188
|
const s = await fetch(t);
|
|
@@ -175,29 +190,29 @@ function at(t, e) {
|
|
|
175
190
|
u = await s.json();
|
|
176
191
|
} catch (s) {
|
|
177
192
|
if (i) return;
|
|
178
|
-
b(s instanceof Error ? s.message : "fetch failed"),
|
|
193
|
+
b(s instanceof Error ? s.message : "fetch failed"), o("error");
|
|
179
194
|
return;
|
|
180
195
|
}
|
|
181
196
|
if (i) return;
|
|
182
|
-
const
|
|
183
|
-
if (!
|
|
184
|
-
b(
|
|
197
|
+
const d = pt(u);
|
|
198
|
+
if (!d.ok) {
|
|
199
|
+
b(d.error), o("error");
|
|
185
200
|
return;
|
|
186
201
|
}
|
|
187
|
-
c(
|
|
202
|
+
c(d.value), o("ready"), d.value.status === "wip" && (g.current = setTimeout(_, e));
|
|
188
203
|
};
|
|
189
|
-
return
|
|
190
|
-
i = !0,
|
|
204
|
+
return _(), () => {
|
|
205
|
+
i = !0, k();
|
|
191
206
|
};
|
|
192
207
|
}, [t, e]), { state: n, manifest: l, error: p };
|
|
193
208
|
}
|
|
194
|
-
function
|
|
195
|
-
const [e, n] =
|
|
209
|
+
function _t(t) {
|
|
210
|
+
const [e, n] = y(!1);
|
|
196
211
|
T(() => {
|
|
197
212
|
const l = () => n(document.fullscreenElement != null);
|
|
198
213
|
return document.addEventListener("fullscreenchange", l), () => document.removeEventListener("fullscreenchange", l);
|
|
199
214
|
}, []);
|
|
200
|
-
const
|
|
215
|
+
const o = D(async () => {
|
|
201
216
|
const l = t.current;
|
|
202
217
|
if (l)
|
|
203
218
|
try {
|
|
@@ -205,66 +220,152 @@ function ot(t) {
|
|
|
205
220
|
} catch {
|
|
206
221
|
}
|
|
207
222
|
}, [t]);
|
|
208
|
-
return { isFullscreen: e, toggle:
|
|
223
|
+
return { isFullscreen: e, toggle: o };
|
|
209
224
|
}
|
|
210
|
-
const
|
|
211
|
-
function
|
|
212
|
-
const [t, e] =
|
|
225
|
+
const Te = "(prefers-reduced-motion: reduce)";
|
|
226
|
+
function xe() {
|
|
227
|
+
const [t, e] = y(() => {
|
|
213
228
|
var n;
|
|
214
|
-
return ((n = matchMedia == null ? void 0 : matchMedia(
|
|
229
|
+
return ((n = matchMedia == null ? void 0 : matchMedia(Te)) == null ? void 0 : n.matches) ?? !1;
|
|
215
230
|
});
|
|
216
231
|
return T(() => {
|
|
217
|
-
const n = typeof matchMedia == "function" ? matchMedia(
|
|
232
|
+
const n = typeof matchMedia == "function" ? matchMedia(Te) : void 0;
|
|
218
233
|
if (!(n != null && n.addEventListener)) return;
|
|
219
|
-
const
|
|
220
|
-
return n.addEventListener("change",
|
|
234
|
+
const o = () => e(n.matches);
|
|
235
|
+
return n.addEventListener("change", o), () => n.removeEventListener("change", o);
|
|
221
236
|
}, []), t;
|
|
222
237
|
}
|
|
223
|
-
function
|
|
238
|
+
function Ie({ go: t, jump: e, total: n, rtl: o }) {
|
|
239
|
+
return { onKeyDown: D(
|
|
240
|
+
(c) => {
|
|
241
|
+
switch (c.key) {
|
|
242
|
+
case "ArrowRight":
|
|
243
|
+
t(o ? -1 : 1);
|
|
244
|
+
break;
|
|
245
|
+
case "ArrowLeft":
|
|
246
|
+
t(o ? 1 : -1);
|
|
247
|
+
break;
|
|
248
|
+
case "Home":
|
|
249
|
+
c.preventDefault(), n > 0 && e(0);
|
|
250
|
+
break;
|
|
251
|
+
case "End":
|
|
252
|
+
c.preventDefault(), n > 0 && e(n - 1);
|
|
253
|
+
break;
|
|
254
|
+
case " ":
|
|
255
|
+
case "Spacebar":
|
|
256
|
+
c.preventDefault(), t(c.shiftKey ? -1 : 1);
|
|
257
|
+
break;
|
|
258
|
+
case "PageDown":
|
|
259
|
+
c.preventDefault(), t(1);
|
|
260
|
+
break;
|
|
261
|
+
case "PageUp":
|
|
262
|
+
c.preventDefault(), t(-1);
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
[t, e, n, o]
|
|
267
|
+
) };
|
|
268
|
+
}
|
|
269
|
+
function ze(t, e) {
|
|
270
|
+
if (e <= 0) return null;
|
|
271
|
+
const n = t.trim();
|
|
272
|
+
if (!/^\d+$/.test(n)) return null;
|
|
273
|
+
const o = Number(n);
|
|
274
|
+
return Number.isFinite(o) ? Math.max(1, Math.min(e, o)) - 1 : null;
|
|
275
|
+
}
|
|
276
|
+
const kt = 640;
|
|
277
|
+
function yt(t, e) {
|
|
278
|
+
const [n, o] = y("auto"), [l, c] = y(null);
|
|
279
|
+
T(() => {
|
|
280
|
+
const i = t.current;
|
|
281
|
+
if (!i || (i.clientWidth > 0 && c(i.clientWidth), typeof ResizeObserver > "u")) return;
|
|
282
|
+
const k = new ResizeObserver((_) => {
|
|
283
|
+
var d;
|
|
284
|
+
const u = (d = _[0]) == null ? void 0 : d.contentRect.width;
|
|
285
|
+
typeof u == "number" && u > 0 && c(u);
|
|
286
|
+
});
|
|
287
|
+
return k.observe(i), () => k.disconnect();
|
|
288
|
+
}, [t]);
|
|
289
|
+
const p = l != null && l < kt ? "single" : e, b = n === "auto" ? p : n, g = D(() => {
|
|
290
|
+
o(b === "single" ? "double" : "single");
|
|
291
|
+
}, [b]);
|
|
292
|
+
return { layout: b, toggle: g };
|
|
293
|
+
}
|
|
294
|
+
function me(t, e) {
|
|
224
295
|
return t <= 0 ? 0 : e === "single" ? t : 1 + Math.ceil((t - 1) / 2);
|
|
225
296
|
}
|
|
226
|
-
function
|
|
297
|
+
function vt(t, e) {
|
|
227
298
|
return e === "single" ? t : t <= 0 ? 0 : Math.floor((t - 1) / 2) + 1;
|
|
228
299
|
}
|
|
229
|
-
function
|
|
300
|
+
function re(t, e, n) {
|
|
230
301
|
if (e <= 0) return { left: -1, right: -1 };
|
|
231
302
|
if (n === "single")
|
|
232
303
|
return { left: -1, right: t >= 0 && t < e ? t : -1 };
|
|
233
304
|
if (t <= 0)
|
|
234
305
|
return { left: -1, right: 0 };
|
|
235
|
-
const
|
|
236
|
-
return { left:
|
|
306
|
+
const o = 2 * t - 1, l = 2 * t;
|
|
307
|
+
return { left: o < e ? o : -1, right: l < e ? l : -1 };
|
|
237
308
|
}
|
|
238
|
-
function
|
|
239
|
-
const { left:
|
|
240
|
-
return
|
|
309
|
+
function Ae(t, e, n) {
|
|
310
|
+
const { left: o, right: l } = re(t, e, n), c = [];
|
|
311
|
+
return o >= 0 && c.push(o), l >= 0 && c.push(l), c;
|
|
241
312
|
}
|
|
242
|
-
function
|
|
243
|
-
const
|
|
244
|
-
return t < 0 ? 0 : t >
|
|
313
|
+
function de(t, e, n) {
|
|
314
|
+
const o = me(e, n) - 1;
|
|
315
|
+
return t < 0 ? 0 : t > o ? o : t;
|
|
245
316
|
}
|
|
246
|
-
function
|
|
317
|
+
function wt(t) {
|
|
247
318
|
const {
|
|
248
319
|
strings: e,
|
|
249
320
|
label: n,
|
|
250
|
-
progress:
|
|
321
|
+
progress: o,
|
|
251
322
|
zoom: l,
|
|
252
323
|
minZoom: c,
|
|
253
324
|
maxZoom: p,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
325
|
+
total: b,
|
|
326
|
+
currentPage: g,
|
|
327
|
+
layout: i,
|
|
328
|
+
thumbsOpen: k,
|
|
329
|
+
isFullscreen: _,
|
|
330
|
+
downloadUrl: u,
|
|
331
|
+
show: d,
|
|
332
|
+
onZoomIn: s,
|
|
333
|
+
onZoomOut: O,
|
|
334
|
+
onZoomSet: z,
|
|
335
|
+
onJump: F,
|
|
336
|
+
onRotate: R,
|
|
337
|
+
onToggleLayout: I,
|
|
338
|
+
onToggleThumbs: $,
|
|
339
|
+
onToggleFullscreen: X,
|
|
340
|
+
onAbout: W
|
|
341
|
+
} = t, [S, A] = y(String(g));
|
|
342
|
+
T(() => A(String(g)), [g]);
|
|
343
|
+
const G = () => {
|
|
344
|
+
const C = ze(S, b);
|
|
345
|
+
if (C === null) {
|
|
346
|
+
A(String(g));
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
F(C), A(String(C + 1));
|
|
350
|
+
};
|
|
265
351
|
return /* @__PURE__ */ h("div", { className: "peeek__toolbar", children: [
|
|
266
352
|
/* @__PURE__ */ a("span", { className: "peeek__label", children: n }),
|
|
267
|
-
|
|
353
|
+
d.bar && /* @__PURE__ */ a("div", { className: "peeek__scrubber", "aria-hidden": !0, children: /* @__PURE__ */ a("div", { className: "peeek__scrubber-fill", style: { width: `${o}%` } }) }),
|
|
354
|
+
d.goto && /* @__PURE__ */ a(
|
|
355
|
+
"input",
|
|
356
|
+
{
|
|
357
|
+
className: "peeek__goto",
|
|
358
|
+
type: "text",
|
|
359
|
+
inputMode: "numeric",
|
|
360
|
+
"aria-label": e.goToPage,
|
|
361
|
+
value: S,
|
|
362
|
+
onChange: (C) => A(C.target.value),
|
|
363
|
+
onBlur: G,
|
|
364
|
+
onKeyDown: (C) => {
|
|
365
|
+
C.key === "Enter" && (C.preventDefault(), G());
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
),
|
|
268
369
|
/* @__PURE__ */ a(
|
|
269
370
|
"button",
|
|
270
371
|
{
|
|
@@ -272,7 +373,7 @@ function st(t) {
|
|
|
272
373
|
className: "peeek__btn",
|
|
273
374
|
"aria-label": e.zoomOut,
|
|
274
375
|
disabled: l <= c,
|
|
275
|
-
onClick:
|
|
376
|
+
onClick: O,
|
|
276
377
|
children: "−"
|
|
277
378
|
}
|
|
278
379
|
),
|
|
@@ -285,7 +386,7 @@ function st(t) {
|
|
|
285
386
|
max: p,
|
|
286
387
|
step: 0.25,
|
|
287
388
|
value: l,
|
|
288
|
-
onChange: (
|
|
389
|
+
onChange: (C) => z(Number(C.target.value))
|
|
289
390
|
}
|
|
290
391
|
),
|
|
291
392
|
/* @__PURE__ */ a(
|
|
@@ -295,26 +396,47 @@ function st(t) {
|
|
|
295
396
|
className: "peeek__btn",
|
|
296
397
|
"aria-label": e.zoomIn,
|
|
297
398
|
disabled: l >= p,
|
|
298
|
-
onClick:
|
|
399
|
+
onClick: s,
|
|
299
400
|
children: "+"
|
|
300
401
|
}
|
|
301
402
|
),
|
|
302
|
-
|
|
403
|
+
d.rotate && /* @__PURE__ */ a(
|
|
303
404
|
"button",
|
|
304
405
|
{
|
|
305
406
|
type: "button",
|
|
306
|
-
className:
|
|
407
|
+
className: "peeek__btn",
|
|
408
|
+
"aria-label": e.rotate,
|
|
409
|
+
onClick: R,
|
|
410
|
+
children: "⟳"
|
|
411
|
+
}
|
|
412
|
+
),
|
|
413
|
+
d.layoutToggle && /* @__PURE__ */ a(
|
|
414
|
+
"button",
|
|
415
|
+
{
|
|
416
|
+
type: "button",
|
|
417
|
+
className: "peeek__btn",
|
|
418
|
+
"aria-label": i === "single" ? e.doublePage : e.singlePage,
|
|
419
|
+
"aria-pressed": i === "double",
|
|
420
|
+
onClick: I,
|
|
421
|
+
children: i === "single" ? "▭" : "▥"
|
|
422
|
+
}
|
|
423
|
+
),
|
|
424
|
+
d.thumbnails && /* @__PURE__ */ a(
|
|
425
|
+
"button",
|
|
426
|
+
{
|
|
427
|
+
type: "button",
|
|
428
|
+
className: `peeek__btn${k ? " peeek__btn--active" : ""}`,
|
|
307
429
|
"aria-label": e.thumbnails,
|
|
308
|
-
"aria-pressed":
|
|
309
|
-
onClick:
|
|
430
|
+
"aria-pressed": k,
|
|
431
|
+
onClick: $,
|
|
310
432
|
children: "▦"
|
|
311
433
|
}
|
|
312
434
|
),
|
|
313
|
-
|
|
435
|
+
u && /* @__PURE__ */ a(
|
|
314
436
|
"a",
|
|
315
437
|
{
|
|
316
438
|
className: "peeek__btn",
|
|
317
|
-
href:
|
|
439
|
+
href: u,
|
|
318
440
|
"aria-label": e.download,
|
|
319
441
|
target: "_blank",
|
|
320
442
|
rel: "noopener noreferrer",
|
|
@@ -322,37 +444,37 @@ function st(t) {
|
|
|
322
444
|
children: "↓"
|
|
323
445
|
}
|
|
324
446
|
),
|
|
325
|
-
|
|
447
|
+
d.fullscreen && /* @__PURE__ */ a(
|
|
326
448
|
"button",
|
|
327
449
|
{
|
|
328
450
|
type: "button",
|
|
329
|
-
className: `peeek__btn${
|
|
451
|
+
className: `peeek__btn${_ ? " peeek__btn--active" : ""}`,
|
|
330
452
|
"aria-label": e.fullscreen,
|
|
331
|
-
"aria-pressed":
|
|
332
|
-
onClick:
|
|
453
|
+
"aria-pressed": _,
|
|
454
|
+
onClick: X,
|
|
333
455
|
children: "⛶"
|
|
334
456
|
}
|
|
335
457
|
),
|
|
336
|
-
|
|
458
|
+
d.about && /* @__PURE__ */ a(
|
|
337
459
|
"button",
|
|
338
460
|
{
|
|
339
461
|
type: "button",
|
|
340
462
|
className: "peeek__btn",
|
|
341
463
|
"aria-label": e.about,
|
|
342
|
-
onClick:
|
|
464
|
+
onClick: W,
|
|
343
465
|
children: "?"
|
|
344
466
|
}
|
|
345
467
|
)
|
|
346
468
|
] });
|
|
347
469
|
}
|
|
348
|
-
function
|
|
349
|
-
const c = t.length, p = new Set(
|
|
350
|
-
return /* @__PURE__ */ a("div", { className: "peeek__thumbs", role: "group", "aria-label": "Pages", children: Array.from({ length: b }, (
|
|
351
|
-
const
|
|
470
|
+
function Tt({ pages: t, layout: e, rtl: n, activePages: o, onJump: l }) {
|
|
471
|
+
const c = t.length, p = new Set(o), b = me(c, e);
|
|
472
|
+
return /* @__PURE__ */ a("div", { className: "peeek__thumbs", role: "group", "aria-label": "Pages", children: Array.from({ length: b }, (g, i) => {
|
|
473
|
+
const k = Ae(i, c, e), _ = k.length === 2;
|
|
352
474
|
return /* @__PURE__ */ h("div", { className: "peeek__thumb-group", children: [
|
|
353
|
-
|
|
475
|
+
k.map((u, d) => {
|
|
354
476
|
let s = "";
|
|
355
|
-
return
|
|
477
|
+
return _ && (s = (n ? d === 1 : d === 0) ? " peeek__thumb--flat-right" : " peeek__thumb--flat-left"), /* @__PURE__ */ a(
|
|
356
478
|
"button",
|
|
357
479
|
{
|
|
358
480
|
type: "button",
|
|
@@ -365,145 +487,177 @@ function it({ pages: t, layout: e, rtl: n, activePages: r, onJump: l }) {
|
|
|
365
487
|
u
|
|
366
488
|
);
|
|
367
489
|
}),
|
|
368
|
-
/* @__PURE__ */ a("span", { className: "peeek__thumb-badge", "aria-hidden": !0, children:
|
|
490
|
+
/* @__PURE__ */ a("span", { className: "peeek__thumb-badge", "aria-hidden": !0, children: k.map((u) => u + 1).join("-") })
|
|
369
491
|
] }, i);
|
|
370
492
|
}) });
|
|
371
493
|
}
|
|
372
|
-
const
|
|
373
|
-
function
|
|
494
|
+
const Ce = 20, Ct = 88, Nt = 150;
|
|
495
|
+
function ae({ corner: t, pointer: e, instant: n, onActivate: o }) {
|
|
496
|
+
const l = H(null), [c, p] = y(0);
|
|
497
|
+
T(() => {
|
|
498
|
+
if (!e) {
|
|
499
|
+
p(0);
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
const g = l.current;
|
|
503
|
+
if (!g) return;
|
|
504
|
+
const i = g.getBoundingClientRect(), k = t === "tr" || t === "br" ? i.right : i.left, _ = t === "tr" || t === "tl" ? i.top : i.bottom, u = Math.hypot(e.x - k, e.y - _);
|
|
505
|
+
p(Math.max(0, Math.min(1, 1 - u / Nt)));
|
|
506
|
+
}, [e, t]);
|
|
507
|
+
const b = Ce + c * (Ct - Ce);
|
|
508
|
+
return /* @__PURE__ */ a(
|
|
509
|
+
"button",
|
|
510
|
+
{
|
|
511
|
+
ref: l,
|
|
512
|
+
type: "button",
|
|
513
|
+
className: `peeek__curl peeek__curl--${t}`,
|
|
514
|
+
"aria-hidden": !0,
|
|
515
|
+
tabIndex: -1,
|
|
516
|
+
onClick: o,
|
|
517
|
+
style: {
|
|
518
|
+
"--peeek-curl": `${b}px`,
|
|
519
|
+
transition: n ? "none" : void 0
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
const Q = 1, oe = 2, Ne = 0.25;
|
|
525
|
+
function Pt(t) {
|
|
374
526
|
const {
|
|
375
527
|
pages: e,
|
|
376
528
|
strings: n,
|
|
377
|
-
layout:
|
|
529
|
+
layout: o,
|
|
378
530
|
rtl: l,
|
|
379
531
|
pageShadows: c,
|
|
380
532
|
animateInteractions: p,
|
|
381
533
|
autoTransition: b,
|
|
382
|
-
autoTransitionInterval:
|
|
534
|
+
autoTransitionInterval: g,
|
|
383
535
|
show: i,
|
|
384
|
-
downloadUrl:
|
|
385
|
-
isFullscreen:
|
|
536
|
+
downloadUrl: k,
|
|
537
|
+
isFullscreen: _,
|
|
386
538
|
onToggleFullscreen: u,
|
|
387
|
-
onAbout:
|
|
388
|
-
} = t, s = e.length, z =
|
|
539
|
+
onAbout: d
|
|
540
|
+
} = t, s = e.length, z = xe() || !p, [F, R] = y(0), [I, $] = y(1), [X, W] = y(!1), [S, A] = y({ x: 0, y: 0 }), [G, C] = y(!1), [f, w] = y(0), [M, E] = y(null), B = H(null), le = H(null), { layout: N, toggle: Me } = yt(le, o), ie = me(s, N), [v, pe] = y(null), be = H(null), [he, $e] = y(0.707);
|
|
389
541
|
T(() => {
|
|
390
542
|
if (!e[0]) return;
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
},
|
|
543
|
+
const r = new globalThis.Image();
|
|
544
|
+
r.onload = () => {
|
|
545
|
+
r.naturalWidth && r.naturalHeight && $e(r.naturalWidth / r.naturalHeight);
|
|
546
|
+
}, r.src = e[0];
|
|
395
547
|
}, [e]);
|
|
396
|
-
const
|
|
397
|
-
(
|
|
398
|
-
|
|
399
|
-
const x =
|
|
400
|
-
return x === m ? m :
|
|
548
|
+
const U = de(F, s, N), _e = U <= 0, ee = U >= ie - 1, L = D(
|
|
549
|
+
(r) => {
|
|
550
|
+
v || R((m) => {
|
|
551
|
+
const x = de(m + r, s, N);
|
|
552
|
+
return x === m ? m : z ? x : (pe({ dir: r, to: x }), m);
|
|
401
553
|
});
|
|
402
554
|
},
|
|
403
|
-
[s,
|
|
404
|
-
),
|
|
405
|
-
|
|
555
|
+
[s, N, z, v]
|
|
556
|
+
), Se = D(() => {
|
|
557
|
+
pe((r) => (r && R(r.to), null));
|
|
406
558
|
}, []);
|
|
407
559
|
T(() => {
|
|
408
|
-
if (!
|
|
409
|
-
const
|
|
410
|
-
if (!
|
|
411
|
-
|
|
560
|
+
if (!v) return;
|
|
561
|
+
const r = be.current;
|
|
562
|
+
if (!r) return;
|
|
563
|
+
r.style.transform = "rotateY(0deg)";
|
|
412
564
|
let m = 0;
|
|
413
565
|
const x = requestAnimationFrame(() => {
|
|
414
566
|
m = requestAnimationFrame(() => {
|
|
415
|
-
|
|
567
|
+
r.style.transform = `rotateY(${v.dir === 1 ? -180 : 180}deg)`;
|
|
416
568
|
});
|
|
417
569
|
});
|
|
418
570
|
return () => {
|
|
419
571
|
cancelAnimationFrame(x), cancelAnimationFrame(m);
|
|
420
572
|
};
|
|
421
|
-
}, [
|
|
422
|
-
const
|
|
423
|
-
(
|
|
424
|
-
|
|
425
|
-
},
|
|
426
|
-
[s, r]
|
|
427
|
-
), Ne = S(
|
|
428
|
-
(o) => {
|
|
429
|
-
o.key === "ArrowRight" ? E(l ? -1 : 1) : o.key === "ArrowLeft" && E(l ? 1 : -1);
|
|
573
|
+
}, [v]);
|
|
574
|
+
const se = D(
|
|
575
|
+
(r) => {
|
|
576
|
+
R(de(vt(r, N), s, N));
|
|
430
577
|
},
|
|
431
|
-
[
|
|
432
|
-
);
|
|
578
|
+
[s, N]
|
|
579
|
+
), { onKeyDown: Fe } = Ie({ go: L, jump: se, total: s, rtl: l });
|
|
433
580
|
T(() => {
|
|
434
|
-
if (!b ||
|
|
435
|
-
const
|
|
436
|
-
return () => clearTimeout(
|
|
437
|
-
}, [b,
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
const ue =
|
|
442
|
-
return { x:
|
|
581
|
+
if (!b || ee) return;
|
|
582
|
+
const r = setTimeout(() => L(1), g);
|
|
583
|
+
return () => clearTimeout(r);
|
|
584
|
+
}, [b, g, ee, U, L]);
|
|
585
|
+
const Ee = () => $((r) => Math.min(oe, r + Ne)), Le = () => $((r) => Math.max(Q, r - Ne)), De = () => {
|
|
586
|
+
v || $((r) => r > Q ? Q : oe);
|
|
587
|
+
}, Oe = () => w((r) => (r + 90) % 360), Re = f === 90 || f === 270 ? he : 1, ce = D((r, m, x) => {
|
|
588
|
+
const ue = le.current;
|
|
589
|
+
if (!ue || x <= 1) return { x: 0, y: 0 };
|
|
590
|
+
const ve = (x - 1) * ue.clientWidth / 2, we = (x - 1) * ue.clientHeight / 2;
|
|
591
|
+
return { x: Math.max(-ve, Math.min(ve, r)), y: Math.max(-we, Math.min(we, m)) };
|
|
443
592
|
}, []);
|
|
444
|
-
T(() =>
|
|
445
|
-
const
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
593
|
+
T(() => A((r) => ce(r.x, r.y, I)), [I, ce]), T(() => A({ x: 0, y: 0 }), [U]);
|
|
594
|
+
const Be = (r) => {
|
|
595
|
+
var m, x;
|
|
596
|
+
I <= 1 || (B.current = { x: r.clientX, y: r.clientY, px: S.x, py: S.y }, C(!0), (x = (m = r.currentTarget).setPointerCapture) == null || x.call(m, r.pointerId));
|
|
597
|
+
}, Ue = (r) => {
|
|
598
|
+
const m = B.current;
|
|
599
|
+
m && A(ce(m.px + (r.clientX - m.x), m.py + (r.clientY - m.y), I));
|
|
600
|
+
}, ke = (r) => {
|
|
601
|
+
if (B.current) {
|
|
602
|
+
B.current = null, C(!1);
|
|
453
603
|
try {
|
|
454
|
-
|
|
604
|
+
r.currentTarget.releasePointerCapture(r.pointerId);
|
|
455
605
|
} catch {
|
|
456
606
|
}
|
|
457
607
|
}
|
|
458
|
-
},
|
|
459
|
-
["left",
|
|
460
|
-
["right",
|
|
608
|
+
}, Y = Ae(U, s, N), te = Y[0] ?? 0, Ze = N === "double" && Y.length === 2 ? `${Y[0] + 1} - ${Y[1] + 1} / ${s}` : `${te + 1} / ${s}`, He = ie <= 1 ? 100 : U / (ie - 1) * 100, Xe = n.prev, Ge = n.next, je = v ? v.to : U, j = re(je, s, N), Ve = j.left < 0 && j.right >= 0, Ke = j.left >= 0 && j.right < 0, We = j.left >= 0 && j.right >= 0, Ye = Ve ? "-25%" : Ke ? "25%" : "0%", Z = re(U, s, N), K = v ? re(v.to, s, N) : Z, qe = v ? v.dir === 1 ? Z.right >= 0 ? Z.right : Z.left : Z.left >= 0 ? Z.left : Z.right : te, Je = v ? v.dir === 1 ? K.left >= 0 ? K.left : K.right : K.right >= 0 ? K.right : K.left : te, Qe = v ? v.dir === 1 ? "left" : "right" : null, ye = (r) => r === Qe ? Z[r] : j[r], et = [
|
|
609
|
+
["left", ye("left")],
|
|
610
|
+
["right", ye("right")]
|
|
461
611
|
];
|
|
462
|
-
return /* @__PURE__ */ h(
|
|
612
|
+
return /* @__PURE__ */ h(ne, { children: [
|
|
463
613
|
/* @__PURE__ */ h(
|
|
464
614
|
"div",
|
|
465
615
|
{
|
|
466
|
-
ref:
|
|
616
|
+
ref: le,
|
|
467
617
|
className: "peeek__stage",
|
|
618
|
+
"data-layout": N,
|
|
468
619
|
tabIndex: 0,
|
|
469
|
-
onKeyDown:
|
|
470
|
-
|
|
620
|
+
onKeyDown: Fe,
|
|
621
|
+
onPointerMove: (r) => E({ x: r.clientX, y: r.clientY }),
|
|
622
|
+
onPointerLeave: () => E(null),
|
|
623
|
+
style: { "--peeek-aspect": `${he}` },
|
|
471
624
|
children: [
|
|
472
625
|
i.arrows && /* @__PURE__ */ a(
|
|
473
626
|
"button",
|
|
474
627
|
{
|
|
475
628
|
type: "button",
|
|
476
629
|
className: "peeek__arrow peeek__arrow--prev",
|
|
477
|
-
"aria-label":
|
|
478
|
-
disabled:
|
|
479
|
-
onClick: () =>
|
|
630
|
+
"aria-label": Xe,
|
|
631
|
+
disabled: _e,
|
|
632
|
+
onClick: () => L(-1),
|
|
480
633
|
children: "‹"
|
|
481
634
|
}
|
|
482
635
|
),
|
|
483
636
|
/* @__PURE__ */ a(
|
|
484
637
|
"div",
|
|
485
638
|
{
|
|
486
|
-
className: `peeek__zoom${
|
|
639
|
+
className: `peeek__zoom${I > 1 ? " peeek__zoom--pannable" : ""}`,
|
|
487
640
|
style: {
|
|
488
|
-
transform: `translate(${
|
|
489
|
-
transition:
|
|
641
|
+
transform: `translate(${S.x}px, ${S.y}px) scale(${I * Re}) rotate(${f}deg)`,
|
|
642
|
+
transition: z || G ? "none" : void 0
|
|
490
643
|
},
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
644
|
+
onDoubleClick: De,
|
|
645
|
+
onPointerDown: Be,
|
|
646
|
+
onPointerMove: Ue,
|
|
647
|
+
onPointerUp: ke,
|
|
648
|
+
onPointerCancel: ke,
|
|
495
649
|
children: /* @__PURE__ */ h(
|
|
496
650
|
"div",
|
|
497
651
|
{
|
|
498
|
-
className: `peeek__spread${c ? " peeek--shadows" : ""}${
|
|
499
|
-
style: { transform: `translateX(${
|
|
652
|
+
className: `peeek__spread${c ? " peeek--shadows" : ""}${We ? " peeek__spread--pair" : ""}`,
|
|
653
|
+
style: { transform: `translateX(${Ye})` },
|
|
500
654
|
children: [
|
|
501
|
-
|
|
502
|
-
const x = m >= 0 && i.fullscreen && !
|
|
655
|
+
et.map(([r, m]) => {
|
|
656
|
+
const x = m >= 0 && i.fullscreen && !_ && !v && I === 1;
|
|
503
657
|
return /* @__PURE__ */ a(
|
|
504
658
|
"div",
|
|
505
659
|
{
|
|
506
|
-
className: `peeek__page peeek__page--${
|
|
660
|
+
className: `peeek__page peeek__page--${r}${m < 0 ? " peeek__page--empty" : ""}`,
|
|
507
661
|
children: m >= 0 && (x ? /* @__PURE__ */ a(
|
|
508
662
|
"button",
|
|
509
663
|
{
|
|
@@ -515,21 +669,31 @@ function ct(t) {
|
|
|
515
669
|
}
|
|
516
670
|
) : /* @__PURE__ */ a("img", { src: e[m], alt: `Page ${m + 1}`, loading: "lazy", referrerPolicy: "no-referrer" }))
|
|
517
671
|
},
|
|
518
|
-
|
|
672
|
+
r
|
|
519
673
|
);
|
|
520
674
|
}),
|
|
521
|
-
|
|
675
|
+
v && /* @__PURE__ */ h(
|
|
522
676
|
"div",
|
|
523
677
|
{
|
|
524
|
-
ref:
|
|
525
|
-
className: `peeek__leaf peeek__leaf--${
|
|
526
|
-
onTransitionEnd:
|
|
678
|
+
ref: be,
|
|
679
|
+
className: `peeek__leaf peeek__leaf--${v.dir === 1 ? "fwd" : "back"}`,
|
|
680
|
+
onTransitionEnd: Se,
|
|
527
681
|
children: [
|
|
528
|
-
/* @__PURE__ */ a("div", { className: "peeek__leaf-face peeek__leaf-face--front", children: /* @__PURE__ */ a("img", { src: e[
|
|
529
|
-
/* @__PURE__ */ a("div", { className: "peeek__leaf-face peeek__leaf-face--back", children: /* @__PURE__ */ a("img", { src: e[
|
|
682
|
+
/* @__PURE__ */ a("div", { className: "peeek__leaf-face peeek__leaf-face--front", children: /* @__PURE__ */ a("img", { src: e[qe], alt: "", referrerPolicy: "no-referrer" }) }),
|
|
683
|
+
/* @__PURE__ */ a("div", { className: "peeek__leaf-face peeek__leaf-face--back", children: /* @__PURE__ */ a("img", { src: e[Je], alt: "", referrerPolicy: "no-referrer" }) })
|
|
530
684
|
]
|
|
531
685
|
}
|
|
532
|
-
)
|
|
686
|
+
),
|
|
687
|
+
i.curl && I === 1 && !v && /* @__PURE__ */ h(ne, { children: [
|
|
688
|
+
!ee && /* @__PURE__ */ h(ne, { children: [
|
|
689
|
+
/* @__PURE__ */ a(ae, { corner: "tr", pointer: M, instant: z, onActivate: () => L(1) }),
|
|
690
|
+
/* @__PURE__ */ a(ae, { corner: "br", pointer: M, instant: z, onActivate: () => L(1) })
|
|
691
|
+
] }),
|
|
692
|
+
!_e && /* @__PURE__ */ h(ne, { children: [
|
|
693
|
+
/* @__PURE__ */ a(ae, { corner: "tl", pointer: M, instant: z, onActivate: () => L(-1) }),
|
|
694
|
+
/* @__PURE__ */ a(ae, { corner: "bl", pointer: M, instant: z, onActivate: () => L(-1) })
|
|
695
|
+
] })
|
|
696
|
+
] })
|
|
533
697
|
]
|
|
534
698
|
}
|
|
535
699
|
)
|
|
@@ -540,9 +704,9 @@ function ct(t) {
|
|
|
540
704
|
{
|
|
541
705
|
type: "button",
|
|
542
706
|
className: "peeek__arrow peeek__arrow--next",
|
|
543
|
-
"aria-label":
|
|
544
|
-
disabled:
|
|
545
|
-
onClick: () =>
|
|
707
|
+
"aria-label": Ge,
|
|
708
|
+
disabled: ee,
|
|
709
|
+
onClick: () => L(1),
|
|
546
710
|
children: "›"
|
|
547
711
|
}
|
|
548
712
|
)
|
|
@@ -550,99 +714,135 @@ function ct(t) {
|
|
|
550
714
|
}
|
|
551
715
|
),
|
|
552
716
|
i.toolbar && /* @__PURE__ */ a(
|
|
553
|
-
|
|
717
|
+
wt,
|
|
554
718
|
{
|
|
555
719
|
strings: n,
|
|
556
|
-
label:
|
|
557
|
-
progress:
|
|
558
|
-
zoom:
|
|
559
|
-
minZoom:
|
|
560
|
-
maxZoom:
|
|
720
|
+
label: Ze,
|
|
721
|
+
progress: He,
|
|
722
|
+
zoom: I,
|
|
723
|
+
minZoom: Q,
|
|
724
|
+
maxZoom: oe,
|
|
725
|
+
total: s,
|
|
726
|
+
currentPage: te + 1,
|
|
727
|
+
layout: N,
|
|
561
728
|
thumbsOpen: X,
|
|
562
|
-
isFullscreen:
|
|
563
|
-
downloadUrl:
|
|
564
|
-
show: {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
729
|
+
isFullscreen: _,
|
|
730
|
+
downloadUrl: k,
|
|
731
|
+
show: {
|
|
732
|
+
bar: i.bar,
|
|
733
|
+
fullscreen: i.fullscreen,
|
|
734
|
+
thumbnails: i.thumbnails && i.overview,
|
|
735
|
+
about: i.about,
|
|
736
|
+
goto: i.goto,
|
|
737
|
+
rotate: i.rotate,
|
|
738
|
+
layoutToggle: i.layoutToggle
|
|
739
|
+
},
|
|
740
|
+
onZoomIn: Ee,
|
|
741
|
+
onZoomOut: Le,
|
|
742
|
+
onZoomSet: (r) => $(Math.min(oe, Math.max(Q, r))),
|
|
743
|
+
onJump: se,
|
|
744
|
+
onRotate: Oe,
|
|
745
|
+
onToggleLayout: Me,
|
|
746
|
+
onToggleThumbs: () => W((r) => !r),
|
|
569
747
|
onToggleFullscreen: u,
|
|
570
|
-
onAbout:
|
|
748
|
+
onAbout: d
|
|
571
749
|
}
|
|
572
750
|
),
|
|
573
|
-
i.overview && X && /* @__PURE__ */ a(
|
|
751
|
+
i.overview && X && /* @__PURE__ */ a(Tt, { pages: e, layout: N, rtl: l, activePages: Y, onJump: se })
|
|
574
752
|
] });
|
|
575
753
|
}
|
|
576
|
-
function
|
|
754
|
+
function xt(t, e) {
|
|
577
755
|
const n = e.toLowerCase();
|
|
578
756
|
if (n.includes("pdf")) return "PDF";
|
|
579
757
|
if (n.includes("wordprocessingml")) return "DOCX";
|
|
580
758
|
if (n.includes("msword")) return "DOC";
|
|
581
|
-
const
|
|
582
|
-
return
|
|
759
|
+
const o = t.toLowerCase().split(".").pop() ?? "";
|
|
760
|
+
return o ? o.toUpperCase().slice(0, 4) : "FILE";
|
|
583
761
|
}
|
|
584
|
-
function
|
|
762
|
+
function It(t, e) {
|
|
585
763
|
if (t === 0) return { transform: "translateX(0) scale(1)", zIndex: 30, opacity: 1 };
|
|
586
|
-
const n = t < 0 ? -1 : 1,
|
|
764
|
+
const n = t < 0 ? -1 : 1, o = e ? -1 : 1;
|
|
587
765
|
return {
|
|
588
|
-
transform: `translateX(${
|
|
766
|
+
transform: `translateX(${o * n * 62}%) scale(0.82) rotateY(${-o * n * 28}deg)`,
|
|
589
767
|
zIndex: 20 - Math.abs(t),
|
|
590
768
|
opacity: 0.55
|
|
591
769
|
};
|
|
592
770
|
}
|
|
593
|
-
function
|
|
771
|
+
function zt(t) {
|
|
594
772
|
const {
|
|
595
773
|
pages: e,
|
|
596
774
|
strings: n,
|
|
597
|
-
filename:
|
|
775
|
+
filename: o,
|
|
598
776
|
mimeType: l,
|
|
599
777
|
rtl: c,
|
|
600
778
|
autoTransition: p,
|
|
601
779
|
autoTransitionInterval: b,
|
|
602
|
-
downloadUrl:
|
|
780
|
+
downloadUrl: g,
|
|
603
781
|
isFullscreen: i,
|
|
604
|
-
onToggleFullscreen:
|
|
605
|
-
onAbout:
|
|
782
|
+
onToggleFullscreen: k,
|
|
783
|
+
onAbout: _,
|
|
606
784
|
show: u
|
|
607
|
-
} = t,
|
|
608
|
-
(
|
|
609
|
-
[
|
|
610
|
-
),
|
|
785
|
+
} = t, d = e.length, [s, O] = y(0), z = xe(), F = D(
|
|
786
|
+
(f) => O((w) => Math.max(0, Math.min(d - 1, w + f))),
|
|
787
|
+
[d]
|
|
788
|
+
), R = D(
|
|
789
|
+
(f) => O(Math.max(0, Math.min(d - 1, f))),
|
|
790
|
+
[d]
|
|
791
|
+
), I = s <= 0, $ = s >= d - 1, X = H([]);
|
|
611
792
|
T(() => {
|
|
612
|
-
var
|
|
613
|
-
(
|
|
793
|
+
var f, w;
|
|
794
|
+
(w = (f = X.current[s]) == null ? void 0 : f.scrollIntoView) == null || w.call(f, { behavior: "smooth", inline: "center", block: "nearest" });
|
|
614
795
|
}, [s]), T(() => {
|
|
615
|
-
if (!p ||
|
|
616
|
-
const
|
|
617
|
-
return () => clearTimeout(
|
|
618
|
-
}, [p, b,
|
|
619
|
-
const
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
796
|
+
if (!p || z || $) return;
|
|
797
|
+
const f = setTimeout(() => F(1), b);
|
|
798
|
+
return () => clearTimeout(f);
|
|
799
|
+
}, [p, b, z, $, s, F]);
|
|
800
|
+
const { onKeyDown: W } = Ie({ go: F, jump: R, total: d, rtl: c }), [S, A] = y(String(s + 1));
|
|
801
|
+
T(() => A(String(s + 1)), [s]);
|
|
802
|
+
const G = () => {
|
|
803
|
+
const f = ze(S, d);
|
|
804
|
+
if (f === null) {
|
|
805
|
+
A(String(s + 1));
|
|
806
|
+
return;
|
|
807
|
+
}
|
|
808
|
+
R(f);
|
|
809
|
+
}, C = xt(o, l);
|
|
625
810
|
return /* @__PURE__ */ h("div", { className: "peeek__cf", children: [
|
|
626
811
|
/* @__PURE__ */ h("div", { className: "peeek__cf-header", children: [
|
|
627
|
-
/* @__PURE__ */ a("span", { className: "peeek__cf-badge", children:
|
|
812
|
+
/* @__PURE__ */ a("span", { className: "peeek__cf-badge", children: C }),
|
|
628
813
|
/* @__PURE__ */ h("div", { className: "peeek__cf-meta", children: [
|
|
629
|
-
/* @__PURE__ */ a("span", { className: "peeek__cf-name", children:
|
|
814
|
+
/* @__PURE__ */ a("span", { className: "peeek__cf-name", children: o }),
|
|
630
815
|
/* @__PURE__ */ h("span", { className: "peeek__cf-count", children: [
|
|
631
|
-
|
|
816
|
+
d,
|
|
632
817
|
" ",
|
|
633
|
-
|
|
818
|
+
d === 1 ? n.page : n.pages
|
|
634
819
|
] })
|
|
635
820
|
] }),
|
|
636
821
|
/* @__PURE__ */ h("span", { className: "peeek__cf-indicator", children: [
|
|
637
822
|
s + 1,
|
|
638
823
|
" / ",
|
|
639
|
-
|
|
824
|
+
d
|
|
640
825
|
] }),
|
|
641
|
-
|
|
826
|
+
u.goto && /* @__PURE__ */ a(
|
|
827
|
+
"input",
|
|
828
|
+
{
|
|
829
|
+
className: "peeek__goto",
|
|
830
|
+
type: "text",
|
|
831
|
+
inputMode: "numeric",
|
|
832
|
+
"aria-label": n.goToPage,
|
|
833
|
+
value: S,
|
|
834
|
+
onChange: (f) => A(f.target.value),
|
|
835
|
+
onBlur: G,
|
|
836
|
+
onKeyDown: (f) => {
|
|
837
|
+
f.key === "Enter" && (f.preventDefault(), G());
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
),
|
|
841
|
+
g && /* @__PURE__ */ a(
|
|
642
842
|
"a",
|
|
643
843
|
{
|
|
644
844
|
className: "peeek__btn",
|
|
645
|
-
href:
|
|
845
|
+
href: g,
|
|
646
846
|
"aria-label": n.download,
|
|
647
847
|
target: "_blank",
|
|
648
848
|
rel: "noopener noreferrer",
|
|
@@ -657,7 +857,7 @@ function ft(t) {
|
|
|
657
857
|
className: `peeek__btn${i ? " peeek__btn--active" : ""}`,
|
|
658
858
|
"aria-label": n.fullscreen,
|
|
659
859
|
"aria-pressed": i,
|
|
660
|
-
onClick:
|
|
860
|
+
onClick: k,
|
|
661
861
|
children: "⛶"
|
|
662
862
|
}
|
|
663
863
|
),
|
|
@@ -667,7 +867,7 @@ function ft(t) {
|
|
|
667
867
|
type: "button",
|
|
668
868
|
className: "peeek__btn",
|
|
669
869
|
"aria-label": n.about,
|
|
670
|
-
onClick:
|
|
870
|
+
onClick: _,
|
|
671
871
|
children: "?"
|
|
672
872
|
}
|
|
673
873
|
)
|
|
@@ -677,7 +877,7 @@ function ft(t) {
|
|
|
677
877
|
{
|
|
678
878
|
className: "peeek__cf-stage",
|
|
679
879
|
tabIndex: 0,
|
|
680
|
-
onKeyDown:
|
|
880
|
+
onKeyDown: W,
|
|
681
881
|
children: [
|
|
682
882
|
u.arrows && /* @__PURE__ */ a(
|
|
683
883
|
"button",
|
|
@@ -685,27 +885,27 @@ function ft(t) {
|
|
|
685
885
|
type: "button",
|
|
686
886
|
className: "peeek__arrow peeek__arrow--prev",
|
|
687
887
|
"aria-label": n.prev,
|
|
688
|
-
disabled:
|
|
689
|
-
onClick: () =>
|
|
888
|
+
disabled: I,
|
|
889
|
+
onClick: () => F(-1),
|
|
690
890
|
children: "‹"
|
|
691
891
|
}
|
|
692
892
|
),
|
|
693
|
-
e.map((
|
|
694
|
-
const
|
|
695
|
-
if (Math.abs(
|
|
696
|
-
const
|
|
893
|
+
e.map((f, w) => {
|
|
894
|
+
const M = w - s;
|
|
895
|
+
if (Math.abs(M) > 1) return null;
|
|
896
|
+
const E = M === 0, B = E && u.fullscreen;
|
|
697
897
|
return /* @__PURE__ */ a(
|
|
698
898
|
"button",
|
|
699
899
|
{
|
|
700
900
|
type: "button",
|
|
701
|
-
className: `peeek__cf-card${
|
|
702
|
-
style:
|
|
703
|
-
tabIndex:
|
|
704
|
-
"aria-label":
|
|
705
|
-
onClick: () =>
|
|
706
|
-
children: /* @__PURE__ */ a("img", { src:
|
|
901
|
+
className: `peeek__cf-card${E ? " peeek__cf-card--center" : ""}${B ? " peeek__cf-card--zoom" : ""}`,
|
|
902
|
+
style: It(M, c),
|
|
903
|
+
tabIndex: E ? 0 : -1,
|
|
904
|
+
"aria-label": B ? n.openFullscreen : `Go to page ${w + 1}`,
|
|
905
|
+
onClick: () => B ? k() : O(w),
|
|
906
|
+
children: /* @__PURE__ */ a("img", { src: f, alt: E ? `Page ${w + 1}` : "", loading: "lazy", referrerPolicy: "no-referrer" })
|
|
707
907
|
},
|
|
708
|
-
|
|
908
|
+
w
|
|
709
909
|
);
|
|
710
910
|
}),
|
|
711
911
|
u.arrows && /* @__PURE__ */ a(
|
|
@@ -714,43 +914,43 @@ function ft(t) {
|
|
|
714
914
|
type: "button",
|
|
715
915
|
className: "peeek__arrow peeek__arrow--next",
|
|
716
916
|
"aria-label": n.next,
|
|
717
|
-
disabled:
|
|
718
|
-
onClick: () =>
|
|
917
|
+
disabled: $,
|
|
918
|
+
onClick: () => F(1),
|
|
719
919
|
children: "›"
|
|
720
920
|
}
|
|
721
921
|
)
|
|
722
922
|
]
|
|
723
923
|
}
|
|
724
924
|
),
|
|
725
|
-
u.thumbnails && /* @__PURE__ */ a("div", { className: "peeek__cf-thumbs", role: "group", "aria-label": "Pages", children: e.map((
|
|
726
|
-
const
|
|
925
|
+
u.thumbnails && /* @__PURE__ */ a("div", { className: "peeek__cf-thumbs", role: "group", "aria-label": "Pages", children: e.map((f, w) => {
|
|
926
|
+
const M = w === s;
|
|
727
927
|
return /* @__PURE__ */ h(
|
|
728
928
|
"button",
|
|
729
929
|
{
|
|
730
|
-
ref: (
|
|
731
|
-
|
|
930
|
+
ref: (E) => {
|
|
931
|
+
X.current[w] = E;
|
|
732
932
|
},
|
|
733
933
|
type: "button",
|
|
734
|
-
className: `peeek__cf-thumb${
|
|
735
|
-
"aria-label": `Go to page ${
|
|
736
|
-
"aria-current":
|
|
737
|
-
onClick: () =>
|
|
934
|
+
className: `peeek__cf-thumb${M ? " peeek__cf-thumb--active" : ""}`,
|
|
935
|
+
"aria-label": `Go to page ${w + 1}`,
|
|
936
|
+
"aria-current": M ? "page" : void 0,
|
|
937
|
+
onClick: () => O(w),
|
|
738
938
|
children: [
|
|
739
|
-
/* @__PURE__ */ a("img", { src:
|
|
740
|
-
/* @__PURE__ */ a("span", { className: "peeek__cf-thumb-num", children: String(
|
|
939
|
+
/* @__PURE__ */ a("img", { src: f, alt: "", loading: "lazy", referrerPolicy: "no-referrer" }),
|
|
940
|
+
/* @__PURE__ */ a("span", { className: "peeek__cf-thumb-num", children: String(w + 1).padStart(2, "0") })
|
|
741
941
|
]
|
|
742
942
|
},
|
|
743
|
-
|
|
943
|
+
w
|
|
744
944
|
);
|
|
745
945
|
}) })
|
|
746
946
|
] });
|
|
747
947
|
}
|
|
748
|
-
function
|
|
948
|
+
function At({ logo: t, logoLink: e }) {
|
|
749
949
|
if (!t) return null;
|
|
750
950
|
const n = /* @__PURE__ */ a("img", { src: t, alt: "Logo", loading: "lazy", referrerPolicy: "no-referrer" });
|
|
751
951
|
return /* @__PURE__ */ a("div", { className: "peeek__branding", children: e ? /* @__PURE__ */ a("a", { href: e, target: "_blank", rel: "noopener noreferrer", children: n }) : n });
|
|
752
952
|
}
|
|
753
|
-
const
|
|
953
|
+
const Mt = [
|
|
754
954
|
{ top: "12%", left: "10%", size: 3, v: "A", dur: 13, delay: 0 },
|
|
755
955
|
{ top: "22%", left: "82%", size: 2, v: "B", dur: 16, delay: 2 },
|
|
756
956
|
{ top: "40%", left: "16%", size: 2, v: "C", dur: 12, delay: 1 },
|
|
@@ -764,16 +964,16 @@ const gt = [
|
|
|
764
964
|
{ top: "16%", left: "50%", size: 2, v: "B", dur: 14, delay: 3 },
|
|
765
965
|
{ top: "62%", left: "34%", size: 2, v: "C", dur: 12, delay: 2 }
|
|
766
966
|
];
|
|
767
|
-
function
|
|
768
|
-
const n =
|
|
967
|
+
function $t({ strings: t, onClose: e }) {
|
|
968
|
+
const n = H(null);
|
|
769
969
|
return T(() => {
|
|
770
|
-
var
|
|
771
|
-
(
|
|
970
|
+
var o;
|
|
971
|
+
(o = n.current) == null || o.focus();
|
|
772
972
|
}, []), T(() => {
|
|
773
|
-
const
|
|
973
|
+
const o = (l) => {
|
|
774
974
|
l.key === "Escape" && e();
|
|
775
975
|
};
|
|
776
|
-
return document.addEventListener("keydown",
|
|
976
|
+
return document.addEventListener("keydown", o), () => document.removeEventListener("keydown", o);
|
|
777
977
|
}, [e]), /* @__PURE__ */ a("div", { className: "peeek__about-backdrop", onClick: e, children: /* @__PURE__ */ h(
|
|
778
978
|
"div",
|
|
779
979
|
{
|
|
@@ -781,18 +981,18 @@ function pt({ strings: t, onClose: e }) {
|
|
|
781
981
|
"aria-modal": "true",
|
|
782
982
|
"aria-label": "Peeek Viewer",
|
|
783
983
|
className: "peeek__about",
|
|
784
|
-
onClick: (
|
|
984
|
+
onClick: (o) => o.stopPropagation(),
|
|
785
985
|
children: [
|
|
786
|
-
/* @__PURE__ */ a("span", { className: "peeek__about-particles", "aria-hidden": "true", children:
|
|
986
|
+
/* @__PURE__ */ a("span", { className: "peeek__about-particles", "aria-hidden": "true", children: Mt.map((o, l) => /* @__PURE__ */ a(
|
|
787
987
|
"span",
|
|
788
988
|
{
|
|
789
989
|
className: "peeek__about-particle",
|
|
790
990
|
style: {
|
|
791
|
-
top:
|
|
792
|
-
left:
|
|
793
|
-
width:
|
|
794
|
-
height:
|
|
795
|
-
animation: `peeekAboutDrift${
|
|
991
|
+
top: o.top,
|
|
992
|
+
left: o.left,
|
|
993
|
+
width: o.size,
|
|
994
|
+
height: o.size,
|
|
995
|
+
animation: `peeekAboutDrift${o.v} ${o.dur}s ease-in-out ${o.delay}s infinite`
|
|
796
996
|
}
|
|
797
997
|
},
|
|
798
998
|
l
|
|
@@ -845,7 +1045,7 @@ function pt({ strings: t, onClose: e }) {
|
|
|
845
1045
|
/* @__PURE__ */ a("div", { className: "peeek__about-tagline", children: t.aboutTagline }),
|
|
846
1046
|
/* @__PURE__ */ h("div", { className: "peeek__about-version", children: [
|
|
847
1047
|
"v",
|
|
848
|
-
"0.
|
|
1048
|
+
"0.4.0"
|
|
849
1049
|
] }),
|
|
850
1050
|
/* @__PURE__ */ a("p", { className: "peeek__about-desc", children: t.aboutDescription })
|
|
851
1051
|
] })
|
|
@@ -853,14 +1053,14 @@ function pt({ strings: t, onClose: e }) {
|
|
|
853
1053
|
}
|
|
854
1054
|
) });
|
|
855
1055
|
}
|
|
856
|
-
function
|
|
857
|
-
const e =
|
|
858
|
-
() =>
|
|
859
|
-
[
|
|
860
|
-
),
|
|
1056
|
+
function Lt(t) {
|
|
1057
|
+
const e = mt(t), n = gt(e.language), o = H(null), { isFullscreen: l, toggle: c } = _t(o), [p, b] = y(!1), g = t.pages !== void 0, i = tt(
|
|
1058
|
+
() => g ? bt(t.pages, { filename: t.filename, mimeType: t.mimeType }) : null,
|
|
1059
|
+
[g, t.pages, t.filename, t.mimeType]
|
|
1060
|
+
), k = ht(g ? null : e.src, e.pollInterval), _ = g ? i : k.manifest, u = g ? i ? "ready" : "loading" : k.state, d = {
|
|
861
1061
|
"--peeek-accent": e.accentColor
|
|
862
1062
|
};
|
|
863
|
-
e.background === "transparent" ?
|
|
1063
|
+
e.background === "transparent" ? d["--peeek-bg"] = "transparent" : e.background === "color" && e.backgroundColor ? d["--peeek-bg"] = e.backgroundColor : e.background === "image" && e.backgroundImage && (d["--peeek-bg"] = `center / cover no-repeat url("${e.backgroundImage}")`);
|
|
864
1064
|
const s = {
|
|
865
1065
|
toolbar: e.navigationControls,
|
|
866
1066
|
bar: e.navigationBar,
|
|
@@ -868,28 +1068,35 @@ function _t(t) {
|
|
|
868
1068
|
thumbnails: e.pagesOverview,
|
|
869
1069
|
arrows: e.arrows,
|
|
870
1070
|
overview: e.pagesOverview,
|
|
871
|
-
about: e.aboutButton
|
|
1071
|
+
about: e.aboutButton,
|
|
1072
|
+
goto: e.goToPage,
|
|
1073
|
+
rotate: e.rotateControl,
|
|
1074
|
+
layoutToggle: e.layoutToggle,
|
|
1075
|
+
curl: e.pageCurl
|
|
872
1076
|
};
|
|
873
1077
|
return /* @__PURE__ */ h(
|
|
874
1078
|
"div",
|
|
875
1079
|
{
|
|
876
|
-
ref:
|
|
1080
|
+
ref: o,
|
|
877
1081
|
className: `peeek${e.fillHeight ? " peeek--fill-height" : ""}${e.className ? " " + e.className : ""}`,
|
|
878
1082
|
"data-skin": e.skin,
|
|
879
1083
|
"data-layout": e.layout,
|
|
880
1084
|
dir: e.rtl ? "rtl" : void 0,
|
|
881
|
-
style:
|
|
1085
|
+
style: d,
|
|
882
1086
|
children: [
|
|
883
|
-
/* @__PURE__ */ a(
|
|
884
|
-
u === "loading" && /* @__PURE__ */
|
|
1087
|
+
/* @__PURE__ */ a(At, { logo: e.logo, logoLink: e.logoLink }),
|
|
1088
|
+
u === "loading" && /* @__PURE__ */ h("div", { className: "peeek__state", style: e.loadingColor ? { color: e.loadingColor } : void 0, children: [
|
|
1089
|
+
e.loadingImage && /* @__PURE__ */ a("img", { className: "peeek__state-img", src: e.loadingImage, alt: "", referrerPolicy: "no-referrer" }),
|
|
1090
|
+
/* @__PURE__ */ a("span", { children: e.loadingCaption ?? n.loading })
|
|
1091
|
+
] }),
|
|
885
1092
|
u === "error" && /* @__PURE__ */ a("div", { className: "peeek__state", children: n.error }),
|
|
886
|
-
u === "ready" &&
|
|
887
|
-
|
|
1093
|
+
u === "ready" && _ && e.mode === "coverflow" && /* @__PURE__ */ a(
|
|
1094
|
+
zt,
|
|
888
1095
|
{
|
|
889
|
-
pages:
|
|
1096
|
+
pages: _.pages,
|
|
890
1097
|
strings: n,
|
|
891
|
-
filename:
|
|
892
|
-
mimeType:
|
|
1098
|
+
filename: _.metadata.filename,
|
|
1099
|
+
mimeType: _.metadata.mimeType,
|
|
893
1100
|
rtl: e.rtl,
|
|
894
1101
|
autoTransition: e.autoTransition,
|
|
895
1102
|
autoTransitionInterval: e.autoTransitionInterval,
|
|
@@ -897,13 +1104,13 @@ function _t(t) {
|
|
|
897
1104
|
isFullscreen: l,
|
|
898
1105
|
onToggleFullscreen: c,
|
|
899
1106
|
onAbout: () => b(!0),
|
|
900
|
-
show: { arrows: e.arrows, thumbnails: e.pagesOverview, fullscreen: e.fullscreen, about: e.aboutButton }
|
|
1107
|
+
show: { arrows: e.arrows, thumbnails: e.pagesOverview, fullscreen: e.fullscreen, about: e.aboutButton, goto: e.goToPage }
|
|
901
1108
|
}
|
|
902
1109
|
),
|
|
903
|
-
u === "ready" &&
|
|
904
|
-
|
|
1110
|
+
u === "ready" && _ && e.mode === "flip" && /* @__PURE__ */ a(
|
|
1111
|
+
Pt,
|
|
905
1112
|
{
|
|
906
|
-
pages:
|
|
1113
|
+
pages: _.pages,
|
|
907
1114
|
strings: n,
|
|
908
1115
|
layout: e.layout,
|
|
909
1116
|
rtl: e.rtl,
|
|
@@ -918,11 +1125,11 @@ function _t(t) {
|
|
|
918
1125
|
onAbout: () => b(!0)
|
|
919
1126
|
}
|
|
920
1127
|
),
|
|
921
|
-
p && /* @__PURE__ */ a(
|
|
1128
|
+
p && /* @__PURE__ */ a($t, { strings: n, onClose: () => b(!1) })
|
|
922
1129
|
]
|
|
923
1130
|
}
|
|
924
1131
|
);
|
|
925
1132
|
}
|
|
926
1133
|
export {
|
|
927
|
-
|
|
1134
|
+
Lt as PeeekViewer
|
|
928
1135
|
};
|