@museumwnf/viewer-layout 3.72.1 → 3.73.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/README.md +55 -0
- package/dist/publications.js +1009 -0
- package/dist/travels.js +735 -0
- package/dist/viewer-layout.css +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,1009 @@
|
|
|
1
|
+
import { r as e } from "./chrome-Bv_mLlHM.js";
|
|
2
|
+
import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, normalizeClass as l, onBeforeUnmount as u, onMounted as d, openBlock as f, reactive as p, ref as m, renderList as h, renderSlot as g, resolveComponent as _, toDisplayString as v, unref as y, vModelSelect as b, vModelText as x, vShow as S, watch as C, withCtx as w, withDirectives as T, withKeys as ee, withModifiers as E } from "vue";
|
|
3
|
+
import { byId as D, entityRef as O, isRtl as te, languageLabels as k, mwnfLinks as A, offeredLanguages as j, paginate as M, renderBlock as N, sectionMeta as P, useDataPackage as F, useI18n as I, useSiteConfig as L } from "@museumwnf/viewer-core";
|
|
4
|
+
import { useRoute as R, useRouter as z } from "vue-router";
|
|
5
|
+
// src/publications/rules.js
|
|
6
|
+
var B = [
|
|
7
|
+
"publications",
|
|
8
|
+
"editions",
|
|
9
|
+
"tags",
|
|
10
|
+
"countries",
|
|
11
|
+
"languages"
|
|
12
|
+
], V = 12, H = Object.freeze([
|
|
13
|
+
{
|
|
14
|
+
slug: "new",
|
|
15
|
+
label: "publications.category.new",
|
|
16
|
+
menu: "publications.menu.new",
|
|
17
|
+
match: null
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
slug: "virtual-museum-books",
|
|
21
|
+
category: "virtual-museum",
|
|
22
|
+
label: "publications.category.virtualMuseum"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
slug: "travel-books",
|
|
26
|
+
category: "exhibition-trail",
|
|
27
|
+
label: "publications.category.travelBooks"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
slug: "educational-books",
|
|
31
|
+
category: "educational",
|
|
32
|
+
label: "publications.category.educational"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
slug: "other-books",
|
|
36
|
+
category: "other",
|
|
37
|
+
label: "publications.category.other"
|
|
38
|
+
}
|
|
39
|
+
]);
|
|
40
|
+
function U(e) {
|
|
41
|
+
return e < 900 ? 3 : e < 1125 ? 4 : e < 1350 ? 5 : Infinity;
|
|
42
|
+
}
|
|
43
|
+
var W = [
|
|
44
|
+
"title",
|
|
45
|
+
"author",
|
|
46
|
+
"isbn",
|
|
47
|
+
"language",
|
|
48
|
+
"country",
|
|
49
|
+
"subject",
|
|
50
|
+
"type",
|
|
51
|
+
"publisher"
|
|
52
|
+
], G = Object.freeze([
|
|
53
|
+
{
|
|
54
|
+
value: "print",
|
|
55
|
+
label: "publications.format.print"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
value: "print-on-demand",
|
|
59
|
+
label: "publications.format.printOnDemand"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
value: "ebook",
|
|
63
|
+
label: "publications.format.ebook"
|
|
64
|
+
}
|
|
65
|
+
]);
|
|
66
|
+
function ne(e, t) {
|
|
67
|
+
return !e || !t ? !1 : typeof t.match == "function" ? !!t.match(e) : t.match !== null && e.category === t.category;
|
|
68
|
+
}
|
|
69
|
+
function re(e, t = H) {
|
|
70
|
+
return t.find((t) => t.slug === e) ?? null;
|
|
71
|
+
}
|
|
72
|
+
function ie(e, t = 6) {
|
|
73
|
+
let n = Array.isArray(e) ? e : [];
|
|
74
|
+
return n.length > t ? {
|
|
75
|
+
shown: n.slice(0, t),
|
|
76
|
+
more: !0
|
|
77
|
+
} : {
|
|
78
|
+
shown: n,
|
|
79
|
+
more: !1
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function ae(e, t) {
|
|
83
|
+
return t ? t.length <= e ? t : `${t.substring(0, t.lastIndexOf(" ", e))}...` : t ?? "";
|
|
84
|
+
}
|
|
85
|
+
var oe = (e, t) => (e.display_order ?? Infinity) - (t.display_order ?? Infinity);
|
|
86
|
+
function K(e, t, n = null) {
|
|
87
|
+
let r = [];
|
|
88
|
+
for (let i of e?.edition_ids ?? []) {
|
|
89
|
+
let e = t.get(i);
|
|
90
|
+
e && (!n || e.language === n) && r.push(e);
|
|
91
|
+
}
|
|
92
|
+
return r.sort(oe);
|
|
93
|
+
}
|
|
94
|
+
function q(e, t) {
|
|
95
|
+
let n = new Set(K(e, t).map((e) => e.language).filter(Boolean));
|
|
96
|
+
return (n.size ? [...n] : [...e?.languages ?? []]).sort();
|
|
97
|
+
}
|
|
98
|
+
function se(e, t, n = null) {
|
|
99
|
+
let r = q(e, t);
|
|
100
|
+
return n && r.includes(n) ? n : e?.language && r.includes(e.language) ? e.language : r[0] ?? e?.language ?? "en";
|
|
101
|
+
}
|
|
102
|
+
function ce(e) {
|
|
103
|
+
let t = [];
|
|
104
|
+
for (let n of e ?? []) {
|
|
105
|
+
let e = String(n?.binding ?? "").trim();
|
|
106
|
+
e && !t.includes(e) && t.push(e);
|
|
107
|
+
}
|
|
108
|
+
return t;
|
|
109
|
+
}
|
|
110
|
+
function le(e = {}, t = null) {
|
|
111
|
+
let n = t?.texts ?? {}, r = (e, t) => e != null && e !== "" ? e : t ?? null;
|
|
112
|
+
return {
|
|
113
|
+
title: r(n.title, e.title),
|
|
114
|
+
subtitle: r(n.subtitle, e.subtitle),
|
|
115
|
+
about: r(n.description1, e.description),
|
|
116
|
+
moreAbout: r(n.description2, e.introduction),
|
|
117
|
+
note: r(n.remarks1, null),
|
|
118
|
+
authors: r(n.author, e.author_credit),
|
|
119
|
+
photographers: r(n.photographer, e.photography_credit),
|
|
120
|
+
editors: r(n.local_coordinator, e.coordination_credit)
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function J(e) {
|
|
124
|
+
let t = e?.documents ?? [];
|
|
125
|
+
return {
|
|
126
|
+
sample: t.find((e) => e?.kind === "sample")?.url ?? null,
|
|
127
|
+
credits: t.find((e) => e?.kind === "credits")?.url ?? null
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function Y(e) {
|
|
131
|
+
return e != null && String(e).trim() !== "";
|
|
132
|
+
}
|
|
133
|
+
function ue(e) {
|
|
134
|
+
let t = String(e?.internal_name ?? "").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean);
|
|
135
|
+
return t.length === 0 ? "" : `publications.theme.${t.map((e, t) => t === 0 ? e : e[0].toUpperCase() + e.slice(1)).join("")}`;
|
|
136
|
+
}
|
|
137
|
+
var X = (e) => String(e ?? "").toLocaleLowerCase().normalize("NFD").replace(/[̀-ͯ]/g, ""), de = (e) => String(e ?? "").replace(/[^0-9xX]/g, "").toLowerCase();
|
|
138
|
+
function fe(e) {
|
|
139
|
+
return W.some((t) => Y(e?.[t]));
|
|
140
|
+
}
|
|
141
|
+
function pe(e, t, { editionById: n, textsOf: r }) {
|
|
142
|
+
if (!fe(t)) return [];
|
|
143
|
+
let i = X(t.title).trim(), a = X(t.author).trim(), o = de(t.isbn);
|
|
144
|
+
return (e ?? []).filter((e) => {
|
|
145
|
+
let s = K(e, n), c = r(e), l = s.map((e) => e.texts ?? {});
|
|
146
|
+
return !(i && ![...c, ...l].some((e) => X(e.title).includes(i) || X(e.subtitle).includes(i)) || a && ![...c.map((e) => e.author_credit), ...l.map((e) => e.author)].some((e) => X(e).includes(a)) || o && !s.some((e) => de(e.isbn).includes(o)) || Y(t.language) && !s.some((e) => e.language === t.language) || Y(t.type) && !s.some((e) => e.format === t.type) || Y(t.publisher) && !s.some((e) => e.publisher === t.publisher) || Y(t.country) && e.country_id !== t.country || Y(t.subject) && !(e.tag_ids ?? []).includes(t.subject));
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
// src/publications/data.js
|
|
150
|
+
var me = O("publications"), he = O("editions"), ge = O("tags"), _e = O("countries"), ve = O("languages");
|
|
151
|
+
function ye(e) {
|
|
152
|
+
return e?.publications?.categories ?? H;
|
|
153
|
+
}
|
|
154
|
+
function Z({ languagesToLoad: e = () => [] } = {}) {
|
|
155
|
+
let t = F(), r = L(), { locale: i } = I(), a = D("editions"), o = D("publications");
|
|
156
|
+
C(() => [.../* @__PURE__ */ new Set([
|
|
157
|
+
"en",
|
|
158
|
+
i.value,
|
|
159
|
+
...e()
|
|
160
|
+
])], (e) => Promise.all(e.flatMap((e) => [t.loadTranslations("publications", e), t.loadTranslations("countries", e)])), { immediate: !0 });
|
|
161
|
+
let s = n(() => me.value ?? []), c = n(() => ye(r)), l = (e, n) => t.translations("publications", n)[e?.id] ?? {};
|
|
162
|
+
function u(e) {
|
|
163
|
+
return e ? t.translations("countries", i.value)[e]?.name ?? t.translations("countries", "en")[e]?.name ?? "" : "";
|
|
164
|
+
}
|
|
165
|
+
function d(e) {
|
|
166
|
+
let n = t.manifest.projects?.[e]?.name;
|
|
167
|
+
return n?.[i.value] ?? n?.en ?? "";
|
|
168
|
+
}
|
|
169
|
+
function f(e, t = e) {
|
|
170
|
+
let n = (ve.value ?? []).find((t) => t.code === e);
|
|
171
|
+
return n?.names?.[t] ?? n?.names?.[e] ?? String(e ?? "").toUpperCase();
|
|
172
|
+
}
|
|
173
|
+
function p(e, t = null) {
|
|
174
|
+
let n = a.value, r = se(e, n, t), i = K(e, n, r), o = l(e, r), s = i[0]?.texts ?? {}, c = i.length ? i[0].cover : e.cover;
|
|
175
|
+
return {
|
|
176
|
+
id: e.id,
|
|
177
|
+
language: r,
|
|
178
|
+
to: {
|
|
179
|
+
name: "publication",
|
|
180
|
+
params: {
|
|
181
|
+
id: e.id,
|
|
182
|
+
language: r
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
cover: c?.url ?? null,
|
|
186
|
+
languages: ie(q(e, n)),
|
|
187
|
+
country: u(e.country_id),
|
|
188
|
+
project: d(e.project_id),
|
|
189
|
+
title: s.title || o.title || "",
|
|
190
|
+
subtitle: s.subtitle || o.subtitle || "",
|
|
191
|
+
author: s.author || o.author_credit || "",
|
|
192
|
+
formats: ce(i).join(", ")
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function m(e, n) {
|
|
196
|
+
let r = (e) => t.translations("countries", "en")[e.country_id]?.name ?? "";
|
|
197
|
+
return s.value.filter((t) => n(t, e)).map((e, t) => ({
|
|
198
|
+
publication: e,
|
|
199
|
+
order: t,
|
|
200
|
+
key: r(e)
|
|
201
|
+
})).sort((e, t) => e.key.localeCompare(t.key) || e.order - t.order).map((e) => e.publication);
|
|
202
|
+
}
|
|
203
|
+
return {
|
|
204
|
+
pkg: t,
|
|
205
|
+
config: r,
|
|
206
|
+
publications: s,
|
|
207
|
+
editions: he,
|
|
208
|
+
tags: ge,
|
|
209
|
+
countries: _e,
|
|
210
|
+
languages: ve,
|
|
211
|
+
editionById: a,
|
|
212
|
+
publicationById: o,
|
|
213
|
+
categories: c,
|
|
214
|
+
text: l,
|
|
215
|
+
tile: p,
|
|
216
|
+
inCategory: m,
|
|
217
|
+
countryName: u,
|
|
218
|
+
projectName: d,
|
|
219
|
+
languageName: f
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
// src/publications/footer.js
|
|
223
|
+
var Q = A.portal, be = Object.freeze({
|
|
224
|
+
columns: [
|
|
225
|
+
{
|
|
226
|
+
heading: "publications.footer.more",
|
|
227
|
+
links: [
|
|
228
|
+
{
|
|
229
|
+
label: "publications.footer.chronology",
|
|
230
|
+
href: `${Q}/about/chronology`
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
label: "publications.footer.support",
|
|
234
|
+
href: `${Q}/about/support`
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
label: "publications.footer.volunteers",
|
|
238
|
+
href: `${Q}/about/volunteers`
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
label: "publications.footer.honoraryCommittee",
|
|
242
|
+
href: `${Q}/about/honorary-committee`
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
label: "publications.footer.commemoration",
|
|
246
|
+
href: `${Q}/about/commemoration`
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
heading: "publications.footer.archive",
|
|
252
|
+
links: [{
|
|
253
|
+
label: "publications.footer.leagueOfArabStates",
|
|
254
|
+
href: `${Q}/league-of-arab-states/`
|
|
255
|
+
}, {
|
|
256
|
+
label: "publications.footer.cafeteria",
|
|
257
|
+
href: `${Q}/cafeteria/`
|
|
258
|
+
}]
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
heading: "publications.footer.others",
|
|
262
|
+
links: [{
|
|
263
|
+
label: "publications.footer.pressLounge",
|
|
264
|
+
href: `${Q}/about/press-lounge`
|
|
265
|
+
}, {
|
|
266
|
+
label: "publications.footer.languagePolicy",
|
|
267
|
+
href: `${Q}/about/language-policy`
|
|
268
|
+
}]
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
heading: "publications.footer.contact",
|
|
272
|
+
links: [{
|
|
273
|
+
label: "publications.footer.contactTeam",
|
|
274
|
+
href: A.contact
|
|
275
|
+
}, {
|
|
276
|
+
label: "publications.footer.contactPartners",
|
|
277
|
+
href: `${Q}/partner_list.php`
|
|
278
|
+
}]
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
bottom: [
|
|
282
|
+
{
|
|
283
|
+
label: "publications.footer.contactLink",
|
|
284
|
+
href: A.contact
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
label: "publications.footer.legalNotice",
|
|
288
|
+
href: A.legalNotice
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
label: "publications.footer.credits",
|
|
292
|
+
href: A.credits
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
label: "publications.footer.cookies",
|
|
296
|
+
href: A.cookies
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
}), xe = { class: "mwnf-books" }, Se = { class: "mwnf-books-header" }, Ce = { class: "mwnf-books-header__main" }, we = { class: "mwnf-books-header__logo" }, Te = ["href"], Ee = ["src"], De = { class: "mwnf-books-header__links" }, Oe = { class: "mwnf-books-header__nav" }, ke = ["href"], Ae = ["href"], je = ["aria-expanded", "aria-label"], Me = ["aria-label"], Ne = { class: "mwnf-books-search" }, Pe = ["aria-expanded", "aria-label"], Fe = {
|
|
300
|
+
key: 0,
|
|
301
|
+
"aria-hidden": "true"
|
|
302
|
+
}, Ie = {
|
|
303
|
+
key: 1,
|
|
304
|
+
"aria-hidden": "true"
|
|
305
|
+
}, Le = {
|
|
306
|
+
key: 0,
|
|
307
|
+
class: "mwnf-books-search__panel"
|
|
308
|
+
}, Re = { class: "mwnf-books-search__explanation" }, ze = ["placeholder", "aria-label"], Be = ["placeholder", "aria-label"], Ve = ["placeholder", "aria-label"], He = ["onUpdate:modelValue", "aria-label"], Ue = { value: "" }, We = ["value"], Ge = { class: "mwnf-books-search__buttons" }, Ke = {
|
|
309
|
+
type: "submit",
|
|
310
|
+
class: "mwnf-books-search__button"
|
|
311
|
+
}, qe = { class: "mwnf-books-main" }, Je = { class: "mwnf-books-footer" }, Ye = { class: "mwnf-books-footer__top" }, Xe = { class: "mwnf-books-footer__column mwnf-books-footer__brand" }, Ze = ["src"], Qe = { class: "mwnf-books-footer__heading" }, $e = ["href"], et = { class: "mwnf-books-footer__bottom" }, tt = ["href"], nt = {
|
|
312
|
+
__name: "Shell",
|
|
313
|
+
props: {
|
|
314
|
+
languages: {
|
|
315
|
+
type: Array,
|
|
316
|
+
default: () => []
|
|
317
|
+
},
|
|
318
|
+
language: {
|
|
319
|
+
type: String,
|
|
320
|
+
default: "en"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
setup(r) {
|
|
324
|
+
let { t: u } = I(), d = L(), S = R(), ee = z(), D = Z(), O = (t) => e(d.chrome, t), te = n(() => ye(d)), k = n(() => d.publications?.footer ?? be), j = n(() => d.publications?.portal ?? A.portal), M = m(!1), N = m(!0), P = p(Object.fromEntries(W.map((e) => [e, ""])));
|
|
325
|
+
C(() => S.query, (e) => {
|
|
326
|
+
if (S.name === "results") for (let t of W) P[t] = typeof e[t] == "string" ? e[t] : "";
|
|
327
|
+
}, { immediate: !0 });
|
|
328
|
+
let F = (e) => e.sort((e, t) => e.label.localeCompare(t.label)), B = n(() => D.editions.value ?? []), V = n(() => ({
|
|
329
|
+
language: F([...new Set(B.value.map((e) => e.language).filter(Boolean))].map((e) => ({
|
|
330
|
+
value: e,
|
|
331
|
+
label: D.languageName(e, "en")
|
|
332
|
+
}))),
|
|
333
|
+
country: F([...new Set(D.publications.value.map((e) => e.country_id).filter(Boolean))].map((e) => ({
|
|
334
|
+
value: e,
|
|
335
|
+
label: D.countryName(e)
|
|
336
|
+
}))),
|
|
337
|
+
subject: F((D.tags.value ?? []).filter((e) => e.category === "subject").map((e) => ({
|
|
338
|
+
value: e.id,
|
|
339
|
+
label: e.description ?? e.internal_name
|
|
340
|
+
}))),
|
|
341
|
+
type: F(G.map((e) => ({
|
|
342
|
+
value: e.value,
|
|
343
|
+
label: u(e.label)
|
|
344
|
+
}))),
|
|
345
|
+
publisher: F([...new Set(B.value.map((e) => e.publisher).filter(Boolean))].map((e) => ({
|
|
346
|
+
value: e,
|
|
347
|
+
label: e
|
|
348
|
+
})))
|
|
349
|
+
})), H = [
|
|
350
|
+
"language",
|
|
351
|
+
"country",
|
|
352
|
+
"subject",
|
|
353
|
+
"type",
|
|
354
|
+
"publisher"
|
|
355
|
+
];
|
|
356
|
+
function U() {
|
|
357
|
+
for (let e of W) P[e] = "";
|
|
358
|
+
}
|
|
359
|
+
function ne() {
|
|
360
|
+
let e = Object.fromEntries(W.filter((e) => String(P[e]).trim() !== "").map((e) => [e, String(P[e]).trim()]));
|
|
361
|
+
ee.push({
|
|
362
|
+
name: "results",
|
|
363
|
+
query: e
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
return (e, n) => {
|
|
367
|
+
let r = _("RouterLink");
|
|
368
|
+
return f(), a("div", xe, [
|
|
369
|
+
o("header", Se, [
|
|
370
|
+
o("div", Ce, [o("div", we, [o("a", { href: j.value }, [O("legacy/logo-blue.png") ? (f(), a("img", {
|
|
371
|
+
key: 0,
|
|
372
|
+
src: O("legacy/logo-blue.png"),
|
|
373
|
+
alt: ""
|
|
374
|
+
}, null, 8, Ee)) : i("", !0)], 8, Te)]), o("div", De, [c(r, {
|
|
375
|
+
class: "mwnf-books-header__slogan",
|
|
376
|
+
to: { name: "home" }
|
|
377
|
+
}, {
|
|
378
|
+
default: w(() => [s(v(y(u)("publications.header.title")), 1)]),
|
|
379
|
+
_: 1
|
|
380
|
+
}), o("nav", Oe, [
|
|
381
|
+
o("a", {
|
|
382
|
+
class: "mwnf-books-header__item",
|
|
383
|
+
href: y(A).about,
|
|
384
|
+
target: "_blank"
|
|
385
|
+
}, v(y(u)("publications.header.about")), 9, ke),
|
|
386
|
+
o("a", {
|
|
387
|
+
class: "mwnf-books-header__item",
|
|
388
|
+
href: y(A).contact,
|
|
389
|
+
target: "_blank"
|
|
390
|
+
}, v(y(u)("publications.header.contact")), 9, Ae),
|
|
391
|
+
c(r, {
|
|
392
|
+
class: "mwnf-books-header__item",
|
|
393
|
+
to: { name: "home" }
|
|
394
|
+
}, {
|
|
395
|
+
default: w(() => [s(v(y(u)("publications.header.home")), 1)]),
|
|
396
|
+
_: 1
|
|
397
|
+
}),
|
|
398
|
+
o("button", {
|
|
399
|
+
type: "button",
|
|
400
|
+
class: "mwnf-books-header__burger",
|
|
401
|
+
"aria-expanded": M.value,
|
|
402
|
+
"aria-label": y(u)("layout.nav.menu"),
|
|
403
|
+
onClick: n[0] ||= (e) => M.value = !M.value
|
|
404
|
+
}, "☰", 8, je)
|
|
405
|
+
])])]),
|
|
406
|
+
o("nav", {
|
|
407
|
+
class: l(["mwnf-books-menu", { "mwnf-books-menu--open": M.value }]),
|
|
408
|
+
"aria-label": y(u)("layout.nav.label")
|
|
409
|
+
}, [(f(!0), a(t, null, h(te.value, (e) => (f(), a("div", {
|
|
410
|
+
key: e.slug,
|
|
411
|
+
class: "mwnf-books-menu__item"
|
|
412
|
+
}, [c(r, {
|
|
413
|
+
to: {
|
|
414
|
+
name: "category",
|
|
415
|
+
params: { category: e.slug }
|
|
416
|
+
},
|
|
417
|
+
onClick: n[1] ||= (e) => M.value = !1
|
|
418
|
+
}, {
|
|
419
|
+
default: w(() => [s(v(y(u)(e.menu ?? e.label)), 1)]),
|
|
420
|
+
_: 2
|
|
421
|
+
}, 1032, ["to"])]))), 128))], 10, Me),
|
|
422
|
+
o("div", Ne, [o("button", {
|
|
423
|
+
type: "button",
|
|
424
|
+
class: "mwnf-books-search__toggle",
|
|
425
|
+
"aria-expanded": N.value,
|
|
426
|
+
"aria-label": y(u)("core.action.search"),
|
|
427
|
+
onClick: n[2] ||= (e) => N.value = !N.value
|
|
428
|
+
}, [N.value ? (f(), a("span", Fe, "⌃⌃")) : (f(), a("span", Ie, "⌄ ⚲ ⌄"))], 8, Pe), N.value ? (f(), a("div", Le, [o("p", Re, v(y(u)("publications.search.explanation")), 1), o("form", {
|
|
429
|
+
class: "mwnf-books-search__form",
|
|
430
|
+
onSubmit: E(ne, ["prevent"])
|
|
431
|
+
}, [
|
|
432
|
+
T(o("input", {
|
|
433
|
+
"onUpdate:modelValue": n[3] ||= (e) => P.title = e,
|
|
434
|
+
class: "mwnf-books-search__input",
|
|
435
|
+
type: "search",
|
|
436
|
+
placeholder: y(u)("publications.search.title"),
|
|
437
|
+
"aria-label": y(u)("publications.search.title")
|
|
438
|
+
}, null, 8, ze), [[x, P.title]]),
|
|
439
|
+
T(o("input", {
|
|
440
|
+
"onUpdate:modelValue": n[4] ||= (e) => P.author = e,
|
|
441
|
+
class: "mwnf-books-search__input",
|
|
442
|
+
type: "search",
|
|
443
|
+
placeholder: y(u)("publications.search.author"),
|
|
444
|
+
"aria-label": y(u)("publications.search.author")
|
|
445
|
+
}, null, 8, Be), [[x, P.author]]),
|
|
446
|
+
T(o("input", {
|
|
447
|
+
"onUpdate:modelValue": n[5] ||= (e) => P.isbn = e,
|
|
448
|
+
class: "mwnf-books-search__input",
|
|
449
|
+
type: "search",
|
|
450
|
+
placeholder: y(u)("publications.search.isbn"),
|
|
451
|
+
"aria-label": y(u)("publications.search.isbn")
|
|
452
|
+
}, null, 8, Ve), [[x, P.isbn]]),
|
|
453
|
+
(f(), a(t, null, h(H, (e) => T(o("select", {
|
|
454
|
+
key: e,
|
|
455
|
+
"onUpdate:modelValue": (t) => P[e] = t,
|
|
456
|
+
class: "mwnf-books-search__input",
|
|
457
|
+
"aria-label": y(u)(`publications.search.${e}`)
|
|
458
|
+
}, [o("option", Ue, v(y(u)(`publications.search.${e}`)), 1), (f(!0), a(t, null, h(V.value[e], (e) => (f(), a("option", {
|
|
459
|
+
key: e.value,
|
|
460
|
+
value: e.value
|
|
461
|
+
}, v(e.label), 9, We))), 128))], 8, He), [[b, P[e]]])), 64)),
|
|
462
|
+
o("div", Ge, [o("button", {
|
|
463
|
+
type: "button",
|
|
464
|
+
class: "mwnf-books-search__button mwnf-books-search__button--reset",
|
|
465
|
+
onClick: U
|
|
466
|
+
}, v(y(u)("publications.search.reset")), 1), o("button", Ke, v(y(u)("publications.search.submit")), 1)])
|
|
467
|
+
], 32)])) : i("", !0)])
|
|
468
|
+
]),
|
|
469
|
+
o("main", qe, [g(e.$slots, "default")]),
|
|
470
|
+
o("footer", Je, [o("div", Ye, [o("div", Xe, [O("legacy/logo-white.png") ? (f(), a("img", {
|
|
471
|
+
key: 0,
|
|
472
|
+
src: O("legacy/logo-white.png"),
|
|
473
|
+
alt: ""
|
|
474
|
+
}, null, 8, Ze)) : i("", !0), o("p", null, v(y(u)("publications.footer.slogan")), 1)]), (f(!0), a(t, null, h(k.value.columns, (e) => (f(), a("div", {
|
|
475
|
+
key: e.heading,
|
|
476
|
+
class: "mwnf-books-footer__column"
|
|
477
|
+
}, [o("p", Qe, v(y(u)(e.heading)), 1), (f(!0), a(t, null, h(e.links, (e) => (f(), a("a", {
|
|
478
|
+
key: e.label,
|
|
479
|
+
class: "mwnf-books-footer__link",
|
|
480
|
+
href: e.href
|
|
481
|
+
}, v(y(u)(e.label)), 9, $e))), 128))]))), 128))]), o("div", et, [(f(!0), a(t, null, h(k.value.bottom, (e) => (f(), a("a", {
|
|
482
|
+
key: e.label,
|
|
483
|
+
class: "mwnf-books-footer__bottom-link",
|
|
484
|
+
href: e.href
|
|
485
|
+
}, v(y(u)(e.label)), 9, tt))), 128))])])
|
|
486
|
+
]);
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
}, rt = {
|
|
490
|
+
class: "mwnf-books-tile__tooltip",
|
|
491
|
+
role: "tooltip"
|
|
492
|
+
}, it = { class: "mwnf-books-tile__media" }, at = {
|
|
493
|
+
key: 0,
|
|
494
|
+
class: "mwnf-books-tile__cover"
|
|
495
|
+
}, ot = ["src"], st = {
|
|
496
|
+
key: 1,
|
|
497
|
+
class: "mwnf-books-tile__cover mwnf-books-tile__cover--none"
|
|
498
|
+
}, ct = { class: "mwnf-books-tile__languages" }, lt = {
|
|
499
|
+
key: 0,
|
|
500
|
+
class: "mwnf-books-tile__language"
|
|
501
|
+
}, ut = { class: "mwnf-books-tile__info" }, dt = {
|
|
502
|
+
key: 0,
|
|
503
|
+
class: "mwnf-books-tile__country"
|
|
504
|
+
}, ft = {
|
|
505
|
+
key: 1,
|
|
506
|
+
class: "mwnf-books-tile__project"
|
|
507
|
+
}, pt = { class: "mwnf-books-tile__title" }, mt = {
|
|
508
|
+
key: 2,
|
|
509
|
+
class: "mwnf-books-tile__subtitle"
|
|
510
|
+
}, ht = {
|
|
511
|
+
key: 3,
|
|
512
|
+
class: "mwnf-books-tile__author"
|
|
513
|
+
}, gt = {
|
|
514
|
+
key: 4,
|
|
515
|
+
class: "mwnf-books-tile__formats"
|
|
516
|
+
}, _t = {
|
|
517
|
+
__name: "Tile",
|
|
518
|
+
props: {
|
|
519
|
+
tile: {
|
|
520
|
+
type: Object,
|
|
521
|
+
required: !0
|
|
522
|
+
},
|
|
523
|
+
variant: {
|
|
524
|
+
type: String,
|
|
525
|
+
default: "home"
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
setup(e) {
|
|
529
|
+
let r = e, { t: s } = I(), u = n(() => r.variant === "home" ? ae(55, r.tile.subtitle) : r.tile.subtitle);
|
|
530
|
+
return (n, r) => {
|
|
531
|
+
let d = _("RouterLink");
|
|
532
|
+
return f(), a("div", { class: l(["mwnf-books-tile", `mwnf-books-tile--${e.variant}`]) }, [c(d, {
|
|
533
|
+
class: "mwnf-books-tile__link",
|
|
534
|
+
to: e.tile.to
|
|
535
|
+
}, {
|
|
536
|
+
default: w(() => [
|
|
537
|
+
o("span", rt, v(y(s)("publications.card.hover")), 1),
|
|
538
|
+
o("span", it, [e.tile.cover ? (f(), a("span", at, [o("img", {
|
|
539
|
+
src: e.tile.cover,
|
|
540
|
+
alt: "",
|
|
541
|
+
loading: "lazy"
|
|
542
|
+
}, null, 8, ot)])) : (f(), a("span", st, v(y(s)("publications.card.imageComingSoon")), 1)), o("span", ct, [(f(!0), a(t, null, h(e.tile.languages.shown, (e) => (f(), a("span", {
|
|
543
|
+
key: e,
|
|
544
|
+
class: "mwnf-books-tile__language"
|
|
545
|
+
}, v(e.toUpperCase()), 1))), 128)), e.tile.languages.more ? (f(), a("span", lt, "+")) : i("", !0)])]),
|
|
546
|
+
o("span", ut, [
|
|
547
|
+
e.tile.country ? (f(), a("span", dt, v(e.tile.country), 1)) : i("", !0),
|
|
548
|
+
e.tile.project ? (f(), a("span", ft, v(e.tile.project), 1)) : i("", !0),
|
|
549
|
+
o("span", pt, v(e.tile.title), 1),
|
|
550
|
+
u.value ? (f(), a("span", mt, v(u.value), 1)) : i("", !0),
|
|
551
|
+
e.variant === "category" && e.tile.author ? (f(), a("span", ht, v(y(s)("publications.edition.authors")) + ": " + v(e.tile.author), 1)) : i("", !0),
|
|
552
|
+
e.tile.formats ? (f(), a("span", gt, v(e.tile.formats), 1)) : i("", !0)
|
|
553
|
+
])
|
|
554
|
+
]),
|
|
555
|
+
_: 1
|
|
556
|
+
}, 8, ["to"])], 2);
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
}, vt = { class: "mwnf-books-home" }, yt = { class: "mwnf-books-home__label" }, bt = { class: "mwnf-books-home__tiles" }, xt = {
|
|
560
|
+
__name: "Home",
|
|
561
|
+
setup(e) {
|
|
562
|
+
let { t: i } = I(), l = Z(), p = m(typeof window < "u" ? window.innerWidth : 1400), g = () => {
|
|
563
|
+
p.value = window.innerWidth;
|
|
564
|
+
};
|
|
565
|
+
d(() => window.addEventListener("resize", g)), u(() => window.removeEventListener("resize", g));
|
|
566
|
+
let b = n(() => l.categories.value.map((e) => ({
|
|
567
|
+
entry: e,
|
|
568
|
+
tiles: l.inCategory(e, ne).slice(0, Math.min(12, U(p.value))).map((e) => l.tile(e))
|
|
569
|
+
})).filter((e) => e.tiles.length));
|
|
570
|
+
return (e, n) => {
|
|
571
|
+
let l = _("RouterLink");
|
|
572
|
+
return f(), a("div", vt, [(f(!0), a(t, null, h(b.value, (e) => (f(), a("section", {
|
|
573
|
+
key: e.entry.slug,
|
|
574
|
+
class: "mwnf-books-home__band"
|
|
575
|
+
}, [
|
|
576
|
+
o("h2", yt, [s(v(y(i)(e.entry.label)) + " ", 1), c(l, {
|
|
577
|
+
class: "mwnf-books-home__see-all",
|
|
578
|
+
to: {
|
|
579
|
+
name: "category",
|
|
580
|
+
params: { category: e.entry.slug }
|
|
581
|
+
}
|
|
582
|
+
}, {
|
|
583
|
+
default: w(() => [s(v(y(i)("publications.home.seeAll")) + " ›", 1)]),
|
|
584
|
+
_: 1
|
|
585
|
+
}, 8, ["to"])]),
|
|
586
|
+
o("div", bt, [(f(!0), a(t, null, h(e.tiles, (e) => (f(), r(_t, {
|
|
587
|
+
key: e.id,
|
|
588
|
+
tile: e,
|
|
589
|
+
variant: "home"
|
|
590
|
+
}, null, 8, ["tile"]))), 128))]),
|
|
591
|
+
c(l, {
|
|
592
|
+
class: "mwnf-books-home__see-all-below",
|
|
593
|
+
to: {
|
|
594
|
+
name: "category",
|
|
595
|
+
params: { category: e.entry.slug }
|
|
596
|
+
}
|
|
597
|
+
}, {
|
|
598
|
+
default: w(() => [s(v(y(i)("publications.home.seeAll")) + " ›", 1)]),
|
|
599
|
+
_: 1
|
|
600
|
+
}, 8, ["to"])
|
|
601
|
+
]))), 128))]);
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
}, St = {
|
|
605
|
+
key: 0,
|
|
606
|
+
class: "mwnf-books-pages"
|
|
607
|
+
}, Ct = ["disabled"], wt = ["disabled"], Tt = { class: "mwnf-books-pages__numbers" }, Et = [
|
|
608
|
+
"disabled",
|
|
609
|
+
"aria-current",
|
|
610
|
+
"onClick"
|
|
611
|
+
], Dt = ["disabled"], Ot = ["disabled"], $ = {
|
|
612
|
+
__name: "Pagination",
|
|
613
|
+
props: { pageInfo: {
|
|
614
|
+
type: Object,
|
|
615
|
+
required: !0
|
|
616
|
+
} },
|
|
617
|
+
emits: ["navigate"],
|
|
618
|
+
setup(e, { emit: r }) {
|
|
619
|
+
let s = e, c = r, { t: l } = I(), u = n(() => s.pageInfo.currentPage), d = n(() => s.pageInfo.lastPage), p = n(() => Array.from({ length: d.value }, (e, t) => t + 1)), m = (e) => e < 1 || e > d.value || e === u.value;
|
|
620
|
+
function g(e) {
|
|
621
|
+
m(e) || c("navigate", e);
|
|
622
|
+
}
|
|
623
|
+
return (e, n) => d.value > 1 ? (f(), a("nav", St, [
|
|
624
|
+
o("button", {
|
|
625
|
+
type: "button",
|
|
626
|
+
class: "mwnf-books-pages__button",
|
|
627
|
+
disabled: m(1),
|
|
628
|
+
onClick: n[0] ||= (e) => g(1)
|
|
629
|
+
}, "<< " + v(y(l)("publications.pagination.first")), 9, Ct),
|
|
630
|
+
o("button", {
|
|
631
|
+
type: "button",
|
|
632
|
+
class: "mwnf-books-pages__button",
|
|
633
|
+
disabled: m(u.value - 1),
|
|
634
|
+
onClick: n[1] ||= (e) => g(u.value - 1)
|
|
635
|
+
}, "< " + v(y(l)("publications.pagination.previous")), 9, wt),
|
|
636
|
+
o("span", Tt, [(f(!0), a(t, null, h(p.value, (e) => (f(), a("button", {
|
|
637
|
+
key: e,
|
|
638
|
+
type: "button",
|
|
639
|
+
class: "mwnf-books-pages__button",
|
|
640
|
+
disabled: m(e),
|
|
641
|
+
"aria-current": e === u.value ? "page" : void 0,
|
|
642
|
+
onClick: (t) => g(e)
|
|
643
|
+
}, v(e), 9, Et))), 128))]),
|
|
644
|
+
o("button", {
|
|
645
|
+
type: "button",
|
|
646
|
+
class: "mwnf-books-pages__button",
|
|
647
|
+
disabled: m(u.value + 1),
|
|
648
|
+
onClick: n[2] ||= (e) => g(u.value + 1)
|
|
649
|
+
}, v(y(l)("publications.pagination.next")) + " >", 9, Dt),
|
|
650
|
+
o("button", {
|
|
651
|
+
type: "button",
|
|
652
|
+
class: "mwnf-books-pages__button",
|
|
653
|
+
disabled: m(d.value),
|
|
654
|
+
onClick: n[3] ||= (e) => g(d.value)
|
|
655
|
+
}, v(y(l)("publications.pagination.last")) + " >>", 9, Ot)
|
|
656
|
+
])) : i("", !0);
|
|
657
|
+
}
|
|
658
|
+
}, kt = { class: "mwnf-books-list mwnf-books-category" }, At = { class: "mwnf-books-list__title" }, jt = { class: "mwnf-books-list__tiles" }, Mt = {
|
|
659
|
+
key: 1,
|
|
660
|
+
class: "mwnf-books-list__empty"
|
|
661
|
+
}, Nt = {
|
|
662
|
+
__name: "Category",
|
|
663
|
+
props: { category: {
|
|
664
|
+
type: String,
|
|
665
|
+
required: !0
|
|
666
|
+
} },
|
|
667
|
+
setup(e) {
|
|
668
|
+
let i = e, { t: s } = I(), l = R(), u = z(), d = Z(), p = n(() => re(i.category, d.categories.value)), m = n(() => M(p.value ? d.inCategory(p.value, ne) : [], l.query.page ?? 1, 12)), g = n(() => m.value.rows.map((e) => d.tile(e)));
|
|
669
|
+
function _(e) {
|
|
670
|
+
u.push({ query: {
|
|
671
|
+
...l.query,
|
|
672
|
+
page: String(e)
|
|
673
|
+
} });
|
|
674
|
+
}
|
|
675
|
+
return (e, n) => (f(), a("div", kt, [p.value ? (f(), a(t, { key: 0 }, [
|
|
676
|
+
o("h1", At, v(y(s)(p.value.label)), 1),
|
|
677
|
+
c($, {
|
|
678
|
+
"page-info": m.value,
|
|
679
|
+
onNavigate: _
|
|
680
|
+
}, null, 8, ["page-info"]),
|
|
681
|
+
o("div", jt, [(f(!0), a(t, null, h(g.value, (e) => (f(), r(_t, {
|
|
682
|
+
key: e.id,
|
|
683
|
+
tile: e,
|
|
684
|
+
variant: "category"
|
|
685
|
+
}, null, 8, ["tile"]))), 128))]),
|
|
686
|
+
c($, {
|
|
687
|
+
"page-info": m.value,
|
|
688
|
+
onNavigate: _
|
|
689
|
+
}, null, 8, ["page-info"])
|
|
690
|
+
], 64)) : (f(), a("p", Mt, v(y(s)("core.notFound.page")), 1))]));
|
|
691
|
+
}
|
|
692
|
+
}, Pt = { class: "mwnf-books-list mwnf-books-results" }, Ft = { class: "mwnf-books-list__title" }, It = { key: 0 }, Lt = {
|
|
693
|
+
key: 0,
|
|
694
|
+
class: "mwnf-books-list__tiles"
|
|
695
|
+
}, Rt = {
|
|
696
|
+
key: 1,
|
|
697
|
+
class: "mwnf-books-list__empty"
|
|
698
|
+
}, zt = {
|
|
699
|
+
key: 2,
|
|
700
|
+
class: "mwnf-books-list__empty"
|
|
701
|
+
}, Bt = {
|
|
702
|
+
__name: "Results",
|
|
703
|
+
setup(e) {
|
|
704
|
+
let { t: s } = I(), l = R(), u = z(), d = n(() => Object.fromEntries(W.map((e) => [e, typeof l.query[e] == "string" ? l.query[e] : ""]))), { availableLanguages: p } = F(), m = Z({ languagesToLoad: () => p("publications") }), g = n(() => fe(d.value)), _ = (e) => (e.languages ?? []).map((t) => m.text(e, t)), b = n(() => pe(m.publications.value, d.value, {
|
|
705
|
+
editionById: m.editionById.value,
|
|
706
|
+
textsOf: _
|
|
707
|
+
})), x = n(() => M(b.value, l.query.page ?? 1, 12)), S = n(() => x.value.rows.map((e) => m.tile(e, d.value.language || null))), C = n(() => {
|
|
708
|
+
let e = d.value, t = (m.tags.value ?? []).find((t) => t.id === e.subject), n = G.find((t) => t.value === e.type);
|
|
709
|
+
return [
|
|
710
|
+
e.title,
|
|
711
|
+
e.author,
|
|
712
|
+
e.isbn,
|
|
713
|
+
e.language ? m.languageName(e.language, "en") : "",
|
|
714
|
+
e.country ? m.countryName(e.country) : "",
|
|
715
|
+
t ? t.description ?? t.internal_name : "",
|
|
716
|
+
n ? s(n.label) : "",
|
|
717
|
+
e.publisher
|
|
718
|
+
].filter(Boolean).join(", ");
|
|
719
|
+
});
|
|
720
|
+
function w(e) {
|
|
721
|
+
u.push({ query: {
|
|
722
|
+
...l.query,
|
|
723
|
+
page: String(e)
|
|
724
|
+
} });
|
|
725
|
+
}
|
|
726
|
+
return (e, n) => (f(), a("div", Pt, [
|
|
727
|
+
o("h1", Ft, [o("span", null, v(y(s)("publications.results.title")), 1), C.value ? (f(), a("span", It, v(` ${y(s)("publications.results.for")} "${C.value}"`), 1)) : i("", !0)]),
|
|
728
|
+
c($, {
|
|
729
|
+
"page-info": x.value,
|
|
730
|
+
onNavigate: w
|
|
731
|
+
}, null, 8, ["page-info"]),
|
|
732
|
+
S.value.length ? (f(), a("div", Lt, [(f(!0), a(t, null, h(S.value, (e) => (f(), r(_t, {
|
|
733
|
+
key: e.id,
|
|
734
|
+
tile: e,
|
|
735
|
+
variant: "results"
|
|
736
|
+
}, null, 8, ["tile"]))), 128))])) : g.value ? (f(), a("p", Rt, v(y(s)("publications.results.none")), 1)) : (f(), a("p", zt, v(y(s)("publications.results.reset")), 1)),
|
|
737
|
+
c($, {
|
|
738
|
+
"page-info": x.value,
|
|
739
|
+
onNavigate: w
|
|
740
|
+
}, null, 8, ["page-info"])
|
|
741
|
+
]));
|
|
742
|
+
}
|
|
743
|
+
}, Vt = { class: "mwnf-books-publication" }, Ht = {
|
|
744
|
+
key: 0,
|
|
745
|
+
class: "mwnf-books-list__empty"
|
|
746
|
+
}, Ut = { class: "mwnf-books-publication__header" }, Wt = {
|
|
747
|
+
key: 0,
|
|
748
|
+
class: "mwnf-books-publication__category"
|
|
749
|
+
}, Gt = { class: "mwnf-books-publication__language" }, Kt = { class: "mwnf-books-publication__versions" }, qt = ["aria-pressed", "onClick"], Jt = ["dir", "lang"], Yt = { class: "mwnf-books-edition__cover-column" }, Xt = {
|
|
750
|
+
key: 0,
|
|
751
|
+
class: "mwnf-books-edition__cover"
|
|
752
|
+
}, Zt = ["src"], Qt = {
|
|
753
|
+
key: 1,
|
|
754
|
+
class: "mwnf-books-edition__cover mwnf-books-edition__cover--none"
|
|
755
|
+
}, $t = { class: "mwnf-books-edition__cover-info" }, en = { key: 0 }, tn = {
|
|
756
|
+
key: 1,
|
|
757
|
+
class: "mwnf-books-edition__format"
|
|
758
|
+
}, nn = { key: 0 }, rn = {
|
|
759
|
+
key: 2,
|
|
760
|
+
class: "mwnf-books-edition__pdf"
|
|
761
|
+
}, an = ["href"], on = {
|
|
762
|
+
key: 3,
|
|
763
|
+
class: "mwnf-books-edition__pdf"
|
|
764
|
+
}, sn = ["href"], cn = { class: "mwnf-books-edition__information" }, ln = { class: "mwnf-books-edition__group" }, un = {
|
|
765
|
+
key: 0,
|
|
766
|
+
class: "mwnf-books-edition__country"
|
|
767
|
+
}, dn = {
|
|
768
|
+
key: 1,
|
|
769
|
+
class: "mwnf-books-edition__project"
|
|
770
|
+
}, fn = { class: "mwnf-books-edition__group" }, pn = {
|
|
771
|
+
key: 0,
|
|
772
|
+
class: "mwnf-books-edition__title"
|
|
773
|
+
}, mn = {
|
|
774
|
+
key: 1,
|
|
775
|
+
class: "mwnf-books-edition__subtitle"
|
|
776
|
+
}, hn = { class: "mwnf-books-edition__group" }, gn = { key: 0 }, _n = { key: 1 }, vn = { key: 2 }, yn = { key: 3 }, bn = { key: 4 }, xn = {
|
|
777
|
+
key: 5,
|
|
778
|
+
class: "mwnf-books-edition__plans"
|
|
779
|
+
}, Sn = { class: "mwnf-books-edition__group" }, Cn = {
|
|
780
|
+
key: 0,
|
|
781
|
+
class: "mwnf-books-edition__publisher"
|
|
782
|
+
}, wn = {
|
|
783
|
+
key: 1,
|
|
784
|
+
class: "mwnf-books-edition__isbn"
|
|
785
|
+
}, Tn = {
|
|
786
|
+
key: 0,
|
|
787
|
+
class: "mwnf-books-edition__about"
|
|
788
|
+
}, En = { class: "mwnf-books-edition__about-header" }, Dn = ["innerHTML"], On = {
|
|
789
|
+
key: 1,
|
|
790
|
+
class: "mwnf-books-edition__more-about"
|
|
791
|
+
}, kn = ["aria-expanded"], An = ["innerHTML"], jn = ["innerHTML"], Mn = ["dir", "lang"], Nn = { class: "mwnf-books-editions__information" }, Pn = {
|
|
792
|
+
key: 0,
|
|
793
|
+
class: "mwnf-books-editions__subtitle"
|
|
794
|
+
}, Fn = [
|
|
795
|
+
"aria-pressed",
|
|
796
|
+
"onClick",
|
|
797
|
+
"onKeydown"
|
|
798
|
+
], In = {
|
|
799
|
+
key: 0,
|
|
800
|
+
class: "mwnf-books-editions__image"
|
|
801
|
+
}, Ln = ["src"], Rn = { class: "mwnf-books-editions__group" }, zn = { key: 0 }, Bn = {
|
|
802
|
+
key: 1,
|
|
803
|
+
class: "mwnf-books-editions__format"
|
|
804
|
+
}, Vn = { key: 2 }, Hn = { key: 3 }, Un = { key: 4 }, Wn = { key: 5 }, Gn = { class: "mwnf-books-editions__group" }, Kn = {
|
|
805
|
+
key: 0,
|
|
806
|
+
class: "mwnf-books-edition__pdf"
|
|
807
|
+
}, qn = ["href"], Jn = {
|
|
808
|
+
key: 1,
|
|
809
|
+
class: "mwnf-books-edition__pdf"
|
|
810
|
+
}, Yn = ["href"], Xn = {
|
|
811
|
+
__name: "Publication",
|
|
812
|
+
props: {
|
|
813
|
+
id: {
|
|
814
|
+
type: String,
|
|
815
|
+
required: !0
|
|
816
|
+
},
|
|
817
|
+
language: {
|
|
818
|
+
type: String,
|
|
819
|
+
default: ""
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
setup(e) {
|
|
823
|
+
let r = e, { t: c, tIn: u } = I(), d = z(), p = D("editions"), g = n(() => D("publications").value.get(r.id) ?? null), _ = Z({ languagesToLoad: () => g.value ? q(g.value, p.value) : [] }), b = n(() => g.value ? q(g.value, _.editionById.value) : []), x = n(() => g.value ? se(g.value, _.editionById.value, r.language || null) : "en"), w = n(() => te(x.value) ? "rtl" : "ltr"), O = (e) => u(x.value, e), k = n(() => g.value ? K(g.value, _.editionById.value, x.value) : []), A = m(0);
|
|
824
|
+
C([() => r.id, x], () => {
|
|
825
|
+
A.value = 0;
|
|
826
|
+
});
|
|
827
|
+
let j = n(() => k.value[A.value] ?? k.value[0] ?? null), M = n(() => g.value ? _.text(g.value, x.value) : {}), P = n(() => k.value.map((e) => le(M.value, e))), F = n(() => P.value[A.value] ?? le(M.value, null)), L = n(() => J(j.value)), R = n(() => j.value?.cover?.url ?? (k.value.length ? null : g.value?.cover?.url ?? null)), B = n(() => {
|
|
828
|
+
let e = _.categories.value.find((e) => e.category && e.category === g.value?.category);
|
|
829
|
+
return e ? c(e.label) : "";
|
|
830
|
+
}), V = n(() => [j.value?.publish_year, O("publications.edition.languageVersion")].filter(Y).join(", ")), H = m(!1), U = (e) => Y(e) ? N(String(e), { breaks: !0 }) : "";
|
|
831
|
+
function W(e) {
|
|
832
|
+
e !== x.value && d.replace({
|
|
833
|
+
name: "publication",
|
|
834
|
+
params: {
|
|
835
|
+
id: r.id,
|
|
836
|
+
language: e
|
|
837
|
+
}
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
function G(e) {
|
|
841
|
+
if (A.value = e, H.value = !1, typeof window < "u" && typeof window.scrollTo == "function") try {
|
|
842
|
+
window.scrollTo({
|
|
843
|
+
top: 0,
|
|
844
|
+
behavior: "smooth"
|
|
845
|
+
});
|
|
846
|
+
} catch {}
|
|
847
|
+
}
|
|
848
|
+
return (e, n) => (f(), a("div", Vt, [g.value ? (f(), a(t, { key: 1 }, [
|
|
849
|
+
o("div", Ut, [B.value ? (f(), a("span", Wt, v(B.value) + ", ", 1)) : i("", !0), o("span", Gt, v(O("publications.edition.languageVersion")), 1)]),
|
|
850
|
+
o("div", Kt, [s(v(O("publications.publication.languages")) + ": ", 1), (f(!0), a(t, null, h(b.value, (e) => (f(), a("button", {
|
|
851
|
+
key: e,
|
|
852
|
+
type: "button",
|
|
853
|
+
class: l(["mwnf-books-publication__version", { "mwnf-books-publication__version--current": e === x.value }]),
|
|
854
|
+
"aria-pressed": e === x.value,
|
|
855
|
+
onClick: (t) => W(e)
|
|
856
|
+
}, v(y(_).languageName(e)), 11, qt))), 128))]),
|
|
857
|
+
o("div", {
|
|
858
|
+
class: "mwnf-books-edition",
|
|
859
|
+
dir: w.value,
|
|
860
|
+
lang: x.value
|
|
861
|
+
}, [o("div", Yt, [R.value ? (f(), a("div", Xt, [o("img", {
|
|
862
|
+
src: R.value,
|
|
863
|
+
alt: ""
|
|
864
|
+
}, null, 8, Zt)])) : (f(), a("div", Qt, v(y(c)("publications.card.imageComingSoon")), 1)), o("div", $t, [
|
|
865
|
+
V.value ? (f(), a("div", en, v(V.value), 1)) : i("", !0),
|
|
866
|
+
y(Y)(j.value?.binding) ? (f(), a("div", tn, [s(v(j.value.binding), 1), y(Y)(j.value.dimensions) ? (f(), a("span", nn, " (" + v(j.value.dimensions) + ")", 1)) : i("", !0)])) : i("", !0),
|
|
867
|
+
L.value.sample ? (f(), a("div", rn, [o("a", {
|
|
868
|
+
href: L.value.sample,
|
|
869
|
+
target: "_blank",
|
|
870
|
+
rel: "noopener"
|
|
871
|
+
}, v(O("publications.edition.lookInside")), 9, an)])) : i("", !0),
|
|
872
|
+
L.value.credits ? (f(), a("div", on, [o("a", {
|
|
873
|
+
href: L.value.credits,
|
|
874
|
+
target: "_blank",
|
|
875
|
+
rel: "noopener"
|
|
876
|
+
}, v(O("publications.edition.credits")), 9, sn)])) : i("", !0)
|
|
877
|
+
])]), o("div", cn, [
|
|
878
|
+
o("div", ln, [y(_).countryName(g.value.country_id) ? (f(), a("div", un, v(y(_).countryName(g.value.country_id)), 1)) : i("", !0), y(_).projectName(g.value.project_id) ? (f(), a("div", dn, v(y(_).projectName(g.value.project_id)), 1)) : i("", !0)]),
|
|
879
|
+
o("div", fn, [y(Y)(F.value.title) ? (f(), a("div", pn, v(String(F.value.title).toUpperCase()), 1)) : i("", !0), y(Y)(F.value.subtitle) ? (f(), a("div", mn, v(F.value.subtitle), 1)) : i("", !0)]),
|
|
880
|
+
o("div", hn, [
|
|
881
|
+
y(Y)(F.value.authors) ? (f(), a("div", gn, v(O("publications.edition.authors")) + ": " + v(F.value.authors), 1)) : i("", !0),
|
|
882
|
+
y(Y)(F.value.photographers) ? (f(), a("div", _n, v(O("publications.edition.photographers")) + ": " + v(F.value.photographers), 1)) : i("", !0),
|
|
883
|
+
y(Y)(F.value.editors) ? (f(), a("div", vn, v(O("publications.edition.editors")) + ": " + v(F.value.editors), 1)) : i("", !0),
|
|
884
|
+
y(Y)(j.value?.page_count) ? (f(), a("div", yn, v(O("publications.edition.pages")) + ": " + v(j.value.page_count), 1)) : i("", !0),
|
|
885
|
+
y(Y)(j.value?.image_count) ? (f(), a("div", bn, v(O("publications.edition.images")) + ": " + v(j.value.image_count), 1)) : i("", !0),
|
|
886
|
+
y(Y)(j.value?.plan_count) ? (f(), a("div", xn, v(O("publications.edition.plans")) + ": " + v(j.value.plan_count), 1)) : i("", !0)
|
|
887
|
+
]),
|
|
888
|
+
o("div", Sn, [y(Y)(j.value?.publisher) ? (f(), a("div", Cn, v(O("publications.edition.publishers")) + ": " + v(j.value.publisher), 1)) : i("", !0), y(Y)(j.value?.isbn) ? (f(), a("div", wn, v(O("publications.edition.isbn")) + ": " + v(j.value.isbn), 1)) : i("", !0)]),
|
|
889
|
+
y(Y)(F.value.about) ? (f(), a("div", Tn, [o("div", En, v(O("publications.edition.about")), 1), o("div", {
|
|
890
|
+
class: "mwnf-books-edition__prose",
|
|
891
|
+
innerHTML: U(F.value.about)
|
|
892
|
+
}, null, 8, Dn)])) : i("", !0),
|
|
893
|
+
y(Y)(F.value.moreAbout) ? (f(), a("div", On, [o("button", {
|
|
894
|
+
type: "button",
|
|
895
|
+
class: "mwnf-books-edition__more-about-header",
|
|
896
|
+
"aria-expanded": H.value,
|
|
897
|
+
onClick: n[0] ||= (e) => H.value = !H.value
|
|
898
|
+
}, v(O("publications.edition.moreAbout")), 9, kn), T(o("div", {
|
|
899
|
+
class: "mwnf-books-edition__prose",
|
|
900
|
+
innerHTML: U(F.value.moreAbout)
|
|
901
|
+
}, null, 8, An), [[S, H.value]])])) : i("", !0),
|
|
902
|
+
y(Y)(F.value.note) ? (f(), a("div", {
|
|
903
|
+
key: 2,
|
|
904
|
+
class: "mwnf-books-edition__note mwnf-books-edition__prose",
|
|
905
|
+
innerHTML: U(F.value.note)
|
|
906
|
+
}, null, 8, jn)) : i("", !0)
|
|
907
|
+
])], 8, Jt),
|
|
908
|
+
k.value.length > 1 ? (f(), a("div", {
|
|
909
|
+
key: 0,
|
|
910
|
+
class: "mwnf-books-editions",
|
|
911
|
+
dir: w.value,
|
|
912
|
+
lang: x.value
|
|
913
|
+
}, [o("div", Nn, [
|
|
914
|
+
s(v(O("publications.edition.editionsOf")) + " ", 1),
|
|
915
|
+
o("span", null, v(F.value.title) + ". ", 1),
|
|
916
|
+
y(Y)(F.value.subtitle) ? (f(), a("span", Pn, v(F.value.subtitle) + ", ", 1)) : i("", !0),
|
|
917
|
+
s(v(O("publications.edition.languageVersion")), 1)
|
|
918
|
+
]), o("div", { class: l(["mwnf-books-editions__list", { "mwnf-books-editions__list--scroll": k.value.length > 4 }]) }, [(f(!0), a(t, null, h(k.value, (e, t) => (f(), a("div", {
|
|
919
|
+
key: e.id,
|
|
920
|
+
class: l(["mwnf-books-editions__item", { "mwnf-books-editions__item--current": t === A.value }]),
|
|
921
|
+
role: "button",
|
|
922
|
+
tabindex: "0",
|
|
923
|
+
"aria-pressed": t === A.value,
|
|
924
|
+
onClick: (e) => G(t),
|
|
925
|
+
onKeydown: ee(E((e) => G(t), ["prevent"]), ["enter"])
|
|
926
|
+
}, [
|
|
927
|
+
e.cover ? (f(), a("div", In, [o("img", {
|
|
928
|
+
src: e.cover.url,
|
|
929
|
+
alt: "",
|
|
930
|
+
loading: "lazy"
|
|
931
|
+
}, null, 8, Ln)])) : i("", !0),
|
|
932
|
+
o("div", Rn, [
|
|
933
|
+
y(Y)(e.publisher) ? (f(), a("div", zn, v(O("publications.edition.publishers")) + ": " + v(e.publisher), 1)) : i("", !0),
|
|
934
|
+
y(Y)(e.binding) ? (f(), a("div", Bn, v(e.binding), 1)) : i("", !0),
|
|
935
|
+
y(Y)(e.dimensions) ? (f(), a("div", Vn, v(e.dimensions), 1)) : i("", !0),
|
|
936
|
+
y(Y)(e.isbn) ? (f(), a("div", Hn, v(e.isbn), 1)) : i("", !0),
|
|
937
|
+
y(Y)(e.publish_year) ? (f(), a("div", Un, v(e.publish_year), 1)) : i("", !0),
|
|
938
|
+
y(Y)(e.edition) ? (f(), a("div", Wn, v(O("publications.edition.edition")) + ": " + v(e.edition), 1)) : i("", !0)
|
|
939
|
+
]),
|
|
940
|
+
o("div", Gn, [y(J)(e).sample ? (f(), a("div", Kn, [o("a", {
|
|
941
|
+
href: y(J)(e).sample,
|
|
942
|
+
target: "_blank",
|
|
943
|
+
rel: "noopener",
|
|
944
|
+
onClick: n[1] ||= E(() => {}, ["stop"])
|
|
945
|
+
}, v(O("publications.edition.lookInside")), 9, qn)])) : i("", !0), y(J)(e).credits ? (f(), a("div", Jn, [o("a", {
|
|
946
|
+
href: y(J)(e).credits,
|
|
947
|
+
target: "_blank",
|
|
948
|
+
rel: "noopener",
|
|
949
|
+
onClick: n[2] ||= E(() => {}, ["stop"])
|
|
950
|
+
}, v(O("publications.edition.credits")), 9, Yn)])) : i("", !0)])
|
|
951
|
+
], 42, Fn))), 128))], 2)], 8, Mn)) : i("", !0)
|
|
952
|
+
], 64)) : (f(), a("p", Ht, v(y(c)("core.detail.notFound")), 1))]));
|
|
953
|
+
}
|
|
954
|
+
};
|
|
955
|
+
// src/publications/routes.js
|
|
956
|
+
function Zn(e = P()) {
|
|
957
|
+
return [
|
|
958
|
+
{
|
|
959
|
+
path: "/",
|
|
960
|
+
name: "home",
|
|
961
|
+
component: xt,
|
|
962
|
+
meta: e("home", ...B)
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
path: "/category/:category",
|
|
966
|
+
name: "category",
|
|
967
|
+
component: Nt,
|
|
968
|
+
props: (e) => ({ category: String(e.params.category) }),
|
|
969
|
+
meta: e("category", ...B)
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
path: "/results",
|
|
973
|
+
name: "results",
|
|
974
|
+
component: Bt,
|
|
975
|
+
meta: e("results", ...B)
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
path: "/publication/:id/:language?",
|
|
979
|
+
name: "publication",
|
|
980
|
+
component: Xn,
|
|
981
|
+
props: (e) => ({
|
|
982
|
+
id: String(e.params.id),
|
|
983
|
+
language: String(e.params.language ?? "")
|
|
984
|
+
}),
|
|
985
|
+
meta: e("publication", ...B)
|
|
986
|
+
}
|
|
987
|
+
];
|
|
988
|
+
}
|
|
989
|
+
function Qn({ datasetPackage: e, origin: t, siteName: n, chrome: r = {}, publications: i = {} }) {
|
|
990
|
+
let { manifest: a } = F(), o = j({
|
|
991
|
+
declared: ["en"],
|
|
992
|
+
entity: "publications"
|
|
993
|
+
});
|
|
994
|
+
return {
|
|
995
|
+
datasetPackage: e,
|
|
996
|
+
siteName: a.site?.names?.en ?? n ?? e,
|
|
997
|
+
site: { origin: t },
|
|
998
|
+
features: { entities: [] },
|
|
999
|
+
languages: o,
|
|
1000
|
+
chrome: r,
|
|
1001
|
+
publications: i,
|
|
1002
|
+
shell: nt,
|
|
1003
|
+
navigation: { languages: k(o) },
|
|
1004
|
+
views: { home: xt },
|
|
1005
|
+
extraViews: Zn(P()),
|
|
1006
|
+
legacyRoutes: []
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
export { G as FORMATS, V as PAGE_SIZE, be as PUBLICATIONS_FOOTER, H as PUBLICATION_CATEGORIES, B as PUBLICATION_ENTITIES, Xn as PublicationPage, _t as PublicationTile, Nt as PublicationsCategory, xt as PublicationsHome, $ as PublicationsPagination, Bt as PublicationsResults, nt as PublicationsShell, W as SEARCH_KEYS, q as availableLanguages, ye as categoriesOf, re as categoryBySlug, se as displayLanguage, J as documentsOf, le as editionText, K as editionsOf, ce as formatsOf, fe as hasSearch, U as homeLimit, ne as inCategory, ie as limitLanguages, Y as present, Qn as publicationsConfig, Zn as publicationsRoutes, pe as searchPublications, ue as themeKey, ae as truncate, Z as usePublications };
|