triiiceratops 0.6.0 → 0.7.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.
@@ -1,144 +1,144 @@
1
- var C0 = Object.defineProperty;
2
- var h0 = (t) => {
3
- throw TypeError(t);
1
+ var Ie = Object.defineProperty;
2
+ var he = (a) => {
3
+ throw TypeError(a);
4
4
  };
5
- var I0 = (t, e, a) => e in t ? C0(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
6
- var X = (t, e, a) => I0(t, typeof e != "symbol" ? e + "" : e, a), M0 = (t, e, a) => e.has(t) || h0("Cannot " + a);
7
- var K = (t, e, a) => (M0(t, e, "read from private field"), a ? a.call(t) : e.get(t)), l0 = (t, e, a) => e.has(t) ? h0("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, a);
8
- import { p as a0, n as V0, o as A, q as A0, g as i, u as S, e as o, t as V, d as u, r as v, i as s, j as t0, v as w0, w as I, b as x, x as y0, y as d0, z as Z0, A as H0, f as x0, X as k0, B as Q, C as F0, D as o0, E as v0, F as g0, G as u0, H as f0, I as T0, J as L0, c as S0, a as W, h as z0, T as O0, s as P0, k as R0, l as B0, m as Y } from "./chunks/TriiiceratopsViewer-CuHkgof3.js";
9
- var D0 = A('<path d="M68,102.06V40a12,12,0,0,0-24,0v62.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V169.94a36,36,0,0,0,0-67.88ZM56,148a12,12,0,1,1,12-12A12,12,0,0,1,56,148ZM164,88a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0V54.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V121.94A36.07,36.07,0,0,0,164,88Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,128,100Zm108,68a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0v94.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V201.94A36.07,36.07,0,0,0,236,168Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,200,180Z"></path>'), E0 = A('<path d="M80,136a24,24,0,1,1-24-24A24,24,0,0,1,80,136Zm48-72a24,24,0,1,0,24,24A24,24,0,0,0,128,64Zm72,80a24,24,0,1,0,24,24A24,24,0,0,0,200,144Z" opacity="0.2"></path><path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"></path>', 1), j0 = A('<path d="M84,136a28,28,0,0,1-20,26.83V216a8,8,0,0,1-16,0V162.83a28,28,0,0,1,0-53.66V40a8,8,0,0,1,16,0v69.17A28,28,0,0,1,84,136Zm52-74.83V40a8,8,0,0,0-16,0V61.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V114.83a28,28,0,0,0,0-53.66Zm72,80V40a8,8,0,0,0-16,0V141.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V194.83a28,28,0,0,0,0-53.66Z"></path>'), U0 = A('<path d="M62,106.6V40a6,6,0,0,0-12,0v66.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V165.4a30,30,0,0,0,0-58.8ZM56,154a18,18,0,1,1,18-18A18,18,0,0,1,56,154Zm78-95.4V40a6,6,0,0,0-12,0V58.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V117.4a30,30,0,0,0,0-58.8ZM128,106a18,18,0,1,1,18-18A18,18,0,0,1,128,106Zm102,62a30.05,30.05,0,0,0-24-29.4V40a6,6,0,0,0-12,0v98.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V197.4A30.05,30.05,0,0,0,230,168Zm-30,18a18,18,0,1,1,18-18A18,18,0,0,1,200,186Z"></path>'), G0 = A('<path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"></path>'), J0 = A('<path d="M60,108.29V40a4,4,0,0,0-8,0v68.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V163.71a28,28,0,0,0,0-55.42ZM56,156a20,20,0,1,1,20-20A20,20,0,0,1,56,156Zm76-95.71V40a4,4,0,0,0-8,0V60.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V115.71a28,28,0,0,0,0-55.42ZM128,108a20,20,0,1,1,20-20A20,20,0,0,1,128,108Zm100,60a28,28,0,0,0-24-27.71V40a4,4,0,0,0-8,0V140.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V195.71A28,28,0,0,0,228,168Zm-28,20a20,20,0,1,1,20-20A20,20,0,0,1,200,188Z"></path>'), q0 = A('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
10
- function N0(t, e) {
11
- a0(e, !0);
12
- const a = V0();
13
- let c = w0(e, ["$$slots", "$$events", "$$legacy", "children"]), n = S(() => e.weight ?? a.weight ?? "regular"), b = S(() => e.color ?? a.color ?? "currentColor"), _ = S(() => e.size ?? a.size ?? "1em"), z = S(() => e.mirrored ?? a.mirrored ?? !1);
14
- function M(r) {
15
- let { weight: l, color: w, size: P, mirrored: R, ...h } = r;
16
- return h;
5
+ var Ce = (a, e, t) => e in a ? Ie(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
6
+ var K = (a, e, t) => Ce(a, typeof e != "symbol" ? e + "" : e, t), Me = (a, e, t) => e.has(a) || he("Cannot " + t);
7
+ var W = (a, e, t) => (Me(a, e, "read from private field"), t ? t.call(a) : e.get(a)), le = (a, e, t) => e.has(a) ? he("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t);
8
+ import { p as te, v as Ve, w as Z, x as we, i as v, y as A, e as f, g as i, k as O, r as c, m as s, n as ae, z as S, b as C, A as ye, B as ue, C as Ae, D as Ze, E as Se, f as xe, X as He, F as Y, G as Te, H as oe, I as ve, J as fe, s as de, j as ge, K as ke, L as Fe, c as Le, a as X, u as Oe, h as ze, T as Ee, l as Pe, d as Re, o as Be, q as De, t as Q } from "./chunks/TriiiceratopsViewer-BLPYh18n.js";
9
+ var je = Z('<path d="M68,102.06V40a12,12,0,0,0-24,0v62.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V169.94a36,36,0,0,0,0-67.88ZM56,148a12,12,0,1,1,12-12A12,12,0,0,1,56,148ZM164,88a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0V54.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V121.94A36.07,36.07,0,0,0,164,88Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,128,100Zm108,68a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0v94.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V201.94A36.07,36.07,0,0,0,236,168Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,200,180Z"></path>'), Je = Z('<path d="M80,136a24,24,0,1,1-24-24A24,24,0,0,1,80,136Zm48-72a24,24,0,1,0,24,24A24,24,0,0,0,128,64Zm72,80a24,24,0,1,0,24,24A24,24,0,0,0,200,144Z" opacity="0.2"></path><path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"></path>', 1), Ue = Z('<path d="M84,136a28,28,0,0,1-20,26.83V216a8,8,0,0,1-16,0V162.83a28,28,0,0,1,0-53.66V40a8,8,0,0,1,16,0v69.17A28,28,0,0,1,84,136Zm52-74.83V40a8,8,0,0,0-16,0V61.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V114.83a28,28,0,0,0,0-53.66Zm72,80V40a8,8,0,0,0-16,0V141.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V194.83a28,28,0,0,0,0-53.66Z"></path>'), Ne = Z('<path d="M62,106.6V40a6,6,0,0,0-12,0v66.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V165.4a30,30,0,0,0,0-58.8ZM56,154a18,18,0,1,1,18-18A18,18,0,0,1,56,154Zm78-95.4V40a6,6,0,0,0-12,0V58.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V117.4a30,30,0,0,0,0-58.8ZM128,106a18,18,0,1,1,18-18A18,18,0,0,1,128,106Zm102,62a30.05,30.05,0,0,0-24-29.4V40a6,6,0,0,0-12,0v98.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V197.4A30.05,30.05,0,0,0,230,168Zm-30,18a18,18,0,1,1,18-18A18,18,0,0,1,200,186Z"></path>'), Ge = Z('<path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"></path>'), qe = Z('<path d="M60,108.29V40a4,4,0,0,0-8,0v68.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V163.71a28,28,0,0,0,0-55.42ZM56,156a20,20,0,1,1,20-20A20,20,0,0,1,56,156Zm76-95.71V40a4,4,0,0,0-8,0V60.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V115.71a28,28,0,0,0,0-55.42ZM128,108a20,20,0,1,1,20-20A20,20,0,0,1,128,108Zm100,60a28,28,0,0,0-24-27.71V40a4,4,0,0,0-8,0V140.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V195.71A28,28,0,0,0,228,168Zm-28,20a20,20,0,1,1,20-20A20,20,0,0,1,200,188Z"></path>'), Ke = Z('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
10
+ function Xe(a, e) {
11
+ te(e, !0);
12
+ const t = Ve();
13
+ let d = Ae(e, ["$$slots", "$$events", "$$legacy", "children"]), o = O(() => e.weight ?? t.weight ?? "regular"), w = O(() => e.color ?? t.color ?? "currentColor"), b = O(() => e.size ?? t.size ?? "1em"), V = O(() => e.mirrored ?? t.mirrored ?? !1);
14
+ function y(r) {
15
+ let { weight: l, color: m, size: T, mirrored: n, ...g } = r;
16
+ return g;
17
17
  }
18
- var p = q0();
19
- A0(
20
- p,
18
+ var h = Ke();
19
+ we(
20
+ h,
21
21
  (r, l) => ({
22
22
  xmlns: "http://www.w3.org/2000/svg",
23
23
  role: "img",
24
- width: i(_),
25
- height: i(_),
26
- fill: i(b),
27
- transform: i(z) ? "scale(-1, 1)" : void 0,
24
+ width: i(b),
25
+ height: i(b),
26
+ fill: i(w),
27
+ transform: i(V) ? "scale(-1, 1)" : void 0,
28
28
  viewBox: "0 0 256 256",
29
29
  ...r,
30
30
  ...l
31
31
  }),
32
- [() => M(a), () => M(c)]
32
+ [() => y(t), () => y(d)]
33
33
  );
34
- var H = o(p);
34
+ var H = v(h);
35
35
  {
36
- var E = (r) => {
37
- var l = I(), w = x(l);
38
- y0(w, () => e.children), s(r, l);
36
+ var D = (r) => {
37
+ var l = S(), m = C(l);
38
+ ye(m, () => e.children), s(r, l);
39
39
  };
40
- V(H, (r) => {
41
- e.children && r(E);
40
+ A(H, (r) => {
41
+ e.children && r(D);
42
42
  });
43
43
  }
44
- var L = u(H, 2);
44
+ var z = f(H, 2);
45
45
  {
46
- var O = (r) => {
47
- var l = D0();
46
+ var E = (r) => {
47
+ var l = je();
48
48
  s(r, l);
49
- }, d = (r) => {
50
- var l = I(), w = x(l);
49
+ }, P = (r) => {
50
+ var l = S(), m = C(l);
51
51
  {
52
- var P = (h) => {
53
- var k = E0();
54
- d0(), s(h, k);
55
- }, R = (h) => {
56
- var k = I(), j = x(k);
52
+ var T = (g) => {
53
+ var k = Je();
54
+ ue(), s(g, k);
55
+ }, n = (g) => {
56
+ var k = S(), j = C(k);
57
57
  {
58
- var U = (f) => {
59
- var C = j0();
60
- s(f, C);
61
- }, J = (f) => {
62
- var C = I(), q = x(C);
58
+ var J = (_) => {
59
+ var M = Ue();
60
+ s(_, M);
61
+ }, N = (_) => {
62
+ var M = S(), G = C(M);
63
63
  {
64
- var G = (m) => {
65
- var F = U0();
66
- s(m, F);
67
- }, N = (m) => {
68
- var F = I(), g = x(F);
64
+ var U = (p) => {
65
+ var F = Ne();
66
+ s(p, F);
67
+ }, q = (p) => {
68
+ var F = S(), u = C(F);
69
69
  {
70
- var T = (y) => {
71
- var B = G0();
72
- s(y, B);
73
- }, r0 = (y) => {
74
- var B = I(), s0 = x(B);
70
+ var L = (x) => {
71
+ var R = Ge();
72
+ s(x, R);
73
+ }, re = (x) => {
74
+ var R = S(), se = C(R);
75
75
  {
76
- var n0 = (Z) => {
77
- var D = J0();
78
- s(Z, D);
79
- }, i0 = (Z) => {
80
- var D = Z0();
81
- D.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), s(Z, D);
76
+ var ne = (I) => {
77
+ var B = qe();
78
+ s(I, B);
79
+ }, ie = (I) => {
80
+ var B = Ze();
81
+ B.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), s(I, B);
82
82
  };
83
- V(
84
- s0,
85
- (Z) => {
86
- i(n) === "thin" ? Z(n0) : Z(i0, !1);
83
+ A(
84
+ se,
85
+ (I) => {
86
+ i(o) === "thin" ? I(ne) : I(ie, !1);
87
87
  },
88
88
  !0
89
89
  );
90
90
  }
91
- s(y, B);
91
+ s(x, R);
92
92
  };
93
- V(
94
- g,
95
- (y) => {
96
- i(n) === "regular" ? y(T) : y(r0, !1);
93
+ A(
94
+ u,
95
+ (x) => {
96
+ i(o) === "regular" ? x(L) : x(re, !1);
97
97
  },
98
98
  !0
99
99
  );
100
100
  }
101
- s(m, F);
101
+ s(p, F);
102
102
  };
103
- V(
104
- q,
105
- (m) => {
106
- i(n) === "light" ? m(G) : m(N, !1);
103
+ A(
104
+ G,
105
+ (p) => {
106
+ i(o) === "light" ? p(U) : p(q, !1);
107
107
  },
108
108
  !0
109
109
  );
110
110
  }
111
- s(f, C);
111
+ s(_, M);
112
112
  };
113
- V(
113
+ A(
114
114
  j,
115
- (f) => {
116
- i(n) === "fill" ? f(U) : f(J, !1);
115
+ (_) => {
116
+ i(o) === "fill" ? _(J) : _(N, !1);
117
117
  },
118
118
  !0
119
119
  );
120
120
  }
121
- s(h, k);
121
+ s(g, k);
122
122
  };
123
- V(
124
- w,
125
- (h) => {
126
- i(n) === "duotone" ? h(P) : h(R, !1);
123
+ A(
124
+ m,
125
+ (g) => {
126
+ i(o) === "duotone" ? g(T) : g(n, !1);
127
127
  },
128
128
  !0
129
129
  );
130
130
  }
131
131
  s(r, l);
132
132
  };
133
- V(L, (r) => {
134
- i(n) === "bold" ? r(O) : r(d, !1);
133
+ A(z, (r) => {
134
+ i(o) === "bold" ? r(E) : r(P, !1);
135
135
  });
136
136
  }
137
- v(p), s(t, p), t0();
137
+ c(h), s(a, h), ae();
138
138
  }
139
- class X0 {
139
+ class Qe {
140
140
  constructor() {
141
- X(this, "context", null);
141
+ K(this, "context", null);
142
142
  }
143
143
  onRegister(e) {
144
144
  this.context = e;
@@ -160,349 +160,380 @@ class X0 {
160
160
  return ((e = this.context) == null ? void 0 : e.getOSDViewer()) ?? null;
161
161
  }
162
162
  }
163
- function c0(t, e) {
164
- var n;
165
- const a = (n = t.drawer) == null ? void 0 : n.canvas;
166
- if (!a) return;
167
- const c = [];
168
- e.brightness !== 100 && c.push(`brightness(${e.brightness / 100})`), e.contrast !== 100 && c.push(`contrast(${e.contrast / 100})`), e.saturation !== 100 && c.push(`saturate(${e.saturation / 100})`), e.invert && c.push("invert(1)"), e.grayscale && c.push("grayscale(1)"), a.style.filter = c.length > 0 ? c.join(" ") : "none";
163
+ function ce(a, e) {
164
+ var o;
165
+ const t = (o = a.drawer) == null ? void 0 : o.canvas;
166
+ if (!t) return;
167
+ const d = [];
168
+ e.brightness !== 100 && d.push(`brightness(${e.brightness / 100})`), e.contrast !== 100 && d.push(`contrast(${e.contrast / 100})`), e.saturation !== 100 && d.push(`saturate(${e.saturation / 100})`), e.invert && d.push("invert(1)"), e.grayscale && d.push("grayscale(1)"), t.style.filter = d.length > 0 ? d.join(" ") : "none";
169
169
  }
170
- function m0(t) {
171
- var a;
172
- const e = (a = t.drawer) == null ? void 0 : a.canvas;
170
+ function me(a) {
171
+ var t;
172
+ const e = (t = a.drawer) == null ? void 0 : t.canvas;
173
173
  e && (e.style.filter = "none");
174
174
  }
175
- function _0(t) {
176
- return t.brightness !== 100 || t.contrast !== 100 || t.saturation !== 100 || t.invert || t.grayscale;
175
+ function _e(a) {
176
+ return a.brightness !== 100 || a.contrast !== 100 || a.saturation !== 100 || a.invert || a.grayscale;
177
177
  }
178
- const p0 = {
178
+ const pe = {
179
179
  brightness: 100,
180
180
  contrast: 100,
181
181
  saturation: 100,
182
182
  invert: !1,
183
183
  grayscale: !1
184
184
  };
185
- var K0 = A('<path d="M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"></path>'), Q0 = A('<path d="M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z" opacity="0.2"></path><path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"></path>', 1), W0 = A('<path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"></path>'), Y0 = A('<path d="M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"></path>'), $0 = A('<path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"></path>'), ee = A('<path d="M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"></path>'), ae = A('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
186
- function te(t, e) {
187
- a0(e, !0);
188
- const a = V0();
189
- let c = w0(e, ["$$slots", "$$events", "$$legacy", "children"]), n = S(() => e.weight ?? a.weight ?? "regular"), b = S(() => e.color ?? a.color ?? "currentColor"), _ = S(() => e.size ?? a.size ?? "1em"), z = S(() => e.mirrored ?? a.mirrored ?? !1);
190
- function M(r) {
191
- let { weight: l, color: w, size: P, mirrored: R, ...h } = r;
192
- return h;
185
+ var We = Z('<path d="M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"></path>'), Ye = Z('<path d="M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z" opacity="0.2"></path><path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"></path>', 1), $e = Z('<path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"></path>'), e0 = Z('<path d="M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"></path>'), t0 = Z('<path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"></path>'), a0 = Z('<path d="M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"></path>'), r0 = Z('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
186
+ function s0(a, e) {
187
+ te(e, !0);
188
+ const t = Ve();
189
+ let d = Ae(e, ["$$slots", "$$events", "$$legacy", "children"]), o = O(() => e.weight ?? t.weight ?? "regular"), w = O(() => e.color ?? t.color ?? "currentColor"), b = O(() => e.size ?? t.size ?? "1em"), V = O(() => e.mirrored ?? t.mirrored ?? !1);
190
+ function y(r) {
191
+ let { weight: l, color: m, size: T, mirrored: n, ...g } = r;
192
+ return g;
193
193
  }
194
- var p = ae();
195
- A0(
196
- p,
194
+ var h = r0();
195
+ we(
196
+ h,
197
197
  (r, l) => ({
198
198
  xmlns: "http://www.w3.org/2000/svg",
199
199
  role: "img",
200
- width: i(_),
201
- height: i(_),
202
- fill: i(b),
203
- transform: i(z) ? "scale(-1, 1)" : void 0,
200
+ width: i(b),
201
+ height: i(b),
202
+ fill: i(w),
203
+ transform: i(V) ? "scale(-1, 1)" : void 0,
204
204
  viewBox: "0 0 256 256",
205
205
  ...r,
206
206
  ...l
207
207
  }),
208
- [() => M(a), () => M(c)]
208
+ [() => y(t), () => y(d)]
209
209
  );
210
- var H = o(p);
210
+ var H = v(h);
211
211
  {
212
- var E = (r) => {
213
- var l = I(), w = x(l);
214
- y0(w, () => e.children), s(r, l);
212
+ var D = (r) => {
213
+ var l = S(), m = C(l);
214
+ ye(m, () => e.children), s(r, l);
215
215
  };
216
- V(H, (r) => {
217
- e.children && r(E);
216
+ A(H, (r) => {
217
+ e.children && r(D);
218
218
  });
219
219
  }
220
- var L = u(H, 2);
220
+ var z = f(H, 2);
221
221
  {
222
- var O = (r) => {
223
- var l = K0();
222
+ var E = (r) => {
223
+ var l = We();
224
224
  s(r, l);
225
- }, d = (r) => {
226
- var l = I(), w = x(l);
225
+ }, P = (r) => {
226
+ var l = S(), m = C(l);
227
227
  {
228
- var P = (h) => {
229
- var k = Q0();
230
- d0(), s(h, k);
231
- }, R = (h) => {
232
- var k = I(), j = x(k);
228
+ var T = (g) => {
229
+ var k = Ye();
230
+ ue(), s(g, k);
231
+ }, n = (g) => {
232
+ var k = S(), j = C(k);
233
233
  {
234
- var U = (f) => {
235
- var C = W0();
236
- s(f, C);
237
- }, J = (f) => {
238
- var C = I(), q = x(C);
234
+ var J = (_) => {
235
+ var M = $e();
236
+ s(_, M);
237
+ }, N = (_) => {
238
+ var M = S(), G = C(M);
239
239
  {
240
- var G = (m) => {
241
- var F = Y0();
242
- s(m, F);
243
- }, N = (m) => {
244
- var F = I(), g = x(F);
240
+ var U = (p) => {
241
+ var F = e0();
242
+ s(p, F);
243
+ }, q = (p) => {
244
+ var F = S(), u = C(F);
245
245
  {
246
- var T = (y) => {
247
- var B = $0();
248
- s(y, B);
249
- }, r0 = (y) => {
250
- var B = I(), s0 = x(B);
246
+ var L = (x) => {
247
+ var R = t0();
248
+ s(x, R);
249
+ }, re = (x) => {
250
+ var R = S(), se = C(R);
251
251
  {
252
- var n0 = (Z) => {
253
- var D = ee();
254
- s(Z, D);
255
- }, i0 = (Z) => {
256
- var D = Z0();
257
- D.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), s(Z, D);
252
+ var ne = (I) => {
253
+ var B = a0();
254
+ s(I, B);
255
+ }, ie = (I) => {
256
+ var B = Ze();
257
+ B.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), s(I, B);
258
258
  };
259
- V(
260
- s0,
261
- (Z) => {
262
- i(n) === "thin" ? Z(n0) : Z(i0, !1);
259
+ A(
260
+ se,
261
+ (I) => {
262
+ i(o) === "thin" ? I(ne) : I(ie, !1);
263
263
  },
264
264
  !0
265
265
  );
266
266
  }
267
- s(y, B);
267
+ s(x, R);
268
268
  };
269
- V(
270
- g,
271
- (y) => {
272
- i(n) === "regular" ? y(T) : y(r0, !1);
269
+ A(
270
+ u,
271
+ (x) => {
272
+ i(o) === "regular" ? x(L) : x(re, !1);
273
273
  },
274
274
  !0
275
275
  );
276
276
  }
277
- s(m, F);
277
+ s(p, F);
278
278
  };
279
- V(
280
- q,
281
- (m) => {
282
- i(n) === "light" ? m(G) : m(N, !1);
279
+ A(
280
+ G,
281
+ (p) => {
282
+ i(o) === "light" ? p(U) : p(q, !1);
283
283
  },
284
284
  !0
285
285
  );
286
286
  }
287
- s(f, C);
287
+ s(_, M);
288
288
  };
289
- V(
289
+ A(
290
290
  j,
291
- (f) => {
292
- i(n) === "fill" ? f(U) : f(J, !1);
291
+ (_) => {
292
+ i(o) === "fill" ? _(J) : _(N, !1);
293
293
  },
294
294
  !0
295
295
  );
296
296
  }
297
- s(h, k);
297
+ s(g, k);
298
298
  };
299
- V(
300
- w,
301
- (h) => {
302
- i(n) === "duotone" ? h(P) : h(R, !1);
299
+ A(
300
+ m,
301
+ (g) => {
302
+ i(o) === "duotone" ? g(T) : g(n, !1);
303
303
  },
304
304
  !0
305
305
  );
306
306
  }
307
307
  s(r, l);
308
308
  };
309
- V(L, (r) => {
310
- i(n) === "bold" ? r(O) : r(d, !1);
309
+ A(z, (r) => {
310
+ i(o) === "bold" ? r(E) : r(P, !1);
311
311
  });
312
312
  }
313
- v(p), s(t, p), t0();
313
+ c(h), s(a, h), ae();
314
314
  }
315
- var re = x0('<div class="w-72 h-full bg-base-200 border-l border-base-300 shadow-xl flex flex-col"><div class="flex items-center justify-between p-4 border-b border-base-300"><h2 class="text-lg font-semibold">Image Adjustments</h2> <button class="btn btn-sm btn-ghost btn-circle" aria-label="Close panel"><!></button></div> <div class="flex-1 overflow-y-auto p-4 space-y-6"><div class="form-control"><label class="label" for="brightness-slider"><span class="label-text">Brightness</span> <span class="label-text-alt"> </span></label> <input id="brightness-slider" type="range" min="0" max="200" class="range range-sm range-primary"/></div> <div class="form-control"><label class="label" for="contrast-slider"><span class="label-text">Contrast</span> <span class="label-text-alt"> </span></label> <input id="contrast-slider" type="range" min="0" max="200" class="range range-sm range-secondary"/></div> <div class="form-control"><label class="label" for="saturation-slider"><span class="label-text">Saturation</span> <span class="label-text-alt"> </span></label> <input id="saturation-slider" type="range" min="0" max="200" class="range range-sm range-accent"/></div> <div class="divider">Effects</div> <div class="form-control"><label class="label cursor-pointer"><span class="label-text">Invert Colors</span> <input type="checkbox" class="toggle toggle-primary"/></label></div> <div class="form-control"><label class="label cursor-pointer"><span class="label-text">Grayscale</span> <input type="checkbox" class="toggle toggle-secondary"/></label></div></div> <div class="p-4 border-t border-base-300"><button class="btn btn-outline btn-block"><!> Reset to Default</button></div></div>');
316
- function se(t, e) {
317
- a0(e, !0);
318
- function a(g, T) {
319
- e.onFilterChange({ ...e.filters, [g]: T });
315
+ var n0 = xe('<div class="w-72 h-full bg-base-200 border-l border-base-300 shadow-xl flex flex-col"><div class="flex items-center justify-between p-4 border-b border-base-300"><h2 class="text-lg font-semibold">Image Adjustments</h2> <button class="btn btn-sm btn-ghost btn-circle" aria-label="Close panel"><!></button></div> <div class="flex-1 overflow-y-auto p-4 space-y-6"><div class="form-control"><label class="label" for="brightness-slider"><span class="label-text">Brightness</span> <span class="label-text-alt"> </span></label> <input id="brightness-slider" type="range" min="0" max="200" class="range range-sm range-primary"/></div> <div class="form-control"><label class="label" for="contrast-slider"><span class="label-text">Contrast</span> <span class="label-text-alt"> </span></label> <input id="contrast-slider" type="range" min="0" max="200" class="range range-sm range-secondary"/></div> <div class="form-control"><label class="label" for="saturation-slider"><span class="label-text">Saturation</span> <span class="label-text-alt"> </span></label> <input id="saturation-slider" type="range" min="0" max="200" class="range range-sm range-accent"/></div> <div class="divider">Effects</div> <div class="form-control"><label class="label cursor-pointer"><span class="label-text">Invert Colors</span> <input type="checkbox" class="toggle toggle-primary"/></label></div> <div class="form-control"><label class="label cursor-pointer"><span class="label-text">Grayscale</span> <input type="checkbox" class="toggle toggle-secondary"/></label></div></div> <div class="p-4 border-t border-base-300"><button class="btn btn-outline btn-block"><!> Reset to Default</button></div></div>');
316
+ function i0(a, e) {
317
+ te(e, !0);
318
+ function t(u, L) {
319
+ e.onFilterChange({ ...e.filters, [u]: L });
320
320
  }
321
- var c = re(), n = o(c), b = u(o(n), 2);
322
- b.__click = function(...g) {
323
- var T;
324
- (T = e.onClose) == null || T.apply(this, g);
321
+ var d = n0(), o = v(d), w = f(v(o), 2);
322
+ w.__click = function(...u) {
323
+ var L;
324
+ (L = e.onClose) == null || L.apply(this, u);
325
325
  };
326
- var _ = o(b);
327
- k0(_, { size: 20 }), v(b), v(n);
328
- var z = u(n, 2), M = o(z), p = o(M), H = u(o(p), 2), E = o(H);
329
- v(H), v(p);
330
- var L = u(p, 2);
331
- Q(L), L.__input = (g) => a("brightness", +g.currentTarget.value), v(M);
332
- var O = u(M, 2), d = o(O), r = u(o(d), 2), l = o(r);
333
- v(r), v(d);
334
- var w = u(d, 2);
335
- Q(w), w.__input = (g) => a("contrast", +g.currentTarget.value), v(O);
336
- var P = u(O, 2), R = o(P), h = u(o(R), 2), k = o(h);
337
- v(h), v(R);
338
- var j = u(R, 2);
339
- Q(j), j.__input = (g) => a("saturation", +g.currentTarget.value), v(P);
340
- var U = u(P, 4), J = o(U), f = u(o(J), 2);
341
- Q(f), f.__change = (g) => a("invert", g.currentTarget.checked), v(J), v(U);
342
- var C = u(U, 2), q = o(C), G = u(o(q), 2);
343
- Q(G), G.__change = (g) => a("grayscale", g.currentTarget.checked), v(q), v(C), v(z);
344
- var N = u(z, 2), m = o(N);
345
- m.__click = function(...g) {
346
- var T;
347
- (T = e.onReset) == null || T.apply(this, g);
326
+ var b = v(w);
327
+ He(b, { size: 20 }), c(w), c(o);
328
+ var V = f(o, 2), y = v(V), h = v(y), H = f(v(h), 2), D = v(H);
329
+ c(H), c(h);
330
+ var z = f(h, 2);
331
+ Y(z), z.__input = (u) => t("brightness", +u.currentTarget.value), c(y);
332
+ var E = f(y, 2), P = v(E), r = f(v(P), 2), l = v(r);
333
+ c(r), c(P);
334
+ var m = f(P, 2);
335
+ Y(m), m.__input = (u) => t("contrast", +u.currentTarget.value), c(E);
336
+ var T = f(E, 2), n = v(T), g = f(v(n), 2), k = v(g);
337
+ c(g), c(n);
338
+ var j = f(n, 2);
339
+ Y(j), j.__input = (u) => t("saturation", +u.currentTarget.value), c(T);
340
+ var J = f(T, 4), N = v(J), _ = f(v(N), 2);
341
+ Y(_), _.__change = (u) => t("invert", u.currentTarget.checked), c(N), c(J);
342
+ var M = f(J, 2), G = v(M), U = f(v(G), 2);
343
+ Y(U), U.__change = (u) => t("grayscale", u.currentTarget.checked), c(G), c(M), c(V);
344
+ var q = f(V, 2), p = v(q);
345
+ p.__click = function(...u) {
346
+ var L;
347
+ (L = e.onReset) == null || L.apply(this, u);
348
348
  };
349
- var F = o(m);
350
- te(F, { size: 20 }), d0(), v(m), v(N), v(c), F0(() => {
351
- o0(E, `${e.filters.brightness ?? ""}%`), v0(L, e.filters.brightness), o0(l, `${e.filters.contrast ?? ""}%`), v0(w, e.filters.contrast), o0(k, `${e.filters.saturation ?? ""}%`), v0(j, e.filters.saturation), g0(f, e.filters.invert), g0(G, e.filters.grayscale);
352
- }), s(t, c), t0();
349
+ var F = v(p);
350
+ s0(F, { size: 20 }), ue(), c(p), c(q), c(d), Te(() => {
351
+ oe(D, `${e.filters.brightness ?? ""}%`), ve(z, e.filters.brightness), oe(l, `${e.filters.contrast ?? ""}%`), ve(m, e.filters.contrast), oe(k, `${e.filters.saturation ?? ""}%`), ve(j, e.filters.saturation), fe(_, e.filters.invert), fe(U, e.filters.grayscale);
352
+ }), s(a, d), ae();
353
353
  }
354
- H0(["click", "input", "change"]);
355
- var $, e0;
356
- class b0 extends X0 {
354
+ Se(["click", "input", "change"]);
355
+ var $, ee;
356
+ class be extends Qe {
357
357
  constructor() {
358
358
  super(...arguments);
359
- X(this, "id", "image-manipulation");
360
- X(this, "name", "Image Manipulation");
361
- X(this, "version", "1.0.0");
362
- l0(
359
+ K(this, "id", "image-manipulation");
360
+ K(this, "name", "Image Manipulation");
361
+ K(this, "version", "1.0.0");
362
+ le(
363
363
  this,
364
364
  $,
365
365
  // Reactive state using Svelte 5 runes
366
- u0(!1)
366
+ de(!1)
367
367
  );
368
- l0(this, e0, u0(T0({ ...p0 })));
369
- X(this, "osd", null);
368
+ le(this, ee, de(ke({ ...pe })));
369
+ K(this, "osd", null);
370
370
  }
371
371
  get _panelOpen() {
372
- return i(K(this, $));
372
+ return i(W(this, $));
373
373
  }
374
- set _panelOpen(a) {
375
- f0(K(this, $), a, !0);
374
+ set _panelOpen(t) {
375
+ ge(W(this, $), t, !0);
376
376
  }
377
377
  get _filters() {
378
- return i(K(this, e0));
378
+ return i(W(this, ee));
379
379
  }
380
- set _filters(a) {
381
- f0(K(this, e0), a, !0);
380
+ set _filters(t) {
381
+ ge(W(this, ee), t, !0);
382
382
  }
383
- onRegister(a) {
384
- super.onRegister(a), a.registerMenuButton({
383
+ onRegister(t) {
384
+ super.onRegister(t), t.registerMenuButton({
385
385
  id: `${this.id}:toggle`,
386
- icon: N0,
386
+ icon: Xe,
387
387
  get tooltip() {
388
- return L0.image_adjustments();
388
+ return Fe.image_adjustments();
389
389
  },
390
390
  onClick: () => this.togglePanel(),
391
391
  isActive: () => this._panelOpen,
392
392
  activeClass: "btn-secondary",
393
393
  order: 50
394
- }), a.registerPanel({
394
+ }), t.registerPanel({
395
395
  id: `${this.id}:panel`,
396
- component: se,
396
+ component: i0,
397
397
  position: "left",
398
398
  isVisible: () => this._panelOpen,
399
399
  props: {
400
400
  filters: this._filters,
401
- onFilterChange: (c) => this.setFilters(c),
401
+ onFilterChange: (d) => this.setFilters(d),
402
402
  onReset: () => this.resetFilters(),
403
403
  onClose: () => this.togglePanel()
404
404
  }
405
405
  });
406
406
  }
407
- onViewerReady(a) {
408
- this.osd = a, _0(this._filters) && c0(a, this._filters), this.osd.addHandler("open", () => {
409
- this.osd && _0(this._filters) && c0(this.osd, this._filters);
407
+ onViewerReady(t) {
408
+ this.osd = t, _e(this._filters) && ce(t, this._filters), this.osd.addHandler("open", () => {
409
+ this.osd && _e(this._filters) && ce(this.osd, this._filters);
410
410
  });
411
411
  }
412
412
  onDestroy() {
413
- this.osd && m0(this.osd), this.osd = null, super.onDestroy();
413
+ this.osd && me(this.osd), this.osd = null, super.onDestroy();
414
414
  }
415
415
  // Public API
416
416
  togglePanel() {
417
417
  this._panelOpen = !this._panelOpen;
418
418
  }
419
- setFilters(a) {
420
- this._filters.brightness = a.brightness, this._filters.contrast = a.contrast, this._filters.saturation = a.saturation, this._filters.invert = a.invert, this._filters.grayscale = a.grayscale, this.osd && c0(this.osd, a);
419
+ setFilters(t) {
420
+ this._filters.brightness = t.brightness, this._filters.contrast = t.contrast, this._filters.saturation = t.saturation, this._filters.invert = t.invert, this._filters.grayscale = t.grayscale, this.osd && ce(this.osd, t);
421
421
  }
422
422
  resetFilters() {
423
- Object.assign(this._filters, p0), this.osd && m0(this.osd);
423
+ Object.assign(this._filters, pe), this.osd && me(this.osd);
424
424
  }
425
425
  getFilters() {
426
426
  return { ...this._filters };
427
427
  }
428
428
  }
429
- $ = new WeakMap(), e0 = new WeakMap();
430
- var ne = x0('<!> <div class="w-full h-full"><!></div>', 1);
431
- function ie(t, e) {
432
- a0(e, !0);
433
- let a = W(e, "manifestId", 7, ""), c = W(e, "canvasId", 7, ""), n = W(e, "plugins", 23, () => [new b0()]), b = W(e, "theme", 7, void 0), _ = W(e, "themeConfig", 7, void 0), z = S(() => {
434
- if (b()) {
435
- if (B0(b())) return b();
436
- console.warn(`Invalid theme "${b()}". Using system preference fallback.`);
429
+ $ = new WeakMap(), ee = new WeakMap();
430
+ var l0 = xe('<!> <div class="w-full h-full"><!></div>', 1);
431
+ function o0(a, e) {
432
+ te(e, !0);
433
+ let t = X(e, "manifestId", 7, ""), d = X(e, "canvasId", 7, ""), o = X(e, "plugins", 23, () => [new be()]), w = X(e, "theme", 7, void 0), b = X(e, "themeConfig", 7, void 0), V = X(e, "config", 7, void 0), y, h = de(void 0), H = !1;
434
+ Oe(() => {
435
+ i(h) && y && !H && (H = !0, i(h).setEventTarget(y));
436
+ });
437
+ let D = O(() => {
438
+ if (w()) {
439
+ if (De(w())) return w();
440
+ console.warn(`Invalid theme "${w()}". Using system preference fallback.`);
437
441
  }
438
- }), M = S(() => {
439
- if (_()) {
440
- if (typeof _() == "string") {
441
- const d = R0(_());
442
- return d || console.warn(`Invalid theme-config JSON: "${_()}". Ignoring.`), d ?? void 0;
442
+ }), z = O(() => {
443
+ if (b()) {
444
+ if (typeof b() == "string") {
445
+ const n = Be(b());
446
+ return n || console.warn(`Invalid theme-config JSON: "${b()}". Ignoring.`), n ?? void 0;
443
447
  }
444
- return _();
448
+ return b();
449
+ }
450
+ }), E = O(() => {
451
+ if (V()) {
452
+ if (typeof V() == "string")
453
+ try {
454
+ return JSON.parse(V());
455
+ } catch {
456
+ console.warn(`Invalid config JSON: "${V()}". Ignoring.`);
457
+ return;
458
+ }
459
+ return V();
445
460
  }
446
461
  });
447
- var p = {
462
+ var P = {
448
463
  get manifestId() {
449
- return a();
464
+ return t();
450
465
  },
451
- set manifestId(d = "") {
452
- a(d), Y();
466
+ set manifestId(n = "") {
467
+ t(n), Q();
453
468
  },
454
469
  get canvasId() {
455
- return c();
470
+ return d();
456
471
  },
457
- set canvasId(d = "") {
458
- c(d), Y();
472
+ set canvasId(n = "") {
473
+ d(n), Q();
459
474
  },
460
475
  get plugins() {
461
- return n();
476
+ return o();
462
477
  },
463
- set plugins(d = [new b0()]) {
464
- n(d), Y();
478
+ set plugins(n = [new be()]) {
479
+ o(n), Q();
465
480
  },
466
481
  get theme() {
467
- return b();
482
+ return w();
468
483
  },
469
- set theme(d = void 0) {
470
- b(d), Y();
484
+ set theme(n = void 0) {
485
+ w(n), Q();
471
486
  },
472
487
  get themeConfig() {
473
- return _();
488
+ return b();
489
+ },
490
+ set themeConfig(n = void 0) {
491
+ b(n), Q();
474
492
  },
475
- set themeConfig(d = void 0) {
476
- _(d), Y();
493
+ get config() {
494
+ return V();
495
+ },
496
+ set config(n = void 0) {
497
+ V(n), Q();
477
498
  }
478
- }, H = ne(), E = x(H);
479
- z0(E, () => `<style>${P0}</style>`);
480
- var L = u(E, 2), O = o(L);
481
- return O0(O, {
499
+ }, r = l0(), l = C(r);
500
+ ze(l, () => `<style>${Re}</style>`);
501
+ var m = f(l, 2), T = v(m);
502
+ return Ee(T, {
482
503
  get manifestId() {
483
- return a();
504
+ return t();
484
505
  },
485
506
  get canvasId() {
486
- return c();
507
+ return d();
487
508
  },
488
509
  get plugins() {
489
- return n();
510
+ return o();
490
511
  },
491
512
  get theme() {
492
- return i(z);
513
+ return i(D);
493
514
  },
494
515
  get themeConfig() {
495
- return i(M);
516
+ return i(z);
517
+ },
518
+ get config() {
519
+ return i(E);
520
+ },
521
+ get viewerState() {
522
+ return i(h);
523
+ },
524
+ set viewerState(n) {
525
+ ge(h, n, !0);
496
526
  }
497
- }), v(L), s(t, H), t0(p);
527
+ }), c(m), Pe(m, (n) => y = n, () => y), s(a, r), ae(P);
498
528
  }
499
- customElements.define("triiiceratops-viewer-image", S0(
500
- ie,
529
+ customElements.define("triiiceratops-viewer-image", Le(
530
+ o0,
501
531
  {
502
532
  manifestId: { attribute: "manifest-id", reflect: !0, type: "String" },
503
533
  canvasId: { attribute: "canvas-id", reflect: !0, type: "String" },
504
534
  theme: { attribute: "theme", reflect: !0, type: "String" },
505
535
  themeConfig: { attribute: "theme-config", type: "String" },
536
+ config: { attribute: "config", type: "String" },
506
537
  plugins: {}
507
538
  },
508
539
  [],