@museumwnf/viewer-layout 3.5.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.
@@ -2,7 +2,7 @@ import { t as e } from "./chrome-DPuPeWzV.js";
2
2
  import { r as t } from "./GlossaryPopover-DcptyNWI.js";
3
3
  import { n } from "./TimelineEventList-gsoc-SBx.js";
4
4
  import { i as r, n as i, o as a, r as o, t as s } from "./OnDisplayIn-BfJoPonn.js";
5
- import { t as c } from "./RecordView-C9rP8TyQ.js";
5
+ import { t as c } from "./RecordView-DovgfTMz.js";
6
6
  import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as ee, createTextVNode as h, createVNode as g, guardReactiveProps as _, normalizeClass as v, normalizeProps as y, normalizeStyle as te, openBlock as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useSlots as ne, withCtx as T } from "vue";
7
7
  import { NotFoundView as re, byId as E, loadEntities as ie, mdInline as D, mdStrip as ae, mwnfLinks as O, partnerView as oe, useDataPackage as se, useI18n as ce, useProjects as le, useSiteConfig as ue } from "@museumwnf/viewer-core";
8
8
  //#region src/dxa/ItemDetailView.vue
@@ -0,0 +1,263 @@
1
+ import { a as e, c as t, d as n, i as r, n as ee, o as te, r as ne, s as re, t as ie } from "./GlossaryPopover-DcptyNWI.js";
2
+ import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as u, createTextVNode as d, createVNode as f, guardReactiveProps as p, normalizeClass as ae, normalizeProps as m, openBlock as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, useSlots as b, withCtx as x } from "vue";
3
+ import { NotFoundView as oe, byId as se, citation as ce, entityRef as le, languageLabels as ue, pictureCredits as de, renderBlock as S, renderInline as C, renderPlain as w, sheetRows as T, sourceUrl as fe, useDataPackage as pe, useGlossaryPopup as me, useI18n as he, useProjects as ge, useRecordSheet as _e, useRelatedRecords as ve } from "@museumwnf/viewer-core";
4
+ import { useRoute as ye } from "vue-router";
5
+ //#region src/views/RecordView.vue
6
+ var be = ["dir", "innerHTML"], xe = { class: "mwnf-record__body" }, E = { class: "mwnf-record__main" }, Se = {
7
+ key: 1,
8
+ class: "mwnf-record__status"
9
+ }, D = {
10
+ key: 0,
11
+ class: "mwnf-record__aside"
12
+ }, O = {
13
+ key: 2,
14
+ class: "mwnf-record__status"
15
+ }, k = {
16
+ __name: "RecordView",
17
+ props: {
18
+ spec: {
19
+ type: Object,
20
+ required: !0
21
+ },
22
+ id: {
23
+ type: String,
24
+ required: !0
25
+ },
26
+ entity: {
27
+ type: String,
28
+ default: ""
29
+ }
30
+ },
31
+ setup(k) {
32
+ let A = k, { t: j, locale: Ce } = he(), M = pe(), we = ge(), Te = b(), Ee = ye(), N = A.spec.entity ?? A.entity, P = a(() => A.spec), De = le(N), Oe = se(N), F = a(() => Oe.value.get(A.id) ?? null), ke = a(() => De.value !== null), { language: I, languages: Ae, dir: L, select: R, text: z, ready: B, terms: je, glossary: V, attribution: H } = _e(F, {
33
+ entity: N,
34
+ translations: A.spec.translations ?? [],
35
+ attribution: A.spec.attribution ?? []
36
+ }), U = a(() => ue(Ae.value)), { active: W, onClick: G, close: Me } = me(je), Ne = a(() => W.value ? S(W.value.definition, { breaks: !0 }) : ""), K = (e, t) => M.tr(e, t, I.value, "en"), Pe = (e) => M.translations(e, I.value), q = a(() => ({
37
+ record: F.value,
38
+ text: z.value,
39
+ language: I.value,
40
+ languages: U.value,
41
+ select: R,
42
+ dir: L.value,
43
+ glossary: V.value,
44
+ ready: B.value,
45
+ attribution: H.value,
46
+ t: j,
47
+ tr: K,
48
+ translations: Pe
49
+ }));
50
+ function J(e) {
51
+ return ((typeof e == "function" ? e(q.value) : e) ?? []).map((e) => ({
52
+ ...e,
53
+ label: e.label ? j(e.label) : ""
54
+ }));
55
+ }
56
+ let Fe = a(() => F.value ? T(J(P.value.fields), q.value) : []), Ie = a(() => F.value ? T(J(P.value.sections).map((e) => ({
57
+ render: "block",
58
+ ...e
59
+ })), q.value) : []), Y = a(() => P.value.shortDescription === !1 ? "" : P.value.shortDescription ?? "short_description"), Le = a(() => {
60
+ let e = Y.value ? z.value[Y.value] : "";
61
+ return e ? { html: S(String(e), {
62
+ breaks: !0,
63
+ glossary: V.value
64
+ }) } : null;
65
+ }), Re = a(() => {
66
+ if (!F.value) return "";
67
+ if (P.value.title) return P.value.title(q.value);
68
+ let e = z.value.name ?? F.value.internal_name ?? F.value.id;
69
+ return C(String(e), { glossary: V.value });
70
+ }), X = a(() => {
71
+ if (!F.value) return [];
72
+ if (P.value.media) return P.value.media(F.value, q.value);
73
+ let e = w(String(z.value.name ?? F.value.internal_name ?? ""));
74
+ return (F.value.images ?? []).map((t) => ({
75
+ url: t.url,
76
+ alt: t.captions?.[I.value] ?? e,
77
+ caption: t.captions?.[I.value] ?? "",
78
+ ...de(t, I.value)
79
+ }));
80
+ }), ze = [
81
+ {
82
+ field: "author",
83
+ label: "sheet.field.preparedBy"
84
+ },
85
+ {
86
+ field: "copy_editor",
87
+ label: "sheet.field.copyeditedBy"
88
+ },
89
+ {
90
+ field: "translator",
91
+ label: "sheet.field.translationBy"
92
+ },
93
+ {
94
+ field: "translation_copy_editor",
95
+ label: "sheet.field.translationCopyeditedBy"
96
+ }
97
+ ], Be = a(() => (P.value.credits ?? ze).map(({ field: e, label: t }) => ({
98
+ label: j(t),
99
+ value: z.value[e] ?? H.value[e] ?? ""
100
+ })).filter((e) => e.value)), Ve = a(() => String(F.value?.[P.value.workingNumber ?? "mwnf_reference"] ?? "")), He = a(() => {
101
+ let e = P.value.citation;
102
+ if (!F.value || e === !1) return "";
103
+ let t = typeof e?.project == "function" ? null : e?.project ?? F.value.project_id, n = typeof e?.project == "function" ? e.project(F.value, q.value) : we.label(t), r = e?.permalink === !1 ? void 0 : typeof e?.permalink == "string" ? e.permalink : fe(Ee) ?? void 0;
104
+ return ce({
105
+ author: z.value.author ?? H.value.author,
106
+ name: z.value.name ?? F.value.internal_name ?? "",
107
+ project: n,
108
+ permalink: r,
109
+ inWord: j("record.citation.in")
110
+ });
111
+ }), Z = ve(F, {
112
+ entity: N,
113
+ language: I
114
+ }), Q = a(() => P.value.related === !1 ? null : P.value.related ?? {}), $ = a(() => {
115
+ if (!Q.value) return [];
116
+ let e = Q.value.record ?? Ue;
117
+ return Z.value.inPackage.map((t) => e(t, q.value));
118
+ });
119
+ function Ue({ record: e, justification: t }) {
120
+ let n = K(N, e.id).name ?? e.internal_name ?? e.id;
121
+ return {
122
+ id: e.id,
123
+ image: e.images?.[0]?.url ?? "",
124
+ imageAlt: w(String(n)),
125
+ name: C(String(n)),
126
+ meta: t ? [t] : [],
127
+ badge: e.type ?? "",
128
+ to: {
129
+ name: P.value.route ?? (A.entity ? `${A.entity}-detail` : "item"),
130
+ params: { id: e.id }
131
+ }
132
+ };
133
+ }
134
+ let We = /* @__PURE__ */ new Set([
135
+ "header",
136
+ "before-sheet",
137
+ "after-sheet",
138
+ "aside",
139
+ "source",
140
+ "related",
141
+ "after",
142
+ "default"
143
+ ]), Ge = a(() => Object.keys(Te).filter((e) => !We.has(e)));
144
+ return (a, b) => ke.value && !F.value ? (h(), o(y(oe), { key: 0 })) : F.value ? (h(), c("article", {
145
+ key: 1,
146
+ class: ae(["mwnf-record", { "mwnf-record--spaced": P.value.spaced }]),
147
+ onClick: b[0] ||= (...e) => y(G) && y(G)(...e)
148
+ }, [
149
+ _(a.$slots, "header", m(p(q.value)), () => [
150
+ P.value.back ? (h(), o(n, {
151
+ key: 0,
152
+ class: "mwnf-record__back",
153
+ to: P.value.back.to,
154
+ href: P.value.back.href
155
+ }, {
156
+ default: x(() => [d("← " + v(y(j)(P.value.back.label)), 1)]),
157
+ _: 1
158
+ }, 8, ["to", "href"])) : s("", !0),
159
+ f(t, {
160
+ languages: U.value,
161
+ language: y(I),
162
+ onSelect: y(R)
163
+ }, null, 8, [
164
+ "languages",
165
+ "language",
166
+ "onSelect"
167
+ ]),
168
+ l("h1", {
169
+ class: "mwnf-record__title",
170
+ dir: y(L) || void 0,
171
+ innerHTML: Re.value
172
+ }, null, 8, be)
173
+ ]),
174
+ l("div", xe, [l("div", E, [
175
+ X.value.length ? (h(), o(ee, {
176
+ key: 0,
177
+ images: X.value,
178
+ variant: P.value.mediaVariant ?? ""
179
+ }, null, 8, ["images", "variant"])) : s("", !0),
180
+ y(B) ? s("", !0) : (h(), c("p", Se, v(y(j)("core.status.loading")), 1)),
181
+ _(a.$slots, "before-sheet", m(p(q.value))),
182
+ f(re, {
183
+ rows: Fe.value,
184
+ layout: P.value.layout ?? "table",
185
+ dir: y(L),
186
+ "short-description": Le.value,
187
+ "short-description-after": P.value.shortDescriptionAfter ?? "description"
188
+ }, u({ _: 2 }, [g(Ge.value, (e) => ({
189
+ name: e,
190
+ fn: x((t) => [_(a.$slots, e, m(p({
191
+ ...t,
192
+ ...q.value
193
+ })))])
194
+ }))]), 1032, [
195
+ "rows",
196
+ "layout",
197
+ "dir",
198
+ "short-description",
199
+ "short-description-after"
200
+ ]),
201
+ (h(!0), c(i, null, g(Ie.value, (e) => (h(), o(te, {
202
+ key: e.key,
203
+ heading: e.label,
204
+ html: e.html,
205
+ dir: y(L)
206
+ }, null, 8, [
207
+ "heading",
208
+ "html",
209
+ "dir"
210
+ ]))), 128)),
211
+ _(a.$slots, "after-sheet", m(p(q.value))),
212
+ f(e, {
213
+ credits: Be.value,
214
+ "working-number": Ve.value,
215
+ "working-number-label": y(j)("sheet.field.workingNumber"),
216
+ citation: He.value,
217
+ "citation-heading": P.value.citation?.heading ? y(j)(P.value.citation.heading) : ""
218
+ }, null, 8, [
219
+ "credits",
220
+ "working-number",
221
+ "working-number-label",
222
+ "citation",
223
+ "citation-heading"
224
+ ]),
225
+ _(a.$slots, "source", m(p(q.value)), () => [f(r)]),
226
+ _(a.$slots, "related", m(p({
227
+ ...q.value,
228
+ records: $.value,
229
+ outside: y(Z).outside
230
+ })), () => [Q.value ? (h(), o(ne, {
231
+ key: 0,
232
+ heading: y(j)(Q.value.heading ?? "record.related.items"),
233
+ records: $.value,
234
+ variant: Q.value.variant ?? "list",
235
+ "action-label": Q.value.actionLabel ? y(j)(Q.value.actionLabel) : ""
236
+ }, null, 8, [
237
+ "heading",
238
+ "records",
239
+ "variant",
240
+ "action-label"
241
+ ])) : s("", !0)])
242
+ ]), a.$slots.aside ? (h(), c("aside", D, [_(a.$slots, "aside", m(p({
243
+ ...q.value,
244
+ records: $.value,
245
+ outside: y(Z).outside
246
+ })))])) : s("", !0)]),
247
+ _(a.$slots, "after", m(p(q.value))),
248
+ f(ie, {
249
+ term: y(W),
250
+ html: Ne.value,
251
+ dir: y(L),
252
+ onClose: y(Me)
253
+ }, null, 8, [
254
+ "term",
255
+ "html",
256
+ "dir",
257
+ "onClose"
258
+ ])
259
+ ], 2)) : (h(), c("p", O, v(y(j)("core.status.loading")), 1));
260
+ }
261
+ };
262
+ //#endregion
263
+ export { k as t };
package/dist/dxa.js CHANGED
@@ -4,11 +4,11 @@ import { c as l, d as u } from "./GlossaryPopover-DcptyNWI.js";
4
4
  import { a as d, c as f, n as p, o as m, s as h } from "./TimelineEventList-gsoc-SBx.js";
5
5
  import { s as g } from "./OnDisplayIn-BfJoPonn.js";
6
6
  import { a as ee, i as _, n as v, r as y, s as b, t as x } from "./TimelineResultsView-C2-TnM71.js";
7
- import { t as te } from "./RecordView-C9rP8TyQ.js";
7
+ import { t as te } from "./RecordView-DovgfTMz.js";
8
8
  import { t as ne } from "./SiteShell-4vV2jIzf.js";
9
9
  import { A as re, C as ie, D as ae, E as oe, M as se, N as ce, O as le, S as ue, T as de, _ as fe, a as pe, b as S, c as me, d as he, f as ge, g as C, h as _e, i as ve, j as ye, k as be, l as xe, m as Se, n as Ce, o as we, p as Te, r as Ee, s as De, t as Oe, u as w, v as ke, w as Ae, x as je, y as Me } from "./data-DTbAYdr2.js";
10
10
  import { A as Ne, C as Pe, D as Fe, E as Ie, F as Le, I as Re, L as ze, M as Be, N as Ve, O as He, P as Ue, R as We, S as Ge, T, _ as Ke, a as qe, b as Je, c as Ye, d as Xe, f as E, g as Ze, h as Qe, i as $e, j as et, k as tt, l as nt, m as rt, n as it, o as D, p as at, r as ot, s as st, t as ct, u as lt, v as O, w as k, x as A, y as ut } from "./data-CJlLA-Mf.js";
11
- import { t as dt } from "./ItemDetailView-COWC8GDg.js";
11
+ import { t as dt } from "./ItemDetailView-BdGFnbLG.js";
12
12
  import { n as ft, r as pt, t as mt } from "./themeSpecs-B885l456.js";
13
13
  import { Fragment as j, computed as M, createBlock as N, createCommentVNode as P, createElementBlock as F, createElementVNode as I, createSlots as ht, createTextVNode as L, createVNode as R, normalizeClass as gt, normalizeStyle as _t, onBeforeUnmount as vt, onMounted as yt, openBlock as z, ref as B, renderList as V, renderSlot as bt, resolveDynamicComponent as xt, toDisplayString as H, unref as U, vModelText as St, vShow as Ct, withCtx as W, withDirectives as G, withModifiers as wt } from "vue";
14
14
  import { I18nText as K, NotFoundView as Tt, languageLabels as Et, loadEntities as q, mwnfLinks as J, offeredLanguages as Dt, renderInline as Ot, sectionMeta as kt, useDataPackage as At, useFacets as jt, useI18n as Y, useKeywordIndex as Mt, useSection as Nt, useSiteConfig as X, yearBuckets as Z } from "@museumwnf/viewer-core";
@@ -1,11 +1,11 @@
1
1
  import { r as e } from "./chrome-DPuPeWzV.js";
2
2
  import { c as t, d as n, n as r } from "./GlossaryPopover-DcptyNWI.js";
3
- import { t as i } from "./RecordView-C9rP8TyQ.js";
3
+ import { t as i } from "./RecordView-DovgfTMz.js";
4
4
  import { t as a } from "./SiteShell-4vV2jIzf.js";
5
5
  import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as f, createTextVNode as p, createVNode as m, guardReactiveProps as h, normalizeClass as g, normalizeProps as _, normalizeStyle as v, openBlock as y, ref as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useSlots as T, watch as E, withCtx as D } from "vue";
6
- import { byId as O, loadEntities as k, removeEndingPoint as A, renderBlock as j, renderInline as M, renderPlain as N, useDataPackage as P, useI18n as F, useSection as ee, useSiteConfig as I } from "@museumwnf/viewer-core";
6
+ import { byId as O, loadEntities as k, pictureCredits as A, removeEndingPoint as j, renderBlock as M, renderInline as N, renderPlain as P, useDataPackage as F, useI18n as I, useSection as ee, useSiteConfig as L } from "@museumwnf/viewer-core";
7
7
  //#region src/standalone/Banner.vue
8
- var L = {
8
+ var te = {
9
9
  key: 0,
10
10
  class: "mwnf-standalone-banner__title"
11
11
  }, R = {
@@ -24,13 +24,13 @@ var L = {
24
24
  return (t, n) => (y(), u("div", {
25
25
  class: "mwnf-standalone-banner",
26
26
  style: v(e.image ? { backgroundImage: `url(${JSON.stringify(e.image)})` } : void 0)
27
- }, [e.title ? (y(), u("h1", L, [d("span", null, C(e.title), 1)])) : l("", !0)], 4));
27
+ }, [e.title ? (y(), u("h1", te, [d("span", null, C(e.title), 1)])) : l("", !0)], 4));
28
28
  }
29
29
  };
30
30
  //#endregion
31
31
  //#region src/standalone/chrome.js
32
32
  function z() {
33
- let t = I();
33
+ let t = L();
34
34
  return (n) => e(t.chrome, n);
35
35
  }
36
36
  function B(e, t) {
@@ -53,19 +53,19 @@ function U(e) {
53
53
  }
54
54
  //#endregion
55
55
  //#region src/standalone/Sponsors.vue
56
- var te = { class: "mwnf-standalone-sponsors" }, ne = {
56
+ var ne = { class: "mwnf-standalone-sponsors" }, re = {
57
57
  key: 0,
58
58
  class: "mwnf-standalone-sponsors__text"
59
- }, re = ["innerHTML"], ie = { key: 1 }, ae = ["innerHTML"], W = {
59
+ }, ie = ["innerHTML"], ae = { key: 1 }, W = ["innerHTML"], G = {
60
60
  key: 1,
61
61
  class: "mwnf-standalone-sponsors__title"
62
- }, G = {
62
+ }, K = {
63
63
  key: 2,
64
64
  class: "mwnf-standalone-sponsors__logos"
65
- }, K = {
65
+ }, q = {
66
66
  key: 0,
67
67
  class: "mwnf-standalone-sponsors__note"
68
- }, q = ["src", "alt"], J = ["innerHTML"], oe = ["href"], se = ["src", "alt"], ce = ["src", "alt"], le = {
68
+ }, J = ["src", "alt"], oe = ["innerHTML"], se = ["href"], ce = ["src", "alt"], le = ["src", "alt"], ue = {
69
69
  key: 3,
70
70
  class: "mwnf-standalone-sponsors__links"
71
71
  }, Y = {
@@ -75,48 +75,48 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
75
75
  default: () => []
76
76
  } },
77
77
  setup(e) {
78
- let t = e, { t: r } = F(), i = z(), a = s(() => t.columns.map((e, t) => ({
78
+ let t = e, { t: r } = I(), i = z(), a = s(() => t.columns.map((e, t) => ({
79
79
  key: t,
80
80
  width: e.width ?? null,
81
- lead: e.lead ? M(r(e.lead)) : "",
82
- text: e.text ? M(r(e.text)) : "",
81
+ lead: e.lead ? N(r(e.lead)) : "",
82
+ text: e.text ? N(r(e.text)) : "",
83
83
  break: !!e.break,
84
84
  title: e.title ? r(e.title) : "",
85
85
  logos: (e.logos ?? []).map((e) => ({
86
86
  src: i(e.src) ?? "",
87
87
  alt: e.alt ? r(e.alt) : "",
88
88
  href: e.href ?? "",
89
- note: e.note ? j(r(e.note)) : ""
89
+ note: e.note ? M(r(e.note)) : ""
90
90
  })),
91
91
  links: (e.links ?? []).map((e) => ({
92
92
  ...e,
93
93
  label: r(e.label)
94
94
  }))
95
95
  })));
96
- return (e, t) => (y(), u("div", te, [(y(!0), u(o, null, x(a.value, (e) => (y(), u("div", {
96
+ return (e, t) => (y(), u("div", ne, [(y(!0), u(o, null, x(a.value, (e) => (y(), u("div", {
97
97
  key: e.key,
98
98
  class: "mwnf-standalone-sponsors__column",
99
99
  style: v(e.width ? { flexGrow: e.width } : void 0)
100
100
  }, [
101
- e.lead || e.text ? (y(), u("p", ne, [
101
+ e.lead || e.text ? (y(), u("p", re, [
102
102
  e.lead ? (y(), u("i", {
103
103
  key: 0,
104
104
  innerHTML: e.lead
105
- }, null, 8, re)) : l("", !0),
106
- e.lead && e.break ? (y(), u("br", ie)) : e.lead && e.text ? (y(), u(o, { key: 2 }, [p(C(" "))], 64)) : l("", !0),
105
+ }, null, 8, ie)) : l("", !0),
106
+ e.lead && e.break ? (y(), u("br", ae)) : e.lead && e.text ? (y(), u(o, { key: 2 }, [p(C(" "))], 64)) : l("", !0),
107
107
  e.text ? (y(), u("span", {
108
108
  key: 3,
109
109
  innerHTML: e.text
110
- }, null, 8, ae)) : l("", !0)
110
+ }, null, 8, W)) : l("", !0)
111
111
  ])) : l("", !0),
112
- e.title ? (y(), u("p", W, C(e.title), 1)) : l("", !0),
113
- e.logos.length ? (y(), u("ul", G, [(y(!0), u(o, null, x(e.logos, (e) => (y(), u("li", { key: e.src }, [e.note ? (y(), u("details", K, [d("summary", null, [d("img", {
112
+ e.title ? (y(), u("p", G, C(e.title), 1)) : l("", !0),
113
+ e.logos.length ? (y(), u("ul", K, [(y(!0), u(o, null, x(e.logos, (e) => (y(), u("li", { key: e.src }, [e.note ? (y(), u("details", q, [d("summary", null, [d("img", {
114
114
  src: e.src,
115
115
  alt: e.alt
116
- }, null, 8, q)]), d("div", {
116
+ }, null, 8, J)]), d("div", {
117
117
  class: "mwnf-standalone-sponsors__note-body",
118
118
  innerHTML: e.note
119
- }, null, 8, J)])) : e.href ? (y(), u("a", {
119
+ }, null, 8, oe)])) : e.href ? (y(), u("a", {
120
120
  key: 1,
121
121
  href: e.href,
122
122
  target: "_blank",
@@ -124,12 +124,12 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
124
124
  }, [d("img", {
125
125
  src: e.src,
126
126
  alt: e.alt
127
- }, null, 8, se)], 8, oe)) : (y(), u("img", {
127
+ }, null, 8, ce)], 8, se)) : (y(), u("img", {
128
128
  key: 2,
129
129
  src: e.src,
130
130
  alt: e.alt
131
- }, null, 8, ce))]))), 128))])) : l("", !0),
132
- e.links.length ? (y(), u("ul", le, [(y(!0), u(o, null, x(e.links, (e) => (y(), u("li", { key: e.label }, [m(n, {
131
+ }, null, 8, le))]))), 128))])) : l("", !0),
132
+ e.links.length ? (y(), u("ul", ue, [(y(!0), u(o, null, x(e.links, (e) => (y(), u("li", { key: e.label }, [m(n, {
133
133
  to: e.to,
134
134
  href: e.href,
135
135
  external: !!e.external
@@ -143,7 +143,7 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
143
143
  ])]))), 128))])) : l("", !0)
144
144
  ], 4))), 128))]));
145
145
  }
146
- }, ue = ["src"], de = {
146
+ }, de = ["src"], fe = {
147
147
  __name: "Shell",
148
148
  props: {
149
149
  language: {
@@ -157,7 +157,7 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
157
157
  },
158
158
  emits: ["update:language"],
159
159
  setup(t, { emit: n }) {
160
- let r = t, i = n, { t: o, locale: l } = F(), u = I(), p = ee(), h = s(() => u.standalone ?? {}), _ = s(() => u.navigation ?? {}), v = s(() => p.value === "home"), b = s(() => h.value.areas?.[p.value] ?? null), x = (t) => e(u.chrome, B(t, l.value)), C = s(() => {
160
+ let r = t, i = n, { t: o, locale: l } = I(), u = L(), p = ee(), h = s(() => u.standalone ?? {}), _ = s(() => u.navigation ?? {}), v = s(() => p.value === "home"), b = s(() => h.value.areas?.[p.value] ?? null), x = (t) => e(u.chrome, B(t, l.value)), C = s(() => {
161
161
  let e = h.value.logo ?? {}, t = x(b.value?.logo ?? e.src);
162
162
  return t ? {
163
163
  logo: t,
@@ -184,13 +184,13 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
184
184
  },
185
185
  banner: null,
186
186
  ...C.value ? { brand: C.value } : {}
187
- })), N = (/* @__PURE__ */ new Date()).getFullYear(), P = s(() => h.value.copyright ? `${o(h.value.copyright)} ${N}` : ""), L = s(() => [
187
+ })), N = (/* @__PURE__ */ new Date()).getFullYear(), P = s(() => h.value.copyright ? `${o(h.value.copyright)} ${N}` : ""), F = s(() => [
188
188
  "mwnf-standalone",
189
189
  v.value ? "mwnf-standalone--home" : "mwnf-standalone--inner",
190
190
  b.value?.class ?? ""
191
191
  ]);
192
192
  return (e, t) => (y(), c(a, {
193
- class: g(L.value),
193
+ class: g(F.value),
194
194
  config: M.value,
195
195
  languages: h.value.languages === !1 ? [] : r.languages,
196
196
  language: r.language,
@@ -220,7 +220,7 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
220
220
  class: "mwnf-standalone__print-logo",
221
221
  src: T.value,
222
222
  alt: ""
223
- }, null, 8, ue)]),
223
+ }, null, 8, de)]),
224
224
  key: "1"
225
225
  } : void 0,
226
226
  j.value ? {
@@ -239,16 +239,16 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
239
239
  "footer-text"
240
240
  ]));
241
241
  }
242
- }, fe = {
242
+ }, pe = {
243
243
  key: 0,
244
244
  class: "mwnf-standalone-highlight"
245
- }, pe = ["src", "alt"], me = {
245
+ }, me = ["src", "alt"], he = {
246
246
  key: 1,
247
247
  class: "mwnf-standalone-highlight__heading"
248
- }, he = { class: "mwnf-standalone-highlight__lines" }, ge = ["innerHTML"], _e = {
248
+ }, ge = { class: "mwnf-standalone-highlight__lines" }, _e = ["innerHTML"], ve = {
249
249
  key: 2,
250
250
  class: "mwnf-standalone-highlight__place"
251
- }, ve = {
251
+ }, ye = {
252
252
  key: 3,
253
253
  class: "mwnf-standalone-highlight__action"
254
254
  }, X = {
@@ -284,20 +284,20 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
284
284
  }
285
285
  },
286
286
  setup(e) {
287
- let t = e, { t: r } = F(), i = (e) => A(Array.isArray(e) ? e.join("; ") : e), a = s(() => {
287
+ let t = e, { t: r } = I(), i = (e) => j(Array.isArray(e) ? e.join("; ") : e), a = s(() => {
288
288
  let e = t.text ?? {}, n = [], a = i(e.name ?? t.record?.internal_name ?? "");
289
- a && n.push(M(a));
289
+ a && n.push(N(a));
290
290
  let o = i(e.alternate_name);
291
- o && n.push(`${t.alsoKnownAs ? `${r(t.alsoKnownAs)} ` : ""}${M(o)}`);
291
+ o && n.push(`${t.alsoKnownAs ? `${r(t.alsoKnownAs)} ` : ""}${N(o)}`);
292
292
  let s = [i(e.dates), i(e.dynasty)].filter(Boolean).join(", ");
293
- s && n.push(M(s));
293
+ s && n.push(N(s));
294
294
  for (let t of ["materials", "holder"]) {
295
295
  let r = i(e[t]);
296
- r && n.push(M(r));
296
+ r && n.push(N(r));
297
297
  }
298
298
  return n;
299
- }), f = s(() => [i(t.text?.location), t.country].filter(Boolean).join(", ")), h = s(() => t.record?.images?.[0]?.url ?? ""), g = s(() => N(String(t.text?.name ?? t.record?.internal_name ?? "")));
300
- return (t, i) => e.record ? (y(), u("div", fe, [
299
+ }), f = s(() => [i(t.text?.location), t.country].filter(Boolean).join(", ")), h = s(() => t.record?.images?.[0]?.url ?? ""), g = s(() => P(String(t.text?.name ?? t.record?.internal_name ?? "")));
300
+ return (t, i) => e.record ? (y(), u("div", pe, [
301
301
  h.value ? (y(), c(n, {
302
302
  key: 0,
303
303
  class: "mwnf-standalone-highlight__media",
@@ -307,25 +307,25 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
307
307
  class: "mwnf-standalone-highlight__image",
308
308
  src: h.value,
309
309
  alt: g.value
310
- }, null, 8, pe)]),
310
+ }, null, 8, me)]),
311
311
  _: 1
312
312
  }, 8, ["to"])) : l("", !0),
313
- e.heading ? (y(), u("p", me, [d("strong", null, C(w(r)(e.heading)), 1)])) : l("", !0),
314
- d("p", he, [(y(!0), u(o, null, x(a.value, (e, t) => (y(), u(o, { key: t }, [d("span", { innerHTML: e }, null, 8, ge), i[0] ||= d("br", null, null, -1)], 64))), 128))]),
315
- f.value ? (y(), u("p", _e, C(w(N)(f.value)), 1)) : l("", !0),
316
- e.action ? (y(), u("p", ve, [m(n, { to: e.to }, {
313
+ e.heading ? (y(), u("p", he, [d("strong", null, C(w(r)(e.heading)), 1)])) : l("", !0),
314
+ d("p", ge, [(y(!0), u(o, null, x(a.value, (e, t) => (y(), u(o, { key: t }, [d("span", { innerHTML: e }, null, 8, _e), i[0] ||= d("br", null, null, -1)], 64))), 128))]),
315
+ f.value ? (y(), u("p", ve, C(w(P)(f.value)), 1)) : l("", !0),
316
+ e.action ? (y(), u("p", ye, [m(n, { to: e.to }, {
317
317
  default: D(() => [p(C(w(r)(e.action)), 1)]),
318
318
  _: 1
319
319
  }, 8, ["to"])])) : l("", !0)
320
320
  ])) : l("", !0);
321
321
  }
322
- }, ye = {
322
+ }, be = {
323
323
  key: 0,
324
324
  class: "mwnf-standalone-tiles"
325
- }, be = {
325
+ }, xe = {
326
326
  key: 0,
327
327
  class: "mwnf-standalone-tiles__caption"
328
- }, xe = { class: "mwnf-standalone-tiles__grid" }, Se = ["src", "alt"], Ce = {
328
+ }, Se = { class: "mwnf-standalone-tiles__grid" }, Ce = ["src", "alt"], we = {
329
329
  key: 0,
330
330
  class: "mwnf-standalone-tiles__label"
331
331
  }, Z = {
@@ -341,12 +341,12 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
341
341
  }
342
342
  },
343
343
  setup(e) {
344
- let t = e, { t: r } = F(), i = z(), a = s(() => t.items.map((e) => ({
344
+ let t = e, { t: r } = I(), i = z(), a = s(() => t.items.map((e) => ({
345
345
  ...e,
346
346
  image: i(e.image) ?? "",
347
347
  label: e.label ? r(e.label) : ""
348
348
  })));
349
- return (t, i) => a.value.length ? (y(), u("section", ye, [e.caption ? (y(), u("p", be, C(w(r)(e.caption)), 1)) : l("", !0), d("ul", xe, [(y(!0), u(o, null, x(a.value, (e) => (y(), u("li", {
349
+ return (t, i) => a.value.length ? (y(), u("section", be, [e.caption ? (y(), u("p", xe, C(w(r)(e.caption)), 1)) : l("", !0), d("ul", Se, [(y(!0), u(o, null, x(a.value, (e) => (y(), u("li", {
350
350
  key: e.image,
351
351
  class: "mwnf-standalone-tiles__tile"
352
352
  }, [m(n, {
@@ -358,26 +358,26 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
358
358
  class: "mwnf-standalone-tiles__image",
359
359
  src: e.image,
360
360
  alt: e.label
361
- }, null, 8, Se), e.label ? (y(), u("span", Ce, C(e.label), 1)) : l("", !0)]),
361
+ }, null, 8, Ce), e.label ? (y(), u("span", we, C(e.label), 1)) : l("", !0)]),
362
362
  _: 2
363
363
  }, 1032, ["to", "href"])]))), 128))])])) : l("", !0);
364
364
  }
365
- }, we = { class: "mwnf-standalone-home" }, Te = {
365
+ }, Te = { class: "mwnf-standalone-home" }, Ee = {
366
366
  key: 0,
367
367
  class: "mwnf-standalone-home__links"
368
- }, Ee = { key: 1 }, De = {
368
+ }, De = { key: 1 }, Oe = {
369
369
  __name: "Home",
370
370
  props: { home: {
371
371
  type: Object,
372
372
  default: null
373
373
  } },
374
374
  setup(e) {
375
- let t = e, { t: r, locale: i } = F(), a = I(), d = s(() => t.home ?? a.standalone?.home ?? {}), f = s(() => (d.value.links ?? []).map((e) => ({
375
+ let t = e, { t: r, locale: i } = I(), a = L(), d = s(() => t.home ?? a.standalone?.home ?? {}), f = s(() => (d.value.links ?? []).map((e) => ({
376
376
  ...e,
377
377
  label: r(e.label),
378
378
  prefix: e.prefix ? r(e.prefix) : "",
379
379
  title: e.title ? r(e.title) : void 0
380
- }))), h = s(() => d.value.highlight ?? null), _ = P();
380
+ }))), h = s(() => d.value.highlight ?? null), _ = F();
381
381
  h.value?.list?.length && (k(["items", "countries"]), E(i, (e) => {
382
382
  _.loadTranslations("items", e), _.loadTranslations("countries", e);
383
383
  }, { immediate: !0 }));
@@ -395,8 +395,8 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
395
395
  name: h.value.route ?? "item",
396
396
  params: { id: b.value.id }
397
397
  } : null);
398
- return (e, t) => (y(), u("div", we, [
399
- f.value.length ? (y(), u("ul", Te, [(y(!0), u(o, null, x(f.value, (e) => (y(), u("li", {
398
+ return (e, t) => (y(), u("div", Te, [
399
+ f.value.length ? (y(), u("ul", Ee, [(y(!0), u(o, null, x(f.value, (e) => (y(), u("li", {
400
400
  key: e.label,
401
401
  class: g({ "mwnf-standalone-home__link--gap": e.gap })
402
402
  }, [m(n, {
@@ -405,7 +405,7 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
405
405
  external: !!e.external,
406
406
  title: e.title
407
407
  }, {
408
- default: D(() => [e.prefix ? (y(), u(o, { key: 0 }, [p(C(`${e.prefix} `), 1)], 64)) : l("", !0), e.italic ? (y(), u("i", Ee, C(e.label), 1)) : (y(), u(o, { key: 2 }, [p(C(e.label), 1)], 64))]),
408
+ default: D(() => [e.prefix ? (y(), u(o, { key: 0 }, [p(C(`${e.prefix} `), 1)], 64)) : l("", !0), e.italic ? (y(), u("i", De, C(e.label), 1)) : (y(), u(o, { key: 2 }, [p(C(e.label), 1)], 64))]),
409
409
  _: 2
410
410
  }, 1032, [
411
411
  "to",
@@ -439,10 +439,10 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
439
439
  S(e.$slots, "default")
440
440
  ]));
441
441
  }
442
- }, Oe = { class: "mwnf-standalone-related" }, ke = { class: "mwnf-standalone-related__heading" }, Ae = { class: "mwnf-standalone-related__group-heading" }, je = { class: "mwnf-standalone-related__thumbs" }, Me = ["src", "alt"], Ne = ["innerHTML"], Pe = {
442
+ }, ke = { class: "mwnf-standalone-related" }, Ae = { class: "mwnf-standalone-related__heading" }, je = { class: "mwnf-standalone-related__group-heading" }, Me = { class: "mwnf-standalone-related__thumbs" }, Ne = ["src", "alt"], Pe = ["innerHTML"], Fe = {
443
443
  key: 0,
444
444
  class: "mwnf-standalone-related__download"
445
- }, Fe = { class: "mwnf-standalone-related__download-heading" }, Q = {
445
+ }, Ie = { class: "mwnf-standalone-related__download-heading" }, Q = {
446
446
  __name: "RelatedContent",
447
447
  props: {
448
448
  heading: {
@@ -463,19 +463,19 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
463
463
  }
464
464
  },
465
465
  setup(e) {
466
- let t = e, { t: r } = F(), i = s(() => t.groups.map((e) => ({
466
+ let t = e, { t: r } = I(), i = s(() => t.groups.map((e) => ({
467
467
  heading: r(e.heading),
468
468
  rows: t.records.filter((t) => !e.type || t.badge === e.type)
469
469
  })).filter((e) => e.rows.length));
470
470
  function a() {
471
471
  window.print();
472
472
  }
473
- return (t, s) => (y(), u("aside", Oe, [
474
- d("p", ke, [d("strong", null, C(w(r)(e.heading)), 1)]),
473
+ return (t, s) => (y(), u("aside", ke, [
474
+ d("p", Ae, [d("strong", null, C(w(r)(e.heading)), 1)]),
475
475
  (y(!0), u(o, null, x(i.value, (e) => (y(), u("div", {
476
476
  key: e.heading,
477
477
  class: "mwnf-standalone-related__group"
478
- }, [d("p", Ae, C(e.heading), 1), d("ul", je, [(y(!0), u(o, null, x(e.rows, (e) => (y(), u("li", { key: e.id }, [m(n, {
478
+ }, [d("p", je, C(e.heading), 1), d("ul", Me, [(y(!0), u(o, null, x(e.rows, (e) => (y(), u("li", { key: e.id }, [m(n, {
479
479
  to: e.to,
480
480
  title: e.imageAlt
481
481
  }, {
@@ -483,24 +483,24 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
483
483
  key: 0,
484
484
  src: e.image,
485
485
  alt: e.imageAlt
486
- }, null, 8, Me)) : (y(), u("span", {
486
+ }, null, 8, Ne)) : (y(), u("span", {
487
487
  key: 1,
488
488
  innerHTML: e.name
489
- }, null, 8, Ne))]),
489
+ }, null, 8, Pe))]),
490
490
  _: 2
491
491
  }, 1032, ["to", "title"])]))), 128))])]))), 128)),
492
492
  S(t.$slots, "default"),
493
- e.download ? (y(), u("div", Pe, [d("p", Fe, C(w(r)(e.download.heading)), 1), d("button", {
493
+ e.download ? (y(), u("div", Fe, [d("p", Ie, C(w(r)(e.download.heading)), 1), d("button", {
494
494
  type: "button",
495
495
  class: "mwnf-standalone-related__print",
496
496
  onClick: a
497
497
  }, C(w(r)(e.download.print)), 1)])) : l("", !0)
498
498
  ]));
499
499
  }
500
- }, Ie = { class: "mwnf-standalone-item__top" }, Le = { class: "mwnf-standalone-item__left" }, Re = {
500
+ }, Le = { class: "mwnf-standalone-item__top" }, Re = { class: "mwnf-standalone-item__left" }, ze = {
501
501
  key: 0,
502
502
  class: "mwnf-standalone-item__back"
503
- }, ze = {
503
+ }, Be = {
504
504
  __name: "ItemSheet",
505
505
  props: {
506
506
  spec: {
@@ -521,7 +521,7 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
521
521
  }
522
522
  },
523
523
  setup(e) {
524
- let a = e, { t: g } = F(), v = T(), b = s(() => ({
524
+ let a = e, { t: g } = I(), v = T(), b = s(() => ({
525
525
  ...a.spec,
526
526
  media: () => []
527
527
  }));
@@ -531,13 +531,12 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
531
531
  text: t,
532
532
  language: n
533
533
  });
534
- let r = N(String(t?.name ?? e?.internal_name ?? ""));
534
+ let r = P(String(t?.name ?? e?.internal_name ?? ""));
535
535
  return (e?.images ?? []).map((e) => ({
536
536
  url: e.url,
537
537
  alt: e.captions?.[n] ?? r,
538
- caption: e.captions?.[n] ?? e.captions?.en ?? "",
539
- photographer: e.photographer ?? "",
540
- copyright: e.copyright ?? ""
538
+ caption: e.captions?.[n] ?? "",
539
+ ...A(e, n)
541
540
  }));
542
541
  }
543
542
  let E = s(() => a.back.map((e) => ({
@@ -550,7 +549,7 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
550
549
  "sidebar",
551
550
  "aside"
552
551
  ]), k = s(() => Object.keys(v).filter((e) => !O.has(e)));
553
- function A() {
552
+ function j() {
554
553
  window.history.back();
555
554
  }
556
555
  return (a, s) => (y(), c(i, {
@@ -558,7 +557,7 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
558
557
  id: e.id,
559
558
  class: "mwnf-standalone-item"
560
559
  }, f({
561
- header: D(({ languages: e, language: n, select: r }) => [d("div", Ie, [m(t, {
560
+ header: D(({ languages: e, language: n, select: r }) => [d("div", Le, [m(t, {
562
561
  languages: e,
563
562
  language: n,
564
563
  onSelect: r
@@ -567,11 +566,11 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
567
566
  "language",
568
567
  "onSelect"
569
568
  ])])]),
570
- "before-sheet": D((e) => [d("div", Le, [E.value.length ? (y(), u("p", Re, [(y(!0), u(o, null, x(E.value, (e) => (y(), u(o, { key: e.label }, [e.history ? (y(), u("button", {
569
+ "before-sheet": D((e) => [d("div", Re, [E.value.length ? (y(), u("p", ze, [(y(!0), u(o, null, x(E.value, (e) => (y(), u(o, { key: e.label }, [e.history ? (y(), u("button", {
571
570
  key: 0,
572
571
  type: "button",
573
572
  class: "mwnf-standalone-item__back-link",
574
- onClick: A
573
+ onClick: j
575
574
  }, C(e.label), 1)) : (y(), c(n, {
576
575
  key: 1,
577
576
  class: "mwnf-standalone-item__back-link",
@@ -601,13 +600,13 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
601
600
  fn: D((t) => [S(a.$slots, e, _(h(t)))])
602
601
  }))]), 1032, ["spec", "id"]));
603
602
  }
604
- }, Be = ["innerHTML"], Ve = {
603
+ }, Ve = ["innerHTML"], $ = {
605
604
  key: 0,
606
605
  class: "mwnf-standalone-page__link"
607
- }, $ = {
606
+ }, He = {
608
607
  key: 1,
609
608
  class: "mwnf-standalone-page__print"
610
- }, He = {
609
+ }, Ue = {
611
610
  __name: "TextPage",
612
611
  props: {
613
612
  body: {
@@ -628,7 +627,7 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
628
627
  }
629
628
  },
630
629
  setup(e) {
631
- let t = e, { t: r } = F(), i = s(() => j(r(t.body)));
630
+ let t = e, { t: r } = I(), i = s(() => M(r(t.body)));
632
631
  function a() {
633
632
  window.print();
634
633
  }
@@ -636,25 +635,25 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
636
635
  d("div", {
637
636
  class: "mwnf-standalone-page__body",
638
637
  innerHTML: i.value
639
- }, null, 8, Be),
640
- e.link ? (y(), u("p", Ve, [m(n, {
638
+ }, null, 8, Ve),
639
+ e.link ? (y(), u("p", $, [m(n, {
641
640
  to: e.link.to,
642
641
  href: e.link.href
643
642
  }, {
644
643
  default: D(() => [d("strong", null, C(e.link.text ?? w(r)(e.link.label)), 1)]),
645
644
  _: 1
646
645
  }, 8, ["to", "href"])])) : l("", !0),
647
- e.print ? (y(), u("p", $, [d("button", {
646
+ e.print ? (y(), u("p", He, [d("button", {
648
647
  type: "button",
649
648
  class: "mwnf-standalone-page__print-button",
650
649
  onClick: a
651
650
  }, C(w(r)(e.print)), 1)])) : l("", !0)
652
651
  ], 2));
653
652
  }
654
- }, Ue = {
653
+ }, We = {
655
654
  key: 0,
656
655
  class: "mwnf-standalone-subnav"
657
- }, We = { class: "mwnf-standalone-subnav__tabs" }, Ge = {
656
+ }, Ge = { class: "mwnf-standalone-subnav__tabs" }, Ke = {
658
657
  __name: "SubNav",
659
658
  props: {
660
659
  tabs: {
@@ -667,11 +666,11 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
667
666
  }
668
667
  },
669
668
  setup(e) {
670
- let t = e, { t: r } = F(), i = s(() => t.tabs.map((e) => ({
669
+ let t = e, { t: r } = I(), i = s(() => t.tabs.map((e) => ({
671
670
  ...e,
672
671
  label: r(e.label)
673
672
  })));
674
- return (t, a) => i.value.length || e.aside ? (y(), u("nav", Ue, [d("ul", We, [(y(!0), u(o, null, x(i.value, (e) => (y(), u("li", { key: e.label }, [m(n, {
673
+ return (t, a) => i.value.length || e.aside ? (y(), u("nav", We, [d("ul", Ge, [(y(!0), u(o, null, x(i.value, (e) => (y(), u("li", { key: e.label }, [m(n, {
675
674
  to: e.to,
676
675
  href: e.href,
677
676
  class: g(["mwnf-standalone-subnav__tab", { "mwnf-standalone-subnav__tab--active": e.active }]),
@@ -694,10 +693,10 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
694
693
  _: 1
695
694
  }, 8, ["to", "href"])) : l("", !0)])) : l("", !0);
696
695
  }
697
- }, Ke = ["disabled", "aria-label"], qe = { class: "mwnf-standalone-slider__track" }, Je = ["src", "alt"], Ye = {
696
+ }, qe = ["disabled", "aria-label"], Je = { class: "mwnf-standalone-slider__track" }, Ye = ["src", "alt"], Xe = {
698
697
  key: 0,
699
698
  class: "mwnf-standalone-slider__label"
700
- }, Xe = ["disabled", "aria-label"], Ze = {
699
+ }, Ze = ["disabled", "aria-label"], Qe = {
701
700
  __name: "Slider",
702
701
  props: {
703
702
  slides: {
@@ -718,7 +717,7 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
718
717
  }
719
718
  },
720
719
  setup(e) {
721
- let t = e, { t: r } = F(), i = z(), a = b(0), c = s(() => Math.max(0, t.slides.length - t.visible)), f = s(() => t.slides.slice(a.value, a.value + t.visible).map((e) => ({
720
+ let t = e, { t: r } = I(), i = z(), a = b(0), c = s(() => Math.max(0, t.slides.length - t.visible)), f = s(() => t.slides.slice(a.value, a.value + t.visible).map((e) => ({
722
721
  ...e,
723
722
  image: i(e.image) ?? "",
724
723
  label: e.label ? r(e.label) : ""
@@ -734,8 +733,8 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
734
733
  disabled: a.value === 0,
735
734
  "aria-label": w(r)(e.previousLabel),
736
735
  onClick: i[0] ||= (e) => a.value = Math.max(0, a.value - 1)
737
- }, "‹", 8, Ke),
738
- d("ul", qe, [(y(!0), u(o, null, x(f.value, (e) => (y(), u("li", {
736
+ }, "‹", 8, qe),
737
+ d("ul", Je, [(y(!0), u(o, null, x(f.value, (e) => (y(), u("li", {
739
738
  key: e.image,
740
739
  class: "mwnf-standalone-slider__slide"
741
740
  }, [m(n, {
@@ -745,7 +744,7 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
745
744
  default: D(() => [d("img", {
746
745
  src: e.image,
747
746
  alt: e.label
748
- }, null, 8, Je), e.label ? (y(), u("span", Ye, C(e.label), 1)) : l("", !0)]),
747
+ }, null, 8, Ye), e.label ? (y(), u("span", Xe, C(e.label), 1)) : l("", !0)]),
749
748
  _: 2
750
749
  }, 1032, ["to", "href"])]))), 128))]),
751
750
  d("button", {
@@ -754,9 +753,9 @@ var te = { class: "mwnf-standalone-sponsors" }, ne = {
754
753
  disabled: a.value >= c.value,
755
754
  "aria-label": w(r)(e.nextLabel),
756
755
  onClick: i[1] ||= (e) => a.value = Math.min(c.value, a.value + 1)
757
- }, "›", 8, Xe)
756
+ }, "›", 8, Ze)
758
757
  ], 4)) : l("", !0);
759
758
  }
760
759
  };
761
760
  //#endregion
762
- export { Q as RelatedContent, R as StandaloneBanner, De as StandaloneHome, ze as StandaloneItemSheet, de as StandaloneShell, Ze as StandaloneSlider, Y as StandaloneSponsors, Ge as StandaloneSubNav, He as StandaloneTextPage, Z as StandaloneTileGrid, X as TodayHighlight, B as byLanguage, V as dayOfYear, U as legacyHomeItemKey, H as pickForDay };
761
+ export { Q as RelatedContent, R as StandaloneBanner, Oe as StandaloneHome, Be as StandaloneItemSheet, fe as StandaloneShell, Qe as StandaloneSlider, Y as StandaloneSponsors, Ke as StandaloneSubNav, Ue as StandaloneTextPage, Z as StandaloneTileGrid, X as TodayHighlight, B as byLanguage, V as dayOfYear, U as legacyHomeItemKey, H as pickForDay };
package/dist/views.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./FeaturedRecord-DJfyvfqt.js";
2
2
  import { c as t } from "./TimelineEventList-gsoc-SBx.js";
3
3
  import { a as n, i as r, n as i, o as a, r as o, s, t as c } from "./TimelineResultsView-C2-TnM71.js";
4
- import { t as l } from "./RecordView-C9rP8TyQ.js";
4
+ import { t as l } from "./RecordView-DovgfTMz.js";
5
5
  import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createVNode as m, mergeProps as h, normalizeClass as g, openBlock as _, renderSlot as v, toDisplayString as y, unref as b } from "vue";
6
6
  import { I18nText as x, renderInline as S, renderPlain as C, useDataPackage as w, useFeaturedRecord as T, useI18n as E, useSiteConfig as D } from "@museumwnf/viewer-core";
7
7
  //#region src/views/HomeView.vue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@museumwnf/viewer-layout",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "description": "Page structure for MWNF websites: PageShell composing seven optional, token-styled sections, the content components a page is made of, and the composed views a website names instead of writing a page.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -42,12 +42,12 @@
42
42
  "test": "vitest run"
43
43
  },
44
44
  "peerDependencies": {
45
- "@museumwnf/viewer-core": "^2.6.0",
45
+ "@museumwnf/viewer-core": "^2.8.0",
46
46
  "vue": "^3.5.0",
47
47
  "vue-router": "^4.5.0 || ^5.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@museumwnf/viewer-core": "^2.6.0",
50
+ "@museumwnf/viewer-core": "^2.8.0",
51
51
  "@vitejs/plugin-vue": "^6.0.8",
52
52
  "@vue/test-utils": "^2.4.11",
53
53
  "jsdom": "^30.0.1",
@@ -1,263 +0,0 @@
1
- import { a as e, c as t, d as n, i as r, n as ee, o as te, r as ne, s as re, t as i } from "./GlossaryPopover-DcptyNWI.js";
2
- import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, guardReactiveProps as m, normalizeClass as ie, normalizeProps as h, openBlock as g, renderList as _, renderSlot as v, toDisplayString as y, unref as b, useSlots as x, withCtx as S } from "vue";
3
- import { NotFoundView as ae, byId as oe, citation as se, entityRef as ce, languageLabels as le, renderBlock as C, renderInline as w, renderPlain as T, sheetRows as E, sourceUrl as ue, useDataPackage as de, useGlossaryPopup as fe, useI18n as pe, useProjects as me, useRecordSheet as he, useRelatedRecords as ge } from "@museumwnf/viewer-core";
4
- import { useRoute as _e } from "vue-router";
5
- //#region src/views/RecordView.vue
6
- var ve = ["dir", "innerHTML"], ye = { class: "mwnf-record__body" }, be = { class: "mwnf-record__main" }, xe = {
7
- key: 1,
8
- class: "mwnf-record__status"
9
- }, D = {
10
- key: 0,
11
- class: "mwnf-record__aside"
12
- }, O = {
13
- key: 2,
14
- class: "mwnf-record__status"
15
- }, k = {
16
- __name: "RecordView",
17
- props: {
18
- spec: {
19
- type: Object,
20
- required: !0
21
- },
22
- id: {
23
- type: String,
24
- required: !0
25
- },
26
- entity: {
27
- type: String,
28
- default: ""
29
- }
30
- },
31
- setup(k) {
32
- let A = k, { t: j, locale: Se } = pe(), M = de(), Ce = me(), we = x(), Te = _e(), N = A.spec.entity ?? A.entity, P = o(() => A.spec), Ee = ce(N), De = oe(N), F = o(() => De.value.get(A.id) ?? null), Oe = o(() => Ee.value !== null), { language: I, languages: ke, dir: L, select: R, text: z, ready: B, terms: Ae, glossary: V, attribution: H } = he(F, {
33
- entity: N,
34
- translations: A.spec.translations ?? [],
35
- attribution: A.spec.attribution ?? []
36
- }), U = o(() => le(ke.value)), { active: W, onClick: G, close: je } = fe(Ae), Me = o(() => W.value ? C(W.value.definition, { breaks: !0 }) : ""), K = (e, t) => M.tr(e, t, I.value, "en"), q = o(() => ({
37
- record: F.value,
38
- text: z.value,
39
- language: I.value,
40
- languages: U.value,
41
- select: R,
42
- dir: L.value,
43
- glossary: V.value,
44
- ready: B.value,
45
- attribution: H.value,
46
- t: j,
47
- tr: K
48
- }));
49
- function J(e) {
50
- return ((typeof e == "function" ? e(q.value) : e) ?? []).map((e) => ({
51
- ...e,
52
- label: e.label ? j(e.label) : ""
53
- }));
54
- }
55
- let Ne = o(() => F.value ? E(J(P.value.fields), q.value) : []), Pe = o(() => F.value ? E(J(P.value.sections).map((e) => ({
56
- render: "block",
57
- ...e
58
- })), q.value) : []), Y = o(() => P.value.shortDescription === !1 ? "" : P.value.shortDescription ?? "short_description"), Fe = o(() => {
59
- let e = Y.value ? z.value[Y.value] : "";
60
- return e ? { html: C(String(e), {
61
- breaks: !0,
62
- glossary: V.value
63
- }) } : null;
64
- }), Ie = o(() => {
65
- if (!F.value) return "";
66
- if (P.value.title) return P.value.title(q.value);
67
- let e = z.value.name ?? F.value.internal_name ?? F.value.id;
68
- return w(String(e), { glossary: V.value });
69
- }), X = o(() => {
70
- if (!F.value) return [];
71
- if (P.value.media) return P.value.media(F.value, q.value);
72
- let e = T(String(z.value.name ?? F.value.internal_name ?? ""));
73
- return (F.value.images ?? []).map((t) => ({
74
- url: t.url,
75
- alt: t.captions?.[I.value] ?? e,
76
- caption: t.captions?.[I.value] ?? t.captions?.en ?? "",
77
- photographer: t.photographer ?? "",
78
- copyright: t.copyright ?? ""
79
- }));
80
- }), Le = [
81
- {
82
- field: "author",
83
- label: "sheet.field.preparedBy"
84
- },
85
- {
86
- field: "copy_editor",
87
- label: "sheet.field.copyeditedBy"
88
- },
89
- {
90
- field: "translator",
91
- label: "sheet.field.translationBy"
92
- },
93
- {
94
- field: "translation_copy_editor",
95
- label: "sheet.field.translationCopyeditedBy"
96
- }
97
- ], Re = o(() => (P.value.credits ?? Le).map(({ field: e, label: t }) => ({
98
- label: j(t),
99
- value: z.value[e] ?? H.value[e] ?? ""
100
- })).filter((e) => e.value)), ze = o(() => String(F.value?.[P.value.workingNumber ?? "mwnf_reference"] ?? "")), Be = o(() => {
101
- let e = P.value.citation;
102
- if (!F.value || e === !1) return "";
103
- let t = typeof e?.project == "function" ? null : e?.project ?? F.value.project_id, n = typeof e?.project == "function" ? e.project(F.value, q.value) : Ce.label(t), r = e?.permalink === !1 ? void 0 : typeof e?.permalink == "string" ? e.permalink : ue(Te) ?? void 0;
104
- return se({
105
- author: z.value.author ?? H.value.author,
106
- name: z.value.name ?? F.value.internal_name ?? "",
107
- project: n,
108
- permalink: r,
109
- inWord: j("record.citation.in")
110
- });
111
- }), Z = ge(F, {
112
- entity: N,
113
- language: I
114
- }), Q = o(() => P.value.related === !1 ? null : P.value.related ?? {}), $ = o(() => {
115
- if (!Q.value) return [];
116
- let e = Q.value.record ?? Ve;
117
- return Z.value.inPackage.map((t) => e(t, q.value));
118
- });
119
- function Ve({ record: e, justification: t }) {
120
- let n = K(N, e.id).name ?? e.internal_name ?? e.id;
121
- return {
122
- id: e.id,
123
- image: e.images?.[0]?.url ?? "",
124
- imageAlt: T(String(n)),
125
- name: w(String(n)),
126
- meta: t ? [t] : [],
127
- badge: e.type ?? "",
128
- to: {
129
- name: P.value.route ?? (A.entity ? `${A.entity}-detail` : "item"),
130
- params: { id: e.id }
131
- }
132
- };
133
- }
134
- let He = /* @__PURE__ */ new Set([
135
- "header",
136
- "before-sheet",
137
- "after-sheet",
138
- "aside",
139
- "source",
140
- "related",
141
- "after",
142
- "default"
143
- ]), Ue = o(() => Object.keys(we).filter((e) => !He.has(e)));
144
- return (o, x) => Oe.value && !F.value ? (g(), s(b(ae), { key: 0 })) : F.value ? (g(), l("article", {
145
- key: 1,
146
- class: ie(["mwnf-record", { "mwnf-record--spaced": P.value.spaced }]),
147
- onClick: x[0] ||= (...e) => b(G) && b(G)(...e)
148
- }, [
149
- v(o.$slots, "header", h(m(q.value)), () => [
150
- P.value.back ? (g(), s(n, {
151
- key: 0,
152
- class: "mwnf-record__back",
153
- to: P.value.back.to,
154
- href: P.value.back.href
155
- }, {
156
- default: S(() => [f("← " + y(b(j)(P.value.back.label)), 1)]),
157
- _: 1
158
- }, 8, ["to", "href"])) : c("", !0),
159
- p(t, {
160
- languages: U.value,
161
- language: b(I),
162
- onSelect: b(R)
163
- }, null, 8, [
164
- "languages",
165
- "language",
166
- "onSelect"
167
- ]),
168
- u("h1", {
169
- class: "mwnf-record__title",
170
- dir: b(L) || void 0,
171
- innerHTML: Ie.value
172
- }, null, 8, ve)
173
- ]),
174
- u("div", ye, [u("div", be, [
175
- X.value.length ? (g(), s(ee, {
176
- key: 0,
177
- images: X.value,
178
- variant: P.value.mediaVariant ?? ""
179
- }, null, 8, ["images", "variant"])) : c("", !0),
180
- b(B) ? c("", !0) : (g(), l("p", xe, y(b(j)("core.status.loading")), 1)),
181
- v(o.$slots, "before-sheet", h(m(q.value))),
182
- p(re, {
183
- rows: Ne.value,
184
- layout: P.value.layout ?? "table",
185
- dir: b(L),
186
- "short-description": Fe.value,
187
- "short-description-after": P.value.shortDescriptionAfter ?? "description"
188
- }, d({ _: 2 }, [_(Ue.value, (e) => ({
189
- name: e,
190
- fn: S((t) => [v(o.$slots, e, h(m({
191
- ...t,
192
- ...q.value
193
- })))])
194
- }))]), 1032, [
195
- "rows",
196
- "layout",
197
- "dir",
198
- "short-description",
199
- "short-description-after"
200
- ]),
201
- (g(!0), l(a, null, _(Pe.value, (e) => (g(), s(te, {
202
- key: e.key,
203
- heading: e.label,
204
- html: e.html,
205
- dir: b(L)
206
- }, null, 8, [
207
- "heading",
208
- "html",
209
- "dir"
210
- ]))), 128)),
211
- v(o.$slots, "after-sheet", h(m(q.value))),
212
- p(e, {
213
- credits: Re.value,
214
- "working-number": ze.value,
215
- "working-number-label": b(j)("sheet.field.workingNumber"),
216
- citation: Be.value,
217
- "citation-heading": P.value.citation?.heading ? b(j)(P.value.citation.heading) : ""
218
- }, null, 8, [
219
- "credits",
220
- "working-number",
221
- "working-number-label",
222
- "citation",
223
- "citation-heading"
224
- ]),
225
- v(o.$slots, "source", h(m(q.value)), () => [p(r)]),
226
- v(o.$slots, "related", h(m({
227
- ...q.value,
228
- records: $.value,
229
- outside: b(Z).outside
230
- })), () => [Q.value ? (g(), s(ne, {
231
- key: 0,
232
- heading: b(j)(Q.value.heading ?? "record.related.items"),
233
- records: $.value,
234
- variant: Q.value.variant ?? "list",
235
- "action-label": Q.value.actionLabel ? b(j)(Q.value.actionLabel) : ""
236
- }, null, 8, [
237
- "heading",
238
- "records",
239
- "variant",
240
- "action-label"
241
- ])) : c("", !0)])
242
- ]), o.$slots.aside ? (g(), l("aside", D, [v(o.$slots, "aside", h(m({
243
- ...q.value,
244
- records: $.value,
245
- outside: b(Z).outside
246
- })))])) : c("", !0)]),
247
- v(o.$slots, "after", h(m(q.value))),
248
- p(i, {
249
- term: b(W),
250
- html: Me.value,
251
- dir: b(L),
252
- onClose: b(je)
253
- }, null, 8, [
254
- "term",
255
- "html",
256
- "dir",
257
- "onClose"
258
- ])
259
- ], 2)) : (g(), l("p", O, y(b(j)("core.status.loading")), 1));
260
- }
261
- };
262
- //#endregion
263
- export { k as t };