triiiceratops 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/TriiiceratopsViewer-BFoyVNzC.js +22027 -0
- package/dist/index.js +2111 -0
- package/dist/plugin-DqOSV8lm.js +30 -0
- package/dist/plugins/image-manipulation.js +177 -0
- package/dist/src/lib/components/LeftFab.svelte.d.ts +1 -0
- package/dist/src/lib/custom-element-image.d.ts +0 -0
- package/dist/src/lib/index.d.ts +2 -0
- package/dist/src/lib/plugins/image-manipulation/ImageManipulationPanel.svelte.d.ts +1 -0
- package/dist/src/lib/plugins/image-manipulation/ImageManipulationPlugin.svelte.d.ts +19 -0
- package/dist/src/lib/plugins/image-manipulation/filters.d.ts +20 -0
- package/dist/src/lib/plugins/image-manipulation/index.d.ts +3 -0
- package/dist/src/lib/plugins/image-manipulation/types.d.ts +8 -0
- package/dist/src/lib/state/viewer.svelte.d.ts +47 -1
- package/dist/src/lib/types/plugin.d.ts +101 -0
- package/dist/triiiceratops-element-image.js +462 -0
- package/dist/triiiceratops-element.css +1 -1
- package/dist/triiiceratops-element.js +24 -21428
- package/package.json +12 -6
- package/dist/triiiceratops-element.iife.js +0 -95
- package/dist/triiiceratops.js +0 -1719
package/dist/triiiceratops.js
DELETED
|
@@ -1,1719 +0,0 @@
|
|
|
1
|
-
var ke = (a) => {
|
|
2
|
-
throw TypeError(a);
|
|
3
|
-
};
|
|
4
|
-
var Oe = (a, t, s) => t.has(a) || ke("Cannot " + s);
|
|
5
|
-
var G = (a, t, s) => (Oe(a, t, "read from private field"), s ? s.call(a) : t.get(a)), Y = (a, t, s) => t.has(a) ? ke("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(a) : t.set(a, s);
|
|
6
|
-
import "svelte/internal/disclose-version";
|
|
7
|
-
import * as e from "svelte/internal/client";
|
|
8
|
-
import { onMount as qe, getContext as xe, setContext as Ye } from "svelte";
|
|
9
|
-
import * as Xe from "manifesto.js";
|
|
10
|
-
import Ce from "openseadragon";
|
|
11
|
-
import Qe from "phosphor-svelte/lib/CaretLeft";
|
|
12
|
-
import Ue from "phosphor-svelte/lib/CaretRight";
|
|
13
|
-
import Ke from "phosphor-svelte/lib/CaretDown";
|
|
14
|
-
import je from "phosphor-svelte/lib/Eye";
|
|
15
|
-
import Le from "phosphor-svelte/lib/EyeSlash";
|
|
16
|
-
import We from "phosphor-svelte/lib/X";
|
|
17
|
-
import "svelte/internal/flags/legacy";
|
|
18
|
-
import Je from "phosphor-svelte/lib/ChatCenteredText";
|
|
19
|
-
import Ze from "phosphor-svelte/lib/CornersIn";
|
|
20
|
-
import et from "phosphor-svelte/lib/CornersOut";
|
|
21
|
-
import tt from "phosphor-svelte/lib/Info";
|
|
22
|
-
import Ge from "phosphor-svelte/lib/MagnifyingGlass";
|
|
23
|
-
import st from "phosphor-svelte/lib/Plus";
|
|
24
|
-
import at from "phosphor-svelte/lib/Slideshow";
|
|
25
|
-
var re;
|
|
26
|
-
class nt {
|
|
27
|
-
constructor() {
|
|
28
|
-
Y(this, re, e.state(e.proxy({})));
|
|
29
|
-
}
|
|
30
|
-
get manifests() {
|
|
31
|
-
return e.get(G(this, re));
|
|
32
|
-
}
|
|
33
|
-
set manifests(t) {
|
|
34
|
-
e.set(G(this, re), t, !0);
|
|
35
|
-
}
|
|
36
|
-
async fetchManifest(t) {
|
|
37
|
-
if (!this.manifests[t]) {
|
|
38
|
-
this.manifests[t] = { isFetching: !0 };
|
|
39
|
-
try {
|
|
40
|
-
const s = await fetch(t);
|
|
41
|
-
if (!s.ok)
|
|
42
|
-
throw new Error(`HTTP error! status: ${s.status}`);
|
|
43
|
-
const n = await s.json(), c = Xe.parseManifest(n);
|
|
44
|
-
this.manifests[t] = { json: n, manifesto: c, isFetching: !1 };
|
|
45
|
-
} catch (s) {
|
|
46
|
-
this.manifests[t] = { error: s.message, isFetching: !1 };
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
getManifest(t) {
|
|
51
|
-
const s = this.manifests[t];
|
|
52
|
-
return s == null ? void 0 : s.manifesto;
|
|
53
|
-
}
|
|
54
|
-
async fetchAnnotationList(t) {
|
|
55
|
-
if (!this.manifests[t])
|
|
56
|
-
try {
|
|
57
|
-
const s = await fetch(t);
|
|
58
|
-
if (s.ok) {
|
|
59
|
-
const n = await s.json();
|
|
60
|
-
this.manifests[t] = { json: n };
|
|
61
|
-
} else
|
|
62
|
-
console.error(`Failed to fetch annotation list: ${t}`);
|
|
63
|
-
} catch (s) {
|
|
64
|
-
console.error(`Error fetching annotation list: ${t}`, s);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
getCanvases(t) {
|
|
68
|
-
const s = this.getManifest(t);
|
|
69
|
-
if (!s)
|
|
70
|
-
return [];
|
|
71
|
-
const n = s.getSequences();
|
|
72
|
-
return !n || !n.length ? [] : n[0].getCanvases();
|
|
73
|
-
}
|
|
74
|
-
getAnnotations(t, s) {
|
|
75
|
-
const n = this.getManifest(t);
|
|
76
|
-
return n ? n.getSequences()[0].getCanvasById(s) ? this.manualGetAnnotations(t, s) : [] : [];
|
|
77
|
-
}
|
|
78
|
-
// We can refactor this to use Manifesto's resource handling later if needed.
|
|
79
|
-
manualGetAnnotations(t, s) {
|
|
80
|
-
const n = this.getManifest(t);
|
|
81
|
-
if (!n) return [];
|
|
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
|
-
}
|
|
96
|
-
} else
|
|
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
|
-
}
|
|
108
|
-
} else
|
|
109
|
-
this.fetchAnnotationList(S);
|
|
110
|
-
} else b.items && C.push(...b.items);
|
|
111
|
-
}), C;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
re = new WeakMap();
|
|
115
|
-
const se = new nt();
|
|
116
|
-
var ie, oe, le, ce, de, ge, ue, fe, he, ve, pe, me, be, _e, ye;
|
|
117
|
-
class rt {
|
|
118
|
-
constructor(t) {
|
|
119
|
-
Y(this, ie, e.state(null));
|
|
120
|
-
Y(this, oe, e.state(null));
|
|
121
|
-
Y(this, le, e.state(!1));
|
|
122
|
-
Y(this, ce, e.state(!1));
|
|
123
|
-
Y(this, de, e.state(!1));
|
|
124
|
-
Y(this, ge, e.state(!1));
|
|
125
|
-
Y(this, ue, e.state(!1));
|
|
126
|
-
Y(this, fe, e.state(!1));
|
|
127
|
-
Y(this, he, e.state("none"));
|
|
128
|
-
Y(this, ve, e.state(e.proxy(/* @__PURE__ */ new Set())));
|
|
129
|
-
Y(this, pe, e.state(""));
|
|
130
|
-
Y(this, me, e.state(e.proxy([])));
|
|
131
|
-
Y(this, be, e.state(!1));
|
|
132
|
-
Y(this, _e, e.state(!1));
|
|
133
|
-
Y(this, ye, e.state(e.proxy([])));
|
|
134
|
-
this.manifestId = t || null, this.manifestId && se.fetchManifest(this.manifestId);
|
|
135
|
-
}
|
|
136
|
-
get manifestId() {
|
|
137
|
-
return e.get(G(this, ie));
|
|
138
|
-
}
|
|
139
|
-
set manifestId(t) {
|
|
140
|
-
e.set(G(this, ie), t, !0);
|
|
141
|
-
}
|
|
142
|
-
get canvasId() {
|
|
143
|
-
return e.get(G(this, oe));
|
|
144
|
-
}
|
|
145
|
-
set canvasId(t) {
|
|
146
|
-
e.set(G(this, oe), t, !0);
|
|
147
|
-
}
|
|
148
|
-
get showAnnotations() {
|
|
149
|
-
return e.get(G(this, le));
|
|
150
|
-
}
|
|
151
|
-
set showAnnotations(t) {
|
|
152
|
-
e.set(G(this, le), t, !0);
|
|
153
|
-
}
|
|
154
|
-
get showThumbnailGallery() {
|
|
155
|
-
return e.get(G(this, ce));
|
|
156
|
-
}
|
|
157
|
-
set showThumbnailGallery(t) {
|
|
158
|
-
e.set(G(this, ce), t, !0);
|
|
159
|
-
}
|
|
160
|
-
get isGalleryDockedBottom() {
|
|
161
|
-
return e.get(G(this, de));
|
|
162
|
-
}
|
|
163
|
-
set isGalleryDockedBottom(t) {
|
|
164
|
-
e.set(G(this, de), t, !0);
|
|
165
|
-
}
|
|
166
|
-
get isGalleryDockedRight() {
|
|
167
|
-
return e.get(G(this, ge));
|
|
168
|
-
}
|
|
169
|
-
set isGalleryDockedRight(t) {
|
|
170
|
-
e.set(G(this, ge), t, !0);
|
|
171
|
-
}
|
|
172
|
-
get isFullScreen() {
|
|
173
|
-
return e.get(G(this, ue));
|
|
174
|
-
}
|
|
175
|
-
set isFullScreen(t) {
|
|
176
|
-
e.set(G(this, ue), t, !0);
|
|
177
|
-
}
|
|
178
|
-
get showMetadataDialog() {
|
|
179
|
-
return e.get(G(this, fe));
|
|
180
|
-
}
|
|
181
|
-
set showMetadataDialog(t) {
|
|
182
|
-
e.set(G(this, fe), t, !0);
|
|
183
|
-
}
|
|
184
|
-
get dockSide() {
|
|
185
|
-
return e.get(G(this, he));
|
|
186
|
-
}
|
|
187
|
-
set dockSide(t) {
|
|
188
|
-
e.set(G(this, he), t, !0);
|
|
189
|
-
}
|
|
190
|
-
get visibleAnnotationIds() {
|
|
191
|
-
return e.get(G(this, ve));
|
|
192
|
-
}
|
|
193
|
-
set visibleAnnotationIds(t) {
|
|
194
|
-
e.set(G(this, ve), t, !0);
|
|
195
|
-
}
|
|
196
|
-
get manifest() {
|
|
197
|
-
return this.manifestId ? se.getManifest(this.manifestId) : null;
|
|
198
|
-
}
|
|
199
|
-
get canvases() {
|
|
200
|
-
if (!this.manifestId) return [];
|
|
201
|
-
const t = se.getCanvases(this.manifestId);
|
|
202
|
-
return t.length > 0 && !this.canvasId && setTimeout(
|
|
203
|
-
() => {
|
|
204
|
-
!this.canvasId && t.length > 0 && (this.canvasId = t[0].id);
|
|
205
|
-
},
|
|
206
|
-
0
|
|
207
|
-
), t;
|
|
208
|
-
}
|
|
209
|
-
get currentCanvasIndex() {
|
|
210
|
-
return this.canvasId ? this.canvases.findIndex((t) => t.id === this.canvasId) : this.canvases.length > 0 ? 0 : -1;
|
|
211
|
-
}
|
|
212
|
-
get hasNext() {
|
|
213
|
-
return this.currentCanvasIndex < this.canvases.length - 1;
|
|
214
|
-
}
|
|
215
|
-
get hasPrevious() {
|
|
216
|
-
return this.currentCanvasIndex > 0;
|
|
217
|
-
}
|
|
218
|
-
nextCanvas() {
|
|
219
|
-
if (this.hasNext) {
|
|
220
|
-
const t = this.currentCanvasIndex + 1, s = this.canvases[t];
|
|
221
|
-
this.canvasId = s.id;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
previousCanvas() {
|
|
225
|
-
if (this.hasPrevious) {
|
|
226
|
-
const t = this.currentCanvasIndex - 1, s = this.canvases[t];
|
|
227
|
-
this.canvasId = s.id;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
setManifest(t) {
|
|
231
|
-
this.manifestId = t, this.canvasId = null, se.fetchManifest(t);
|
|
232
|
-
}
|
|
233
|
-
setCanvas(t) {
|
|
234
|
-
this.canvasId = t;
|
|
235
|
-
}
|
|
236
|
-
toggleAnnotations() {
|
|
237
|
-
this.showAnnotations = !this.showAnnotations;
|
|
238
|
-
}
|
|
239
|
-
toggleThumbnailGallery() {
|
|
240
|
-
this.showThumbnailGallery = !this.showThumbnailGallery;
|
|
241
|
-
}
|
|
242
|
-
toggleFullScreen() {
|
|
243
|
-
if (document.fullscreenElement)
|
|
244
|
-
document.exitFullscreen();
|
|
245
|
-
else {
|
|
246
|
-
const t = document.getElementById("triiiceratops-viewer");
|
|
247
|
-
t && t.requestFullscreen().catch((s) => {
|
|
248
|
-
console.warn("Fullscreen request failed", s);
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
toggleMetadataDialog() {
|
|
253
|
-
this.showMetadataDialog = !this.showMetadataDialog;
|
|
254
|
-
}
|
|
255
|
-
get searchQuery() {
|
|
256
|
-
return e.get(G(this, pe));
|
|
257
|
-
}
|
|
258
|
-
set searchQuery(t) {
|
|
259
|
-
e.set(G(this, pe), t, !0);
|
|
260
|
-
}
|
|
261
|
-
get searchResults() {
|
|
262
|
-
return e.get(G(this, me));
|
|
263
|
-
}
|
|
264
|
-
set searchResults(t) {
|
|
265
|
-
e.set(G(this, me), t, !0);
|
|
266
|
-
}
|
|
267
|
-
get isSearching() {
|
|
268
|
-
return e.get(G(this, be));
|
|
269
|
-
}
|
|
270
|
-
set isSearching(t) {
|
|
271
|
-
e.set(G(this, be), t, !0);
|
|
272
|
-
}
|
|
273
|
-
get showSearchPanel() {
|
|
274
|
-
return e.get(G(this, _e));
|
|
275
|
-
}
|
|
276
|
-
set showSearchPanel(t) {
|
|
277
|
-
e.set(G(this, _e), t, !0);
|
|
278
|
-
}
|
|
279
|
-
toggleSearchPanel() {
|
|
280
|
-
this.showSearchPanel = !this.showSearchPanel, this.showSearchPanel || (this.searchAnnotations = []);
|
|
281
|
-
}
|
|
282
|
-
get searchAnnotations() {
|
|
283
|
-
return e.get(G(this, ye));
|
|
284
|
-
}
|
|
285
|
-
set searchAnnotations(t) {
|
|
286
|
-
e.set(G(this, ye), t, !0);
|
|
287
|
-
}
|
|
288
|
-
get currentCanvasSearchAnnotations() {
|
|
289
|
-
return this.canvasId ? this.searchAnnotations.filter((t) => t.canvasId === this.canvasId) : [];
|
|
290
|
-
}
|
|
291
|
-
async search(t) {
|
|
292
|
-
var s, n;
|
|
293
|
-
if (t.trim()) {
|
|
294
|
-
this.isSearching = !0, this.searchQuery = t, this.searchResults = [];
|
|
295
|
-
try {
|
|
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
|
-
console.warn("No IIIF search service found in manifest"), this.isSearching = !1;
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
const y = `${g.id || g["@id"]}?q=${encodeURIComponent(t)}`, b = await fetch(y);
|
|
304
|
-
if (!b.ok) throw new Error("Search request failed");
|
|
305
|
-
const S = await b.json(), k = S.resources || [], P = [], i = (l) => {
|
|
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
|
-
};
|
|
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
|
-
try {
|
|
324
|
-
if (j.getLabel) {
|
|
325
|
-
const x = j.getLabel();
|
|
326
|
-
Array.isArray(x) && x.length > 0 ? L = x[0].value : typeof x == "string" && (L = x);
|
|
327
|
-
} else j.label && (typeof j.label == "string" ? L = j.label : Array.isArray(j.label) && (L = (s = j.label[0]) == null ? void 0 : s.value));
|
|
328
|
-
} catch {
|
|
329
|
-
}
|
|
330
|
-
P.push({
|
|
331
|
-
type: "hit",
|
|
332
|
-
before: l.before,
|
|
333
|
-
match: l.match,
|
|
334
|
-
after: l.after,
|
|
335
|
-
canvasIndex: m,
|
|
336
|
-
canvasLabel: String(L),
|
|
337
|
-
bounds: w
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
else if (k.length > 0)
|
|
344
|
-
for (const l of k) {
|
|
345
|
-
const u = typeof l.on == "string" ? l.on : l.on["@id"] || l.on.id, T = u.split("#")[0], v = i(u), r = this.canvases.findIndex((d) => d.id === T);
|
|
346
|
-
if (r >= 0) {
|
|
347
|
-
const d = this.canvases[r];
|
|
348
|
-
let w = "Canvas " + (r + 1);
|
|
349
|
-
try {
|
|
350
|
-
if (d.getLabel) {
|
|
351
|
-
const m = d.getLabel();
|
|
352
|
-
Array.isArray(m) && m.length > 0 ? w = m[0].value : typeof m == "string" && (w = m);
|
|
353
|
-
} else d.label && (typeof d.label == "string" ? w = d.label : Array.isArray(d.label) && (w = (n = d.label[0]) == null ? void 0 : n.value));
|
|
354
|
-
} catch {
|
|
355
|
-
}
|
|
356
|
-
P.push({
|
|
357
|
-
type: "resource",
|
|
358
|
-
match: l.resource && l.resource.chars ? l.resource.chars : l.chars || "",
|
|
359
|
-
canvasIndex: r,
|
|
360
|
-
canvasLabel: String(w),
|
|
361
|
-
bounds: v
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
this.searchResults = P, this.searchAnnotations = P.filter((l) => l.bounds).map((l, u) => {
|
|
366
|
-
const T = this.canvases[l.canvasIndex], v = `${T.id}#xywh=${l.bounds.join(",")}`;
|
|
367
|
-
return {
|
|
368
|
-
"@id": `urn:search-hit:${u}`,
|
|
369
|
-
"@type": "oa:Annotation",
|
|
370
|
-
motivation: "sc:painting",
|
|
371
|
-
on: v,
|
|
372
|
-
canvasId: T.id,
|
|
373
|
-
resource: { "@type": "cnt:ContentAsText", chars: l.match },
|
|
374
|
-
// Flag to identify styling in Overlay?
|
|
375
|
-
// Or just standard rendering.
|
|
376
|
-
isSearchHit: !0
|
|
377
|
-
};
|
|
378
|
-
});
|
|
379
|
-
} catch (c) {
|
|
380
|
-
console.error("Search error:", c);
|
|
381
|
-
} finally {
|
|
382
|
-
this.isSearching = !1;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
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
|
-
}
|
|
392
|
-
function Ie(a) {
|
|
393
|
-
if (!a) return null;
|
|
394
|
-
const t = a.match(/xywh=(\d+),(\d+),(\d+),(\d+)/);
|
|
395
|
-
return t ? {
|
|
396
|
-
x: parseInt(t[1], 10),
|
|
397
|
-
y: parseInt(t[2], 10),
|
|
398
|
-
w: parseInt(t[3], 10),
|
|
399
|
-
h: parseInt(t[4], 10)
|
|
400
|
-
} : null;
|
|
401
|
-
}
|
|
402
|
-
function it(a) {
|
|
403
|
-
const t = ot(a);
|
|
404
|
-
if (t)
|
|
405
|
-
return lt(t);
|
|
406
|
-
const s = ut(a);
|
|
407
|
-
return s ? {
|
|
408
|
-
type: "RECTANGLE",
|
|
409
|
-
x: s.x,
|
|
410
|
-
y: s.y,
|
|
411
|
-
w: s.w,
|
|
412
|
-
h: s.h
|
|
413
|
-
} : null;
|
|
414
|
-
}
|
|
415
|
-
function ot(a) {
|
|
416
|
-
var s, n;
|
|
417
|
-
if (typeof a.getTarget == "function") {
|
|
418
|
-
const c = ((s = a.__jsonld) == null ? void 0 : s.on) || ((n = a.__jsonld) == null ? void 0 : n.target);
|
|
419
|
-
if (c)
|
|
420
|
-
return Me(c);
|
|
421
|
-
}
|
|
422
|
-
const t = a.target || a.on;
|
|
423
|
-
return t ? Me(t) : null;
|
|
424
|
-
}
|
|
425
|
-
function Me(a) {
|
|
426
|
-
if (!a) return null;
|
|
427
|
-
if (Array.isArray(a))
|
|
428
|
-
for (const t of a) {
|
|
429
|
-
const s = Ee(t);
|
|
430
|
-
if (s) return s;
|
|
431
|
-
}
|
|
432
|
-
else
|
|
433
|
-
return Ee(a);
|
|
434
|
-
return null;
|
|
435
|
-
}
|
|
436
|
-
function Ee(a) {
|
|
437
|
-
var s;
|
|
438
|
-
if (!a) return null;
|
|
439
|
-
const t = a.selector || a;
|
|
440
|
-
return (t == null ? void 0 : t.type) === "SvgSelector" && t.value ? t.value : ((s = t == null ? void 0 : t.item) == null ? void 0 : s.type) === "SvgSelector" && t.item.value ? t.item.value : null;
|
|
441
|
-
}
|
|
442
|
-
function lt(a) {
|
|
443
|
-
try {
|
|
444
|
-
const s = new DOMParser().parseFromString(a, "image/svg+xml");
|
|
445
|
-
if (s.documentElement.nodeName === "parsererror")
|
|
446
|
-
return console.warn("Failed to parse SVG selector:", a), null;
|
|
447
|
-
const n = [], c = s.querySelectorAll("polygon");
|
|
448
|
-
for (const y of c) {
|
|
449
|
-
const b = y.getAttribute("points");
|
|
450
|
-
if (b) {
|
|
451
|
-
const S = ct(b);
|
|
452
|
-
n.push(...S);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
const g = s.querySelectorAll("path");
|
|
456
|
-
for (const y of g) {
|
|
457
|
-
const b = y.getAttribute("d");
|
|
458
|
-
if (b) {
|
|
459
|
-
const S = dt(b);
|
|
460
|
-
n.push(...S);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
const C = s.querySelectorAll("circle");
|
|
464
|
-
for (const y of C) {
|
|
465
|
-
const b = parseFloat(y.getAttribute("cx") || "0"), S = parseFloat(y.getAttribute("cy") || "0"), k = parseFloat(y.getAttribute("r") || "0"), P = gt(b, S, k);
|
|
466
|
-
n.push(...P);
|
|
467
|
-
}
|
|
468
|
-
return n.length === 0 ? null : {
|
|
469
|
-
type: "POLYGON",
|
|
470
|
-
points: n
|
|
471
|
-
};
|
|
472
|
-
} catch (t) {
|
|
473
|
-
return console.warn("Failed to convert SVG to polygon:", t), null;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
function ct(a) {
|
|
477
|
-
const t = [], s = a.trim().split(/\s+/);
|
|
478
|
-
for (const n of s) {
|
|
479
|
-
const [c, g] = n.split(",").map((C) => parseFloat(C));
|
|
480
|
-
!isNaN(c) && !isNaN(g) && t.push([c, g]);
|
|
481
|
-
}
|
|
482
|
-
return t;
|
|
483
|
-
}
|
|
484
|
-
function dt(a) {
|
|
485
|
-
const t = [], s = /[ML]\s*([\d.]+)[,\s]+([\d.]+)/g;
|
|
486
|
-
let n;
|
|
487
|
-
for (; (n = s.exec(a)) !== null; ) {
|
|
488
|
-
const c = parseFloat(n[1]), g = parseFloat(n[2]);
|
|
489
|
-
!isNaN(c) && !isNaN(g) && t.push([c, g]);
|
|
490
|
-
}
|
|
491
|
-
return t;
|
|
492
|
-
}
|
|
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
|
-
}
|
|
499
|
-
return c;
|
|
500
|
-
}
|
|
501
|
-
function ut(a) {
|
|
502
|
-
var s;
|
|
503
|
-
if (typeof a.getTarget == "function") {
|
|
504
|
-
const n = a.getTarget();
|
|
505
|
-
if (typeof n == "string" && n.includes("xywh="))
|
|
506
|
-
return Ie(n);
|
|
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
|
-
}
|
|
512
|
-
}
|
|
513
|
-
const t = a.target || a.on;
|
|
514
|
-
return t ? Te(t) : null;
|
|
515
|
-
}
|
|
516
|
-
function Te(a) {
|
|
517
|
-
if (!a) return null;
|
|
518
|
-
if (Array.isArray(a))
|
|
519
|
-
for (const t of a) {
|
|
520
|
-
const s = Te(t);
|
|
521
|
-
if (s) return s;
|
|
522
|
-
}
|
|
523
|
-
if (typeof a == "string" && a.includes("xywh="))
|
|
524
|
-
return Ie(a);
|
|
525
|
-
if (a.selector) {
|
|
526
|
-
const t = a.selector, s = t.item || t;
|
|
527
|
-
if (s.value && typeof s.value == "string" && s.value.includes("xywh="))
|
|
528
|
-
return Ie(s.value);
|
|
529
|
-
}
|
|
530
|
-
return null;
|
|
531
|
-
}
|
|
532
|
-
function ft(a) {
|
|
533
|
-
let t = "", s = !1;
|
|
534
|
-
if (typeof a.getBody == "function") {
|
|
535
|
-
const n = a.getBody();
|
|
536
|
-
if (n && Array.isArray(n)) {
|
|
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
|
-
}
|
|
545
|
-
}
|
|
546
|
-
t = c.join(" ");
|
|
547
|
-
}
|
|
548
|
-
} else {
|
|
549
|
-
const n = (g) => g && (g.chars || g.value || g["cnt:chars"]) || "", c = (g) => g ? g.format === "text/html" || g.type === "TextualBody" : !1;
|
|
550
|
-
if (a.resource) {
|
|
551
|
-
const g = Array.isArray(a.resource) ? a.resource : [a.resource];
|
|
552
|
-
t = g.map(n).filter(Boolean).join(" "), s = g.some(c);
|
|
553
|
-
} else if (a.body) {
|
|
554
|
-
const g = Array.isArray(a.body) ? a.body : [a.body];
|
|
555
|
-
t = g.map(n).filter(Boolean).join(" "), s = g.some(c);
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
return t || (typeof a.getLabel == "function" ? t = a.getLabel() || "" : a.label && (t = Array.isArray(a.label) ? a.label.join(" ") : a.label)), { value: t || "Annotation", isHtml: s };
|
|
559
|
-
}
|
|
560
|
-
function ht(a, t, s = !1) {
|
|
561
|
-
const n = Pe(a) || `anno-${t}`, c = it(a);
|
|
562
|
-
if (!c)
|
|
563
|
-
return null;
|
|
564
|
-
const g = ft(a);
|
|
565
|
-
return {
|
|
566
|
-
id: n,
|
|
567
|
-
geometry: c,
|
|
568
|
-
body: g,
|
|
569
|
-
isSearchHit: s
|
|
570
|
-
};
|
|
571
|
-
}
|
|
572
|
-
function vt(a, t = /* @__PURE__ */ new Set()) {
|
|
573
|
-
return a.map((s, n) => {
|
|
574
|
-
const c = t.has(Pe(s));
|
|
575
|
-
return ht(s, n, c);
|
|
576
|
-
}).filter((s) => s !== null);
|
|
577
|
-
}
|
|
578
|
-
var pt = e.from_html("<div></div>"), mt = e.from_svg('<svg class="absolute pointer-events-auto"><title> </title><polygon stroke-width="2"></polygon></svg>'), bt = e.from_html('<div class="w-full h-full relative"><div class="w-full h-full osd-background bg-base-100"></div> <!></div>');
|
|
579
|
-
function _t(a, t) {
|
|
580
|
-
e.push(t, !0);
|
|
581
|
-
let s = e.state(void 0), n = e.state(void 0), c = e.state(0), g = e.derived(() => {
|
|
582
|
-
if (!t.viewerState.manifestId || !t.viewerState.canvasId)
|
|
583
|
-
return [];
|
|
584
|
-
const i = se.getAnnotations(t.viewerState.manifestId, t.viewerState.canvasId), l = t.viewerState.currentCanvasSearchAnnotations;
|
|
585
|
-
return [...i, ...l];
|
|
586
|
-
}), C = e.derived(() => {
|
|
587
|
-
const i = /* @__PURE__ */ new Set();
|
|
588
|
-
return t.viewerState.currentCanvasSearchAnnotations.forEach((l) => {
|
|
589
|
-
const u = l.id || l["@id"];
|
|
590
|
-
u && i.add(u);
|
|
591
|
-
}), i;
|
|
592
|
-
}), y = e.derived(() => vt(e.get(g), e.get(C))), b = e.derived(() => {
|
|
593
|
-
if (e.get(c), !e.get(n) || !e.get(y).length)
|
|
594
|
-
return [];
|
|
595
|
-
const i = e.get(n).world.getItemAt(0);
|
|
596
|
-
if (!i)
|
|
597
|
-
return [];
|
|
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
|
-
continue;
|
|
603
|
-
} else continue;
|
|
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
|
-
type: "RECTANGLE",
|
|
609
|
-
rect: {
|
|
610
|
-
x: v.x,
|
|
611
|
-
y: v.y,
|
|
612
|
-
width: v.width,
|
|
613
|
-
height: v.height
|
|
614
|
-
},
|
|
615
|
-
isSearchHit: u.isSearchHit,
|
|
616
|
-
tooltip: u.body.value
|
|
617
|
-
});
|
|
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
|
-
});
|
|
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
|
-
type: "POLYGON",
|
|
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
|
-
});
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
return l;
|
|
638
|
-
});
|
|
639
|
-
qe(() => {
|
|
640
|
-
if (e.get(s))
|
|
641
|
-
return e.set(
|
|
642
|
-
n,
|
|
643
|
-
Ce({
|
|
644
|
-
element: e.get(s),
|
|
645
|
-
tileSources: null,
|
|
646
|
-
// Will be set via effect
|
|
647
|
-
prefixUrl: "",
|
|
648
|
-
// No navigation UI images needed
|
|
649
|
-
showNavigationControl: !1,
|
|
650
|
-
showHomeControl: !1,
|
|
651
|
-
showFullPageControl: !1,
|
|
652
|
-
showSequenceControl: !1,
|
|
653
|
-
showZoomControl: !1,
|
|
654
|
-
showRotationControl: !1,
|
|
655
|
-
animationTime: 0.5,
|
|
656
|
-
springStiffness: 7,
|
|
657
|
-
zoomPerClick: 2
|
|
658
|
-
}),
|
|
659
|
-
!0
|
|
660
|
-
), () => {
|
|
661
|
-
var i;
|
|
662
|
-
(i = e.get(n)) == null || i.destroy();
|
|
663
|
-
};
|
|
664
|
-
}), e.user_effect(() => {
|
|
665
|
-
if (!e.get(n)) return;
|
|
666
|
-
const i = () => {
|
|
667
|
-
e.update(c);
|
|
668
|
-
};
|
|
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
|
-
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);
|
|
671
|
-
};
|
|
672
|
-
}), e.user_effect(() => {
|
|
673
|
-
!e.get(n) || !t.tileSources || e.get(n).open(t.tileSources);
|
|
674
|
-
});
|
|
675
|
-
var S = bt(), k = e.child(S);
|
|
676
|
-
e.bind_this(k, (i) => e.set(s, i), () => e.get(s));
|
|
677
|
-
var P = e.sibling(k, 2);
|
|
678
|
-
e.each(P, 17, () => e.get(b), (i) => i.id, (i, l) => {
|
|
679
|
-
var u = e.comment(), T = e.first_child(u);
|
|
680
|
-
{
|
|
681
|
-
var v = (d) => {
|
|
682
|
-
var w = pt();
|
|
683
|
-
e.template_effect(() => {
|
|
684
|
-
e.set_class(w, 1, `absolute border-2 transition-colors cursor-pointer pointer-events-auto ${e.get(l).isSearchHit ? "border-yellow-400 bg-yellow-400/40 hover:bg-yellow-400/60" : "border-red-500 bg-red-500/20 hover:bg-red-500/40"}`), e.set_style(w, `
|
|
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
|
-
}, r = (d) => {
|
|
692
|
-
var w = e.comment(), m = e.first_child(w);
|
|
693
|
-
{
|
|
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
|
-
},
|
|
707
|
-
[() => e.get(l).points.map((o) => o.join(",")).join(" ")]
|
|
708
|
-
), e.append(L, x);
|
|
709
|
-
};
|
|
710
|
-
e.if(
|
|
711
|
-
m,
|
|
712
|
-
(L) => {
|
|
713
|
-
e.get(l).type === "POLYGON" && L(j);
|
|
714
|
-
},
|
|
715
|
-
!0
|
|
716
|
-
);
|
|
717
|
-
}
|
|
718
|
-
e.append(d, w);
|
|
719
|
-
};
|
|
720
|
-
e.if(T, (d) => {
|
|
721
|
-
e.get(l).type === "RECTANGLE" ? d(v) : d(r, !1);
|
|
722
|
-
});
|
|
723
|
-
}
|
|
724
|
-
e.append(i, u);
|
|
725
|
-
}), e.reset(S), e.append(a, S), e.pop();
|
|
726
|
-
}
|
|
727
|
-
const yt = "en";
|
|
728
|
-
let M = () => yt;
|
|
729
|
-
const xt = /* @__NO_SIDE_EFFECTS__ */ () => "Hello World", wt = /* @__NO_SIDE_EFFECTS__ */ () => "Search", St = /* @__NO_SIDE_EFFECTS__ */ () => "Close Search", At = /* @__NO_SIDE_EFFECTS__ */ () => "Search content...", It = /* @__NO_SIDE_EFFECTS__ */ (a) => `No results found for "${a.query}"`, Tt = /* @__NO_SIDE_EFFECTS__ */ () => "Enter a search term to find occurrences within this manifest.", $t = /* @__NO_SIDE_EFFECTS__ */ (a) => `${a.count} Results`, kt = /* @__NO_SIDE_EFFECTS__ */ () => "Manifest Metadata", Ct = /* @__NO_SIDE_EFFECTS__ */ () => "Loading...", jt = /* @__NO_SIDE_EFFECTS__ */ () => "Attribution", Lt = /* @__NO_SIDE_EFFECTS__ */ () => "License", Mt = /* @__NO_SIDE_EFFECTS__ */ () => "Close", Et = /* @__NO_SIDE_EFFECTS__ */ () => "Menu", Gt = /* @__NO_SIDE_EFFECTS__ */ () => "Search", Pt = /* @__NO_SIDE_EFFECTS__ */ () => "Toggle Search", zt = /* @__NO_SIDE_EFFECTS__ */ () => "Hide Gallery", Rt = /* @__NO_SIDE_EFFECTS__ */ () => "Show Gallery", Ft = /* @__NO_SIDE_EFFECTS__ */ () => "Exit Full Screen", Dt = /* @__NO_SIDE_EFFECTS__ */ () => "Enter Full Screen", Ht = /* @__NO_SIDE_EFFECTS__ */ () => "Hide Annotations", Nt = /* @__NO_SIDE_EFFECTS__ */ () => "Show Annotations", Vt = /* @__NO_SIDE_EFFECTS__ */ () => "Toggle Annotations", Bt = /* @__NO_SIDE_EFFECTS__ */ () => "Metadata", Ot = /* @__NO_SIDE_EFFECTS__ */ () => "Toggle Metadata", qt = /* @__NO_SIDE_EFFECTS__ */ () => "Hide All Annotations", Yt = /* @__NO_SIDE_EFFECTS__ */ () => "Show All Annotations", Xt = /* @__NO_SIDE_EFFECTS__ */ (a) => `${a.count} Annotations`, Qt = /* @__NO_SIDE_EFFECTS__ */ (a) => `(${a.count} visible)`, Ut = /* @__NO_SIDE_EFFECTS__ */ () => "(No content)", Kt = /* @__NO_SIDE_EFFECTS__ */ () => "No annotations available.", Wt = /* @__NO_SIDE_EFFECTS__ */ () => "Previous Canvas", Jt = /* @__NO_SIDE_EFFECTS__ */ () => "Next Canvas", Zt = /* @__NO_SIDE_EFFECTS__ */ () => "Docs", es = /* @__NO_SIDE_EFFECTS__ */ () => "IIIF Manifest:", ts = /* @__NO_SIDE_EFFECTS__ */ () => "Enter IIIF manifest URL", ss = /* @__NO_SIDE_EFFECTS__ */ () => "Load", as = /* @__NO_SIDE_EFFECTS__ */ () => "GitHub", ns = /* @__NO_SIDE_EFFECTS__ */ () => "Hallo Welt", rs = /* @__NO_SIDE_EFFECTS__ */ () => "Suche", is = /* @__NO_SIDE_EFFECTS__ */ () => "Suche schließen", os = /* @__NO_SIDE_EFFECTS__ */ () => "Inhalt durchsuchen...", ls = /* @__NO_SIDE_EFFECTS__ */ (a) => `Keine Ergebnisse für "${a.query}" gefunden`, cs = /* @__NO_SIDE_EFFECTS__ */ () => "Geben Sie einen Suchbegriff ein, um Vorkommen in diesem Manifest zu finden.", ds = /* @__NO_SIDE_EFFECTS__ */ (a) => `${a.count} Ergebnisse`, gs = /* @__NO_SIDE_EFFECTS__ */ () => "Manifest-Metadaten", us = /* @__NO_SIDE_EFFECTS__ */ () => "Lädt...", fs = /* @__NO_SIDE_EFFECTS__ */ () => "Quellenangabe", hs = /* @__NO_SIDE_EFFECTS__ */ () => "Lizenz", vs = /* @__NO_SIDE_EFFECTS__ */ () => "Schließen", ps = /* @__NO_SIDE_EFFECTS__ */ () => "Menü", ms = /* @__NO_SIDE_EFFECTS__ */ () => "Suche", bs = /* @__NO_SIDE_EFFECTS__ */ () => "Suche umschalten", _s = /* @__NO_SIDE_EFFECTS__ */ () => "Galerie ausblenden", ys = /* @__NO_SIDE_EFFECTS__ */ () => "Galerie einblenden", xs = /* @__NO_SIDE_EFFECTS__ */ () => "Vollbildmodus beenden", ws = /* @__NO_SIDE_EFFECTS__ */ () => "Vollbildmodus", Ss = /* @__NO_SIDE_EFFECTS__ */ () => "Annotationen ausblenden", As = /* @__NO_SIDE_EFFECTS__ */ () => "Annotationen einblenden", Is = /* @__NO_SIDE_EFFECTS__ */ () => "Annotationen umschalten", Ts = /* @__NO_SIDE_EFFECTS__ */ () => "Metadaten", $s = /* @__NO_SIDE_EFFECTS__ */ () => "Metadaten umschalten", ks = /* @__NO_SIDE_EFFECTS__ */ () => "Alle Annotationen ausblenden", Cs = /* @__NO_SIDE_EFFECTS__ */ () => "Alle Annotationen einblenden", js = /* @__NO_SIDE_EFFECTS__ */ (a) => `${a.count} Annotationen`, Ls = /* @__NO_SIDE_EFFECTS__ */ (a) => `(${a.count} sichtbar)`, Ms = /* @__NO_SIDE_EFFECTS__ */ () => "(Kein Inhalt)", Es = /* @__NO_SIDE_EFFECTS__ */ () => "Keine Annotationen verfügbar.", Gs = /* @__NO_SIDE_EFFECTS__ */ () => "Vorheriges Canvas", Ps = /* @__NO_SIDE_EFFECTS__ */ () => "Nächstes Canvas", zs = /* @__NO_SIDE_EFFECTS__ */ () => "Doku", Rs = /* @__NO_SIDE_EFFECTS__ */ () => "IIIF-Manifest:", Fs = /* @__NO_SIDE_EFFECTS__ */ () => "IIIF-Manifest-URL eingeben", Ds = /* @__NO_SIDE_EFFECTS__ */ () => "Laden", Hs = /* @__NO_SIDE_EFFECTS__ */ () => "GitHub", Ns = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
730
|
-
de: ns,
|
|
731
|
-
en: xt
|
|
732
|
-
})[t.languageTag ?? M()](), Vs = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
733
|
-
de: rs,
|
|
734
|
-
en: wt
|
|
735
|
-
})[t.languageTag ?? M()](), Bs = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
736
|
-
de: is,
|
|
737
|
-
en: St
|
|
738
|
-
})[t.languageTag ?? M()](), Os = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
739
|
-
de: os,
|
|
740
|
-
en: At
|
|
741
|
-
})[t.languageTag ?? M()](), qs = /* @__NO_SIDE_EFFECTS__ */ (a, t = {}) => ({
|
|
742
|
-
de: ls,
|
|
743
|
-
en: It
|
|
744
|
-
})[t.languageTag ?? M()](a), Ys = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
745
|
-
de: cs,
|
|
746
|
-
en: Tt
|
|
747
|
-
})[t.languageTag ?? M()](), Xs = /* @__NO_SIDE_EFFECTS__ */ (a, t = {}) => ({
|
|
748
|
-
de: ds,
|
|
749
|
-
en: $t
|
|
750
|
-
})[t.languageTag ?? M()](a), Qs = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
751
|
-
de: gs,
|
|
752
|
-
en: kt
|
|
753
|
-
})[t.languageTag ?? M()](), Us = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
754
|
-
de: us,
|
|
755
|
-
en: Ct
|
|
756
|
-
})[t.languageTag ?? M()](), Ks = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
757
|
-
de: fs,
|
|
758
|
-
en: jt
|
|
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
|
-
en: Et
|
|
768
|
-
})[t.languageTag ?? M()](), ea = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
769
|
-
de: ms,
|
|
770
|
-
en: Gt
|
|
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,
|
|
776
|
-
en: zt
|
|
777
|
-
})[t.languageTag ?? M()](), aa = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
778
|
-
de: ys,
|
|
779
|
-
en: Rt
|
|
780
|
-
})[t.languageTag ?? M()](), na = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
781
|
-
de: xs,
|
|
782
|
-
en: Ft
|
|
783
|
-
})[t.languageTag ?? M()](), ra = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
784
|
-
de: ws,
|
|
785
|
-
en: Dt
|
|
786
|
-
})[t.languageTag ?? M()](), ia = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
787
|
-
de: Ss,
|
|
788
|
-
en: Ht
|
|
789
|
-
})[t.languageTag ?? M()](), oa = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
790
|
-
de: As,
|
|
791
|
-
en: Nt
|
|
792
|
-
})[t.languageTag ?? M()](), la = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
793
|
-
de: Is,
|
|
794
|
-
en: Vt
|
|
795
|
-
})[t.languageTag ?? M()](), ca = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
796
|
-
de: Ts,
|
|
797
|
-
en: Bt
|
|
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
|
-
en: qt
|
|
804
|
-
})[t.languageTag ?? M()](), Re = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
805
|
-
de: Cs,
|
|
806
|
-
en: Yt
|
|
807
|
-
})[t.languageTag ?? M()](), Fe = /* @__NO_SIDE_EFFECTS__ */ (a, t = {}) => ({
|
|
808
|
-
de: js,
|
|
809
|
-
en: Xt
|
|
810
|
-
})[t.languageTag ?? M()](a), De = /* @__NO_SIDE_EFFECTS__ */ (a, t = {}) => ({
|
|
811
|
-
de: Ls,
|
|
812
|
-
en: Qt
|
|
813
|
-
})[t.languageTag ?? M()](a), ga = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
814
|
-
de: Ms,
|
|
815
|
-
en: Ut
|
|
816
|
-
})[t.languageTag ?? M()](), ua = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => ({
|
|
817
|
-
de: Es,
|
|
818
|
-
en: Kt
|
|
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,
|
|
824
|
-
en: Jt
|
|
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
|
-
__proto__: null,
|
|
842
|
-
annotations_count: Fe,
|
|
843
|
-
attribution: Ks,
|
|
844
|
-
close: Js,
|
|
845
|
-
docs: va,
|
|
846
|
-
enter_full_screen: ra,
|
|
847
|
-
exit_full_screen: na,
|
|
848
|
-
github: _a,
|
|
849
|
-
hello_world: Ns,
|
|
850
|
-
hide_all_annotations: ze,
|
|
851
|
-
hide_annotations: ia,
|
|
852
|
-
hide_gallery: sa,
|
|
853
|
-
iiif_manifest_label: pa,
|
|
854
|
-
license: Ws,
|
|
855
|
-
load: ba,
|
|
856
|
-
loading: Us,
|
|
857
|
-
manifest_placeholder: ma,
|
|
858
|
-
menu: Zs,
|
|
859
|
-
metadata: ca,
|
|
860
|
-
metadata_label_fallback: Qs,
|
|
861
|
-
next_canvas: ha,
|
|
862
|
-
no_annotations_available: ua,
|
|
863
|
-
no_content: ga,
|
|
864
|
-
previous_canvas: fa,
|
|
865
|
-
search: ea,
|
|
866
|
-
search_panel_close: Bs,
|
|
867
|
-
search_panel_instruction: Ys,
|
|
868
|
-
search_panel_no_results: qs,
|
|
869
|
-
search_panel_placeholder: Os,
|
|
870
|
-
search_panel_results_count: Xs,
|
|
871
|
-
search_panel_title: Vs,
|
|
872
|
-
show_all_annotations: Re,
|
|
873
|
-
show_annotations: oa,
|
|
874
|
-
show_gallery: aa,
|
|
875
|
-
toggle_annotations: la,
|
|
876
|
-
toggle_metadata: da,
|
|
877
|
-
toggle_search: ta,
|
|
878
|
-
visible_count: De
|
|
879
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
880
|
-
let He = e.state(e.proxy(M()));
|
|
881
|
-
const xa = {
|
|
882
|
-
get current() {
|
|
883
|
-
return e.get(He);
|
|
884
|
-
}
|
|
885
|
-
}, F = new Proxy(ya, {
|
|
886
|
-
get(a, t, s) {
|
|
887
|
-
return e.get(He), Reflect.get(a, t, s);
|
|
888
|
-
}
|
|
889
|
-
});
|
|
890
|
-
var wa = e.from_html('<div><button class="btn btn-circle btn-sm btn-ghost"><!></button> <span class="text-sm font-mono tabular-nums"> </span> <button class="btn btn-circle btn-sm btn-ghost"><!></button></div>');
|
|
891
|
-
function Sa(a, t) {
|
|
892
|
-
e.push(t, !0);
|
|
893
|
-
var s = wa(), n = e.child(s);
|
|
894
|
-
n.__click = () => t.viewerState.previousCanvas();
|
|
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
|
-
},
|
|
906
|
-
[() => F.previous_canvas(), () => F.next_canvas()]
|
|
907
|
-
), e.append(a, s), e.pop();
|
|
908
|
-
}
|
|
909
|
-
e.delegate(["click"]);
|
|
910
|
-
var Aa = e.from_html('<span class="text-xs opacity-50 truncate max-w-[150px]"> </span>'), Ia = e.from_html('<button class="w-full text-left p-3 hover:bg-base-300 transition-colors cursor-pointer flex gap-3 group/item items-start focus:outline-none focus:bg-base-300"><div class="btn btn-xs btn-circle btn-ghost mt-0.5 shrink-0 pointer-events-none"><!></div> <div class="flex-1 min-w-0"><div class="flex items-start justify-between"><span class="font-bold text-sm text-primary"></span> <!></div> <div><!></div></div></button>'), Ta = e.from_html('<div class="p-4 text-center opacity-50 text-sm">No annotations available.</div>'), $a = e.from_html('<div class="absolute top-4 right-4 z-500 pointer-events-auto"><details class="group relative"><summary class="flex items-center gap-2 bg-base-200/90 backdrop-blur shadow-lg rounded-full px-4 py-2 cursor-pointer list-none hover:bg-base-200 transition-all select-none border border-base-300 pointer-events-auto"><button class="btn btn-xs btn-circle btn-ghost"><!></button> <span class="text-sm font-medium"> <span class="opacity-50 text-xs font-normal ml-1"> </span></span> <!></summary> <div class="absolute right-0 mt-2 w-96 bg-base-200/95 backdrop-blur shadow-xl rounded-box p-0 max-h-[60vh] overflow-y-auto border border-base-300 flex flex-col divide-y divide-base-300"></div></details></div>');
|
|
911
|
-
function ka(a, t) {
|
|
912
|
-
e.push(t, !0);
|
|
913
|
-
const s = xe(ae);
|
|
914
|
-
let n = e.derived(() => {
|
|
915
|
-
if (!s.manifestId || !s.canvasId)
|
|
916
|
-
return [];
|
|
917
|
-
const i = se.getAnnotations(s.manifestId, s.canvasId), l = s.currentCanvasSearchAnnotations;
|
|
918
|
-
return [...i, ...l];
|
|
919
|
-
});
|
|
920
|
-
function c(i) {
|
|
921
|
-
return i.id || i["@id"] || (typeof i.getId == "function" ? i.getId() : "") || "";
|
|
922
|
-
}
|
|
923
|
-
e.user_effect(() => {
|
|
924
|
-
if (e.get(n).length > 0) {
|
|
925
|
-
const i = /* @__PURE__ */ new Set();
|
|
926
|
-
e.get(n).forEach((l) => {
|
|
927
|
-
const u = c(l);
|
|
928
|
-
u && i.add(u);
|
|
929
|
-
}), s.visibleAnnotationIds = i;
|
|
930
|
-
} else
|
|
931
|
-
s.visibleAnnotationIds = /* @__PURE__ */ new Set();
|
|
932
|
-
});
|
|
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
|
-
}));
|
|
937
|
-
function C(i) {
|
|
938
|
-
s.visibleAnnotationIds.has(i) ? s.visibleAnnotationIds.delete(i) : s.visibleAnnotationIds.add(i), s.visibleAnnotationIds = new Set(s.visibleAnnotationIds);
|
|
939
|
-
}
|
|
940
|
-
function y() {
|
|
941
|
-
if (e.get(g))
|
|
942
|
-
s.visibleAnnotationIds = /* @__PURE__ */ new Set();
|
|
943
|
-
else {
|
|
944
|
-
const i = /* @__PURE__ */ new Set();
|
|
945
|
-
e.get(n).forEach((l) => {
|
|
946
|
-
const u = c(l);
|
|
947
|
-
u && i.add(u);
|
|
948
|
-
}), s.visibleAnnotationIds = i;
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
let b = e.derived(() => e.get(n).length ? e.get(n).map((i) => {
|
|
952
|
-
let l = "", u = !1;
|
|
953
|
-
if (typeof i.getBody == "function") {
|
|
954
|
-
const T = i.getBody();
|
|
955
|
-
if (T && T.length) {
|
|
956
|
-
const v = (r) => {
|
|
957
|
-
const d = r.getValue ? r.getValue() : null;
|
|
958
|
-
return d || "";
|
|
959
|
-
};
|
|
960
|
-
l = T.map((r) => v(r)).filter(Boolean).join(" "), u = T.some((r) => {
|
|
961
|
-
const d = r.getFormat ? r.getFormat() : "";
|
|
962
|
-
return d === "text/html" || d === "application/html";
|
|
963
|
-
});
|
|
964
|
-
}
|
|
965
|
-
if (!l && typeof i.getLabel == "function") {
|
|
966
|
-
const v = i.getLabel();
|
|
967
|
-
v && (l = v);
|
|
968
|
-
}
|
|
969
|
-
} else {
|
|
970
|
-
const T = (r) => r && (r.chars || r.value || r["cnt:chars"]) || "", v = (r) => r ? r.format === "text/html" || r.type === "TextualBody" : !1;
|
|
971
|
-
if (i.resource ? Array.isArray(i.resource) ? (l = i.resource.map((r) => T(r)).join(" "), i.resource.some((r) => v(r)) && (u = !0)) : (l = T(i.resource), v(i.resource) && (u = !0)) : i.body && (Array.isArray(i.body) ? (l = i.body.map((r) => T(r)).join(" "), i.body.some((r) => v(r)) && (u = !0)) : (l = T(i.body), v(i.body) && (u = !0))), !l) {
|
|
972
|
-
const r = i.label || i.name || i.title;
|
|
973
|
-
r && (l = Array.isArray(r) ? r.join(" ") : r);
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
return {
|
|
977
|
-
id: c(i),
|
|
978
|
-
content: l,
|
|
979
|
-
isHtml: u,
|
|
980
|
-
label: (typeof i.getLabel == "function" ? i.getLabel() : i.label) || ""
|
|
981
|
-
};
|
|
982
|
-
}) : []);
|
|
983
|
-
var S = e.comment(), k = e.first_child(S);
|
|
984
|
-
{
|
|
985
|
-
var P = (i) => {
|
|
986
|
-
var l = $a(), u = e.child(l), T = e.child(u), v = e.child(T);
|
|
987
|
-
v.__click = (p) => {
|
|
988
|
-
p.preventDefault(), y();
|
|
989
|
-
};
|
|
990
|
-
var r = e.child(v);
|
|
991
|
-
{
|
|
992
|
-
var d = (p) => {
|
|
993
|
-
je(p, { size: 16, weight: "bold" });
|
|
994
|
-
}, w = (p) => {
|
|
995
|
-
Le(p, { size: 16, weight: "bold" });
|
|
996
|
-
};
|
|
997
|
-
e.if(r, (p) => {
|
|
998
|
-
e.get(g) ? p(d) : p(w, !1);
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
e.reset(v);
|
|
1002
|
-
var m = e.sibling(v, 2), j = e.child(m), L = e.sibling(j), x = e.child(L, !0);
|
|
1003
|
-
e.reset(L), e.reset(m);
|
|
1004
|
-
var _ = e.sibling(m, 2);
|
|
1005
|
-
Ke(_, {
|
|
1006
|
-
size: 16,
|
|
1007
|
-
weight: "bold",
|
|
1008
|
-
class: "group-open:rotate-180 transition-transform opacity-80"
|
|
1009
|
-
}), e.reset(T);
|
|
1010
|
-
var z = e.sibling(T, 2);
|
|
1011
|
-
e.each(
|
|
1012
|
-
z,
|
|
1013
|
-
21,
|
|
1014
|
-
() => e.get(b),
|
|
1015
|
-
e.index,
|
|
1016
|
-
(p, o, h) => {
|
|
1017
|
-
const A = e.derived(() => s.visibleAnnotationIds.has(e.get(o).id));
|
|
1018
|
-
var f = Ia();
|
|
1019
|
-
f.__click = (H) => {
|
|
1020
|
-
H.preventDefault(), C(e.get(o).id);
|
|
1021
|
-
};
|
|
1022
|
-
var R = e.child(f), $ = e.child(R);
|
|
1023
|
-
{
|
|
1024
|
-
var I = (H) => {
|
|
1025
|
-
je(H, { size: 16, weight: "bold" });
|
|
1026
|
-
}, E = (H) => {
|
|
1027
|
-
Le(H, { size: 16, weight: "bold" });
|
|
1028
|
-
};
|
|
1029
|
-
e.if($, (H) => {
|
|
1030
|
-
e.get(A) ? H(I) : H(E, !1);
|
|
1031
|
-
});
|
|
1032
|
-
}
|
|
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
|
-
{
|
|
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
|
-
};
|
|
1042
|
-
e.if(D, (H) => {
|
|
1043
|
-
e.get(o).label && e.get(o).label !== e.get(o).content && H(O);
|
|
1044
|
-
});
|
|
1045
|
-
}
|
|
1046
|
-
e.reset(V);
|
|
1047
|
-
var q = e.sibling(V, 2), U = e.child(q);
|
|
1048
|
-
{
|
|
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
|
-
var X = e.text();
|
|
1054
|
-
e.template_effect(() => e.set_text(X, e.get(o).content || "(No content)")), e.append(H, X);
|
|
1055
|
-
};
|
|
1056
|
-
e.if(U, (H) => {
|
|
1057
|
-
e.get(o).isHtml ? H(K) : H(Q, !1);
|
|
1058
|
-
});
|
|
1059
|
-
}
|
|
1060
|
-
e.reset(q), e.reset(N), e.reset(f), e.template_effect(() => e.set_class(q, 1, `text-sm prose prose-sm max-w-none prose-p:my-0 prose-a:text-blue-500 wrap-break-word text-left ${e.get(A) ? "" : "opacity-50"}`)), e.append(p, f);
|
|
1061
|
-
},
|
|
1062
|
-
(p) => {
|
|
1063
|
-
var o = Ta();
|
|
1064
|
-
e.append(p, o);
|
|
1065
|
-
}
|
|
1066
|
-
), e.reset(z), e.reset(u), e.reset(l), e.template_effect(
|
|
1067
|
-
(p, o, h) => {
|
|
1068
|
-
e.set_attribute(v, "title", p), e.set_text(j, `${o ?? ""} `), e.set_text(x, h);
|
|
1069
|
-
},
|
|
1070
|
-
[
|
|
1071
|
-
() => e.get(g) ? /* @__PURE__ */ ze() : /* @__PURE__ */ Re(),
|
|
1072
|
-
() => /* @__PURE__ */ Fe({ count: e.get(n).length }),
|
|
1073
|
-
() => /* @__PURE__ */ De({ count: s.visibleAnnotationIds.size })
|
|
1074
|
-
]
|
|
1075
|
-
), e.append(i, l);
|
|
1076
|
-
};
|
|
1077
|
-
e.if(k, (i) => {
|
|
1078
|
-
s.showAnnotations && i(P);
|
|
1079
|
-
});
|
|
1080
|
-
}
|
|
1081
|
-
e.append(a, S), e.pop();
|
|
1082
|
-
}
|
|
1083
|
-
e.delegate(["click"]);
|
|
1084
|
-
var Ca = e.from_html('<img class="object-contain w-full h-full" loading="lazy"/>'), ja = e.from_html('<span class="opacity-20 text-4xl">?</span>'), La = e.from_html('<button><div class="aspect-4/3 bg-base-300 rounded overflow-hidden relative w-full flex items-center justify-center"><!></div> <div class="text-xs font-medium truncate w-full opacity-70 group-hover:opacity-100"><span class="font-bold mr-1"> </span> </div></button>'), Ma = e.from_html('<div class="absolute bottom-0 right-0 w-6 h-6 cursor-se-resize resize-handle bg-accent hover:bg-accent-focus transition-colors z-50" style="clip-path: polygon(100% 0, 0 100%, 100% 100%);" role="button" tabindex="0" aria-label="Resize"></div>'), Ea = e.from_html('<div role="group"><span class="font-bold text-primary opacity-50">Dock Top</span></div> <div role="group"><span class="font-bold text-primary opacity-50">Dock Bottom</span></div> <div role="group"><span class="font-bold text-primary opacity-50 vertical-rl rotate-180" style="writing-mode: vertical-rl;">Dock Left</span></div> <div role="group"><span class="font-bold text-primary opacity-50 vertical-rl rotate-180" style="writing-mode: vertical-rl;">Dock Right</span></div>', 1), Ga = e.from_html('<div><button class="absolute top-1 right-1 btn btn-error btn-xs btn-circle z-20" aria-label="Close Gallery"><!></button> <div><div role="button" tabindex="0" aria-label="Drag Gallery"><div></div></div></div> <div><div></div></div> <!></div> <!>', 1);
|
|
1085
|
-
function Pa(a, t) {
|
|
1086
|
-
e.push(t, !0);
|
|
1087
|
-
const s = xe(ae);
|
|
1088
|
-
let n = e.state(e.proxy({ x: 20, y: 100 })), c = e.state(e.proxy({ width: 300, height: 400 })), g = e.state(!1), C = e.state(!1), y = { x: 0, y: 0 }, b = { x: 0, y: 0, w: 0, h: 0 }, S = e.state(void 0), k = e.derived(() => t.canvases ? t.canvases.map((_, z) => {
|
|
1089
|
-
let p = "";
|
|
1090
|
-
try {
|
|
1091
|
-
if (_.getThumbnail) {
|
|
1092
|
-
const o = _.getThumbnail();
|
|
1093
|
-
o && (p = typeof o == "string" ? o : o.id || o["@id"]);
|
|
1094
|
-
}
|
|
1095
|
-
} catch (o) {
|
|
1096
|
-
console.warn("Error getting thumbnail", o);
|
|
1097
|
-
}
|
|
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
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
return {
|
|
1144
|
-
id: _.id,
|
|
1145
|
-
label: _.getLabel().length ? _.getLabel()[0].value : `Canvas ${z + 1}`,
|
|
1146
|
-
src: p,
|
|
1147
|
-
index: z
|
|
1148
|
-
};
|
|
1149
|
-
}) : []);
|
|
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));
|
|
1156
|
-
}
|
|
1157
|
-
e.get(n).x = z, e.get(n).y = p;
|
|
1158
|
-
}
|
|
1159
|
-
function i() {
|
|
1160
|
-
const _ = e.get(d);
|
|
1161
|
-
e.set(g, !1), e.set(d, null), window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", i), _ && e.set(r, _, !0);
|
|
1162
|
-
}
|
|
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);
|
|
1170
|
-
}
|
|
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);
|
|
1175
|
-
}
|
|
1176
|
-
function T() {
|
|
1177
|
-
e.set(C, !1), window.removeEventListener("mousemove", u), window.removeEventListener("mouseup", T);
|
|
1178
|
-
}
|
|
1179
|
-
function v(_) {
|
|
1180
|
-
s.canvasId = _;
|
|
1181
|
-
}
|
|
1182
|
-
let r = e.state("bottom"), d = e.state(null);
|
|
1183
|
-
e.user_effect(() => {
|
|
1184
|
-
s.dockSide = e.get(r), s.isGalleryDockedBottom = e.get(r) === "bottom", s.isGalleryDockedRight = e.get(r) === "right";
|
|
1185
|
-
});
|
|
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")) {
|
|
1190
|
-
if (e.get(r) !== "none") {
|
|
1191
|
-
e.set(r, "none");
|
|
1192
|
-
const o = ((p = (z = e.get(S)) == null ? void 0 : z.parentElement) == null ? void 0 : p.getBoundingClientRect()) || { left: 0, top: 0 };
|
|
1193
|
-
e.set(c, { width: 300, height: 400 }, !0), e.set(
|
|
1194
|
-
n,
|
|
1195
|
-
{
|
|
1196
|
-
x: _.clientX - o.left - 150,
|
|
1197
|
-
// Center width
|
|
1198
|
-
y: _.clientY - o.top - 20
|
|
1199
|
-
// Offset slightly from top
|
|
1200
|
-
},
|
|
1201
|
-
!0
|
|
1202
|
-
);
|
|
1203
|
-
}
|
|
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);
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
var j = e.comment(), L = e.first_child(j);
|
|
1211
|
-
{
|
|
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);
|
|
1226
|
-
{
|
|
1227
|
-
var Q = (J) => {
|
|
1228
|
-
var Z = Ca();
|
|
1229
|
-
e.template_effect(() => {
|
|
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);
|
|
1235
|
-
};
|
|
1236
|
-
e.if(K, (J) => {
|
|
1237
|
-
e.get(O).src ? J(Q) : J(H, !1);
|
|
1238
|
-
});
|
|
1239
|
-
}
|
|
1240
|
-
e.reset(U);
|
|
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);
|
|
1244
|
-
e.reset(X), e.reset(q), e.template_effect(() => {
|
|
1245
|
-
e.set_class(q, 1, `group flex flex-col gap-1 p-1 rounded hover:bg-base-200 transition-colors text-left relative shrink-0 ${e.get(w) ? "w-[140px]" : ""} ${s.canvasId === e.get(O).id ? "ring-2 ring-primary bg-primary/5" : ""}`), e.set_attribute(q, "aria-label", `Select canvas ${e.get(O).label ?? ""}`), e.set_text(we, `${e.get(O).index + 1}.`), e.set_text(Se, ` ${e.get(O).label ?? ""}`);
|
|
1246
|
-
}), e.append(D, q);
|
|
1247
|
-
}), e.reset(I), e.reset($);
|
|
1248
|
-
var E = e.sibling($, 2);
|
|
1249
|
-
{
|
|
1250
|
-
var N = (D) => {
|
|
1251
|
-
var O = Ma();
|
|
1252
|
-
O.__mousedown = l, e.append(D, O);
|
|
1253
|
-
};
|
|
1254
|
-
e.if(E, (D) => {
|
|
1255
|
-
e.get(r) === "none" && D(N);
|
|
1256
|
-
});
|
|
1257
|
-
}
|
|
1258
|
-
e.reset(p), e.bind_this(p, (D) => e.set(S, D), () => e.get(S));
|
|
1259
|
-
var V = e.sibling(p, 2);
|
|
1260
|
-
{
|
|
1261
|
-
var B = (D) => {
|
|
1262
|
-
var O = Ea(), q = e.first_child(O), U = e.sibling(q, 2), K = e.sibling(U, 2), Q = e.sibling(K, 2);
|
|
1263
|
-
e.template_effect(() => {
|
|
1264
|
-
e.set_class(q, 1, `absolute top-2 left-2 right-2 h-16 rounded-xl border-4 border-dashed border-primary/40 z-950 flex items-center justify-center transition-all duration-200 ${e.get(d) === "top" ? "bg-primary/20 scale-105" : "bg-base-100/50"}`), e.set_class(U, 1, `absolute bottom-2 left-2 right-2 h-16 rounded-xl border-4 border-dashed border-primary/40 z-950 flex items-center justify-center transition-all duration-200 ${e.get(d) === "bottom" ? "bg-primary/20 scale-105" : "bg-base-100/50"}`), e.set_class(K, 1, `absolute top-2 bottom-2 left-2 w-16 rounded-xl border-4 border-dashed border-primary/40 z-950 flex items-center justify-center transition-all duration-200 ${e.get(d) === "left" ? "bg-primary/20 scale-105" : "bg-base-100/50"}`), e.set_class(Q, 1, `absolute top-2 bottom-2 w-16 rounded-xl border-4 border-dashed border-primary/40 z-950 flex items-center justify-center transition-all duration-300 ${s.showSearchPanel ? "right-[328px]" : "right-2"} ${e.get(d) === "right" ? "bg-primary/20 scale-105" : "bg-base-100/50"}`);
|
|
1265
|
-
}), e.event("mouseenter", q, () => e.set(d, "top")), e.event("mouseleave", q, () => e.set(d, null)), e.event("mouseenter", U, () => e.set(d, "bottom")), e.event("mouseleave", U, () => e.set(d, null)), e.event("mouseenter", K, () => e.set(d, "left")), e.event("mouseleave", K, () => e.set(d, null)), e.event("mouseenter", Q, () => e.set(d, "right")), e.event("mouseleave", Q, () => e.set(d, null)), e.append(D, O);
|
|
1266
|
-
};
|
|
1267
|
-
e.if(V, (D) => {
|
|
1268
|
-
e.get(g) && D(B);
|
|
1269
|
-
});
|
|
1270
|
-
}
|
|
1271
|
-
e.template_effect(() => {
|
|
1272
|
-
e.set_class(p, 1, (e.get(r) !== "none" ? `absolute z-900 bg-base-100 shadow-xl border-base-300 flex transition-all duration-200
|
|
1273
|
-
${e.get(r) === "bottom" ? "flex-row bottom-0 left-0 right-0 h-[140px] border-t" : ""}
|
|
1274
|
-
${e.get(r) === "top" ? "flex-row top-0 left-0 right-0 h-[140px] border-b" : ""}
|
|
1275
|
-
${e.get(r) === "left" ? "flex-col left-0 top-0 bottom-0 w-[200px] border-r" : ""}
|
|
1276
|
-
${e.get(r) === "right" ? `flex-col top-0 bottom-0 w-[200px] border-l ${s.showSearchPanel ? "right-80" : "right-0"}` : ""}` : "absolute z-900 bg-base-100 shadow-2xl rounded-lg flex flex-col border border-base-300 overflow-hidden") + (e.get(g) ? " pointer-events-none opacity-80" : "")), e.set_style(p, e.get(r) !== "none" ? "" : `left: ${e.get(n).x}px; top: ${e.get(n).y}px; width: ${e.get(c).width}px; height: ${e.get(c).height}px;`), e.set_class(A, 1, "bg-base-100 flex shrink-0 select-none relative " + (e.get(r) === "bottom" || e.get(r) === "top" ? "flex-row h-full items-center border-r border-base-200" : "flex-col w-full border-b border-base-200")), e.set_class(f, 1, "cursor-move flex items-center justify-center hover:bg-base-200/50 active:bg-base-200 transition-colors " + (e.get(r) === "bottom" || e.get(r) === "top" ? "w-8 h-full" : "h-6 w-full")), e.set_class(R, 1, "bg-base-300 rounded-full " + (e.get(r) === "bottom" || e.get(r) === "top" ? "w-1.5 h-12" : "w-12 h-1.5")), e.set_class($, 1, `flex-1 p-1 bg-base-100 ${e.get(w) ? "overflow-x-auto overflow-y-hidden" : "overflow-y-auto overflow-x-hidden"}`), e.set_class(I, 1, e.clsx(e.get(w) ? "flex flex-row gap-2 h-full items-center" : "grid gap-2")), e.set_style(I, e.get(w) ? "" : "grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));");
|
|
1277
|
-
}), e.append(_, z);
|
|
1278
|
-
};
|
|
1279
|
-
e.if(L, (_) => {
|
|
1280
|
-
s.showThumbnailGallery && _(x);
|
|
1281
|
-
});
|
|
1282
|
-
}
|
|
1283
|
-
e.append(a, j), e.pop();
|
|
1284
|
-
}
|
|
1285
|
-
e.delegate(["click", "mousedown"]);
|
|
1286
|
-
var za = e.from_html('<div><div tabindex="0" role="button" class="btn btn-lg btn-primary btn-circle shadow-xl"><!></div> <div class="fab-close tooltip tooltip-top"><button><!></button></div> <div class="tooltip tooltip-left"><button><!></button></div> <div class="tooltip tooltip-left"><button><!></button></div> <div class="tooltip tooltip-top"><button><!></button></div> <div class="tooltip tooltip-top"><button><!></button></div></div>');
|
|
1287
|
-
function Ra(a, t) {
|
|
1288
|
-
e.push(t, !1);
|
|
1289
|
-
const s = xe(ae);
|
|
1290
|
-
e.init();
|
|
1291
|
-
var n = za(), c = e.child(n), g = e.child(c);
|
|
1292
|
-
st(g, { size: 32, weight: "bold" }), e.reset(c);
|
|
1293
|
-
var C = e.sibling(c, 2), y = e.child(C);
|
|
1294
|
-
y.__click = () => s.toggleSearchPanel();
|
|
1295
|
-
var b = e.child(y);
|
|
1296
|
-
Ge(b, { size: 28, weight: "bold" }), e.reset(y), e.reset(C);
|
|
1297
|
-
var S = e.sibling(C, 2), k = e.child(S);
|
|
1298
|
-
k.__click = () => s.toggleThumbnailGallery();
|
|
1299
|
-
var P = e.child(k);
|
|
1300
|
-
at(P, { size: 28, weight: "bold" }), e.reset(k), e.reset(S);
|
|
1301
|
-
var i = e.sibling(S, 2), l = e.child(i);
|
|
1302
|
-
l.__click = () => s.toggleFullScreen();
|
|
1303
|
-
var u = e.child(l);
|
|
1304
|
-
{
|
|
1305
|
-
var T = (x) => {
|
|
1306
|
-
Ze(x, { size: 28, weight: "bold" });
|
|
1307
|
-
}, v = (x) => {
|
|
1308
|
-
et(x, { size: 28, weight: "bold" });
|
|
1309
|
-
};
|
|
1310
|
-
e.if(u, (x) => {
|
|
1311
|
-
s.isFullScreen ? x(T) : x(v, !1);
|
|
1312
|
-
});
|
|
1313
|
-
}
|
|
1314
|
-
e.reset(l), e.reset(i);
|
|
1315
|
-
var r = e.sibling(i, 2), d = e.child(r);
|
|
1316
|
-
d.__click = () => s.toggleAnnotations();
|
|
1317
|
-
var w = e.child(d);
|
|
1318
|
-
Je(w, { size: 28, weight: "bold" }), e.reset(d), e.reset(r);
|
|
1319
|
-
var m = e.sibling(r, 2), j = e.child(m);
|
|
1320
|
-
j.__click = () => s.toggleMetadataDialog();
|
|
1321
|
-
var L = e.child(j);
|
|
1322
|
-
tt(L, { size: 28, weight: "bold" }), e.reset(j), e.reset(m), e.reset(n), e.template_effect(
|
|
1323
|
-
(x, _, z, p, o, h, A, f, R, $) => {
|
|
1324
|
-
e.set_class(n, 1, `fab fab-flower fab-top-left absolute z-600 pointer-events-auto flex-col items-end transition-all duration-300 ${s.showSearchPanel ? s.showThumbnailGallery && s.isGalleryDockedRight ? "right-[540px]" : "right-[344px]" : s.showThumbnailGallery && s.isGalleryDockedRight ? "right-[220px]" : "right-6"} ${s.showThumbnailGallery && s.dockSide === "bottom" ? "bottom-40" : "bottom-6"}`), e.set_attribute(n, "data-tip", x), e.set_attribute(C, "data-tip", _), e.set_attribute(y, "aria-label", z), e.set_class(y, 1, e.clsx([
|
|
1325
|
-
"btn btn-circle btn-lg shadow-lg",
|
|
1326
|
-
s.showSearchPanel && "btn-primary",
|
|
1327
|
-
!s.showSearchPanel && "btn-neutral"
|
|
1328
|
-
])), e.set_attribute(S, "data-tip", p), e.set_attribute(k, "aria-label", o), e.set_class(k, 1, `btn btn-lg btn-circle shadow-lg ${s.showThumbnailGallery ? "btn-info" : "btn-neutral"}`), e.set_attribute(i, "data-tip", h), e.set_class(l, 1, `btn btn-circle btn-lg shadow-lg transition-all duration-300 ease-out ${s.isFullScreen ? "btn-warning" : "btn-neutral"}`), e.set_attribute(r, "data-tip", A), e.set_attribute(d, "aria-label", f), e.set_class(d, 1, `btn btn-lg btn-circle shadow-lg ${s.showAnnotations ? "btn-error" : "btn-neutral"}`), e.set_attribute(m, "data-tip", R), e.set_attribute(j, "aria-label", $), e.set_class(j, 1, `btn btn-lg btn-circle shadow-lg ${s.showMetadataDialog ? "btn-info" : "btn-neutral"}`);
|
|
1329
|
-
},
|
|
1330
|
-
[
|
|
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()
|
|
1341
|
-
]
|
|
1342
|
-
), e.append(a, n), e.pop();
|
|
1343
|
-
}
|
|
1344
|
-
e.delegate(["click"]);
|
|
1345
|
-
var Fa = e.from_html('<div class="mb-6 prose"><p><!></p></div>'), Da = e.from_html('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-2"><!></dd>', 1), Ha = e.from_html('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-2"><a target="_blank" rel="noreferrer" class="link link-primary break-all"> </a></dd>', 1), Na = e.from_html('<dt class="font-bold text-lg opacity-70 mt-6"> </dt> <dd class="text-sm ps-2"><!></dd>', 1), Va = e.from_html('<dialog class="modal absolute" style="position: absolute;"><div class="modal-box w-11/12 max-w-5xl"><form method="dialog"><button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2">✕</button></form> <h3 class="font-bold text-lg mb-4"> </h3> <div class="py-4 overflow-y-auto max-h-[70vh]"><!> <dl class="grid grid-cols-1 md:grid-cols-[200px_1fr]"><!> <!> <!></dl></div> <div class="modal-action"><form method="dialog"><button class="btn"> </button></form></div></div> <form method="dialog" class="modal-backdrop"><button> </button></form></dialog>');
|
|
1346
|
-
function Ba(a, t) {
|
|
1347
|
-
e.push(t, !0);
|
|
1348
|
-
const s = xe(ae);
|
|
1349
|
-
let n = e.derived(() => s.manifest), c = e.derived(() => {
|
|
1350
|
-
const f = xa.current;
|
|
1351
|
-
if (!e.get(n)) return [];
|
|
1352
|
-
const R = e.get(n).getMetadata();
|
|
1353
|
-
return R ? R.map(($) => {
|
|
1354
|
-
let I = "", E = "";
|
|
1355
|
-
const N = (V) => {
|
|
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 : "";
|
|
1360
|
-
}
|
|
1361
|
-
return String(V);
|
|
1362
|
-
};
|
|
1363
|
-
return $.getLabel ? I = N($.getLabel()) : $.label && (I = N($.label)), $.getValue ? E = N($.getValue()) : $.value && (E = N($.value)), { label: I, value: E };
|
|
1364
|
-
}) : [];
|
|
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);
|
|
1372
|
-
e.reset(i);
|
|
1373
|
-
var u = e.sibling(i, 2), T = e.child(u);
|
|
1374
|
-
{
|
|
1375
|
-
var v = (f) => {
|
|
1376
|
-
var R = Fa(), $ = e.child(R), I = e.child($);
|
|
1377
|
-
e.html(I, () => e.get(g)), e.reset($), e.reset(R), e.append(f, R);
|
|
1378
|
-
};
|
|
1379
|
-
e.if(T, (f) => {
|
|
1380
|
-
e.get(g) && f(v);
|
|
1381
|
-
});
|
|
1382
|
-
}
|
|
1383
|
-
var r = e.sibling(T, 2), d = e.child(r);
|
|
1384
|
-
{
|
|
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);
|
|
1390
|
-
};
|
|
1391
|
-
e.if(d, (f) => {
|
|
1392
|
-
e.get(C) && f(w);
|
|
1393
|
-
});
|
|
1394
|
-
}
|
|
1395
|
-
var m = e.sibling(d, 2);
|
|
1396
|
-
{
|
|
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));
|
|
1404
|
-
},
|
|
1405
|
-
[() => F.license()]
|
|
1406
|
-
), e.append(f, R);
|
|
1407
|
-
};
|
|
1408
|
-
e.if(m, (f) => {
|
|
1409
|
-
e.get(y) && f(j);
|
|
1410
|
-
});
|
|
1411
|
-
}
|
|
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, $);
|
|
1429
|
-
},
|
|
1430
|
-
[
|
|
1431
|
-
() => e.get(n) ? e.get(n).getLabel().length && e.get(n).getLabel()[0] ? e.get(n).getLabel()[0].value : F.metadata_label_fallback() : F.loading(),
|
|
1432
|
-
() => F.close(),
|
|
1433
|
-
() => F.close()
|
|
1434
|
-
]
|
|
1435
|
-
), e.append(a, b), e.pop();
|
|
1436
|
-
}
|
|
1437
|
-
e.delegate(["click"]);
|
|
1438
|
-
var Oa = e.from_html('<span class="loading loading-spinner loading-xs"></span>'), qa = e.from_html('<div class="flex justify-center p-8"><span class="loading loading-spinner loading-lg text-primary"></span></div>'), Ya = e.from_html('<div class="text-center opacity-50 p-4"> </div>'), Xa = e.from_html('<div class="text-center opacity-50 p-4 text-sm"> </div>'), Qa = e.from_html('<div class="leading-relaxed"><span><!></span> <span class="bg-yellow-200 text-yellow-900 font-bold px-0.5 rounded"><!></span> <span><!></span></div>'), Ua = e.from_html('<div class="leading-relaxed"> </div>'), Ka = e.from_html('<button class="w-full text-left card bg-base-100 shadow hover:shadow-md transition-all p-4 text-sm group border border-transparent hover:border-primary focus:outline-none focus:ring-2 focus:ring-primary"><div class="flex justify-between items-baseline mb-1"><span class="font-bold text-xs opacity-70 bg-base-200 px-1.5 py-0.5 rounded"> </span></div> <!></button>'), Wa = e.from_html('<div class="text-xs font-bold opacity-50 uppercase tracking-wider pb-2"> </div> <!>', 1), Ja = e.from_html('<div class="absolute top-0 right-0 h-full w-80 bg-base-200 shadow-2xl z-1000 transform transition-transform duration-300 flex flex-col border-l border-base-300" role="dialog"><div class="p-4 bg-base-300 flex justify-between items-center shrink-0"><h2 class="font-bold text-lg"> </h2> <button class="btn btn-sm btn-circle btn-ghost">✕</button></div> <div class="p-4 border-b border-base-300 shrink-0"><div class="join w-full"><input type="text" class="input input-bordered join-item w-full"/> <button class="btn btn-primary join-item"><!></button></div></div> <div class="flex-1 overflow-y-auto p-4 space-y-4"><!></div></div>');
|
|
1439
|
-
function Za(a, t) {
|
|
1440
|
-
e.push(t, !0);
|
|
1441
|
-
const s = xe(ae);
|
|
1442
|
-
let n = e.state(e.proxy(s.searchQuery));
|
|
1443
|
-
function c() {
|
|
1444
|
-
s.search(e.get(n));
|
|
1445
|
-
}
|
|
1446
|
-
function g(k) {
|
|
1447
|
-
k.key === "Enter" && c();
|
|
1448
|
-
}
|
|
1449
|
-
function C(k) {
|
|
1450
|
-
const P = s.canvases[k.canvasIndex];
|
|
1451
|
-
P && (s.canvasId = P.id);
|
|
1452
|
-
}
|
|
1453
|
-
var y = e.comment(), b = e.first_child(y);
|
|
1454
|
-
{
|
|
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);
|
|
1465
|
-
{
|
|
1466
|
-
var j = (o) => {
|
|
1467
|
-
var h = Oa();
|
|
1468
|
-
e.append(o, h);
|
|
1469
|
-
}, L = (o) => {
|
|
1470
|
-
Ge(o, { size: 20, weight: "bold" });
|
|
1471
|
-
};
|
|
1472
|
-
e.if(m, (o) => {
|
|
1473
|
-
s.isSearching ? o(j) : o(L, !1);
|
|
1474
|
-
});
|
|
1475
|
-
}
|
|
1476
|
-
e.reset(w), e.reset(r), e.reset(v);
|
|
1477
|
-
var x = e.sibling(v, 2), _ = e.child(x);
|
|
1478
|
-
{
|
|
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);
|
|
1484
|
-
{
|
|
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);
|
|
1492
|
-
{
|
|
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);
|
|
1505
|
-
var Se = e.sibling(X, 2);
|
|
1506
|
-
{
|
|
1507
|
-
var J = (te) => {
|
|
1508
|
-
var ee = Qa(), ne = e.child(ee), Ne = e.child(ne);
|
|
1509
|
-
e.html(Ne, () => e.get(Q).before), e.reset(ne);
|
|
1510
|
-
var Ae = e.sibling(ne, 2), Ve = e.child(Ae);
|
|
1511
|
-
e.html(Ve, () => e.get(Q).match), e.reset(Ae);
|
|
1512
|
-
var $e = e.sibling(Ae, 2), Be = e.child($e);
|
|
1513
|
-
e.html(Be, () => e.get(Q).after), e.reset($e), e.reset(ee), e.append(te, ee);
|
|
1514
|
-
}, Z = (te) => {
|
|
1515
|
-
var ee = Ua(), ne = e.child(ee, !0);
|
|
1516
|
-
e.reset(ee), e.template_effect(() => e.set_text(ne, e.get(Q).match)), e.append(te, ee);
|
|
1517
|
-
};
|
|
1518
|
-
e.if(Se, (te) => {
|
|
1519
|
-
e.get(Q).type === "hit" ? te(J) : te(Z, !1);
|
|
1520
|
-
});
|
|
1521
|
-
}
|
|
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);
|
|
1526
|
-
};
|
|
1527
|
-
e.if(
|
|
1528
|
-
E,
|
|
1529
|
-
(B) => {
|
|
1530
|
-
s.searchResults.length === 0 && !s.searchQuery ? B(N) : B(V, !1);
|
|
1531
|
-
},
|
|
1532
|
-
!0
|
|
1533
|
-
);
|
|
1534
|
-
}
|
|
1535
|
-
e.append($, I);
|
|
1536
|
-
};
|
|
1537
|
-
e.if(
|
|
1538
|
-
A,
|
|
1539
|
-
($) => {
|
|
1540
|
-
s.searchResults.length === 0 && s.searchQuery ? $(f) : $(R, !1);
|
|
1541
|
-
},
|
|
1542
|
-
!0
|
|
1543
|
-
);
|
|
1544
|
-
}
|
|
1545
|
-
e.append(o, h);
|
|
1546
|
-
};
|
|
1547
|
-
e.if(_, (o) => {
|
|
1548
|
-
s.isSearching ? o(z) : o(p, !1);
|
|
1549
|
-
});
|
|
1550
|
-
}
|
|
1551
|
-
e.reset(x), e.reset(P), e.template_effect(
|
|
1552
|
-
(o, h, A, f, R) => {
|
|
1553
|
-
e.set_attribute(P, "aria-label", o), e.set_text(u, h), e.set_attribute(T, "aria-label", A), e.set_attribute(d, "placeholder", f), e.set_attribute(w, "aria-label", R);
|
|
1554
|
-
},
|
|
1555
|
-
[
|
|
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()
|
|
1561
|
-
]
|
|
1562
|
-
), e.bind_value(d, () => e.get(n), (o) => e.set(n, o)), e.append(k, P);
|
|
1563
|
-
};
|
|
1564
|
-
e.if(b, (k) => {
|
|
1565
|
-
s.showSearchPanel && k(S);
|
|
1566
|
-
});
|
|
1567
|
-
}
|
|
1568
|
-
e.append(a, y), e.pop();
|
|
1569
|
-
}
|
|
1570
|
-
e.delegate(["click", "keydown"]);
|
|
1571
|
-
var en = e.from_html('<span class="loading loading-spinner loading-lg text-primary"></span>'), tn = e.from_html('<div class="text-error"> </div>'), sn = e.from_html('<div class="text-base-content/50">No image found</div>'), an = e.from_html("<!> <!>", 1), nn = e.from_html('<div id="triiiceratops-viewer" class="w-full h-full relative bg-base-100 flex items-center justify-center"><!> <!> <!> <!> <!> <!></div>');
|
|
1572
|
-
function An(a, t) {
|
|
1573
|
-
e.push(t, !0);
|
|
1574
|
-
const s = new rt();
|
|
1575
|
-
Ye(ae, s), e.user_effect(() => {
|
|
1576
|
-
t.manifestId && s.setManifest(t.manifestId);
|
|
1577
|
-
}), e.user_effect(() => {
|
|
1578
|
-
const r = () => {
|
|
1579
|
-
s.isFullScreen = !!document.fullscreenElement;
|
|
1580
|
-
};
|
|
1581
|
-
return document.addEventListener("fullscreenchange", r), () => {
|
|
1582
|
-
document.removeEventListener("fullscreenchange", r);
|
|
1583
|
-
};
|
|
1584
|
-
});
|
|
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);
|
|
1602
|
-
}
|
|
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
|
-
}
|
|
1620
|
-
}
|
|
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`;
|
|
1626
|
-
}
|
|
1627
|
-
return console.log("TriiiceratopsViewer: No service or ID found, returning raw URL"), { type: "image", url: x };
|
|
1628
|
-
});
|
|
1629
|
-
var y = nn(), b = e.child(y);
|
|
1630
|
-
{
|
|
1631
|
-
var S = (r) => {
|
|
1632
|
-
var d = en();
|
|
1633
|
-
e.append(r, d);
|
|
1634
|
-
}, k = (r) => {
|
|
1635
|
-
var d = e.comment(), w = e.first_child(d);
|
|
1636
|
-
{
|
|
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);
|
|
1642
|
-
{
|
|
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, {
|
|
1647
|
-
get tileSources() {
|
|
1648
|
-
return e.get(C);
|
|
1649
|
-
},
|
|
1650
|
-
get viewerState() {
|
|
1651
|
-
return s;
|
|
1652
|
-
}
|
|
1653
|
-
});
|
|
1654
|
-
}), e.append(o, h);
|
|
1655
|
-
}, p = (o) => {
|
|
1656
|
-
var h = sn();
|
|
1657
|
-
e.append(o, h);
|
|
1658
|
-
};
|
|
1659
|
-
e.if(
|
|
1660
|
-
_,
|
|
1661
|
-
(o) => {
|
|
1662
|
-
e.get(C) ? o(z) : o(p, !1);
|
|
1663
|
-
},
|
|
1664
|
-
!0
|
|
1665
|
-
);
|
|
1666
|
-
}
|
|
1667
|
-
e.append(L, x);
|
|
1668
|
-
};
|
|
1669
|
-
e.if(
|
|
1670
|
-
w,
|
|
1671
|
-
(L) => {
|
|
1672
|
-
var x;
|
|
1673
|
-
(x = e.get(n)) != null && x.error ? L(m) : L(j, !1);
|
|
1674
|
-
},
|
|
1675
|
-
!0
|
|
1676
|
-
);
|
|
1677
|
-
}
|
|
1678
|
-
e.append(r, d);
|
|
1679
|
-
};
|
|
1680
|
-
e.if(b, (r) => {
|
|
1681
|
-
var d;
|
|
1682
|
-
(d = e.get(n)) != null && d.isFetching ? r(S) : r(k, !1);
|
|
1683
|
-
});
|
|
1684
|
-
}
|
|
1685
|
-
var P = e.sibling(b, 2);
|
|
1686
|
-
{
|
|
1687
|
-
var i = (r) => {
|
|
1688
|
-
var d = an(), w = e.first_child(d);
|
|
1689
|
-
Sa(w, {
|
|
1690
|
-
get viewerState() {
|
|
1691
|
-
return s;
|
|
1692
|
-
}
|
|
1693
|
-
});
|
|
1694
|
-
var m = e.sibling(w, 2);
|
|
1695
|
-
Pa(m, {
|
|
1696
|
-
get canvases() {
|
|
1697
|
-
return e.get(c);
|
|
1698
|
-
}
|
|
1699
|
-
}), e.append(r, d);
|
|
1700
|
-
};
|
|
1701
|
-
e.if(P, (r) => {
|
|
1702
|
-
e.get(c).length > 1 && r(i);
|
|
1703
|
-
});
|
|
1704
|
-
}
|
|
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();
|
|
1713
|
-
}
|
|
1714
|
-
export {
|
|
1715
|
-
nt as ManifestsState,
|
|
1716
|
-
An as TriiiceratopsViewer,
|
|
1717
|
-
ae as VIEWER_STATE_KEY,
|
|
1718
|
-
rt as ViewerState
|
|
1719
|
-
};
|