@museumwnf/viewer-layout 3.72.1 → 3.74.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.
@@ -0,0 +1,735 @@
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, normalizeClass as c, openBlock as l, ref as u, renderList as d, renderSlot as f, resolveComponent as p, toDisplayString as m, unref as h, watch as g, withCtx as _, withModifiers as v } from "vue";
2
+ import { byId as y, entityRef as b, languageLabels as x, mwnfLinks as S, offeredLanguages as C, renderBlock as w, sectionMeta as T, useDataPackage as E, useI18n as D, useSiteConfig as O } from "@museumwnf/viewer-core";
3
+ import { useRoute as k, useRouter as A } from "vue-router";
4
+ // src/travels/rules.js
5
+ var j = [
6
+ "collections",
7
+ "items",
8
+ "countries",
9
+ "languages"
10
+ ], M = "exhibition trail", N = "itinerary", P = "location", F = Object.freeze(["GPA"]), I = Object.freeze([
11
+ "desc",
12
+ "its",
13
+ "cur"
14
+ ]), ee = Object.freeze(["des", "vl"]);
15
+ function L(e) {
16
+ return String(e?.backward_compatibility ?? "").split(":").slice(2);
17
+ }
18
+ function R(e) {
19
+ return L(e)[0] ?? "";
20
+ }
21
+ function z(e) {
22
+ let t = L(e);
23
+ return t[t.length - 1] ?? "";
24
+ }
25
+ function B(e, t = F) {
26
+ return !t.includes(R(e));
27
+ }
28
+ function V(e, t, n = null) {
29
+ return (e ?? []).filter((e) => e.parent_id === t && (!n || e.type === n));
30
+ }
31
+ function H(e) {
32
+ return (e ?? []).filter((e) => e.type === M);
33
+ }
34
+ function U(e, t) {
35
+ return V(e, t?.id, N).flatMap((t) => V(e, t.id, P));
36
+ }
37
+ function W(e, t, n) {
38
+ for (let r of U(e, t)) for (let e of r.items ?? []) {
39
+ let t = n.get(e.id)?.project_id;
40
+ if (t) return t;
41
+ }
42
+ return null;
43
+ }
44
+ function G(e) {
45
+ return [...new Set((e ?? []).map((e) => String(e ?? "").trim()).filter(Boolean))].sort((e, t) => e.localeCompare(t));
46
+ }
47
+ function K(e, t) {
48
+ let n = (e ?? []).findIndex((e) => e.id === t);
49
+ return n < 0 ? {
50
+ previous: null,
51
+ next: null
52
+ } : {
53
+ previous: e[n - 1] ?? null,
54
+ next: e[n + 1] ?? null
55
+ };
56
+ }
57
+ function q(e, t, n, r = (e) => e?.captions?.en ?? e?.alt_text ?? "") {
58
+ let i = [], a = (e, t) => (e.display_order ?? 0) - (t.display_order ?? 0), o = (e) => {
59
+ for (let t of [...e ?? []].sort(a)) i.push({
60
+ url: t.url,
61
+ caption: r(t) ?? ""
62
+ });
63
+ };
64
+ for (let r of V(e, t?.id, P)) {
65
+ o(r.images);
66
+ for (let e of r.items ?? []) o(n.get(e.id)?.images);
67
+ }
68
+ return o(t?.images), i.filter((e) => e.url);
69
+ }
70
+ function J(e, t, n) {
71
+ return q(e, t, n)[0]?.url ?? null;
72
+ }
73
+ function te(e, t) {
74
+ let n = e?.publications?.[0];
75
+ return n?.url ? t ? `${n.url}/${encodeURIComponent(t)}` : n.url : null;
76
+ }
77
+ function Y(e) {
78
+ return String(e ?? "").split(/\s*\n\s*/).map((e) => e.trim()).filter(Boolean);
79
+ }
80
+ // src/travels/data.js
81
+ var ne = b("collections"), re = b("languages"), ie = ["collections", "countries"];
82
+ function X({ languagesToLoad: e = () => [] } = {}) {
83
+ let n = E(), r = O(), { locale: i } = D(), a = y("collections"), o = y("items");
84
+ g(() => [.../* @__PURE__ */ new Set([
85
+ "en",
86
+ i.value,
87
+ ...e()
88
+ ])], (e) => Promise.all(e.flatMap((e) => ie.map((t) => n.loadTranslations(t, e)))), { immediate: !0 });
89
+ let s = t(() => ne.value ?? []), c = t(() => r.travels?.hiddenProjects ?? F), l = t(() => H(s.value)), u = t(() => l.value.filter((e) => B(e, c.value))), d = (e, t = i.value) => n.translations("collections", t)[e?.id] ?? {}, f = (e, t) => d(e, t).extra ?? {};
90
+ function p(e) {
91
+ return e ? n.translations("countries", i.value)[e]?.name ?? n.translations("countries", "en")[e]?.name ?? "" : "";
92
+ }
93
+ function m(e) {
94
+ let t = n.manifest.projects?.[e]?.name;
95
+ return t?.[i.value] ?? t?.en ?? "";
96
+ }
97
+ function h(e) {
98
+ let t = (re.value ?? []).find((t) => t.code === e);
99
+ return t?.names?.[e] ?? t?.names?.en ?? String(e ?? "").toUpperCase();
100
+ }
101
+ let _ = (e) => V(s.value, e?.id, N), v = (e) => V(s.value, e?.id, P), b = (e) => W(s.value, e, o.value);
102
+ return {
103
+ pkg: n,
104
+ config: r,
105
+ locale: i,
106
+ collections: s,
107
+ collectionById: a,
108
+ itemById: o,
109
+ trails: l,
110
+ listed: u,
111
+ projects: t(() => {
112
+ let e = /* @__PURE__ */ new Map();
113
+ for (let t of u.value) {
114
+ let n = R(t);
115
+ n && !e.has(n) && e.set(n, {
116
+ code: n,
117
+ id: b(t)
118
+ });
119
+ }
120
+ return [...e.values()];
121
+ }),
122
+ text: d,
123
+ extra: f,
124
+ countryName: p,
125
+ projectName: m,
126
+ languageName: h,
127
+ itineraries: _,
128
+ locations: v,
129
+ trailProject: b,
130
+ textLanguages: (e, t) => t.filter((t) => !!n.translations("collections", t)[e?.id])
131
+ };
132
+ }
133
+ // src/travels/Shell.vue
134
+ var ae = { class: "mwnf-travels" }, oe = { class: "mwnf-travels-header" }, se = ["aria-label"], ce = { class: "mwnf-travels-menu__list" }, le = { class: "mwnf-travels-menu__entry" }, ue = { class: "mwnf-travels-menu__children" }, de = { class: "mwnf-travels-menu__entry" }, fe = ["href"], pe = { class: "mwnf-travels-menu__entry" }, me = ["href", "title"], he = ["value", "aria-label"], ge = ["value"], _e = { class: "mwnf-travels-main" }, ve = { class: "mwnf-travels-footer" }, ye = ["href"], be = {
135
+ __name: "Shell",
136
+ props: {
137
+ languages: {
138
+ type: Array,
139
+ default: () => []
140
+ },
141
+ language: {
142
+ type: String,
143
+ required: !0
144
+ }
145
+ },
146
+ emits: ["update:language"],
147
+ setup(n, { emit: c }) {
148
+ let u = n, g = c, { t: v } = D(), y = O(), b = X(), x = t(() => y.travels?.portal ?? S.portal), C = t(() => {
149
+ if (y.travels?.books) return y.travels.books;
150
+ let e = b.trails.value.find((e) => e.publications?.[0]?.url)?.publications[0].url;
151
+ return e ? e.slice(0, e.indexOf("#")) || e : "https://books.museumwnf.org";
152
+ }), w = t(() => [...new Set(b.listed.value.map((e) => e.country_id).filter(Boolean))].map((e) => ({
153
+ id: e,
154
+ name: b.countryName(e)
155
+ })).sort((e, t) => e.name.localeCompare(t.name))), T = (/* @__PURE__ */ new Date()).getFullYear(), E = [
156
+ {
157
+ label: "core.footer.aboutMwnf",
158
+ href: S.about
159
+ },
160
+ {
161
+ label: "core.footer.contact",
162
+ href: S.contact
163
+ },
164
+ {
165
+ label: "core.footer.legalNotice",
166
+ href: S.legalNotice
167
+ },
168
+ {
169
+ label: "core.footer.credits",
170
+ href: S.credits
171
+ },
172
+ {
173
+ label: "core.footer.cookies",
174
+ href: S.cookies
175
+ }
176
+ ], k = t(() => u.languages.length > 1);
177
+ return (t, c) => {
178
+ let u = p("RouterLink");
179
+ return l(), i("div", ae, [
180
+ a("header", oe, [s(u, {
181
+ class: "mwnf-travels-header__title",
182
+ to: { name: "home" },
183
+ title: h(v)("travels.header.homeTip")
184
+ }, {
185
+ default: _(() => [o(m(h(v)("travels.header.title")), 1)]),
186
+ _: 1
187
+ }, 8, ["title"]), a("nav", {
188
+ class: "mwnf-travels-menu",
189
+ "aria-label": h(v)("layout.nav.label")
190
+ }, [a("ul", ce, [
191
+ a("li", le, [s(u, { to: { name: "home" } }, {
192
+ default: _(() => [o(m(h(v)("travels.nav.exhibitionTrails")), 1)]),
193
+ _: 1
194
+ }), a("ul", ue, [(l(!0), i(e, null, d(h(b).projects.value, (e) => (l(), i("li", { key: e.code }, [s(u, { to: {
195
+ name: "trails",
196
+ query: { project: e.code }
197
+ } }, {
198
+ default: _(() => [o(m(h(b).projectName(e.id) || e.code), 1)]),
199
+ _: 2
200
+ }, 1032, ["to"])]))), 128)), (l(!0), i(e, null, d(w.value, (e) => (l(), i("li", { key: e.id }, [s(u, { to: {
201
+ name: "trails",
202
+ query: { country: e.id }
203
+ } }, {
204
+ default: _(() => [o(m(e.name), 1)]),
205
+ _: 2
206
+ }, 1032, ["to"])]))), 128))])]),
207
+ a("li", de, [a("a", { href: C.value }, m(h(v)("travels.header.books")), 9, fe)]),
208
+ a("li", pe, [a("a", {
209
+ href: x.value,
210
+ title: h(v)("travels.header.portalTip")
211
+ }, m(h(v)("travels.header.portal")), 9, me)])
212
+ ]), k.value ? (l(), i("select", {
213
+ key: 0,
214
+ class: "mwnf-travels-menu__language",
215
+ value: n.language,
216
+ "aria-label": h(v)("layout.language.label"),
217
+ onChange: c[0] ||= (e) => g("update:language", e.target.value)
218
+ }, [(l(!0), i(e, null, d(n.languages, (e) => (l(), i("option", {
219
+ key: e.code,
220
+ value: e.code
221
+ }, m(e.label), 9, ge))), 128))], 40, he)) : r("", !0)], 8, se)]),
222
+ a("main", _e, [f(t.$slots, "default")]),
223
+ a("footer", ve, [(l(), i(e, null, d(E, (t) => (l(), i(e, { key: t.label }, [a("a", { href: t.href }, m(h(v)(t.label)), 9, ye), c[1] ||= o("\xA0|\xA0 ", -1)], 64))), 64)), o(m(h(v)("core.footer.copyright")) + " 2004–" + m(h(T)), 1)])
224
+ ]);
225
+ };
226
+ }
227
+ }, xe = { class: "mwnf-travels-crumbs" }, Se = { key: 2 }, Z = {
228
+ __name: "Crumbs",
229
+ props: { crumbs: {
230
+ type: Array,
231
+ required: !0
232
+ } },
233
+ setup(t) {
234
+ return (a, s) => {
235
+ let c = p("RouterLink");
236
+ return l(), i("nav", xe, [(l(!0), i(e, null, d(t.crumbs, (a, s) => (l(), i(e, { key: s }, [s > 0 ? (l(), i(e, { key: 0 }, [o("\xA0>\xA0")], 64)) : r("", !0), a.to && s < t.crumbs.length - 1 ? (l(), n(c, {
237
+ key: 1,
238
+ class: "mwnf-travels-crumbs__link",
239
+ to: a.to
240
+ }, {
241
+ default: _(() => [o(m(a.text), 1)]),
242
+ _: 2
243
+ }, 1032, ["to"])) : (l(), i("span", Se, m(a.text), 1))], 64))), 128))]);
244
+ };
245
+ }
246
+ }, Ce = { class: "mwnf-travels-home" }, we = { class: "mwnf-travels-home__banner" }, Te = { class: "mwnf-travels-home__heading" }, Ee = { class: "mwnf-travels-home__about" }, De = { class: "mwnf-travels-home__about-heading" }, Oe = { class: "mwnf-travels-home__selects" }, ke = { class: "mwnf-travels-home__select" }, Ae = { value: "" }, je = ["value"], Me = { class: "mwnf-travels-home__select" }, Ne = { value: "" }, Pe = ["value"], Q = {
247
+ __name: "Home",
248
+ setup(n) {
249
+ let { t: r } = D(), o = A(), c = X(), u = t(() => [...new Set(c.listed.value.map((e) => e.country_id).filter(Boolean))].map((e) => ({
250
+ id: e,
251
+ name: c.countryName(e)
252
+ })).sort((e, t) => e.name.localeCompare(t.name)));
253
+ function f(e, t) {
254
+ t && o.push({
255
+ name: "trails",
256
+ query: { [e]: t }
257
+ });
258
+ }
259
+ return (t, n) => (l(), i("div", Ce, [
260
+ a("div", we, [a("h1", Te, m(h(r)("travels.nav.exhibitionTrails")), 1), s(Z, { crumbs: [{
261
+ text: h(r)("travels.nav.home"),
262
+ to: { name: "home" }
263
+ }, { text: h(r)("travels.nav.exhibitionTrails") }] }, null, 8, ["crumbs"])]),
264
+ a("div", Ee, [a("p", De, m(h(r)("travels.home.about")), 1), a("p", null, m(h(r)("travels.home.intro")), 1)]),
265
+ a("div", Oe, [a("label", ke, [a("span", null, m(h(r)("travels.home.country")), 1), a("select", { onChange: n[0] ||= (e) => f("country", e.target.value) }, [a("option", Ae, m(h(r)("travels.home.selectCountry")), 1), (l(!0), i(e, null, d(u.value, (e) => (l(), i("option", {
266
+ key: e.id,
267
+ value: e.id
268
+ }, m(e.name), 9, je))), 128))], 32)]), a("label", Me, [a("span", null, m(h(r)("travels.home.theme")), 1), a("select", { onChange: n[1] ||= (e) => f("project", e.target.value) }, [a("option", Ne, m(h(r)("travels.home.selectTheme")), 1), (l(!0), i(e, null, d(h(c).projects.value, (e) => (l(), i("option", {
269
+ key: e.code,
270
+ value: e.code
271
+ }, m(h(c).projectName(e.id) || e.code), 9, Pe))), 128))], 32)])])
272
+ ]));
273
+ }
274
+ }, Fe = { class: "mwnf-travels-trails" }, Ie = { class: "mwnf-travels-banner" }, Le = { class: "mwnf-travels-banner__heading" }, Re = { class: "mwnf-travels-banner__about" }, ze = { class: "mwnf-travels-banner__about-heading" }, Be = { key: 0 }, Ve = { key: 1 }, He = { class: "mwnf-travels-trails__cover" }, Ue = ["src"], We = { class: "mwnf-travels-trails__text" }, Ge = {
275
+ key: 0,
276
+ class: "mwnf-travels-trails__title"
277
+ }, Ke = { key: 0 }, qe = { key: 1 }, Je = { key: 2 }, Ye = { key: 3 }, Xe = { key: 4 }, Ze = {
278
+ key: 5,
279
+ class: "mwnf-travels-trails__visit"
280
+ }, Qe = {
281
+ __name: "Trails",
282
+ setup(n) {
283
+ let { t: c } = D(), u = k(), f = O(), g = () => f.languages ?? [], v = X({ languagesToLoad: g }), y = t(() => typeof u.query.country == "string" ? u.query.country : ""), b = t(() => typeof u.query.project == "string" ? u.query.project : ""), x = t(() => v.projects.value.find((e) => e.code === b.value) ?? null), S = t(() => y.value ? v.countryName(y.value) : x.value ? v.projectName(x.value.id) || x.value.code : ""), C = t(() => v.listed.value.filter((e) => y.value ? e.country_id === y.value : R(e) === b.value).map((e) => {
284
+ let t = v.text(e), n = e.publications?.[0];
285
+ return {
286
+ id: e.id,
287
+ cover: e.images?.[0]?.url ?? null,
288
+ title: t.title ?? "",
289
+ subtitle: t.extra?.subtitle ?? "",
290
+ country: v.countryName(e.country_id),
291
+ region: t.extra?.region_territory ?? "",
292
+ available: Object.keys(n?.titles ?? {}).map((e) => v.languageName(e)).sort((e, t) => e.localeCompare(t)),
293
+ locations: G(U(v.collections.value, e).map((e) => v.text(e).title)),
294
+ visits: v.textLanguages(e, g()).map((e) => ({
295
+ code: e,
296
+ label: v.languageName(e)
297
+ })).sort((e, t) => e.label.localeCompare(t.label))
298
+ };
299
+ }));
300
+ return (t, n) => {
301
+ let u = p("RouterLink");
302
+ return l(), i("div", Fe, [a("div", Ie, [
303
+ a("h1", Le, m(S.value), 1),
304
+ s(Z, { crumbs: [
305
+ {
306
+ text: h(c)("travels.nav.home"),
307
+ to: { name: "home" }
308
+ },
309
+ {
310
+ text: h(c)("travels.nav.exhibitionTrails"),
311
+ to: { name: "home" }
312
+ },
313
+ { text: S.value }
314
+ ] }, null, 8, ["crumbs"]),
315
+ a("div", Re, [a("p", ze, m(h(c)("travels.home.about")), 1), y.value ? (l(), i("p", Be, m(h(c)("travels.list.countryIntro")) + " " + m(S.value) + ".", 1)) : (l(), i("p", Ve, m(h(c)("travels.list.themeIntro")), 1))])
316
+ ]), (l(!0), i(e, null, d(C.value, (t) => (l(), i("div", {
317
+ key: t.id,
318
+ class: "mwnf-travels-trails__row"
319
+ }, [a("div", He, [t.cover ? (l(), i("img", {
320
+ key: 0,
321
+ src: t.cover,
322
+ alt: "",
323
+ loading: "lazy"
324
+ }, null, 8, Ue)) : r("", !0)]), a("div", We, [
325
+ t.title ? (l(), i("h2", Ge, m(t.title), 1)) : r("", !0),
326
+ a("p", null, [t.subtitle ? (l(), i("strong", Ke, m(t.subtitle), 1)) : r("", !0)]),
327
+ !y.value && t.country ? (l(), i("p", qe, [a("b", null, m(h(c)("travels.trail.country")) + ":", 1), o("\xA0\xA0" + m(t.country), 1)])) : r("", !0),
328
+ t.region ? (l(), i("p", Je, [a("b", null, m(h(c)("travels.trail.region")) + ":", 1), o("\xA0" + m(t.region), 1)])) : r("", !0),
329
+ t.available.length ? (l(), i("p", Ye, [a("b", null, m(h(c)("travels.trail.availableIn")) + ":", 1), o("\xA0\xA0" + m(t.available.join(", ")), 1)])) : r("", !0),
330
+ t.locations.length ? (l(), i("p", Xe, [a("b", null, m(h(c)("travels.trail.mainLocations")) + ":", 1), o("\xA0" + m(t.locations.join(", ")), 1)])) : r("", !0),
331
+ t.visits.length ? (l(), i("p", Ze, [
332
+ a("b", null, m(h(c)("travels.trail.virtualVisit")) + ":", 1),
333
+ n[1] ||= o("\xA0 ", -1),
334
+ (l(!0), i(e, null, d(t.visits, (r) => (l(), i(e, { key: r.code }, [s(u, { to: {
335
+ name: "trail",
336
+ params: { id: t.id },
337
+ query: { lang: r.code }
338
+ } }, {
339
+ default: _(() => [o(m(r.label) + "\xA0>>", 1)]),
340
+ _: 2
341
+ }, 1032, ["to"]), n[0] ||= o("\xA0\xA0 ", -1)], 64))), 128))
342
+ ])) : r("", !0)
343
+ ])]))), 128))]);
344
+ };
345
+ }
346
+ }, $e = { class: "mwnf-travels-detail-band" }, et = { class: "mwnf-travels-detail-band__texts" }, tt = {
347
+ key: 0,
348
+ class: "mwnf-travels-detail-band__line"
349
+ }, nt = {
350
+ key: 1,
351
+ class: "mwnf-travels-detail-band__line"
352
+ }, rt = {
353
+ key: 2,
354
+ class: "mwnf-travels-detail-band__line"
355
+ }, it = {
356
+ key: 3,
357
+ class: "mwnf-travels-detail-band__line mwnf-travels-detail-band__itinerary"
358
+ }, at = { class: "mwnf-travels-detail-band__book" }, ot = ["href"], st = ["src"], ct = ["src"], lt = { class: "mwnf-travels-detail-band__book-label" }, ut = { class: "mwnf-travels-see-also" }, dt = { class: "mwnf-travels-see-also__heading" }, ft = { class: "mwnf-travels-see-also__tabs" }, $ = {
359
+ __name: "TrailHeader",
360
+ props: {
361
+ trail: {
362
+ type: Object,
363
+ required: !0
364
+ },
365
+ text: {
366
+ type: Object,
367
+ default: () => ({})
368
+ },
369
+ itinerary: {
370
+ type: Object,
371
+ default: null
372
+ },
373
+ tabs: {
374
+ type: Array,
375
+ default: () => []
376
+ }
377
+ },
378
+ setup(n) {
379
+ let u = n, { t: f, locale: g } = D(), v = t(() => te(u.trail, g.value)), y = t(() => u.trail.images?.[0]?.url ?? null);
380
+ return (t, u) => {
381
+ let g = p("RouterLink");
382
+ return l(), i(e, null, [a("div", $e, [a("div", et, [
383
+ n.text.title ? (l(), i("div", tt, [a("strong", null, m(n.text.title), 1)])) : r("", !0),
384
+ n.text.extra?.subtitle ? (l(), i("div", nt, [a("strong", null, m(n.text.extra.subtitle), 1)])) : r("", !0),
385
+ n.text.extra?.region_territory ? (l(), i("div", rt, [
386
+ a("b", null, m(h(f)("travels.trail.region")) + ":", 1),
387
+ u[0] ||= o("\xA0", -1),
388
+ a("strong", null, m(n.text.extra.region_territory), 1)
389
+ ])) : r("", !0),
390
+ n.itinerary ? (l(), i("div", it, m(h(f)("travels.itinerary.label").toUpperCase()) + "\xA0" + m(n.itinerary.number) + ":\xA0" + m(n.itinerary.title), 1)) : r("", !0)
391
+ ]), a("div", at, [y.value ? (l(), i(e, { key: 0 }, [v.value ? (l(), i("a", {
392
+ key: 0,
393
+ href: v.value,
394
+ target: "_blank",
395
+ rel: "noopener"
396
+ }, [a("img", {
397
+ src: y.value,
398
+ alt: ""
399
+ }, null, 8, st)], 8, ot)) : (l(), i("img", {
400
+ key: 1,
401
+ src: y.value,
402
+ alt: ""
403
+ }, null, 8, ct))], 64)) : r("", !0), a("span", lt, m(h(f)("travels.trail.travelBook")), 1)])]), a("div", ut, [a("div", dt, m(h(f)("travels.trail.seeAlso")), 1), a("div", ft, [(l(!0), i(e, null, d(n.tabs, (e) => (l(), i("div", {
404
+ key: e.key,
405
+ class: c(["mwnf-travels-see-also__tab", { "mwnf-travels-see-also__tab--active": e.active }])
406
+ }, [s(g, {
407
+ to: e.to,
408
+ title: e.tip || void 0,
409
+ "aria-current": e.active ? "page" : void 0
410
+ }, {
411
+ default: _(() => [o(m(e.label), 1)]),
412
+ _: 2
413
+ }, 1032, [
414
+ "to",
415
+ "title",
416
+ "aria-current"
417
+ ])], 2))), 128))])])], 64);
418
+ };
419
+ }
420
+ }, pt = { class: "mwnf-travels-trail" }, mt = {
421
+ key: 0,
422
+ class: "mwnf-travels__empty"
423
+ }, ht = { class: "mwnf-travels-banner" }, gt = { class: "mwnf-travels-content" }, _t = { class: "mwnf-travels-content__head" }, vt = { key: 0 }, yt = { key: 1 }, bt = { key: 2 }, xt = ["innerHTML"], St = {
424
+ key: 1,
425
+ class: "mwnf-travels-content__prose"
426
+ }, Ct = { class: "mwnf-travels-itinerary-row__picture" }, wt = [
427
+ "src",
428
+ "alt",
429
+ "title"
430
+ ], Tt = { class: "mwnf-travels-itinerary-row__text" }, Et = {
431
+ __name: "Trail",
432
+ props: {
433
+ id: {
434
+ type: String,
435
+ required: !0
436
+ },
437
+ tab: {
438
+ type: String,
439
+ default: "its"
440
+ }
441
+ },
442
+ setup(n) {
443
+ let c = n, { t: u } = D(), f = X(), g = t(() => f.collectionById.value.get(c.id) ?? null), y = t(() => f.text(g.value)), b = t(() => I.includes(c.tab) ? c.tab : "its"), x = t(() => [
444
+ {
445
+ key: "desc",
446
+ label: u("travels.trail.about")
447
+ },
448
+ {
449
+ key: "its",
450
+ label: u("travels.trail.itineraries"),
451
+ tip: u("travels.trail.itinerariesTip")
452
+ },
453
+ {
454
+ key: "cur",
455
+ label: u("travels.trail.curators")
456
+ }
457
+ ].map((e) => ({
458
+ ...e,
459
+ active: e.key === b.value,
460
+ to: {
461
+ name: "trail",
462
+ params: { id: c.id },
463
+ query: { tab: e.key }
464
+ }
465
+ }))), S = t(() => [
466
+ {
467
+ text: u("travels.nav.home"),
468
+ to: { name: "home" }
469
+ },
470
+ {
471
+ text: u("travels.nav.exhibitionTrails"),
472
+ to: { name: "home" }
473
+ },
474
+ {
475
+ text: f.countryName(g.value?.country_id),
476
+ to: {
477
+ name: "trails",
478
+ query: { country: g.value?.country_id }
479
+ }
480
+ },
481
+ { text: y.value.title ?? "" }
482
+ ]), C = t(() => f.itineraries(g.value).map((e) => ({
483
+ id: e.id,
484
+ number: z(e),
485
+ title: f.text(e).title ?? "",
486
+ picture: J(f.collections.value, e, f.itemById.value),
487
+ locations: f.locations(e).map((e) => f.text(e).title).filter(Boolean)
488
+ }))), T = (e) => e ? w(String(e), { breaks: !0 }) : "";
489
+ function E() {
490
+ typeof window < "u" && window.history.back();
491
+ }
492
+ return (t, n) => {
493
+ let c = p("RouterLink");
494
+ return l(), i("div", pt, [g.value ? (l(), i(e, { key: 1 }, [a("div", ht, [s(Z, { crumbs: S.value }, null, 8, ["crumbs"]), s($, {
495
+ trail: g.value,
496
+ text: y.value,
497
+ tabs: x.value
498
+ }, null, 8, [
499
+ "trail",
500
+ "text",
501
+ "tabs"
502
+ ])]), a("div", gt, [a("div", _t, [b.value === "desc" ? (l(), i("h2", vt, m(h(u)("travels.trail.description")), 1)) : b.value === "cur" ? (l(), i("h2", yt, m(h(u)("travels.trail.curators")), 1)) : (l(), i("h2", bt, m(h(u)("travels.trail.itineraries")), 1)), a("a", {
503
+ href: "#",
504
+ class: "mwnf-travels-content__back",
505
+ onClick: v(E, ["prevent"])
506
+ }, [a("b", null, "<< " + m(h(u)("travels.action.back")), 1)])]), b.value === "desc" ? (l(), i("div", {
507
+ key: 0,
508
+ class: "mwnf-travels-content__prose",
509
+ innerHTML: T(y.value.description)
510
+ }, null, 8, xt)) : b.value === "cur" ? (l(), i("div", St, [
511
+ a("strong", null, m(h(u)("travels.trail.curatedBy")), 1),
512
+ (l(!0), i(e, null, d(h(Y)(y.value.extra?.curated_by), (e, t) => (l(), i("div", { key: `c${t}` }, m(e), 1))), 128)),
513
+ h(Y)(y.value.extra?.photo_by).length ? (l(), i(e, { key: 0 }, [
514
+ n[0] ||= a("br", null, null, -1),
515
+ a("strong", null, m(h(u)("travels.trail.photographers")), 1),
516
+ (l(!0), i(e, null, d(h(Y)(y.value.extra?.photo_by), (e, t) => (l(), i("div", { key: `p${t}` }, m(e), 1))), 128))
517
+ ], 64)) : r("", !0)
518
+ ])) : (l(!0), i(e, { key: 2 }, d(C.value, (t) => (l(), i("div", {
519
+ key: t.id,
520
+ class: "mwnf-travels-itinerary-row"
521
+ }, [a("div", Ct, [t.picture ? (l(), i("img", {
522
+ key: 0,
523
+ src: t.picture,
524
+ alt: t.title,
525
+ title: h(u)("travels.picture.enlarge"),
526
+ loading: "lazy"
527
+ }, null, 8, wt)) : r("", !0)]), a("div", Tt, [
528
+ a("b", null, m(h(u)("travels.itinerary.label")) + "\xA0" + m(t.number) + " :", 1),
529
+ a("strong", null, [s(c, { to: {
530
+ name: "itinerary",
531
+ params: { id: t.id },
532
+ query: { tab: "des" }
533
+ } }, {
534
+ default: _(() => [o(m(t.title) + "\xA0>>", 1)]),
535
+ _: 2
536
+ }, 1032, ["to"])]),
537
+ n[3] ||= a("br", null, null, -1),
538
+ t.locations.length ? (l(), i(e, { key: 0 }, [
539
+ a("b", null, m(h(u)("travels.trail.mainLocations")) + ":", 1),
540
+ n[1] ||= o(),
541
+ a("strong", null, m(t.locations.join(", ")), 1),
542
+ n[2] ||= a("br", null, null, -1)
543
+ ], 64)) : r("", !0),
544
+ a("strong", null, [s(c, { to: {
545
+ name: "itinerary",
546
+ params: { id: t.id },
547
+ query: { tab: "vl" }
548
+ } }, {
549
+ default: _(() => [o(m(h(u)("travels.itinerary.gallery")) + "\xA0>>", 1)]),
550
+ _: 1
551
+ }, 8, ["to"])])
552
+ ])]))), 128))])], 64)) : (l(), i("p", mt, m(h(u)("core.detail.notFound")), 1))]);
553
+ };
554
+ }
555
+ }, Dt = { class: "mwnf-travels-itinerary" }, Ot = {
556
+ key: 0,
557
+ class: "mwnf-travels__empty"
558
+ }, kt = { class: "mwnf-travels-banner" }, At = { class: "mwnf-travels-content" }, jt = { class: "mwnf-travels-content__neighbours" }, Mt = { key: 0 }, Nt = { key: 2 }, Pt = { class: "mwnf-travels-gallery" }, Ft = { class: "mwnf-travels-gallery__main" }, It = ["href", "title"], Lt = ["src", "alt"], Rt = {
559
+ key: 1,
560
+ class: "mwnf-travels-gallery__caption"
561
+ }, zt = { class: "mwnf-travels-gallery__thumbs" }, Bt = [
562
+ "aria-label",
563
+ "onMouseover",
564
+ "onFocus",
565
+ "onClick"
566
+ ], Vt = ["src"], Ht = ["innerHTML"], Ut = {
567
+ __name: "Itinerary",
568
+ props: {
569
+ id: {
570
+ type: String,
571
+ required: !0
572
+ },
573
+ tab: {
574
+ type: String,
575
+ default: "des"
576
+ }
577
+ },
578
+ setup(n) {
579
+ let f = n, { t: v, locale: y } = D(), b = X(), x = t(() => b.collectionById.value.get(f.id) ?? null), S = t(() => x.value ? b.collectionById.value.get(x.value.parent_id) ?? null : null), C = t(() => b.text(S.value)), T = t(() => b.text(x.value)), E = t(() => ee.includes(f.tab) ? f.tab : "des"), O = t(() => ({
580
+ number: z(x.value),
581
+ title: T.value.title ?? ""
582
+ })), k = t(() => [{
583
+ key: "des",
584
+ label: v("travels.itinerary.about")
585
+ }, {
586
+ key: "vl",
587
+ label: v("travels.itinerary.gallery"),
588
+ tip: v("travels.itinerary.galleryTip")
589
+ }].map((e) => ({
590
+ ...e,
591
+ active: e.key === E.value,
592
+ to: {
593
+ name: "itinerary",
594
+ params: { id: f.id },
595
+ query: { tab: e.key }
596
+ }
597
+ }))), A = t(() => [
598
+ {
599
+ text: v("travels.nav.home"),
600
+ to: { name: "home" }
601
+ },
602
+ {
603
+ text: v("travels.nav.exhibitionTrails"),
604
+ to: { name: "home" }
605
+ },
606
+ {
607
+ text: b.countryName(S.value?.country_id),
608
+ to: {
609
+ name: "trails",
610
+ query: { country: S.value?.country_id }
611
+ }
612
+ },
613
+ {
614
+ text: C.value.title ?? "",
615
+ to: {
616
+ name: "trail",
617
+ params: { id: S.value?.id ?? "" },
618
+ query: { tab: "its" }
619
+ }
620
+ },
621
+ { text: `${v("travels.itinerary.label")} ${O.value.number}` }
622
+ ]), j = t(() => K(b.itineraries(S.value), f.id)), M = (e) => e ? {
623
+ name: "itinerary",
624
+ params: { id: e.id },
625
+ query: { tab: E.value }
626
+ } : null, N = (e) => e?.captions?.[y.value] ?? e?.captions?.en ?? e?.alt_text ?? "", P = t(() => q(b.collections.value, x.value, b.itemById.value, N)), F = u(0);
627
+ g(() => f.id, () => {
628
+ F.value = 0;
629
+ });
630
+ let I = t(() => P.value[F.value] ?? P.value[0] ?? null), L = (e) => e ? w(String(e), { breaks: !0 }) : "";
631
+ return (t, n) => {
632
+ let u = p("RouterLink");
633
+ return l(), i("div", Dt, [!x.value || !S.value ? (l(), i("p", Ot, m(h(v)("core.detail.notFound")), 1)) : (l(), i(e, { key: 1 }, [a("div", kt, [s(Z, { crumbs: A.value }, null, 8, ["crumbs"]), s($, {
634
+ trail: S.value,
635
+ text: C.value,
636
+ itinerary: O.value,
637
+ tabs: k.value
638
+ }, null, 8, [
639
+ "trail",
640
+ "text",
641
+ "itinerary",
642
+ "tabs"
643
+ ])]), a("div", At, [a("div", jt, [
644
+ j.value.previous ? (l(), i("b", Mt, [s(u, { to: M(j.value.previous) }, {
645
+ default: _(() => [o("<<\xA0" + m(h(v)("travels.itinerary.previous")), 1)]),
646
+ _: 1
647
+ }, 8, ["to"])])) : r("", !0),
648
+ j.value.previous && j.value.next ? (l(), i(e, { key: 1 }, [o("\xA0|\xA0")], 64)) : r("", !0),
649
+ j.value.next ? (l(), i("b", Nt, [s(u, { to: M(j.value.next) }, {
650
+ default: _(() => [o(m(h(v)("travels.itinerary.next")) + "\xA0>>", 1)]),
651
+ _: 1
652
+ }, 8, ["to"])])) : r("", !0)
653
+ ]), E.value === "vl" ? (l(), i(e, { key: 0 }, [a("h2", null, m(h(v)("travels.itinerary.galleryHeading")), 1), a("div", Pt, [a("div", Ft, [I.value ? (l(), i("a", {
654
+ key: 0,
655
+ href: I.value.url,
656
+ target: "_blank",
657
+ rel: "noopener",
658
+ title: h(v)("travels.picture.enlarge")
659
+ }, [a("img", {
660
+ src: I.value.url,
661
+ alt: I.value.caption,
662
+ class: "mwnf-travels-gallery__picture"
663
+ }, null, 8, Lt)], 8, It)) : r("", !0), I.value?.caption ? (l(), i("div", Rt, [a("strong", null, m(I.value.caption), 1)])) : r("", !0)]), a("div", zt, [(l(!0), i(e, null, d(P.value, (e, t) => (l(), i("button", {
664
+ key: `${e.url}-${t}`,
665
+ type: "button",
666
+ class: c(["mwnf-travels-gallery__thumb", { "mwnf-travels-gallery__thumb--current": t === F.value }]),
667
+ "aria-label": e.caption || h(v)("travels.picture.enlarge"),
668
+ onMouseover: (e) => F.value = t,
669
+ onFocus: (e) => F.value = t,
670
+ onClick: (e) => F.value = t
671
+ }, [a("img", {
672
+ src: e.url,
673
+ alt: "",
674
+ loading: "lazy"
675
+ }, null, 8, Vt)], 42, Bt))), 128))])])], 64)) : (l(), i(e, { key: 1 }, [a("h2", null, m(h(v)("travels.trail.description")), 1), a("div", {
676
+ class: "mwnf-travels-content__prose",
677
+ innerHTML: L(T.value.description)
678
+ }, null, 8, Ht)], 64))])], 64))]);
679
+ };
680
+ }
681
+ }, Wt = (e) => typeof e.query.tab == "string" ? e.query.tab : void 0;
682
+ function Gt(e = T()) {
683
+ return [
684
+ {
685
+ path: "/",
686
+ name: "home",
687
+ component: Q,
688
+ meta: e("home", ...j)
689
+ },
690
+ {
691
+ path: "/trails",
692
+ name: "trails",
693
+ component: Qe,
694
+ meta: e("trails", ...j)
695
+ },
696
+ {
697
+ path: "/trail/:id",
698
+ name: "trail",
699
+ component: Et,
700
+ props: (e) => ({
701
+ id: String(e.params.id),
702
+ tab: Wt(e)
703
+ }),
704
+ meta: e("trail", ...j)
705
+ },
706
+ {
707
+ path: "/itinerary/:id",
708
+ name: "itinerary",
709
+ component: Ut,
710
+ props: (e) => ({
711
+ id: String(e.params.id),
712
+ tab: Wt(e)
713
+ }),
714
+ meta: e("itinerary", ...j)
715
+ }
716
+ ];
717
+ }
718
+ function Kt({ datasetPackage: e, origin: t, siteName: n, chrome: r = {}, travels: i = {} }) {
719
+ let { manifest: a } = E(), o = C({ entity: "collections" });
720
+ return {
721
+ datasetPackage: e,
722
+ siteName: a.site?.names?.en ?? n ?? e,
723
+ site: { origin: t },
724
+ features: { entities: [] },
725
+ languages: o,
726
+ chrome: r,
727
+ travels: i,
728
+ shell: be,
729
+ navigation: { languages: x(o) },
730
+ views: { home: Q },
731
+ extraViews: Gt(T()),
732
+ legacyRoutes: []
733
+ };
734
+ }
735
+ export { F as HIDDEN_PROJECTS, ee as ITINERARY_TABS, N as ITINERARY_TYPE, P as LOCATION_TYPE, I as TRAIL_TABS, M as TRAIL_TYPE, j as TRAVEL_ENTITIES, Z as TravelsCrumbs, Q as TravelsHome, Ut as TravelsItinerary, be as TravelsShell, Et as TravelsTrail, $ as TravelsTrailHeader, Qe as TravelsTrails, te as bookLink, V as childrenOf, q as galleryOf, B as isListed, z as itineraryNumber, J as itineraryPicture, Y as lines, U as locationsOfTrail, G as mainLocations, K as neighbours, R as projectCode, W as projectOfTrail, H as trailsOf, Kt as travelsConfig, Gt as travelsRoutes, X as useTravels };