@museumwnf/viewer-layout 2.17.0 → 2.18.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,444 @@
1
+ import { T as e } from "./OnDisplayIn-D6r_KvpI.js";
2
+ import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, normalizeClass as c, normalizeStyle as l, onBeforeUnmount as u, onMounted as d, openBlock as f, ref as p, renderList as m, renderSlot as h, toDisplayString as g, unref as _, vModelCheckbox as v, vShow as y, watch as b, withCtx as x, withDirectives as S } from "vue";
3
+ import { renderBlock as C, renderInline as w, useI18n as T } from "@museumwnf/viewer-core";
4
+ import { useRouter as E } from "vue-router";
5
+ //#region src/content/BackLink.vue
6
+ var D = ["href"], O = {
7
+ class: "mwnf-back-bar__arrow",
8
+ "aria-hidden": "true"
9
+ }, ee = {
10
+ key: 1,
11
+ class: "mwnf-back-link"
12
+ }, te = {
13
+ __name: "BackLink",
14
+ props: {
15
+ label: {
16
+ type: String,
17
+ default: "core.action.back"
18
+ },
19
+ to: {
20
+ type: [String, Object],
21
+ default: null
22
+ },
23
+ href: {
24
+ type: String,
25
+ default: ""
26
+ },
27
+ variant: {
28
+ type: String,
29
+ default: "button",
30
+ validator: (e) => ["button", "bar"].includes(e)
31
+ },
32
+ arrow: {
33
+ type: String,
34
+ default: "←"
35
+ }
36
+ },
37
+ setup(t) {
38
+ let i = E(), c = t, l = n(() => !!(c.to || c.href));
39
+ function u() {
40
+ return window.history.state?.back != null || !l.value && window.history.length > 1;
41
+ }
42
+ function d() {
43
+ u() && i.back();
44
+ }
45
+ let p = n(() => c.to && i ? i.resolve(c.to).href : c.href || (typeof c.to == "string" ? c.to : "") || "#");
46
+ function m(e) {
47
+ e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (u() ? (e.preventDefault(), i.back()) : c.to && i ? (e.preventDefault(), i.push(c.to)) : l.value || e.preventDefault());
48
+ }
49
+ return (n, i) => t.variant === "bar" ? (f(), a("a", {
50
+ key: 0,
51
+ href: p.value,
52
+ class: "mwnf-back-bar mwnf-back-bar--link",
53
+ onClick: m
54
+ }, [
55
+ o("span", O, g(t.arrow), 1),
56
+ i[0] ||= s(),
57
+ h(n.$slots, "default", {}, () => [s(g(n.$t(t.label)), 1)])
58
+ ], 8, D)) : (f(), a("div", ee, [l.value && !u() ? (f(), r(e, {
59
+ key: 0,
60
+ to: t.to,
61
+ href: t.href,
62
+ class: "mwnf-back-link__button"
63
+ }, {
64
+ default: x(() => [s(" ↩ " + g(n.$t(t.label)), 1)]),
65
+ _: 1
66
+ }, 8, ["to", "href"])) : (f(), a("button", {
67
+ key: 1,
68
+ class: "mwnf-back-link__button",
69
+ onClick: d
70
+ }, " ↩ " + g(n.$t(t.label)), 1))]));
71
+ }
72
+ }, k = {
73
+ key: 0,
74
+ class: "mwnf-featured-partners"
75
+ }, A = { class: "mwnf-featured-partners__heading" }, j = { class: "mwnf-featured-partners__carousel" }, M = {
76
+ key: 0,
77
+ class: "mwnf-featured-partners__image"
78
+ }, N = ["src", "alt"], P = { class: "mwnf-featured-partners__body" }, F = { class: "mwnf-featured-partners__name" }, I = { class: "mwnf-featured-partners__location" }, L = { key: 0 }, R = { class: "mwnf-featured-partners__description" }, z = {
79
+ key: 0,
80
+ class: "mwnf-featured-partners__controls"
81
+ }, B = ["aria-label", "onClick"], V = 8e3, H = {
82
+ __name: "FeaturedPartners",
83
+ props: {
84
+ records: {
85
+ type: Array,
86
+ default: () => []
87
+ },
88
+ partners: {
89
+ type: Array,
90
+ default: () => []
91
+ },
92
+ descriptionLength: {
93
+ type: Number,
94
+ default: 420
95
+ },
96
+ headingEntry: {
97
+ type: String,
98
+ default: "partner.list.featured"
99
+ }
100
+ },
101
+ setup(l) {
102
+ let h = l;
103
+ function _(e) {
104
+ return String(e ?? "").replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
105
+ }
106
+ function v(e, t) {
107
+ if (!e || e.length <= t) return e;
108
+ let n = e.lastIndexOf(" ", t);
109
+ return `${e.slice(0, n > 0 ? n : t)}...`;
110
+ }
111
+ let b = n(() => h.partners.length ? h.partners.map((e) => ({
112
+ id: e.id,
113
+ name: e.plainName,
114
+ logo: e.pictures?.[0]?.url ?? e.logos?.[0]?.url ?? null,
115
+ city: e.city,
116
+ country: e.country,
117
+ description: v(_(e.description), h.descriptionLength),
118
+ route: e.route
119
+ })) : h.records), C = p(0), w = null;
120
+ function T(e) {
121
+ C.value = e, E();
122
+ }
123
+ function E() {
124
+ w && clearInterval(w), b.value.length > 0 && (w = setInterval(() => {
125
+ C.value = (C.value + 1) % b.value.length;
126
+ }, V));
127
+ }
128
+ return d(E), u(() => w && clearInterval(w)), (n, u) => b.value.length ? (f(), a("section", k, [
129
+ o("h2", A, g(n.$t(l.headingEntry)), 1),
130
+ o("div", j, [(f(!0), a(t, null, m(b.value, (t, n) => S((f(), r(e, {
131
+ key: t.id,
132
+ to: t.route,
133
+ class: "mwnf-featured-partners__card"
134
+ }, {
135
+ default: x(() => [t.logo ? (f(), a("span", M, [o("img", {
136
+ src: t.logo,
137
+ alt: t.name,
138
+ class: "mwnf-featured-partners__logo"
139
+ }, null, 8, N)])) : i("", !0), o("span", P, [
140
+ o("span", F, g(t.name), 1),
141
+ o("span", I, [t.city ? (f(), a("span", L, g(t.city) + ", ", 1)) : i("", !0), s(g(t.country), 1)]),
142
+ o("span", R, g(t.description), 1)
143
+ ])]),
144
+ _: 2
145
+ }, 1032, ["to"])), [[y, n === C.value]])), 128))]),
146
+ b.value.length > 1 ? (f(), a("div", z, [(f(!0), a(t, null, m(b.value, (e, t) => (f(), a("button", {
147
+ key: e.id,
148
+ class: c(["mwnf-featured-partners__bullet", { "mwnf-featured-partners__bullet--active": t === C.value }]),
149
+ "aria-label": `${n.$t("core.action.show")} ${e.name}`,
150
+ onClick: (e) => T(t)
151
+ }, null, 10, B))), 128))])) : i("", !0)
152
+ ])) : i("", !0);
153
+ }
154
+ }, U = { class: "mwnf-sibling-galleries" }, W = {
155
+ key: 0,
156
+ class: "mwnf-sibling-galleries__galleries"
157
+ }, G = { class: "mwnf-sibling-galleries__header" }, K = { class: "mwnf-sibling-galleries__heading" }, q = ["href"], J = { class: "mwnf-sibling-galleries__grid" }, Y = {
158
+ key: 0,
159
+ class: "mwnf-sibling-galleries__image"
160
+ }, X = ["src", "alt"], Z = {
161
+ key: 1,
162
+ class: "mwnf-sibling-galleries__image mwnf-sibling-galleries__image--empty"
163
+ }, Q = { class: "mwnf-sibling-galleries__name" }, ne = {
164
+ key: 1,
165
+ class: "mwnf-sibling-galleries__museums"
166
+ }, re = { class: "mwnf-sibling-galleries__heading" }, ie = { class: "mwnf-sibling-galleries__museums-grid" }, ae = ["href"], oe = { class: "mwnf-sibling-galleries__museum-image" }, se = { class: "mwnf-sibling-galleries__museum-name" }, ce = {
167
+ __name: "SiblingGalleries",
168
+ props: {
169
+ galleries: {
170
+ type: Array,
171
+ default: () => []
172
+ },
173
+ museums: {
174
+ type: Array,
175
+ default: () => []
176
+ },
177
+ galleriesHeadingEntry: {
178
+ type: String,
179
+ default: "sibling.galleries"
180
+ },
181
+ seeMoreGalleriesEntry: {
182
+ type: String,
183
+ default: "sibling.seeMoreGalleries"
184
+ },
185
+ seeMoreGalleriesHref: {
186
+ type: String,
187
+ default: ""
188
+ },
189
+ museumsHeadingEntry: {
190
+ type: String,
191
+ default: "sibling.otherVirtualMuseums"
192
+ }
193
+ },
194
+ setup(n) {
195
+ return (s, u) => (f(), a("section", U, [n.galleries.length ? (f(), a("div", W, [o("div", G, [o("p", K, g(s.$t(n.galleriesHeadingEntry)), 1), n.seeMoreGalleriesHref ? (f(), a("a", {
196
+ key: 0,
197
+ href: n.seeMoreGalleriesHref,
198
+ target: "_blank",
199
+ rel: "noopener",
200
+ class: "mwnf-sibling-galleries__see-more"
201
+ }, g(s.$t(n.seeMoreGalleriesEntry)) + " » ", 9, q)) : i("", !0)]), o("div", J, [(f(!0), a(t, null, m(n.galleries, (t) => (f(), r(e, {
202
+ key: t.id,
203
+ to: t.route,
204
+ class: c(["mwnf-sibling-galleries__gallery", { "mwnf-sibling-galleries__gallery--no-link": !t.route }])
205
+ }, {
206
+ default: x(() => [t.image ? (f(), a("span", Y, [o("img", {
207
+ src: t.image,
208
+ alt: t.name
209
+ }, null, 8, X)])) : (f(), a("span", Z)), o("p", Q, g(t.name), 1)]),
210
+ _: 2
211
+ }, 1032, ["to", "class"]))), 128))])])) : i("", !0), n.museums.length ? (f(), a("div", ne, [o("div", re, g(s.$t(n.museumsHeadingEntry)), 1), o("div", ie, [(f(!0), a(t, null, m(n.museums, (e) => (f(), a("a", {
212
+ key: e.name,
213
+ href: e.href || e.to,
214
+ target: "_blank",
215
+ rel: "noopener",
216
+ class: "mwnf-sibling-galleries__museum",
217
+ style: l({
218
+ "--mwnf-museum-bg": e.accent || "var(--mwnf-color-border)",
219
+ "--mwnf-museum-text": e.textColor || "inherit"
220
+ })
221
+ }, [o("div", oe, g(e.name.split(" ").map((e) => e[0]).join("")), 1), o("p", se, g(e.name), 1)], 12, ae))), 128))])])) : i("", !0)]));
222
+ }
223
+ }, le = {
224
+ key: 0,
225
+ class: "mwnf-popup-logo"
226
+ }, ue = ["aria-label"], de = ["innerHTML"], fe = ["innerHTML"], pe = {
227
+ __name: "PopupLogo",
228
+ props: {
229
+ content: {
230
+ type: String,
231
+ default: ""
232
+ },
233
+ rawHtml: {
234
+ type: Boolean,
235
+ default: !1
236
+ },
237
+ enabled: {
238
+ type: Boolean,
239
+ default: !0
240
+ },
241
+ closeLabel: {
242
+ type: String,
243
+ default: "core.action.close"
244
+ }
245
+ },
246
+ setup(e) {
247
+ let t = e, r = p(!1), s = n(() => t.rawHtml ? t.content : w(t.content)), c = n(() => t.enabled && !!t.content && !r.value);
248
+ return (t, n) => c.value ? (f(), a("div", le, [o("button", {
249
+ class: "mwnf-popup-logo__close",
250
+ "aria-label": t.$t(e.closeLabel),
251
+ onClick: n[0] ||= (e) => r.value = !0
252
+ }, "✕", 8, ue), e.rawHtml ? (f(), a("div", {
253
+ key: 0,
254
+ class: "mwnf-popup-logo__content",
255
+ innerHTML: s.value
256
+ }, null, 8, de)) : (f(), a("div", {
257
+ key: 1,
258
+ class: "mwnf-popup-logo__content",
259
+ innerHTML: s.value
260
+ }, null, 8, fe))])) : i("", !0);
261
+ }
262
+ }, me = { class: "mwnf-picture-gallery" }, he = {
263
+ key: 0,
264
+ class: "mwnf-picture-gallery__selected"
265
+ }, ge = { class: "mwnf-picture-gallery__image" }, _e = ["src", "alt"], ve = { class: "mwnf-picture-gallery__details" }, ye = { class: "mwnf-picture-gallery__detail mwnf-picture-gallery__detail--title" }, be = { key: 0 }, xe = ["innerHTML"], Se = {
266
+ key: 0,
267
+ class: "mwnf-picture-gallery__label"
268
+ }, Ce = ["innerHTML"], we = {
269
+ key: 0,
270
+ class: "mwnf-picture-gallery__detail"
271
+ }, Te = {
272
+ key: 2,
273
+ class: "mwnf-picture-gallery__unresolved"
274
+ }, Ee = {
275
+ key: 1,
276
+ class: "mwnf-picture-gallery__empty"
277
+ }, De = {
278
+ key: 2,
279
+ class: "mwnf-picture-gallery__strip"
280
+ }, Oe = { class: "mwnf-picture-gallery__thumbs" }, ke = ["onClick"], Ae = ["src", "alt"], je = { class: "mwnf-picture-gallery__thumb-text" }, Me = { key: 0 }, Ne = ["innerHTML"], Pe = { key: 1 }, Fe = {
281
+ key: 0,
282
+ class: "mwnf-picture-gallery__toggle"
283
+ }, Ie = {
284
+ __name: "PictureGallery",
285
+ props: {
286
+ pictures: {
287
+ type: Array,
288
+ default: () => []
289
+ },
290
+ selectedId: {
291
+ type: [String, Number],
292
+ default: null
293
+ },
294
+ seeItemEntry: {
295
+ type: String,
296
+ default: "exhibition.theme.seeItemEntry"
297
+ },
298
+ unresolvedEntry: {
299
+ type: String,
300
+ default: "exhibition.theme.recordNotInSite"
301
+ },
302
+ emptyEntry: {
303
+ type: String,
304
+ default: "exhibition.theme.additionalContent"
305
+ },
306
+ addRelatedEntry: {
307
+ type: String,
308
+ default: "exhibition.theme.addRelatedWorks"
309
+ },
310
+ hideRelatedEntry: {
311
+ type: String,
312
+ default: "exhibition.theme.hideRelatedWorks"
313
+ }
314
+ },
315
+ emits: ["update:selectedId"],
316
+ setup(l, { emit: u }) {
317
+ let d = l, h = u, { t: y } = T(), C = n(() => d.pictures.find((e) => e.id === d.selectedId) ?? null), w = n(() => d.pictures.some((e) => e.backRelated?.length)), E = p(!1);
318
+ b(() => d.pictures, () => {
319
+ E.value = !1;
320
+ });
321
+ let D = n(() => E.value ? d.pictures : d.pictures.filter((e) => !e.backRelated?.length));
322
+ function O(e) {
323
+ h("update:selectedId", e.id);
324
+ }
325
+ return (n, u) => (f(), a("div", me, [C.value ? (f(), a("div", he, [o("div", ge, [o("img", {
326
+ src: C.value.image,
327
+ alt: C.value.imageAlt ?? ""
328
+ }, null, 8, _e)]), o("div", ve, [
329
+ o("div", ye, [C.value.imageCaption ? (f(), a("span", be, g(C.value.imageCaption) + ", ", 1)) : i("", !0), o("span", { innerHTML: C.value.name }, null, 8, xe)]),
330
+ (f(!0), a(t, null, m(C.value.fields ?? [], (e, t) => (f(), a("div", {
331
+ key: t,
332
+ class: "mwnf-picture-gallery__detail"
333
+ }, [e.label ? (f(), a("span", Se, g(e.label), 1)) : i("", !0), o("span", { innerHTML: e.value }, null, 8, Ce)]))), 128)),
334
+ C.value.detail ? (f(), a("div", we, g(C.value.detail), 1)) : i("", !0),
335
+ C.value.to ? (f(), r(e, {
336
+ key: 1,
337
+ class: "mwnf-picture-gallery__link",
338
+ to: C.value.to
339
+ }, {
340
+ default: x(() => [s(g(_(y)(l.seeItemEntry)) + " →", 1)]),
341
+ _: 1
342
+ }, 8, ["to"])) : (f(), a("div", Te, g(_(y)(l.unresolvedEntry)), 1))
343
+ ])])) : (f(), a("div", Ee, g(_(y)(l.emptyEntry)), 1)), l.pictures.length ? (f(), a("div", De, [o("ul", Oe, [(f(!0), a(t, null, m(D.value, (e) => (f(), a("li", {
344
+ key: e.id,
345
+ class: c(["mwnf-picture-gallery__thumb", {
346
+ "mwnf-picture-gallery__thumb--active": e.id === l.selectedId,
347
+ "mwnf-picture-gallery__thumb--related": e.backRelated?.length
348
+ }])
349
+ }, [o("button", {
350
+ type: "button",
351
+ onClick: (t) => O(e)
352
+ }, [o("img", {
353
+ src: e.image,
354
+ alt: e.imageAlt ?? "",
355
+ loading: "lazy"
356
+ }, null, 8, Ae)], 8, ke), o("div", je, [
357
+ e.imageCaption ? (f(), a("span", Me, g(e.imageCaption) + ", ", 1)) : i("", !0),
358
+ o("span", {
359
+ class: "mwnf-picture-gallery__thumb-name",
360
+ innerHTML: e.name
361
+ }, null, 8, Ne),
362
+ e.detail ? (f(), a("span", Pe, ", " + g(e.detail), 1)) : i("", !0)
363
+ ])], 2))), 128))]), w.value ? (f(), a("label", Fe, [S(o("input", {
364
+ "onUpdate:modelValue": u[0] ||= (e) => E.value = e,
365
+ type: "checkbox"
366
+ }, null, 512), [[v, E.value]]), o("span", null, g(E.value ? _(y)(l.hideRelatedEntry) : _(y)(l.addRelatedEntry)), 1)])) : i("", !0)])) : i("", !0)]));
367
+ }
368
+ }, Le = {
369
+ key: 0,
370
+ class: "mwnf-picture-narrative"
371
+ }, Re = ["innerHTML"], ze = {
372
+ key: 1,
373
+ class: "mwnf-picture-narrative__related"
374
+ }, Be = { class: "mwnf-picture-narrative__heading" }, Ve = { class: "mwnf-picture-narrative__images" }, He = { class: "mwnf-picture-narrative__image mwnf-picture-narrative__image--main" }, Ue = ["src", "alt"], We = { class: "mwnf-picture-narrative__thumb-text" }, Ge = ["innerHTML"], Ke = { key: 0 }, qe = ["onClick"], Je = ["src", "alt"], $ = { class: "mwnf-picture-narrative__thumb-text" }, Ye = ["innerHTML"], Xe = { key: 0 }, Ze = {
375
+ key: 0,
376
+ class: "mwnf-picture-narrative__relation"
377
+ }, Qe = {
378
+ key: 2,
379
+ class: "mwnf-picture-narrative__related"
380
+ }, $e = { class: "mwnf-picture-narrative__heading" }, et = { class: "mwnf-picture-narrative__text mwnf-picture-narrative__text--reciprocal" }, tt = { class: "mwnf-picture-narrative__image" }, nt = ["src", "alt"], rt = { class: "mwnf-picture-narrative__thumb-text" }, it = ["innerHTML"], at = { key: 0 }, ot = {
381
+ __name: "PictureNarrative",
382
+ props: {
383
+ picture: {
384
+ type: Object,
385
+ default: null
386
+ },
387
+ contextualDescription: {
388
+ type: String,
389
+ default: ""
390
+ },
391
+ relatedHeadingEntry: {
392
+ type: String,
393
+ default: "exhibition.related.items"
394
+ },
395
+ reciprocalFallbackEntry: {
396
+ type: String,
397
+ default: "exhibition.related.reciprocal"
398
+ }
399
+ },
400
+ emits: ["select"],
401
+ setup(e, { emit: r }) {
402
+ let s = e, c = r, { t: l } = T(), u = n(() => s.contextualDescription ? C(s.contextualDescription, { breaks: !0 }) : ""), d = n(() => s.picture?.related ?? []), p = n(() => s.picture?.backRelated?.[0] ?? null);
403
+ function h(e) {
404
+ c("select", e.id);
405
+ }
406
+ return (n, r) => e.picture ? (f(), a("div", Le, [
407
+ u.value ? (f(), a("div", {
408
+ key: 0,
409
+ class: "mwnf-picture-narrative__text mwnf-sheet__block",
410
+ innerHTML: u.value
411
+ }, null, 8, Re)) : i("", !0),
412
+ d.value.length ? (f(), a("div", ze, [o("div", Be, g(_(l)(e.relatedHeadingEntry)), 1), o("div", Ve, [o("div", He, [o("img", {
413
+ src: e.picture.image,
414
+ alt: e.picture.imageAlt ?? ""
415
+ }, null, 8, Ue), o("div", We, [o("span", { innerHTML: e.picture.name }, null, 8, Ge), e.picture.detail ? (f(), a("span", Ke, ", " + g(e.picture.detail), 1)) : i("", !0)])]), (f(!0), a(t, null, m(d.value, (e) => (f(), a("div", {
416
+ key: e.picture.id,
417
+ class: "mwnf-picture-narrative__image"
418
+ }, [
419
+ o("button", {
420
+ type: "button",
421
+ onClick: (t) => h(e.picture)
422
+ }, [o("img", {
423
+ src: e.picture.image,
424
+ alt: e.picture.imageAlt ?? ""
425
+ }, null, 8, Je)], 8, qe),
426
+ o("div", $, [o("span", { innerHTML: e.picture.name }, null, 8, Ye), e.picture.detail ? (f(), a("span", Xe, ", " + g(e.picture.detail), 1)) : i("", !0)]),
427
+ e.text ? (f(), a("div", Ze, g(e.text), 1)) : i("", !0)
428
+ ]))), 128))])])) : i("", !0),
429
+ p.value ? (f(), a("div", Qe, [
430
+ o("div", $e, g(_(l)(e.relatedHeadingEntry)), 1),
431
+ o("p", et, g(p.value.reciprocalText || _(l)(e.reciprocalFallbackEntry)), 1),
432
+ o("div", tt, [o("button", {
433
+ type: "button",
434
+ onClick: r[0] ||= (e) => h(p.value.picture)
435
+ }, [o("img", {
436
+ src: p.value.picture.image,
437
+ alt: p.value.picture.imageAlt ?? ""
438
+ }, null, 8, nt)]), o("div", rt, [o("span", { innerHTML: p.value.picture.name }, null, 8, it), p.value.picture.detail ? (f(), a("span", at, ", " + g(p.value.picture.detail), 1)) : i("", !0)])])
439
+ ])) : i("", !0)
440
+ ])) : i("", !0);
441
+ }
442
+ };
443
+ //#endregion
444
+ export { H as a, ce as i, Ie as n, te as o, pe as r, ot as t };
@@ -0,0 +1,154 @@
1
+ import { t as e } from "./PageShell-CbJ9lQoQ.js";
2
+ import { computed as t, createBlock as n, createSlots as r, mergeProps as i, openBlock as a, renderSlot as o, withCtx as s } from "vue";
3
+ import { useI18n as c, useSection as l, useSiteConfig as u, useSiteRights as d } from "@museumwnf/viewer-core";
4
+ import { useRouter as f } from "vue-router";
5
+ //#region src/components/SiteShell.vue
6
+ var p = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {
7
+ __name: "SiteShell",
8
+ props: {
9
+ config: {
10
+ type: Object,
11
+ default: null
12
+ },
13
+ logos: {
14
+ type: Array,
15
+ default: () => []
16
+ }
17
+ },
18
+ setup(p) {
19
+ let m = p, { t: h, locale: g } = c(), _ = f(), v = l(), y = u(), b = t(() => ({
20
+ ...y,
21
+ ...m.config ?? {}
22
+ })), x = t(() => b.value.navigation ?? {}), S = t(() => b.value.logos ?? null), C = t(() => b.value.banner ?? null), w = d(), T = t(() => w.holder ? {
23
+ label: h("record.source.rightsHolder"),
24
+ text: w.attribution ?? w.holder,
25
+ termsHref: w.termsUrl,
26
+ termsLabel: h("record.source.termsOfUse")
27
+ } : null);
28
+ function E(e) {
29
+ return e.href ? e.href : e.to ? _.resolve(e.to).href : "";
30
+ }
31
+ function D(e) {
32
+ return typeof e.when != "function" || !!e.when({
33
+ section: v.value,
34
+ locale: g.value
35
+ });
36
+ }
37
+ function O(e, { active: t = !1 } = {}) {
38
+ let n = {
39
+ label: h(e.label),
40
+ href: E(e),
41
+ external: !!e.external
42
+ };
43
+ return t && (n.active = e.section === v.value), n;
44
+ }
45
+ let k = t(() => Array.isArray(x.value.links) ? x.value.links.filter(D).map((e) => O(e, { active: !0 })) : null), A = t(() => Array.isArray(x.value.headerLinks) ? x.value.headerLinks.map((e) => O(e)) : null), j = t(() => Array.isArray(x.value.footerLinks) ? x.value.footerLinks.map((e) => O(e)) : null), M = t(() => {
46
+ let e = x.value.search;
47
+ return e ? {
48
+ placeholder: e.placeholder ? h(e.placeholder) : "",
49
+ submitLabel: e.submitLabel ? h(e.submitLabel) : ""
50
+ } : null;
51
+ });
52
+ function N(e) {
53
+ let t = x.value.search;
54
+ t?.route && _.push({
55
+ name: t.route,
56
+ query: { [t.key ?? "q"]: e || t.empty || "" }
57
+ });
58
+ }
59
+ function P(e) {
60
+ return typeof e == "function" ? e({
61
+ section: v.value,
62
+ locale: g.value,
63
+ t: h
64
+ }) : typeof e == "string" ? h(e) : e;
65
+ }
66
+ let F = t(() => {
67
+ let e = C.value ? P(C.value.title) : "";
68
+ if (e) return e;
69
+ let t = x.value.sectionTitles?.[v.value];
70
+ return t ? h(t) : "";
71
+ }), I = [
72
+ "variant",
73
+ "image",
74
+ "imageAlt",
75
+ "caption",
76
+ "captionLabel",
77
+ "subtitle",
78
+ "headline",
79
+ "enter",
80
+ "strapline"
81
+ ], L = t(() => {
82
+ let e = {};
83
+ F.value && (e.bannerTitle = F.value);
84
+ for (let t of I) {
85
+ let n = C.value ? P(C.value[t]) : "";
86
+ n && (e[`banner${t[0].toUpperCase()}${t.slice(1)}`] = n);
87
+ }
88
+ return e;
89
+ }), R = t(() => {
90
+ let e = S.value?.header;
91
+ return typeof e == "function" ? m.logos.filter(e) : null;
92
+ }), z = t(() => {
93
+ let e = S.value?.headerTitle;
94
+ return e && R.value?.length ? h(e) : "";
95
+ }), B = t(() => {
96
+ let e = S.value?.sponsorGroups;
97
+ return typeof e == "function" ? e(m.logos, h) : null;
98
+ }), V = t(() => {
99
+ let e = { ...L.value };
100
+ return Array.isArray(x.value.languages) && (e.languages = x.value.languages), k.value && (e.navLinks = k.value), A.value && (e.headerLinks = A.value), j.value && (e.footerLinks = j.value), M.value && (e.search = M.value), R.value && (e.headerLogos = R.value, z.value && (e.headerLogosTitle = z.value)), B.value && (e.sponsorGroups = B.value), T.value && (e.footerAttributionLabel = T.value.label, e.footerAttributionText = T.value.text, e.footerTermsHref = T.value.termsHref, e.footerTermsLabel = T.value.termsLabel), e;
101
+ });
102
+ return (t, c) => (a(), n(e, i({
103
+ ...t.$attrs,
104
+ ...V.value
105
+ }, { onSearch: N }), r({ _: 2 }, [
106
+ t.$slots.header ? {
107
+ name: "header",
108
+ fn: s(() => [o(t.$slots, "header")]),
109
+ key: "0"
110
+ } : void 0,
111
+ t.$slots.brand ? {
112
+ name: "header-brand",
113
+ fn: s(() => [o(t.$slots, "brand")]),
114
+ key: "1"
115
+ } : void 0,
116
+ t.$slots.banner ? {
117
+ name: "banner",
118
+ fn: s(() => [o(t.$slots, "banner")]),
119
+ key: "2"
120
+ } : void 0,
121
+ t.$slots.navigation ? {
122
+ name: "navigation",
123
+ fn: s(() => [o(t.$slots, "navigation")]),
124
+ key: "3"
125
+ } : void 0,
126
+ t.$slots.default || t.$slots.notice || t.$slots["after-content"] ? {
127
+ name: "default",
128
+ fn: s(() => [
129
+ o(t.$slots, "notice"),
130
+ o(t.$slots, "default"),
131
+ o(t.$slots, "after-content")
132
+ ]),
133
+ key: "4"
134
+ } : void 0,
135
+ t.$slots.hyperlinks ? {
136
+ name: "hyperlinks",
137
+ fn: s(() => [o(t.$slots, "hyperlinks")]),
138
+ key: "5"
139
+ } : void 0,
140
+ t.$slots.sponsors ? {
141
+ name: "sponsors",
142
+ fn: s(() => [o(t.$slots, "sponsors")]),
143
+ key: "6"
144
+ } : void 0,
145
+ t.$slots.footer ? {
146
+ name: "footer",
147
+ fn: s(() => [o(t.$slots, "footer")]),
148
+ key: "7"
149
+ } : void 0
150
+ ]), 1040));
151
+ }
152
+ });
153
+ //#endregion
154
+ export { p as t };