triiiceratops 0.3.2 → 0.3.4

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,120 +1,120 @@
1
- var ke = (a) => {
2
- throw TypeError(a);
1
+ var ke = (s) => {
2
+ throw TypeError(s);
3
3
  };
4
- var Oe = (a, t, s) => t.has(a) || ke("Cannot " + s);
5
- var G = (a, t, s) => (Oe(a, t, "read from private field"), s ? s.call(a) : t.get(a)), Y = (a, t, s) => t.has(a) ? ke("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(a) : t.set(a, s);
4
+ var He = (s, t, a) => t.has(s) || ke("Cannot " + a);
5
+ var z = (s, t, a) => (He(s, t, "read from private field"), a ? a.call(s) : t.get(s)), Y = (s, t, a) => t.has(s) ? ke("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, a);
6
6
  import "svelte/internal/disclose-version";
7
7
  import * as e from "svelte/internal/client";
8
- import { onMount as qe, getContext as xe, setContext as Ye } from "svelte";
9
- import * as Xe from "manifesto.js";
8
+ import { onMount as Ne, getContext as xe, setContext as Ve } from "svelte";
9
+ import * as Be from "manifesto.js";
10
10
  import Ce from "openseadragon";
11
- import Qe from "phosphor-svelte/lib/CaretLeft";
12
- import Ue from "phosphor-svelte/lib/CaretRight";
13
- import Ke from "phosphor-svelte/lib/CaretDown";
11
+ import Oe from "phosphor-svelte/lib/CaretLeft";
12
+ import qe from "phosphor-svelte/lib/CaretRight";
13
+ import Ye from "phosphor-svelte/lib/CaretDown";
14
14
  import je from "phosphor-svelte/lib/Eye";
15
15
  import Le from "phosphor-svelte/lib/EyeSlash";
16
- import We from "phosphor-svelte/lib/X";
16
+ import Xe from "phosphor-svelte/lib/X";
17
17
  import "svelte/internal/flags/legacy";
18
- import Je from "phosphor-svelte/lib/ChatCenteredText";
19
- import Ze from "phosphor-svelte/lib/CornersIn";
20
- import et from "phosphor-svelte/lib/CornersOut";
21
- import tt from "phosphor-svelte/lib/Info";
22
- import Ge from "phosphor-svelte/lib/MagnifyingGlass";
23
- import st from "phosphor-svelte/lib/Plus";
24
- import at from "phosphor-svelte/lib/Slideshow";
18
+ import Qe from "phosphor-svelte/lib/ChatCenteredText";
19
+ import Ue from "phosphor-svelte/lib/CornersIn";
20
+ import Ke from "phosphor-svelte/lib/CornersOut";
21
+ import We from "phosphor-svelte/lib/Info";
22
+ import Ee from "phosphor-svelte/lib/MagnifyingGlass";
23
+ import Je from "phosphor-svelte/lib/List";
24
+ import Ze from "phosphor-svelte/lib/Slideshow";
25
25
  var re;
26
- class nt {
26
+ class et {
27
27
  constructor() {
28
28
  Y(this, re, e.state(e.proxy({})));
29
29
  }
30
30
  get manifests() {
31
- return e.get(G(this, re));
31
+ return e.get(z(this, re));
32
32
  }
33
33
  set manifests(t) {
34
- e.set(G(this, re), t, !0);
34
+ e.set(z(this, re), t, !0);
35
35
  }
36
36
  async fetchManifest(t) {
37
37
  if (!this.manifests[t]) {
38
38
  this.manifests[t] = { isFetching: !0 };
39
39
  try {
40
- const s = await fetch(t);
41
- if (!s.ok)
42
- throw new Error(`HTTP error! status: ${s.status}`);
43
- const n = await s.json(), c = Xe.parseManifest(n);
40
+ const a = await fetch(t);
41
+ if (!a.ok)
42
+ throw new Error(`HTTP error! status: ${a.status}`);
43
+ const n = await a.json(), c = Be.parseManifest(n);
44
44
  this.manifests[t] = { json: n, manifesto: c, isFetching: !1 };
45
- } catch (s) {
46
- this.manifests[t] = { error: s.message, isFetching: !1 };
45
+ } catch (a) {
46
+ this.manifests[t] = { error: a.message, isFetching: !1 };
47
47
  }
48
48
  }
49
49
  }
50
50
  getManifest(t) {
51
- const s = this.manifests[t];
52
- return s == null ? void 0 : s.manifesto;
51
+ const a = this.manifests[t];
52
+ return a == null ? void 0 : a.manifesto;
53
53
  }
54
54
  async fetchAnnotationList(t) {
55
55
  if (!this.manifests[t])
56
56
  try {
57
- const s = await fetch(t);
58
- if (s.ok) {
59
- const n = await s.json();
57
+ const a = await fetch(t);
58
+ if (a.ok) {
59
+ const n = await a.json();
60
60
  this.manifests[t] = { json: n };
61
61
  } else
62
62
  console.error(`Failed to fetch annotation list: ${t}`);
63
- } catch (s) {
64
- console.error(`Error fetching annotation list: ${t}`, s);
63
+ } catch (a) {
64
+ console.error(`Error fetching annotation list: ${t}`, a);
65
65
  }
66
66
  }
67
67
  getCanvases(t) {
68
- const s = this.getManifest(t);
69
- if (!s)
68
+ const a = this.getManifest(t);
69
+ if (!a)
70
70
  return [];
71
- const n = s.getSequences();
71
+ const n = a.getSequences();
72
72
  return !n || !n.length ? [] : n[0].getCanvases();
73
73
  }
74
- getAnnotations(t, s) {
74
+ getAnnotations(t, a) {
75
75
  const n = this.getManifest(t);
76
- return n ? n.getSequences()[0].getCanvasById(s) ? this.manualGetAnnotations(t, s) : [] : [];
76
+ return n ? n.getSequences()[0].getCanvasById(a) ? this.manualGetAnnotations(t, a) : [] : [];
77
77
  }
78
78
  // We can refactor this to use Manifesto's resource handling later if needed.
79
- manualGetAnnotations(t, s) {
79
+ manualGetAnnotations(t, a) {
80
80
  const n = this.getManifest(t);
81
81
  if (!n) return [];
82
- const c = n.getSequences()[0].getCanvasById(s);
82
+ const c = n.getSequences()[0].getCanvasById(a);
83
83
  if (!c) return [];
84
- const g = c.__jsonld;
85
- let C = [];
86
- const y = (b) => b.resources || b.items || [];
87
- return g.otherContent && g.otherContent.forEach((b) => {
88
- const S = b["@id"] || b.id;
89
- if (S && !b.resources) {
90
- const k = this.manifests[S];
91
- if (k) {
92
- if (k.json) {
93
- const P = y(k.json);
94
- C.push(...P);
84
+ const d = c.__jsonld;
85
+ let G = [];
86
+ const I = (v) => v.resources || v.items || [];
87
+ return d.otherContent && d.otherContent.forEach((v) => {
88
+ const S = v["@id"] || v.id;
89
+ if (S && !v.resources) {
90
+ const L = this.manifests[S];
91
+ if (L) {
92
+ if (L.json) {
93
+ const R = I(L.json);
94
+ G.push(...R);
95
95
  }
96
96
  } else
97
97
  this.fetchAnnotationList(S);
98
- } else b.resources && C.push(...b.resources);
99
- }), g.annotations && g.annotations.forEach((b) => {
100
- const S = b.id || b["@id"];
101
- if (S && !b.items) {
102
- const k = this.manifests[S];
103
- if (k) {
104
- if (k.json) {
105
- const P = y(k.json);
106
- C.push(...P);
98
+ } else v.resources && G.push(...v.resources);
99
+ }), d.annotations && d.annotations.forEach((v) => {
100
+ const S = v.id || v["@id"];
101
+ if (S && !v.items) {
102
+ const L = this.manifests[S];
103
+ if (L) {
104
+ if (L.json) {
105
+ const R = I(L.json);
106
+ G.push(...R);
107
107
  }
108
108
  } else
109
109
  this.fetchAnnotationList(S);
110
- } else b.items && C.push(...b.items);
111
- }), C;
110
+ } else v.items && G.push(...v.items);
111
+ }), G;
112
112
  }
113
113
  }
114
114
  re = new WeakMap();
115
- const se = new nt();
115
+ const ae = new et();
116
116
  var ie, oe, le, ce, de, ge, ue, fe, he, ve, pe, me, be, _e, ye;
117
- class rt {
117
+ class tt {
118
118
  constructor(t) {
119
119
  Y(this, ie, e.state(null));
120
120
  Y(this, oe, e.state(null));
@@ -131,74 +131,74 @@ class rt {
131
131
  Y(this, be, e.state(!1));
132
132
  Y(this, _e, e.state(!1));
133
133
  Y(this, ye, e.state(e.proxy([])));
134
- this.manifestId = t || null, this.manifestId && se.fetchManifest(this.manifestId);
134
+ this.manifestId = t || null, this.manifestId && ae.fetchManifest(this.manifestId);
135
135
  }
136
136
  get manifestId() {
137
- return e.get(G(this, ie));
137
+ return e.get(z(this, ie));
138
138
  }
139
139
  set manifestId(t) {
140
- e.set(G(this, ie), t, !0);
140
+ e.set(z(this, ie), t, !0);
141
141
  }
142
142
  get canvasId() {
143
- return e.get(G(this, oe));
143
+ return e.get(z(this, oe));
144
144
  }
145
145
  set canvasId(t) {
146
- e.set(G(this, oe), t, !0);
146
+ e.set(z(this, oe), t, !0);
147
147
  }
148
148
  get showAnnotations() {
149
- return e.get(G(this, le));
149
+ return e.get(z(this, le));
150
150
  }
151
151
  set showAnnotations(t) {
152
- e.set(G(this, le), t, !0);
152
+ e.set(z(this, le), t, !0);
153
153
  }
154
154
  get showThumbnailGallery() {
155
- return e.get(G(this, ce));
155
+ return e.get(z(this, ce));
156
156
  }
157
157
  set showThumbnailGallery(t) {
158
- e.set(G(this, ce), t, !0);
158
+ e.set(z(this, ce), t, !0);
159
159
  }
160
160
  get isGalleryDockedBottom() {
161
- return e.get(G(this, de));
161
+ return e.get(z(this, de));
162
162
  }
163
163
  set isGalleryDockedBottom(t) {
164
- e.set(G(this, de), t, !0);
164
+ e.set(z(this, de), t, !0);
165
165
  }
166
166
  get isGalleryDockedRight() {
167
- return e.get(G(this, ge));
167
+ return e.get(z(this, ge));
168
168
  }
169
169
  set isGalleryDockedRight(t) {
170
- e.set(G(this, ge), t, !0);
170
+ e.set(z(this, ge), t, !0);
171
171
  }
172
172
  get isFullScreen() {
173
- return e.get(G(this, ue));
173
+ return e.get(z(this, ue));
174
174
  }
175
175
  set isFullScreen(t) {
176
- e.set(G(this, ue), t, !0);
176
+ e.set(z(this, ue), t, !0);
177
177
  }
178
178
  get showMetadataDialog() {
179
- return e.get(G(this, fe));
179
+ return e.get(z(this, fe));
180
180
  }
181
181
  set showMetadataDialog(t) {
182
- e.set(G(this, fe), t, !0);
182
+ e.set(z(this, fe), t, !0);
183
183
  }
184
184
  get dockSide() {
185
- return e.get(G(this, he));
185
+ return e.get(z(this, he));
186
186
  }
187
187
  set dockSide(t) {
188
- e.set(G(this, he), t, !0);
188
+ e.set(z(this, he), t, !0);
189
189
  }
190
190
  get visibleAnnotationIds() {
191
- return e.get(G(this, ve));
191
+ return e.get(z(this, ve));
192
192
  }
193
193
  set visibleAnnotationIds(t) {
194
- e.set(G(this, ve), t, !0);
194
+ e.set(z(this, ve), t, !0);
195
195
  }
196
196
  get manifest() {
197
- return this.manifestId ? se.getManifest(this.manifestId) : null;
197
+ return this.manifestId ? ae.getManifest(this.manifestId) : null;
198
198
  }
199
199
  get canvases() {
200
200
  if (!this.manifestId) return [];
201
- const t = se.getCanvases(this.manifestId);
201
+ const t = ae.getCanvases(this.manifestId);
202
202
  return t.length > 0 && !this.canvasId && setTimeout(
203
203
  () => {
204
204
  !this.canvasId && t.length > 0 && (this.canvasId = t[0].id);
@@ -217,18 +217,18 @@ class rt {
217
217
  }
218
218
  nextCanvas() {
219
219
  if (this.hasNext) {
220
- const t = this.currentCanvasIndex + 1, s = this.canvases[t];
221
- this.canvasId = s.id;
220
+ const t = this.currentCanvasIndex + 1, a = this.canvases[t];
221
+ this.canvasId = a.id;
222
222
  }
223
223
  }
224
224
  previousCanvas() {
225
225
  if (this.hasPrevious) {
226
- const t = this.currentCanvasIndex - 1, s = this.canvases[t];
227
- this.canvasId = s.id;
226
+ const t = this.currentCanvasIndex - 1, a = this.canvases[t];
227
+ this.canvasId = a.id;
228
228
  }
229
229
  }
230
230
  setManifest(t) {
231
- this.manifestId = t, this.canvasId = null, se.fetchManifest(t);
231
+ this.manifestId = t, this.canvasId = null, ae.fetchManifest(t);
232
232
  }
233
233
  setCanvas(t) {
234
234
  this.canvasId = t;
@@ -244,8 +244,8 @@ class rt {
244
244
  document.exitFullscreen();
245
245
  else {
246
246
  const t = document.getElementById("triiiceratops-viewer");
247
- t && t.requestFullscreen().catch((s) => {
248
- console.warn("Fullscreen request failed", s);
247
+ t && t.requestFullscreen().catch((a) => {
248
+ console.warn("Fullscreen request failed", a);
249
249
  });
250
250
  }
251
251
  }
@@ -253,123 +253,123 @@ class rt {
253
253
  this.showMetadataDialog = !this.showMetadataDialog;
254
254
  }
255
255
  get searchQuery() {
256
- return e.get(G(this, pe));
256
+ return e.get(z(this, pe));
257
257
  }
258
258
  set searchQuery(t) {
259
- e.set(G(this, pe), t, !0);
259
+ e.set(z(this, pe), t, !0);
260
260
  }
261
261
  get searchResults() {
262
- return e.get(G(this, me));
262
+ return e.get(z(this, me));
263
263
  }
264
264
  set searchResults(t) {
265
- e.set(G(this, me), t, !0);
265
+ e.set(z(this, me), t, !0);
266
266
  }
267
267
  get isSearching() {
268
- return e.get(G(this, be));
268
+ return e.get(z(this, be));
269
269
  }
270
270
  set isSearching(t) {
271
- e.set(G(this, be), t, !0);
271
+ e.set(z(this, be), t, !0);
272
272
  }
273
273
  get showSearchPanel() {
274
- return e.get(G(this, _e));
274
+ return e.get(z(this, _e));
275
275
  }
276
276
  set showSearchPanel(t) {
277
- e.set(G(this, _e), t, !0);
277
+ e.set(z(this, _e), t, !0);
278
278
  }
279
279
  toggleSearchPanel() {
280
280
  this.showSearchPanel = !this.showSearchPanel, this.showSearchPanel || (this.searchAnnotations = []);
281
281
  }
282
282
  get searchAnnotations() {
283
- return e.get(G(this, ye));
283
+ return e.get(z(this, ye));
284
284
  }
285
285
  set searchAnnotations(t) {
286
- e.set(G(this, ye), t, !0);
286
+ e.set(z(this, ye), t, !0);
287
287
  }
288
288
  get currentCanvasSearchAnnotations() {
289
289
  return this.canvasId ? this.searchAnnotations.filter((t) => t.canvasId === this.canvasId) : [];
290
290
  }
291
291
  async search(t) {
292
- var s, n;
292
+ var a, n;
293
293
  if (t.trim()) {
294
294
  this.isSearching = !0, this.searchQuery = t, this.searchResults = [];
295
295
  try {
296
296
  const c = this.manifest;
297
297
  if (!c) throw new Error("No manifest loaded");
298
- let g = c.getService("http://iiif.io/api/search/1/search") || c.getService("http://iiif.io/api/search/0/search");
299
- if (g || c.__jsonld && c.__jsonld.service && (g = (Array.isArray(c.__jsonld.service) ? c.__jsonld.service : [c.__jsonld.service]).find((u) => u.profile === "http://iiif.io/api/search/1/search" || u.profile === "http://iiif.io/api/search/0/search")), !g) {
298
+ let d = c.getService("http://iiif.io/api/search/1/search") || c.getService("http://iiif.io/api/search/0/search");
299
+ if (d || c.__jsonld && c.__jsonld.service && (d = (Array.isArray(c.__jsonld.service) ? c.__jsonld.service : [c.__jsonld.service]).find((u) => u.profile === "http://iiif.io/api/search/1/search" || u.profile === "http://iiif.io/api/search/0/search")), !d) {
300
300
  console.warn("No IIIF search service found in manifest"), this.isSearching = !1;
301
301
  return;
302
302
  }
303
- const y = `${g.id || g["@id"]}?q=${encodeURIComponent(t)}`, b = await fetch(y);
304
- if (!b.ok) throw new Error("Search request failed");
305
- const S = await b.json(), k = S.resources || [], P = [], i = (l) => {
303
+ const I = `${d.id || d["@id"]}?q=${encodeURIComponent(t)}`, v = await fetch(I);
304
+ if (!v.ok) throw new Error("Search request failed");
305
+ const S = await v.json(), L = S.resources || [], R = [], i = (l) => {
306
306
  const u = typeof l == "string" ? l : l["@id"] || l.id;
307
307
  if (!u) return null;
308
- const T = u.split("#xywh=");
309
- if (T.length < 2) return null;
310
- const v = T[1].split(",").map(Number);
311
- return v.length === 4 ? v : null;
308
+ const x = u.split("#xywh=");
309
+ if (x.length < 2) return null;
310
+ const p = x[1].split(",").map(Number);
311
+ return p.length === 4 ? p : null;
312
312
  };
313
313
  if (S.hits)
314
314
  for (const l of S.hits) {
315
315
  const u = l.annotations || [];
316
- for (const T of u) {
317
- const v = k.find((r) => r["@id"] === T || r.id === T);
318
- if (v && v.on) {
319
- const r = typeof v.on == "string" ? v.on : v.on["@id"] || v.on.id, d = r.split("#")[0], w = i(r), m = this.canvases.findIndex((j) => j.id === d);
316
+ for (const x of u) {
317
+ const p = L.find((r) => r["@id"] === x || r.id === x);
318
+ if (p && p.on) {
319
+ const r = typeof p.on == "string" ? p.on : p.on["@id"] || p.on.id, g = r.split("#")[0], y = i(r), m = this.canvases.findIndex((E) => E.id === g);
320
320
  if (m >= 0) {
321
- const j = this.canvases[m];
322
- let L = "Canvas " + (m + 1);
321
+ const E = this.canvases[m];
322
+ let k = "Canvas " + (m + 1);
323
323
  try {
324
- if (j.getLabel) {
325
- const x = j.getLabel();
326
- Array.isArray(x) && x.length > 0 ? L = x[0].value : typeof x == "string" && (L = x);
327
- } else j.label && (typeof j.label == "string" ? L = j.label : Array.isArray(j.label) && (L = (s = j.label[0]) == null ? void 0 : s.value));
324
+ if (E.getLabel) {
325
+ const T = E.getLabel();
326
+ Array.isArray(T) && T.length > 0 ? k = T[0].value : typeof T == "string" && (k = T);
327
+ } else E.label && (typeof E.label == "string" ? k = E.label : Array.isArray(E.label) && (k = (a = E.label[0]) == null ? void 0 : a.value));
328
328
  } catch {
329
329
  }
330
- P.push({
330
+ R.push({
331
331
  type: "hit",
332
332
  before: l.before,
333
333
  match: l.match,
334
334
  after: l.after,
335
335
  canvasIndex: m,
336
- canvasLabel: String(L),
337
- bounds: w
336
+ canvasLabel: String(k),
337
+ bounds: y
338
338
  });
339
339
  }
340
340
  }
341
341
  }
342
342
  }
343
- else if (k.length > 0)
344
- for (const l of k) {
345
- const u = typeof l.on == "string" ? l.on : l.on["@id"] || l.on.id, T = u.split("#")[0], v = i(u), r = this.canvases.findIndex((d) => d.id === T);
343
+ else if (L.length > 0)
344
+ for (const l of L) {
345
+ const u = typeof l.on == "string" ? l.on : l.on["@id"] || l.on.id, x = u.split("#")[0], p = i(u), r = this.canvases.findIndex((g) => g.id === x);
346
346
  if (r >= 0) {
347
- const d = this.canvases[r];
348
- let w = "Canvas " + (r + 1);
347
+ const g = this.canvases[r];
348
+ let y = "Canvas " + (r + 1);
349
349
  try {
350
- if (d.getLabel) {
351
- const m = d.getLabel();
352
- Array.isArray(m) && m.length > 0 ? w = m[0].value : typeof m == "string" && (w = m);
353
- } else d.label && (typeof d.label == "string" ? w = d.label : Array.isArray(d.label) && (w = (n = d.label[0]) == null ? void 0 : n.value));
350
+ if (g.getLabel) {
351
+ const m = g.getLabel();
352
+ Array.isArray(m) && m.length > 0 ? y = m[0].value : typeof m == "string" && (y = m);
353
+ } else g.label && (typeof g.label == "string" ? y = g.label : Array.isArray(g.label) && (y = (n = g.label[0]) == null ? void 0 : n.value));
354
354
  } catch {
355
355
  }
356
- P.push({
356
+ R.push({
357
357
  type: "resource",
358
358
  match: l.resource && l.resource.chars ? l.resource.chars : l.chars || "",
359
359
  canvasIndex: r,
360
- canvasLabel: String(w),
361
- bounds: v
360
+ canvasLabel: String(y),
361
+ bounds: p
362
362
  });
363
363
  }
364
364
  }
365
- this.searchResults = P, this.searchAnnotations = P.filter((l) => l.bounds).map((l, u) => {
366
- const T = this.canvases[l.canvasIndex], v = `${T.id}#xywh=${l.bounds.join(",")}`;
365
+ this.searchResults = R, this.searchAnnotations = R.filter((l) => l.bounds).map((l, u) => {
366
+ const x = this.canvases[l.canvasIndex], p = `${x.id}#xywh=${l.bounds.join(",")}`;
367
367
  return {
368
368
  "@id": `urn:search-hit:${u}`,
369
369
  "@type": "oa:Annotation",
370
370
  motivation: "sc:painting",
371
- on: v,
372
- canvasId: T.id,
371
+ on: p,
372
+ canvasId: x.id,
373
373
  resource: { "@type": "cnt:ContentAsText", chars: l.match },
374
374
  // Flag to identify styling in Overlay?
375
375
  // Or just standard rendering.
@@ -385,13 +385,13 @@ class rt {
385
385
  }
386
386
  }
387
387
  ie = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), de = new WeakMap(), ge = new WeakMap(), ue = new WeakMap(), fe = new WeakMap(), he = new WeakMap(), ve = new WeakMap(), pe = new WeakMap(), me = new WeakMap(), be = new WeakMap(), _e = new WeakMap(), ye = new WeakMap();
388
- const ae = "triiiceratops:viewerState";
389
- function Pe(a) {
390
- return a.id || a["@id"] || (typeof a.getId == "function" ? a.getId() : "");
388
+ const se = "triiiceratops:viewerState";
389
+ function Re(s) {
390
+ return s.id || s["@id"] || (typeof s.getId == "function" ? s.getId() : "");
391
391
  }
392
- function Ie(a) {
393
- if (!a) return null;
394
- const t = a.match(/xywh=(\d+),(\d+),(\d+),(\d+)/);
392
+ function Ie(s) {
393
+ if (!s) return null;
394
+ const t = s.match(/xywh=(\d+),(\d+),(\d+),(\d+)/);
395
395
  return t ? {
396
396
  x: parseInt(t[1], 10),
397
397
  y: parseInt(t[2], 10),
@@ -399,71 +399,71 @@ function Ie(a) {
399
399
  h: parseInt(t[4], 10)
400
400
  } : null;
401
401
  }
402
- function it(a) {
403
- const t = ot(a);
402
+ function at(s) {
403
+ const t = st(s);
404
404
  if (t)
405
- return lt(t);
406
- const s = ut(a);
407
- return s ? {
405
+ return nt(t);
406
+ const a = lt(s);
407
+ return a ? {
408
408
  type: "RECTANGLE",
409
- x: s.x,
410
- y: s.y,
411
- w: s.w,
412
- h: s.h
409
+ x: a.x,
410
+ y: a.y,
411
+ w: a.w,
412
+ h: a.h
413
413
  } : null;
414
414
  }
415
- function ot(a) {
416
- var s, n;
417
- if (typeof a.getTarget == "function") {
418
- const c = ((s = a.__jsonld) == null ? void 0 : s.on) || ((n = a.__jsonld) == null ? void 0 : n.target);
415
+ function st(s) {
416
+ var a, n;
417
+ if (typeof s.getTarget == "function") {
418
+ const c = ((a = s.__jsonld) == null ? void 0 : a.on) || ((n = s.__jsonld) == null ? void 0 : n.target);
419
419
  if (c)
420
420
  return Me(c);
421
421
  }
422
- const t = a.target || a.on;
422
+ const t = s.target || s.on;
423
423
  return t ? Me(t) : null;
424
424
  }
425
- function Me(a) {
426
- if (!a) return null;
427
- if (Array.isArray(a))
428
- for (const t of a) {
429
- const s = Ee(t);
430
- if (s) return s;
425
+ function Me(s) {
426
+ if (!s) return null;
427
+ if (Array.isArray(s))
428
+ for (const t of s) {
429
+ const a = Ge(t);
430
+ if (a) return a;
431
431
  }
432
432
  else
433
- return Ee(a);
433
+ return Ge(s);
434
434
  return null;
435
435
  }
436
- function Ee(a) {
437
- var s;
438
- if (!a) return null;
439
- const t = a.selector || a;
440
- return (t == null ? void 0 : t.type) === "SvgSelector" && t.value ? t.value : ((s = t == null ? void 0 : t.item) == null ? void 0 : s.type) === "SvgSelector" && t.item.value ? t.item.value : null;
436
+ function Ge(s) {
437
+ var a;
438
+ if (!s) return null;
439
+ const t = s.selector || s;
440
+ return (t == null ? void 0 : t.type) === "SvgSelector" && t.value ? t.value : ((a = t == null ? void 0 : t.item) == null ? void 0 : a.type) === "SvgSelector" && t.item.value ? t.item.value : null;
441
441
  }
442
- function lt(a) {
442
+ function nt(s) {
443
443
  try {
444
- const s = new DOMParser().parseFromString(a, "image/svg+xml");
445
- if (s.documentElement.nodeName === "parsererror")
446
- return console.warn("Failed to parse SVG selector:", a), null;
447
- const n = [], c = s.querySelectorAll("polygon");
448
- for (const y of c) {
449
- const b = y.getAttribute("points");
450
- if (b) {
451
- const S = ct(b);
444
+ const a = new DOMParser().parseFromString(s, "image/svg+xml");
445
+ if (a.documentElement.nodeName === "parsererror")
446
+ return console.warn("Failed to parse SVG selector:", s), null;
447
+ const n = [], c = a.querySelectorAll("polygon");
448
+ for (const I of c) {
449
+ const v = I.getAttribute("points");
450
+ if (v) {
451
+ const S = rt(v);
452
452
  n.push(...S);
453
453
  }
454
454
  }
455
- const g = s.querySelectorAll("path");
456
- for (const y of g) {
457
- const b = y.getAttribute("d");
458
- if (b) {
459
- const S = dt(b);
455
+ const d = a.querySelectorAll("path");
456
+ for (const I of d) {
457
+ const v = I.getAttribute("d");
458
+ if (v) {
459
+ const S = it(v);
460
460
  n.push(...S);
461
461
  }
462
462
  }
463
- const C = s.querySelectorAll("circle");
464
- for (const y of C) {
465
- const b = parseFloat(y.getAttribute("cx") || "0"), S = parseFloat(y.getAttribute("cy") || "0"), k = parseFloat(y.getAttribute("r") || "0"), P = gt(b, S, k);
466
- n.push(...P);
463
+ const G = a.querySelectorAll("circle");
464
+ for (const I of G) {
465
+ const v = parseFloat(I.getAttribute("cx") || "0"), S = parseFloat(I.getAttribute("cy") || "0"), L = parseFloat(I.getAttribute("r") || "0"), R = ot(v, S, L);
466
+ n.push(...R);
467
467
  }
468
468
  return n.length === 0 ? null : {
469
469
  type: "POLYGON",
@@ -473,161 +473,161 @@ function lt(a) {
473
473
  return console.warn("Failed to convert SVG to polygon:", t), null;
474
474
  }
475
475
  }
476
- function ct(a) {
477
- const t = [], s = a.trim().split(/\s+/);
478
- for (const n of s) {
479
- const [c, g] = n.split(",").map((C) => parseFloat(C));
480
- !isNaN(c) && !isNaN(g) && t.push([c, g]);
476
+ function rt(s) {
477
+ const t = [], a = s.trim().split(/\s+/);
478
+ for (const n of a) {
479
+ const [c, d] = n.split(",").map((G) => parseFloat(G));
480
+ !isNaN(c) && !isNaN(d) && t.push([c, d]);
481
481
  }
482
482
  return t;
483
483
  }
484
- function dt(a) {
485
- const t = [], s = /[ML]\s*([\d.]+)[,\s]+([\d.]+)/g;
484
+ function it(s) {
485
+ const t = [], a = /[ML]\s*([\d.]+)[,\s]+([\d.]+)/g;
486
486
  let n;
487
- for (; (n = s.exec(a)) !== null; ) {
488
- const c = parseFloat(n[1]), g = parseFloat(n[2]);
489
- !isNaN(c) && !isNaN(g) && t.push([c, g]);
487
+ for (; (n = a.exec(s)) !== null; ) {
488
+ const c = parseFloat(n[1]), d = parseFloat(n[2]);
489
+ !isNaN(c) && !isNaN(d) && t.push([c, d]);
490
490
  }
491
491
  return t;
492
492
  }
493
- function gt(a, t, s, n = 8) {
493
+ function ot(s, t, a, n = 8) {
494
494
  const c = [];
495
- for (let g = 0; g < n; g++) {
496
- const C = g / n * Math.PI * 2, y = a + s * Math.cos(C), b = t + s * Math.sin(C);
497
- c.push([y, b]);
495
+ for (let d = 0; d < n; d++) {
496
+ const G = d / n * Math.PI * 2, I = s + a * Math.cos(G), v = t + a * Math.sin(G);
497
+ c.push([I, v]);
498
498
  }
499
499
  return c;
500
500
  }
501
- function ut(a) {
502
- var s;
503
- if (typeof a.getTarget == "function") {
504
- const n = a.getTarget();
501
+ function lt(s) {
502
+ var a;
503
+ if (typeof s.getTarget == "function") {
504
+ const n = s.getTarget();
505
505
  if (typeof n == "string" && n.includes("xywh="))
506
506
  return Ie(n);
507
- const c = (s = a.__jsonld) == null ? void 0 : s.on;
507
+ const c = (a = s.__jsonld) == null ? void 0 : a.on;
508
508
  if (c) {
509
- const g = Te(c);
510
- if (g) return g;
509
+ const d = Te(c);
510
+ if (d) return d;
511
511
  }
512
512
  }
513
- const t = a.target || a.on;
513
+ const t = s.target || s.on;
514
514
  return t ? Te(t) : null;
515
515
  }
516
- function Te(a) {
517
- if (!a) return null;
518
- if (Array.isArray(a))
519
- for (const t of a) {
520
- const s = Te(t);
521
- if (s) return s;
516
+ function Te(s) {
517
+ if (!s) return null;
518
+ if (Array.isArray(s))
519
+ for (const t of s) {
520
+ const a = Te(t);
521
+ if (a) return a;
522
522
  }
523
- if (typeof a == "string" && a.includes("xywh="))
524
- return Ie(a);
525
- if (a.selector) {
526
- const t = a.selector, s = t.item || t;
527
- if (s.value && typeof s.value == "string" && s.value.includes("xywh="))
528
- return Ie(s.value);
523
+ if (typeof s == "string" && s.includes("xywh="))
524
+ return Ie(s);
525
+ if (s.selector) {
526
+ const t = s.selector, a = t.item || t;
527
+ if (a.value && typeof a.value == "string" && a.value.includes("xywh="))
528
+ return Ie(a.value);
529
529
  }
530
530
  return null;
531
531
  }
532
- function ft(a) {
533
- let t = "", s = !1;
534
- if (typeof a.getBody == "function") {
535
- const n = a.getBody();
532
+ function ct(s) {
533
+ let t = "", a = !1;
534
+ if (typeof s.getBody == "function") {
535
+ const n = s.getBody();
536
536
  if (n && Array.isArray(n)) {
537
537
  const c = [];
538
- for (const g of n) {
539
- const C = g.getValue ? g.getValue() : "";
540
- if (C) {
541
- c.push(C);
542
- const y = g.getFormat ? g.getFormat() : "";
543
- (y === "text/html" || y === "application/html") && (s = !0);
538
+ for (const d of n) {
539
+ const G = d.getValue ? d.getValue() : "";
540
+ if (G) {
541
+ c.push(G);
542
+ const I = d.getFormat ? d.getFormat() : "";
543
+ (I === "text/html" || I === "application/html") && (a = !0);
544
544
  }
545
545
  }
546
546
  t = c.join(" ");
547
547
  }
548
548
  } else {
549
- const n = (g) => g && (g.chars || g.value || g["cnt:chars"]) || "", c = (g) => g ? g.format === "text/html" || g.type === "TextualBody" : !1;
550
- if (a.resource) {
551
- const g = Array.isArray(a.resource) ? a.resource : [a.resource];
552
- t = g.map(n).filter(Boolean).join(" "), s = g.some(c);
553
- } else if (a.body) {
554
- const g = Array.isArray(a.body) ? a.body : [a.body];
555
- t = g.map(n).filter(Boolean).join(" "), s = g.some(c);
549
+ const n = (d) => d && (d.chars || d.value || d["cnt:chars"]) || "", c = (d) => d ? d.format === "text/html" || d.type === "TextualBody" : !1;
550
+ if (s.resource) {
551
+ const d = Array.isArray(s.resource) ? s.resource : [s.resource];
552
+ t = d.map(n).filter(Boolean).join(" "), a = d.some(c);
553
+ } else if (s.body) {
554
+ const d = Array.isArray(s.body) ? s.body : [s.body];
555
+ t = d.map(n).filter(Boolean).join(" "), a = d.some(c);
556
556
  }
557
557
  }
558
- return t || (typeof a.getLabel == "function" ? t = a.getLabel() || "" : a.label && (t = Array.isArray(a.label) ? a.label.join(" ") : a.label)), { value: t || "Annotation", isHtml: s };
558
+ return t || (typeof s.getLabel == "function" ? t = s.getLabel() || "" : s.label && (t = Array.isArray(s.label) ? s.label.join(" ") : s.label)), { value: t || "Annotation", isHtml: a };
559
559
  }
560
- function ht(a, t, s = !1) {
561
- const n = Pe(a) || `anno-${t}`, c = it(a);
560
+ function dt(s, t, a = !1) {
561
+ const n = Re(s) || `anno-${t}`, c = at(s);
562
562
  if (!c)
563
563
  return null;
564
- const g = ft(a);
564
+ const d = ct(s);
565
565
  return {
566
566
  id: n,
567
567
  geometry: c,
568
- body: g,
569
- isSearchHit: s
568
+ body: d,
569
+ isSearchHit: a
570
570
  };
571
571
  }
572
- function vt(a, t = /* @__PURE__ */ new Set()) {
573
- return a.map((s, n) => {
574
- const c = t.has(Pe(s));
575
- return ht(s, n, c);
576
- }).filter((s) => s !== null);
572
+ function gt(s, t = /* @__PURE__ */ new Set()) {
573
+ return s.map((a, n) => {
574
+ const c = t.has(Re(a));
575
+ return dt(a, n, c);
576
+ }).filter((a) => a !== null);
577
577
  }
578
- var pt = e.from_html("<div></div>"), mt = e.from_svg('<svg class="absolute pointer-events-auto"><title> </title><polygon stroke-width="2"></polygon></svg>'), bt = e.from_html('<div class="w-full h-full relative"><div class="w-full h-full osd-background bg-base-100"></div> <!></div>');
579
- function _t(a, t) {
578
+ var ut = e.from_html("<div></div>"), ft = e.from_svg('<svg class="absolute pointer-events-auto"><title> </title><polygon stroke-width="2"></polygon></svg>'), ht = e.from_html('<div class="w-full h-full relative"><div class="w-full h-full osd-background bg-base-100"></div> <!></div>');
579
+ function vt(s, t) {
580
580
  e.push(t, !0);
581
- let s = e.state(void 0), n = e.state(void 0), c = e.state(0), g = e.derived(() => {
581
+ let a = e.state(void 0), n = e.state(void 0), c = e.state(0), d = e.derived(() => {
582
582
  if (!t.viewerState.manifestId || !t.viewerState.canvasId)
583
583
  return [];
584
- const i = se.getAnnotations(t.viewerState.manifestId, t.viewerState.canvasId), l = t.viewerState.currentCanvasSearchAnnotations;
584
+ const i = ae.getAnnotations(t.viewerState.manifestId, t.viewerState.canvasId), l = t.viewerState.currentCanvasSearchAnnotations;
585
585
  return [...i, ...l];
586
- }), C = e.derived(() => {
586
+ }), G = e.derived(() => {
587
587
  const i = /* @__PURE__ */ new Set();
588
588
  return t.viewerState.currentCanvasSearchAnnotations.forEach((l) => {
589
589
  const u = l.id || l["@id"];
590
590
  u && i.add(u);
591
591
  }), i;
592
- }), y = e.derived(() => vt(e.get(g), e.get(C))), b = e.derived(() => {
593
- if (e.get(c), !e.get(n) || !e.get(y).length)
592
+ }), I = e.derived(() => gt(e.get(d), e.get(G))), v = e.derived(() => {
593
+ if (e.get(c), !e.get(n) || !e.get(I).length)
594
594
  return [];
595
595
  const i = e.get(n).world.getItemAt(0);
596
596
  if (!i)
597
597
  return [];
598
598
  const l = [];
599
- for (const u of e.get(y)) {
599
+ for (const u of e.get(I)) {
600
600
  if (!u.isSearchHit) if (t.viewerState.showAnnotations) {
601
601
  if (!t.viewerState.visibleAnnotationIds.has(u.id))
602
602
  continue;
603
603
  } else continue;
604
604
  if (u.geometry.type === "RECTANGLE") {
605
- const T = i.imageToViewportRectangle(u.geometry.x, u.geometry.y, u.geometry.w, u.geometry.h), v = e.get(n).viewport.viewportToViewerElementRectangle(T);
605
+ const x = i.imageToViewportRectangle(u.geometry.x, u.geometry.y, u.geometry.w, u.geometry.h), p = e.get(n).viewport.viewportToViewerElementRectangle(x);
606
606
  l.push({
607
607
  id: u.id,
608
608
  type: "RECTANGLE",
609
609
  rect: {
610
- x: v.x,
611
- y: v.y,
612
- width: v.width,
613
- height: v.height
610
+ x: p.x,
611
+ y: p.y,
612
+ width: p.width,
613
+ height: p.height
614
614
  },
615
615
  isSearchHit: u.isSearchHit,
616
616
  tooltip: u.body.value
617
617
  });
618
618
  } else if (u.geometry.type === "POLYGON") {
619
- const T = u.geometry.points.map((j) => {
620
- const L = i.imageToViewportCoordinates(new Ce.Point(j[0], j[1])), x = e.get(n).viewport.viewportToViewerElementCoordinates(L);
621
- return [x.x, x.y];
619
+ const x = u.geometry.points.map((E) => {
620
+ const k = i.imageToViewportCoordinates(new Ce.Point(E[0], E[1])), T = e.get(n).viewport.viewportToViewerElementCoordinates(k);
621
+ return [T.x, T.y];
622
622
  });
623
- let v = 1 / 0, r = 1 / 0, d = -1 / 0, w = -1 / 0;
624
- for (const [j, L] of T)
625
- v = Math.min(v, j), r = Math.min(r, L), d = Math.max(d, j), w = Math.max(w, L);
626
- const m = T.map(([j, L]) => [j - v, L - r]);
623
+ let p = 1 / 0, r = 1 / 0, g = -1 / 0, y = -1 / 0;
624
+ for (const [E, k] of x)
625
+ p = Math.min(p, E), r = Math.min(r, k), g = Math.max(g, E), y = Math.max(y, k);
626
+ const m = x.map(([E, k]) => [E - p, k - r]);
627
627
  l.push({
628
628
  id: u.id,
629
629
  type: "POLYGON",
630
- bounds: { x: v, y: r, width: d - v, height: w - r },
630
+ bounds: { x: p, y: r, width: g - p, height: y - r },
631
631
  points: m,
632
632
  isSearchHit: u.isSearchHit,
633
633
  tooltip: u.body.value
@@ -636,12 +636,12 @@ function _t(a, t) {
636
636
  }
637
637
  return l;
638
638
  });
639
- qe(() => {
640
- if (e.get(s))
639
+ Ne(() => {
640
+ if (e.get(a))
641
641
  return e.set(
642
642
  n,
643
643
  Ce({
644
- element: e.get(s),
644
+ element: e.get(a),
645
645
  tileSources: null,
646
646
  // Will be set via effect
647
647
  prefixUrl: "",
@@ -672,249 +672,249 @@ function _t(a, t) {
672
672
  }), e.user_effect(() => {
673
673
  !e.get(n) || !t.tileSources || e.get(n).open(t.tileSources);
674
674
  });
675
- var S = bt(), k = e.child(S);
676
- e.bind_this(k, (i) => e.set(s, i), () => e.get(s));
677
- var P = e.sibling(k, 2);
678
- e.each(P, 17, () => e.get(b), (i) => i.id, (i, l) => {
679
- var u = e.comment(), T = e.first_child(u);
675
+ var S = ht(), L = e.child(S);
676
+ e.bind_this(L, (i) => e.set(a, i), () => e.get(a));
677
+ var R = e.sibling(L, 2);
678
+ e.each(R, 17, () => e.get(v), (i) => i.id, (i, l) => {
679
+ var u = e.comment(), x = e.first_child(u);
680
680
  {
681
- var v = (d) => {
682
- var w = pt();
681
+ var p = (g) => {
682
+ var y = ut();
683
683
  e.template_effect(() => {
684
- e.set_class(w, 1, `absolute border-2 transition-colors cursor-pointer pointer-events-auto ${e.get(l).isSearchHit ? "border-yellow-400 bg-yellow-400/40 hover:bg-yellow-400/60" : "border-red-500 bg-red-500/20 hover:bg-red-500/40"}`), e.set_style(w, `
684
+ e.set_class(y, 1, `absolute border-2 transition-colors cursor-pointer pointer-events-auto ${e.get(l).isSearchHit ? "border-yellow-400 bg-yellow-400/40 hover:bg-yellow-400/60" : "border-red-500 bg-red-500/20 hover:bg-red-500/40"}`), e.set_style(y, `
685
685
  left: ${e.get(l).rect.x ?? ""}px;
686
686
  top: ${e.get(l).rect.y ?? ""}px;
687
687
  width: ${e.get(l).rect.width ?? ""}px;
688
688
  height: ${e.get(l).rect.height ?? ""}px;
689
- `), e.set_attribute(w, "title", e.get(l).tooltip);
690
- }), e.append(d, w);
691
- }, r = (d) => {
692
- var w = e.comment(), m = e.first_child(w);
689
+ `), e.set_attribute(y, "title", e.get(l).tooltip);
690
+ }), e.append(g, y);
691
+ }, r = (g) => {
692
+ var y = e.comment(), m = e.first_child(y);
693
693
  {
694
- var j = (L) => {
695
- var x = mt(), _ = e.child(x), z = e.child(_, !0);
694
+ var E = (k) => {
695
+ var T = ft(), _ = e.child(T), C = e.child(_, !0);
696
696
  e.reset(_);
697
- var p = e.sibling(_);
698
- e.reset(x), e.template_effect(
697
+ var b = e.sibling(_);
698
+ e.reset(T), e.template_effect(
699
699
  (o) => {
700
- e.set_style(x, `
700
+ e.set_style(T, `
701
701
  left: ${e.get(l).bounds.x ?? ""}px;
702
702
  top: ${e.get(l).bounds.y ?? ""}px;
703
703
  width: ${e.get(l).bounds.width ?? ""}px;
704
704
  height: ${e.get(l).bounds.height ?? ""}px;
705
- `), e.set_text(z, e.get(l).tooltip), e.set_attribute(p, "points", o), e.set_class(p, 0, `cursor-pointer transition-colors ${e.get(l).isSearchHit ? "fill-yellow-400/40 stroke-yellow-400 hover:fill-yellow-400/60" : "fill-red-500/20 stroke-red-500 hover:fill-red-500/40"}`);
705
+ `), e.set_text(C, e.get(l).tooltip), e.set_attribute(b, "points", o), e.set_class(b, 0, `cursor-pointer transition-colors ${e.get(l).isSearchHit ? "fill-yellow-400/40 stroke-yellow-400 hover:fill-yellow-400/60" : "fill-red-500/20 stroke-red-500 hover:fill-red-500/40"}`);
706
706
  },
707
707
  [() => e.get(l).points.map((o) => o.join(",")).join(" ")]
708
- ), e.append(L, x);
708
+ ), e.append(k, T);
709
709
  };
710
710
  e.if(
711
711
  m,
712
- (L) => {
713
- e.get(l).type === "POLYGON" && L(j);
712
+ (k) => {
713
+ e.get(l).type === "POLYGON" && k(E);
714
714
  },
715
715
  !0
716
716
  );
717
717
  }
718
- e.append(d, w);
718
+ e.append(g, y);
719
719
  };
720
- e.if(T, (d) => {
721
- e.get(l).type === "RECTANGLE" ? d(v) : d(r, !1);
720
+ e.if(x, (g) => {
721
+ e.get(l).type === "RECTANGLE" ? g(p) : g(r, !1);
722
722
  });
723
723
  }
724
724
  e.append(i, u);
725
- }), e.reset(S), e.append(a, S), e.pop();
725
+ }), e.reset(S), e.append(s, S), e.pop();
726
726
  }
727
- const yt = "en";
728
- let M = () => yt;
729
- const xt = /* @__NO_SIDE_EFFECTS__ */ () => "Hello World", wt = /* @__NO_SIDE_EFFECTS__ */ () => "Search", St = /* @__NO_SIDE_EFFECTS__ */ () => "Close Search", At = /* @__NO_SIDE_EFFECTS__ */ () => "Search content...", It = /* @__NO_SIDE_EFFECTS__ */ (a) => `No results found for "${a.query}"`, Tt = /* @__NO_SIDE_EFFECTS__ */ () => "Enter a search term to find occurrences within this manifest.", $t = /* @__NO_SIDE_EFFECTS__ */ (a) => `${a.count} Results`, kt = /* @__NO_SIDE_EFFECTS__ */ () => "Manifest Metadata", Ct = /* @__NO_SIDE_EFFECTS__ */ () => "Loading...", jt = /* @__NO_SIDE_EFFECTS__ */ () => "Attribution", Lt = /* @__NO_SIDE_EFFECTS__ */ () => "License", Mt = /* @__NO_SIDE_EFFECTS__ */ () => "Close", Et = /* @__NO_SIDE_EFFECTS__ */ () => "Menu", Gt = /* @__NO_SIDE_EFFECTS__ */ () => "Search", Pt = /* @__NO_SIDE_EFFECTS__ */ () => "Toggle Search", zt = /* @__NO_SIDE_EFFECTS__ */ () => "Hide Gallery", Rt = /* @__NO_SIDE_EFFECTS__ */ () => "Show Gallery", Ft = /* @__NO_SIDE_EFFECTS__ */ () => "Exit Full Screen", Dt = /* @__NO_SIDE_EFFECTS__ */ () => "Enter Full Screen", Ht = /* @__NO_SIDE_EFFECTS__ */ () => "Hide Annotations", Nt = /* @__NO_SIDE_EFFECTS__ */ () => "Show Annotations", Vt = /* @__NO_SIDE_EFFECTS__ */ () => "Toggle Annotations", Bt = /* @__NO_SIDE_EFFECTS__ */ () => "Metadata", Ot = /* @__NO_SIDE_EFFECTS__ */ () => "Toggle Metadata", qt = /* @__NO_SIDE_EFFECTS__ */ () => "Hide All Annotations", Yt = /* @__NO_SIDE_EFFECTS__ */ () => "Show All Annotations", Xt = /* @__NO_SIDE_EFFECTS__ */ (a) => `${a.count} Annotations`, Qt = /* @__NO_SIDE_EFFECTS__ */ (a) => `(${a.count} visible)`, Ut = /* @__NO_SIDE_EFFECTS__ */ () => "(No content)", Kt = /* @__NO_SIDE_EFFECTS__ */ () => "No annotations available.", Wt = /* @__NO_SIDE_EFFECTS__ */ () => "Previous Canvas", Jt = /* @__NO_SIDE_EFFECTS__ */ () => "Next Canvas", Zt = /* @__NO_SIDE_EFFECTS__ */ () => "Docs", es = /* @__NO_SIDE_EFFECTS__ */ () => "IIIF Manifest:", ts = /* @__NO_SIDE_EFFECTS__ */ () => "Enter IIIF manifest URL", ss = /* @__NO_SIDE_EFFECTS__ */ () => "Load", as = /* @__NO_SIDE_EFFECTS__ */ () => "GitHub", ns = /* @__NO_SIDE_EFFECTS__ */ () => "Hallo Welt", rs = /* @__NO_SIDE_EFFECTS__ */ () => "Suche", is = /* @__NO_SIDE_EFFECTS__ */ () => "Suche schließen", os = /* @__NO_SIDE_EFFECTS__ */ () => "Inhalt durchsuchen...", ls = /* @__NO_SIDE_EFFECTS__ */ (a) => `Keine Ergebnisse für "${a.query}" gefunden`, cs = /* @__NO_SIDE_EFFECTS__ */ () => "Geben Sie einen Suchbegriff ein, um Vorkommen in diesem Manifest zu finden.", ds = /* @__NO_SIDE_EFFECTS__ */ (a) => `${a.count} Ergebnisse`, gs = /* @__NO_SIDE_EFFECTS__ */ () => "Manifest-Metadaten", us = /* @__NO_SIDE_EFFECTS__ */ () => "Lädt...", fs = /* @__NO_SIDE_EFFECTS__ */ () => "Quellenangabe", hs = /* @__NO_SIDE_EFFECTS__ */ () => "Lizenz", vs = /* @__NO_SIDE_EFFECTS__ */ () => "Schließen", ps = /* @__NO_SIDE_EFFECTS__ */ () => "Menü", ms = /* @__NO_SIDE_EFFECTS__ */ () => "Suche", bs = /* @__NO_SIDE_EFFECTS__ */ () => "Suche umschalten", _s = /* @__NO_SIDE_EFFECTS__ */ () => "Galerie ausblenden", ys = /* @__NO_SIDE_EFFECTS__ */ () => "Galerie einblenden", xs = /* @__NO_SIDE_EFFECTS__ */ () => "Vollbildmodus beenden", ws = /* @__NO_SIDE_EFFECTS__ */ () => "Vollbildmodus", Ss = /* @__NO_SIDE_EFFECTS__ */ () => "Annotationen ausblenden", As = /* @__NO_SIDE_EFFECTS__ */ () => "Annotationen einblenden", Is = /* @__NO_SIDE_EFFECTS__ */ () => "Annotationen umschalten", Ts = /* @__NO_SIDE_EFFECTS__ */ () => "Metadaten", $s = /* @__NO_SIDE_EFFECTS__ */ () => "Metadaten umschalten", ks = /* @__NO_SIDE_EFFECTS__ */ () => "Alle Annotationen ausblenden", Cs = /* @__NO_SIDE_EFFECTS__ */ () => "Alle Annotationen einblenden", js = /* @__NO_SIDE_EFFECTS__ */ (a) => `${a.count} Annotationen`, Ls = /* @__NO_SIDE_EFFECTS__ */ (a) => `(${a.count} sichtbar)`, Ms = /* @__NO_SIDE_EFFECTS__ */ () => "(Kein Inhalt)", Es = /* @__NO_SIDE_EFFECTS__ */ () => "Keine Annotationen verfügbar.", Gs = /* @__NO_SIDE_EFFECTS__ */ () => "Vorheriges Canvas", Ps = /* @__NO_SIDE_EFFECTS__ */ () => "Nächstes Canvas", zs = /* @__NO_SIDE_EFFECTS__ */ () => "Doku", Rs = /* @__NO_SIDE_EFFECTS__ */ () => "IIIF-Manifest:", Fs = /* @__NO_SIDE_EFFECTS__ */ () => "IIIF-Manifest-URL eingeben", Ds = /* @__NO_SIDE_EFFECTS__ */ () => "Laden", Hs = /* @__NO_SIDE_EFFECTS__ */ () => "GitHub", Ns = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
730
- de: ns,
727
+ const pt = "en";
728
+ let M = () => pt;
729
+ const mt = /* @__NO_SIDE_EFFECTS__ */ () => "Hello World", bt = /* @__NO_SIDE_EFFECTS__ */ () => "Search", _t = /* @__NO_SIDE_EFFECTS__ */ () => "Close Search", yt = /* @__NO_SIDE_EFFECTS__ */ () => "Search content...", xt = /* @__NO_SIDE_EFFECTS__ */ (s) => `No results found for "${s.query}"`, wt = /* @__NO_SIDE_EFFECTS__ */ () => "Enter a search term to find occurrences within this manifest.", St = /* @__NO_SIDE_EFFECTS__ */ (s) => `${s.count} Results`, At = /* @__NO_SIDE_EFFECTS__ */ () => "Manifest Metadata", It = /* @__NO_SIDE_EFFECTS__ */ () => "Loading...", Tt = /* @__NO_SIDE_EFFECTS__ */ () => "Attribution", $t = /* @__NO_SIDE_EFFECTS__ */ () => "License", kt = /* @__NO_SIDE_EFFECTS__ */ () => "Close", Ct = /* @__NO_SIDE_EFFECTS__ */ () => "Menu", jt = /* @__NO_SIDE_EFFECTS__ */ () => "Search", Lt = /* @__NO_SIDE_EFFECTS__ */ () => "Toggle Search", Mt = /* @__NO_SIDE_EFFECTS__ */ () => "Hide Gallery", Gt = /* @__NO_SIDE_EFFECTS__ */ () => "Show Gallery", Et = /* @__NO_SIDE_EFFECTS__ */ () => "Exit Full Screen", Rt = /* @__NO_SIDE_EFFECTS__ */ () => "Enter Full Screen", Pt = /* @__NO_SIDE_EFFECTS__ */ () => "Hide Annotations", zt = /* @__NO_SIDE_EFFECTS__ */ () => "Show Annotations", Dt = /* @__NO_SIDE_EFFECTS__ */ () => "Toggle Annotations", Ft = /* @__NO_SIDE_EFFECTS__ */ () => "Metadata", Ht = /* @__NO_SIDE_EFFECTS__ */ () => "Toggle Metadata", Nt = /* @__NO_SIDE_EFFECTS__ */ () => "Hide All Annotations", Vt = /* @__NO_SIDE_EFFECTS__ */ () => "Show All Annotations", Bt = /* @__NO_SIDE_EFFECTS__ */ (s) => `${s.count} Annotations`, Ot = /* @__NO_SIDE_EFFECTS__ */ (s) => `(${s.count} visible)`, qt = /* @__NO_SIDE_EFFECTS__ */ () => "(No content)", Yt = /* @__NO_SIDE_EFFECTS__ */ () => "No annotations available.", Xt = /* @__NO_SIDE_EFFECTS__ */ () => "Previous Canvas", Qt = /* @__NO_SIDE_EFFECTS__ */ () => "Next Canvas", Ut = /* @__NO_SIDE_EFFECTS__ */ () => "Docs", Kt = /* @__NO_SIDE_EFFECTS__ */ () => "IIIF Manifest:", Wt = /* @__NO_SIDE_EFFECTS__ */ () => "Enter IIIF manifest URL", Jt = /* @__NO_SIDE_EFFECTS__ */ () => "Load", Zt = /* @__NO_SIDE_EFFECTS__ */ () => "GitHub", ea = /* @__NO_SIDE_EFFECTS__ */ () => "Hallo Welt", ta = /* @__NO_SIDE_EFFECTS__ */ () => "Suche", aa = /* @__NO_SIDE_EFFECTS__ */ () => "Suche schließen", sa = /* @__NO_SIDE_EFFECTS__ */ () => "Inhalt durchsuchen...", na = /* @__NO_SIDE_EFFECTS__ */ (s) => `Keine Ergebnisse für "${s.query}" gefunden`, ra = /* @__NO_SIDE_EFFECTS__ */ () => "Geben Sie einen Suchbegriff ein, um Vorkommen in diesem Manifest zu finden.", ia = /* @__NO_SIDE_EFFECTS__ */ (s) => `${s.count} Ergebnisse`, oa = /* @__NO_SIDE_EFFECTS__ */ () => "Manifest-Metadaten", la = /* @__NO_SIDE_EFFECTS__ */ () => "Lädt...", ca = /* @__NO_SIDE_EFFECTS__ */ () => "Quellenangabe", da = /* @__NO_SIDE_EFFECTS__ */ () => "Lizenz", ga = /* @__NO_SIDE_EFFECTS__ */ () => "Schließen", ua = /* @__NO_SIDE_EFFECTS__ */ () => "Menü", fa = /* @__NO_SIDE_EFFECTS__ */ () => "Suche", ha = /* @__NO_SIDE_EFFECTS__ */ () => "Suche umschalten", va = /* @__NO_SIDE_EFFECTS__ */ () => "Galerie ausblenden", pa = /* @__NO_SIDE_EFFECTS__ */ () => "Galerie einblenden", ma = /* @__NO_SIDE_EFFECTS__ */ () => "Vollbildmodus beenden", ba = /* @__NO_SIDE_EFFECTS__ */ () => "Vollbildmodus", _a = /* @__NO_SIDE_EFFECTS__ */ () => "Annotationen ausblenden", ya = /* @__NO_SIDE_EFFECTS__ */ () => "Annotationen einblenden", xa = /* @__NO_SIDE_EFFECTS__ */ () => "Annotationen umschalten", wa = /* @__NO_SIDE_EFFECTS__ */ () => "Metadaten", Sa = /* @__NO_SIDE_EFFECTS__ */ () => "Metadaten umschalten", Aa = /* @__NO_SIDE_EFFECTS__ */ () => "Alle Annotationen ausblenden", Ia = /* @__NO_SIDE_EFFECTS__ */ () => "Alle Annotationen einblenden", Ta = /* @__NO_SIDE_EFFECTS__ */ (s) => `${s.count} Annotationen`, $a = /* @__NO_SIDE_EFFECTS__ */ (s) => `(${s.count} sichtbar)`, ka = /* @__NO_SIDE_EFFECTS__ */ () => "(Kein Inhalt)", Ca = /* @__NO_SIDE_EFFECTS__ */ () => "Keine Annotationen verfügbar.", ja = /* @__NO_SIDE_EFFECTS__ */ () => "Vorheriges Canvas", La = /* @__NO_SIDE_EFFECTS__ */ () => "Nächstes Canvas", Ma = /* @__NO_SIDE_EFFECTS__ */ () => "Doku", Ga = /* @__NO_SIDE_EFFECTS__ */ () => "IIIF-Manifest:", Ea = /* @__NO_SIDE_EFFECTS__ */ () => "IIIF-Manifest-URL eingeben", Ra = /* @__NO_SIDE_EFFECTS__ */ () => "Laden", Pa = /* @__NO_SIDE_EFFECTS__ */ () => "GitHub", za = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
730
+ de: ea,
731
+ en: mt
732
+ })[t.languageTag ?? M()](), Da = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
733
+ de: ta,
734
+ en: bt
735
+ })[t.languageTag ?? M()](), Fa = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
736
+ de: aa,
737
+ en: _t
738
+ })[t.languageTag ?? M()](), Ha = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
739
+ de: sa,
740
+ en: yt
741
+ })[t.languageTag ?? M()](), Na = /* @__NO_SIDE_EFFECTS__ */ (s, t = {}) => ({
742
+ de: na,
731
743
  en: xt
732
- })[t.languageTag ?? M()](), Vs = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
733
- de: rs,
744
+ })[t.languageTag ?? M()](s), Va = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
745
+ de: ra,
734
746
  en: wt
735
- })[t.languageTag ?? M()](), Bs = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
736
- de: is,
747
+ })[t.languageTag ?? M()](), Ba = /* @__NO_SIDE_EFFECTS__ */ (s, t = {}) => ({
748
+ de: ia,
737
749
  en: St
738
- })[t.languageTag ?? M()](), Os = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
739
- de: os,
750
+ })[t.languageTag ?? M()](s), Oa = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
751
+ de: oa,
740
752
  en: At
741
- })[t.languageTag ?? M()](), qs = /* @__NO_SIDE_EFFECTS__ */ (a, t = {}) => ({
742
- de: ls,
753
+ })[t.languageTag ?? M()](), qa = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
754
+ de: la,
743
755
  en: It
744
- })[t.languageTag ?? M()](a), Ys = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
745
- de: cs,
756
+ })[t.languageTag ?? M()](), Ya = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
757
+ de: ca,
746
758
  en: Tt
747
- })[t.languageTag ?? M()](), Xs = /* @__NO_SIDE_EFFECTS__ */ (a, t = {}) => ({
748
- de: ds,
759
+ })[t.languageTag ?? M()](), Xa = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
760
+ de: da,
749
761
  en: $t
750
- })[t.languageTag ?? M()](a), Qs = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
751
- de: gs,
762
+ })[t.languageTag ?? M()](), Qa = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
763
+ de: ga,
752
764
  en: kt
753
- })[t.languageTag ?? M()](), Us = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
754
- de: us,
765
+ })[t.languageTag ?? M()](), Ua = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
766
+ de: ua,
755
767
  en: Ct
756
- })[t.languageTag ?? M()](), Ks = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
757
- de: fs,
768
+ })[t.languageTag ?? M()](), Ka = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
769
+ de: fa,
758
770
  en: jt
759
- })[t.languageTag ?? M()](), Ws = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
760
- de: hs,
771
+ })[t.languageTag ?? M()](), Wa = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
772
+ de: ha,
761
773
  en: Lt
762
- })[t.languageTag ?? M()](), Js = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
763
- de: vs,
774
+ })[t.languageTag ?? M()](), Ja = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
775
+ de: va,
764
776
  en: Mt
765
- })[t.languageTag ?? M()](), Zs = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
766
- de: ps,
767
- en: Et
768
- })[t.languageTag ?? M()](), ea = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
769
- de: ms,
777
+ })[t.languageTag ?? M()](), Za = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
778
+ de: pa,
770
779
  en: Gt
771
- })[t.languageTag ?? M()](), ta = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
772
- de: bs,
780
+ })[t.languageTag ?? M()](), es = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
781
+ de: ma,
782
+ en: Et
783
+ })[t.languageTag ?? M()](), ts = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
784
+ de: ba,
785
+ en: Rt
786
+ })[t.languageTag ?? M()](), as = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
787
+ de: _a,
773
788
  en: Pt
774
- })[t.languageTag ?? M()](), sa = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
775
- de: _s,
789
+ })[t.languageTag ?? M()](), ss = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
790
+ de: ya,
776
791
  en: zt
777
- })[t.languageTag ?? M()](), aa = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
778
- de: ys,
779
- en: Rt
780
- })[t.languageTag ?? M()](), na = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
781
- de: xs,
782
- en: Ft
783
- })[t.languageTag ?? M()](), ra = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
784
- de: ws,
792
+ })[t.languageTag ?? M()](), ns = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
793
+ de: xa,
785
794
  en: Dt
786
- })[t.languageTag ?? M()](), ia = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
787
- de: Ss,
795
+ })[t.languageTag ?? M()](), rs = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
796
+ de: wa,
797
+ en: Ft
798
+ })[t.languageTag ?? M()](), is = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
799
+ de: Sa,
788
800
  en: Ht
789
- })[t.languageTag ?? M()](), oa = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
790
- de: As,
801
+ })[t.languageTag ?? M()](), os = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
802
+ de: Aa,
791
803
  en: Nt
792
- })[t.languageTag ?? M()](), la = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
793
- de: Is,
804
+ })[t.languageTag ?? M()](), ls = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
805
+ de: Ia,
794
806
  en: Vt
795
- })[t.languageTag ?? M()](), ca = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
796
- de: Ts,
807
+ })[t.languageTag ?? M()](), cs = /* @__NO_SIDE_EFFECTS__ */ (s, t = {}) => ({
808
+ de: Ta,
797
809
  en: Bt
798
- })[t.languageTag ?? M()](), da = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
799
- de: $s,
810
+ })[t.languageTag ?? M()](s), ds = /* @__NO_SIDE_EFFECTS__ */ (s, t = {}) => ({
811
+ de: $a,
800
812
  en: Ot
801
- })[t.languageTag ?? M()](), ze = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
802
- de: ks,
813
+ })[t.languageTag ?? M()](s), gs = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
814
+ de: ka,
803
815
  en: qt
804
- })[t.languageTag ?? M()](), Re = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
805
- de: Cs,
816
+ })[t.languageTag ?? M()](), us = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
817
+ de: Ca,
806
818
  en: Yt
807
- })[t.languageTag ?? M()](), Fe = /* @__NO_SIDE_EFFECTS__ */ (a, t = {}) => ({
808
- de: js,
819
+ })[t.languageTag ?? M()](), fs = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
820
+ de: ja,
809
821
  en: Xt
810
- })[t.languageTag ?? M()](a), De = /* @__NO_SIDE_EFFECTS__ */ (a, t = {}) => ({
811
- de: Ls,
822
+ })[t.languageTag ?? M()](), hs = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
823
+ de: La,
812
824
  en: Qt
813
- })[t.languageTag ?? M()](a), ga = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
814
- de: Ms,
825
+ })[t.languageTag ?? M()](), vs = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
826
+ de: Ma,
815
827
  en: Ut
816
- })[t.languageTag ?? M()](), ua = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
817
- de: Es,
828
+ })[t.languageTag ?? M()](), ps = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
829
+ de: Ga,
818
830
  en: Kt
819
- })[t.languageTag ?? M()](), fa = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
820
- de: Gs,
831
+ })[t.languageTag ?? M()](), ms = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
832
+ de: Ea,
821
833
  en: Wt
822
- })[t.languageTag ?? M()](), ha = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
823
- de: Ps,
834
+ })[t.languageTag ?? M()](), bs = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
835
+ de: Ra,
824
836
  en: Jt
825
- })[t.languageTag ?? M()](), va = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
826
- de: zs,
837
+ })[t.languageTag ?? M()](), _s = /* @__NO_SIDE_EFFECTS__ */ (s = {}, t = {}) => ({
838
+ de: Pa,
827
839
  en: Zt
828
- })[t.languageTag ?? M()](), pa = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
829
- de: Rs,
830
- en: es
831
- })[t.languageTag ?? M()](), ma = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
832
- de: Fs,
833
- en: ts
834
- })[t.languageTag ?? M()](), ba = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
835
- de: Ds,
836
- en: ss
837
- })[t.languageTag ?? M()](), _a = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
838
- de: Hs,
839
- en: as
840
- })[t.languageTag ?? M()](), ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
840
+ })[t.languageTag ?? M()](), ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
841
841
  __proto__: null,
842
- annotations_count: Fe,
843
- attribution: Ks,
844
- close: Js,
845
- docs: va,
846
- enter_full_screen: ra,
847
- exit_full_screen: na,
848
- github: _a,
849
- hello_world: Ns,
850
- hide_all_annotations: ze,
851
- hide_annotations: ia,
852
- hide_gallery: sa,
853
- iiif_manifest_label: pa,
854
- license: Ws,
855
- load: ba,
856
- loading: Us,
857
- manifest_placeholder: ma,
858
- menu: Zs,
859
- metadata: ca,
860
- metadata_label_fallback: Qs,
861
- next_canvas: ha,
862
- no_annotations_available: ua,
863
- no_content: ga,
864
- previous_canvas: fa,
865
- search: ea,
866
- search_panel_close: Bs,
867
- search_panel_instruction: Ys,
868
- search_panel_no_results: qs,
869
- search_panel_placeholder: Os,
870
- search_panel_results_count: Xs,
871
- search_panel_title: Vs,
872
- show_all_annotations: Re,
873
- show_annotations: oa,
874
- show_gallery: aa,
875
- toggle_annotations: la,
876
- toggle_metadata: da,
877
- toggle_search: ta,
878
- visible_count: De
842
+ annotations_count: cs,
843
+ attribution: Ya,
844
+ close: Qa,
845
+ docs: vs,
846
+ enter_full_screen: ts,
847
+ exit_full_screen: es,
848
+ github: _s,
849
+ hello_world: za,
850
+ hide_all_annotations: os,
851
+ hide_annotations: as,
852
+ hide_gallery: Ja,
853
+ iiif_manifest_label: ps,
854
+ license: Xa,
855
+ load: bs,
856
+ loading: qa,
857
+ manifest_placeholder: ms,
858
+ menu: Ua,
859
+ metadata: rs,
860
+ metadata_label_fallback: Oa,
861
+ next_canvas: hs,
862
+ no_annotations_available: us,
863
+ no_content: gs,
864
+ previous_canvas: fs,
865
+ search: Ka,
866
+ search_panel_close: Fa,
867
+ search_panel_instruction: Va,
868
+ search_panel_no_results: Na,
869
+ search_panel_placeholder: Ha,
870
+ search_panel_results_count: Ba,
871
+ search_panel_title: Da,
872
+ show_all_annotations: ls,
873
+ show_annotations: ss,
874
+ show_gallery: Za,
875
+ toggle_annotations: ns,
876
+ toggle_metadata: is,
877
+ toggle_search: Wa,
878
+ visible_count: ds
879
879
  }, Symbol.toStringTag, { value: "Module" }));
880
- let He = e.state(e.proxy(M()));
881
- const xa = {
880
+ let Pe = e.state(e.proxy(M()));
881
+ const xs = {
882
882
  get current() {
883
- return e.get(He);
883
+ return e.get(Pe);
884
884
  }
885
- }, F = new Proxy(ya, {
886
- get(a, t, s) {
887
- return e.get(He), Reflect.get(a, t, s);
885
+ }, P = new Proxy(ys, {
886
+ get(s, t, a) {
887
+ return e.get(Pe), Reflect.get(s, t, a);
888
888
  }
889
889
  });
890
- var wa = e.from_html('<div><button class="btn btn-circle btn-sm btn-ghost"><!></button> <span class="text-sm font-mono tabular-nums"> </span> <button class="btn btn-circle btn-sm btn-ghost"><!></button></div>');
891
- function Sa(a, t) {
890
+ var ws = e.from_html('<div><button class="btn btn-circle btn-sm btn-ghost"><!></button> <span class="text-sm font-mono tabular-nums"> </span> <button class="btn btn-circle btn-sm btn-ghost"><!></button></div>');
891
+ function Ss(s, t) {
892
892
  e.push(t, !0);
893
- var s = wa(), n = e.child(s);
893
+ var a = ws(), n = e.child(a);
894
894
  n.__click = () => t.viewerState.previousCanvas();
895
895
  var c = e.child(n);
896
- Qe(c, { size: 20, weight: "bold" }), e.reset(n);
897
- var g = e.sibling(n, 2), C = e.child(g);
898
- e.reset(g);
899
- var y = e.sibling(g, 2);
900
- y.__click = () => t.viewerState.nextCanvas();
901
- var b = e.child(y);
902
- Ue(b, { size: 20, weight: "bold" }), e.reset(y), e.reset(s), e.template_effect(
903
- (S, k) => {
904
- e.set_class(s, 1, `absolute left-1/2 -translate-x-1/2 bg-base-200/90 backdrop-blur rounded-full shadow-lg px-4 py-2 flex items-center gap-4 z-10 border border-base-300 transition-all duration-200 ${t.viewerState.showThumbnailGallery && t.viewerState.isGalleryDockedBottom ? "bottom-40" : "bottom-4"}`), n.disabled = !t.viewerState.hasPrevious, e.set_attribute(n, "aria-label", S), e.set_text(C, `${t.viewerState.currentCanvasIndex + 1} / ${t.viewerState.canvases.length ?? ""}`), y.disabled = !t.viewerState.hasNext, e.set_attribute(y, "aria-label", k);
896
+ Oe(c, { size: 20, weight: "bold" }), e.reset(n);
897
+ var d = e.sibling(n, 2), G = e.child(d);
898
+ e.reset(d);
899
+ var I = e.sibling(d, 2);
900
+ I.__click = () => t.viewerState.nextCanvas();
901
+ var v = e.child(I);
902
+ qe(v, { size: 20, weight: "bold" }), e.reset(I), e.reset(a), e.template_effect(
903
+ (S, L) => {
904
+ e.set_class(a, 1, `absolute left-1/2 -translate-x-1/2 bg-base-200/90 backdrop-blur rounded-full shadow-lg px-4 py-2 flex items-center gap-4 z-10 border border-base-300 transition-all duration-200 ${t.viewerState.showThumbnailGallery && t.viewerState.isGalleryDockedBottom ? "bottom-40" : "bottom-4"}`), n.disabled = !t.viewerState.hasPrevious, e.set_attribute(n, "aria-label", S), e.set_text(G, `${t.viewerState.currentCanvasIndex + 1} / ${t.viewerState.canvases.length ?? ""}`), I.disabled = !t.viewerState.hasNext, e.set_attribute(I, "aria-label", L);
905
905
  },
906
- [() => F.previous_canvas(), () => F.next_canvas()]
907
- ), e.append(a, s), e.pop();
906
+ [() => P.previous_canvas(), () => P.next_canvas()]
907
+ ), e.append(s, a), e.pop();
908
908
  }
909
909
  e.delegate(["click"]);
910
- var Aa = e.from_html('<span class="text-xs opacity-50 truncate max-w-[150px]"> </span>'), Ia = e.from_html('<button class="w-full text-left p-3 hover:bg-base-300 transition-colors cursor-pointer flex gap-3 group/item items-start focus:outline-none focus:bg-base-300"><div class="btn btn-xs btn-circle btn-ghost mt-0.5 shrink-0 pointer-events-none"><!></div> <div class="flex-1 min-w-0"><div class="flex items-start justify-between"><span class="font-bold text-sm text-primary"></span> <!></div> <div><!></div></div></button>'), Ta = e.from_html('<div class="p-4 text-center opacity-50 text-sm">No annotations available.</div>'), $a = e.from_html('<div class="absolute top-4 right-4 z-500 pointer-events-auto"><details class="group relative"><summary class="flex items-center gap-2 bg-base-200/90 backdrop-blur shadow-lg rounded-full px-4 py-2 cursor-pointer list-none hover:bg-base-200 transition-all select-none border border-base-300 pointer-events-auto"><button class="btn btn-xs btn-circle btn-ghost"><!></button> <span class="text-sm font-medium"> <span class="opacity-50 text-xs font-normal ml-1"> </span></span> <!></summary> <div class="absolute right-0 mt-2 w-96 bg-base-200/95 backdrop-blur shadow-xl rounded-box p-0 max-h-[60vh] overflow-y-auto border border-base-300 flex flex-col divide-y divide-base-300"></div></details></div>');
911
- function ka(a, t) {
910
+ var As = e.from_html('<span class="text-xs opacity-50 truncate max-w-[150px]"> </span>'), Is = e.from_html('<button class="w-full text-left p-3 hover:bg-base-300 transition-colors cursor-pointer flex gap-3 group/item items-start focus:outline-none focus:bg-base-300"><div class="btn btn-xs btn-circle btn-ghost mt-0.5 shrink-0 pointer-events-none"><!></div> <div class="flex-1 min-w-0"><div class="flex items-start justify-between"><span class="font-bold text-sm text-primary"></span> <!></div> <div><!></div></div></button>'), Ts = e.from_html('<div class="p-4 text-center opacity-50 text-sm">No annotations available.</div>'), $s = e.from_html('<div><details class="group relative"><summary class="flex items-center gap-2 bg-base-200/90 backdrop-blur shadow-lg rounded-full px-4 py-2 cursor-pointer list-none hover:bg-base-200 transition-all select-none border border-base-300 pointer-events-auto"><button class="btn btn-xs btn-circle btn-ghost"><!></button> <span class="text-sm font-medium"> <span class="opacity-50 text-xs font-normal ml-1"> </span></span> <!></summary> <div class="absolute right-0 mt-2 w-96 bg-base-200/95 backdrop-blur shadow-xl rounded-box p-0 max-h-[60vh] overflow-y-auto border border-base-300 flex flex-col divide-y divide-base-300"></div></details></div>');
911
+ function ks(s, t) {
912
912
  e.push(t, !0);
913
- const s = xe(ae);
913
+ const a = xe(se);
914
914
  let n = e.derived(() => {
915
- if (!s.manifestId || !s.canvasId)
915
+ if (!a.manifestId || !a.canvasId)
916
916
  return [];
917
- const i = se.getAnnotations(s.manifestId, s.canvasId), l = s.currentCanvasSearchAnnotations;
917
+ const i = ae.getAnnotations(a.manifestId, a.canvasId), l = a.currentCanvasSearchAnnotations;
918
918
  return [...i, ...l];
919
919
  });
920
920
  function c(i) {
@@ -926,49 +926,49 @@ function ka(a, t) {
926
926
  e.get(n).forEach((l) => {
927
927
  const u = c(l);
928
928
  u && i.add(u);
929
- }), s.visibleAnnotationIds = i;
929
+ }), a.visibleAnnotationIds = i;
930
930
  } else
931
- s.visibleAnnotationIds = /* @__PURE__ */ new Set();
931
+ a.visibleAnnotationIds = /* @__PURE__ */ new Set();
932
932
  });
933
- let g = e.derived(() => e.get(n).length === 0 ? !1 : e.get(n).every((i) => {
933
+ let d = e.derived(() => e.get(n).length === 0 ? !1 : e.get(n).every((i) => {
934
934
  const l = c(i);
935
- return !l || s.visibleAnnotationIds.has(l);
935
+ return !l || a.visibleAnnotationIds.has(l);
936
936
  }));
937
- function C(i) {
938
- s.visibleAnnotationIds.has(i) ? s.visibleAnnotationIds.delete(i) : s.visibleAnnotationIds.add(i), s.visibleAnnotationIds = new Set(s.visibleAnnotationIds);
937
+ function G(i) {
938
+ a.visibleAnnotationIds.has(i) ? a.visibleAnnotationIds.delete(i) : a.visibleAnnotationIds.add(i), a.visibleAnnotationIds = new Set(a.visibleAnnotationIds);
939
939
  }
940
- function y() {
941
- if (e.get(g))
942
- s.visibleAnnotationIds = /* @__PURE__ */ new Set();
940
+ function I() {
941
+ if (e.get(d))
942
+ a.visibleAnnotationIds = /* @__PURE__ */ new Set();
943
943
  else {
944
944
  const i = /* @__PURE__ */ new Set();
945
945
  e.get(n).forEach((l) => {
946
946
  const u = c(l);
947
947
  u && i.add(u);
948
- }), s.visibleAnnotationIds = i;
948
+ }), a.visibleAnnotationIds = i;
949
949
  }
950
950
  }
951
- let b = e.derived(() => e.get(n).length ? e.get(n).map((i) => {
951
+ let v = e.derived(() => e.get(n).length ? e.get(n).map((i) => {
952
952
  let l = "", u = !1;
953
953
  if (typeof i.getBody == "function") {
954
- const T = i.getBody();
955
- if (T && T.length) {
956
- const v = (r) => {
957
- const d = r.getValue ? r.getValue() : null;
958
- return d || "";
954
+ const x = i.getBody();
955
+ if (x && x.length) {
956
+ const p = (r) => {
957
+ const g = r.getValue ? r.getValue() : null;
958
+ return g || "";
959
959
  };
960
- l = T.map((r) => v(r)).filter(Boolean).join(" "), u = T.some((r) => {
961
- const d = r.getFormat ? r.getFormat() : "";
962
- return d === "text/html" || d === "application/html";
960
+ l = x.map((r) => p(r)).filter(Boolean).join(" "), u = x.some((r) => {
961
+ const g = r.getFormat ? r.getFormat() : "";
962
+ return g === "text/html" || g === "application/html";
963
963
  });
964
964
  }
965
965
  if (!l && typeof i.getLabel == "function") {
966
- const v = i.getLabel();
967
- v && (l = v);
966
+ const p = i.getLabel();
967
+ p && (l = p);
968
968
  }
969
969
  } else {
970
- const T = (r) => r && (r.chars || r.value || r["cnt:chars"]) || "", v = (r) => r ? r.format === "text/html" || r.type === "TextualBody" : !1;
971
- if (i.resource ? Array.isArray(i.resource) ? (l = i.resource.map((r) => T(r)).join(" "), i.resource.some((r) => v(r)) && (u = !0)) : (l = T(i.resource), v(i.resource) && (u = !0)) : i.body && (Array.isArray(i.body) ? (l = i.body.map((r) => T(r)).join(" "), i.body.some((r) => v(r)) && (u = !0)) : (l = T(i.body), v(i.body) && (u = !0))), !l) {
970
+ const x = (r) => r && (r.chars || r.value || r["cnt:chars"]) || "", p = (r) => r ? r.format === "text/html" || r.type === "TextualBody" : !1;
971
+ if (i.resource ? Array.isArray(i.resource) ? (l = i.resource.map((r) => x(r)).join(" "), i.resource.some((r) => p(r)) && (u = !0)) : (l = x(i.resource), p(i.resource) && (u = !0)) : i.body && (Array.isArray(i.body) ? (l = i.body.map((r) => x(r)).join(" "), i.body.some((r) => p(r)) && (u = !0)) : (l = x(i.body), p(i.body) && (u = !0))), !l) {
972
972
  const r = i.label || i.name || i.title;
973
973
  r && (l = Array.isArray(r) ? r.join(" ") : r);
974
974
  }
@@ -980,122 +980,122 @@ function ka(a, t) {
980
980
  label: (typeof i.getLabel == "function" ? i.getLabel() : i.label) || ""
981
981
  };
982
982
  }) : []);
983
- var S = e.comment(), k = e.first_child(S);
983
+ var S = e.comment(), L = e.first_child(S);
984
984
  {
985
- var P = (i) => {
986
- var l = $a(), u = e.child(l), T = e.child(u), v = e.child(T);
987
- v.__click = (p) => {
988
- p.preventDefault(), y();
985
+ var R = (i) => {
986
+ var l = $s(), u = e.child(l), x = e.child(u), p = e.child(x);
987
+ p.__click = (b) => {
988
+ b.preventDefault(), I();
989
989
  };
990
- var r = e.child(v);
990
+ var r = e.child(p);
991
991
  {
992
- var d = (p) => {
993
- je(p, { size: 16, weight: "bold" });
994
- }, w = (p) => {
995
- Le(p, { size: 16, weight: "bold" });
992
+ var g = (b) => {
993
+ je(b, { size: 16, weight: "bold" });
994
+ }, y = (b) => {
995
+ Le(b, { size: 16, weight: "bold" });
996
996
  };
997
- e.if(r, (p) => {
998
- e.get(g) ? p(d) : p(w, !1);
997
+ e.if(r, (b) => {
998
+ e.get(d) ? b(g) : b(y, !1);
999
999
  });
1000
1000
  }
1001
- e.reset(v);
1002
- var m = e.sibling(v, 2), j = e.child(m), L = e.sibling(j), x = e.child(L, !0);
1003
- e.reset(L), e.reset(m);
1001
+ e.reset(p);
1002
+ var m = e.sibling(p, 2), E = e.child(m), k = e.sibling(E), T = e.child(k, !0);
1003
+ e.reset(k), e.reset(m);
1004
1004
  var _ = e.sibling(m, 2);
1005
- Ke(_, {
1005
+ Ye(_, {
1006
1006
  size: 16,
1007
1007
  weight: "bold",
1008
1008
  class: "group-open:rotate-180 transition-transform opacity-80"
1009
- }), e.reset(T);
1010
- var z = e.sibling(T, 2);
1009
+ }), e.reset(x);
1010
+ var C = e.sibling(x, 2);
1011
1011
  e.each(
1012
- z,
1012
+ C,
1013
1013
  21,
1014
- () => e.get(b),
1014
+ () => e.get(v),
1015
1015
  e.index,
1016
- (p, o, h) => {
1017
- const A = e.derived(() => s.visibleAnnotationIds.has(e.get(o).id));
1018
- var f = Ia();
1019
- f.__click = (H) => {
1020
- H.preventDefault(), C(e.get(o).id);
1016
+ (b, o, h) => {
1017
+ const A = e.derived(() => a.visibleAnnotationIds.has(e.get(o).id));
1018
+ var f = Is();
1019
+ f.__click = (N) => {
1020
+ N.preventDefault(), G(e.get(o).id);
1021
1021
  };
1022
- var R = e.child(f), $ = e.child(R);
1022
+ var D = e.child(f), $ = e.child(D);
1023
1023
  {
1024
- var I = (H) => {
1025
- je(H, { size: 16, weight: "bold" });
1026
- }, E = (H) => {
1027
- Le(H, { size: 16, weight: "bold" });
1024
+ var w = (N) => {
1025
+ je(N, { size: 16, weight: "bold" });
1026
+ }, j = (N) => {
1027
+ Le(N, { size: 16, weight: "bold" });
1028
1028
  };
1029
- e.if($, (H) => {
1030
- e.get(A) ? H(I) : H(E, !1);
1029
+ e.if($, (N) => {
1030
+ e.get(A) ? N(w) : N(j, !1);
1031
1031
  });
1032
1032
  }
1033
- e.reset(R);
1034
- var N = e.sibling(R, 2), V = e.child(N), B = e.child(V);
1033
+ e.reset(D);
1034
+ var H = e.sibling(D, 2), V = e.child(H), B = e.child(V);
1035
1035
  B.textContent = `#${h + 1}`;
1036
- var D = e.sibling(B, 2);
1036
+ var F = e.sibling(B, 2);
1037
1037
  {
1038
- var O = (H) => {
1039
- var X = Aa(), W = e.child(X, !0);
1040
- e.reset(X), e.template_effect(() => e.set_text(W, e.get(o).label)), e.append(H, X);
1038
+ var O = (N) => {
1039
+ var X = As(), W = e.child(X, !0);
1040
+ e.reset(X), e.template_effect(() => e.set_text(W, e.get(o).label)), e.append(N, X);
1041
1041
  };
1042
- e.if(D, (H) => {
1043
- e.get(o).label && e.get(o).label !== e.get(o).content && H(O);
1042
+ e.if(F, (N) => {
1043
+ e.get(o).label && e.get(o).label !== e.get(o).content && N(O);
1044
1044
  });
1045
1045
  }
1046
1046
  e.reset(V);
1047
1047
  var q = e.sibling(V, 2), U = e.child(q);
1048
1048
  {
1049
- var K = (H) => {
1049
+ var K = (N) => {
1050
1050
  var X = e.comment(), W = e.first_child(X);
1051
- e.html(W, () => e.get(o).content), e.append(H, X);
1052
- }, Q = (H) => {
1051
+ e.html(W, () => e.get(o).content), e.append(N, X);
1052
+ }, Q = (N) => {
1053
1053
  var X = e.text();
1054
- e.template_effect(() => e.set_text(X, e.get(o).content || "(No content)")), e.append(H, X);
1054
+ e.template_effect(() => e.set_text(X, e.get(o).content || "(No content)")), e.append(N, X);
1055
1055
  };
1056
- e.if(U, (H) => {
1057
- e.get(o).isHtml ? H(K) : H(Q, !1);
1056
+ e.if(U, (N) => {
1057
+ e.get(o).isHtml ? N(K) : N(Q, !1);
1058
1058
  });
1059
1059
  }
1060
- e.reset(q), e.reset(N), e.reset(f), e.template_effect(() => e.set_class(q, 1, `text-sm prose prose-sm max-w-none prose-p:my-0 prose-a:text-blue-500 wrap-break-word text-left ${e.get(A) ? "" : "opacity-50"}`)), e.append(p, f);
1060
+ e.reset(q), e.reset(H), e.reset(f), e.template_effect(() => e.set_class(q, 1, `text-sm prose prose-sm max-w-none prose-p:my-0 prose-a:text-blue-500 wrap-break-word text-left ${e.get(A) ? "" : "opacity-50"}`)), e.append(b, f);
1061
1061
  },
1062
- (p) => {
1063
- var o = Ta();
1064
- e.append(p, o);
1062
+ (b) => {
1063
+ var o = Ts();
1064
+ e.append(b, o);
1065
1065
  }
1066
- ), e.reset(z), e.reset(u), e.reset(l), e.template_effect(
1067
- (p, o, h) => {
1068
- e.set_attribute(v, "title", p), e.set_text(j, `${o ?? ""} `), e.set_text(x, h);
1066
+ ), e.reset(C), e.reset(u), e.reset(l), e.template_effect(
1067
+ (b, o, h) => {
1068
+ e.set_class(l, 1, `absolute top-4 z-500 pointer-events-auto transition-all duration-300 ${a.showSearchPanel ? a.showThumbnailGallery && a.isGalleryDockedRight ? "right-[536px]" : "right-[336px]" : a.showThumbnailGallery && a.isGalleryDockedRight ? "right-[216px]" : "right-4"}`), e.set_attribute(p, "title", b), e.set_text(E, `${o ?? ""} `), e.set_text(T, h);
1069
1069
  },
1070
1070
  [
1071
- () => e.get(g) ? /* @__PURE__ */ ze() : /* @__PURE__ */ Re(),
1072
- () => /* @__PURE__ */ Fe({ count: e.get(n).length }),
1073
- () => /* @__PURE__ */ De({ count: s.visibleAnnotationIds.size })
1071
+ () => e.get(d) ? P.hide_all_annotations() : P.show_all_annotations(),
1072
+ () => P.annotations_count({ count: e.get(n).length }),
1073
+ () => P.visible_count({ count: a.visibleAnnotationIds.size })
1074
1074
  ]
1075
1075
  ), e.append(i, l);
1076
1076
  };
1077
- e.if(k, (i) => {
1078
- s.showAnnotations && i(P);
1077
+ e.if(L, (i) => {
1078
+ a.showAnnotations && i(R);
1079
1079
  });
1080
1080
  }
1081
- e.append(a, S), e.pop();
1081
+ e.append(s, S), e.pop();
1082
1082
  }
1083
1083
  e.delegate(["click"]);
1084
- var Ca = e.from_html('<img class="object-contain w-full h-full" loading="lazy"/>'), ja = e.from_html('<span class="opacity-20 text-4xl">?</span>'), La = e.from_html('<button><div class="aspect-4/3 bg-base-300 rounded overflow-hidden relative w-full flex items-center justify-center"><!></div> <div class="text-xs font-medium truncate w-full opacity-70 group-hover:opacity-100"><span class="font-bold mr-1"> </span> </div></button>'), Ma = e.from_html('<div class="absolute bottom-0 right-0 w-6 h-6 cursor-se-resize resize-handle bg-accent hover:bg-accent-focus transition-colors z-50" style="clip-path: polygon(100% 0, 0 100%, 100% 100%);" role="button" tabindex="0" aria-label="Resize"></div>'), Ea = e.from_html('<div role="group"><span class="font-bold text-primary opacity-50">Dock Top</span></div> <div role="group"><span class="font-bold text-primary opacity-50">Dock Bottom</span></div> <div role="group"><span class="font-bold text-primary opacity-50 vertical-rl rotate-180" style="writing-mode: vertical-rl;">Dock Left</span></div> <div role="group"><span class="font-bold text-primary opacity-50 vertical-rl rotate-180" style="writing-mode: vertical-rl;">Dock Right</span></div>', 1), Ga = e.from_html('<div><button class="absolute top-1 right-1 btn btn-error btn-xs btn-circle z-20" aria-label="Close Gallery"><!></button> <div><div role="button" tabindex="0" aria-label="Drag Gallery"><div></div></div></div> <div><div></div></div> <!></div> <!>', 1);
1085
- function Pa(a, t) {
1084
+ var Cs = e.from_html('<img class="object-contain w-full h-full" loading="lazy"/>'), js = e.from_html('<span class="opacity-20 text-4xl">?</span>'), Ls = e.from_html('<button><div class="aspect-4/3 bg-base-300 rounded overflow-hidden relative w-full flex items-center justify-center"><!></div> <div class="text-xs font-medium truncate w-full opacity-70 group-hover:opacity-100"><span class="font-bold mr-1"> </span> </div></button>'), Ms = e.from_html('<div class="absolute bottom-0 right-0 w-6 h-6 cursor-se-resize resize-handle bg-accent hover:bg-accent-focus transition-colors z-50" style="clip-path: polygon(100% 0, 0 100%, 100% 100%);" role="button" tabindex="0" aria-label="Resize"></div>'), Gs = e.from_html('<div role="group"><span class="font-bold text-primary opacity-50">Dock Top</span></div> <div role="group"><span class="font-bold text-primary opacity-50">Dock Bottom</span></div> <div role="group"><span class="font-bold text-primary opacity-50 vertical-rl rotate-180" style="writing-mode: vertical-rl;">Dock Left</span></div> <div role="group"><span class="font-bold text-primary opacity-50 vertical-rl rotate-180" style="writing-mode: vertical-rl;">Dock Right</span></div>', 1), Es = e.from_html('<div><button class="absolute top-1 right-1 btn btn-error btn-xs btn-circle z-20" aria-label="Close Gallery"><!></button> <div><div role="button" tabindex="0" aria-label="Drag Gallery"><div></div></div></div> <div><div></div></div> <!></div> <!>', 1);
1085
+ function Rs(s, t) {
1086
1086
  e.push(t, !0);
1087
- const s = xe(ae);
1088
- let n = e.state(e.proxy({ x: 20, y: 100 })), c = e.state(e.proxy({ width: 300, height: 400 })), g = e.state(!1), C = e.state(!1), y = { x: 0, y: 0 }, b = { x: 0, y: 0, w: 0, h: 0 }, S = e.state(void 0), k = e.derived(() => t.canvases ? t.canvases.map((_, z) => {
1089
- let p = "";
1087
+ const a = xe(se);
1088
+ let n = e.state(e.proxy({ x: 20, y: 100 })), c = e.state(e.proxy({ width: 300, height: 400 })), d = e.state(!1), G = e.state(!1), I = { x: 0, y: 0 }, v = { x: 0, y: 0, w: 0, h: 0 }, S = e.state(void 0), L = e.derived(() => t.canvases ? t.canvases.map((_, C) => {
1089
+ let b = "";
1090
1090
  try {
1091
1091
  if (_.getThumbnail) {
1092
1092
  const o = _.getThumbnail();
1093
- o && (p = typeof o == "string" ? o : o.id || o["@id"]);
1093
+ o && (b = typeof o == "string" ? o : o.id || o["@id"]);
1094
1094
  }
1095
1095
  } catch (o) {
1096
1096
  console.warn("Error getting thumbnail", o);
1097
1097
  }
1098
- if (!p) {
1098
+ if (!b) {
1099
1099
  let o = _.getImages();
1100
1100
  if ((!o || !o.length) && _.getContent && (o = _.getContent()), o && o.length > 0) {
1101
1101
  const h = o[0];
@@ -1109,32 +1109,32 @@ function Pa(a, t) {
1109
1109
  f.body && (A = Array.isArray(f.body) ? f.body[0] : f.body);
1110
1110
  }
1111
1111
  if (A) {
1112
- const R = (() => {
1113
- let I = [];
1114
- if (A.getServices && (I = A.getServices()), !I || I.length === 0) {
1115
- const E = A.__jsonld || A;
1116
- E.service && (I = Array.isArray(E.service) ? E.service : [E.service]);
1112
+ const D = (() => {
1113
+ let w = [];
1114
+ if (A.getServices && (w = A.getServices()), !w || w.length === 0) {
1115
+ const j = A.__jsonld || A;
1116
+ j.service && (w = Array.isArray(j.service) ? j.service : [j.service]);
1117
1117
  }
1118
- return I;
1118
+ return w;
1119
1119
  })();
1120
1120
  let $ = !1;
1121
- if (R.length > 0) {
1122
- const I = R[0];
1123
- let E = "";
1121
+ if (D.length > 0) {
1122
+ const w = D[0];
1123
+ let j = "";
1124
1124
  try {
1125
- E = I.getProfile ? I.getProfile() : I.profile || "", typeof E == "object" && E !== null && (E = E.value || E.id || E["@id"] || JSON.stringify(E));
1125
+ j = w.getProfile ? w.getProfile() : w.profile || "", typeof j == "object" && j !== null && (j = j.value || j.id || j["@id"] || JSON.stringify(j));
1126
1126
  } catch {
1127
1127
  }
1128
- const N = String(E).toLowerCase();
1129
- (N.includes("level0") || N.includes("level-0")) && ($ = !0);
1130
- const V = I.id || I["@id"];
1131
- $ || (p = `${V}/full/200,/0/default.jpg`);
1128
+ const H = String(j).toLowerCase();
1129
+ (H.includes("level0") || H.includes("level-0")) && ($ = !0);
1130
+ const V = w.id || w["@id"];
1131
+ $ || (b = `${V}/full/200,/0/default.jpg`);
1132
1132
  }
1133
- if (!p && (p = A.id || A["@id"], !p)) {
1134
- let I = null;
1135
- if (h.__jsonld && h.__jsonld.body ? I = h.__jsonld.body : h.body && (I = h.body), I) {
1136
- const E = Array.isArray(I) ? I[0] : I;
1137
- p = E.id || E["@id"];
1133
+ if (!b && (b = A.id || A["@id"], !b)) {
1134
+ let w = null;
1135
+ if (h.__jsonld && h.__jsonld.body ? w = h.__jsonld.body : h.body && (w = h.body), w) {
1136
+ const j = Array.isArray(w) ? w[0] : w;
1137
+ b = j.id || j["@id"];
1138
1138
  }
1139
1139
  }
1140
1140
  }
@@ -1142,54 +1142,54 @@ function Pa(a, t) {
1142
1142
  }
1143
1143
  return {
1144
1144
  id: _.id,
1145
- label: _.getLabel().length ? _.getLabel()[0].value : `Canvas ${z + 1}`,
1146
- src: p,
1147
- index: z
1145
+ label: _.getLabel().length ? _.getLabel()[0].value : `Canvas ${C + 1}`,
1146
+ src: b,
1147
+ index: C
1148
1148
  };
1149
1149
  }) : []);
1150
- function P(_) {
1151
- if (!e.get(g)) return;
1152
- let z = _.clientX - y.x, p = _.clientY - y.y;
1150
+ function R(_) {
1151
+ if (!e.get(d)) return;
1152
+ let C = _.clientX - I.x, b = _.clientY - I.y;
1153
1153
  if (e.get(S) && e.get(S).parentElement) {
1154
1154
  const o = e.get(S).parentElement, h = Math.max(0, o.clientWidth - e.get(c).width), A = Math.max(0, o.clientHeight - e.get(c).height);
1155
- z = Math.max(0, Math.min(z, h)), p = Math.max(0, Math.min(p, A));
1155
+ C = Math.max(0, Math.min(C, h)), b = Math.max(0, Math.min(b, A));
1156
1156
  }
1157
- e.get(n).x = z, e.get(n).y = p;
1157
+ e.get(n).x = C, e.get(n).y = b;
1158
1158
  }
1159
1159
  function i() {
1160
- const _ = e.get(d);
1161
- e.set(g, !1), e.set(d, null), window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", i), _ && e.set(r, _, !0);
1160
+ const _ = e.get(g);
1161
+ e.set(d, !1), e.set(g, null), window.removeEventListener("mousemove", R), window.removeEventListener("mouseup", i), _ && e.set(r, _, !0);
1162
1162
  }
1163
1163
  function l(_) {
1164
- _.stopPropagation(), e.set(C, !0), b = {
1164
+ _.stopPropagation(), e.set(G, !0), v = {
1165
1165
  x: _.clientX,
1166
1166
  y: _.clientY,
1167
1167
  w: e.get(c).width,
1168
1168
  h: e.get(c).height
1169
- }, window.addEventListener("mousemove", u), window.addEventListener("mouseup", T);
1169
+ }, window.addEventListener("mousemove", u), window.addEventListener("mouseup", x);
1170
1170
  }
1171
1171
  function u(_) {
1172
- if (!e.get(C)) return;
1173
- const z = _.clientX - b.x, p = _.clientY - b.y;
1174
- e.get(c).width = Math.max(200, b.w + z), e.get(c).height = Math.max(200, b.h + p);
1172
+ if (!e.get(G)) return;
1173
+ const C = _.clientX - v.x, b = _.clientY - v.y;
1174
+ e.get(c).width = Math.max(200, v.w + C), e.get(c).height = Math.max(200, v.h + b);
1175
1175
  }
1176
- function T() {
1177
- e.set(C, !1), window.removeEventListener("mousemove", u), window.removeEventListener("mouseup", T);
1176
+ function x() {
1177
+ e.set(G, !1), window.removeEventListener("mousemove", u), window.removeEventListener("mouseup", x);
1178
1178
  }
1179
- function v(_) {
1180
- s.canvasId = _;
1179
+ function p(_) {
1180
+ a.canvasId = _;
1181
1181
  }
1182
- let r = e.state("bottom"), d = e.state(null);
1182
+ let r = e.state("bottom"), g = e.state(null);
1183
1183
  e.user_effect(() => {
1184
- s.dockSide = e.get(r), s.isGalleryDockedBottom = e.get(r) === "bottom", s.isGalleryDockedRight = e.get(r) === "right";
1184
+ a.dockSide = e.get(r), a.isGalleryDockedBottom = e.get(r) === "bottom", a.isGalleryDockedRight = e.get(r) === "right";
1185
1185
  });
1186
- let w = e.derived(() => e.get(r) === "top" || e.get(r) === "bottom" || e.get(r) === "none" && e.get(c).height < 320);
1186
+ let y = e.derived(() => e.get(r) === "top" || e.get(r) === "bottom" || e.get(r) === "none" && e.get(c).height < 320);
1187
1187
  function m(_) {
1188
- var z, p;
1188
+ var C, b;
1189
1189
  if (!_.target.closest(".resize-handle")) {
1190
1190
  if (e.get(r) !== "none") {
1191
1191
  e.set(r, "none");
1192
- const o = ((p = (z = e.get(S)) == null ? void 0 : z.parentElement) == null ? void 0 : p.getBoundingClientRect()) || { left: 0, top: 0 };
1192
+ const o = ((b = (C = e.get(S)) == null ? void 0 : C.parentElement) == null ? void 0 : b.getBoundingClientRect()) || { left: 0, top: 0 };
1193
1193
  e.set(c, { width: 300, height: 400 }, !0), e.set(
1194
1194
  n,
1195
1195
  {
@@ -1201,40 +1201,40 @@ function Pa(a, t) {
1201
1201
  !0
1202
1202
  );
1203
1203
  }
1204
- e.set(g, !0), y = {
1204
+ e.set(d, !0), I = {
1205
1205
  x: _.clientX - e.get(n).x,
1206
1206
  y: _.clientY - e.get(n).y
1207
- }, window.addEventListener("mousemove", P), window.addEventListener("mouseup", i);
1207
+ }, window.addEventListener("mousemove", R), window.addEventListener("mouseup", i);
1208
1208
  }
1209
1209
  }
1210
- var j = e.comment(), L = e.first_child(j);
1210
+ var E = e.comment(), k = e.first_child(E);
1211
1211
  {
1212
- var x = (_) => {
1213
- var z = Ga(), p = e.first_child(z), o = e.child(p);
1214
- o.__click = () => s.toggleThumbnailGallery();
1212
+ var T = (_) => {
1213
+ var C = Es(), b = e.first_child(C), o = e.child(b);
1214
+ o.__click = () => a.toggleThumbnailGallery();
1215
1215
  var h = e.child(o);
1216
- We(h, { size: 16, weight: "bold" }), e.reset(o);
1216
+ Xe(h, { size: 16, weight: "bold" }), e.reset(o);
1217
1217
  var A = e.sibling(o, 2), f = e.child(A);
1218
1218
  f.__mousedown = m;
1219
- var R = e.child(f);
1219
+ var D = e.child(f);
1220
1220
  e.reset(f), e.reset(A);
1221
- var $ = e.sibling(A, 2), I = e.child($);
1222
- e.each(I, 21, () => e.get(k), e.index, (D, O) => {
1223
- var q = La();
1224
- q.__click = () => v(e.get(O).id);
1221
+ var $ = e.sibling(A, 2), w = e.child($);
1222
+ e.each(w, 21, () => e.get(L), e.index, (F, O) => {
1223
+ var q = Ls();
1224
+ q.__click = () => p(e.get(O).id);
1225
1225
  var U = e.child(q), K = e.child(U);
1226
1226
  {
1227
1227
  var Q = (J) => {
1228
- var Z = Ca();
1228
+ var Z = Cs();
1229
1229
  e.template_effect(() => {
1230
1230
  e.set_attribute(Z, "src", e.get(O).src), e.set_attribute(Z, "alt", e.get(O).label);
1231
1231
  }), e.append(J, Z);
1232
- }, H = (J) => {
1233
- var Z = ja();
1232
+ }, N = (J) => {
1233
+ var Z = js();
1234
1234
  e.append(J, Z);
1235
1235
  };
1236
1236
  e.if(K, (J) => {
1237
- e.get(O).src ? J(Q) : J(H, !1);
1237
+ e.get(O).src ? J(Q) : J(N, !1);
1238
1238
  });
1239
1239
  }
1240
1240
  e.reset(U);
@@ -1242,302 +1242,305 @@ function Pa(a, t) {
1242
1242
  e.reset(W);
1243
1243
  var Se = e.sibling(W);
1244
1244
  e.reset(X), e.reset(q), e.template_effect(() => {
1245
- e.set_class(q, 1, `group flex flex-col gap-1 p-1 rounded hover:bg-base-200 transition-colors text-left relative shrink-0 ${e.get(w) ? "w-[140px]" : ""} ${s.canvasId === e.get(O).id ? "ring-2 ring-primary bg-primary/5" : ""}`), e.set_attribute(q, "aria-label", `Select canvas ${e.get(O).label ?? ""}`), e.set_text(we, `${e.get(O).index + 1}.`), e.set_text(Se, ` ${e.get(O).label ?? ""}`);
1246
- }), e.append(D, q);
1247
- }), e.reset(I), e.reset($);
1248
- var E = e.sibling($, 2);
1245
+ e.set_class(q, 1, `group flex flex-col gap-1 p-1 rounded hover:bg-base-200 transition-colors text-left relative shrink-0 ${e.get(y) ? "w-[140px]" : ""} ${a.canvasId === e.get(O).id ? "ring-2 ring-primary bg-primary/5" : ""}`), e.set_attribute(q, "aria-label", `Select canvas ${e.get(O).label ?? ""}`), e.set_text(we, `${e.get(O).index + 1}.`), e.set_text(Se, ` ${e.get(O).label ?? ""}`);
1246
+ }), e.append(F, q);
1247
+ }), e.reset(w), e.reset($);
1248
+ var j = e.sibling($, 2);
1249
1249
  {
1250
- var N = (D) => {
1251
- var O = Ma();
1252
- O.__mousedown = l, e.append(D, O);
1250
+ var H = (F) => {
1251
+ var O = Ms();
1252
+ O.__mousedown = l, e.append(F, O);
1253
1253
  };
1254
- e.if(E, (D) => {
1255
- e.get(r) === "none" && D(N);
1254
+ e.if(j, (F) => {
1255
+ e.get(r) === "none" && F(H);
1256
1256
  });
1257
1257
  }
1258
- e.reset(p), e.bind_this(p, (D) => e.set(S, D), () => e.get(S));
1259
- var V = e.sibling(p, 2);
1258
+ e.reset(b), e.bind_this(b, (F) => e.set(S, F), () => e.get(S));
1259
+ var V = e.sibling(b, 2);
1260
1260
  {
1261
- var B = (D) => {
1262
- var O = Ea(), q = e.first_child(O), U = e.sibling(q, 2), K = e.sibling(U, 2), Q = e.sibling(K, 2);
1261
+ var B = (F) => {
1262
+ var O = Gs(), q = e.first_child(O), U = e.sibling(q, 2), K = e.sibling(U, 2), Q = e.sibling(K, 2);
1263
1263
  e.template_effect(() => {
1264
- e.set_class(q, 1, `absolute top-2 left-2 right-2 h-16 rounded-xl border-4 border-dashed border-primary/40 z-950 flex items-center justify-center transition-all duration-200 ${e.get(d) === "top" ? "bg-primary/20 scale-105" : "bg-base-100/50"}`), e.set_class(U, 1, `absolute bottom-2 left-2 right-2 h-16 rounded-xl border-4 border-dashed border-primary/40 z-950 flex items-center justify-center transition-all duration-200 ${e.get(d) === "bottom" ? "bg-primary/20 scale-105" : "bg-base-100/50"}`), e.set_class(K, 1, `absolute top-2 bottom-2 left-2 w-16 rounded-xl border-4 border-dashed border-primary/40 z-950 flex items-center justify-center transition-all duration-200 ${e.get(d) === "left" ? "bg-primary/20 scale-105" : "bg-base-100/50"}`), e.set_class(Q, 1, `absolute top-2 bottom-2 w-16 rounded-xl border-4 border-dashed border-primary/40 z-950 flex items-center justify-center transition-all duration-300 ${s.showSearchPanel ? "right-[328px]" : "right-2"} ${e.get(d) === "right" ? "bg-primary/20 scale-105" : "bg-base-100/50"}`);
1265
- }), e.event("mouseenter", q, () => e.set(d, "top")), e.event("mouseleave", q, () => e.set(d, null)), e.event("mouseenter", U, () => e.set(d, "bottom")), e.event("mouseleave", U, () => e.set(d, null)), e.event("mouseenter", K, () => e.set(d, "left")), e.event("mouseleave", K, () => e.set(d, null)), e.event("mouseenter", Q, () => e.set(d, "right")), e.event("mouseleave", Q, () => e.set(d, null)), e.append(D, O);
1264
+ e.set_class(q, 1, `absolute top-2 left-2 right-2 h-16 rounded-xl border-4 border-dashed border-primary/40 z-950 flex items-center justify-center transition-all duration-200 ${e.get(g) === "top" ? "bg-primary/20 scale-105" : "bg-base-100/50"}`), e.set_class(U, 1, `absolute bottom-2 left-2 right-2 h-16 rounded-xl border-4 border-dashed border-primary/40 z-950 flex items-center justify-center transition-all duration-200 ${e.get(g) === "bottom" ? "bg-primary/20 scale-105" : "bg-base-100/50"}`), e.set_class(K, 1, `absolute top-2 bottom-2 left-2 w-16 rounded-xl border-4 border-dashed border-primary/40 z-950 flex items-center justify-center transition-all duration-200 ${e.get(g) === "left" ? "bg-primary/20 scale-105" : "bg-base-100/50"}`), e.set_class(Q, 1, `absolute top-2 bottom-2 w-16 rounded-xl border-4 border-dashed border-primary/40 z-950 flex items-center justify-center transition-all duration-300 ${a.showSearchPanel ? "right-[328px]" : "right-2"} ${e.get(g) === "right" ? "bg-primary/20 scale-105" : "bg-base-100/50"}`);
1265
+ }), e.event("mouseenter", q, () => e.set(g, "top")), e.event("mouseleave", q, () => e.set(g, null)), e.event("mouseenter", U, () => e.set(g, "bottom")), e.event("mouseleave", U, () => e.set(g, null)), e.event("mouseenter", K, () => e.set(g, "left")), e.event("mouseleave", K, () => e.set(g, null)), e.event("mouseenter", Q, () => e.set(g, "right")), e.event("mouseleave", Q, () => e.set(g, null)), e.append(F, O);
1266
1266
  };
1267
- e.if(V, (D) => {
1268
- e.get(g) && D(B);
1267
+ e.if(V, (F) => {
1268
+ e.get(d) && F(B);
1269
1269
  });
1270
1270
  }
1271
1271
  e.template_effect(() => {
1272
- e.set_class(p, 1, (e.get(r) !== "none" ? `absolute z-900 bg-base-100 shadow-xl border-base-300 flex transition-all duration-200
1272
+ e.set_class(b, 1, (e.get(r) !== "none" ? `absolute z-900 bg-base-100 shadow-xl border-base-300 flex transition-all duration-200
1273
1273
  ${e.get(r) === "bottom" ? "flex-row bottom-0 left-0 right-0 h-[140px] border-t" : ""}
1274
1274
  ${e.get(r) === "top" ? "flex-row top-0 left-0 right-0 h-[140px] border-b" : ""}
1275
1275
  ${e.get(r) === "left" ? "flex-col left-0 top-0 bottom-0 w-[200px] border-r" : ""}
1276
- ${e.get(r) === "right" ? `flex-col top-0 bottom-0 w-[200px] border-l ${s.showSearchPanel ? "right-80" : "right-0"}` : ""}` : "absolute z-900 bg-base-100 shadow-2xl rounded-lg flex flex-col border border-base-300 overflow-hidden") + (e.get(g) ? " pointer-events-none opacity-80" : "")), e.set_style(p, e.get(r) !== "none" ? "" : `left: ${e.get(n).x}px; top: ${e.get(n).y}px; width: ${e.get(c).width}px; height: ${e.get(c).height}px;`), e.set_class(A, 1, "bg-base-100 flex shrink-0 select-none relative " + (e.get(r) === "bottom" || e.get(r) === "top" ? "flex-row h-full items-center border-r border-base-200" : "flex-col w-full border-b border-base-200")), e.set_class(f, 1, "cursor-move flex items-center justify-center hover:bg-base-200/50 active:bg-base-200 transition-colors " + (e.get(r) === "bottom" || e.get(r) === "top" ? "w-8 h-full" : "h-6 w-full")), e.set_class(R, 1, "bg-base-300 rounded-full " + (e.get(r) === "bottom" || e.get(r) === "top" ? "w-1.5 h-12" : "w-12 h-1.5")), e.set_class($, 1, `flex-1 p-1 bg-base-100 ${e.get(w) ? "overflow-x-auto overflow-y-hidden" : "overflow-y-auto overflow-x-hidden"}`), e.set_class(I, 1, e.clsx(e.get(w) ? "flex flex-row gap-2 h-full items-center" : "grid gap-2")), e.set_style(I, e.get(w) ? "" : "grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));");
1277
- }), e.append(_, z);
1276
+ ${e.get(r) === "right" ? `flex-col top-0 bottom-0 w-[200px] border-l ${a.showSearchPanel ? "right-80" : "right-0"}` : ""}` : "absolute z-900 bg-base-100 shadow-2xl rounded-lg flex flex-col border border-base-300 overflow-hidden") + (e.get(d) ? " pointer-events-none opacity-80" : "")), e.set_style(b, e.get(r) !== "none" ? "" : `left: ${e.get(n).x}px; top: ${e.get(n).y}px; width: ${e.get(c).width}px; height: ${e.get(c).height}px;`), e.set_class(A, 1, "bg-base-100 flex shrink-0 select-none relative " + (e.get(r) === "bottom" || e.get(r) === "top" ? "flex-row h-full items-center border-r border-base-200" : "flex-col w-full border-b border-base-200")), e.set_class(f, 1, "cursor-move flex items-center justify-center hover:bg-base-200/50 active:bg-base-200 transition-colors " + (e.get(r) === "bottom" || e.get(r) === "top" ? "w-8 h-full" : "h-6 w-full")), e.set_class(D, 1, "bg-base-300 rounded-full " + (e.get(r) === "bottom" || e.get(r) === "top" ? "w-1.5 h-12" : "w-12 h-1.5")), e.set_class($, 1, `flex-1 p-1 bg-base-100 ${e.get(y) ? "overflow-x-auto overflow-y-hidden" : "overflow-y-auto overflow-x-hidden"}`), e.set_class(w, 1, e.clsx(e.get(y) ? "flex flex-row gap-2 h-full items-center" : "grid gap-2")), e.set_style(w, e.get(y) ? "" : "grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));");
1277
+ }), e.append(_, C);
1278
1278
  };
1279
- e.if(L, (_) => {
1280
- s.showThumbnailGallery && _(x);
1279
+ e.if(k, (_) => {
1280
+ a.showThumbnailGallery && _(T);
1281
1281
  });
1282
1282
  }
1283
- e.append(a, j), e.pop();
1283
+ e.append(s, E), e.pop();
1284
1284
  }
1285
1285
  e.delegate(["click", "mousedown"]);
1286
- var za = e.from_html('<div><div tabindex="0" role="button" class="btn btn-lg btn-primary btn-circle shadow-xl"><!></div> <div class="fab-close tooltip tooltip-top"><button><!></button></div> <div class="tooltip tooltip-left"><button><!></button></div> <div class="tooltip tooltip-left"><button><!></button></div> <div class="tooltip tooltip-top"><button><!></button></div> <div class="tooltip tooltip-top"><button><!></button></div></div>');
1287
- function Ra(a, t) {
1286
+ var Ps = e.from_html('<div><div tabindex="0" role="button" class="btn btn-lg btn-primary btn-circle shadow-xl"><span class="sr-only"> </span> <!></div> <div class="fab-close tooltip tooltip-top"><button><!></button></div> <div class="tooltip tooltip-left"><button><!></button></div> <div class="tooltip tooltip-left"><button><!></button></div> <div class="tooltip tooltip-top"><button><!></button></div> <div class="tooltip tooltip-top"><button><!></button></div></div>');
1287
+ function zs(s, t) {
1288
1288
  e.push(t, !1);
1289
- const s = xe(ae);
1289
+ const a = xe(se);
1290
1290
  e.init();
1291
- var n = za(), c = e.child(n), g = e.child(c);
1292
- st(g, { size: 32, weight: "bold" }), e.reset(c);
1293
- var C = e.sibling(c, 2), y = e.child(C);
1294
- y.__click = () => s.toggleSearchPanel();
1295
- var b = e.child(y);
1296
- Ge(b, { size: 28, weight: "bold" }), e.reset(y), e.reset(C);
1297
- var S = e.sibling(C, 2), k = e.child(S);
1298
- k.__click = () => s.toggleThumbnailGallery();
1299
- var P = e.child(k);
1300
- at(P, { size: 28, weight: "bold" }), e.reset(k), e.reset(S);
1301
- var i = e.sibling(S, 2), l = e.child(i);
1302
- l.__click = () => s.toggleFullScreen();
1303
- var u = e.child(l);
1291
+ var n = Ps(), c = e.child(n), d = e.child(c), G = e.child(d, !0);
1292
+ e.reset(d);
1293
+ var I = e.sibling(d, 2);
1294
+ Je(I, { size: 32, weight: "bold" }), e.reset(c);
1295
+ var v = e.sibling(c, 2), S = e.child(v);
1296
+ S.__click = () => a.toggleSearchPanel();
1297
+ var L = e.child(S);
1298
+ Ee(L, { size: 28, weight: "bold" }), e.reset(S), e.reset(v);
1299
+ var R = e.sibling(v, 2), i = e.child(R);
1300
+ i.__click = () => a.toggleThumbnailGallery();
1301
+ var l = e.child(i);
1302
+ Ze(l, { size: 28, weight: "bold" }), e.reset(i), e.reset(R);
1303
+ var u = e.sibling(R, 2), x = e.child(u);
1304
+ x.__click = () => a.toggleFullScreen();
1305
+ var p = e.child(x);
1304
1306
  {
1305
- var T = (x) => {
1306
- Ze(x, { size: 28, weight: "bold" });
1307
- }, v = (x) => {
1308
- et(x, { size: 28, weight: "bold" });
1307
+ var r = (C) => {
1308
+ Ue(C, { size: 28, weight: "bold" });
1309
+ }, g = (C) => {
1310
+ Ke(C, { size: 28, weight: "bold" });
1309
1311
  };
1310
- e.if(u, (x) => {
1311
- s.isFullScreen ? x(T) : x(v, !1);
1312
+ e.if(p, (C) => {
1313
+ a.isFullScreen ? C(r) : C(g, !1);
1312
1314
  });
1313
1315
  }
1314
- e.reset(l), e.reset(i);
1315
- var r = e.sibling(i, 2), d = e.child(r);
1316
- d.__click = () => s.toggleAnnotations();
1317
- var w = e.child(d);
1318
- Je(w, { size: 28, weight: "bold" }), e.reset(d), e.reset(r);
1319
- var m = e.sibling(r, 2), j = e.child(m);
1320
- j.__click = () => s.toggleMetadataDialog();
1321
- var L = e.child(j);
1322
- tt(L, { size: 28, weight: "bold" }), e.reset(j), e.reset(m), e.reset(n), e.template_effect(
1323
- (x, _, z, p, o, h, A, f, R, $) => {
1324
- e.set_class(n, 1, `fab fab-flower fab-top-left absolute z-600 pointer-events-auto flex-col items-end transition-all duration-300 ${s.showSearchPanel ? s.showThumbnailGallery && s.isGalleryDockedRight ? "right-[540px]" : "right-[344px]" : s.showThumbnailGallery && s.isGalleryDockedRight ? "right-[220px]" : "right-6"} ${s.showThumbnailGallery && s.dockSide === "bottom" ? "bottom-40" : "bottom-6"}`), e.set_attribute(n, "data-tip", x), e.set_attribute(C, "data-tip", _), e.set_attribute(y, "aria-label", z), e.set_class(y, 1, e.clsx([
1316
+ e.reset(x), e.reset(u);
1317
+ var y = e.sibling(u, 2), m = e.child(y);
1318
+ m.__click = () => a.toggleAnnotations();
1319
+ var E = e.child(m);
1320
+ Qe(E, { size: 28, weight: "bold" }), e.reset(m), e.reset(y);
1321
+ var k = e.sibling(y, 2), T = e.child(k);
1322
+ T.__click = () => a.toggleMetadataDialog();
1323
+ var _ = e.child(T);
1324
+ We(_, { size: 28, weight: "bold" }), e.reset(T), e.reset(k), e.reset(n), e.template_effect(
1325
+ (C, b, o, h, A, f, D, $, w, j, H) => {
1326
+ e.set_class(n, 1, `fab fab-flower fab-top-left absolute z-600 pointer-events-auto flex-col items-end transition-all duration-300 ${a.showSearchPanel ? a.showThumbnailGallery && a.isGalleryDockedRight ? "right-[540px]" : "right-[344px]" : a.showThumbnailGallery && a.isGalleryDockedRight ? "right-[220px]" : "right-6"} ${a.showThumbnailGallery && a.dockSide === "bottom" ? "bottom-40" : "bottom-6"}`), e.set_attribute(n, "data-tip", C), e.set_text(G, b), e.set_attribute(v, "data-tip", o), e.set_attribute(S, "aria-label", h), e.set_class(S, 1, e.clsx([
1325
1327
  "btn btn-circle btn-lg shadow-lg",
1326
- s.showSearchPanel && "btn-primary",
1327
- !s.showSearchPanel && "btn-neutral"
1328
- ])), e.set_attribute(S, "data-tip", p), e.set_attribute(k, "aria-label", o), e.set_class(k, 1, `btn btn-lg btn-circle shadow-lg ${s.showThumbnailGallery ? "btn-info" : "btn-neutral"}`), e.set_attribute(i, "data-tip", h), e.set_class(l, 1, `btn btn-circle btn-lg shadow-lg transition-all duration-300 ease-out ${s.isFullScreen ? "btn-warning" : "btn-neutral"}`), e.set_attribute(r, "data-tip", A), e.set_attribute(d, "aria-label", f), e.set_class(d, 1, `btn btn-lg btn-circle shadow-lg ${s.showAnnotations ? "btn-error" : "btn-neutral"}`), e.set_attribute(m, "data-tip", R), e.set_attribute(j, "aria-label", $), e.set_class(j, 1, `btn btn-lg btn-circle shadow-lg ${s.showMetadataDialog ? "btn-info" : "btn-neutral"}`);
1328
+ a.showSearchPanel && "btn-primary",
1329
+ !a.showSearchPanel && "btn-neutral"
1330
+ ])), e.set_attribute(R, "data-tip", A), e.set_attribute(i, "aria-label", f), e.set_class(i, 1, `btn btn-lg btn-circle shadow-lg ${a.showThumbnailGallery ? "btn-info" : "btn-neutral"}`), e.set_attribute(u, "data-tip", D), e.set_class(x, 1, `btn btn-circle btn-lg shadow-lg transition-all duration-300 ease-out ${a.isFullScreen ? "btn-warning" : "btn-neutral"}`), e.set_attribute(y, "data-tip", $), e.set_attribute(m, "aria-label", w), e.set_class(m, 1, `btn btn-lg btn-circle shadow-lg ${a.showAnnotations ? "btn-error" : "btn-neutral"}`), e.set_attribute(k, "data-tip", j), e.set_attribute(T, "aria-label", H), e.set_class(T, 1, `btn btn-lg btn-circle shadow-lg ${a.showMetadataDialog ? "btn-info" : "btn-neutral"}`);
1329
1331
  },
1330
1332
  [
1331
- () => F.menu(),
1332
- () => F.search(),
1333
- () => F.toggle_search(),
1334
- () => s.showThumbnailGallery ? F.hide_gallery() : F.show_gallery(),
1335
- () => s.showThumbnailGallery ? F.hide_gallery() : F.show_gallery(),
1336
- () => s.isFullScreen ? F.exit_full_screen() : F.enter_full_screen(),
1337
- () => s.showAnnotations ? F.hide_annotations() : F.show_annotations(),
1338
- () => F.toggle_annotations(),
1339
- () => F.metadata(),
1340
- () => F.toggle_metadata()
1333
+ () => P.menu(),
1334
+ () => P.menu(),
1335
+ () => P.search(),
1336
+ () => P.toggle_search(),
1337
+ () => a.showThumbnailGallery ? P.hide_gallery() : P.show_gallery(),
1338
+ () => a.showThumbnailGallery ? P.hide_gallery() : P.show_gallery(),
1339
+ () => a.isFullScreen ? P.exit_full_screen() : P.enter_full_screen(),
1340
+ () => a.showAnnotations ? P.hide_annotations() : P.show_annotations(),
1341
+ () => P.toggle_annotations(),
1342
+ () => P.metadata(),
1343
+ () => P.toggle_metadata()
1341
1344
  ]
1342
- ), e.append(a, n), e.pop();
1345
+ ), e.append(s, n), e.pop();
1343
1346
  }
1344
1347
  e.delegate(["click"]);
1345
- var Fa = e.from_html('<div class="mb-6 prose"><p><!></p></div>'), Da = e.from_html('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-2"><!></dd>', 1), Ha = e.from_html('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-2"><a target="_blank" rel="noreferrer" class="link link-primary break-all"> </a></dd>', 1), Na = e.from_html('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-2"><!></dd>', 1), Va = e.from_html('<dialog class="modal absolute" style="position: absolute;"><div class="modal-box w-11/12 max-w-5xl"><form method="dialog"><button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2">✕</button></form> <h3 class="font-bold text-lg mb-4"> </h3> <div class="py-4 overflow-y-auto max-h-[70vh]"><!> <dl class="grid grid-cols-1 md:grid-cols-[200px_1fr]"><!> <!> <!></dl></div> <div class="modal-action"><form method="dialog"><button class="btn"> </button></form></div></div> <form method="dialog" class="modal-backdrop"><button> </button></form></dialog>');
1346
- function Ba(a, t) {
1348
+ var Ds = e.from_html('<div class="mb-6 prose"><p><!></p></div>'), Fs = e.from_html('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-2"><!></dd>', 1), Hs = e.from_html('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-2"><a target="_blank" rel="noreferrer" class="link link-primary break-all"> </a></dd>', 1), Ns = e.from_html('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-2"><!></dd>', 1), Vs = e.from_html('<dialog class="modal"><div class="modal-box w-11/12 max-w-5xl"><form method="dialog"><button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2">✕</button></form> <h3 class="font-bold text-lg mb-4"> </h3> <div class="py-4 overflow-y-auto max-h-[70vh]"><!> <dl class="grid grid-cols-1 md:grid-cols-[200px_1fr]"><!> <!> <!></dl></div> <div class="modal-action"><form method="dialog"><button class="btn"> </button></form></div></div> <form method="dialog" class="modal-backdrop"><button> </button></form></dialog>');
1349
+ function Bs(s, t) {
1347
1350
  e.push(t, !0);
1348
- const s = xe(ae);
1349
- let n = e.derived(() => s.manifest), c = e.derived(() => {
1350
- const f = xa.current;
1351
+ const a = xe(se);
1352
+ let n = e.derived(() => a.manifest), c = e.derived(() => {
1353
+ const f = xs.current;
1351
1354
  if (!e.get(n)) return [];
1352
- const R = e.get(n).getMetadata();
1353
- return R ? R.map(($) => {
1354
- let I = "", E = "";
1355
- const N = (V) => {
1355
+ const D = e.get(n).getMetadata();
1356
+ return D ? D.map(($) => {
1357
+ let w = "", j = "";
1358
+ const H = (V) => {
1356
1359
  if (typeof V == "string") return V;
1357
1360
  if (Array.isArray(V)) {
1358
- let B = V.find((D) => D.locale === f || D.language === f);
1359
- return B || (B = V.find((D) => D.locale === "en" || D.language === "en")), B || (B = V.find((D) => !D.locale && !D.language)), B || (B = V[0]), B ? B.value : "";
1361
+ let B = V.find((F) => F.locale === f || F.language === f);
1362
+ return B || (B = V.find((F) => F.locale === "en" || F.language === "en")), B || (B = V.find((F) => !F.locale && !F.language)), B || (B = V[0]), B ? B.value : "";
1360
1363
  }
1361
1364
  return String(V);
1362
1365
  };
1363
- return $.getLabel ? I = N($.getLabel()) : $.label && (I = N($.label)), $.getValue ? E = N($.getValue()) : $.value && (E = N($.value)), { label: I, value: E };
1366
+ return $.getLabel ? w = H($.getLabel()) : $.label && (w = H($.label)), $.getValue ? j = H($.getValue()) : $.value && (j = H($.value)), { label: w, value: j };
1364
1367
  }) : [];
1365
- }), g = e.derived(() => e.get(n) ? e.get(n).getDescription() : ""), C = e.derived(() => {
1368
+ }), d = e.derived(() => e.get(n) ? e.get(n).getDescription() : ""), G = e.derived(() => {
1366
1369
  var f;
1367
1370
  return e.get(n) ? (f = e.get(n).getRequiredStatement()) == null ? void 0 : f.getValue() : "";
1368
- }), y = e.derived(() => e.get(n) ? e.get(n).getLicense() : "");
1369
- var b = Va(), S = e.child(b), k = e.child(S), P = e.child(k);
1370
- P.__click = () => s.toggleMetadataDialog(), e.reset(k);
1371
- var i = e.sibling(k, 2), l = e.child(i, !0);
1371
+ }), I = e.derived(() => e.get(n) ? e.get(n).getLicense() : "");
1372
+ var v = Vs(), S = e.child(v), L = e.child(S), R = e.child(L);
1373
+ R.__click = () => a.toggleMetadataDialog(), e.reset(L);
1374
+ var i = e.sibling(L, 2), l = e.child(i, !0);
1372
1375
  e.reset(i);
1373
- var u = e.sibling(i, 2), T = e.child(u);
1376
+ var u = e.sibling(i, 2), x = e.child(u);
1374
1377
  {
1375
- var v = (f) => {
1376
- var R = Fa(), $ = e.child(R), I = e.child($);
1377
- e.html(I, () => e.get(g)), e.reset($), e.reset(R), e.append(f, R);
1378
+ var p = (f) => {
1379
+ var D = Ds(), $ = e.child(D), w = e.child($);
1380
+ e.html(w, () => e.get(d)), e.reset($), e.reset(D), e.append(f, D);
1378
1381
  };
1379
- e.if(T, (f) => {
1380
- e.get(g) && f(v);
1382
+ e.if(x, (f) => {
1383
+ e.get(d) && f(p);
1381
1384
  });
1382
1385
  }
1383
- var r = e.sibling(T, 2), d = e.child(r);
1386
+ var r = e.sibling(x, 2), g = e.child(r);
1384
1387
  {
1385
- var w = (f) => {
1386
- var R = Da(), $ = e.first_child(R), I = e.child($, !0);
1388
+ var y = (f) => {
1389
+ var D = Fs(), $ = e.first_child(D), w = e.child($, !0);
1387
1390
  e.reset($);
1388
- var E = e.sibling($, 2), N = e.child(E);
1389
- e.html(N, () => e.get(C)), e.reset(E), e.template_effect((V) => e.set_text(I, V), [() => F.attribution()]), e.append(f, R);
1391
+ var j = e.sibling($, 2), H = e.child(j);
1392
+ e.html(H, () => e.get(G)), e.reset(j), e.template_effect((V) => e.set_text(w, V), [() => P.attribution()]), e.append(f, D);
1390
1393
  };
1391
- e.if(d, (f) => {
1392
- e.get(C) && f(w);
1394
+ e.if(g, (f) => {
1395
+ e.get(G) && f(y);
1393
1396
  });
1394
1397
  }
1395
- var m = e.sibling(d, 2);
1398
+ var m = e.sibling(g, 2);
1396
1399
  {
1397
- var j = (f) => {
1398
- var R = Ha(), $ = e.first_child(R), I = e.child($, !0);
1400
+ var E = (f) => {
1401
+ var D = Hs(), $ = e.first_child(D), w = e.child($, !0);
1399
1402
  e.reset($);
1400
- var E = e.sibling($, 2), N = e.child(E), V = e.child(N, !0);
1401
- e.reset(N), e.reset(E), e.template_effect(
1403
+ var j = e.sibling($, 2), H = e.child(j), V = e.child(H, !0);
1404
+ e.reset(H), e.reset(j), e.template_effect(
1402
1405
  (B) => {
1403
- e.set_text(I, B), e.set_attribute(N, "href", e.get(y)), e.set_text(V, e.get(y));
1406
+ e.set_text(w, B), e.set_attribute(H, "href", e.get(I)), e.set_text(V, e.get(I));
1404
1407
  },
1405
- [() => F.license()]
1406
- ), e.append(f, R);
1408
+ [() => P.license()]
1409
+ ), e.append(f, D);
1407
1410
  };
1408
1411
  e.if(m, (f) => {
1409
- e.get(y) && f(j);
1412
+ e.get(I) && f(E);
1410
1413
  });
1411
1414
  }
1412
- var L = e.sibling(m, 2);
1413
- e.each(L, 17, () => e.get(c), e.index, (f, R) => {
1414
- var $ = Na(), I = e.first_child($), E = e.child(I, !0);
1415
- e.reset(I);
1416
- var N = e.sibling(I, 2), V = e.child(N);
1417
- e.html(V, () => e.get(R).value), e.reset(N), e.template_effect(() => e.set_text(E, e.get(R).label)), e.append(f, $);
1415
+ var k = e.sibling(m, 2);
1416
+ e.each(k, 17, () => e.get(c), e.index, (f, D) => {
1417
+ var $ = Ns(), w = e.first_child($), j = e.child(w, !0);
1418
+ e.reset(w);
1419
+ var H = e.sibling(w, 2), V = e.child(H);
1420
+ e.html(V, () => e.get(D).value), e.reset(H), e.template_effect(() => e.set_text(j, e.get(D).label)), e.append(f, $);
1418
1421
  }), e.reset(r), e.reset(u);
1419
- var x = e.sibling(u, 2), _ = e.child(x), z = e.child(_);
1420
- z.__click = () => s.toggleMetadataDialog();
1421
- var p = e.child(z, !0);
1422
- e.reset(z), e.reset(_), e.reset(x), e.reset(S);
1422
+ var T = e.sibling(u, 2), _ = e.child(T), C = e.child(_);
1423
+ C.__click = () => a.toggleMetadataDialog();
1424
+ var b = e.child(C, !0);
1425
+ e.reset(C), e.reset(_), e.reset(T), e.reset(S);
1423
1426
  var o = e.sibling(S, 2), h = e.child(o);
1424
- h.__click = () => s.toggleMetadataDialog();
1427
+ h.__click = () => a.toggleMetadataDialog();
1425
1428
  var A = e.child(h, !0);
1426
- e.reset(h), e.reset(o), e.reset(b), e.template_effect(
1427
- (f, R, $) => {
1428
- b.open = s.showMetadataDialog, e.set_text(l, f), e.set_text(p, R), e.set_text(A, $);
1429
+ e.reset(h), e.reset(o), e.reset(v), e.template_effect(
1430
+ (f, D, $) => {
1431
+ v.open = a.showMetadataDialog, e.set_text(l, f), e.set_text(b, D), e.set_text(A, $);
1429
1432
  },
1430
1433
  [
1431
- () => e.get(n) ? e.get(n).getLabel().length && e.get(n).getLabel()[0] ? e.get(n).getLabel()[0].value : F.metadata_label_fallback() : F.loading(),
1432
- () => F.close(),
1433
- () => F.close()
1434
+ () => e.get(n) ? e.get(n).getLabel().length && e.get(n).getLabel()[0] ? e.get(n).getLabel()[0].value : P.metadata_label_fallback() : P.loading(),
1435
+ () => P.close(),
1436
+ () => P.close()
1434
1437
  ]
1435
- ), e.append(a, b), e.pop();
1438
+ ), e.append(s, v), e.pop();
1436
1439
  }
1437
1440
  e.delegate(["click"]);
1438
- var Oa = e.from_html('<span class="loading loading-spinner loading-xs"></span>'), qa = e.from_html('<div class="flex justify-center p-8"><span class="loading loading-spinner loading-lg text-primary"></span></div>'), Ya = e.from_html('<div class="text-center opacity-50 p-4"> </div>'), Xa = e.from_html('<div class="text-center opacity-50 p-4 text-sm"> </div>'), Qa = e.from_html('<div class="leading-relaxed"><span><!></span> <span class="bg-yellow-200 text-yellow-900 font-bold px-0.5 rounded"><!></span> <span><!></span></div>'), Ua = e.from_html('<div class="leading-relaxed"> </div>'), Ka = e.from_html('<button class="w-full text-left card bg-base-100 shadow hover:shadow-md transition-all p-4 text-sm group border border-transparent hover:border-primary focus:outline-none focus:ring-2 focus:ring-primary"><div class="flex justify-between items-baseline mb-1"><span class="font-bold text-xs opacity-70 bg-base-200 px-1.5 py-0.5 rounded"> </span></div> <!></button>'), Wa = e.from_html('<div class="text-xs font-bold opacity-50 uppercase tracking-wider pb-2"> </div> <!>', 1), Ja = e.from_html('<div class="absolute top-0 right-0 h-full w-80 bg-base-200 shadow-2xl z-1000 transform transition-transform duration-300 flex flex-col border-l border-base-300" role="dialog"><div class="p-4 bg-base-300 flex justify-between items-center shrink-0"><h2 class="font-bold text-lg"> </h2> <button class="btn btn-sm btn-circle btn-ghost">✕</button></div> <div class="p-4 border-b border-base-300 shrink-0"><div class="join w-full"><input type="text" class="input input-bordered join-item w-full"/> <button class="btn btn-primary join-item"><!></button></div></div> <div class="flex-1 overflow-y-auto p-4 space-y-4"><!></div></div>');
1439
- function Za(a, t) {
1441
+ var Os = e.from_html('<span class="loading loading-spinner loading-xs"></span>'), qs = e.from_html('<div class="flex justify-center p-8"><span class="loading loading-spinner loading-lg text-primary"></span></div>'), Ys = e.from_html('<div class="text-center opacity-50 p-4"> </div>'), Xs = e.from_html('<div class="text-center opacity-50 p-4 text-sm"> </div>'), Qs = e.from_html('<div class="leading-relaxed"><span><!></span> <span class="bg-yellow-200 text-yellow-900 font-bold px-0.5 rounded"><!></span> <span><!></span></div>'), Us = e.from_html('<div class="leading-relaxed"> </div>'), Ks = e.from_html('<button class="w-full text-left card bg-base-100 shadow hover:shadow-md transition-all p-4 text-sm group border border-transparent hover:border-primary focus:outline-none focus:ring-2 focus:ring-primary"><div class="flex justify-between items-baseline mb-1"><span class="font-bold text-xs opacity-70 bg-base-200 px-1.5 py-0.5 rounded"> </span></div> <!></button>'), Ws = e.from_html('<div class="text-xs font-bold opacity-50 uppercase tracking-wider pb-2"> </div> <!>', 1), Js = e.from_html('<div class="absolute top-0 right-0 h-full w-80 bg-base-200 shadow-2xl z-1000 transform transition-transform duration-300 flex flex-col border-l border-base-300" role="dialog"><div class="p-4 bg-base-300 flex justify-between items-center shrink-0"><h2 class="font-bold text-lg"> </h2> <button class="btn btn-sm btn-circle btn-ghost">✕</button></div> <div class="p-4 border-b border-base-300 shrink-0"><div class="join w-full"><input type="text" class="input input-bordered join-item w-full"/> <button class="btn btn-primary join-item"><!></button></div></div> <div class="flex-1 overflow-y-auto p-4 space-y-4"><!></div></div>');
1442
+ function Zs(s, t) {
1440
1443
  e.push(t, !0);
1441
- const s = xe(ae);
1442
- let n = e.state(e.proxy(s.searchQuery));
1444
+ const a = xe(se);
1445
+ let n = e.state(e.proxy(a.searchQuery));
1443
1446
  function c() {
1444
- s.search(e.get(n));
1447
+ a.search(e.get(n));
1445
1448
  }
1446
- function g(k) {
1447
- k.key === "Enter" && c();
1449
+ function d(L) {
1450
+ L.key === "Enter" && c();
1448
1451
  }
1449
- function C(k) {
1450
- const P = s.canvases[k.canvasIndex];
1451
- P && (s.canvasId = P.id);
1452
+ function G(L) {
1453
+ const R = a.canvases[L.canvasIndex];
1454
+ R && (a.canvasId = R.id);
1452
1455
  }
1453
- var y = e.comment(), b = e.first_child(y);
1456
+ var I = e.comment(), v = e.first_child(I);
1454
1457
  {
1455
- var S = (k) => {
1456
- var P = Ja(), i = e.child(P), l = e.child(i), u = e.child(l, !0);
1458
+ var S = (L) => {
1459
+ var R = Js(), i = e.child(R), l = e.child(i), u = e.child(l, !0);
1457
1460
  e.reset(l);
1458
- var T = e.sibling(l, 2);
1459
- T.__click = () => s.toggleSearchPanel(), e.reset(i);
1460
- var v = e.sibling(i, 2), r = e.child(v), d = e.child(r);
1461
- e.remove_input_defaults(d), d.__keydown = g;
1462
- var w = e.sibling(d, 2);
1463
- w.__click = c;
1464
- var m = e.child(w);
1461
+ var x = e.sibling(l, 2);
1462
+ x.__click = () => a.toggleSearchPanel(), e.reset(i);
1463
+ var p = e.sibling(i, 2), r = e.child(p), g = e.child(r);
1464
+ e.remove_input_defaults(g), g.__keydown = d;
1465
+ var y = e.sibling(g, 2);
1466
+ y.__click = c;
1467
+ var m = e.child(y);
1465
1468
  {
1466
- var j = (o) => {
1467
- var h = Oa();
1469
+ var E = (o) => {
1470
+ var h = Os();
1468
1471
  e.append(o, h);
1469
- }, L = (o) => {
1470
- Ge(o, { size: 20, weight: "bold" });
1472
+ }, k = (o) => {
1473
+ Ee(o, { size: 20, weight: "bold" });
1471
1474
  };
1472
1475
  e.if(m, (o) => {
1473
- s.isSearching ? o(j) : o(L, !1);
1476
+ a.isSearching ? o(E) : o(k, !1);
1474
1477
  });
1475
1478
  }
1476
- e.reset(w), e.reset(r), e.reset(v);
1477
- var x = e.sibling(v, 2), _ = e.child(x);
1479
+ e.reset(y), e.reset(r), e.reset(p);
1480
+ var T = e.sibling(p, 2), _ = e.child(T);
1478
1481
  {
1479
- var z = (o) => {
1480
- var h = qa();
1482
+ var C = (o) => {
1483
+ var h = qs();
1481
1484
  e.append(o, h);
1482
- }, p = (o) => {
1485
+ }, b = (o) => {
1483
1486
  var h = e.comment(), A = e.first_child(h);
1484
1487
  {
1485
1488
  var f = ($) => {
1486
- var I = Ya(), E = e.child(I, !0);
1487
- e.reset(I), e.template_effect((N) => e.set_text(E, N), [
1488
- () => F.search_panel_no_results({ query: s.searchQuery })
1489
- ]), e.append($, I);
1490
- }, R = ($) => {
1491
- var I = e.comment(), E = e.first_child(I);
1489
+ var w = Ys(), j = e.child(w, !0);
1490
+ e.reset(w), e.template_effect((H) => e.set_text(j, H), [
1491
+ () => P.search_panel_no_results({ query: a.searchQuery })
1492
+ ]), e.append($, w);
1493
+ }, D = ($) => {
1494
+ var w = e.comment(), j = e.first_child(w);
1492
1495
  {
1493
- var N = (B) => {
1494
- var D = Xa(), O = e.child(D, !0);
1495
- e.reset(D), e.template_effect((q) => e.set_text(O, q), [() => F.search_panel_instruction()]), e.append(B, D);
1496
+ var H = (B) => {
1497
+ var F = Xs(), O = e.child(F, !0);
1498
+ e.reset(F), e.template_effect((q) => e.set_text(O, q), [() => P.search_panel_instruction()]), e.append(B, F);
1496
1499
  }, V = (B) => {
1497
- var D = Wa(), O = e.first_child(D), q = e.child(O, !0);
1500
+ var F = Ws(), O = e.first_child(F), q = e.child(O, !0);
1498
1501
  e.reset(O);
1499
1502
  var U = e.sibling(O, 2);
1500
- e.each(U, 17, () => s.searchResults, e.index, (K, Q) => {
1501
- var H = Ka();
1502
- H.__click = () => C(e.get(Q));
1503
- var X = e.child(H), W = e.child(X), we = e.child(W, !0);
1503
+ e.each(U, 17, () => a.searchResults, e.index, (K, Q) => {
1504
+ var N = Ks();
1505
+ N.__click = () => G(e.get(Q));
1506
+ var X = e.child(N), W = e.child(X), we = e.child(W, !0);
1504
1507
  e.reset(W), e.reset(X);
1505
1508
  var Se = e.sibling(X, 2);
1506
1509
  {
1507
1510
  var J = (te) => {
1508
- var ee = Qa(), ne = e.child(ee), Ne = e.child(ne);
1509
- e.html(Ne, () => e.get(Q).before), e.reset(ne);
1510
- var Ae = e.sibling(ne, 2), Ve = e.child(Ae);
1511
- e.html(Ve, () => e.get(Q).match), e.reset(Ae);
1512
- var $e = e.sibling(Ae, 2), Be = e.child($e);
1513
- e.html(Be, () => e.get(Q).after), e.reset($e), e.reset(ee), e.append(te, ee);
1511
+ var ee = Qs(), ne = e.child(ee), ze = e.child(ne);
1512
+ e.html(ze, () => e.get(Q).before), e.reset(ne);
1513
+ var Ae = e.sibling(ne, 2), De = e.child(Ae);
1514
+ e.html(De, () => e.get(Q).match), e.reset(Ae);
1515
+ var $e = e.sibling(Ae, 2), Fe = e.child($e);
1516
+ e.html(Fe, () => e.get(Q).after), e.reset($e), e.reset(ee), e.append(te, ee);
1514
1517
  }, Z = (te) => {
1515
- var ee = Ua(), ne = e.child(ee, !0);
1518
+ var ee = Us(), ne = e.child(ee, !0);
1516
1519
  e.reset(ee), e.template_effect(() => e.set_text(ne, e.get(Q).match)), e.append(te, ee);
1517
1520
  };
1518
1521
  e.if(Se, (te) => {
1519
1522
  e.get(Q).type === "hit" ? te(J) : te(Z, !1);
1520
1523
  });
1521
1524
  }
1522
- e.reset(H), e.template_effect(() => e.set_text(we, e.get(Q).canvasLabel)), e.append(K, H);
1525
+ e.reset(N), e.template_effect(() => e.set_text(we, e.get(Q).canvasLabel)), e.append(K, N);
1523
1526
  }), e.template_effect((K) => e.set_text(q, K), [
1524
- () => F.search_panel_results_count({ count: s.searchResults.length })
1525
- ]), e.append(B, D);
1527
+ () => P.search_panel_results_count({ count: a.searchResults.length })
1528
+ ]), e.append(B, F);
1526
1529
  };
1527
1530
  e.if(
1528
- E,
1531
+ j,
1529
1532
  (B) => {
1530
- s.searchResults.length === 0 && !s.searchQuery ? B(N) : B(V, !1);
1533
+ a.searchResults.length === 0 && !a.searchQuery ? B(H) : B(V, !1);
1531
1534
  },
1532
1535
  !0
1533
1536
  );
1534
1537
  }
1535
- e.append($, I);
1538
+ e.append($, w);
1536
1539
  };
1537
1540
  e.if(
1538
1541
  A,
1539
1542
  ($) => {
1540
- s.searchResults.length === 0 && s.searchQuery ? $(f) : $(R, !1);
1543
+ a.searchResults.length === 0 && a.searchQuery ? $(f) : $(D, !1);
1541
1544
  },
1542
1545
  !0
1543
1546
  );
@@ -1545,175 +1548,175 @@ function Za(a, t) {
1545
1548
  e.append(o, h);
1546
1549
  };
1547
1550
  e.if(_, (o) => {
1548
- s.isSearching ? o(z) : o(p, !1);
1551
+ a.isSearching ? o(C) : o(b, !1);
1549
1552
  });
1550
1553
  }
1551
- e.reset(x), e.reset(P), e.template_effect(
1552
- (o, h, A, f, R) => {
1553
- e.set_attribute(P, "aria-label", o), e.set_text(u, h), e.set_attribute(T, "aria-label", A), e.set_attribute(d, "placeholder", f), e.set_attribute(w, "aria-label", R);
1554
+ e.reset(T), e.reset(R), e.template_effect(
1555
+ (o, h, A, f, D) => {
1556
+ e.set_attribute(R, "aria-label", o), e.set_text(u, h), e.set_attribute(x, "aria-label", A), e.set_attribute(g, "placeholder", f), e.set_attribute(y, "aria-label", D);
1554
1557
  },
1555
1558
  [
1556
- () => F.search_panel_title(),
1557
- () => F.search_panel_title(),
1558
- () => F.search_panel_close(),
1559
- () => F.search_panel_placeholder(),
1560
- () => F.search_panel_title()
1559
+ () => P.search_panel_title(),
1560
+ () => P.search_panel_title(),
1561
+ () => P.search_panel_close(),
1562
+ () => P.search_panel_placeholder(),
1563
+ () => P.search_panel_title()
1561
1564
  ]
1562
- ), e.bind_value(d, () => e.get(n), (o) => e.set(n, o)), e.append(k, P);
1565
+ ), e.bind_value(g, () => e.get(n), (o) => e.set(n, o)), e.append(L, R);
1563
1566
  };
1564
- e.if(b, (k) => {
1565
- s.showSearchPanel && k(S);
1567
+ e.if(v, (L) => {
1568
+ a.showSearchPanel && L(S);
1566
1569
  });
1567
1570
  }
1568
- e.append(a, y), e.pop();
1571
+ e.append(s, I), e.pop();
1569
1572
  }
1570
1573
  e.delegate(["click", "keydown"]);
1571
- var en = e.from_html('<span class="loading loading-spinner loading-lg text-primary"></span>'), tn = e.from_html('<div class="text-error"> </div>'), sn = e.from_html('<div class="text-base-content/50">No image found</div>'), an = e.from_html("<!> <!>", 1), nn = e.from_html('<div id="triiiceratops-viewer" class="w-full h-full relative bg-base-100 flex items-center justify-center"><!> <!> <!> <!> <!> <!></div>');
1572
- function An(a, t) {
1574
+ var en = e.from_html('<span class="loading loading-spinner loading-lg text-primary"></span>'), tn = e.from_html('<div class="text-error"> </div>'), an = e.from_html('<div class="text-base-content/50">No image found</div>'), sn = e.from_html("<!> <!>", 1), nn = e.from_html('<div id="triiiceratops-viewer" class="w-full h-full relative bg-base-100 flex items-center justify-center"><!> <!> <!> <!> <!> <!></div>');
1575
+ function An(s, t) {
1573
1576
  e.push(t, !0);
1574
- const s = new rt();
1575
- Ye(ae, s), e.user_effect(() => {
1576
- t.manifestId && s.setManifest(t.manifestId);
1577
+ const a = new tt();
1578
+ Ve(se, a), e.user_effect(() => {
1579
+ t.manifestId && a.setManifest(t.manifestId);
1577
1580
  }), e.user_effect(() => {
1578
1581
  const r = () => {
1579
- s.isFullScreen = !!document.fullscreenElement;
1582
+ a.isFullScreen = !!document.fullscreenElement;
1580
1583
  };
1581
1584
  return document.addEventListener("fullscreenchange", r), () => {
1582
1585
  document.removeEventListener("fullscreenchange", r);
1583
1586
  };
1584
1587
  });
1585
- let n = e.derived(() => s.manifest), c = e.derived(() => s.canvases), g = e.derived(() => s.currentCanvasIndex), C = e.derived(() => {
1586
- var z, p;
1587
- if (!e.get(c) || e.get(g) === -1 || !e.get(c)[e.get(g)])
1588
- return (z = e.get(n)) != null && z.isFetching || console.log("TriiiceratopsViewer: No canvas found"), null;
1589
- const r = e.get(c)[e.get(g)];
1590
- let d = r.getImages();
1591
- if ((!d || !d.length) && r.getContent && (d = r.getContent()), !d || !d.length)
1592
- return r.__jsonld && r.__jsonld.items, (p = e.get(n)) != null && p.isFetching || console.log("TriiiceratopsViewer: No images/content in canvas"), null;
1593
- const w = d[0];
1594
- let m = w.getResource ? w.getResource() : null;
1595
- if (!m && w.getBody) {
1596
- const o = w.getBody();
1588
+ let n = e.derived(() => a.manifest), c = e.derived(() => a.canvases), d = e.derived(() => a.currentCanvasIndex), G = e.derived(() => {
1589
+ var C, b;
1590
+ if (!e.get(c) || e.get(d) === -1 || !e.get(c)[e.get(d)])
1591
+ return (C = e.get(n)) != null && C.isFetching || console.log("TriiiceratopsViewer: No canvas found"), null;
1592
+ const r = e.get(c)[e.get(d)];
1593
+ let g = r.getImages();
1594
+ if ((!g || !g.length) && r.getContent && (g = r.getContent()), !g || !g.length)
1595
+ return r.__jsonld && r.__jsonld.items, (b = e.get(n)) != null && b.isFetching || console.log("TriiiceratopsViewer: No images/content in canvas"), null;
1596
+ const y = g[0];
1597
+ let m = y.getResource ? y.getResource() : null;
1598
+ if (!m && y.getBody) {
1599
+ const o = y.getBody();
1597
1600
  Array.isArray(o) && o.length > 0 ? m = o[0] : o && (m = o);
1598
1601
  }
1599
1602
  if (m && !m.id && !m.__jsonld && (!m.getServices || m.getServices().length === 0) && (m = null), !m) {
1600
- const o = w.__jsonld || w;
1603
+ const o = y.__jsonld || y;
1601
1604
  o.body && (m = Array.isArray(o.body) ? o.body[0] : o.body);
1602
1605
  }
1603
1606
  if (!m)
1604
1607
  return null;
1605
- const j = (o) => o.id || o["@id"];
1606
- let L = [];
1607
- if (m.getServices && (L = m.getServices()), !L.length) {
1608
+ const E = (o) => o.id || o["@id"];
1609
+ let k = [];
1610
+ if (m.getServices && (k = m.getServices()), !k.length) {
1608
1611
  const o = m.__jsonld || m;
1609
- o.service && (L = Array.isArray(o.service) ? o.service : [o.service]);
1612
+ o.service && (k = Array.isArray(o.service) ? o.service : [o.service]);
1610
1613
  }
1611
- if (L.length > 0) {
1612
- const o = L.find((h) => {
1614
+ if (k.length > 0) {
1615
+ const o = k.find((h) => {
1613
1616
  const A = h.getType ? h.getType() : h.type || "", f = h.getProfile ? h.getProfile() : h.profile || "";
1614
1617
  return A === "ImageService1" || A === "ImageService2" || A === "ImageService3" || typeof f == "string" && f.includes("http://iiif.io/api/image") || typeof f == "string" && f === "level0";
1615
1618
  });
1616
1619
  if (o) {
1617
- let h = j(o);
1620
+ let h = E(o);
1618
1621
  return h && !h.endsWith("/info.json") && (h = `${h}/info.json`), h;
1619
1622
  }
1620
1623
  }
1621
- const x = j(m);
1622
- if (x && x.includes("/iiif/")) {
1623
- const o = x.split("/"), h = o.findIndex((A) => A === "full" || A.match(/^\d+,\d+,\d+,\d+$/));
1624
+ const T = E(m);
1625
+ if (T && T.includes("/iiif/")) {
1626
+ const o = T.split("/"), h = o.findIndex((A) => A === "full" || A.match(/^\d+,\d+,\d+,\d+$/));
1624
1627
  if (h > 0)
1625
1628
  return `${o.slice(0, h).join("/")}/info.json`;
1626
1629
  }
1627
- return console.log("TriiiceratopsViewer: No service or ID found, returning raw URL"), { type: "image", url: x };
1630
+ return console.log("TriiiceratopsViewer: No service or ID found, returning raw URL"), { type: "image", url: T };
1628
1631
  });
1629
- var y = nn(), b = e.child(y);
1632
+ var I = nn(), v = e.child(I);
1630
1633
  {
1631
1634
  var S = (r) => {
1632
- var d = en();
1633
- e.append(r, d);
1634
- }, k = (r) => {
1635
- var d = e.comment(), w = e.first_child(d);
1635
+ var g = en();
1636
+ e.append(r, g);
1637
+ }, L = (r) => {
1638
+ var g = e.comment(), y = e.first_child(g);
1636
1639
  {
1637
- var m = (L) => {
1638
- var x = tn(), _ = e.child(x);
1639
- e.reset(x), e.template_effect(() => e.set_text(_, `Error: ${e.get(n).error ?? ""}`)), e.append(L, x);
1640
- }, j = (L) => {
1641
- var x = e.comment(), _ = e.first_child(x);
1640
+ var m = (k) => {
1641
+ var T = tn(), _ = e.child(T);
1642
+ e.reset(T), e.template_effect(() => e.set_text(_, `Error: ${e.get(n).error ?? ""}`)), e.append(k, T);
1643
+ }, E = (k) => {
1644
+ var T = e.comment(), _ = e.first_child(T);
1642
1645
  {
1643
- var z = (o) => {
1646
+ var C = (o) => {
1644
1647
  var h = e.comment(), A = e.first_child(h);
1645
- e.key(A, () => e.get(C), (f) => {
1646
- _t(f, {
1648
+ e.key(A, () => e.get(G), (f) => {
1649
+ vt(f, {
1647
1650
  get tileSources() {
1648
- return e.get(C);
1651
+ return e.get(G);
1649
1652
  },
1650
1653
  get viewerState() {
1651
- return s;
1654
+ return a;
1652
1655
  }
1653
1656
  });
1654
1657
  }), e.append(o, h);
1655
- }, p = (o) => {
1656
- var h = sn();
1658
+ }, b = (o) => {
1659
+ var h = an();
1657
1660
  e.append(o, h);
1658
1661
  };
1659
1662
  e.if(
1660
1663
  _,
1661
1664
  (o) => {
1662
- e.get(C) ? o(z) : o(p, !1);
1665
+ e.get(G) ? o(C) : o(b, !1);
1663
1666
  },
1664
1667
  !0
1665
1668
  );
1666
1669
  }
1667
- e.append(L, x);
1670
+ e.append(k, T);
1668
1671
  };
1669
1672
  e.if(
1670
- w,
1671
- (L) => {
1672
- var x;
1673
- (x = e.get(n)) != null && x.error ? L(m) : L(j, !1);
1673
+ y,
1674
+ (k) => {
1675
+ var T;
1676
+ (T = e.get(n)) != null && T.error ? k(m) : k(E, !1);
1674
1677
  },
1675
1678
  !0
1676
1679
  );
1677
1680
  }
1678
- e.append(r, d);
1681
+ e.append(r, g);
1679
1682
  };
1680
- e.if(b, (r) => {
1681
- var d;
1682
- (d = e.get(n)) != null && d.isFetching ? r(S) : r(k, !1);
1683
+ e.if(v, (r) => {
1684
+ var g;
1685
+ (g = e.get(n)) != null && g.isFetching ? r(S) : r(L, !1);
1683
1686
  });
1684
1687
  }
1685
- var P = e.sibling(b, 2);
1688
+ var R = e.sibling(v, 2);
1686
1689
  {
1687
1690
  var i = (r) => {
1688
- var d = an(), w = e.first_child(d);
1689
- Sa(w, {
1691
+ var g = sn(), y = e.first_child(g);
1692
+ Ss(y, {
1690
1693
  get viewerState() {
1691
- return s;
1694
+ return a;
1692
1695
  }
1693
1696
  });
1694
- var m = e.sibling(w, 2);
1695
- Pa(m, {
1697
+ var m = e.sibling(y, 2);
1698
+ Rs(m, {
1696
1699
  get canvases() {
1697
1700
  return e.get(c);
1698
1701
  }
1699
- }), e.append(r, d);
1702
+ }), e.append(r, g);
1700
1703
  };
1701
- e.if(P, (r) => {
1704
+ e.if(R, (r) => {
1702
1705
  e.get(c).length > 1 && r(i);
1703
1706
  });
1704
1707
  }
1705
- var l = e.sibling(P, 2);
1706
- ka(l, {});
1708
+ var l = e.sibling(R, 2);
1709
+ ks(l, {});
1707
1710
  var u = e.sibling(l, 2);
1708
- Ba(u, {});
1709
- var T = e.sibling(u, 2);
1710
- Za(T, {});
1711
- var v = e.sibling(T, 2);
1712
- Ra(v, {}), e.reset(y), e.append(a, y), e.pop();
1711
+ Bs(u, {});
1712
+ var x = e.sibling(u, 2);
1713
+ Zs(x, {});
1714
+ var p = e.sibling(x, 2);
1715
+ zs(p, {}), e.reset(I), e.append(s, I), e.pop();
1713
1716
  }
1714
1717
  export {
1715
- nt as ManifestsState,
1718
+ et as ManifestsState,
1716
1719
  An as TriiiceratopsViewer,
1717
- ae as VIEWER_STATE_KEY,
1718
- rt as ViewerState
1720
+ se as VIEWER_STATE_KEY,
1721
+ tt as ViewerState
1719
1722
  };