triiiceratops 0.3.1 → 0.3.2

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