@museumwnf/viewer-layout 3.4.0 → 3.6.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,841 @@
1
+ import { d as e, n as t } from "./GlossaryPopover-DcptyNWI.js";
2
+ import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, mergeProps as u, nextTick as d, normalizeClass 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 ee, watch as C, withCtx as w, withDirectives as T, withKeys as E, withModifiers as D } from "vue";
3
+ import { useI18n as O } from "@museumwnf/viewer-core/i18n";
4
+ import { mdInline as k } from "@museumwnf/viewer-core";
5
+ //#region src/content/SectionCards.vue
6
+ var A = ["innerHTML"], j = ["innerHTML"], M = {
7
+ key: 1,
8
+ class: "mwnf-cards__action"
9
+ }, N = {
10
+ key: 0,
11
+ class: "mwnf-cards__image-container"
12
+ }, P = ["src", "alt"], F = { class: "mwnf-cards__content" }, I = {
13
+ key: 0,
14
+ class: "mwnf-cards__number"
15
+ }, L = ["innerHTML"], R = ["innerHTML"], z = {
16
+ key: 0,
17
+ class: "mwnf-cards__image-container"
18
+ }, B = ["src", "alt"], V = {
19
+ key: 1,
20
+ class: "mwnf-cards__number"
21
+ }, H = ["innerHTML"], te = {
22
+ key: 3,
23
+ class: "mwnf-cards__details"
24
+ }, ne = { class: "mwnf-cards__summary" }, U = {
25
+ key: 0,
26
+ class: "mwnf-cards__number"
27
+ }, W = ["innerHTML"], G = {
28
+ key: 0,
29
+ class: "mwnf-cards__children"
30
+ }, K = {
31
+ __name: "SectionCards",
32
+ props: {
33
+ cards: {
34
+ type: Array,
35
+ default: () => []
36
+ },
37
+ variant: {
38
+ type: String,
39
+ default: "cards",
40
+ validate: (e) => [
41
+ "cards",
42
+ "rows",
43
+ "covers",
44
+ "accordion"
45
+ ].includes(e)
46
+ }
47
+ },
48
+ setup(t) {
49
+ return (r, u) => t.cards.length ? (p(), o("ul", {
50
+ key: 0,
51
+ class: f(["mwnf-cards", `mwnf-cards--${t.variant}`])
52
+ }, [(p(!0), o(n, null, h(t.cards, (r) => (p(), o("li", {
53
+ key: r.href ?? r.title,
54
+ class: f(["mwnf-cards__card"])
55
+ }, [t.variant === "cards" ? (p(), i(e, {
56
+ key: 0,
57
+ class: "mwnf-cards__link",
58
+ to: r.to,
59
+ href: r.href
60
+ }, {
61
+ default: w(() => [
62
+ s("span", {
63
+ class: "mwnf-cards__title",
64
+ innerHTML: y(k)(r.title)
65
+ }, null, 8, A),
66
+ r.description ? (p(), o("span", {
67
+ key: 0,
68
+ class: "mwnf-cards__text",
69
+ innerHTML: y(k)(r.description)
70
+ }, null, 8, j)) : a("", !0),
71
+ r.action ? (p(), o("span", M, v(r.action) + " →", 1)) : a("", !0)
72
+ ]),
73
+ _: 2
74
+ }, 1032, ["to", "href"])) : t.variant === "rows" ? (p(), i(e, {
75
+ key: 1,
76
+ class: "mwnf-cards__link",
77
+ to: r.to,
78
+ href: r.href
79
+ }, {
80
+ default: w(() => [r.image ? (p(), o("div", N, [s("img", {
81
+ class: "mwnf-cards__image",
82
+ src: r.image,
83
+ alt: r.alt || ""
84
+ }, null, 8, P)])) : a("", !0), s("div", F, [
85
+ r.number ? (p(), o("span", I, v(r.number), 1)) : a("", !0),
86
+ s("span", {
87
+ class: "mwnf-cards__title",
88
+ innerHTML: y(k)(r.title)
89
+ }, null, 8, L),
90
+ r.description ? (p(), o("span", {
91
+ key: 1,
92
+ class: "mwnf-cards__text",
93
+ innerHTML: y(k)(r.description)
94
+ }, null, 8, R)) : a("", !0)
95
+ ])]),
96
+ _: 2
97
+ }, 1032, ["to", "href"])) : t.variant === "covers" ? (p(), i(e, {
98
+ key: 2,
99
+ class: "mwnf-cards__link",
100
+ to: r.to,
101
+ href: r.href
102
+ }, {
103
+ default: w(() => [
104
+ r.image ? (p(), o("div", z, [s("img", {
105
+ class: "mwnf-cards__image",
106
+ src: r.image,
107
+ alt: r.alt || ""
108
+ }, null, 8, B)])) : a("", !0),
109
+ r.number ? (p(), o("span", V, v(r.number), 1)) : a("", !0),
110
+ s("span", {
111
+ class: "mwnf-cards__title",
112
+ innerHTML: y(k)(r.title)
113
+ }, null, 8, H)
114
+ ]),
115
+ _: 2
116
+ }, 1032, ["to", "href"])) : t.variant === "accordion" ? (p(), o("details", te, [s("summary", ne, [r.number ? (p(), o("span", U, v(r.number), 1)) : a("", !0), s("span", {
117
+ class: "mwnf-cards__title",
118
+ innerHTML: y(k)(r.title)
119
+ }, null, 8, W)]), r.children?.length ? (p(), o("ul", G, [(p(!0), o(n, null, h(r.children, (t) => (p(), o("li", {
120
+ key: t.href ?? t.title,
121
+ class: "mwnf-cards__child"
122
+ }, [l(e, {
123
+ class: "mwnf-cards__child-link",
124
+ to: t.to,
125
+ href: t.href
126
+ }, {
127
+ default: w(() => [c(v(t.title), 1)]),
128
+ _: 2
129
+ }, 1032, ["to", "href"])]))), 128))])) : a("", !0)])) : a("", !0)]))), 128))], 2)) : a("", !0);
130
+ }
131
+ }, q = ["aria-label"], J = ["disabled"], Y = ["disabled"], X = ["aria-current", "onClick"], Z = ["disabled"], re = ["disabled"], ie = { class: "mwnf-pagination__position" }, ae = { class: "mwnf-pagination__jump" }, oe = ["max"], se = {
132
+ __name: "Pagination",
133
+ props: {
134
+ pageInfo: {
135
+ type: Object,
136
+ required: !0
137
+ },
138
+ window: {
139
+ type: Number,
140
+ default: 5
141
+ },
142
+ jump: {
143
+ type: Boolean,
144
+ default: !1
145
+ },
146
+ ends: {
147
+ type: Boolean,
148
+ default: !0
149
+ }
150
+ },
151
+ emits: ["navigate"],
152
+ setup(e, { emit: t }) {
153
+ let i = e, l = t, { t: u } = O(), d = r(() => i.pageInfo?.currentPage ?? 1), g = r(() => i.pageInfo?.lastPage ?? 1), _ = r(() => {
154
+ let e = Math.max(1, i.window), t = Math.max(1, d.value - Math.floor(e / 2)), n = Math.min(g.value, t + e - 1);
155
+ t = Math.max(1, n - e + 1);
156
+ let r = [];
157
+ for (let e = t; e <= n; e++) r.push(e);
158
+ return r;
159
+ }), b = m(String(d.value));
160
+ C(d, (e) => {
161
+ b.value = String(e);
162
+ });
163
+ function x(e) {
164
+ let t = Math.min(Math.max(1, Number.parseInt(e, 10) || 1), g.value);
165
+ t !== d.value && l("navigate", t);
166
+ }
167
+ return (t, r) => g.value > 1 ? (p(), o("nav", {
168
+ key: 0,
169
+ class: "mwnf-pagination",
170
+ "aria-label": y(u)("catalogue.pagination.page")
171
+ }, [
172
+ e.ends ? (p(), o("button", {
173
+ key: 0,
174
+ type: "button",
175
+ class: "mwnf-pagination__button",
176
+ disabled: d.value === 1,
177
+ onClick: r[0] ||= (e) => x(1)
178
+ }, " « " + v(y(u)("catalogue.pagination.first")), 9, J)) : a("", !0),
179
+ s("button", {
180
+ type: "button",
181
+ class: "mwnf-pagination__button",
182
+ disabled: d.value === 1,
183
+ onClick: r[1] ||= (e) => x(d.value - 1)
184
+ }, " ‹ " + v(y(u)("core.pagination.previous")), 9, Y),
185
+ (p(!0), o(n, null, h(_.value, (e) => (p(), o("button", {
186
+ key: e,
187
+ type: "button",
188
+ class: f(["mwnf-pagination__button mwnf-pagination__number", { "mwnf-pagination__button--active": e === d.value }]),
189
+ "aria-current": e === d.value ? "page" : void 0,
190
+ onClick: (t) => x(e)
191
+ }, v(e), 11, X))), 128)),
192
+ s("button", {
193
+ type: "button",
194
+ class: "mwnf-pagination__button",
195
+ disabled: d.value === g.value,
196
+ onClick: r[2] ||= (e) => x(d.value + 1)
197
+ }, v(y(u)("core.pagination.next")) + " › ", 9, Z),
198
+ e.ends ? (p(), o("button", {
199
+ key: 1,
200
+ type: "button",
201
+ class: "mwnf-pagination__button",
202
+ disabled: d.value === g.value,
203
+ onClick: r[3] ||= (e) => x(g.value)
204
+ }, v(y(u)("catalogue.pagination.last")) + " » ", 9, re)) : a("", !0),
205
+ s("span", ie, [e.jump ? (p(), o(n, { key: 0 }, [
206
+ s("label", ae, [s("span", null, v(y(u)("catalogue.pagination.page")), 1), T(s("input", {
207
+ "onUpdate:modelValue": r[4] ||= (e) => b.value = e,
208
+ class: "mwnf-pagination__jump-field",
209
+ type: "number",
210
+ min: "1",
211
+ max: g.value,
212
+ onKeyup: r[5] ||= E((e) => x(b.value), ["enter"])
213
+ }, null, 40, oe), [[S, b.value]])]),
214
+ s("span", null, "/ " + v(g.value), 1),
215
+ s("button", {
216
+ type: "button",
217
+ class: "mwnf-pagination__button",
218
+ onClick: r[6] ||= (e) => x(b.value)
219
+ }, v(y(u)("catalogue.pagination.go")), 1)
220
+ ], 64)) : (p(), o(n, { key: 1 }, [c(v(d.value) + " / " + v(g.value), 1)], 64))])
221
+ ], 8, q)) : a("", !0);
222
+ }
223
+ }, ce = ["for"], le = {
224
+ key: 0,
225
+ class: "mwnf-facet__label"
226
+ }, ue = [
227
+ "id",
228
+ "value",
229
+ "disabled"
230
+ ], de = {
231
+ key: 0,
232
+ value: "",
233
+ disabled: ""
234
+ }, fe = {
235
+ key: 1,
236
+ value: ""
237
+ }, pe = ["value"], me = {
238
+ __name: "FacetSelect",
239
+ props: {
240
+ label: {
241
+ type: String,
242
+ default: ""
243
+ },
244
+ options: {
245
+ type: Array,
246
+ default: () => []
247
+ },
248
+ modelValue: {
249
+ type: [String, Number],
250
+ default: ""
251
+ },
252
+ placeholder: {
253
+ type: String,
254
+ default: ""
255
+ },
256
+ anyLabel: {
257
+ type: String,
258
+ default: ""
259
+ },
260
+ disabled: {
261
+ type: Boolean,
262
+ default: !1
263
+ },
264
+ hideEmpty: {
265
+ type: Boolean,
266
+ default: !1
267
+ }
268
+ },
269
+ emits: ["update:modelValue"],
270
+ setup(e, { emit: t }) {
271
+ let i = e, c = t, l = b(), u = r(() => !i.hideEmpty || i.options.length > 0);
272
+ return (t, r) => u.value ? (p(), o("label", {
273
+ key: 0,
274
+ class: "mwnf-facet",
275
+ for: y(l)
276
+ }, [e.label ? (p(), o("span", le, v(e.label), 1)) : a("", !0), s("select", {
277
+ id: y(l),
278
+ class: "mwnf-facet__select",
279
+ value: String(e.modelValue ?? ""),
280
+ disabled: e.disabled,
281
+ onChange: r[0] ||= (e) => c("update:modelValue", e.target.value)
282
+ }, [
283
+ e.placeholder ? (p(), o("option", de, v(e.placeholder), 1)) : a("", !0),
284
+ e.anyLabel ? (p(), o("option", fe, v(e.anyLabel), 1)) : a("", !0),
285
+ (p(!0), o(n, null, h(e.options, (e) => (p(), o("option", {
286
+ key: e.value,
287
+ value: String(e.value)
288
+ }, v(e.label), 9, pe))), 128))
289
+ ], 40, ue)], 8, ce)) : a("", !0);
290
+ }
291
+ }, he = {
292
+ key: 0,
293
+ class: "mwnf-filter__title"
294
+ }, ge = ["disabled"], _e = { class: "mwnf-filter__actions" }, ve = {
295
+ key: 0,
296
+ type: "submit",
297
+ class: "mwnf-filter__button mwnf-filter__button--apply"
298
+ }, ye = {
299
+ __name: "FilterPanel",
300
+ props: {
301
+ title: {
302
+ type: String,
303
+ default: ""
304
+ },
305
+ mode: {
306
+ type: String,
307
+ default: "apply"
308
+ },
309
+ applyLabel: {
310
+ type: String,
311
+ default: ""
312
+ },
313
+ resetLabel: {
314
+ type: String,
315
+ default: ""
316
+ },
317
+ disabled: {
318
+ type: Boolean,
319
+ default: !1
320
+ }
321
+ },
322
+ emits: ["apply", "reset"],
323
+ setup(e, { emit: t }) {
324
+ let n = t, { t: r } = O();
325
+ return (t, i) => (p(), o("form", {
326
+ class: f(["mwnf-filter", `mwnf-filter--${e.mode}`]),
327
+ onSubmit: i[1] ||= D((e) => n("apply"), ["prevent"])
328
+ }, [
329
+ e.title ? (p(), o("p", he, v(e.title), 1)) : a("", !0),
330
+ s("fieldset", {
331
+ class: "mwnf-filter__controls",
332
+ disabled: e.disabled
333
+ }, [g(t.$slots, "default")], 8, ge),
334
+ s("div", _e, [e.mode === "apply" ? (p(), o("button", ve, v(e.applyLabel || y(r)("core.action.apply")), 1)) : a("", !0), s("button", {
335
+ type: "button",
336
+ class: "mwnf-filter__button mwnf-filter__button--reset",
337
+ onClick: i[0] ||= (e) => n("reset")
338
+ }, v(e.resetLabel || y(r)("core.action.reset")), 1)])
339
+ ], 34));
340
+ }
341
+ }, be = {
342
+ key: 0,
343
+ class: "mwnf-summary"
344
+ }, xe = {
345
+ key: 0,
346
+ class: "mwnf-summary__parts"
347
+ }, Se = {
348
+ key: 0,
349
+ class: "mwnf-summary__label"
350
+ }, Ce = {
351
+ key: 1,
352
+ class: "mwnf-summary__count"
353
+ }, we = {
354
+ key: 2,
355
+ class: "mwnf-summary__value"
356
+ }, Te = {
357
+ key: 1,
358
+ class: "mwnf-summary__actions"
359
+ }, Ee = {
360
+ __name: "ResultsSummary",
361
+ props: { parts: {
362
+ type: Array,
363
+ default: () => []
364
+ } },
365
+ setup(e) {
366
+ let t = !!x().actions;
367
+ return (r, i) => e.parts.length || r.$slots.default || y(t) ? (p(), o("div", be, [
368
+ e.parts.length ? (p(), o("p", xe, [(p(!0), o(n, null, h(e.parts, (e, t) => (p(), o("span", {
369
+ key: t,
370
+ class: "mwnf-summary__part"
371
+ }, [
372
+ e.label ? (p(), o("span", Se, v(e.label), 1)) : a("", !0),
373
+ i[0] ||= c(v(" "), -1),
374
+ e.count == null ? a("", !0) : (p(), o("span", Ce, v(e.count), 1)),
375
+ i[1] ||= c(v(" "), -1),
376
+ e.value ? (p(), o("span", we, v(e.value), 1)) : a("", !0)
377
+ ]))), 128))])) : a("", !0),
378
+ g(r.$slots, "default"),
379
+ y(t) ? (p(), o("div", Te, [g(r.$slots, "actions")])) : a("", !0)
380
+ ])) : a("", !0);
381
+ }
382
+ }, De = {
383
+ key: 0,
384
+ class: "mwnf-partner-map"
385
+ }, Oe = { class: "mwnf-partner-map__title" }, ke = ["src", "title"], Ae = { class: "mwnf-partner-map__link" }, je = ["href"], Q = {
386
+ __name: "PartnerMap",
387
+ props: {
388
+ latitude: {
389
+ type: Number,
390
+ default: null
391
+ },
392
+ longitude: {
393
+ type: Number,
394
+ default: null
395
+ },
396
+ zoom: {
397
+ type: Number,
398
+ default: 15
399
+ },
400
+ mapTitleEntry: {
401
+ type: String,
402
+ default: "partner.map.map"
403
+ },
404
+ mapOfEntry: {
405
+ type: String,
406
+ default: "partner.map.mapOf"
407
+ },
408
+ openMapLinkEntry: {
409
+ type: String,
410
+ default: "partner.map.openInOpenStreetMap"
411
+ },
412
+ label: {
413
+ type: String,
414
+ default: ""
415
+ }
416
+ },
417
+ setup(e) {
418
+ let t = e, { t: n } = O(), i = r(() => Number.isFinite(t.latitude) && Number.isFinite(t.longitude)), c = r(() => {
419
+ let e = 360 / 2 ** Math.max(1, Math.min(19, t.zoom || 15)), [n, r] = [t.latitude, t.longitude];
420
+ return [
421
+ r - e,
422
+ n - e / 2,
423
+ r + e,
424
+ n + e / 2
425
+ ].join("%2C");
426
+ }), l = r(() => `https://www.openstreetmap.org/export/embed.html?bbox=${c.value}&layer=mapnik&marker=${t.latitude}%2C${t.longitude}`), u = r(() => t.label ? `${n(t.mapOfEntry)} ${t.label}` : n(t.mapTitleEntry)), d = r(() => `https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}#map=${t.zoom || 15}/${t.latitude}/${t.longitude}`);
427
+ return (t, n) => i.value ? (p(), o("div", De, [
428
+ s("p", Oe, v(t.$t(e.mapTitleEntry)), 1),
429
+ s("iframe", {
430
+ src: l.value,
431
+ title: u.value,
432
+ loading: "lazy",
433
+ referrerpolicy: "no-referrer",
434
+ class: "mwnf-partner-map__embed"
435
+ }, null, 8, ke),
436
+ s("p", Ae, [s("a", {
437
+ href: d.value,
438
+ target: "_blank",
439
+ rel: "noopener"
440
+ }, "↗ " + v(t.$t(e.openMapLinkEntry)), 9, je)])
441
+ ])) : a("", !0);
442
+ }
443
+ }, Me = ["dir"], Ne = ["src", "alt"], Pe = { class: "mwnf-partner-panel__text" }, Fe = ["innerHTML"], Ie = { key: 0 }, Le = {
444
+ key: 0,
445
+ class: "mwnf-partner-panel__count"
446
+ }, Re = {
447
+ key: 1,
448
+ class: "mwnf-partner-panel__count mwnf-partner-panel__count--empty"
449
+ }, ze = {
450
+ key: 0,
451
+ class: "mwnf-partner-panel__actions"
452
+ }, Be = ["dir"], Ve = ["src", "alt"], He = ["innerHTML"], Ue = {
453
+ key: 0,
454
+ class: "mwnf-partner-panel__location"
455
+ }, We = {
456
+ key: 2,
457
+ class: "mwnf-partner-panel__line"
458
+ }, Ge = ["innerHTML"], Ke = { class: "mwnf-partner-panel__location" }, qe = ["dir"], Je = { class: "mwnf-partner-panel__header" }, Ye = {
459
+ key: 0,
460
+ class: "mwnf-partner-panel__location"
461
+ }, Xe = {
462
+ key: 0,
463
+ class: "mwnf-partner-panel__bar"
464
+ }, Ze = ["aria-label"], Qe = {
465
+ key: 0,
466
+ class: "mwnf-partner-panel__divider",
467
+ "aria-hidden": "true"
468
+ }, $e = [
469
+ "id",
470
+ "aria-selected",
471
+ "aria-controls",
472
+ "tabindex",
473
+ "onClick"
474
+ ], et = ["href"], tt = ["href"], nt = {
475
+ key: 2,
476
+ class: "mwnf-partner-panel__actions"
477
+ }, rt = { class: "mwnf-partner-panel__body" }, it = { class: "mwnf-partner-panel__panels" }, at = ["innerHTML"], ot = {
478
+ key: 2,
479
+ class: "mwnf-partner-panel__contact"
480
+ }, st = { class: "mwnf-partner-panel__contact-heading" }, ct = ["innerHTML"], lt = { key: 1 }, ut = { key: 2 }, dt = { key: 3 }, ft = ["href"], pt = {
481
+ key: 4,
482
+ class: "mwnf-partner-panel__links"
483
+ }, mt = {
484
+ key: 0,
485
+ class: "mwnf-partner-panel__divider",
486
+ "aria-hidden": "true"
487
+ }, ht = ["href"], gt = {
488
+ key: 0,
489
+ class: "mwnf-partner-panel__person-title"
490
+ }, _t = { key: 1 }, vt = { key: 2 }, yt = { key: 3 }, bt = { key: 4 }, xt = ["href"], St = {
491
+ key: 3,
492
+ class: "mwnf-partner-panel__logos"
493
+ }, Ct = ["src", "alt"], wt = {
494
+ __name: "PartnerPanel",
495
+ props: {
496
+ partner: {
497
+ type: Object,
498
+ default: null
499
+ },
500
+ variant: {
501
+ type: String,
502
+ default: "full"
503
+ },
504
+ layout: {
505
+ type: String,
506
+ default: "tabs"
507
+ },
508
+ show: {
509
+ type: Object,
510
+ default: () => ({})
511
+ },
512
+ heading: {
513
+ type: Number,
514
+ default: 0
515
+ },
516
+ label: {
517
+ type: String,
518
+ default: ""
519
+ },
520
+ objectsLabel: {
521
+ type: String,
522
+ default: "partner.item.objectsInSite"
523
+ },
524
+ emptyLabel: {
525
+ type: String,
526
+ default: ""
527
+ },
528
+ homepageLabel: {
529
+ type: String,
530
+ default: "partner.nav.homepage"
531
+ },
532
+ readMoreLabel: {
533
+ type: String,
534
+ default: "partner.action.readMore"
535
+ },
536
+ viewObjectsLabel: {
537
+ type: String,
538
+ default: "partner.action.viewObjects"
539
+ },
540
+ dir: {
541
+ type: String,
542
+ default: ""
543
+ }
544
+ },
545
+ setup(x) {
546
+ let S = x, { t: E } = O(), D = b(), k = {
547
+ line: ["actions"],
548
+ summary: ["logo"],
549
+ full: []
550
+ };
551
+ function A(e) {
552
+ let t = S.show?.[e];
553
+ return t === void 0 ? !(k[S.variant] ?? []).includes(e) : !!t;
554
+ }
555
+ let j = r(() => S.partner), M = r(() => S.heading >= 1 && S.heading <= 6 ? `h${S.heading}` : "p"), N = r(() => S.heading >= 1 && S.heading <= 5 ? `h${S.heading + 1}` : "p"), P = r(() => j.value?.logos?.[0] ?? null), F = r(() => A("homepage") ? j.value?.contact?.website ?? null : null), I = r(() => {
556
+ let e = j.value;
557
+ if (!e) return [];
558
+ let t = [];
559
+ A("description") && t.push({
560
+ key: "about",
561
+ label: E("partner.info.about")
562
+ });
563
+ let n = A("persons") ? e.persons ?? [] : [], r = e.contact ?? {}, i = r.address || r.phone || r.fax || r.email || r.website || r.links?.length || n.length;
564
+ return A("contact") && i && t.push({
565
+ key: "contact",
566
+ label: E("partner.info.contact")
567
+ }), A("logos") && e.logos?.length && t.push({
568
+ key: "logo",
569
+ label: E("partner.info.logo")
570
+ }), t;
571
+ }), L = m("");
572
+ C(() => [j.value?.id, I.value.map((e) => e.key).join()], () => {
573
+ I.value.some((e) => e.key === L.value) || (L.value = I.value[0]?.key ?? "");
574
+ }, { immediate: !0 }), C(() => j.value?.id, () => {
575
+ L.value = I.value[0]?.key ?? "";
576
+ });
577
+ function R(e) {
578
+ return `${D}-tab-${e}`;
579
+ }
580
+ function z(e) {
581
+ return `${D}-panel-${e}`;
582
+ }
583
+ function B(e) {
584
+ let t = I.value.map((e) => e.key), n = t.indexOf(L.value), r = {
585
+ ArrowRight: (n + 1) % t.length,
586
+ ArrowLeft: (n - 1 + t.length) % t.length,
587
+ Home: 0,
588
+ End: t.length - 1
589
+ }[e.key];
590
+ r === void 0 || !t.length || (e.preventDefault(), L.value = t[r], d(() => document.getElementById(R(t[r]))?.focus()));
591
+ }
592
+ let V = r(() => A("persons") ? j.value?.persons ?? [] : []), H = r(() => [...j.value?.contact?.website ? [j.value.contact.website] : [], ...j.value?.contact?.links ?? []]);
593
+ return (r, d) => x.partner && x.variant === "line" ? (p(), o("div", {
594
+ key: 0,
595
+ class: "mwnf-partner-panel mwnf-partner-panel--line",
596
+ dir: x.dir || void 0
597
+ }, [
598
+ A("logo") && P.value ? (p(), o("img", {
599
+ key: 0,
600
+ class: "mwnf-partner-panel__logo",
601
+ src: P.value.url,
602
+ alt: x.partner.plainName,
603
+ loading: "lazy"
604
+ }, null, 8, Ne)) : a("", !0),
605
+ s("div", Pe, [
606
+ g(r.$slots, "badge", { partner: x.partner }),
607
+ (p(), i(_(x.partner.route ? e : "span"), {
608
+ class: "mwnf-partner-panel__name",
609
+ to: x.partner.route || void 0
610
+ }, {
611
+ default: w(() => [s("span", { innerHTML: x.partner.name }, null, 8, Fe), A("location") && x.partner.city ? (p(), o("span", Ie, ", " + v(x.partner.city), 1)) : a("", !0)]),
612
+ _: 1
613
+ }, 8, ["to"])),
614
+ g(r.$slots, "meta", { partner: x.partner }, () => [A("count") && x.partner.itemCount ? (p(), o("p", Le, v(x.partner.itemCount) + " " + v(y(E)(x.objectsLabel)), 1)) : A("count") && x.emptyLabel ? (p(), o("p", Re, v(y(E)(x.emptyLabel)), 1)) : a("", !0)]),
615
+ r.$slots.actions || A("actions") && x.partner.route ? (p(), o("p", ze, [g(r.$slots, "actions", { partner: x.partner }, () => [l(e, { to: x.partner.route }, {
616
+ default: w(() => [c(v(y(E)(x.readMoreLabel)), 1)]),
617
+ _: 1
618
+ }, 8, ["to"]), x.partner.objectsRoute ? (p(), o(n, { key: 0 }, [d[0] ||= s("span", {
619
+ class: "mwnf-partner-panel__divider",
620
+ "aria-hidden": "true"
621
+ }, "|", -1), l(e, { to: x.partner.objectsRoute }, {
622
+ default: w(() => [c(v(y(E)(x.viewObjectsLabel)), 1)]),
623
+ _: 1
624
+ }, 8, ["to"])], 64)) : a("", !0)])])) : a("", !0)
625
+ ]),
626
+ g(r.$slots, "after", { partner: x.partner })
627
+ ], 8, Me)) : x.partner && x.variant === "summary" ? (p(), o("div", {
628
+ key: 1,
629
+ class: f(["mwnf-partner-panel mwnf-partner-panel--summary", { "mwnf-partner-panel--heading": x.heading }]),
630
+ dir: x.dir || void 0
631
+ }, [
632
+ A("logo") && P.value ? (p(), o("img", {
633
+ key: 0,
634
+ class: "mwnf-partner-panel__logo",
635
+ src: P.value.url,
636
+ alt: x.partner.plainName,
637
+ loading: "lazy"
638
+ }, null, 8, Ve)) : a("", !0),
639
+ x.heading ? (p(), o(n, { key: 1 }, [
640
+ g(r.$slots, "badge", { partner: x.partner }),
641
+ (p(), i(_(M.value), { class: "mwnf-partner-panel__name" }, {
642
+ default: w(() => [(p(), i(_(x.partner.route ? e : "span"), { to: x.partner.route || void 0 }, {
643
+ default: w(() => [s("span", { innerHTML: x.partner.name }, null, 8, He)]),
644
+ _: 1
645
+ }, 8, ["to"]))]),
646
+ _: 1
647
+ })),
648
+ A("location") && x.partner.location ? (p(), o("p", Ue, v(x.partner.location), 1)) : a("", !0),
649
+ g(r.$slots, "meta", { partner: x.partner })
650
+ ], 64)) : (p(), o("p", We, [
651
+ g(r.$slots, "badge", { partner: x.partner }),
652
+ (p(), i(_(x.partner.route ? e : "span"), {
653
+ class: "mwnf-partner-panel__name",
654
+ to: x.partner.route || void 0
655
+ }, {
656
+ default: w(() => [x.label ? (p(), o(n, { key: 0 }, [c(v(`${y(E)(x.label)} `), 1)], 64)) : a("", !0), s("span", { innerHTML: x.partner.name }, null, 8, Ge)]),
657
+ _: 1
658
+ }, 8, ["to"])),
659
+ A("location") && x.partner.location ? (p(), o(n, { key: 0 }, [d[1] ||= c(", ", -1), s("span", Ke, v(x.partner.location), 1)], 64)) : a("", !0),
660
+ g(r.$slots, "meta", { partner: x.partner })
661
+ ])),
662
+ g(r.$slots, "actions", { partner: x.partner }),
663
+ g(r.$slots, "after", { partner: x.partner })
664
+ ], 10, Be)) : x.partner ? (p(), o("div", {
665
+ key: 2,
666
+ class: f(["mwnf-partner-panel mwnf-partner-panel--full", `mwnf-partner-panel--${x.layout === "sections" ? "sections" : "tabs"}`]),
667
+ dir: x.dir || void 0
668
+ }, [
669
+ s("div", Je, [
670
+ g(r.$slots, "badge", { partner: x.partner }),
671
+ (p(), i(_(M.value), {
672
+ class: "mwnf-partner-panel__name",
673
+ innerHTML: x.partner.name
674
+ }, null, 8, ["innerHTML"])),
675
+ A("location") && x.partner.location ? (p(), o("p", Ye, v(x.partner.location), 1)) : a("", !0),
676
+ g(r.$slots, "meta", { partner: x.partner })
677
+ ]),
678
+ x.layout !== "sections" && I.value.length || F.value || r.$slots.actions ? (p(), o("div", Xe, [x.layout !== "sections" && I.value.length ? (p(), o("div", {
679
+ key: 0,
680
+ role: "tablist",
681
+ class: "mwnf-partner-panel__tabs",
682
+ "aria-label": x.partner.plainName,
683
+ onKeydown: B
684
+ }, [(p(!0), o(n, null, h(I.value, (e, t) => (p(), o(n, { key: e.key }, [t ? (p(), o("span", Qe, "|")) : a("", !0), s("button", {
685
+ id: R(e.key),
686
+ type: "button",
687
+ role: "tab",
688
+ class: f(["mwnf-partner-panel__tab", { "mwnf-partner-panel__tab--active": L.value === e.key }]),
689
+ "aria-selected": L.value === e.key ? "true" : "false",
690
+ "aria-controls": z(e.key),
691
+ tabindex: L.value === e.key ? 0 : -1,
692
+ onClick: (t) => L.value = e.key
693
+ }, v(e.label), 11, $e)], 64))), 128)), F.value ? (p(), o(n, { key: 0 }, [d[2] ||= s("span", {
694
+ class: "mwnf-partner-panel__divider",
695
+ "aria-hidden": "true"
696
+ }, "|", -1), s("a", {
697
+ class: "mwnf-partner-panel__homepage",
698
+ href: F.value.url,
699
+ target: "_blank",
700
+ rel: "noopener"
701
+ }, "↗ " + v(y(E)(x.homepageLabel)), 9, et)], 64)) : a("", !0)], 40, Ze)) : F.value ? (p(), o("a", {
702
+ key: 1,
703
+ class: "mwnf-partner-panel__homepage",
704
+ href: F.value.url,
705
+ target: "_blank",
706
+ rel: "noopener"
707
+ }, "↗ " + v(y(E)(x.homepageLabel)), 9, tt)) : a("", !0), r.$slots.actions ? (p(), o("div", nt, [g(r.$slots, "actions", { partner: x.partner })])) : a("", !0)])) : a("", !0),
708
+ s("div", rt, [A("pictures") && x.partner.pictures?.length ? (p(), i(t, {
709
+ key: 0,
710
+ class: "mwnf-partner-panel__pictures",
711
+ images: x.partner.pictures
712
+ }, null, 8, ["images"])) : a("", !0), s("div", it, [(p(!0), o(n, null, h(I.value, (e) => T((p(), i(_(x.layout === "sections" ? "section" : "div"), u({
713
+ id: z(e.key),
714
+ key: e.key,
715
+ class: ["mwnf-partner-panel__panel", `mwnf-partner-panel__panel--${e.key}`]
716
+ }, { ref_for: !0 }, x.layout === "sections" ? {} : {
717
+ role: "tabpanel",
718
+ "aria-labelledby": R(e.key),
719
+ tabindex: 0
720
+ }), {
721
+ default: w(() => [x.layout === "sections" ? (p(), i(_(N.value), {
722
+ key: 0,
723
+ class: "mwnf-partner-panel__section-title"
724
+ }, {
725
+ default: w(() => [c(v(e.label), 1)]),
726
+ _: 2
727
+ }, 1024)) : a("", !0), e.key === "about" ? (p(), o("div", {
728
+ key: 1,
729
+ class: "mwnf-prose mwnf-partner-panel__description",
730
+ innerHTML: x.partner.description
731
+ }, null, 8, at)) : e.key === "contact" ? (p(), o("div", ot, [
732
+ x.partner.contact.address ? (p(), o(n, { key: 0 }, [s("p", st, v(y(E)("partner.info.addresses")), 1), s("div", {
733
+ class: "mwnf-prose mwnf-partner-panel__address",
734
+ innerHTML: x.partner.contact.address
735
+ }, null, 8, ct)], 64)) : a("", !0),
736
+ x.partner.contact.phone ? (p(), o("p", lt, v(y(E)("partner.info.phone")) + " " + v(x.partner.contact.phone), 1)) : a("", !0),
737
+ x.partner.contact.fax ? (p(), o("p", ut, v(y(E)("partner.info.fax")) + " " + v(x.partner.contact.fax), 1)) : a("", !0),
738
+ x.partner.contact.email ? (p(), o("p", dt, [s("a", { href: `mailto:${x.partner.contact.email}` }, v(x.partner.contact.email), 9, ft)])) : a("", !0),
739
+ H.value.length ? (p(), o("p", pt, [(p(!0), o(n, null, h(H.value, (e, t) => (p(), o(n, { key: e.url }, [t ? (p(), o("span", mt, "|")) : a("", !0), s("a", {
740
+ href: e.url,
741
+ target: "_blank",
742
+ rel: "noopener"
743
+ }, v(e.label), 9, ht)], 64))), 128))])) : a("", !0),
744
+ (p(!0), o(n, null, h(V.value, (e, t) => (p(), o("div", {
745
+ key: t,
746
+ class: "mwnf-partner-panel__person"
747
+ }, [
748
+ e.title ? (p(), o("p", gt, v(e.title), 1)) : a("", !0),
749
+ e.name ? (p(), o("p", _t, v(e.name), 1)) : a("", !0),
750
+ e.phone ? (p(), o("p", vt, v(y(E)("partner.info.phone")) + " " + v(e.phone), 1)) : a("", !0),
751
+ e.fax ? (p(), o("p", yt, v(y(E)("partner.info.fax")) + " " + v(e.fax), 1)) : a("", !0),
752
+ e.email ? (p(), o("p", bt, [s("a", { href: `mailto:${e.email}` }, v(e.email), 9, xt)])) : a("", !0)
753
+ ]))), 128))
754
+ ])) : e.key === "logo" ? (p(), o("div", St, [(p(!0), o(n, null, h(x.partner.logos, (e) => (p(), o("img", {
755
+ key: e.url,
756
+ src: e.url,
757
+ alt: e.alt
758
+ }, null, 8, Ct))), 128))])) : a("", !0)]),
759
+ _: 2
760
+ }, 1040, ["id", "class"])), [[ee, x.layout === "sections" || L.value === e.key]])), 128))])]),
761
+ A("map") && x.partner.map ? (p(), i(Q, {
762
+ key: 1,
763
+ class: "mwnf-partner-panel__map",
764
+ latitude: x.partner.map.latitude,
765
+ longitude: x.partner.map.longitude,
766
+ zoom: x.partner.map.zoom,
767
+ label: x.partner.map.label
768
+ }, null, 8, [
769
+ "latitude",
770
+ "longitude",
771
+ "zoom",
772
+ "label"
773
+ ])) : a("", !0),
774
+ g(r.$slots, "after", { partner: x.partner })
775
+ ], 10, qe)) : a("", !0);
776
+ }
777
+ }, Tt = {
778
+ key: 0,
779
+ class: "mwnf-timeline__rows"
780
+ }, Et = { class: "mwnf-timeline__date" }, $ = { class: "mwnf-timeline__body" }, Dt = {
781
+ key: 0,
782
+ class: "mwnf-timeline__caption"
783
+ }, Ot = ["innerHTML"], kt = ["innerHTML"], At = {
784
+ key: 2,
785
+ class: "mwnf-timeline__media"
786
+ }, jt = ["src", "alt"], Mt = ["innerHTML"], Nt = {
787
+ key: 3,
788
+ class: "mwnf-timeline__actions"
789
+ }, Pt = {
790
+ key: 1,
791
+ class: "mwnf-timeline__empty"
792
+ }, Ft = {
793
+ __name: "TimelineEventList",
794
+ props: { events: {
795
+ type: Array,
796
+ default: () => []
797
+ } },
798
+ setup(t) {
799
+ let r = !!x().empty;
800
+ return (l, u) => t.events.length ? (p(), o("ul", Tt, [(p(!0), o(n, null, h(t.events, (t) => (p(), o("li", {
801
+ key: t.id,
802
+ class: "mwnf-timeline__row"
803
+ }, [s("div", Et, [g(l.$slots, "date", { event: t }, () => [c(v(t.date), 1)])]), s("div", $, [
804
+ t.caption || l.$slots.caption ? (p(), o("div", Dt, [g(l.$slots, "caption", { event: t }, () => [s("span", { innerHTML: t.caption }, null, 8, Ot)])])) : a("", !0),
805
+ t.description ? (p(), o("div", {
806
+ key: 1,
807
+ class: "mwnf-timeline__description mwnf-sheet__block",
808
+ innerHTML: t.description
809
+ }, null, 8, kt)) : a("", !0),
810
+ t.media?.length || l.$slots.media ? (p(), o("div", At, [g(l.$slots, "media", { event: t }, () => [(p(!0), o(n, null, h(t.media ?? [], (t, n) => (p(), i(e, {
811
+ key: n,
812
+ class: "mwnf-timeline__media-item",
813
+ to: t.to,
814
+ href: t.href
815
+ }, {
816
+ default: w(() => [t.image ? (p(), o("img", {
817
+ key: 0,
818
+ src: t.image,
819
+ alt: t.alt ?? "",
820
+ loading: "lazy"
821
+ }, null, 8, jt)) : a("", !0), t.caption ? (p(), o("span", {
822
+ key: 1,
823
+ class: "mwnf-timeline__media-caption",
824
+ innerHTML: t.caption
825
+ }, null, 8, Mt)) : a("", !0)]),
826
+ _: 2
827
+ }, 1032, ["to", "href"]))), 128))])])) : a("", !0),
828
+ t.actions?.length || l.$slots.actions ? (p(), o("div", Nt, [g(l.$slots, "actions", { event: t }, () => [(p(!0), o(n, null, h(t.actions ?? [], (t, n) => (p(), i(e, {
829
+ key: n,
830
+ class: "mwnf-timeline__action",
831
+ to: t.to,
832
+ href: t.href
833
+ }, {
834
+ default: w(() => [c(v(t.label) + " →", 1)]),
835
+ _: 2
836
+ }, 1032, ["to", "href"]))), 128))])])) : a("", !0)
837
+ ])]))), 128))])) : y(r) ? (p(), o("div", Pt, [g(l.$slots, "empty")])) : a("", !0);
838
+ }
839
+ };
840
+ //#endregion
841
+ export { ye as a, K as c, Ee as i, wt as n, me as o, Q as r, se as s, Ft as t };