triiiceratops 0.10.5 → 0.11.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.
Files changed (40) hide show
  1. package/dist/{ArrowCounterClockwise-C2bPi1fL.js → ArrowCounterClockwise-CN8KGaI0.js} +1 -1
  2. package/dist/{X-Hy7z8RKI.js → X-i_EmjXwW.js} +376 -359
  3. package/dist/actions/tooltip.d.ts +10 -0
  4. package/dist/actions/tooltip.js +107 -0
  5. package/dist/{annotation_tool_point-CVRtOCN5.js → annotation_tool_point-BpZXtX5D.js} +1 -1
  6. package/dist/components/CanvasNavigation.svelte +57 -21
  7. package/dist/components/DemoHeader.svelte +81 -40
  8. package/dist/components/OSDViewer.svelte +2 -1
  9. package/dist/components/Toolbar.svelte +294 -0
  10. package/dist/components/Toolbar.svelte.d.ts +3 -0
  11. package/dist/components/TriiiceratopsViewer.svelte +7 -13
  12. package/dist/{image_filters_reset-BOxhPxhP.js → image_filters_reset-CyWg622b.js} +1 -1
  13. package/dist/paraglide/messages/_index.d.ts +6 -3
  14. package/dist/paraglide/messages/_index.js +6 -3
  15. package/dist/paraglide/messages/{settings_toggle_right_menu.d.ts → open_menu.d.ts} +1 -1
  16. package/dist/paraglide/messages/open_menu.js +33 -0
  17. package/dist/paraglide/messages/{settings_submenu_right_menu_items.d.ts → settings_submenu_toolbar.d.ts} +1 -1
  18. package/dist/paraglide/messages/{settings_toggle_right_menu.js → settings_submenu_toolbar.js} +9 -9
  19. package/dist/paraglide/messages/settings_toggle_show_toggle.d.ts +4 -0
  20. package/dist/paraglide/messages/{settings_submenu_right_menu_items.js → settings_toggle_show_toggle.js} +9 -9
  21. package/dist/paraglide/messages/settings_toggle_zoom_controls.d.ts +4 -0
  22. package/dist/paraglide/messages/settings_toggle_zoom_controls.js +34 -0
  23. package/dist/paraglide/messages/settings_toolbar_open.d.ts +4 -0
  24. package/dist/paraglide/messages/settings_toolbar_open.js +34 -0
  25. package/dist/paraglide/messages/{settings_toggle_left_menu.d.ts → settings_toolbar_position.d.ts} +1 -1
  26. package/dist/paraglide/messages/{settings_toggle_left_menu.js → settings_toolbar_position.js} +9 -9
  27. package/dist/plugins/annotation-editor.js +3 -3
  28. package/dist/plugins/image-manipulation.js +3 -3
  29. package/dist/state/viewer.svelte.d.ts +7 -2
  30. package/dist/state/viewer.svelte.js +26 -5
  31. package/dist/triiiceratops-bundle.js +2767 -2533
  32. package/dist/triiiceratops-element.iife.js +17 -17
  33. package/dist/triiiceratops.css +1 -1
  34. package/dist/types/config.d.ts +24 -18
  35. package/dist/utils/annotationAdapter.test.js +32 -29
  36. package/package.json +1 -1
  37. package/dist/components/FloatingMenu.svelte +0 -208
  38. package/dist/components/FloatingMenu.svelte.d.ts +0 -3
  39. package/dist/components/LeftFab.svelte +0 -81
  40. package/dist/components/LeftFab.svelte.d.ts +0 -3
@@ -1,100 +1,100 @@
1
- var De = Object.defineProperty;
2
- var pe = (a) => {
1
+ var Vt = Object.defineProperty;
2
+ var vt = (a) => {
3
3
  throw TypeError(a);
4
4
  };
5
- var Re = (a, e, s) => e in a ? De(a, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[e] = s;
6
- var he = (a, e, s) => Re(a, typeof e != "symbol" ? e + "" : e, s), Ge = (a, e, s) => e.has(a) || pe("Cannot " + s);
7
- var n = (a, e, s) => (Ge(a, e, "read from private field"), s ? s.call(a) : e.get(a)), h = (a, e, s) => e.has(a) ? pe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, s);
8
- import * as t from "svelte/internal/client";
9
- import * as Be from "manifesto.js";
5
+ var Tt = (a, t, s) => t in a ? Vt(a, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[t] = s;
6
+ var ct = (a, t, s) => Tt(a, typeof t != "symbol" ? t + "" : t, s), Bt = (a, t, s) => t.has(a) || vt("Cannot " + s);
7
+ var n = (a, t, s) => (Bt(a, t, "read from private field"), s ? s.call(a) : t.get(a)), h = (a, t, s) => t.has(a) ? vt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(a) : t.set(a, s);
8
+ import * as e from "svelte/internal/client";
9
+ import * as Dt from "manifesto.js";
10
10
  import "svelte/internal/disclose-version";
11
- import { hasContext as Te, getContext as je } from "svelte";
12
- var E, D;
13
- class Ve {
11
+ import { hasContext as Gt, getContext as Rt } from "svelte";
12
+ var E, O;
13
+ class jt {
14
14
  constructor() {
15
- h(this, E, t.state(t.proxy({})));
16
- h(this, D, t.state(t.proxy(/* @__PURE__ */ new Map())));
15
+ h(this, E, e.state(e.proxy({})));
16
+ h(this, O, e.state(e.proxy(/* @__PURE__ */ new Map())));
17
17
  }
18
18
  get manifests() {
19
- return t.get(n(this, E));
19
+ return e.get(n(this, E));
20
20
  }
21
- set manifests(e) {
22
- t.set(n(this, E), e, !0);
21
+ set manifests(t) {
22
+ e.set(n(this, E), t, !0);
23
23
  }
24
24
  get userAnnotations() {
25
- return t.get(n(this, D));
25
+ return e.get(n(this, O));
26
26
  }
27
- set userAnnotations(e) {
28
- t.set(n(this, D), e, !0);
27
+ set userAnnotations(t) {
28
+ e.set(n(this, O), t, !0);
29
29
  }
30
30
  // === User Annotations API ===
31
- userAnnotationKey(e, s) {
32
- return `${e}::${s}`;
31
+ userAnnotationKey(t, s) {
32
+ return `${t}::${s}`;
33
33
  }
34
- setUserAnnotations(e, s, i) {
35
- const r = this.userAnnotationKey(e, s), d = new Map(this.userAnnotations);
34
+ setUserAnnotations(t, s, i) {
35
+ const r = this.userAnnotationKey(t, s), d = new Map(this.userAnnotations);
36
36
  d.set(r, i), this.userAnnotations = d;
37
37
  }
38
- clearUserAnnotations(e, s) {
39
- const i = this.userAnnotationKey(e, s);
38
+ clearUserAnnotations(t, s) {
39
+ const i = this.userAnnotationKey(t, s);
40
40
  if (this.userAnnotations.has(i)) {
41
41
  const r = new Map(this.userAnnotations);
42
42
  r.delete(i), this.userAnnotations = r;
43
43
  }
44
44
  }
45
- getUserAnnotations(e, s) {
46
- const i = this.userAnnotationKey(e, s);
45
+ getUserAnnotations(t, s) {
46
+ const i = this.userAnnotationKey(t, s);
47
47
  return this.userAnnotations.get(i) ?? [];
48
48
  }
49
49
  // === Manifest Fetching ===
50
- async fetchManifest(e) {
51
- if (!this.manifests[e]) {
52
- this.manifests[e] = { isFetching: !0 };
50
+ async fetchManifest(t) {
51
+ if (!this.manifests[t]) {
52
+ this.manifests[t] = { isFetching: !0 };
53
53
  try {
54
- const s = await fetch(e);
54
+ const s = await fetch(t);
55
55
  if (!s.ok)
56
56
  throw new Error(`HTTP error! status: ${s.status}`);
57
- const i = await s.json(), r = Be.parseManifest(i);
58
- this.manifests[e] = { json: i, manifesto: r, isFetching: !1 };
57
+ const i = await s.json(), r = Dt.parseManifest(i);
58
+ this.manifests[t] = { json: i, manifesto: r, isFetching: !1 };
59
59
  } catch (s) {
60
- this.manifests[e] = { error: s.message, isFetching: !1 };
60
+ this.manifests[t] = { error: s.message, isFetching: !1 };
61
61
  }
62
62
  }
63
63
  }
64
- getManifest(e) {
65
- const s = this.manifests[e];
64
+ getManifest(t) {
65
+ const s = this.manifests[t];
66
66
  return s == null ? void 0 : s.manifesto;
67
67
  }
68
- getManifestEntry(e) {
69
- return this.manifests[e];
68
+ getManifestEntry(t) {
69
+ return this.manifests[t];
70
70
  }
71
- async fetchAnnotationList(e) {
72
- if (!this.manifests[e])
71
+ async fetchAnnotationList(t) {
72
+ if (!this.manifests[t])
73
73
  try {
74
- const s = await fetch(e);
74
+ const s = await fetch(t);
75
75
  if (s.ok) {
76
76
  const i = await s.json();
77
- this.manifests[e] = { json: i };
77
+ this.manifests[t] = { json: i };
78
78
  } else
79
- console.error(`Failed to fetch annotation list: ${e}`);
79
+ console.error(`Failed to fetch annotation list: ${t}`);
80
80
  } catch (s) {
81
- console.error(`Error fetching annotation list: ${e}`, s);
81
+ console.error(`Error fetching annotation list: ${t}`, s);
82
82
  }
83
83
  }
84
- getCanvases(e) {
85
- const s = this.getManifest(e);
84
+ getCanvases(t) {
85
+ const s = this.getManifest(t);
86
86
  if (!s)
87
87
  return [];
88
88
  const i = s.getSequences();
89
89
  return !i || !i.length ? [] : i[0].getCanvases();
90
90
  }
91
- getAnnotations(e, s) {
92
- const i = this.manualGetAnnotations(e, s), r = this.getUserAnnotations(e, s);
91
+ getAnnotations(t, s) {
92
+ const i = this.manualGetAnnotations(t, s), r = this.getUserAnnotations(t, s);
93
93
  return [...i, ...r];
94
94
  }
95
95
  // We can refactor this to use Manifesto's resource handling later if needed.
96
- manualGetAnnotations(e, s) {
97
- const i = this.getManifest(e);
96
+ manualGetAnnotations(t, s) {
97
+ const i = this.getManifest(t);
98
98
  if (!i) return [];
99
99
  const r = i.getSequences()[0].getCanvasById(s);
100
100
  if (!r) return [];
@@ -107,8 +107,8 @@ class Ve {
107
107
  const w = this.manifests[v];
108
108
  if (w) {
109
109
  if (w.json) {
110
- const A = I(w.json);
111
- m.push(...A);
110
+ const b = I(w.json);
111
+ m.push(...b);
112
112
  }
113
113
  } else
114
114
  this.fetchAnnotationList(v);
@@ -119,8 +119,8 @@ class Ve {
119
119
  const w = this.manifests[v];
120
120
  if (w) {
121
121
  if (w.json) {
122
- const A = I(w.json);
123
- m.push(...A);
122
+ const b = I(w.json);
123
+ m.push(...b);
124
124
  }
125
125
  } else
126
126
  this.fetchAnnotationList(v);
@@ -128,172 +128,179 @@ class Ve {
128
128
  }), m;
129
129
  }
130
130
  }
131
- E = new WeakMap(), D = new WeakMap();
132
- const P = new Ve();
133
- var R, G, B, T, j, V, O, F, Q, Z, z, H, N, U, q, K, $, W, J, X, Y, ee, te, se, ne, ae;
134
- class at {
135
- constructor(e = null, s = null, i = []) {
136
- h(this, R, t.state(null));
137
- h(this, G, t.state(null));
138
- h(this, B, t.state(!1));
139
- h(this, T, t.state(!1));
140
- h(this, j, t.state(!1));
141
- h(this, V, t.state(!1));
142
- h(this, O, t.state(!1));
143
- h(this, F, t.state(!1));
144
- h(this, Q, t.state("bottom"));
145
- h(this, Z, t.state(t.proxy(/* @__PURE__ */ new Set())));
146
- h(this, z, t.state(t.proxy({})));
131
+ E = new WeakMap(), O = new WeakMap();
132
+ const P = new jt();
133
+ var V, T, B, D, G, R, j, F, Q, z, Z, H, N, U, q, K, $, W, J, X, Y, tt, et, st, nt, at, it;
134
+ class ie {
135
+ constructor(t = null, s = null, i = []) {
136
+ h(this, V, e.state(null));
137
+ h(this, T, e.state(null));
138
+ h(this, B, e.state(!1));
139
+ h(this, D, e.state(!1));
140
+ h(this, G, e.state(!1));
141
+ h(this, R, e.state(!1));
142
+ h(this, j, e.state(!1));
143
+ h(this, F, e.state(!1));
144
+ h(this, Q, e.state(!1));
145
+ h(this, z, e.state("bottom"));
146
+ h(this, Z, e.state(e.proxy(/* @__PURE__ */ new Set())));
147
+ h(this, H, e.state(e.proxy({})));
147
148
  h(
148
149
  this,
149
- H,
150
+ N,
150
151
  // Gallery State (Lifted for persistence during re-docking)
151
- t.state(t.proxy({ x: 20, y: 100 }))
152
+ e.state(e.proxy({ x: 20, y: 100 }))
152
153
  );
153
- h(this, N, t.state(t.proxy({ width: 300, height: 400 })));
154
- h(this, U, t.state(!1));
155
- h(this, q, t.state(t.proxy({ x: 0, y: 0 })));
156
- h(this, K, t.state(null));
157
- h(this, $, t.state(null));
158
- he(this, "eventTarget", null);
154
+ h(this, U, e.state(e.proxy({ width: 300, height: 400 })));
155
+ h(this, q, e.state(!1));
156
+ h(this, K, e.state(e.proxy({ x: 0, y: 0 })));
157
+ h(this, $, e.state(null));
158
+ h(this, W, e.state(null));
159
+ ct(this, "eventTarget", null);
159
160
  /**
160
161
  * Reference to the main viewer DOM element.
161
162
  * Used for fullscreen toggling.
162
163
  */
163
- he(this, "viewerElement", null);
164
- h(this, W, t.state(""));
165
- h(this, J, t.state(null));
166
- h(this, X, t.state(t.proxy([])));
167
- h(this, Y, t.state(!1));
168
- h(this, ee, t.state(!1));
169
- h(this, te, t.state(t.proxy([])));
164
+ ct(this, "viewerElement", null);
165
+ h(this, J, e.state(""));
166
+ h(this, X, e.state(null));
167
+ h(this, Y, e.state(e.proxy([])));
168
+ h(this, tt, e.state(!1));
169
+ h(this, et, e.state(!1));
170
+ h(this, st, e.state(e.proxy([])));
170
171
  h(
171
172
  this,
172
- se,
173
+ nt,
173
174
  // ==================== PLUGIN STATE ====================
174
175
  /** Plugin-registered menu buttons */
175
- t.state(t.proxy([]))
176
+ e.state(e.proxy([]))
176
177
  );
177
- h(this, ne, t.state(t.proxy([])));
178
- h(this, ae, t.state(null));
179
- he(this, "pluginEventHandlers", /* @__PURE__ */ new Map());
180
- this.manifestId = e || null, this.canvasId = s || null, this.manifestId && P.fetchManifest(this.manifestId);
178
+ h(this, at, e.state(e.proxy([])));
179
+ h(this, it, e.state(null));
180
+ ct(this, "pluginEventHandlers", /* @__PURE__ */ new Map());
181
+ this.manifestId = t || null, this.canvasId = s || null, this.manifestId && P.fetchManifest(this.manifestId);
181
182
  for (const r of i)
182
183
  this.registerPlugin(r);
183
184
  }
184
185
  get manifestId() {
185
- return t.get(n(this, R));
186
+ return e.get(n(this, V));
186
187
  }
187
- set manifestId(e) {
188
- t.set(n(this, R), e, !0);
188
+ set manifestId(t) {
189
+ e.set(n(this, V), t, !0);
189
190
  }
190
191
  get canvasId() {
191
- return t.get(n(this, G));
192
+ return e.get(n(this, T));
192
193
  }
193
- set canvasId(e) {
194
- t.set(n(this, G), e, !0);
194
+ set canvasId(t) {
195
+ e.set(n(this, T), t, !0);
195
196
  }
196
197
  get showAnnotations() {
197
- return t.get(n(this, B));
198
+ return e.get(n(this, B));
198
199
  }
199
- set showAnnotations(e) {
200
- t.set(n(this, B), e, !0);
200
+ set showAnnotations(t) {
201
+ e.set(n(this, B), t, !0);
201
202
  }
202
203
  get showThumbnailGallery() {
203
- return t.get(n(this, T));
204
+ return e.get(n(this, D));
204
205
  }
205
- set showThumbnailGallery(e) {
206
- t.set(n(this, T), e, !0);
206
+ set showThumbnailGallery(t) {
207
+ e.set(n(this, D), t, !0);
208
+ }
209
+ get toolbarOpen() {
210
+ return e.get(n(this, G));
211
+ }
212
+ set toolbarOpen(t) {
213
+ e.set(n(this, G), t, !0);
207
214
  }
208
215
  get isGalleryDockedBottom() {
209
- return t.get(n(this, j));
216
+ return e.get(n(this, R));
210
217
  }
211
- set isGalleryDockedBottom(e) {
212
- t.set(n(this, j), e, !0);
218
+ set isGalleryDockedBottom(t) {
219
+ e.set(n(this, R), t, !0);
213
220
  }
214
221
  get isGalleryDockedRight() {
215
- return t.get(n(this, V));
222
+ return e.get(n(this, j));
216
223
  }
217
- set isGalleryDockedRight(e) {
218
- t.set(n(this, V), e, !0);
224
+ set isGalleryDockedRight(t) {
225
+ e.set(n(this, j), t, !0);
219
226
  }
220
227
  get isFullScreen() {
221
- return t.get(n(this, O));
228
+ return e.get(n(this, F));
222
229
  }
223
- set isFullScreen(e) {
224
- t.set(n(this, O), e, !0);
230
+ set isFullScreen(t) {
231
+ e.set(n(this, F), t, !0);
225
232
  }
226
233
  get showMetadataDialog() {
227
- return t.get(n(this, F));
234
+ return e.get(n(this, Q));
228
235
  }
229
- set showMetadataDialog(e) {
230
- t.set(n(this, F), e, !0);
236
+ set showMetadataDialog(t) {
237
+ e.set(n(this, Q), t, !0);
231
238
  }
232
239
  get dockSide() {
233
- return t.get(n(this, Q));
240
+ return e.get(n(this, z));
234
241
  }
235
- set dockSide(e) {
236
- t.set(n(this, Q), e, !0);
242
+ set dockSide(t) {
243
+ e.set(n(this, z), t, !0);
237
244
  }
238
245
  get visibleAnnotationIds() {
239
- return t.get(n(this, Z));
246
+ return e.get(n(this, Z));
240
247
  }
241
- set visibleAnnotationIds(e) {
242
- t.set(n(this, Z), e, !0);
248
+ set visibleAnnotationIds(t) {
249
+ e.set(n(this, Z), t, !0);
243
250
  }
244
251
  get config() {
245
- return t.get(n(this, z));
252
+ return e.get(n(this, H));
246
253
  }
247
- set config(e) {
248
- t.set(n(this, z), e, !0);
254
+ set config(t) {
255
+ e.set(n(this, H), t, !0);
249
256
  }
250
- get showRightMenu() {
251
- return this.config.showRightMenu ?? !0;
252
- }
253
- get showLeftMenu() {
254
- return this.config.showLeftMenu ?? !0;
257
+ get showToggle() {
258
+ return this.config.showToggle ?? !0;
255
259
  }
256
260
  get showCanvasNav() {
257
261
  return this.config.showCanvasNav ?? !0;
258
262
  }
263
+ get showZoomControls() {
264
+ return this.config.showZoomControls ?? !0;
265
+ }
259
266
  get galleryPosition() {
260
- return t.get(n(this, H));
267
+ return e.get(n(this, N));
261
268
  }
262
- set galleryPosition(e) {
263
- t.set(n(this, H), e, !0);
269
+ set galleryPosition(t) {
270
+ e.set(n(this, N), t, !0);
264
271
  }
265
272
  get gallerySize() {
266
- return t.get(n(this, N));
273
+ return e.get(n(this, U));
267
274
  }
268
- set gallerySize(e) {
269
- t.set(n(this, N), e, !0);
275
+ set gallerySize(t) {
276
+ e.set(n(this, U), t, !0);
270
277
  }
271
278
  get isGalleryDragging() {
272
- return t.get(n(this, U));
279
+ return e.get(n(this, q));
273
280
  }
274
- set isGalleryDragging(e) {
275
- t.set(n(this, U), e, !0);
281
+ set isGalleryDragging(t) {
282
+ e.set(n(this, q), t, !0);
276
283
  }
277
284
  get galleryDragOffset() {
278
- return t.get(n(this, q));
285
+ return e.get(n(this, K));
279
286
  }
280
- set galleryDragOffset(e) {
281
- t.set(n(this, q), e, !0);
287
+ set galleryDragOffset(t) {
288
+ e.set(n(this, K), t, !0);
282
289
  }
283
290
  get dragOverSide() {
284
- return t.get(n(this, K));
291
+ return e.get(n(this, $));
285
292
  }
286
- set dragOverSide(e) {
287
- t.set(n(this, K), e, !0);
293
+ set dragOverSide(t) {
294
+ e.set(n(this, $), t, !0);
288
295
  }
289
296
  get galleryCenterPanelRect() {
290
- return t.get(n(this, $));
297
+ return e.get(n(this, W));
291
298
  }
292
- set galleryCenterPanelRect(e) {
293
- t.set(n(this, $), e, !0);
299
+ set galleryCenterPanelRect(t) {
300
+ e.set(n(this, W), t, !0);
294
301
  }
295
- setEventTarget(e) {
296
- this.eventTarget = e;
302
+ setEventTarget(t) {
303
+ this.eventTarget = t;
297
304
  }
298
305
  /**
299
306
  * Get current state as a plain object snapshot.
@@ -302,14 +309,15 @@ class at {
302
309
  * which can cause infinite loops when it auto-sets canvasId.
303
310
  */
304
311
  getSnapshot() {
305
- let e = -1;
306
- return this.manifestId && this.canvasId && (e = P.getCanvases(this.manifestId).findIndex((i) => (i.id || i["@id"] || (i.getCanvasId ? i.getCanvasId() : null) || (i.getId ? i.getId() : null)) === this.canvasId)), {
312
+ let t = -1;
313
+ return this.manifestId && this.canvasId && (t = P.getCanvases(this.manifestId).findIndex((i) => (i.id || i["@id"] || (i.getCanvasId ? i.getCanvasId() : null) || (i.getId ? i.getId() : null)) === this.canvasId)), {
307
314
  manifestId: this.manifestId,
308
315
  canvasId: this.canvasId,
309
- currentCanvasIndex: e,
316
+ currentCanvasIndex: t,
310
317
  showAnnotations: this.showAnnotations,
311
318
  showThumbnailGallery: this.showThumbnailGallery,
312
319
  showSearchPanel: this.showSearchPanel,
320
+ toolbarOpen: this.toolbarOpen,
313
321
  searchQuery: this.searchQuery,
314
322
  isFullScreen: this.isFullScreen,
315
323
  dockSide: this.dockSide
@@ -322,10 +330,10 @@ class at {
322
330
  * Uses queueMicrotask to dispatch asynchronously AFTER the current
323
331
  * reactive cycle completes, preventing infinite update loops.
324
332
  */
325
- dispatchStateChange(e = "statechange") {
326
- console.log(`[ViewerState] Dispatching ${e}`, JSON.stringify(this.getSnapshot())), this.eventTarget && queueMicrotask(() => {
333
+ dispatchStateChange(t = "statechange") {
334
+ console.log(`[ViewerState] Dispatching ${t}`, JSON.stringify(this.getSnapshot())), this.eventTarget && queueMicrotask(() => {
327
335
  var s;
328
- (s = this.eventTarget) == null || s.dispatchEvent(new CustomEvent(e, { detail: this.getSnapshot(), bubbles: !0, composed: !0 }));
336
+ (s = this.eventTarget) == null || s.dispatchEvent(new CustomEvent(t, { detail: this.getSnapshot(), bubbles: !0, composed: !0 }));
329
337
  });
330
338
  }
331
339
  get manifest() {
@@ -338,7 +346,7 @@ class at {
338
346
  return this.manifestId ? P.getCanvases(this.manifestId) : [];
339
347
  }
340
348
  get currentCanvasIndex() {
341
- return this.canvasId ? this.canvases.findIndex((e) => (e.id || e["@id"] || (e.getCanvasId ? e.getCanvasId() : null) || (e.getId ? e.getId() : null)) === this.canvasId) : this.canvases.length > 0 ? 0 : -1;
349
+ return this.canvasId ? this.canvases.findIndex((t) => (t.id || t["@id"] || (t.getCanvasId ? t.getCanvasId() : null) || (t.getId ? t.getId() : null)) === this.canvasId) : this.canvases.length > 0 ? 0 : -1;
342
350
  }
343
351
  get hasNext() {
344
352
  return this.currentCanvasIndex < this.canvases.length - 1;
@@ -348,47 +356,56 @@ class at {
348
356
  }
349
357
  nextCanvas() {
350
358
  if (this.hasNext) {
351
- const e = this.currentCanvasIndex + 1, s = this.canvases[e];
359
+ const t = this.currentCanvasIndex + 1, s = this.canvases[t];
352
360
  this.setCanvas(s.id);
353
361
  }
354
362
  }
355
363
  previousCanvas() {
356
364
  if (this.hasPrevious) {
357
- const e = this.currentCanvasIndex - 1, s = this.canvases[e];
365
+ const t = this.currentCanvasIndex - 1, s = this.canvases[t];
358
366
  this.setCanvas(s.id);
359
367
  }
360
368
  }
361
- setManifest(e) {
362
- this.manifestId = e, this.canvasId = null, P.fetchManifest(e), this.dispatchStateChange("manifestchange");
369
+ zoomIn() {
370
+ this.osdViewer && this.osdViewer.viewport && (this.osdViewer.viewport.zoomBy(1.2), this.osdViewer.viewport.applyConstraints());
363
371
  }
364
- setCanvas(e) {
365
- this.canvasId = e, this.dispatchStateChange("canvaschange");
372
+ zoomOut() {
373
+ this.osdViewer && this.osdViewer.viewport && (this.osdViewer.viewport.zoomBy(0.8), this.osdViewer.viewport.applyConstraints());
366
374
  }
367
- updateConfig(e) {
375
+ setManifest(t) {
376
+ this.manifestId = t, this.canvasId = null, P.fetchManifest(t), this.dispatchStateChange("manifestchange");
377
+ }
378
+ setCanvas(t) {
379
+ this.canvasId = t, this.dispatchStateChange("canvaschange");
380
+ }
381
+ updateConfig(t) {
368
382
  var i;
369
383
  const s = this.config;
370
- if (this.config = e, e.gallery && (e.gallery.open !== void 0 && (this.showThumbnailGallery = e.gallery.open), e.gallery.dockPosition !== void 0 && (this.dockSide = e.gallery.dockPosition)), e.search) {
371
- e.search.open !== void 0 && (this.showSearchPanel = e.search.open);
372
- const r = e.search.query, d = (i = s.search) == null ? void 0 : i.query;
384
+ if (this.config = t, t.toolbarOpen !== void 0 && (this.toolbarOpen = t.toolbarOpen), t.gallery && (t.gallery.open !== void 0 && (this.showThumbnailGallery = t.gallery.open), t.gallery.dockPosition !== void 0 && (this.dockSide = t.gallery.dockPosition)), t.search) {
385
+ t.search.open !== void 0 && (this.showSearchPanel = t.search.open);
386
+ const r = t.search.query, d = (i = s.search) == null ? void 0 : i.query;
373
387
  r !== void 0 && r !== d && r !== this.searchQuery && this._performSearch(r);
374
388
  }
375
- e.annotations && e.annotations.open !== void 0 && (this.showAnnotations = e.annotations.open);
389
+ t.annotations && t.annotations.open !== void 0 && (this.showAnnotations = t.annotations.open);
376
390
  }
377
391
  toggleAnnotations() {
378
392
  this.showAnnotations = !this.showAnnotations, this.dispatchStateChange();
379
393
  }
394
+ toggleToolbar() {
395
+ this.toolbarOpen = !this.toolbarOpen, this.dispatchStateChange();
396
+ }
380
397
  toggleThumbnailGallery() {
381
398
  this.showThumbnailGallery = !this.showThumbnailGallery, this.dispatchStateChange();
382
399
  }
383
- setViewerElement(e) {
384
- this.viewerElement = e;
400
+ setViewerElement(t) {
401
+ this.viewerElement = t;
385
402
  }
386
403
  toggleFullScreen() {
387
404
  if (document.fullscreenElement)
388
405
  document.exitFullscreen();
389
406
  else {
390
- const e = this.viewerElement || document.getElementById("triiiceratops-viewer");
391
- e ? e.requestFullscreen().catch((s) => {
407
+ const t = this.viewerElement || document.getElementById("triiiceratops-viewer");
408
+ t ? t.requestFullscreen().catch((s) => {
392
409
  console.warn("Fullscreen request failed", s);
393
410
  }) : console.warn("Cannot toggle fullscreen: Viewer element not found");
394
411
  }
@@ -397,58 +414,58 @@ class at {
397
414
  this.showMetadataDialog = !this.showMetadataDialog;
398
415
  }
399
416
  get searchQuery() {
400
- return t.get(n(this, W));
417
+ return e.get(n(this, J));
401
418
  }
402
- set searchQuery(e) {
403
- t.set(n(this, W), e, !0);
419
+ set searchQuery(t) {
420
+ e.set(n(this, J), t, !0);
404
421
  }
405
422
  get pendingSearchQuery() {
406
- return t.get(n(this, J));
423
+ return e.get(n(this, X));
407
424
  }
408
- set pendingSearchQuery(e) {
409
- t.set(n(this, J), e, !0);
425
+ set pendingSearchQuery(t) {
426
+ e.set(n(this, X), t, !0);
410
427
  }
411
428
  get searchResults() {
412
- return t.get(n(this, X));
429
+ return e.get(n(this, Y));
413
430
  }
414
- set searchResults(e) {
415
- t.set(n(this, X), e, !0);
431
+ set searchResults(t) {
432
+ e.set(n(this, Y), t, !0);
416
433
  }
417
434
  get isSearching() {
418
- return t.get(n(this, Y));
435
+ return e.get(n(this, tt));
419
436
  }
420
- set isSearching(e) {
421
- t.set(n(this, Y), e, !0);
437
+ set isSearching(t) {
438
+ e.set(n(this, tt), t, !0);
422
439
  }
423
440
  get showSearchPanel() {
424
- return t.get(n(this, ee));
441
+ return e.get(n(this, et));
425
442
  }
426
- set showSearchPanel(e) {
427
- t.set(n(this, ee), e, !0);
443
+ set showSearchPanel(t) {
444
+ e.set(n(this, et), t, !0);
428
445
  }
429
446
  toggleSearchPanel() {
430
447
  this.showSearchPanel = !this.showSearchPanel, this.showSearchPanel || (this.searchAnnotations = []), this.dispatchStateChange();
431
448
  }
432
449
  get searchAnnotations() {
433
- return t.get(n(this, te));
450
+ return e.get(n(this, st));
434
451
  }
435
- set searchAnnotations(e) {
436
- t.set(n(this, te), e, !0);
452
+ set searchAnnotations(t) {
453
+ e.set(n(this, st), t, !0);
437
454
  }
438
455
  get currentCanvasSearchAnnotations() {
439
- return this.canvasId ? this.searchAnnotations.filter((e) => e.canvasId === this.canvasId) : [];
456
+ return this.canvasId ? this.searchAnnotations.filter((t) => t.canvasId === this.canvasId) : [];
440
457
  }
441
- async search(e) {
442
- this.dispatchStateChange(), await this._performSearch(e), this.dispatchStateChange();
458
+ async search(t) {
459
+ this.dispatchStateChange(), await this._performSearch(t), this.dispatchStateChange();
443
460
  }
444
- async _performSearch(e) {
461
+ async _performSearch(t) {
445
462
  var s, i;
446
- if (e.trim()) {
447
- this.isSearching = !0, this.searchQuery = e, this.searchResults = [];
463
+ if (t.trim()) {
464
+ this.isSearching = !0, this.searchQuery = t, this.searchResults = [];
448
465
  try {
449
466
  const r = this.manifest;
450
467
  if (!r) {
451
- console.log("[ViewerState] Manifest not loaded, deferring search:", e), this.pendingSearchQuery = e;
468
+ console.log("[ViewerState] Manifest not loaded, deferring search:", t), this.pendingSearchQuery = t;
452
469
  return;
453
470
  }
454
471
  let d = r.getService("http://iiif.io/api/search/1/search") || r.getService("http://iiif.io/api/search/0/search");
@@ -456,9 +473,9 @@ class at {
456
473
  console.warn("No IIIF search service found in manifest"), this.isSearching = !1;
457
474
  return;
458
475
  }
459
- const I = `${d.id || d["@id"]}?q=${encodeURIComponent(e)}`, g = await fetch(I);
476
+ const I = `${d.id || d["@id"]}?q=${encodeURIComponent(t)}`, g = await fetch(I);
460
477
  if (!g.ok) throw new Error("Search request failed");
461
- const v = await g.json(), w = v.resources || [], A = /* @__PURE__ */ new Map(), ie = (o) => {
478
+ const v = await g.json(), w = v.resources || [], b = /* @__PURE__ */ new Map(), rt = (o) => {
462
479
  const c = typeof o == "string" ? o : o["@id"] || o.id;
463
480
  if (!c) return null;
464
481
  const u = c.split("#xywh=");
@@ -473,12 +490,12 @@ class at {
473
490
  for (const l of c) {
474
491
  const f = w.find((p) => p["@id"] === l || p.id === l);
475
492
  if (f && f.on) {
476
- const p = typeof f.on == "string" ? f.on : f.on["@id"] || f.on.id, fe = p.split("#")[0], k = ie(p), b = this.canvases.findIndex((x) => x.id === fe);
477
- b >= 0 && (u === -1 && (u = b), k && (y.push(k), S || (S = k)));
493
+ const p = typeof f.on == "string" ? f.on : f.on["@id"] || f.on.id, dt = p.split("#")[0], k = rt(p), A = this.canvases.findIndex((x) => x.id === dt);
494
+ A >= 0 && (u === -1 && (u = A), k && (y.push(k), S || (S = k)));
478
495
  }
479
496
  }
480
497
  if (u >= 0) {
481
- if (!A.has(u)) {
498
+ if (!b.has(u)) {
482
499
  const l = this.canvases[u];
483
500
  let f = "Canvas " + (u + 1);
484
501
  try {
@@ -488,9 +505,9 @@ class at {
488
505
  } else l.label && (typeof l.label == "string" ? f = l.label : Array.isArray(l.label) && (f = (s = l.label[0]) == null ? void 0 : s.value));
489
506
  } catch {
490
507
  }
491
- A.set(u, { canvasIndex: u, canvasLabel: String(f), hits: [] });
508
+ b.set(u, { canvasIndex: u, canvasLabel: String(f), hits: [] });
492
509
  }
493
- A.get(u).hits.push({
510
+ b.get(u).hits.push({
494
511
  type: "hit",
495
512
  before: _(o.before),
496
513
  match: _(o.match),
@@ -502,7 +519,7 @@ class at {
502
519
  }
503
520
  else if (w.length > 0)
504
521
  for (const o of w) {
505
- const c = typeof o.on == "string" ? o.on : o.on["@id"] || o.on.id, u = c.split("#")[0], S = ie(c), y = this.canvases.findIndex((l) => l.id === u);
522
+ const c = typeof o.on == "string" ? o.on : o.on["@id"] || o.on.id, u = c.split("#")[0], S = rt(c), y = this.canvases.findIndex((l) => l.id === u);
506
523
  if (y >= 0) {
507
524
  const l = this.canvases[y];
508
525
  let f = "Canvas " + (y + 1);
@@ -513,7 +530,7 @@ class at {
513
530
  } else l.label && (typeof l.label == "string" ? f = l.label : Array.isArray(l.label) && (f = (i = l.label[0]) == null ? void 0 : i.value));
514
531
  } catch {
515
532
  }
516
- A.has(y) || A.set(y, { canvasIndex: y, canvasLabel: String(f), hits: [] }), A.get(y).hits.push({
533
+ b.has(y) || b.set(y, { canvasIndex: y, canvasLabel: String(f), hits: [] }), b.get(y).hits.push({
517
534
  type: "resource",
518
535
  match: _(o.resource && o.resource.chars ? o.resource.chars : o.chars || ""),
519
536
  bounds: S,
@@ -521,14 +538,14 @@ class at {
521
538
  });
522
539
  }
523
540
  }
524
- this.searchResults = Array.from(A.values()).sort((o, c) => o.canvasIndex - c.canvasIndex);
525
- let ge = 0;
541
+ this.searchResults = Array.from(b.values()).sort((o, c) => o.canvasIndex - c.canvasIndex);
542
+ let ft = 0;
526
543
  this.searchAnnotations = this.searchResults.flatMap((o) => {
527
544
  const c = this.canvases[o.canvasIndex];
528
545
  return o.hits.flatMap((u) => (u.allBounds && u.allBounds.length > 0 ? u.allBounds : u.bounds ? [u.bounds] : []).map((y) => {
529
546
  const l = `${c.id}#xywh=${y.join(",")}`;
530
547
  return {
531
- "@id": `urn:search-hit:${ge++}`,
548
+ "@id": `urn:search-hit:${ft++}`,
532
549
  "@type": "oa:Annotation",
533
550
  motivation: "sc:painting",
534
551
  on: l,
@@ -548,51 +565,51 @@ class at {
548
565
  }
549
566
  }
550
567
  get pluginMenuButtons() {
551
- return t.get(n(this, se));
568
+ return e.get(n(this, nt));
552
569
  }
553
- set pluginMenuButtons(e) {
554
- t.set(n(this, se), e, !0);
570
+ set pluginMenuButtons(t) {
571
+ e.set(n(this, nt), t, !0);
555
572
  }
556
573
  get pluginPanels() {
557
- return t.get(n(this, ne));
574
+ return e.get(n(this, at));
558
575
  }
559
- set pluginPanels(e) {
560
- t.set(n(this, ne), e, !0);
576
+ set pluginPanels(t) {
577
+ e.set(n(this, at), t, !0);
561
578
  }
562
579
  get osdViewer() {
563
- return t.get(n(this, ae));
580
+ return e.get(n(this, it));
564
581
  }
565
- set osdViewer(e) {
566
- t.set(n(this, ae), e);
582
+ set osdViewer(t) {
583
+ e.set(n(this, it), t);
567
584
  }
568
- registerPlugin(e) {
569
- const s = e.id || `plugin-${Math.random().toString(36).substr(2, 9)}`;
570
- let i = t.state(!1);
585
+ registerPlugin(t) {
586
+ const s = t.id || `plugin-${Math.random().toString(36).substr(2, 9)}`;
587
+ let i = e.state(!1);
571
588
  const r = {
572
589
  id: `${s}:toggle`,
573
- icon: e.icon,
574
- tooltip: e.name,
590
+ icon: t.icon,
591
+ tooltip: t.name,
575
592
  onClick: () => {
576
- t.set(i, !t.get(i));
593
+ e.set(i, !e.get(i));
577
594
  },
578
- isActive: () => t.get(i),
595
+ isActive: () => e.get(i),
579
596
  order: 200
580
597
  // Default order for simple plugins
581
598
  }, d = {
582
599
  id: `${s}:panel`,
583
- component: e.panel,
584
- position: e.position || "left",
585
- isVisible: () => t.get(i),
600
+ component: t.panel,
601
+ position: t.position || "left",
602
+ isVisible: () => e.get(i),
586
603
  props: {
587
- ...e.props,
604
+ ...t.props,
588
605
  // Pass isOpen state and closer to component
589
- isOpen: t.get(i),
606
+ isOpen: e.get(i),
590
607
  close: () => {
591
- t.set(i, !1);
608
+ e.set(i, !1);
592
609
  }
593
610
  }
594
611
  };
595
- this.pluginMenuButtons = [...this.pluginMenuButtons, r], this.pluginPanels = [...this.pluginPanels, d], e.onInit && e.onInit(this);
612
+ this.pluginMenuButtons = [...this.pluginMenuButtons, r], this.pluginPanels = [...this.pluginPanels, d], t.onInit && t.onInit(this);
596
613
  }
597
614
  /**
598
615
  * Unregister a plugin's UI components by ID prefix.
@@ -600,8 +617,8 @@ class at {
600
617
  * since we don't have a handle on the plugin instance or its cleanup function anymore.
601
618
  * Plugins should manage their own cleanup via component lifecycle (onDestroy) if possible.
602
619
  */
603
- unregisterPlugin(e) {
604
- this.pluginMenuButtons = this.pluginMenuButtons.filter((s) => !s.id.startsWith(`${e}:`)), this.pluginPanels = this.pluginPanels.filter((s) => !s.id.startsWith(`${e}:`));
620
+ unregisterPlugin(t) {
621
+ this.pluginMenuButtons = this.pluginMenuButtons.filter((s) => !s.id.startsWith(`${t}:`)), this.pluginPanels = this.pluginPanels.filter((s) => !s.id.startsWith(`${t}:`));
605
622
  }
606
623
  /**
607
624
  * Notify that OSD viewer is ready.
@@ -609,8 +626,8 @@ class at {
609
626
  * Instead, plugins should use the OSDViewer instance from context or listen for 'osd-ready' event (if we emitted one).
610
627
  * But since we have direct access to osdViewer in this state, components can just react to it.
611
628
  */
612
- notifyOSDReady(e) {
613
- this.osdViewer = e;
629
+ notifyOSDReady(t) {
630
+ this.osdViewer = t;
614
631
  }
615
632
  /**
616
633
  * Cleanup everything.
@@ -619,32 +636,32 @@ class at {
619
636
  this.pluginMenuButtons = [], this.pluginPanels = [], this.pluginEventHandlers.clear();
620
637
  }
621
638
  }
622
- R = new WeakMap(), G = new WeakMap(), B = new WeakMap(), T = new WeakMap(), j = new WeakMap(), V = new WeakMap(), O = new WeakMap(), F = new WeakMap(), Q = new WeakMap(), Z = new WeakMap(), z = new WeakMap(), H = new WeakMap(), N = new WeakMap(), U = new WeakMap(), q = new WeakMap(), K = new WeakMap(), $ = new WeakMap(), W = new WeakMap(), J = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), ee = new WeakMap(), te = new WeakMap(), se = new WeakMap(), ne = new WeakMap(), ae = new WeakMap();
623
- const it = "triiiceratops:viewerState";
624
- let ve = Symbol("phosphor-svelte");
625
- function Oe() {
626
- return Te(ve) ? je(ve) : {};
639
+ V = new WeakMap(), T = new WeakMap(), B = new WeakMap(), D = new WeakMap(), G = new WeakMap(), R = new WeakMap(), j = new WeakMap(), F = new WeakMap(), Q = new WeakMap(), z = new WeakMap(), Z = new WeakMap(), H = new WeakMap(), N = new WeakMap(), U = new WeakMap(), q = new WeakMap(), K = new WeakMap(), $ = new WeakMap(), W = new WeakMap(), J = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), nt = new WeakMap(), at = new WeakMap(), it = new WeakMap();
640
+ const re = "triiiceratops:viewerState";
641
+ let mt = Symbol("phosphor-svelte");
642
+ function Ft() {
643
+ return Gt(mt) ? Rt(mt) : {};
627
644
  }
628
- const Fe = "en", de = (
645
+ const Qt = "en", pt = (
629
646
  /** @type {const} */
630
647
  ["en", "de"]
631
- ), ye = "PARAGLIDE_LOCALE", Qe = 3456e4, we = [
648
+ ), wt = "PARAGLIDE_LOCALE", zt = 3456e4, St = [
632
649
  "cookie",
633
650
  "globalVariable",
634
651
  "baseLocale"
635
652
  ];
636
653
  globalThis.__paraglide = {};
637
- let ce, me = !1, Se = () => {
654
+ let ut, yt = !1, bt = () => {
638
655
  let a;
639
- for (const e of we) {
640
- if (e === "cookie")
641
- a = Ne();
642
- else if (e === "baseLocale")
643
- a = Fe;
644
- else if (e === "globalVariable" && ce !== void 0)
645
- a = ce;
646
- else if (Ie(e) && ue.has(e)) {
647
- const s = ue.get(e);
656
+ for (const t of St) {
657
+ if (t === "cookie")
658
+ a = Ut();
659
+ else if (t === "baseLocale")
660
+ a = Qt;
661
+ else if (t === "globalVariable" && ut !== void 0)
662
+ a = ut;
663
+ else if (At(t) && gt.has(t)) {
664
+ const s = gt.get(t);
648
665
  if (s) {
649
666
  const i = s.getLocale();
650
667
  if (i instanceof Promise)
@@ -653,39 +670,39 @@ let ce, me = !1, Se = () => {
653
670
  }
654
671
  }
655
672
  if (a !== void 0) {
656
- const s = He(a);
657
- return me || (ce = s, me = !0, Ae(s, { reload: !1 })), s;
673
+ const s = Nt(a);
674
+ return yt || (ut = s, yt = !0, It(s, { reload: !1 })), s;
658
675
  }
659
676
  }
660
677
  throw new Error("No locale found. Read the docs https://inlang.com/m/gerre34r/library-inlang-paraglideJs/errors#no-locale-found");
661
678
  };
662
- const Ze = (a) => {
679
+ const Zt = (a) => {
663
680
  window.location.reload();
664
681
  };
665
- let Ae = (a, e) => {
682
+ let It = (a, t) => {
666
683
  const s = {
667
684
  reload: !0,
668
- ...e
685
+ ...t
669
686
  };
670
687
  let i;
671
688
  try {
672
- i = Se();
689
+ i = bt();
673
690
  } catch {
674
691
  }
675
692
  const r = [];
676
- for (const m of we)
693
+ for (const m of St)
677
694
  if (m === "globalVariable")
678
- ce = a;
695
+ ut = a;
679
696
  else if (m === "cookie") {
680
697
  if (typeof document > "u" || typeof window > "u")
681
698
  continue;
682
- const I = `${ye}=${a}; path=/; max-age=${Qe}`;
699
+ const I = `${wt}=${a}; path=/; max-age=${zt}`;
683
700
  document.cookie = I;
684
701
  } else {
685
702
  if (m === "baseLocale")
686
703
  continue;
687
- if (Ie(m) && ue.has(m)) {
688
- const I = ue.get(m);
704
+ if (At(m) && gt.has(m)) {
705
+ const I = gt.get(m);
689
706
  if (I) {
690
707
  let g = I.setLocale(a);
691
708
  g instanceof Promise && (g = g.catch((v) => {
@@ -697,7 +714,7 @@ let Ae = (a, e) => {
697
714
  }
698
715
  }
699
716
  const d = () => {
700
- s.reload && window.location && a !== i && Ze();
717
+ s.reload && window.location && a !== i && Zt();
701
718
  };
702
719
  if (r.length)
703
720
  return Promise.all(r).then(() => {
@@ -705,185 +722,185 @@ let Ae = (a, e) => {
705
722
  });
706
723
  d();
707
724
  };
708
- const rt = (a) => {
709
- Ae = /** @type {SetLocaleFn} */
725
+ const oe = (a) => {
726
+ It = /** @type {SetLocaleFn} */
710
727
  a;
711
728
  };
712
- function ze(a) {
713
- return typeof a != "string" ? !1 : a ? de.some((e) => e.toLowerCase() === a.toLowerCase()) : !1;
729
+ function Ht(a) {
730
+ return typeof a != "string" ? !1 : a ? pt.some((t) => t.toLowerCase() === a.toLowerCase()) : !1;
714
731
  }
715
- function He(a) {
732
+ function Nt(a) {
716
733
  if (typeof a != "string")
717
734
  throw new Error(`Invalid locale: ${a}. Expected a string.`);
718
- const e = a.toLowerCase(), s = de.find((i) => i.toLowerCase() === e);
735
+ const t = a.toLowerCase(), s = pt.find((i) => i.toLowerCase() === t);
719
736
  if (!s)
720
- throw new Error(`Invalid locale: ${a}. Expected one of: ${de.join(", ")}`);
737
+ throw new Error(`Invalid locale: ${a}. Expected one of: ${pt.join(", ")}`);
721
738
  return s;
722
739
  }
723
- function Ne() {
740
+ function Ut() {
724
741
  if (typeof document > "u" || !document.cookie)
725
742
  return;
726
- const a = document.cookie.match(new RegExp(`(^| )${ye}=([^;]+)`)), e = a == null ? void 0 : a[2];
727
- if (ze(e))
728
- return e;
743
+ const a = document.cookie.match(new RegExp(`(^| )${wt}=([^;]+)`)), t = a == null ? void 0 : a[2];
744
+ if (Ht(t))
745
+ return t;
729
746
  }
730
- const ue = /* @__PURE__ */ new Map();
731
- function Ie(a) {
747
+ const gt = /* @__PURE__ */ new Map();
748
+ function At(a) {
732
749
  return typeof a == "string" && /^custom-[A-Za-z0-9_-]+$/.test(a);
733
750
  }
734
- const Ue = (
751
+ const qt = (
735
752
  /** @type {(inputs: {}) => LocalizedString} */
736
753
  () => (
737
754
  /** @type {LocalizedString} */
738
755
  "Close"
739
756
  )
740
- ), qe = (
757
+ ), Kt = (
741
758
  /** @type {(inputs: {}) => LocalizedString} */
742
759
  () => (
743
760
  /** @type {LocalizedString} */
744
761
  "Schließen"
745
762
  )
746
- ), ot = /* @__NO_SIDE_EFFECTS__ */ (a = {}, e = {}) => (e.locale ?? Se()) === "en" ? Ue() : qe();
747
- var Ke = t.from_svg('<path d="M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"></path>'), $e = t.from_svg('<path d="M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z" opacity="0.2"></path><path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>', 1), We = t.from_svg('<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>'), Je = t.from_svg('<path d="M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"></path>'), Xe = t.from_svg('<path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>'), Ye = t.from_svg('<path d="M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"></path>'), et = t.from_svg('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
748
- function lt(a, e) {
749
- t.push(e, !0);
750
- const s = Oe();
751
- let i = t.rest_props(e, ["$$slots", "$$events", "$$legacy", "children"]), r = t.derived(() => e.weight ?? s.weight ?? "regular"), d = t.derived(() => e.color ?? s.color ?? "currentColor"), m = t.derived(() => e.size ?? s.size ?? "1em"), I = t.derived(() => e.mirrored ?? s.mirrored ?? !1);
763
+ ), le = /* @__NO_SIDE_EFFECTS__ */ (a = {}, t = {}) => (t.locale ?? bt()) === "en" ? qt() : Kt();
764
+ var $t = e.from_svg('<path d="M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"></path>'), Wt = e.from_svg('<path d="M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z" opacity="0.2"></path><path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>', 1), Jt = e.from_svg('<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>'), Xt = e.from_svg('<path d="M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"></path>'), Yt = e.from_svg('<path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>'), te = e.from_svg('<path d="M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"></path>'), ee = e.from_svg('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
765
+ function he(a, t) {
766
+ e.push(t, !0);
767
+ const s = Ft();
768
+ let i = e.rest_props(t, ["$$slots", "$$events", "$$legacy", "children"]), r = e.derived(() => t.weight ?? s.weight ?? "regular"), d = e.derived(() => t.color ?? s.color ?? "currentColor"), m = e.derived(() => t.size ?? s.size ?? "1em"), I = e.derived(() => t.mirrored ?? s.mirrored ?? !1);
752
769
  function g(o) {
753
770
  let { weight: c, color: u, size: S, mirrored: y, ...l } = o;
754
771
  return l;
755
772
  }
756
- var v = et();
757
- t.attribute_effect(
773
+ var v = ee();
774
+ e.attribute_effect(
758
775
  v,
759
776
  (o, c) => ({
760
777
  xmlns: "http://www.w3.org/2000/svg",
761
778
  role: "img",
762
- width: t.get(m),
763
- height: t.get(m),
764
- fill: t.get(d),
765
- transform: t.get(I) ? "scale(-1, 1)" : void 0,
779
+ width: e.get(m),
780
+ height: e.get(m),
781
+ fill: e.get(d),
782
+ transform: e.get(I) ? "scale(-1, 1)" : void 0,
766
783
  viewBox: "0 0 256 256",
767
784
  ...o,
768
785
  ...c
769
786
  }),
770
787
  [() => g(s), () => g(i)]
771
788
  );
772
- var w = t.child(v);
789
+ var w = e.child(v);
773
790
  {
774
- var A = (o) => {
775
- var c = t.comment(), u = t.first_child(c);
776
- t.snippet(u, () => e.children), t.append(o, c);
791
+ var b = (o) => {
792
+ var c = e.comment(), u = e.first_child(c);
793
+ e.snippet(u, () => t.children), e.append(o, c);
777
794
  };
778
- t.if(w, (o) => {
779
- e.children && o(A);
795
+ e.if(w, (o) => {
796
+ t.children && o(b);
780
797
  });
781
798
  }
782
- var ie = t.sibling(w, 2);
799
+ var rt = e.sibling(w, 2);
783
800
  {
784
801
  var _ = (o) => {
785
- var c = Ke();
786
- t.append(o, c);
787
- }, ge = (o) => {
788
- var c = t.comment(), u = t.first_child(c);
802
+ var c = $t();
803
+ e.append(o, c);
804
+ }, ft = (o) => {
805
+ var c = e.comment(), u = e.first_child(c);
789
806
  {
790
807
  var S = (l) => {
791
- var f = $e();
792
- t.next(), t.append(l, f);
808
+ var f = Wt();
809
+ e.next(), e.append(l, f);
793
810
  }, y = (l) => {
794
- var f = t.comment(), p = t.first_child(f);
811
+ var f = e.comment(), p = e.first_child(f);
795
812
  {
796
- var fe = (b) => {
797
- var x = We();
798
- t.append(b, x);
799
- }, k = (b) => {
800
- var x = t.comment(), be = t.first_child(x);
813
+ var dt = (A) => {
814
+ var x = Jt();
815
+ e.append(A, x);
816
+ }, k = (A) => {
817
+ var x = e.comment(), _t = e.first_child(x);
801
818
  {
802
- var _e = (L) => {
803
- var re = Je();
804
- t.append(L, re);
805
- }, xe = (L) => {
806
- var re = t.comment(), Le = t.first_child(re);
819
+ var xt = (L) => {
820
+ var ot = Xt();
821
+ e.append(L, ot);
822
+ }, Lt = (L) => {
823
+ var ot = e.comment(), Ct = e.first_child(ot);
807
824
  {
808
- var Me = (M) => {
809
- var oe = Xe();
810
- t.append(M, oe);
811
- }, Ce = (M) => {
812
- var oe = t.comment(), Pe = t.first_child(oe);
825
+ var Mt = (C) => {
826
+ var lt = Yt();
827
+ e.append(C, lt);
828
+ }, Pt = (C) => {
829
+ var lt = e.comment(), kt = e.first_child(lt);
813
830
  {
814
- var ke = (C) => {
815
- var le = Ye();
816
- t.append(C, le);
817
- }, Ee = (C) => {
818
- var le = t.text();
819
- le.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), t.append(C, le);
831
+ var Et = (M) => {
832
+ var ht = te();
833
+ e.append(M, ht);
834
+ }, Ot = (M) => {
835
+ var ht = e.text();
836
+ ht.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), e.append(M, ht);
820
837
  };
821
- t.if(
822
- Pe,
823
- (C) => {
824
- t.get(r) === "thin" ? C(ke) : C(Ee, !1);
838
+ e.if(
839
+ kt,
840
+ (M) => {
841
+ e.get(r) === "thin" ? M(Et) : M(Ot, !1);
825
842
  },
826
843
  !0
827
844
  );
828
845
  }
829
- t.append(M, oe);
846
+ e.append(C, lt);
830
847
  };
831
- t.if(
832
- Le,
833
- (M) => {
834
- t.get(r) === "regular" ? M(Me) : M(Ce, !1);
848
+ e.if(
849
+ Ct,
850
+ (C) => {
851
+ e.get(r) === "regular" ? C(Mt) : C(Pt, !1);
835
852
  },
836
853
  !0
837
854
  );
838
855
  }
839
- t.append(L, re);
856
+ e.append(L, ot);
840
857
  };
841
- t.if(
842
- be,
858
+ e.if(
859
+ _t,
843
860
  (L) => {
844
- t.get(r) === "light" ? L(_e) : L(xe, !1);
861
+ e.get(r) === "light" ? L(xt) : L(Lt, !1);
845
862
  },
846
863
  !0
847
864
  );
848
865
  }
849
- t.append(b, x);
866
+ e.append(A, x);
850
867
  };
851
- t.if(
868
+ e.if(
852
869
  p,
853
- (b) => {
854
- t.get(r) === "fill" ? b(fe) : b(k, !1);
870
+ (A) => {
871
+ e.get(r) === "fill" ? A(dt) : A(k, !1);
855
872
  },
856
873
  !0
857
874
  );
858
875
  }
859
- t.append(l, f);
876
+ e.append(l, f);
860
877
  };
861
- t.if(
878
+ e.if(
862
879
  u,
863
880
  (l) => {
864
- t.get(r) === "duotone" ? l(S) : l(y, !1);
881
+ e.get(r) === "duotone" ? l(S) : l(y, !1);
865
882
  },
866
883
  !0
867
884
  );
868
885
  }
869
- t.append(o, c);
886
+ e.append(o, c);
870
887
  };
871
- t.if(ie, (o) => {
872
- t.get(r) === "bold" ? o(_) : o(ge, !1);
888
+ e.if(rt, (o) => {
889
+ e.get(r) === "bold" ? o(_) : o(ft, !1);
873
890
  });
874
891
  }
875
- t.reset(v), t.append(a, v), t.pop();
892
+ e.reset(v), e.append(a, v), e.pop();
876
893
  }
877
894
  export {
878
- Ve as M,
879
- it as V,
880
- lt as X,
881
- Se as a,
882
- at as b,
883
- ot as c,
884
- Oe as g,
885
- de as l,
895
+ jt as M,
896
+ re as V,
897
+ he as X,
898
+ bt as a,
899
+ ie as b,
900
+ le as c,
901
+ Ft as g,
902
+ pt as l,
886
903
  P as m,
887
- rt as o,
888
- Ae as s
904
+ oe as o,
905
+ It as s
889
906
  };