@museumwnf/viewer-layout 3.4.0 → 3.5.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.
@@ -1,1487 +0,0 @@
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, getCurrentInstance as c, mergeProps as l, nextTick as u, normalizeClass as d, onBeforeUnmount as f, openBlock as p, ref as m, renderList as h, renderSlot as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, useId as b, useSlots as x, vModelText as S, vShow as C, watch as w, withCtx as T, withDirectives as E, withKeys as D, withModifiers as O } from "vue";
2
- import { useI18n as k } from "@museumwnf/viewer-core/i18n";
3
- import { mdInline as A, sourceUrl as j } from "@museumwnf/viewer-core";
4
- import { useRoute as M } from "vue-router";
5
- //#region src/content/SmartLink.vue
6
- var N = [
7
- "href",
8
- "target",
9
- "rel"
10
- ], P = {
11
- __name: "SmartLink",
12
- props: {
13
- to: {
14
- type: [String, Object],
15
- default: null
16
- },
17
- href: {
18
- type: String,
19
- default: ""
20
- },
21
- external: {
22
- type: Boolean,
23
- default: !1
24
- }
25
- },
26
- setup(e) {
27
- let r = e, a = /^[a-z][a-z0-9+.-]*:/i, o = c()?.appContext.components.RouterLink ?? null, s = t(() => typeof r.to == "string" && a.test(r.to)), u = t(() => !!(r.to && o && !s.value)), d = t(() => r.href || (typeof r.to == "string" ? r.to : ""));
28
- return (t, r) => u.value ? (p(), n(_(y(o)), l({
29
- key: 0,
30
- to: e.to
31
- }, t.$attrs), {
32
- default: T(() => [g(t.$slots, "default")]),
33
- _: 3
34
- }, 16, ["to"])) : (p(), i("a", l({
35
- key: 1,
36
- href: d.value || void 0,
37
- target: e.external ? "_blank" : void 0,
38
- rel: e.external ? "noopener" : void 0
39
- }, t.$attrs), [g(t.$slots, "default")], 16, N));
40
- }
41
- }, F = ["innerHTML"], I = ["innerHTML"], L = {
42
- key: 1,
43
- class: "mwnf-cards__action"
44
- }, R = {
45
- key: 0,
46
- class: "mwnf-cards__image-container"
47
- }, z = ["src", "alt"], B = { class: "mwnf-cards__content" }, V = {
48
- key: 0,
49
- class: "mwnf-cards__number"
50
- }, H = ["innerHTML"], ee = ["innerHTML"], te = {
51
- key: 0,
52
- class: "mwnf-cards__image-container"
53
- }, ne = ["src", "alt"], re = {
54
- key: 1,
55
- class: "mwnf-cards__number"
56
- }, ie = ["innerHTML"], ae = {
57
- key: 3,
58
- class: "mwnf-cards__details"
59
- }, U = { class: "mwnf-cards__summary" }, W = {
60
- key: 0,
61
- class: "mwnf-cards__number"
62
- }, G = ["innerHTML"], K = {
63
- key: 0,
64
- class: "mwnf-cards__children"
65
- }, q = {
66
- __name: "SectionCards",
67
- props: {
68
- cards: {
69
- type: Array,
70
- default: () => []
71
- },
72
- variant: {
73
- type: String,
74
- default: "cards",
75
- validate: (e) => [
76
- "cards",
77
- "rows",
78
- "covers",
79
- "accordion"
80
- ].includes(e)
81
- }
82
- },
83
- setup(t) {
84
- return (c, l) => t.cards.length ? (p(), i("ul", {
85
- key: 0,
86
- class: d(["mwnf-cards", `mwnf-cards--${t.variant}`])
87
- }, [(p(!0), i(e, null, h(t.cards, (c) => (p(), i("li", {
88
- key: c.href ?? c.title,
89
- class: d(["mwnf-cards__card"])
90
- }, [t.variant === "cards" ? (p(), n(P, {
91
- key: 0,
92
- class: "mwnf-cards__link",
93
- to: c.to,
94
- href: c.href
95
- }, {
96
- default: T(() => [
97
- a("span", {
98
- class: "mwnf-cards__title",
99
- innerHTML: y(A)(c.title)
100
- }, null, 8, F),
101
- c.description ? (p(), i("span", {
102
- key: 0,
103
- class: "mwnf-cards__text",
104
- innerHTML: y(A)(c.description)
105
- }, null, 8, I)) : r("", !0),
106
- c.action ? (p(), i("span", L, v(c.action) + " →", 1)) : r("", !0)
107
- ]),
108
- _: 2
109
- }, 1032, ["to", "href"])) : t.variant === "rows" ? (p(), n(P, {
110
- key: 1,
111
- class: "mwnf-cards__link",
112
- to: c.to,
113
- href: c.href
114
- }, {
115
- default: T(() => [c.image ? (p(), i("div", R, [a("img", {
116
- class: "mwnf-cards__image",
117
- src: c.image,
118
- alt: c.alt || ""
119
- }, null, 8, z)])) : r("", !0), a("div", B, [
120
- c.number ? (p(), i("span", V, v(c.number), 1)) : r("", !0),
121
- a("span", {
122
- class: "mwnf-cards__title",
123
- innerHTML: y(A)(c.title)
124
- }, null, 8, H),
125
- c.description ? (p(), i("span", {
126
- key: 1,
127
- class: "mwnf-cards__text",
128
- innerHTML: y(A)(c.description)
129
- }, null, 8, ee)) : r("", !0)
130
- ])]),
131
- _: 2
132
- }, 1032, ["to", "href"])) : t.variant === "covers" ? (p(), n(P, {
133
- key: 2,
134
- class: "mwnf-cards__link",
135
- to: c.to,
136
- href: c.href
137
- }, {
138
- default: T(() => [
139
- c.image ? (p(), i("div", te, [a("img", {
140
- class: "mwnf-cards__image",
141
- src: c.image,
142
- alt: c.alt || ""
143
- }, null, 8, ne)])) : r("", !0),
144
- c.number ? (p(), i("span", re, v(c.number), 1)) : r("", !0),
145
- a("span", {
146
- class: "mwnf-cards__title",
147
- innerHTML: y(A)(c.title)
148
- }, null, 8, ie)
149
- ]),
150
- _: 2
151
- }, 1032, ["to", "href"])) : t.variant === "accordion" ? (p(), i("details", ae, [a("summary", U, [c.number ? (p(), i("span", W, v(c.number), 1)) : r("", !0), a("span", {
152
- class: "mwnf-cards__title",
153
- innerHTML: y(A)(c.title)
154
- }, null, 8, G)]), c.children?.length ? (p(), i("ul", K, [(p(!0), i(e, null, h(c.children, (e) => (p(), i("li", {
155
- key: e.href ?? e.title,
156
- class: "mwnf-cards__child"
157
- }, [s(P, {
158
- class: "mwnf-cards__child-link",
159
- to: e.to,
160
- href: e.href
161
- }, {
162
- default: T(() => [o(v(e.title), 1)]),
163
- _: 2
164
- }, 1032, ["to", "href"])]))), 128))])) : r("", !0)])) : r("", !0)]))), 128))], 2)) : r("", !0);
165
- }
166
- }, J = ["aria-busy"], oe = {
167
- key: 0,
168
- class: "mwnf-list__status"
169
- }, se = {
170
- key: 1,
171
- class: "mwnf-list__rows"
172
- }, ce = { class: "mwnf-list__thumb" }, le = ["src", "alt"], ue = { class: "mwnf-list__body" }, de = ["innerHTML"], fe = {
173
- key: 0,
174
- class: "mwnf-list__meta"
175
- }, pe = {
176
- key: 0,
177
- class: "mwnf-list__badge"
178
- }, me = {
179
- key: 2,
180
- class: "mwnf-list__empty"
181
- }, Y = {
182
- __name: "RecordList",
183
- props: {
184
- records: {
185
- type: Array,
186
- default: () => []
187
- },
188
- loading: {
189
- type: Boolean,
190
- default: !1
191
- },
192
- loadingText: {
193
- type: String,
194
- default: ""
195
- }
196
- },
197
- setup(t) {
198
- let n = !!x().empty;
199
- return (o, c) => (p(), i("div", {
200
- class: d(["mwnf-list", { "mwnf-list--loading": t.loading }]),
201
- "aria-busy": t.loading ? "true" : void 0
202
- }, [t.loading && t.loadingText ? (p(), i("p", oe, v(t.loadingText), 1)) : t.records.length ? (p(), i("ul", se, [(p(!0), i(e, null, h(t.records, (t) => (p(), i("li", {
203
- key: t.id,
204
- class: "mwnf-list__row"
205
- }, [s(P, {
206
- class: "mwnf-list__link",
207
- to: t.to,
208
- href: t.href
209
- }, {
210
- default: T(() => [a("span", ce, [t.image ? (p(), i("img", {
211
- key: 0,
212
- src: t.image,
213
- alt: t.imageAlt ?? "",
214
- loading: "lazy"
215
- }, null, 8, le)) : r("", !0)]), a("span", ue, [a("span", {
216
- class: "mwnf-list__name",
217
- innerHTML: t.name
218
- }, null, 8, de), t.meta?.length || t.badge ? (p(), i("span", fe, [(p(!0), i(e, null, h(t.meta ?? [], (e, t) => (p(), i("span", {
219
- key: t,
220
- class: "mwnf-list__meta-item"
221
- }, v(e), 1))), 128)), t.badge ? (p(), i("span", pe, v(t.badge), 1)) : r("", !0)])) : r("", !0)])]),
222
- _: 2
223
- }, 1032, ["to", "href"])]))), 128))])) : y(n) ? (p(), i("div", me, [g(o.$slots, "empty")])) : r("", !0)], 10, J));
224
- }
225
- }, he = ["aria-busy"], ge = {
226
- key: 0,
227
- class: "mwnf-grid__status"
228
- }, _e = {
229
- key: 1,
230
- class: "mwnf-grid__tiles"
231
- }, ve = ["onMouseenter", "onFocusin"], ye = { class: "mwnf-grid__media" }, be = ["src", "alt"], xe = {
232
- key: 1,
233
- class: "mwnf-grid__image mwnf-grid__image--empty",
234
- "aria-hidden": "true"
235
- }, Se = { class: "mwnf-grid__card" }, Ce = ["src"], we = { class: "mwnf-grid__card-body" }, Te = ["innerHTML"], Ee = {
236
- key: 0,
237
- class: "mwnf-grid__badge"
238
- }, De = {
239
- key: 2,
240
- class: "mwnf-grid__empty"
241
- }, X = {
242
- __name: "RecordGrid",
243
- props: {
244
- records: {
245
- type: Array,
246
- default: () => []
247
- },
248
- loading: {
249
- type: Boolean,
250
- default: !1
251
- },
252
- loadingText: {
253
- type: String,
254
- default: ""
255
- },
256
- actionLabel: {
257
- type: String,
258
- default: ""
259
- },
260
- dateCutoff: {
261
- type: Number,
262
- default: 80
263
- }
264
- },
265
- setup(t) {
266
- let n = t, c = !!x().empty, l = m(null);
267
- function u(e) {
268
- let t = String(e ?? "");
269
- return t.length > n.dateCutoff ? `${t.slice(0, n.dateCutoff - 1)}[...]` : t;
270
- }
271
- return (n, f) => (p(), i("div", {
272
- class: d(["mwnf-grid", { "mwnf-grid--loading": t.loading }]),
273
- "aria-busy": t.loading ? "true" : void 0
274
- }, [t.loading && t.loadingText ? (p(), i("p", ge, v(t.loadingText), 1)) : t.records.length ? (p(), i("ul", _e, [(p(!0), i(e, null, h(t.records, (n) => (p(), i("li", {
275
- key: n.id,
276
- class: d(["mwnf-grid__tile", { "mwnf-grid__tile--hover": l.value === n.id }]),
277
- onMouseenter: (e) => l.value = n.id,
278
- onMouseleave: f[0] ||= (e) => l.value = null,
279
- onFocusin: (e) => l.value = n.id,
280
- onFocusout: f[1] ||= (e) => l.value = null
281
- }, [a("span", ye, [n.image ? (p(), i("img", {
282
- key: 0,
283
- class: "mwnf-grid__image",
284
- src: n.image,
285
- alt: n.imageAlt ?? "",
286
- loading: "lazy"
287
- }, null, 8, be)) : (p(), i("span", xe))]), a("div", Se, [s(P, {
288
- class: "mwnf-grid__card-media",
289
- to: n.to,
290
- href: n.href,
291
- tabindex: "-1",
292
- "aria-hidden": "true"
293
- }, {
294
- default: T(() => [n.image ? (p(), i("img", {
295
- key: 0,
296
- src: n.image,
297
- alt: ""
298
- }, null, 8, Ce)) : r("", !0)]),
299
- _: 2
300
- }, 1032, ["to", "href"]), a("div", we, [
301
- a("p", {
302
- class: "mwnf-grid__name",
303
- innerHTML: n.name
304
- }, null, 8, Te),
305
- (p(!0), i(e, null, h(n.meta ?? [], (e, t) => (p(), i("p", {
306
- key: t,
307
- class: "mwnf-grid__meta"
308
- }, v(u(e)), 1))), 128)),
309
- n.badge ? (p(), i("p", Ee, v(n.badge), 1)) : r("", !0),
310
- s(P, {
311
- class: "mwnf-grid__action",
312
- to: n.to,
313
- href: n.href
314
- }, {
315
- default: T(() => [o(v(t.actionLabel || n.name.replace(/<[^>]+>/g, "")) + " › ", 1)]),
316
- _: 2
317
- }, 1032, ["to", "href"])
318
- ])])], 42, ve))), 128))])) : y(c) ? (p(), i("div", De, [g(n.$slots, "empty")])) : r("", !0)], 10, he));
319
- }
320
- }, Oe = ["aria-label"], ke = ["disabled"], Ae = ["disabled"], je = ["aria-current", "onClick"], Me = ["disabled"], Ne = ["disabled"], Pe = { class: "mwnf-pagination__position" }, Fe = { class: "mwnf-pagination__jump" }, Ie = ["max"], Le = {
321
- __name: "Pagination",
322
- props: {
323
- pageInfo: {
324
- type: Object,
325
- required: !0
326
- },
327
- window: {
328
- type: Number,
329
- default: 5
330
- },
331
- jump: {
332
- type: Boolean,
333
- default: !1
334
- },
335
- ends: {
336
- type: Boolean,
337
- default: !0
338
- }
339
- },
340
- emits: ["navigate"],
341
- setup(n, { emit: s }) {
342
- let c = n, l = s, { t: u } = k(), f = t(() => c.pageInfo?.currentPage ?? 1), g = t(() => c.pageInfo?.lastPage ?? 1), _ = t(() => {
343
- let e = Math.max(1, c.window), t = Math.max(1, f.value - Math.floor(e / 2)), n = Math.min(g.value, t + e - 1);
344
- t = Math.max(1, n - e + 1);
345
- let r = [];
346
- for (let e = t; e <= n; e++) r.push(e);
347
- return r;
348
- }), b = m(String(f.value));
349
- w(f, (e) => {
350
- b.value = String(e);
351
- });
352
- function x(e) {
353
- let t = Math.min(Math.max(1, Number.parseInt(e, 10) || 1), g.value);
354
- t !== f.value && l("navigate", t);
355
- }
356
- return (t, s) => g.value > 1 ? (p(), i("nav", {
357
- key: 0,
358
- class: "mwnf-pagination",
359
- "aria-label": y(u)("catalogue.pagination.page")
360
- }, [
361
- n.ends ? (p(), i("button", {
362
- key: 0,
363
- type: "button",
364
- class: "mwnf-pagination__button",
365
- disabled: f.value === 1,
366
- onClick: s[0] ||= (e) => x(1)
367
- }, " « " + v(y(u)("catalogue.pagination.first")), 9, ke)) : r("", !0),
368
- a("button", {
369
- type: "button",
370
- class: "mwnf-pagination__button",
371
- disabled: f.value === 1,
372
- onClick: s[1] ||= (e) => x(f.value - 1)
373
- }, " ‹ " + v(y(u)("core.pagination.previous")), 9, Ae),
374
- (p(!0), i(e, null, h(_.value, (e) => (p(), i("button", {
375
- key: e,
376
- type: "button",
377
- class: d(["mwnf-pagination__button mwnf-pagination__number", { "mwnf-pagination__button--active": e === f.value }]),
378
- "aria-current": e === f.value ? "page" : void 0,
379
- onClick: (t) => x(e)
380
- }, v(e), 11, je))), 128)),
381
- a("button", {
382
- type: "button",
383
- class: "mwnf-pagination__button",
384
- disabled: f.value === g.value,
385
- onClick: s[2] ||= (e) => x(f.value + 1)
386
- }, v(y(u)("core.pagination.next")) + " › ", 9, Me),
387
- n.ends ? (p(), i("button", {
388
- key: 1,
389
- type: "button",
390
- class: "mwnf-pagination__button",
391
- disabled: f.value === g.value,
392
- onClick: s[3] ||= (e) => x(g.value)
393
- }, v(y(u)("catalogue.pagination.last")) + " » ", 9, Ne)) : r("", !0),
394
- a("span", Pe, [n.jump ? (p(), i(e, { key: 0 }, [
395
- a("label", Fe, [a("span", null, v(y(u)("catalogue.pagination.page")), 1), E(a("input", {
396
- "onUpdate:modelValue": s[4] ||= (e) => b.value = e,
397
- class: "mwnf-pagination__jump-field",
398
- type: "number",
399
- min: "1",
400
- max: g.value,
401
- onKeyup: s[5] ||= D((e) => x(b.value), ["enter"])
402
- }, null, 40, Ie), [[S, b.value]])]),
403
- a("span", null, "/ " + v(g.value), 1),
404
- a("button", {
405
- type: "button",
406
- class: "mwnf-pagination__button",
407
- onClick: s[6] ||= (e) => x(b.value)
408
- }, v(y(u)("catalogue.pagination.go")), 1)
409
- ], 64)) : (p(), i(e, { key: 1 }, [o(v(f.value) + " / " + v(g.value), 1)], 64))])
410
- ], 8, Oe)) : r("", !0);
411
- }
412
- }, Re = ["for"], ze = {
413
- key: 0,
414
- class: "mwnf-facet__label"
415
- }, Be = [
416
- "id",
417
- "value",
418
- "disabled"
419
- ], Ve = {
420
- key: 0,
421
- value: "",
422
- disabled: ""
423
- }, He = {
424
- key: 1,
425
- value: ""
426
- }, Ue = ["value"], We = {
427
- __name: "FacetSelect",
428
- props: {
429
- label: {
430
- type: String,
431
- default: ""
432
- },
433
- options: {
434
- type: Array,
435
- default: () => []
436
- },
437
- modelValue: {
438
- type: [String, Number],
439
- default: ""
440
- },
441
- placeholder: {
442
- type: String,
443
- default: ""
444
- },
445
- anyLabel: {
446
- type: String,
447
- default: ""
448
- },
449
- disabled: {
450
- type: Boolean,
451
- default: !1
452
- },
453
- hideEmpty: {
454
- type: Boolean,
455
- default: !1
456
- }
457
- },
458
- emits: ["update:modelValue"],
459
- setup(n, { emit: o }) {
460
- let s = n, c = o, l = b(), u = t(() => !s.hideEmpty || s.options.length > 0);
461
- return (t, o) => u.value ? (p(), i("label", {
462
- key: 0,
463
- class: "mwnf-facet",
464
- for: y(l)
465
- }, [n.label ? (p(), i("span", ze, v(n.label), 1)) : r("", !0), a("select", {
466
- id: y(l),
467
- class: "mwnf-facet__select",
468
- value: String(n.modelValue ?? ""),
469
- disabled: n.disabled,
470
- onChange: o[0] ||= (e) => c("update:modelValue", e.target.value)
471
- }, [
472
- n.placeholder ? (p(), i("option", Ve, v(n.placeholder), 1)) : r("", !0),
473
- n.anyLabel ? (p(), i("option", He, v(n.anyLabel), 1)) : r("", !0),
474
- (p(!0), i(e, null, h(n.options, (e) => (p(), i("option", {
475
- key: e.value,
476
- value: String(e.value)
477
- }, v(e.label), 9, Ue))), 128))
478
- ], 40, Be)], 8, Re)) : r("", !0);
479
- }
480
- }, Ge = {
481
- key: 0,
482
- class: "mwnf-filter__title"
483
- }, Ke = ["disabled"], qe = { class: "mwnf-filter__actions" }, Je = {
484
- key: 0,
485
- type: "submit",
486
- class: "mwnf-filter__button mwnf-filter__button--apply"
487
- }, Ye = {
488
- __name: "FilterPanel",
489
- props: {
490
- title: {
491
- type: String,
492
- default: ""
493
- },
494
- mode: {
495
- type: String,
496
- default: "apply"
497
- },
498
- applyLabel: {
499
- type: String,
500
- default: ""
501
- },
502
- resetLabel: {
503
- type: String,
504
- default: ""
505
- },
506
- disabled: {
507
- type: Boolean,
508
- default: !1
509
- }
510
- },
511
- emits: ["apply", "reset"],
512
- setup(e, { emit: t }) {
513
- let n = t, { t: o } = k();
514
- return (t, s) => (p(), i("form", {
515
- class: d(["mwnf-filter", `mwnf-filter--${e.mode}`]),
516
- onSubmit: s[1] ||= O((e) => n("apply"), ["prevent"])
517
- }, [
518
- e.title ? (p(), i("p", Ge, v(e.title), 1)) : r("", !0),
519
- a("fieldset", {
520
- class: "mwnf-filter__controls",
521
- disabled: e.disabled
522
- }, [g(t.$slots, "default")], 8, Ke),
523
- a("div", qe, [e.mode === "apply" ? (p(), i("button", Je, v(e.applyLabel || y(o)("core.action.apply")), 1)) : r("", !0), a("button", {
524
- type: "button",
525
- class: "mwnf-filter__button mwnf-filter__button--reset",
526
- onClick: s[0] ||= (e) => n("reset")
527
- }, v(e.resetLabel || y(o)("core.action.reset")), 1)])
528
- ], 34));
529
- }
530
- }, Xe = {
531
- key: 0,
532
- class: "mwnf-summary"
533
- }, Ze = {
534
- key: 0,
535
- class: "mwnf-summary__parts"
536
- }, Qe = {
537
- key: 0,
538
- class: "mwnf-summary__label"
539
- }, $e = {
540
- key: 1,
541
- class: "mwnf-summary__count"
542
- }, et = {
543
- key: 2,
544
- class: "mwnf-summary__value"
545
- }, tt = {
546
- key: 1,
547
- class: "mwnf-summary__actions"
548
- }, nt = {
549
- __name: "ResultsSummary",
550
- props: { parts: {
551
- type: Array,
552
- default: () => []
553
- } },
554
- setup(t) {
555
- let n = !!x().actions;
556
- return (a, s) => t.parts.length || a.$slots.default || y(n) ? (p(), i("div", Xe, [
557
- t.parts.length ? (p(), i("p", Ze, [(p(!0), i(e, null, h(t.parts, (e, t) => (p(), i("span", {
558
- key: t,
559
- class: "mwnf-summary__part"
560
- }, [
561
- e.label ? (p(), i("span", Qe, v(e.label), 1)) : r("", !0),
562
- s[0] ||= o(v(" "), -1),
563
- e.count == null ? r("", !0) : (p(), i("span", $e, v(e.count), 1)),
564
- s[1] ||= o(v(" "), -1),
565
- e.value ? (p(), i("span", et, v(e.value), 1)) : r("", !0)
566
- ]))), 128))])) : r("", !0),
567
- g(a.$slots, "default"),
568
- y(n) ? (p(), i("div", tt, [g(a.$slots, "actions")])) : r("", !0)
569
- ])) : r("", !0);
570
- }
571
- }, rt = ["aria-label"], it = [
572
- "aria-pressed",
573
- "lang",
574
- "onClick"
575
- ], at = {
576
- __name: "RecordLanguages",
577
- props: {
578
- languages: {
579
- type: Array,
580
- default: () => []
581
- },
582
- language: {
583
- type: String,
584
- default: ""
585
- }
586
- },
587
- emits: ["select"],
588
- setup(n, { emit: a }) {
589
- let o = n, s = a, { t: c } = k(), l = t(() => o.languages.map((e) => typeof e == "string" ? {
590
- code: e,
591
- label: e.toUpperCase()
592
- } : e));
593
- return (t, a) => l.value.length > 1 ? (p(), i("div", {
594
- key: 0,
595
- class: "mwnf-languages",
596
- role: "group",
597
- "aria-label": y(c)("record.sheet.languages")
598
- }, [(p(!0), i(e, null, h(l.value, (e) => (p(), i("button", {
599
- key: e.code,
600
- type: "button",
601
- class: d(["mwnf-languages__button", { "mwnf-languages__button--active": e.code === n.language }]),
602
- "aria-pressed": e.code === n.language ? "true" : "false",
603
- lang: e.code,
604
- onClick: (t) => s("select", e.code)
605
- }, v(e.label), 11, it))), 128))], 8, rt)) : r("", !0);
606
- }
607
- }, ot = ["dir"], st = { key: 0 }, ct = {
608
- class: "mwnf-sheet__label",
609
- scope: "row"
610
- }, lt = { class: "mwnf-sheet__value" }, ut = ["href"], dt = ["innerHTML"], ft = {
611
- key: 0,
612
- class: "mwnf-sheet__row mwnf-sheet__row--short"
613
- }, pt = {
614
- class: "mwnf-sheet__label",
615
- scope: "row"
616
- }, mt = ["aria-expanded"], ht = { class: "mwnf-sheet__value" }, gt = ["innerHTML"], _t = { class: "mwnf-sheet__value" }, vt = ["href"], yt = ["innerHTML"], bt = { class: "mwnf-sheet__label mwnf-sheet__label--short" }, xt = ["aria-expanded"], St = { class: "mwnf-sheet__value" }, Ct = ["innerHTML"], wt = {
617
- __name: "RecordSheet",
618
- props: {
619
- rows: {
620
- type: Array,
621
- default: () => []
622
- },
623
- layout: {
624
- type: String,
625
- default: "table"
626
- },
627
- dir: {
628
- type: String,
629
- default: ""
630
- },
631
- shortDescription: {
632
- type: Object,
633
- default: null
634
- },
635
- shortDescriptionAfter: {
636
- type: String,
637
- default: "description"
638
- },
639
- shortDescriptionOpen: {
640
- type: Boolean,
641
- default: !1
642
- }
643
- },
644
- setup(t) {
645
- let o = t, { t: s } = k(), c = m(o.shortDescriptionOpen);
646
- w(() => o.shortDescription, () => {
647
- c.value = o.shortDescriptionOpen;
648
- });
649
- let l = (e) => e.render === "custom" || e.render === "link";
650
- return (o, u) => (p(), i("div", {
651
- class: d(["mwnf-sheet", `mwnf-sheet--${t.layout}`]),
652
- dir: t.dir || void 0
653
- }, [(p(), n(_(t.layout === "list" ? "dl" : "table"), { class: "mwnf-sheet__rows" }, {
654
- default: T(() => [t.layout === "list" ? (p(!0), i(e, { key: 1 }, h(t.rows, (n) => (p(), i(e, { key: n.key }, [
655
- a("dt", { class: d(["mwnf-sheet__label", `mwnf-sheet__label--${n.key}`]) }, v(n.label), 3),
656
- a("dd", _t, [l(n) ? g(o.$slots, n.key, { row: n }, () => [n.render === "link" ? (p(), i("a", {
657
- key: 0,
658
- href: n.value,
659
- target: "_blank",
660
- rel: "noopener"
661
- }, v(n.value), 9, vt)) : r("", !0)], void 0, 0) : (p(), i("span", {
662
- key: 1,
663
- class: d(`mwnf-sheet__${n.render}`),
664
- innerHTML: n.html
665
- }, null, 10, yt))]),
666
- t.shortDescription && n.key === t.shortDescriptionAfter ? (p(), i(e, { key: 0 }, [a("dt", bt, [a("button", {
667
- type: "button",
668
- class: "mwnf-sheet__toggle",
669
- "aria-expanded": c.value ? "true" : "false",
670
- onClick: u[1] ||= (e) => c.value = !c.value
671
- }, v(c.value ? y(s)("record.action.hideShortDescription") : y(s)("record.action.viewShortDescription")), 9, xt)]), a("dd", St, [c.value ? (p(), i("div", {
672
- key: 0,
673
- class: "mwnf-sheet__block",
674
- innerHTML: t.shortDescription.html
675
- }, null, 8, Ct)) : r("", !0)])], 64)) : r("", !0)
676
- ], 64))), 128)) : (p(), i("tbody", st, [(p(!0), i(e, null, h(t.rows, (n) => (p(), i(e, { key: n.key }, [a("tr", { class: d(["mwnf-sheet__row", `mwnf-sheet__row--${n.key}`]) }, [a("th", ct, v(n.label), 1), a("td", lt, [l(n) ? g(o.$slots, n.key, { row: n }, () => [n.render === "link" ? (p(), i("a", {
677
- key: 0,
678
- href: n.value,
679
- target: "_blank",
680
- rel: "noopener"
681
- }, v(n.value), 9, ut)) : r("", !0)], void 0, 0) : (p(), i("span", {
682
- key: 1,
683
- class: d(`mwnf-sheet__${n.render}`),
684
- innerHTML: n.html
685
- }, null, 10, dt))])], 2), t.shortDescription && n.key === t.shortDescriptionAfter ? (p(), i("tr", ft, [a("th", pt, [a("button", {
686
- type: "button",
687
- class: "mwnf-sheet__toggle",
688
- "aria-expanded": c.value ? "true" : "false",
689
- onClick: u[0] ||= (e) => c.value = !c.value
690
- }, v(c.value ? y(s)("record.action.hideShortDescription") : y(s)("record.action.viewShortDescription")), 9, mt)]), a("td", ht, [c.value ? (p(), i("div", {
691
- key: 0,
692
- class: "mwnf-sheet__block",
693
- innerHTML: t.shortDescription.html
694
- }, null, 8, gt)) : r("", !0)])])) : r("", !0)], 64))), 128))]))]),
695
- _: 3
696
- }))], 10, ot));
697
- }
698
- }, Tt = ["dir"], Et = {
699
- key: 0,
700
- class: "mwnf-sheet-section__heading"
701
- }, Dt = ["innerHTML"], Ot = {
702
- __name: "SheetSection",
703
- props: {
704
- heading: {
705
- type: String,
706
- default: ""
707
- },
708
- html: {
709
- type: String,
710
- default: ""
711
- },
712
- dir: {
713
- type: String,
714
- default: ""
715
- }
716
- },
717
- setup(e) {
718
- return (t, n) => (p(), i("section", {
719
- class: "mwnf-sheet-section",
720
- dir: e.dir || void 0
721
- }, [
722
- e.heading ? (p(), i("h2", Et, v(e.heading), 1)) : r("", !0),
723
- e.html ? (p(), i("div", {
724
- key: 1,
725
- class: "mwnf-sheet-section__body mwnf-sheet__block",
726
- innerHTML: e.html
727
- }, null, 8, Dt)) : r("", !0),
728
- g(t.$slots, "default")
729
- ], 8, Tt));
730
- }
731
- }, kt = {
732
- key: 0,
733
- class: "mwnf-credits"
734
- }, At = {
735
- key: 0,
736
- class: "mwnf-credits__heading"
737
- }, jt = {
738
- key: 1,
739
- class: "mwnf-credits__list"
740
- }, Mt = { class: "mwnf-credits__label" }, Nt = { class: "mwnf-credits__value" }, Pt = {
741
- key: 2,
742
- class: "mwnf-credits__number"
743
- }, Ft = {
744
- key: 0,
745
- class: "mwnf-credits__label"
746
- }, It = { class: "mwnf-credits__heading" }, Lt = { class: "mwnf-credits__citation" }, Rt = {
747
- __name: "RecordCredits",
748
- props: {
749
- credits: {
750
- type: Array,
751
- default: () => []
752
- },
753
- workingNumber: {
754
- type: String,
755
- default: ""
756
- },
757
- workingNumberLabel: {
758
- type: String,
759
- default: ""
760
- },
761
- citation: {
762
- type: String,
763
- default: ""
764
- },
765
- heading: {
766
- type: String,
767
- default: ""
768
- },
769
- citationHeading: {
770
- type: String,
771
- default: ""
772
- }
773
- },
774
- setup(n) {
775
- let o = n, { t: s } = k(), c = t(() => o.credits.length > 0 || o.workingNumber || o.citation);
776
- return (t, o) => c.value ? (p(), i("section", kt, [
777
- n.credits.length || n.workingNumber ? (p(), i("h2", At, v(n.heading || y(s)("record.sheet.credits")), 1)) : r("", !0),
778
- n.credits.length ? (p(), i("dl", jt, [(p(!0), i(e, null, h(n.credits, (t) => (p(), i(e, { key: t.label }, [a("dt", Mt, v(t.label), 1), a("dd", Nt, v(t.value), 1)], 64))), 128))])) : r("", !0),
779
- n.workingNumber ? (p(), i("p", Pt, [n.workingNumberLabel ? (p(), i("span", Ft, v(n.workingNumberLabel), 1)) : r("", !0), a("strong", null, v(n.workingNumber), 1)])) : r("", !0),
780
- n.citation ? (p(), i(e, { key: 3 }, [a("h2", It, v(n.citationHeading || y(s)("record.citation.heading")), 1), a("p", Lt, v(n.citation), 1)], 64)) : r("", !0)
781
- ])) : r("", !0);
782
- }
783
- }, zt = {
784
- key: 0,
785
- class: "mwnf-source-credit"
786
- }, Bt = { class: "mwnf-source-credit__label" }, Vt = ["href"], Ht = {
787
- __name: "SourceCredit",
788
- props: {
789
- route: {
790
- type: [Object, String],
791
- default: null
792
- },
793
- labelEntry: {
794
- type: String,
795
- default: "record.source.label"
796
- }
797
- },
798
- setup(e) {
799
- let n = e, { t: s } = k(), c = M(), l = t(() => j(n.route ?? c));
800
- return (t, n) => l.value ? (p(), i("p", zt, [
801
- a("span", Bt, v(y(s)(e.labelEntry)), 1),
802
- n[0] ||= o(),
803
- a("a", { href: l.value }, v(l.value), 9, Vt)
804
- ])) : r("", !0);
805
- }
806
- }, Ut = {
807
- key: 0,
808
- class: "mwnf-related"
809
- }, Wt = {
810
- key: 0,
811
- class: "mwnf-related__heading"
812
- }, Gt = {
813
- __name: "RelatedRecords",
814
- props: {
815
- heading: {
816
- type: String,
817
- default: ""
818
- },
819
- records: {
820
- type: Array,
821
- default: () => []
822
- },
823
- variant: {
824
- type: String,
825
- default: "list"
826
- },
827
- actionLabel: {
828
- type: String,
829
- default: ""
830
- }
831
- },
832
- setup(e) {
833
- return (t, a) => e.records.length || t.$slots.default ? (p(), i("section", Ut, [
834
- e.heading ? (p(), i("h2", Wt, v(e.heading), 1)) : r("", !0),
835
- e.variant === "grid" ? (p(), n(X, {
836
- key: 1,
837
- records: e.records,
838
- "action-label": e.actionLabel
839
- }, null, 8, ["records", "action-label"])) : (p(), n(Y, {
840
- key: 2,
841
- records: e.records
842
- }, null, 8, ["records"])),
843
- g(t.$slots, "default")
844
- ])) : r("", !0);
845
- }
846
- }, Kt = ["src", "alt"], qt = {
847
- key: 0,
848
- class: "mwnf-media__caption"
849
- }, Jt = { key: 0 }, Yt = {
850
- key: 1,
851
- class: "mwnf-media__credit"
852
- }, Xt = {
853
- key: 2,
854
- class: "mwnf-media__credit"
855
- }, Zt = ["src", "alt"], Qt = {
856
- key: 0,
857
- class: "mwnf-media__thumbs"
858
- }, $t = [
859
- "aria-pressed",
860
- "title",
861
- "onClick"
862
- ], en = ["src", "alt"], tn = {
863
- key: 1,
864
- class: "mwnf-media__caption"
865
- }, nn = { key: 0 }, rn = {
866
- key: 1,
867
- class: "mwnf-media__credit"
868
- }, an = ["aria-label"], on = ["aria-label"], sn = ["src", "alt"], cn = ["aria-label"], Z = {
869
- __name: "MediaGallery",
870
- props: {
871
- images: {
872
- type: Array,
873
- default: () => []
874
- },
875
- start: {
876
- type: Number,
877
- default: 0
878
- },
879
- variant: {
880
- type: String,
881
- default: ""
882
- }
883
- },
884
- setup(n) {
885
- let o = n, { t: s } = k(), c = m(Math.min(o.start, Math.max(0, o.images.length - 1)));
886
- w(() => o.images, () => {
887
- c.value = 0;
888
- });
889
- let l = t(() => o.images[c.value] ?? null), u = t(() => {
890
- let e = [];
891
- return l.value?.photographer && e.push(`${s("record.media.photograph")}: ${l.value.photographer}`), l.value?.copyright && e.push(`© ${l.value.copyright}`), e.join(" — ");
892
- }), g = m(!1), _ = null, b = m(null);
893
- function x(e) {
894
- c.value = (e + o.images.length) % o.images.length;
895
- }
896
- function S() {
897
- l.value && (_ = document.activeElement, g.value = !0, document.addEventListener("keydown", T), requestAnimationFrame(() => b.value?.focus?.()));
898
- }
899
- function C() {
900
- g.value = !1, document.removeEventListener("keydown", T), _?.focus?.(), _ = null;
901
- }
902
- function T(e) {
903
- e.key === "Escape" ? C() : e.key === "ArrowRight" ? x(c.value + 1) : e.key === "ArrowLeft" && x(c.value - 1);
904
- }
905
- return f(() => document.removeEventListener("keydown", T)), (t, o) => n.images.length ? (p(), i("div", {
906
- key: 0,
907
- class: d(["mwnf-media", n.variant ? `mwnf-media--${n.variant}` : ""])
908
- }, [n.variant === "row" ? (p(!0), i(e, { key: 0 }, h(n.images, (e, t) => (p(), i("figure", {
909
- key: e.url ?? t,
910
- class: "mwnf-media__figure"
911
- }, [a("img", {
912
- class: "mwnf-media__image",
913
- src: e.url,
914
- alt: e.alt ?? "",
915
- loading: "lazy"
916
- }, null, 8, Kt), e.caption || e.photographer || e.copyright ? (p(), i("figcaption", qt, [
917
- e.caption ? (p(), i("span", Jt, v(e.caption), 1)) : r("", !0),
918
- e.photographer ? (p(), i("span", Yt, v(y(s)("record.media.photograph")) + ": " + v(e.photographer), 1)) : r("", !0),
919
- e.copyright ? (p(), i("span", Xt, "© " + v(e.copyright), 1)) : r("", !0)
920
- ])) : r("", !0)]))), 128)) : (p(), i(e, { key: 1 }, [
921
- a("button", {
922
- type: "button",
923
- class: "mwnf-media__main",
924
- onClick: S
925
- }, [a("img", {
926
- class: "mwnf-media__image",
927
- src: l.value.url,
928
- alt: l.value.alt ?? ""
929
- }, null, 8, Zt)]),
930
- n.images.length > 1 ? (p(), i("ul", Qt, [(p(!0), i(e, null, h(n.images, (e, t) => (p(), i("li", { key: e.url ?? t }, [a("button", {
931
- type: "button",
932
- class: d(["mwnf-media__thumb", { "mwnf-media__thumb--active": t === c.value }]),
933
- "aria-pressed": t === c.value ? "true" : "false",
934
- title: [e.photographer, e.copyright].filter(Boolean).join(" — ") || void 0,
935
- onClick: (e) => x(t)
936
- }, [a("img", {
937
- src: e.url,
938
- alt: e.alt ?? "",
939
- loading: "lazy"
940
- }, null, 8, en)], 10, $t)]))), 128))])) : r("", !0),
941
- l.value.caption || u.value ? (p(), i("p", tn, [l.value.caption ? (p(), i("span", nn, v(l.value.caption), 1)) : r("", !0), u.value ? (p(), i("span", rn, v(u.value), 1)) : r("", !0)])) : r("", !0),
942
- g.value ? (p(), i("div", {
943
- key: 2,
944
- class: "mwnf-lightbox",
945
- role: "dialog",
946
- "aria-modal": "true",
947
- onClick: O(C, ["self"])
948
- }, [
949
- a("button", {
950
- ref_key: "closeButton",
951
- ref: b,
952
- type: "button",
953
- class: "mwnf-lightbox__close",
954
- "aria-label": y(s)("core.action.close"),
955
- onClick: C
956
- }, "✕", 8, an),
957
- n.images.length > 1 ? (p(), i("button", {
958
- key: 0,
959
- type: "button",
960
- class: "mwnf-lightbox__control mwnf-lightbox__control--previous",
961
- "aria-label": y(s)("core.pagination.previous"),
962
- onClick: o[0] ||= O((e) => x(c.value - 1), ["stop"])
963
- }, "‹", 8, on)) : r("", !0),
964
- a("img", {
965
- class: "mwnf-lightbox__image",
966
- src: l.value.url,
967
- alt: l.value.alt ?? ""
968
- }, null, 8, sn),
969
- n.images.length > 1 ? (p(), i("button", {
970
- key: 1,
971
- type: "button",
972
- class: "mwnf-lightbox__control mwnf-lightbox__control--next",
973
- "aria-label": y(s)("core.pagination.next"),
974
- onClick: o[1] ||= O((e) => x(c.value + 1), ["stop"])
975
- }, "›", 8, cn)) : r("", !0)
976
- ])) : r("", !0)
977
- ], 64))], 2)) : r("", !0);
978
- }
979
- }, ln = ["aria-label", "dir"], un = { class: "mwnf-popover__title" }, dn = ["aria-label"], fn = { class: "mwnf-popover__body" }, pn = { class: "mwnf-popover__term" }, mn = ["innerHTML"], hn = {
980
- key: 1,
981
- class: "mwnf-popover__definition"
982
- }, gn = {
983
- __name: "GlossaryPopover",
984
- props: {
985
- term: {
986
- type: Object,
987
- default: null
988
- },
989
- html: {
990
- type: String,
991
- default: ""
992
- },
993
- dir: {
994
- type: String,
995
- default: ""
996
- }
997
- },
998
- emits: ["close"],
999
- setup(e, { emit: t }) {
1000
- let n = e, o = t, { t: s } = k(), c = m(null), l = null;
1001
- function u() {
1002
- o("close");
1003
- }
1004
- function d(e) {
1005
- e.key === "Escape" && u();
1006
- }
1007
- return w(() => n.term, (e, t) => {
1008
- e && !t ? (l = document.activeElement, document.addEventListener("keydown", d), requestAnimationFrame(() => c.value?.focus?.())) : !e && t && (document.removeEventListener("keydown", d), l?.focus?.(), l = null);
1009
- }, { immediate: !0 }), f(() => document.removeEventListener("keydown", d)), (t, n) => e.term ? (p(), i("aside", {
1010
- key: 0,
1011
- class: "mwnf-popover",
1012
- role: "dialog",
1013
- "aria-label": y(s)("record.glossary.heading"),
1014
- dir: e.dir || void 0
1015
- }, [a("div", un, [a("span", null, v(y(s)("record.glossary.heading")), 1), a("button", {
1016
- ref_key: "closeButton",
1017
- ref: c,
1018
- type: "button",
1019
- class: "mwnf-popover__close",
1020
- "aria-label": y(s)("record.glossary.close"),
1021
- onClick: u
1022
- }, "✕", 8, dn)]), a("div", fn, [a("p", pn, v(e.term.spelling || e.term.word), 1), e.html ? (p(), i("div", {
1023
- key: 0,
1024
- class: "mwnf-popover__definition mwnf-sheet__block",
1025
- innerHTML: e.html
1026
- }, null, 8, mn)) : e.term.definition ? (p(), i("p", hn, v(e.term.definition), 1)) : r("", !0)])], 8, ln)) : r("", !0);
1027
- }
1028
- }, _n = {
1029
- key: 0,
1030
- class: "mwnf-partner-map"
1031
- }, vn = { class: "mwnf-partner-map__title" }, yn = ["src", "title"], bn = { class: "mwnf-partner-map__link" }, xn = ["href"], Q = {
1032
- __name: "PartnerMap",
1033
- props: {
1034
- latitude: {
1035
- type: Number,
1036
- default: null
1037
- },
1038
- longitude: {
1039
- type: Number,
1040
- default: null
1041
- },
1042
- zoom: {
1043
- type: Number,
1044
- default: 15
1045
- },
1046
- mapTitleEntry: {
1047
- type: String,
1048
- default: "partner.map.map"
1049
- },
1050
- mapOfEntry: {
1051
- type: String,
1052
- default: "partner.map.mapOf"
1053
- },
1054
- openMapLinkEntry: {
1055
- type: String,
1056
- default: "partner.map.openInOpenStreetMap"
1057
- },
1058
- label: {
1059
- type: String,
1060
- default: ""
1061
- }
1062
- },
1063
- setup(e) {
1064
- let n = e, { t: o } = k(), s = t(() => Number.isFinite(n.latitude) && Number.isFinite(n.longitude)), c = t(() => {
1065
- let e = 360 / 2 ** Math.max(1, Math.min(19, n.zoom || 15)), [t, r] = [n.latitude, n.longitude];
1066
- return [
1067
- r - e,
1068
- t - e / 2,
1069
- r + e,
1070
- t + e / 2
1071
- ].join("%2C");
1072
- }), l = t(() => `https://www.openstreetmap.org/export/embed.html?bbox=${c.value}&layer=mapnik&marker=${n.latitude}%2C${n.longitude}`), u = t(() => n.label ? `${o(n.mapOfEntry)} ${n.label}` : o(n.mapTitleEntry)), d = t(() => `https://www.openstreetmap.org/?mlat=${n.latitude}&mlon=${n.longitude}#map=${n.zoom || 15}/${n.latitude}/${n.longitude}`);
1073
- return (t, n) => s.value ? (p(), i("div", _n, [
1074
- a("p", vn, v(t.$t(e.mapTitleEntry)), 1),
1075
- a("iframe", {
1076
- src: l.value,
1077
- title: u.value,
1078
- loading: "lazy",
1079
- referrerpolicy: "no-referrer",
1080
- class: "mwnf-partner-map__embed"
1081
- }, null, 8, yn),
1082
- a("p", bn, [a("a", {
1083
- href: d.value,
1084
- target: "_blank",
1085
- rel: "noopener"
1086
- }, "↗ " + v(t.$t(e.openMapLinkEntry)), 9, xn)])
1087
- ])) : r("", !0);
1088
- }
1089
- }, Sn = ["dir"], Cn = ["src", "alt"], wn = { class: "mwnf-partner-panel__text" }, Tn = ["innerHTML"], En = { key: 0 }, Dn = {
1090
- key: 0,
1091
- class: "mwnf-partner-panel__count"
1092
- }, On = {
1093
- key: 1,
1094
- class: "mwnf-partner-panel__count mwnf-partner-panel__count--empty"
1095
- }, kn = {
1096
- key: 0,
1097
- class: "mwnf-partner-panel__actions"
1098
- }, An = ["dir"], jn = ["src", "alt"], Mn = ["innerHTML"], Nn = {
1099
- key: 0,
1100
- class: "mwnf-partner-panel__location"
1101
- }, Pn = {
1102
- key: 2,
1103
- class: "mwnf-partner-panel__line"
1104
- }, Fn = ["innerHTML"], In = { class: "mwnf-partner-panel__location" }, Ln = ["dir"], Rn = { class: "mwnf-partner-panel__header" }, zn = {
1105
- key: 0,
1106
- class: "mwnf-partner-panel__location"
1107
- }, Bn = {
1108
- key: 0,
1109
- class: "mwnf-partner-panel__bar"
1110
- }, Vn = ["aria-label"], Hn = {
1111
- key: 0,
1112
- class: "mwnf-partner-panel__divider",
1113
- "aria-hidden": "true"
1114
- }, Un = [
1115
- "id",
1116
- "aria-selected",
1117
- "aria-controls",
1118
- "tabindex",
1119
- "onClick"
1120
- ], Wn = ["href"], Gn = ["href"], Kn = {
1121
- key: 2,
1122
- class: "mwnf-partner-panel__actions"
1123
- }, qn = { class: "mwnf-partner-panel__body" }, Jn = { class: "mwnf-partner-panel__panels" }, Yn = ["innerHTML"], Xn = {
1124
- key: 2,
1125
- class: "mwnf-partner-panel__contact"
1126
- }, Zn = { class: "mwnf-partner-panel__contact-heading" }, Qn = ["innerHTML"], $n = { key: 1 }, er = { key: 2 }, tr = { key: 3 }, nr = ["href"], rr = {
1127
- key: 4,
1128
- class: "mwnf-partner-panel__links"
1129
- }, ir = {
1130
- key: 0,
1131
- class: "mwnf-partner-panel__divider",
1132
- "aria-hidden": "true"
1133
- }, ar = ["href"], or = {
1134
- key: 0,
1135
- class: "mwnf-partner-panel__person-title"
1136
- }, sr = { key: 1 }, $ = { key: 2 }, cr = { key: 3 }, lr = { key: 4 }, ur = ["href"], dr = {
1137
- key: 3,
1138
- class: "mwnf-partner-panel__logos"
1139
- }, fr = ["src", "alt"], pr = {
1140
- __name: "PartnerPanel",
1141
- props: {
1142
- partner: {
1143
- type: Object,
1144
- default: null
1145
- },
1146
- variant: {
1147
- type: String,
1148
- default: "full"
1149
- },
1150
- layout: {
1151
- type: String,
1152
- default: "tabs"
1153
- },
1154
- show: {
1155
- type: Object,
1156
- default: () => ({})
1157
- },
1158
- heading: {
1159
- type: Number,
1160
- default: 0
1161
- },
1162
- label: {
1163
- type: String,
1164
- default: ""
1165
- },
1166
- objectsLabel: {
1167
- type: String,
1168
- default: "partner.item.objectsInSite"
1169
- },
1170
- emptyLabel: {
1171
- type: String,
1172
- default: ""
1173
- },
1174
- homepageLabel: {
1175
- type: String,
1176
- default: "partner.nav.homepage"
1177
- },
1178
- readMoreLabel: {
1179
- type: String,
1180
- default: "partner.action.readMore"
1181
- },
1182
- viewObjectsLabel: {
1183
- type: String,
1184
- default: "partner.action.viewObjects"
1185
- },
1186
- dir: {
1187
- type: String,
1188
- default: ""
1189
- }
1190
- },
1191
- setup(c) {
1192
- let f = c, { t: x } = k(), S = b(), D = {
1193
- line: ["actions"],
1194
- summary: ["logo"],
1195
- full: []
1196
- };
1197
- function O(e) {
1198
- let t = f.show?.[e];
1199
- return t === void 0 ? !(D[f.variant] ?? []).includes(e) : !!t;
1200
- }
1201
- let A = t(() => f.partner), j = t(() => f.heading >= 1 && f.heading <= 6 ? `h${f.heading}` : "p"), M = t(() => f.heading >= 1 && f.heading <= 5 ? `h${f.heading + 1}` : "p"), N = t(() => A.value?.logos?.[0] ?? null), F = t(() => O("homepage") ? A.value?.contact?.website ?? null : null), I = t(() => {
1202
- let e = A.value;
1203
- if (!e) return [];
1204
- let t = [];
1205
- O("description") && t.push({
1206
- key: "about",
1207
- label: x("partner.info.about")
1208
- });
1209
- let n = O("persons") ? e.persons ?? [] : [], r = e.contact ?? {}, i = r.address || r.phone || r.fax || r.email || r.website || r.links?.length || n.length;
1210
- return O("contact") && i && t.push({
1211
- key: "contact",
1212
- label: x("partner.info.contact")
1213
- }), O("logos") && e.logos?.length && t.push({
1214
- key: "logo",
1215
- label: x("partner.info.logo")
1216
- }), t;
1217
- }), L = m("");
1218
- w(() => [A.value?.id, I.value.map((e) => e.key).join()], () => {
1219
- I.value.some((e) => e.key === L.value) || (L.value = I.value[0]?.key ?? "");
1220
- }, { immediate: !0 }), w(() => A.value?.id, () => {
1221
- L.value = I.value[0]?.key ?? "";
1222
- });
1223
- function R(e) {
1224
- return `${S}-tab-${e}`;
1225
- }
1226
- function z(e) {
1227
- return `${S}-panel-${e}`;
1228
- }
1229
- function B(e) {
1230
- let t = I.value.map((e) => e.key), n = t.indexOf(L.value), r = {
1231
- ArrowRight: (n + 1) % t.length,
1232
- ArrowLeft: (n - 1 + t.length) % t.length,
1233
- Home: 0,
1234
- End: t.length - 1
1235
- }[e.key];
1236
- r === void 0 || !t.length || (e.preventDefault(), L.value = t[r], u(() => document.getElementById(R(t[r]))?.focus()));
1237
- }
1238
- let V = t(() => O("persons") ? A.value?.persons ?? [] : []), H = t(() => [...A.value?.contact?.website ? [A.value.contact.website] : [], ...A.value?.contact?.links ?? []]);
1239
- return (t, u) => c.partner && c.variant === "line" ? (p(), i("div", {
1240
- key: 0,
1241
- class: "mwnf-partner-panel mwnf-partner-panel--line",
1242
- dir: c.dir || void 0
1243
- }, [
1244
- O("logo") && N.value ? (p(), i("img", {
1245
- key: 0,
1246
- class: "mwnf-partner-panel__logo",
1247
- src: N.value.url,
1248
- alt: c.partner.plainName,
1249
- loading: "lazy"
1250
- }, null, 8, Cn)) : r("", !0),
1251
- a("div", wn, [
1252
- g(t.$slots, "badge", { partner: c.partner }),
1253
- (p(), n(_(c.partner.route ? P : "span"), {
1254
- class: "mwnf-partner-panel__name",
1255
- to: c.partner.route || void 0
1256
- }, {
1257
- default: T(() => [a("span", { innerHTML: c.partner.name }, null, 8, Tn), O("location") && c.partner.city ? (p(), i("span", En, ", " + v(c.partner.city), 1)) : r("", !0)]),
1258
- _: 1
1259
- }, 8, ["to"])),
1260
- g(t.$slots, "meta", { partner: c.partner }, () => [O("count") && c.partner.itemCount ? (p(), i("p", Dn, v(c.partner.itemCount) + " " + v(y(x)(c.objectsLabel)), 1)) : O("count") && c.emptyLabel ? (p(), i("p", On, v(y(x)(c.emptyLabel)), 1)) : r("", !0)]),
1261
- t.$slots.actions || O("actions") && c.partner.route ? (p(), i("p", kn, [g(t.$slots, "actions", { partner: c.partner }, () => [s(P, { to: c.partner.route }, {
1262
- default: T(() => [o(v(y(x)(c.readMoreLabel)), 1)]),
1263
- _: 1
1264
- }, 8, ["to"]), c.partner.objectsRoute ? (p(), i(e, { key: 0 }, [u[0] ||= a("span", {
1265
- class: "mwnf-partner-panel__divider",
1266
- "aria-hidden": "true"
1267
- }, "|", -1), s(P, { to: c.partner.objectsRoute }, {
1268
- default: T(() => [o(v(y(x)(c.viewObjectsLabel)), 1)]),
1269
- _: 1
1270
- }, 8, ["to"])], 64)) : r("", !0)])])) : r("", !0)
1271
- ]),
1272
- g(t.$slots, "after", { partner: c.partner })
1273
- ], 8, Sn)) : c.partner && c.variant === "summary" ? (p(), i("div", {
1274
- key: 1,
1275
- class: d(["mwnf-partner-panel mwnf-partner-panel--summary", { "mwnf-partner-panel--heading": c.heading }]),
1276
- dir: c.dir || void 0
1277
- }, [
1278
- O("logo") && N.value ? (p(), i("img", {
1279
- key: 0,
1280
- class: "mwnf-partner-panel__logo",
1281
- src: N.value.url,
1282
- alt: c.partner.plainName,
1283
- loading: "lazy"
1284
- }, null, 8, jn)) : r("", !0),
1285
- c.heading ? (p(), i(e, { key: 1 }, [
1286
- g(t.$slots, "badge", { partner: c.partner }),
1287
- (p(), n(_(j.value), { class: "mwnf-partner-panel__name" }, {
1288
- default: T(() => [(p(), n(_(c.partner.route ? P : "span"), { to: c.partner.route || void 0 }, {
1289
- default: T(() => [a("span", { innerHTML: c.partner.name }, null, 8, Mn)]),
1290
- _: 1
1291
- }, 8, ["to"]))]),
1292
- _: 1
1293
- })),
1294
- O("location") && c.partner.location ? (p(), i("p", Nn, v(c.partner.location), 1)) : r("", !0),
1295
- g(t.$slots, "meta", { partner: c.partner })
1296
- ], 64)) : (p(), i("p", Pn, [
1297
- g(t.$slots, "badge", { partner: c.partner }),
1298
- (p(), n(_(c.partner.route ? P : "span"), {
1299
- class: "mwnf-partner-panel__name",
1300
- to: c.partner.route || void 0
1301
- }, {
1302
- default: T(() => [c.label ? (p(), i(e, { key: 0 }, [o(v(`${y(x)(c.label)} `), 1)], 64)) : r("", !0), a("span", { innerHTML: c.partner.name }, null, 8, Fn)]),
1303
- _: 1
1304
- }, 8, ["to"])),
1305
- O("location") && c.partner.location ? (p(), i(e, { key: 0 }, [u[1] ||= o(", ", -1), a("span", In, v(c.partner.location), 1)], 64)) : r("", !0),
1306
- g(t.$slots, "meta", { partner: c.partner })
1307
- ])),
1308
- g(t.$slots, "actions", { partner: c.partner }),
1309
- g(t.$slots, "after", { partner: c.partner })
1310
- ], 10, An)) : c.partner ? (p(), i("div", {
1311
- key: 2,
1312
- class: d(["mwnf-partner-panel mwnf-partner-panel--full", `mwnf-partner-panel--${c.layout === "sections" ? "sections" : "tabs"}`]),
1313
- dir: c.dir || void 0
1314
- }, [
1315
- a("div", Rn, [
1316
- g(t.$slots, "badge", { partner: c.partner }),
1317
- (p(), n(_(j.value), {
1318
- class: "mwnf-partner-panel__name",
1319
- innerHTML: c.partner.name
1320
- }, null, 8, ["innerHTML"])),
1321
- O("location") && c.partner.location ? (p(), i("p", zn, v(c.partner.location), 1)) : r("", !0),
1322
- g(t.$slots, "meta", { partner: c.partner })
1323
- ]),
1324
- c.layout !== "sections" && I.value.length || F.value || t.$slots.actions ? (p(), i("div", Bn, [c.layout !== "sections" && I.value.length ? (p(), i("div", {
1325
- key: 0,
1326
- role: "tablist",
1327
- class: "mwnf-partner-panel__tabs",
1328
- "aria-label": c.partner.plainName,
1329
- onKeydown: B
1330
- }, [(p(!0), i(e, null, h(I.value, (t, n) => (p(), i(e, { key: t.key }, [n ? (p(), i("span", Hn, "|")) : r("", !0), a("button", {
1331
- id: R(t.key),
1332
- type: "button",
1333
- role: "tab",
1334
- class: d(["mwnf-partner-panel__tab", { "mwnf-partner-panel__tab--active": L.value === t.key }]),
1335
- "aria-selected": L.value === t.key ? "true" : "false",
1336
- "aria-controls": z(t.key),
1337
- tabindex: L.value === t.key ? 0 : -1,
1338
- onClick: (e) => L.value = t.key
1339
- }, v(t.label), 11, Un)], 64))), 128)), F.value ? (p(), i(e, { key: 0 }, [u[2] ||= a("span", {
1340
- class: "mwnf-partner-panel__divider",
1341
- "aria-hidden": "true"
1342
- }, "|", -1), a("a", {
1343
- class: "mwnf-partner-panel__homepage",
1344
- href: F.value.url,
1345
- target: "_blank",
1346
- rel: "noopener"
1347
- }, "↗ " + v(y(x)(c.homepageLabel)), 9, Wn)], 64)) : r("", !0)], 40, Vn)) : F.value ? (p(), i("a", {
1348
- key: 1,
1349
- class: "mwnf-partner-panel__homepage",
1350
- href: F.value.url,
1351
- target: "_blank",
1352
- rel: "noopener"
1353
- }, "↗ " + v(y(x)(c.homepageLabel)), 9, Gn)) : r("", !0), t.$slots.actions ? (p(), i("div", Kn, [g(t.$slots, "actions", { partner: c.partner })])) : r("", !0)])) : r("", !0),
1354
- a("div", qn, [O("pictures") && c.partner.pictures?.length ? (p(), n(Z, {
1355
- key: 0,
1356
- class: "mwnf-partner-panel__pictures",
1357
- images: c.partner.pictures
1358
- }, null, 8, ["images"])) : r("", !0), a("div", Jn, [(p(!0), i(e, null, h(I.value, (t) => E((p(), n(_(c.layout === "sections" ? "section" : "div"), l({
1359
- id: z(t.key),
1360
- key: t.key,
1361
- class: ["mwnf-partner-panel__panel", `mwnf-partner-panel__panel--${t.key}`]
1362
- }, { ref_for: !0 }, c.layout === "sections" ? {} : {
1363
- role: "tabpanel",
1364
- "aria-labelledby": R(t.key),
1365
- tabindex: 0
1366
- }), {
1367
- default: T(() => [c.layout === "sections" ? (p(), n(_(M.value), {
1368
- key: 0,
1369
- class: "mwnf-partner-panel__section-title"
1370
- }, {
1371
- default: T(() => [o(v(t.label), 1)]),
1372
- _: 2
1373
- }, 1024)) : r("", !0), t.key === "about" ? (p(), i("div", {
1374
- key: 1,
1375
- class: "mwnf-prose mwnf-partner-panel__description",
1376
- innerHTML: c.partner.description
1377
- }, null, 8, Yn)) : t.key === "contact" ? (p(), i("div", Xn, [
1378
- c.partner.contact.address ? (p(), i(e, { key: 0 }, [a("p", Zn, v(y(x)("partner.info.addresses")), 1), a("div", {
1379
- class: "mwnf-prose mwnf-partner-panel__address",
1380
- innerHTML: c.partner.contact.address
1381
- }, null, 8, Qn)], 64)) : r("", !0),
1382
- c.partner.contact.phone ? (p(), i("p", $n, v(y(x)("partner.info.phone")) + " " + v(c.partner.contact.phone), 1)) : r("", !0),
1383
- c.partner.contact.fax ? (p(), i("p", er, v(y(x)("partner.info.fax")) + " " + v(c.partner.contact.fax), 1)) : r("", !0),
1384
- c.partner.contact.email ? (p(), i("p", tr, [a("a", { href: `mailto:${c.partner.contact.email}` }, v(c.partner.contact.email), 9, nr)])) : r("", !0),
1385
- H.value.length ? (p(), i("p", rr, [(p(!0), i(e, null, h(H.value, (t, n) => (p(), i(e, { key: t.url }, [n ? (p(), i("span", ir, "|")) : r("", !0), a("a", {
1386
- href: t.url,
1387
- target: "_blank",
1388
- rel: "noopener"
1389
- }, v(t.label), 9, ar)], 64))), 128))])) : r("", !0),
1390
- (p(!0), i(e, null, h(V.value, (e, t) => (p(), i("div", {
1391
- key: t,
1392
- class: "mwnf-partner-panel__person"
1393
- }, [
1394
- e.title ? (p(), i("p", or, v(e.title), 1)) : r("", !0),
1395
- e.name ? (p(), i("p", sr, v(e.name), 1)) : r("", !0),
1396
- e.phone ? (p(), i("p", $, v(y(x)("partner.info.phone")) + " " + v(e.phone), 1)) : r("", !0),
1397
- e.fax ? (p(), i("p", cr, v(y(x)("partner.info.fax")) + " " + v(e.fax), 1)) : r("", !0),
1398
- e.email ? (p(), i("p", lr, [a("a", { href: `mailto:${e.email}` }, v(e.email), 9, ur)])) : r("", !0)
1399
- ]))), 128))
1400
- ])) : t.key === "logo" ? (p(), i("div", dr, [(p(!0), i(e, null, h(c.partner.logos, (e) => (p(), i("img", {
1401
- key: e.url,
1402
- src: e.url,
1403
- alt: e.alt
1404
- }, null, 8, fr))), 128))])) : r("", !0)]),
1405
- _: 2
1406
- }, 1040, ["id", "class"])), [[C, c.layout === "sections" || L.value === t.key]])), 128))])]),
1407
- O("map") && c.partner.map ? (p(), n(Q, {
1408
- key: 1,
1409
- class: "mwnf-partner-panel__map",
1410
- latitude: c.partner.map.latitude,
1411
- longitude: c.partner.map.longitude,
1412
- zoom: c.partner.map.zoom,
1413
- label: c.partner.map.label
1414
- }, null, 8, [
1415
- "latitude",
1416
- "longitude",
1417
- "zoom",
1418
- "label"
1419
- ])) : r("", !0),
1420
- g(t.$slots, "after", { partner: c.partner })
1421
- ], 10, Ln)) : r("", !0);
1422
- }
1423
- }, mr = {
1424
- key: 0,
1425
- class: "mwnf-timeline__rows"
1426
- }, hr = { class: "mwnf-timeline__date" }, gr = { class: "mwnf-timeline__body" }, _r = {
1427
- key: 0,
1428
- class: "mwnf-timeline__caption"
1429
- }, vr = ["innerHTML"], yr = ["innerHTML"], br = {
1430
- key: 2,
1431
- class: "mwnf-timeline__media"
1432
- }, xr = ["src", "alt"], Sr = ["innerHTML"], Cr = {
1433
- key: 3,
1434
- class: "mwnf-timeline__actions"
1435
- }, wr = {
1436
- key: 1,
1437
- class: "mwnf-timeline__empty"
1438
- }, Tr = {
1439
- __name: "TimelineEventList",
1440
- props: { events: {
1441
- type: Array,
1442
- default: () => []
1443
- } },
1444
- setup(t) {
1445
- let s = !!x().empty;
1446
- return (c, l) => t.events.length ? (p(), i("ul", mr, [(p(!0), i(e, null, h(t.events, (t) => (p(), i("li", {
1447
- key: t.id,
1448
- class: "mwnf-timeline__row"
1449
- }, [a("div", hr, [g(c.$slots, "date", { event: t }, () => [o(v(t.date), 1)])]), a("div", gr, [
1450
- t.caption || c.$slots.caption ? (p(), i("div", _r, [g(c.$slots, "caption", { event: t }, () => [a("span", { innerHTML: t.caption }, null, 8, vr)])])) : r("", !0),
1451
- t.description ? (p(), i("div", {
1452
- key: 1,
1453
- class: "mwnf-timeline__description mwnf-sheet__block",
1454
- innerHTML: t.description
1455
- }, null, 8, yr)) : r("", !0),
1456
- t.media?.length || c.$slots.media ? (p(), i("div", br, [g(c.$slots, "media", { event: t }, () => [(p(!0), i(e, null, h(t.media ?? [], (e, t) => (p(), n(P, {
1457
- key: t,
1458
- class: "mwnf-timeline__media-item",
1459
- to: e.to,
1460
- href: e.href
1461
- }, {
1462
- default: T(() => [e.image ? (p(), i("img", {
1463
- key: 0,
1464
- src: e.image,
1465
- alt: e.alt ?? "",
1466
- loading: "lazy"
1467
- }, null, 8, xr)) : r("", !0), e.caption ? (p(), i("span", {
1468
- key: 1,
1469
- class: "mwnf-timeline__media-caption",
1470
- innerHTML: e.caption
1471
- }, null, 8, Sr)) : r("", !0)]),
1472
- _: 2
1473
- }, 1032, ["to", "href"]))), 128))])])) : r("", !0),
1474
- t.actions?.length || c.$slots.actions ? (p(), i("div", Cr, [g(c.$slots, "actions", { event: t }, () => [(p(!0), i(e, null, h(t.actions ?? [], (e, t) => (p(), n(P, {
1475
- key: t,
1476
- class: "mwnf-timeline__action",
1477
- to: e.to,
1478
- href: e.href
1479
- }, {
1480
- default: T(() => [o(v(e.label) + " →", 1)]),
1481
- _: 2
1482
- }, 1032, ["to", "href"]))), 128))])])) : r("", !0)
1483
- ])]))), 128))])) : y(s) ? (p(), i("div", wr, [g(c.$slots, "empty")])) : r("", !0);
1484
- }
1485
- };
1486
- //#endregion
1487
- export { Y as _, Z as a, Rt as c, at as d, nt as f, X as g, Le as h, gn as i, Ot as l, We as m, pr as n, Gt as o, Ye as p, Q as r, Ht as s, Tr as t, wt as u, q as v, P as y };