@tempots/dom 13.0.0 → 15.0.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 (39) hide show
  1. package/index.cjs +1 -1
  2. package/index.d.ts +28 -33
  3. package/index.js +514 -619
  4. package/package.json +1 -1
  5. package/{mountable → renderable}/async.d.ts +2 -2
  6. package/renderable/onctx.d.ts +4 -0
  7. package/renderable/when.d.ts +5 -0
  8. package/mountable/appearance.d.ts +0 -37
  9. package/mountable/ctx.d.ts +0 -3
  10. package/mountable/hidden-when-empty.d.ts +0 -3
  11. package/mountable/html-title.d.ts +0 -3
  12. package/mountable/inviewport.d.ts +0 -6
  13. package/mountable/size.d.ts +0 -8
  14. package/mountable/when.d.ts +0 -4
  15. /package/{mountable → renderable}/attribute.d.ts +0 -0
  16. /package/{mountable → renderable}/autofocus.d.ts +0 -0
  17. /package/{mountable → renderable}/autoselect.d.ts +0 -0
  18. /package/{mountable → renderable}/bind.d.ts +0 -0
  19. /package/{mountable → renderable}/conjunction.d.ts +0 -0
  20. /package/{mountable → renderable}/consumers.d.ts +0 -0
  21. /package/{mountable → renderable}/domel.d.ts +0 -0
  22. /package/{mountable → renderable}/element.d.ts +0 -0
  23. /package/{mountable → renderable}/empty.d.ts +0 -0
  24. /package/{mountable → renderable}/ensure.d.ts +0 -0
  25. /package/{mountable → renderable}/foreach.d.ts +0 -0
  26. /package/{mountable → renderable}/fragment.d.ts +0 -0
  27. /package/{mountable → renderable}/handler.d.ts +0 -0
  28. /package/{mountable → renderable}/map-signal.d.ts +0 -0
  29. /package/{mountable → renderable}/not-empty.d.ts +0 -0
  30. /package/{mountable → renderable}/oneof.d.ts +0 -0
  31. /package/{mountable → renderable}/onmount.d.ts +0 -0
  32. /package/{mountable → renderable}/onunmount.d.ts +0 -0
  33. /package/{mountable → renderable}/portal.d.ts +0 -0
  34. /package/{mountable → renderable}/providers.d.ts +0 -0
  35. /package/{mountable → renderable}/render.d.ts +0 -0
  36. /package/{mountable → renderable}/repeat.d.ts +0 -0
  37. /package/{mountable → renderable}/style.d.ts +0 -0
  38. /package/{mountable → renderable}/task.d.ts +0 -0
  39. /package/{mountable → renderable}/text.d.ts +0 -0
package/index.js CHANGED
@@ -1,31 +1,31 @@
1
- var Ze = Object.defineProperty;
2
- var Xe = (t, e, r) => e in t ? Ze(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var l = (t, e, r) => Xe(t, typeof e != "symbol" ? e + "" : e, r);
4
- function Ye(t, e, r) {
1
+ var Ve = Object.defineProperty;
2
+ var We = (t, e, r) => e in t ? Ve(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var a = (t, e, r) => We(t, typeof e != "symbol" ? e + "" : e, r);
4
+ function Ze(t, e, r) {
5
5
  return t + (e - t) * r;
6
6
  }
7
- const ee = 97;
8
- function je(t, e, r) {
7
+ const J = 97;
8
+ function Xe(t, e, r) {
9
9
  const n = Math.max(t.length, e.length);
10
10
  let s = "";
11
11
  for (let i = 0; i < n; i++) {
12
12
  let o = t.charCodeAt(i);
13
- isNaN(o) && (o = ee);
14
- let a = e.charCodeAt(i);
15
- isNaN(a) && (a = ee), s += String.fromCharCode(o + (a - o) * r);
13
+ isNaN(o) && (o = J);
14
+ let l = e.charCodeAt(i);
15
+ isNaN(l) && (l = J), s += String.fromCharCode(o + (l - o) * r);
16
16
  }
17
17
  return s;
18
18
  }
19
- function He(t, e, r) {
19
+ function Ye(t, e, r) {
20
20
  return new Date(t.getTime() + (e.getTime() - t.getTime()) * r);
21
21
  }
22
- function Ke(t, e, r) {
22
+ function je(t, e, r) {
23
23
  return e;
24
24
  }
25
- function Ue(t) {
26
- return typeof t == "number" ? Ye : typeof t == "string" ? je : t instanceof Date ? He : Ke;
25
+ function Ke(t) {
26
+ return typeof t == "number" ? Ze : typeof t == "string" ? Xe : t instanceof Date ? Ye : je;
27
27
  }
28
- class ke {
28
+ class Ue {
29
29
  constructor(e, r) {
30
30
  this.index = e, this.total = r;
31
31
  }
@@ -42,35 +42,35 @@ class ke {
42
42
  return this.index % 2 === 1;
43
43
  }
44
44
  }
45
- const te = "$__signal__", re = "$__prop__", ne = "$__computed__";
46
- var ae;
47
- ae = te;
45
+ const k = "$__signal__", Q = "$__prop__", ee = "$__computed__";
46
+ var se;
47
+ se = k;
48
48
  const _ = class _ {
49
49
  constructor(e, r) {
50
- l(this, ae, !0);
51
- l(this, "_value");
52
- l(this, "_derivatives", []);
53
- l(this, "_onValueListeners", []);
54
- l(this, "_onDisposeListeners", []);
55
- l(this, "get", () => this._value);
56
- l(this, "hasListeners", () => this._onValueListeners.length > 0);
57
- l(this, "on", (e) => (e(this.get()), this._onValueListeners.push(e), () => {
50
+ a(this, se, !0);
51
+ a(this, "_value");
52
+ a(this, "_derivatives", []);
53
+ a(this, "_onValueListeners", []);
54
+ a(this, "_onDisposeListeners", []);
55
+ a(this, "get", () => this._value);
56
+ a(this, "hasListeners", () => this._onValueListeners.length > 0);
57
+ a(this, "on", (e) => (e(this.get()), this._onValueListeners.push(e), () => {
58
58
  this._onValueListeners.splice(this._onValueListeners.indexOf(e), 1);
59
59
  }));
60
- l(this, "_setAndNotify", (e, r) => {
60
+ a(this, "_setAndNotify", (e, r) => {
61
61
  const n = this.equals(this._value, e);
62
62
  n || (this._value = e), (r || !n) && this._onValueListeners.forEach((s) => s(e));
63
63
  });
64
- l(this, "_disposed", !1);
65
- l(this, "isDisposed", () => this._disposed);
66
- l(this, "onDispose", (e) => {
64
+ a(this, "_disposed", !1);
65
+ a(this, "isDisposed", () => this._disposed);
66
+ a(this, "onDispose", (e) => {
67
67
  this._onDisposeListeners.push(e);
68
68
  });
69
- l(this, "dispose", () => {
69
+ a(this, "dispose", () => {
70
70
  this._disposed || (this._disposed = !0, this._onDisposeListeners.forEach((e) => e()), this._onDisposeListeners.length = 0, this._derivatives.length = 0);
71
71
  });
72
- l(this, "map", (e, r = (n, s) => n === s) => {
73
- const n = new T(() => {
72
+ a(this, "map", (e, r = (n, s) => n === s) => {
73
+ const n = new E(() => {
74
74
  try {
75
75
  return e(this.get());
76
76
  } catch (s) {
@@ -79,8 +79,8 @@ const _ = class _ {
79
79
  }, r);
80
80
  return this.setDerivative(n), n;
81
81
  });
82
- l(this, "flatMap", (e, r = (n, s) => n === s) => {
83
- const n = new T(() => {
82
+ a(this, "flatMap", (e, r = (n, s) => n === s) => {
83
+ const n = new E(() => {
84
84
  try {
85
85
  return e(this.get()).get();
86
86
  } catch (s) {
@@ -89,14 +89,14 @@ const _ = class _ {
89
89
  }, r);
90
90
  return this.setDerivative(n), n;
91
91
  });
92
- l(this, "tap", (e) => this.map((r) => (e(r), r)));
93
- l(this, "at", (e) => this.map((r) => r[e]));
94
- l(this, "$", new Proxy(this, {
92
+ a(this, "tap", (e) => this.map((r) => (e(r), r)));
93
+ a(this, "at", (e) => this.map((r) => r[e]));
94
+ a(this, "$", new Proxy(this, {
95
95
  get: (e, r) => this.at(r)
96
96
  }));
97
- l(this, "filter", (e, r) => {
97
+ a(this, "filter", (e, r) => {
98
98
  let n = r ?? this.get();
99
- const s = new T(() => {
99
+ const s = new E(() => {
100
100
  try {
101
101
  const i = this.get();
102
102
  return n = e(i) ? i : n;
@@ -106,26 +106,26 @@ const _ = class _ {
106
106
  }, this.equals);
107
107
  return this.setDerivative(s), s;
108
108
  });
109
- l(this, "filterMap", (e, r, n = (s, i) => s === i) => {
109
+ a(this, "filterMap", (e, r, n = (s, i) => s === i) => {
110
110
  let s = r;
111
- const i = new T(() => {
111
+ const i = new E(() => {
112
112
  try {
113
- const o = this.get(), a = e(o);
114
- return s = a ?? s;
113
+ const o = this.get(), l = e(o);
114
+ return s = l ?? s;
115
115
  } catch (o) {
116
116
  throw console.error("Error in Signal.filterMap:", o), o;
117
117
  }
118
118
  }, n);
119
119
  return this.setDerivative(i), i;
120
120
  });
121
- l(this, "mapAsync", (e, r, n, s = (i, o) => i === o) => {
122
- const i = A(r, s);
121
+ a(this, "mapAsync", (e, r, n, s = (i, o) => i === o) => {
122
+ const i = $(r, s);
123
123
  let o = 0;
124
124
  return i.onDispose(
125
- this.on((a) => {
125
+ this.on((l) => {
126
126
  const u = ++o;
127
127
  try {
128
- e(a).then((c) => {
128
+ e(l).then((c) => {
129
129
  u === o && i.set(c);
130
130
  }).catch((c) => {
131
131
  u === o && (n != null ? i.set(n(c)) : console.error(
@@ -139,17 +139,17 @@ const _ = class _ {
139
139
  })
140
140
  ), i;
141
141
  });
142
- l(this, "mapMaybe", (e, r) => this.map((n) => e(n) ?? r));
143
- l(this, "feedProp", (e, r = !1) => {
142
+ a(this, "mapMaybe", (e, r) => this.map((n) => e(n) ?? r));
143
+ a(this, "feedProp", (e, r = !1) => {
144
144
  const n = this.on(e.set);
145
145
  return e.onDispose(n), r ? this.onDispose(e.dispose) : this.onDispose(n), e;
146
146
  });
147
- l(this, "deriveProp", (e = !0) => this.feedProp(A(this.get()), e));
148
- l(this, "count", () => {
147
+ a(this, "deriveProp", (e = !0) => this.feedProp($(this.get()), e));
148
+ a(this, "count", () => {
149
149
  let e = 0;
150
150
  return this.map(() => ++e);
151
151
  });
152
- l(this, "setDerivative", (e) => {
152
+ a(this, "setDerivative", (e) => {
153
153
  this._derivatives.push(e), e.onDispose(() => {
154
154
  this._derivatives.splice(
155
155
  this._derivatives.indexOf(e),
@@ -169,7 +169,7 @@ const _ = class _ {
169
169
  }), i;
170
170
  }
171
171
  static is(e) {
172
- return e != null && e[te] === !0;
172
+ return e != null && e[k] === !0;
173
173
  }
174
174
  static wrap(e, r = (n, s) => n === s) {
175
175
  return _.is(e) ? e : new _(e, r);
@@ -189,50 +189,50 @@ const _ = class _ {
189
189
  };
190
190
  let h = _;
191
191
  const Be = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
192
- var le, ce;
193
- class T extends (ce = h, le = ne, ce) {
192
+ var ie, oe;
193
+ class E extends (oe = h, ie = ee, oe) {
194
194
  constructor(r, n) {
195
195
  super(void 0, n);
196
- l(this, le, !0);
197
- l(this, "_isDirty", !1);
198
- l(this, "setDirty", () => {
196
+ a(this, ie, !0);
197
+ a(this, "_isDirty", !1);
198
+ a(this, "setDirty", () => {
199
199
  this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((r) => r.setDirty()), this.scheduleNotify());
200
200
  });
201
- l(this, "_scheduleCount", 0);
202
- l(this, "scheduleNotify", () => {
201
+ a(this, "_scheduleCount", 0);
202
+ a(this, "scheduleNotify", () => {
203
203
  const r = ++this._scheduleCount;
204
204
  Be(() => {
205
205
  this._scheduleCount !== r || this._disposed !== !1 || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn(), !1));
206
206
  });
207
207
  });
208
- l(this, "get", () => (this._isDirty && (this._isDirty = !1, this._value = this._fn(), this._setAndNotify(this._value, !0)), this._value));
208
+ a(this, "get", () => (this._isDirty && (this._isDirty = !1, this._value = this._fn(), this._setAndNotify(this._value, !0)), this._value));
209
209
  this._fn = r, this.setDirty();
210
210
  }
211
211
  static is(r) {
212
- return r != null && r[ne] === !0;
212
+ return r != null && r[ee] === !0;
213
213
  }
214
214
  get value() {
215
215
  return this.get();
216
216
  }
217
217
  }
218
- var fe, he;
219
- class q extends (he = h, fe = re, he) {
218
+ var ue, ae;
219
+ class q extends (ae = h, ue = Q, ae) {
220
220
  constructor() {
221
221
  super(...arguments);
222
- l(this, fe, !0);
223
- l(this, "set", (r) => {
222
+ a(this, ue, !0);
223
+ a(this, "set", (r) => {
224
224
  this._setAndNotify(r, !1);
225
225
  });
226
- l(this, "update", (r) => {
226
+ a(this, "update", (r) => {
227
227
  this._setAndNotify(r(this.get()), !1);
228
228
  });
229
- l(this, "reducer", (r, ...n) => {
229
+ a(this, "reducer", (r, ...n) => {
230
230
  const s = this;
231
231
  return function i(o) {
232
- const a = s.value;
233
- s.update((u) => r(u, o)), !s.equals(a, s.value) && n.forEach(
232
+ const l = s.value;
233
+ s.update((u) => r(u, o)), !s.equals(l, s.value) && n.forEach(
234
234
  (u) => u({
235
- previousState: a,
235
+ previousState: l,
236
236
  state: s.value,
237
237
  action: o,
238
238
  dispatch: i
@@ -240,17 +240,17 @@ class q extends (he = h, fe = re, he) {
240
240
  );
241
241
  };
242
242
  });
243
- l(this, "iso", (r, n, s = (i, o) => i === o) => {
243
+ a(this, "iso", (r, n, s = (i, o) => i === o) => {
244
244
  const i = new q(r(this.get()), s);
245
245
  return i.onDispose(this.on((o) => i.set(r(o)))), i.on((o) => this._setAndNotify(n(o), !1)), i;
246
246
  });
247
- l(this, "atProp", (r) => this.iso(
247
+ a(this, "atProp", (r) => this.iso(
248
248
  (n) => n[r],
249
249
  (n) => ({ ...this.value, [r]: n })
250
250
  ));
251
251
  }
252
252
  static is(r) {
253
- return r != null && r[re] === !0;
253
+ return r != null && r[Q] === !0;
254
254
  }
255
255
  get value() {
256
256
  return this.get();
@@ -260,90 +260,90 @@ class q extends (he = h, fe = re, he) {
260
260
  }
261
261
  }
262
262
  function U(t, e, r = (n, s) => n === s) {
263
- const n = new T(t, r);
263
+ const n = new E(t, r);
264
264
  return e.forEach((s) => s.setDerivative(n)), n;
265
265
  }
266
- function Kt(t, e) {
266
+ function It(t, e) {
267
267
  return U(t, e).dispose;
268
268
  }
269
- function A(t, e = (r, n) => r === n) {
269
+ function $(t, e = (r, n) => r === n) {
270
270
  return new q(t, e);
271
271
  }
272
- function Ut(t, e = (r, n) => r === n) {
272
+ function Ot(t, e = (r, n) => r === n) {
273
273
  return new h(t, e);
274
274
  }
275
- class de {
275
+ class le {
276
276
  constructor() {
277
- l(this, "_store", /* @__PURE__ */ new Map());
278
- l(this, "getItem", (e) => this._store.get(e) ?? null);
279
- l(this, "setItem", (e, r) => {
277
+ a(this, "_store", /* @__PURE__ */ new Map());
278
+ a(this, "getItem", (e) => this._store.get(e) ?? null);
279
+ a(this, "setItem", (e, r) => {
280
280
  this._store.set(e, r);
281
281
  });
282
282
  }
283
283
  }
284
- function pe({
284
+ function ce({
285
285
  key: t,
286
286
  defaultValue: e,
287
287
  store: r,
288
288
  serialize: n = JSON.stringify,
289
289
  deserialize: s = JSON.parse,
290
- equals: i = (a, u) => a === u,
291
- onLoad: o = (a) => a
290
+ equals: i = (l, u) => l === u,
291
+ onLoad: o = (l) => l
292
292
  }) {
293
- const a = r.getItem(t), u = new q(
294
- a != null ? o(s(a)) : typeof e == "function" ? e() : e,
293
+ const l = r.getItem(t), u = new q(
294
+ l != null ? o(s(l)) : typeof e == "function" ? e() : e,
295
295
  i
296
296
  );
297
297
  return u.on((c) => {
298
298
  r.setItem(t, n(c));
299
299
  }), u;
300
300
  }
301
- function kt(t) {
302
- return pe({
301
+ function xt(t) {
302
+ return ce({
303
303
  ...t,
304
- store: (window == null ? void 0 : window.localStorage) ?? new de()
304
+ store: (window == null ? void 0 : window.localStorage) ?? new le()
305
305
  });
306
306
  }
307
- function Bt(t) {
308
- return pe({
307
+ function Ft(t) {
308
+ return ce({
309
309
  ...t,
310
- store: (window == null ? void 0 : window.sessionStorage) ?? new de()
310
+ store: (window == null ? void 0 : window.sessionStorage) ?? new le()
311
311
  });
312
312
  }
313
- function se(t) {
313
+ function te(t) {
314
314
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
315
315
  }
316
316
  function Ge(t, e, r, n) {
317
- const s = (n == null ? void 0 : n.duration) ?? 300, i = (n == null ? void 0 : n.easing) ?? ((b) => b), o = (n == null ? void 0 : n.equals) ?? ((b, O) => b === O);
318
- let a = n == null ? void 0 : n.interpolate, u = t, c = e(), p = performance.now(), m = null, d = !0;
319
- const E = new T(e, o), y = A(t, o);
320
- y.onDispose(() => {
317
+ const s = (n == null ? void 0 : n.duration) ?? 300, i = (n == null ? void 0 : n.easing) ?? ((S) => S), o = (n == null ? void 0 : n.equals) ?? ((S, R) => S === R);
318
+ let l = n == null ? void 0 : n.interpolate, u = t, c = e(), p = performance.now(), m = null, d = !0;
319
+ const y = new E(e, o), A = $(t, o);
320
+ A.onDispose(() => {
321
321
  m !== null && cancelAnimationFrame(m);
322
- }), y.onDispose(E.dispose), r.forEach((b) => {
323
- b.setDerivative(E), b.onDispose(y.dispose);
322
+ }), A.onDispose(y.dispose), r.forEach((S) => {
323
+ S.setDerivative(y), S.onDispose(A.dispose);
324
324
  });
325
- const Y = (b) => {
326
- c = b, p = performance.now(), u = y.value, d && (d = !1, m = se(J));
327
- }, J = () => {
328
- const O = (performance.now() - p) / h.unwrap(s), qe = i(O);
329
- a == null && (a = Ue(u));
330
- let Q = a(u, c, qe);
331
- O >= 1 ? (d = !0, Q = c) : m = se(J), y.set(Q);
325
+ const Z = (S) => {
326
+ c = S, p = performance.now(), u = A.value, d && (d = !1, m = te(z));
327
+ }, z = () => {
328
+ const R = (performance.now() - p) / h.unwrap(s), qe = i(R);
329
+ l == null && (l = Ke(u));
330
+ let H = l(u, c, qe);
331
+ R >= 1 ? (d = !0, H = c) : m = te(z), A.set(H);
332
332
  };
333
- return E.on(Y), y;
333
+ return y.on(Z), A;
334
334
  }
335
- function Gt(t, e) {
335
+ function qt(t, e) {
336
336
  const { initialValue: r, ...n } = e ?? {};
337
337
  return Ge(r ?? t.get(), t.get, [t], n);
338
338
  }
339
- function Jt(t, e) {
339
+ function Vt(t, e) {
340
340
  const { signals: r, literals: n } = Object.entries(t).reduce(
341
- ({ signals: i, literals: o }, [a, u]) => (h.is(u) ? i.push([a, u]) : o[a] = u, { signals: i, literals: o }),
341
+ ({ signals: i, literals: o }, [l, u]) => (h.is(u) ? i.push([l, u]) : o[l] = u, { signals: i, literals: o }),
342
342
  { signals: [], literals: {} }
343
343
  ), s = r.map(([, i]) => i);
344
344
  return U(() => (r.forEach(([i, o]) => n[i] = o.value), e(n)), s);
345
345
  }
346
- function ie(t) {
346
+ function re(t) {
347
347
  let e = t.match(/rgba?\((\d+), (\d+), (\d+)(, (\d+))?\)/);
348
348
  return e != null ? [
349
349
  Number(e[1]),
@@ -365,7 +365,7 @@ function ie(t) {
365
365
  "hsla"
366
366
  ] : [0, 0, 0, 1, "rgba"]));
367
367
  }
368
- function oe(t) {
368
+ function ne(t) {
369
369
  const e = /^(inset\s)?(-?\d+)([a-zA-Z]*)(\s+)(-?\d+)([a-zA-Z]*)(?:\s+(-?\d+)([a-zA-Z]*))?(?:\s+(-?\d+)([a-zA-Z]*))?(?:\s+(-?\d+)([a-zA-Z]*))?(?:\s+)([a-zA-Z0-9(),.]+)$/i, r = t.match(e);
370
370
  if (r == null)
371
371
  return {
@@ -376,7 +376,7 @@ function oe(t) {
376
376
  spread: 0,
377
377
  color: "rgba(0, 0, 0, 0)"
378
378
  };
379
- const [, n, s, , , i, , o, , a, , u] = r, c = o != null ? parseInt(o, 10) : 0, p = a != null ? parseInt(a, 10) : 0;
379
+ const [, n, s, , , i, , o, , l, , u] = r, c = o != null ? parseInt(o, 10) : 0, p = l != null ? parseInt(l, 10) : 0;
380
380
  return {
381
381
  inset: !!n,
382
382
  x: parseInt(s, 10),
@@ -386,93 +386,93 @@ function oe(t) {
386
386
  color: u
387
387
  };
388
388
  }
389
- function Je(t) {
389
+ function ze(t) {
390
390
  const { inset: e, x: r, y: n, blur: s, spread: i, color: o } = t;
391
391
  return `${e ? "inset " : ""}${r}px ${n}px ${s}px ${i}px ${o}`;
392
392
  }
393
- function Qe(t) {
393
+ function He(t) {
394
394
  return t[4] === "rgba" ? `rgba(${t[0]}, ${t[1]}, ${t[2]}, ${t[3]})` : t[4] === "hex" ? `#${t[0].toString(16).padStart(2, "0")}${t[1].toString(16).padStart(2, "0")}${t[2].toString(16).padStart(2, "0")}` : t[4] === "hsla" ? `hsla(${t[0]}, ${t[1]}%, ${t[2]}%, ${t[3]})` : "";
395
395
  }
396
- function et(t, e) {
397
- const [r, n, s, i, o] = ie(t), [a, u, c, p] = ie(e);
396
+ function Je(t, e) {
397
+ const [r, n, s, i, o] = re(t), [l, u, c, p] = re(e);
398
398
  return (m) => {
399
- const d = r + (a - r) * m, E = n + (u - n) * m, y = s + (c - s) * m, Y = i + (p - i) * m;
400
- return Qe([d, E, y, Y, o]);
399
+ const d = r + (l - r) * m, y = n + (u - n) * m, A = s + (c - s) * m, Z = i + (p - i) * m;
400
+ return He([d, y, A, Z, o]);
401
401
  };
402
402
  }
403
- function Qt(t, e) {
404
- const r = oe(t), n = oe(e);
403
+ function Wt(t, e) {
404
+ const r = ne(t), n = ne(e);
405
405
  return (s) => {
406
- const i = r.x + (n.x - r.x) * s, o = r.y + (n.y - r.y) * s, a = r.blur + (n.blur - r.blur) * s, u = r.spread + (n.spread - r.spread) * s, c = ge(r.color, n.color)(s);
407
- return Je({ inset: r.inset, x: i, y: o, blur: a, spread: u, color: c });
406
+ const i = r.x + (n.x - r.x) * s, o = r.y + (n.y - r.y) * s, l = r.blur + (n.blur - r.blur) * s, u = r.spread + (n.spread - r.spread) * s, c = he(r.color, n.color)(s);
407
+ return ze({ inset: r.inset, x: i, y: o, blur: l, spread: u, color: c });
408
408
  };
409
409
  }
410
- function tt(t, e) {
411
- var r, n, s, i, o, a, u, c;
412
- return e === "translateX" ? new WebKitCSSMatrix(t.transform).m41 : e === "translateY" ? new WebKitCSSMatrix(t.transform).m42 : e === "translateZ" ? new WebKitCSSMatrix(t.transform).m43 : e === "rotateX" ? new WebKitCSSMatrix(t.transform).m12 : e === "rotateY" ? new WebKitCSSMatrix(t.transform).m21 : e === "rotateZ" ? new WebKitCSSMatrix(t.transform).m31 : e === "scaleX" ? new WebKitCSSMatrix(t.transform).m11 : e === "scaleY" ? new WebKitCSSMatrix(t.transform).m22 : e === "scaleZ" ? new WebKitCSSMatrix(t.transform).m33 : e === "skewX" ? new WebKitCSSMatrix(t.transform).m13 : e === "skewY" ? new WebKitCSSMatrix(t.transform).m23 : Number(e === "grayScale" ? (r = t.filter.match(/grayscale\((\d+)%\)/)) == null ? void 0 : r[1] : e === "sepia" ? (n = t.filter.match(/sepia\((\d+)%\)/)) == null ? void 0 : n[1] : e === "saturate" ? (s = t.filter.match(/saturate\((\d+)%\)/)) == null ? void 0 : s[1] : e === "hueRotate" ? (i = t.filter.match(/hue-rotate\((\d+)deg\)/)) == null ? void 0 : i[1] : e === "invert" ? (o = t.filter.match(/invert\((\d+)%\)/)) == null ? void 0 : o[1] : e === "brightness" ? (a = t.filter.match(/brightness\((\d+)%\)/)) == null ? void 0 : a[1] : e === "contrast" ? (u = t.filter.match(/contrast\((\d+)%\)/)) == null ? void 0 : u[1] : e === "blur" ? (c = t.filter.match(/blur\((\d+)px\)/)) == null ? void 0 : c[1] : t.getPropertyValue(e));
410
+ function ke(t, e) {
411
+ var r, n, s, i, o, l, u, c;
412
+ return e === "translateX" ? new WebKitCSSMatrix(t.transform).m41 : e === "translateY" ? new WebKitCSSMatrix(t.transform).m42 : e === "translateZ" ? new WebKitCSSMatrix(t.transform).m43 : e === "rotateX" ? new WebKitCSSMatrix(t.transform).m12 : e === "rotateY" ? new WebKitCSSMatrix(t.transform).m21 : e === "rotateZ" ? new WebKitCSSMatrix(t.transform).m31 : e === "scaleX" ? new WebKitCSSMatrix(t.transform).m11 : e === "scaleY" ? new WebKitCSSMatrix(t.transform).m22 : e === "scaleZ" ? new WebKitCSSMatrix(t.transform).m33 : e === "skewX" ? new WebKitCSSMatrix(t.transform).m13 : e === "skewY" ? new WebKitCSSMatrix(t.transform).m23 : Number(e === "grayScale" ? (r = t.filter.match(/grayscale\((\d+)%\)/)) == null ? void 0 : r[1] : e === "sepia" ? (n = t.filter.match(/sepia\((\d+)%\)/)) == null ? void 0 : n[1] : e === "saturate" ? (s = t.filter.match(/saturate\((\d+)%\)/)) == null ? void 0 : s[1] : e === "hueRotate" ? (i = t.filter.match(/hue-rotate\((\d+)deg\)/)) == null ? void 0 : i[1] : e === "invert" ? (o = t.filter.match(/invert\((\d+)%\)/)) == null ? void 0 : o[1] : e === "brightness" ? (l = t.filter.match(/brightness\((\d+)%\)/)) == null ? void 0 : l[1] : e === "contrast" ? (u = t.filter.match(/contrast\((\d+)%\)/)) == null ? void 0 : u[1] : e === "blur" ? (c = t.filter.match(/blur\((\d+)px\)/)) == null ? void 0 : c[1] : t.getPropertyValue(e));
413
413
  }
414
- function er(t, e) {
414
+ function Zt(t, e) {
415
415
  const r = {}, n = getComputedStyle(t);
416
416
  for (const [s, i] of Object.entries(e)) {
417
417
  const o = s;
418
- i != null && (r[o] = tt(n, o));
418
+ i != null && (r[o] = ke(n, o));
419
419
  }
420
420
  return r;
421
421
  }
422
- function W(t, e, r) {
422
+ function O(t, e, r) {
423
423
  r != null && (e === "translateX" ? t.style.transform += ` translateX(${r}px)` : e === "translateY" ? t.style.transform += ` translateY(${r}px)` : e === "translateZ" ? t.style.transform += ` translateZ(${r}px)` : e === "rotateX" ? t.style.transform += ` rotateX(${r}deg)` : e === "rotateY" ? t.style.transform += ` rotateY(${r}deg)` : e === "rotateZ" ? t.style.transform += ` rotateZ(${r}deg)` : e === "scaleX" ? t.style.transform += ` scaleX(${r})` : e === "scaleY" ? t.style.transform += ` scaleY(${r})` : e === "scaleZ" ? t.style.transform += ` scaleZ(${r})` : e === "skewX" ? t.style.transform += ` skewX(${r}deg)` : e === "skewY" ? t.style.transform += ` skewY(${r}deg)` : e === "grayScale" ? t.style.filter += ` grayscale(${r}%)` : e === "sepia" ? t.style.filter += ` sepia(${r}%)` : e === "saturate" ? t.style.filter += ` saturate(${r}%)` : e === "hueRotate" ? t.style.filter += ` hue-rotate(${r}deg)` : e === "invert" ? t.style.filter += ` invert(${r}%)` : e === "brightness" ? t.style.filter += ` brightness(${r}%)` : e === "contrast" ? t.style.filter += ` contrast(${r}%)` : e === "blur" && (t.style.filter += ` blur(${r}px)`), t.style.setProperty(e, String(r)));
424
424
  }
425
- const j = /* @__PURE__ */ new Map();
426
- function me(t, e, r) {
427
- if (j.has(r + ":" + t + e))
428
- return j.get(t + e);
429
- const n = et(t, e);
430
- return j.set(r + ":" + t + e, n), n;
425
+ const X = /* @__PURE__ */ new Map();
426
+ function fe(t, e, r) {
427
+ if (X.has(r + ":" + t + e))
428
+ return X.get(t + e);
429
+ const n = Je(t, e);
430
+ return X.set(r + ":" + t + e, n), n;
431
431
  }
432
- function ge(t, e) {
433
- return me(t, e, "c");
432
+ function he(t, e) {
433
+ return fe(t, e, "c");
434
434
  }
435
- function rt(t, e) {
436
- return me(t, e, "s");
435
+ function Qe(t, e) {
436
+ return fe(t, e, "s");
437
437
  }
438
- function nt(t, e, r, n, s) {
438
+ function et(t, e, r, n, s) {
439
439
  if (r != null && n != null) {
440
440
  if (typeof r == "number" && typeof n == "number") {
441
441
  const i = r + (n - r) * s;
442
- W(t, e, i);
442
+ O(t, e, i);
443
443
  } else if (e === "boxShadow" || e === "textShadow") {
444
- const i = rt(
444
+ const i = Qe(
445
445
  r,
446
446
  n
447
447
  )(s);
448
- W(t, e, i);
448
+ O(t, e, i);
449
449
  } else if (e === "color" || e === "backgroundColor" || e === "borderColor" || e === "outlineColor") {
450
- const i = ge(
450
+ const i = he(
451
451
  r,
452
452
  n
453
453
  )(s);
454
- W(t, e, i);
454
+ O(t, e, i);
455
455
  }
456
456
  }
457
457
  }
458
- function tr(t, e, r, n) {
458
+ function Xt(t, e, r, n) {
459
459
  t.style.transform = "", t.style.filter = "";
460
460
  for (const [s, i] of Object.entries(r)) {
461
461
  const o = s;
462
- nt(t, o, e[o], i, n);
462
+ et(t, o, e[o], i, n);
463
463
  }
464
464
  }
465
- function rr(t, e) {
465
+ function Yt(t, e) {
466
466
  t.style.transform = "", t.style.filter = "";
467
467
  for (const [r, n] of Object.entries(e))
468
- n != null && W(t, r, n);
468
+ n != null && O(t, r, n);
469
469
  }
470
- const we = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), Se = /* @__PURE__ */ new Set([
470
+ const de = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), pe = /* @__PURE__ */ new Set([
471
471
  "rowSpan",
472
472
  "colSpan",
473
473
  "tabIndex",
474
474
  "valueAsNumber"
475
- ]), be = /* @__PURE__ */ new Set(["valueAsDate"]), ve = /* @__PURE__ */ new Set([
475
+ ]), me = /* @__PURE__ */ new Set(["valueAsDate"]), ge = /* @__PURE__ */ new Set([
476
476
  "value",
477
477
  "textContent",
478
478
  "innerText",
@@ -480,47 +480,47 @@ const we = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]
480
480
  "outerHTML",
481
481
  "className",
482
482
  "classList"
483
- ]), H = /* @__PURE__ */ new Map();
484
- function $(t, e) {
485
- if (H.has(t))
486
- return H.get(t);
483
+ ]), Y = /* @__PURE__ */ new Map();
484
+ function D(t, e) {
485
+ if (Y.has(t))
486
+ return Y.get(t);
487
487
  {
488
488
  const r = e(t);
489
- return H.set(t, r), r;
489
+ return Y.set(t, r), r;
490
490
  }
491
491
  }
492
- function st(t) {
492
+ function tt(t) {
493
493
  return (e, r) => {
494
494
  r == null ? e[t] = null : e[t] = !!r;
495
495
  };
496
496
  }
497
- function it(t) {
497
+ function rt(t) {
498
498
  return (e, r) => {
499
499
  r == null ? e[t] = null : e[t] = Number(r);
500
500
  };
501
501
  }
502
- function ot(t) {
502
+ function nt(t) {
503
503
  return (e, r) => {
504
504
  r == null ? e[t] = null : e[t] = r;
505
505
  };
506
506
  }
507
- function ut(t) {
507
+ function st(t) {
508
508
  return (e, r) => {
509
509
  r == null ? e[t] = null : e[t] = String(r);
510
510
  };
511
511
  }
512
- function at(t) {
512
+ function it(t) {
513
513
  return (e, r) => {
514
514
  r == null ? e.removeAttribute(t) : e.setAttribute(t, r);
515
515
  };
516
516
  }
517
- function Ae(t) {
518
- return we.has(t) ? $(t, st) : Se.has(t) ? $(t, it) : be.has(t) ? $(t, ot) : ve.has(t) ? $(t, ut) : $(t, at);
517
+ function Se(t) {
518
+ return de.has(t) ? D(t, tt) : pe.has(t) ? D(t, rt) : me.has(t) ? D(t, nt) : ge.has(t) ? D(t, st) : D(t, it);
519
519
  }
520
- function ye(t) {
521
- return (e) => we.has(t) ? !!e[t] : Se.has(t) ? Number(e[t]) : be.has(t) ? e[t] : ve.has(t) ? String(e[t]) : e.getAttribute(t);
520
+ function be(t) {
521
+ return (e) => de.has(t) ? !!e[t] : pe.has(t) ? Number(e[t]) : me.has(t) ? e[t] : ge.has(t) ? String(e[t]) : e.getAttribute(t);
522
522
  }
523
- class v {
523
+ class b {
524
524
  /**
525
525
  * Constructs a new `DOMContext` instance.
526
526
  *
@@ -538,19 +538,19 @@ class v {
538
538
  * @param namespace - The namespace URI to create the element in, or `undefined` to create a standard HTML element.
539
539
  * @returns The newly created element.
540
540
  */
541
- l(this, "createElement", (e, r) => r !== void 0 ? this.document.createElementNS(r, e) : this.document.createElement(e));
541
+ a(this, "createElement", (e, r) => r !== void 0 ? this.document.createElementNS(r, e) : this.document.createElement(e));
542
542
  /**
543
543
  * Creates a new text node with the specified text content.
544
544
  * @param text - The text content for the new text node.
545
545
  * @returns A new `Text` node with the specified text content.
546
546
  */
547
- l(this, "createText", (e) => this.document.createTextNode(e));
547
+ a(this, "createText", (e) => this.document.createTextNode(e));
548
548
  /**
549
549
  * Creates a new `DOMContext` with a reference to a newly created text node.
550
550
  * The text node is appended or inserted to the current `DOMContext`.
551
551
  * The new `DOMContext` with the reference is returned.
552
552
  */
553
- l(this, "makeRef", () => {
553
+ a(this, "makeRef", () => {
554
554
  const e = this.createText("");
555
555
  return this.appendOrInsert(e), this.withReference(e);
556
556
  });
@@ -559,7 +559,7 @@ class v {
559
559
  *
560
560
  * @param child - The child node to append or insert.
561
561
  */
562
- l(this, "appendOrInsert", (e) => {
562
+ a(this, "appendOrInsert", (e) => {
563
563
  this.reference === void 0 ? this.element.appendChild(e) : this.element.insertBefore(e, this.reference);
564
564
  });
565
565
  /**
@@ -568,18 +568,18 @@ class v {
568
568
  * @param document - The `Document` to use for the `DOMContext`.
569
569
  * @returns A new `DOMContext` instance.
570
570
  */
571
- l(this, "withDocument", (e) => new v(e, this.element, this.reference, this.providers, !0));
571
+ a(this, "withDocument", (e) => new b(e, this.element, this.reference, this.providers, !0));
572
572
  /**
573
573
  * Creates a new `DOMContext` instance with the provided `element`.
574
574
  * @param element - The DOM element to use in the new `DOMContext` instance.
575
575
  * @returns A new `DOMContext` instance with the provided `element`.
576
576
  */
577
- l(this, "withElement", (e) => new v(this.document, e, void 0, this.providers, !1));
577
+ a(this, "withElement", (e) => new b(this.document, e, void 0, this.providers, !1));
578
578
  /**
579
579
  * Creates a new `DOMContext` instance with the `isFirstLevel` property set to `true`.
580
580
  * @returns A new `DOMContext` instance with the `isFirstLevel` property set to `true`.
581
581
  */
582
- l(this, "withFirstLevel", () => new v(
582
+ a(this, "withFirstLevel", () => new b(
583
583
  this.document,
584
584
  this.element,
585
585
  this.reference,
@@ -592,7 +592,7 @@ class v {
592
592
  * @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
593
593
  * @returns A new `DOMContext` instance with the specified reference.
594
594
  */
595
- l(this, "withReference", (e) => new v(
595
+ a(this, "withReference", (e) => new b(
596
596
  this.document,
597
597
  this.element,
598
598
  e,
@@ -605,7 +605,7 @@ class v {
605
605
  * @param value - The value to set for the provider.
606
606
  * @returns A new DOMContext with the updated providers.
607
607
  */
608
- l(this, "withProvider", (e, r) => new v(
608
+ a(this, "withProvider", (e, r) => new b(
609
609
  this.document,
610
610
  this.element,
611
611
  this.reference,
@@ -622,7 +622,7 @@ class v {
622
622
  * @param providers - An object containing the providers to be merged into the existing providers.
623
623
  * @returns A new DOMContext instance with the merged providers.
624
624
  */
625
- l(this, "withProviders", (e) => new v(
625
+ a(this, "withProviders", (e) => new b(
626
626
  this.document,
627
627
  this.element,
628
628
  this.reference,
@@ -639,7 +639,7 @@ class v {
639
639
  * @returns The provider for the given mark.
640
640
  * @throws {Error} If the provider for the given mark is not found.
641
641
  */
642
- l(this, "getProvider", (e) => {
642
+ a(this, "getProvider", (e) => {
643
643
  if (this.providers[e] === void 0)
644
644
  throw new Error(`Provider not found: ${e.description}`);
645
645
  return this.providers[e];
@@ -654,20 +654,20 @@ class v {
654
654
  * @returns A new `DOMContext` instance.
655
655
  */
656
656
  static of(e, r) {
657
- return new v(e.ownerDocument, e, r, {}, !0);
657
+ return new b(e.ownerDocument, e, r, {}, !0);
658
658
  }
659
659
  }
660
- function S(t) {
660
+ function g(t) {
661
661
  const e = t;
662
662
  e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
663
663
  }
664
- function lt(t) {
665
- return _e(t) ? t : t.parentElement;
664
+ function ot(t) {
665
+ return we(t) ? t : t.parentElement;
666
666
  }
667
- function _e(t) {
667
+ function we(t) {
668
668
  return t.nodeType === 1;
669
669
  }
670
- function ct(t, e, r) {
670
+ function ut(t, e, r) {
671
671
  let n = t.target;
672
672
  for (; n != null && !(n instanceof HTMLAnchorElement); )
673
673
  n = n.parentElement;
@@ -676,50 +676,50 @@ function ct(t, e, r) {
676
676
  if (t.button !== 0 || t.ctrlKey || t.metaKey || s.target !== "_self" && s.target !== "" || s.getAttribute("download") != null)
677
677
  return !0;
678
678
  if (r) {
679
- const { pathname: i, search: o, hash: a } = s, u = i + o + a;
679
+ const { pathname: i, search: o, hash: l } = s, u = i + o + l;
680
680
  if (s.getAttribute("href") !== u || e && !/\/[^/.]*$/.test(i))
681
681
  return !0;
682
682
  }
683
683
  return !1;
684
684
  }
685
- const nr = (t, e = {
685
+ const jt = (t, e = {
686
686
  checkExtension: !0,
687
687
  checkExternalUrl: !0
688
688
  }) => (r) => {
689
689
  const { checkExtension: n, checkExternalUrl: s } = e;
690
- ct(
690
+ ut(
691
691
  r,
692
692
  n === !0,
693
693
  s === !0
694
694
  ) || t() && r.preventDefault();
695
- }, Ee = (t) => (e) => {
696
- Le(e);
695
+ }, ve = (t) => (e) => {
696
+ $e(e);
697
697
  const r = e.createText(t);
698
698
  return e.appendOrInsert(r), (n) => {
699
- n && S(r);
699
+ n && g(r);
700
700
  };
701
- }, Pe = (t) => (e) => {
702
- Le(e);
701
+ }, Ae = (t) => (e) => {
702
+ $e(e);
703
703
  const r = e.createText(t.value);
704
704
  e.appendOrInsert(r);
705
705
  const n = t.on((s) => r.data = s);
706
706
  return (s) => {
707
- n(), s && S(r);
707
+ n(), s && g(r);
708
708
  };
709
709
  };
710
- function sr(t) {
711
- return h.is(t) ? Pe(t) : Ee(t);
710
+ function Kt(t) {
711
+ return h.is(t) ? Ae(t) : ve(t);
712
712
  }
713
- const g = (...t) => (e) => {
713
+ const w = (...t) => (e) => {
714
714
  const r = t.map((n) => f(n)(e));
715
715
  return (n) => {
716
716
  r.forEach((s) => s(n));
717
717
  };
718
- }, w = () => () => {
719
- }, ft = (t) => (e) => (Ne(e), e.element.classList.add(...t), (r) => {
718
+ }, v = () => () => {
719
+ }, at = (t) => (e) => (De(e), e.element.classList.add(...t), (r) => {
720
720
  r && e.element.classList.remove(...t);
721
- }), ht = (t) => (e) => {
722
- Ne(e);
721
+ }), lt = (t) => (e) => {
722
+ De(e);
723
723
  const r = e.element;
724
724
  let n = [];
725
725
  const s = t.on((i) => {
@@ -728,19 +728,19 @@ const g = (...t) => (e) => {
728
728
  return (i) => {
729
729
  s(), i && n.forEach((o) => r.classList.remove(o)), n.length = 0;
730
730
  };
731
- }, R = (t, e) => {
732
- const r = Ae(t), n = ye(t);
731
+ }, N = (t, e) => {
732
+ const r = Se(t), n = be(t);
733
733
  return (s) => {
734
- Ce(s, t);
734
+ Pe(s, t);
735
735
  const i = n(s.element);
736
736
  return r(s.element, e), (o) => {
737
737
  o && r(s.element, i);
738
738
  };
739
739
  };
740
- }, I = (t, e) => {
741
- const r = Ae(t), n = ye(t);
740
+ }, L = (t, e) => {
741
+ const r = Se(t), n = be(t);
742
742
  return (s) => {
743
- Ce(s, t);
743
+ Pe(s, t);
744
744
  const i = n(s.element);
745
745
  return e.on((o) => r(s.element, o)), (o) => {
746
746
  o && r(s.element, i);
@@ -749,255 +749,204 @@ const g = (...t) => (e) => {
749
749
  }, P = new Proxy(
750
750
  {},
751
751
  {
752
- get: (t, e) => e === "class" ? (r) => h.is(r) ? ht(r) : ft(
752
+ get: (t, e) => e === "class" ? (r) => h.is(r) ? lt(r) : at(
753
753
  (r ?? "").split(" ").filter((n) => n.length > 0)
754
- ) : (r) => h.is(r) ? I(
754
+ ) : (r) => h.is(r) ? L(
755
755
  e,
756
756
  r
757
- ) : R(
757
+ ) : N(
758
758
  e,
759
759
  r
760
760
  )
761
761
  }
762
- ), ir = new Proxy(
762
+ ), Ut = new Proxy(
763
763
  {},
764
764
  {
765
- get: (t, e) => (r) => h.is(r) ? I(
765
+ get: (t, e) => (r) => h.is(r) ? L(
766
766
  `data-${e}`,
767
767
  r
768
- ) : R(`data-${e}`, r)
768
+ ) : N(`data-${e}`, r)
769
769
  }
770
- ), or = new Proxy(
770
+ ), Bt = new Proxy(
771
771
  {},
772
772
  {
773
- get: (t, e) => (r) => h.is(r) ? I(
773
+ get: (t, e) => (r) => h.is(r) ? L(
774
774
  `aria-${e}`,
775
775
  r
776
- ) : R(
776
+ ) : N(
777
777
  `aria-${e}`,
778
778
  r
779
779
  )
780
780
  }
781
- ), ur = new Proxy(
781
+ ), Gt = new Proxy(
782
782
  {},
783
783
  {
784
- get: (t, e) => (r) => h.is(r) ? I(
784
+ get: (t, e) => (r) => h.is(r) ? L(
785
785
  e,
786
786
  r
787
- ) : R(
787
+ ) : N(
788
788
  e,
789
789
  r
790
790
  )
791
791
  }
792
- ), ar = new Proxy(
792
+ ), zt = new Proxy(
793
793
  {},
794
794
  {
795
- get: (t, e) => (r) => h.is(r) ? I(
795
+ get: (t, e) => (r) => h.is(r) ? L(
796
796
  e,
797
797
  r
798
- ) : R(
798
+ ) : N(
799
799
  e,
800
800
  r
801
801
  )
802
802
  }
803
803
  );
804
804
  function f(t) {
805
- return t == null ? w : Array.isArray(t) ? g(...t.map(f)) : typeof t == "string" ? Ee(t) : h.is(t) ? Pe(t) : t;
805
+ return t == null ? v : Array.isArray(t) ? w(...t.map(f)) : typeof t == "string" ? ve(t) : h.is(t) ? Ae(t) : t;
806
806
  }
807
- function Te(t, ...e) {
807
+ function _e(t, ...e) {
808
808
  return (r) => {
809
809
  const n = r.createElement(t, void 0);
810
- r.isFirstLevel && D.isSSR() && Me(n), r.appendOrInsert(n), r = r.withElement(n);
810
+ r.isFirstLevel && M.isSSR() && Te(n), r.appendOrInsert(n), r = r.withElement(n);
811
811
  const s = e.map((i) => f(i)(r));
812
812
  return (i) => {
813
- s.forEach((o) => o(!1)), i && S(n);
813
+ s.forEach((o) => o(!1)), i && g(n);
814
814
  };
815
815
  };
816
816
  }
817
- function De(t, e, ...r) {
817
+ function ye(t, e, ...r) {
818
818
  return (n) => {
819
819
  const s = n.createElement(t, e);
820
- n.isFirstLevel && D.isSSR() && Me(s), n.appendOrInsert(s), n = n.withElement(s);
820
+ n.isFirstLevel && M.isSSR() && Te(s), n.appendOrInsert(s), n = n.withElement(s);
821
821
  const i = r.map((o) => f(o)(n));
822
822
  return (o) => {
823
- i.forEach((a) => a(!1)), o && S(s);
823
+ i.forEach((l) => l(!1)), o && g(s);
824
824
  };
825
825
  };
826
826
  }
827
- const lr = new Proxy(
827
+ const Ht = new Proxy(
828
828
  {},
829
829
  {
830
- get: (t, e) => (...r) => Te(e, r.flatMap(f))
830
+ get: (t, e) => (...r) => _e(e, r.flatMap(f))
831
831
  }
832
- ), cr = new Proxy(
832
+ ), Jt = new Proxy(
833
833
  {},
834
834
  {
835
- get: (t, e) => (...r) => Te("input", P.type(e), ...r)
835
+ get: (t, e) => (...r) => _e("input", P.type(e), ...r)
836
836
  }
837
- ), dt = "http://www.w3.org/2000/svg", fr = new Proxy(
837
+ ), ct = "http://www.w3.org/2000/svg", kt = new Proxy(
838
838
  {},
839
839
  {
840
- get: (t, e) => (...r) => De(e, dt, r.flatMap(f))
840
+ get: (t, e) => (...r) => ye(e, ct, r.flatMap(f))
841
841
  }
842
- ), pt = "http://www.w3.org/1998/Math/MathML", hr = new Proxy(
842
+ ), ft = "http://www.w3.org/1998/Math/MathML", Qt = new Proxy(
843
843
  {},
844
844
  {
845
- get: (t, e) => (...r) => De(e, pt, r.flatMap(f))
845
+ get: (t, e) => (...r) => ye(e, ft, r.flatMap(f))
846
846
  }
847
- ), C = "data-tempo-attr", F = "data-tempo-class", $e = "data-tempo-node", V = "data-tempo-text";
848
- function mt(t, e) {
847
+ ), T = "data-tempo-attr", x = "data-tempo-class", Ee = "data-tempo-node", F = "data-tempo-text";
848
+ function ht(t, e) {
849
849
  const r = t.getAttribute(e);
850
850
  if (r != null) {
851
- const n = t.getAttribute(C) ?? "{}", s = { ...JSON.parse(n), name: r };
852
- t.setAttribute(C, JSON.stringify(s));
851
+ const n = t.getAttribute(T) ?? "{}", s = { ...JSON.parse(n), name: r };
852
+ t.setAttribute(T, JSON.stringify(s));
853
853
  }
854
854
  }
855
- function Ce(t, e) {
856
- D.isSSR() && t.isFirstLevel && mt(t.element, e);
855
+ function Pe(t, e) {
856
+ M.isSSR() && t.isFirstLevel && ht(t.element, e);
857
857
  }
858
- function gt(t) {
859
- t.querySelectorAll(`[${C}]`).forEach((e) => {
860
- const r = JSON.parse(e.getAttribute(C) ?? "{}");
858
+ function dt(t) {
859
+ t.querySelectorAll(`[${T}]`).forEach((e) => {
860
+ const r = JSON.parse(e.getAttribute(T) ?? "{}");
861
861
  for (const [n, s] of Object.entries(r))
862
862
  e.setAttribute(n, s);
863
- e.removeAttribute(C);
863
+ e.removeAttribute(T);
864
864
  });
865
865
  }
866
- function wt(t) {
867
- t.setAttribute(F, t.className);
866
+ function pt(t) {
867
+ t.setAttribute(x, t.className);
868
868
  }
869
- function Ne(t) {
870
- D.isSSR() && t.isFirstLevel && wt(t.element);
869
+ function De(t) {
870
+ M.isSSR() && t.isFirstLevel && pt(t.element);
871
871
  }
872
- function St(t) {
873
- t.querySelectorAll(`[${F}]`).forEach((e) => {
874
- const r = e.getAttribute(F);
875
- r !== null && (e.className = r, e.removeAttribute(F));
872
+ function mt(t) {
873
+ t.querySelectorAll(`[${x}]`).forEach((e) => {
874
+ const r = e.getAttribute(x);
875
+ r !== null && (e.className = r, e.removeAttribute(x));
876
876
  });
877
877
  }
878
- function Me(t) {
879
- t.setAttribute($e, "");
878
+ function Te(t) {
879
+ t.setAttribute(Ee, "");
880
880
  }
881
- function bt(t) {
882
- t.querySelectorAll(`[${$e}]`).forEach((e) => {
883
- S(e);
881
+ function gt(t) {
882
+ t.querySelectorAll(`[${Ee}]`).forEach((e) => {
883
+ g(e);
884
884
  });
885
885
  }
886
- function vt(t) {
887
- t.setAttribute(V, t.textContent ?? "");
886
+ function St(t) {
887
+ t.setAttribute(F, t.textContent ?? "");
888
888
  }
889
- function Le(t) {
890
- D.isSSR() && t.isFirstLevel && vt(t.element);
889
+ function $e(t) {
890
+ M.isSSR() && t.isFirstLevel && St(t.element);
891
891
  }
892
- function At(t) {
893
- t.querySelectorAll(`[${V}]`).forEach((e) => {
894
- e.textContent = e.getAttribute(V), e.removeAttribute(V);
892
+ function bt(t) {
893
+ t.querySelectorAll(`[${F}]`).forEach((e) => {
894
+ e.textContent = e.getAttribute(F), e.removeAttribute(F);
895
895
  });
896
896
  }
897
- function yt(t) {
898
- bt(t), St(t), gt(t), At(t);
897
+ function wt(t) {
898
+ gt(t), mt(t), dt(t), bt(t);
899
899
  }
900
- function Re() {
900
+ function Ce() {
901
901
  const t = globalThis;
902
902
  return t.__tempoSSR__ == null && (t.__tempoSSR__ = {
903
903
  isSSR: !1,
904
904
  counter: 0
905
905
  }), t.__tempoSSR__;
906
906
  }
907
- function k(t, e) {
908
- const r = Re();
907
+ function B(t, e) {
908
+ const r = Ce();
909
909
  r[t] = e;
910
910
  }
911
- function Ie(t) {
912
- return Re()[t];
911
+ function Ne(t) {
912
+ return Ce()[t];
913
913
  }
914
- function _t() {
915
- return Ie("isSSR");
914
+ function vt() {
915
+ return Ne("isSSR");
916
916
  }
917
- function K(t) {
918
- k("isSSR", t);
917
+ function j(t) {
918
+ B("isSSR", t);
919
919
  }
920
- function B() {
921
- return Ie("counter");
920
+ function G() {
921
+ return Ne("counter");
922
922
  }
923
- function Et() {
924
- k("counter", (B() ?? 0) + 1);
923
+ function At() {
924
+ B("counter", (G() ?? 0) + 1);
925
925
  }
926
- function Pt() {
927
- k("counter", (B() ?? 0) - 1);
926
+ function _t() {
927
+ B("counter", (G() ?? 0) - 1);
928
928
  }
929
- const dr = (t = 30) => (K(!0), new Promise((e, r) => {
929
+ const er = (t = 30) => (j(!0), new Promise((e, r) => {
930
930
  let n;
931
931
  const s = setInterval(() => {
932
- B() <= 0 && (clearInterval(s), clearTimeout(n), K(!1), e());
932
+ G() <= 0 && (clearInterval(s), clearTimeout(n), j(!1), e());
933
933
  }, 30);
934
934
  n = setTimeout(() => {
935
- clearInterval(s), K(!1), r(new Error("SSR Timeout"));
935
+ clearInterval(s), j(!1), r(new Error("SSR Timeout"));
936
936
  }, t * 1e3);
937
- })), D = {
938
- useDone: (t) => (Et(), f(t(Pt))),
939
- isSSR: _t
940
- }, Oe = (t, e) => (r) => {
941
- const n = Object.values(t).reduce((s, i) => {
942
- const o = r.getProvider(i);
943
- if (o == null)
944
- throw new Error(`No provider found for mark: ${i.description}`);
945
- return s[i] = o, s;
946
- }, {});
947
- return f(e(n))(r);
948
- }, pr = (t, e) => (r) => {
949
- const n = [], s = Object.entries(t).reduce(
950
- (i, [o, a]) => (n.push(
951
- a((u) => (Reflect.set(i, o, u), null))(r)
952
- ), i),
953
- {}
954
- );
955
- return n.push(e(s)(r)), (i) => {
956
- n.forEach((o) => o(i));
957
- };
958
- }, Tt = (t, e) => Oe([t], (r) => f(e(r[t]))), mr = (t, e) => Oe(t, (r) => f(e(r))), M = (t) => (e) => (r) => t(r, e);
959
- function Dt(t) {
960
- return Symbol(t);
961
- }
962
- const xe = (t, e) => (r) => f(e)(r.withProviders(t)), gr = (...t) => t.length > 0 ? t.reduceRight((e, r) => (n) => e(r(n))) : f, $t = (t, e, r) => xe({ [t]: e }, f(r)), wr = (t, e) => xe(t, f(e)), ue = Dt("Appearance"), Sr = {
963
- /**
964
- * Provides a child component with an appearance context, which can be used to
965
- * determine the current appearance (light or dark) based on the user's system
966
- * preferences.
967
- *
968
- * The appearance context is updated whenever the user's system preferences
969
- * change, and the component is cleaned up when it is no longer needed.
970
- *
971
- * @param child - The child component to be provided with the appearance context.
972
- * @returns The child component with the appearance context.
973
- */
974
- provide: (t) => {
975
- const e = window.matchMedia != null && window.matchMedia("(prefers-color-scheme: dark)").matches, r = A(e ? "dark" : "light"), n = (i) => {
976
- r.set(i.matches ? "dark" : "light");
977
- }, s = window.matchMedia != null ? window.matchMedia("(prefers-color-scheme: dark)") : void 0;
978
- return s == null || s.addEventListener("change", n), g(
979
- $t(ue, r, t),
980
- M(() => s == null ? void 0 : s.removeEventListener("change", n))
981
- );
982
- },
983
- /**
984
- * Makes the AppearanceType available to the child component by consuming the signal provided by the parent.
985
- * The result of the function is returned as the final output.
986
- *
987
- * @param fn - A function that accepts the `AppearanceType` signal and returns a `TNode` element.
988
- * @returns The `TNode` element returned by the provided function.
989
- */
990
- consume: (t) => Tt(ue, t)
991
- }, We = (t, e) => {
937
+ })), M = {
938
+ useDone: (t) => (At(), f(t(_t))),
939
+ isSSR: vt
940
+ }, Le = (t, e) => {
992
941
  if (typeof e == "function")
993
- return We(t, { then: e });
994
- const r = e.pending != null ? f(e.pending) : w, n = e.then, s = e.error != null ? (i) => f(e.error(i)) : () => w;
942
+ return Le(t, { then: e });
943
+ const r = e.pending != null ? f(e.pending) : v, n = e.then, s = e.error != null ? (i) => f(e.error(i)) : () => v;
995
944
  return (i) => {
996
945
  let o = !0;
997
- const a = t();
946
+ const l = t();
998
947
  i = i.makeRef();
999
948
  let u = f(r)(i);
1000
- return a.then(
949
+ return l.then(
1001
950
  (c) => {
1002
951
  o && (u(!0), u = f(n(c))(i));
1003
952
  },
@@ -1005,16 +954,16 @@ const xe = (t, e) => (r) => f(e)(r.withProviders(t)), gr = (...t) => t.length >
1005
954
  o && (u(!0), u = f(s(c))(i));
1006
955
  }
1007
956
  ), (c) => {
1008
- o = !1, u(c), c && i.reference && S(i.reference);
957
+ o = !1, u(c), c && i.reference && g(i.reference);
1009
958
  };
1010
959
  };
1011
- }, br = (t, e) => We(() => t, e), vr = (t = 10) => (e) => {
960
+ }, tr = (t, e) => Le(() => t, e), rr = (t = 10) => (e) => {
1012
961
  const r = setTimeout(() => {
1013
962
  var n;
1014
963
  (n = e.element) == null || n.focus();
1015
964
  }, t);
1016
965
  return (n) => clearTimeout(r);
1017
- }, Ar = (t = 10) => (e) => {
966
+ }, nr = (t = 10) => (e) => {
1018
967
  const r = setTimeout(() => {
1019
968
  var n;
1020
969
  (n = e.element) == null || n.select();
@@ -1022,21 +971,21 @@ const xe = (t, e) => (r) => f(e)(r.withProviders(t)), gr = (...t) => t.length >
1022
971
  return (n) => {
1023
972
  clearTimeout(r);
1024
973
  };
1025
- }, Fe = (t, e) => (r) => (r.element.addEventListener(t, e), (n) => {
974
+ }, Me = (t, e) => (r) => (r.element.addEventListener(t, e), (n) => {
1026
975
  n && r.element.removeEventListener(t, e);
1027
- }), Ct = (t) => Fe("click", (e) => {
976
+ }), yt = (t) => Me("click", (e) => {
1028
977
  e.preventDefault();
1029
978
  const r = e.target;
1030
979
  setTimeout(() => {
1031
980
  const n = r.ownerDocument != null ? r == null ? void 0 : r.checked : void 0;
1032
981
  n != null && t(!n);
1033
982
  }, 0);
1034
- }), Z = new Proxy(
983
+ }), V = new Proxy(
1035
984
  {},
1036
985
  {
1037
- get: (t, e) => (r) => Fe(e, r)
986
+ get: (t, e) => (r) => Me(e, r)
1038
987
  }
1039
- ), X = {
988
+ ), W = {
1040
989
  value: (t) => (e) => {
1041
990
  const r = e.target;
1042
991
  t(r.value);
@@ -1081,42 +1030,42 @@ const xe = (t, e) => (r) => f(e)(r.withProviders(t)), gr = (...t) => t.length >
1081
1030
  e.stopImmediatePropagation(), t();
1082
1031
  }
1083
1032
  };
1084
- function Nt(t, e = "input") {
1085
- return g(
1033
+ function Et(t, e = "input") {
1034
+ return w(
1086
1035
  P.valueAsDate(t),
1087
- Z[e](X.valueAsDate(t.set))
1036
+ V[e](W.valueAsDate(t.set))
1088
1037
  );
1089
1038
  }
1090
- function Mt(t, e = "input") {
1091
- return g(
1039
+ function Pt(t, e = "input") {
1040
+ return w(
1092
1041
  P.valueAsDate(t),
1093
- Z[e](X.valueAsDateTime(t.set))
1042
+ V[e](W.valueAsDateTime(t.set))
1094
1043
  );
1095
1044
  }
1096
- function Lt(t, e = "input") {
1097
- return g(
1045
+ function Dt(t, e = "input") {
1046
+ return w(
1098
1047
  P.valueAsNumber(t),
1099
- Z[e](X.valueAsNumber(t.set))
1048
+ V[e](W.valueAsNumber(t.set))
1100
1049
  );
1101
1050
  }
1102
- function Rt(t, e = "input") {
1103
- return g(P.value(t), Z[e](X.value(t.set)));
1051
+ function Tt(t, e = "input") {
1052
+ return w(P.value(t), V[e](W.value(t.set)));
1104
1053
  }
1105
- function It(t) {
1106
- return g(P.checked(t), Ct(t.set));
1054
+ function $t(t) {
1055
+ return w(P.checked(t), yt(t.set));
1107
1056
  }
1108
- const yr = {
1109
- date: Nt,
1110
- dateTime: Mt,
1111
- number: Lt,
1112
- text: Rt,
1113
- checked: It
1114
- }, x = (t, e) => (r) => {
1057
+ const sr = {
1058
+ date: Et,
1059
+ dateTime: Pt,
1060
+ number: Dt,
1061
+ text: Tt,
1062
+ checked: $t
1063
+ }, I = (t, e) => (r) => {
1115
1064
  r = r.makeRef();
1116
1065
  let n, s;
1117
1066
  const i = t.map((u) => Object.keys(u)[0]);
1118
1067
  let o;
1119
- const a = i.on((u) => {
1068
+ const l = i.on((u) => {
1120
1069
  if (u !== o) {
1121
1070
  s == null || s.dispose(), n == null || n(!0), s = t.map((p) => p[u]);
1122
1071
  const c = e[u](s);
@@ -1124,31 +1073,31 @@ const yr = {
1124
1073
  }
1125
1074
  });
1126
1075
  return (u) => {
1127
- a(), u && r.reference != null && S(r.reference), n == null || n(!0);
1076
+ l(), u && r.reference != null && g(r.reference), n == null || n(!0);
1128
1077
  };
1129
- }, L = {
1130
- bool: (t, e) => x(
1078
+ }, C = {
1079
+ bool: (t, e) => I(
1131
1080
  t.map((r) => r ? { true: !0 } : { false: !0 }),
1132
1081
  e
1133
1082
  ),
1134
- field: (t, e, r) => x(
1083
+ field: (t, e, r) => I(
1135
1084
  t.map((n) => ({ [n[e]]: n })),
1136
1085
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1137
1086
  r
1138
1087
  ),
1139
- kind: (t, e) => L.field(t, "kind", e),
1088
+ kind: (t, e) => C.field(t, "kind", e),
1140
1089
  tuple: (t, e) => {
1141
1090
  const r = t.map(([n, s]) => ({ [n]: s }));
1142
- return x(r, e);
1091
+ return I(r, e);
1143
1092
  },
1144
- type: (t, e) => L.field(t, "type", e),
1145
- value: (t, e) => x(
1093
+ type: (t, e) => C.field(t, "type", e),
1094
+ value: (t, e) => I(
1146
1095
  t.map((r) => ({ [r]: !0 })),
1147
1096
  e
1148
1097
  )
1149
- }, _r = (t, e) => (r) => {
1150
- const n = (e == null ? void 0 : e.firstSeparator) ?? w, s = (e == null ? void 0 : e.lastSeparator) ?? w;
1151
- return L.value(
1098
+ }, ir = (t, e) => (r) => {
1099
+ const n = (e == null ? void 0 : e.firstSeparator) ?? v, s = (e == null ? void 0 : e.lastSeparator) ?? v;
1100
+ return C.value(
1152
1101
  r.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
1153
1102
  {
1154
1103
  first: () => n,
@@ -1156,24 +1105,42 @@ const yr = {
1156
1105
  other: () => t
1157
1106
  }
1158
1107
  );
1159
- }, Er = (t) => (e) => t(e)(e), Pr = (t) => (e) => (e.appendOrInsert(t), (r) => {
1160
- r && S(t);
1161
- }), Ot = (t, e, r) => (n) => {
1108
+ }, Re = (t, e) => (r) => {
1109
+ const n = Object.values(t).reduce((s, i) => {
1110
+ const o = r.getProvider(i);
1111
+ if (o == null)
1112
+ throw new Error(`No provider found for mark: ${i.description}`);
1113
+ return s[i] = o, s;
1114
+ }, {});
1115
+ return f(e(n))(r);
1116
+ }, or = (t, e) => (r) => {
1117
+ const n = [], s = Object.entries(t).reduce(
1118
+ (i, [o, l]) => (n.push(
1119
+ l((u) => (Reflect.set(i, o, u), null))(r)
1120
+ ), i),
1121
+ {}
1122
+ );
1123
+ return n.push(e(s)(r)), (i) => {
1124
+ n.forEach((o) => o(i));
1125
+ };
1126
+ }, ur = (t, e) => Re([t], (r) => f(e(r[t]))), ar = (t, e) => Re(t, (r) => f(e(r))), lr = (t) => (e) => t(e), cr = (t) => (e) => (e.appendOrInsert(t), (r) => {
1127
+ r && g(t);
1128
+ }), Ct = (t, e, r) => (n) => {
1162
1129
  n = n.makeRef();
1163
1130
  let s = null, i = !1;
1164
- const o = A(null), a = t.on((u) => {
1165
- u == null ? (s == null || s(!0), s = f((r == null ? void 0 : r()) ?? w)(n), i = !1) : (o.value = u, i || (s == null || s(!0), s = f(e(o))(n), i = !0));
1131
+ const o = $(null), l = t.on((u) => {
1132
+ u == null ? (s == null || s(!0), s = f((r == null ? void 0 : r()) ?? v)(n), i = !1) : (o.value = u, i || (s == null || s(!0), s = f(e(o))(n), i = !0));
1166
1133
  });
1167
1134
  return (u) => {
1168
- a(), s == null || s(u), u && n.reference && S(n.reference);
1135
+ l(), s == null || s(u), u && n.reference && g(n.reference);
1169
1136
  };
1170
- }, Ve = (t, e, r) => r != null ? Ve(t, (n) => {
1137
+ }, K = (t) => (e) => (r) => t(r, e), Ie = (t, e, r) => r != null ? Ie(t, (n) => {
1171
1138
  const s = n.map((i) => i.isLast ? "last" : "other");
1172
- return g(
1173
- M(() => s.dispose()),
1139
+ return w(
1140
+ K(() => s.dispose()),
1174
1141
  f(e(n)),
1175
- L.value(s, {
1176
- last: () => w,
1142
+ C.value(s, {
1143
+ last: () => v,
1177
1144
  other: () => r(n)
1178
1145
  })
1179
1146
  );
@@ -1181,288 +1148,216 @@ const yr = {
1181
1148
  n = n.makeRef();
1182
1149
  const s = t.map(
1183
1150
  (u) => Array.from({ length: u }, (c, p) => p).map(
1184
- (c) => new ke(c, u)
1151
+ (c) => new Ue(c, u)
1185
1152
  )
1186
- ), i = [], o = [], a = s.on((u) => {
1153
+ ), i = [], o = [], l = s.on((u) => {
1187
1154
  var p, m;
1188
1155
  const c = u.length;
1189
1156
  for (; c < i.length; )
1190
1157
  (p = i.pop()) == null || p(!0), (m = o.pop()) == null || m.dispose();
1191
1158
  for (let d = 0; d < c; d++)
1192
1159
  if (o[d] == null) {
1193
- o[d] = A(u[d]);
1194
- const E = f(e(o[d]));
1195
- i[d] = E(n);
1160
+ o[d] = $(u[d]);
1161
+ const y = f(e(o[d]));
1162
+ i[d] = y(n);
1196
1163
  } else
1197
1164
  o[d].value = u[d];
1198
1165
  });
1199
1166
  return (u) => {
1200
- a(), u && n.reference && S(n.reference);
1167
+ l(), u && n.reference && g(n.reference);
1201
1168
  };
1202
- }, xt = (t, e, r) => r != null ? xt(t, (n, s) => {
1169
+ }, Nt = (t, e, r) => r != null ? Nt(t, (n, s) => {
1203
1170
  const i = s.map((o) => o.isLast ? "last" : "other");
1204
- return g([
1205
- M(() => i.dispose()),
1171
+ return w([
1172
+ K(() => i.dispose()),
1206
1173
  f(e(n, s)),
1207
- L.value(i, {
1208
- last: () => w,
1174
+ C.value(i, {
1175
+ last: () => v,
1209
1176
  other: () => r(s)
1210
1177
  })
1211
1178
  ]);
1212
1179
  }) : (n) => {
1213
1180
  const s = t.map((i) => i.length);
1214
- return Ve(s, (i) => {
1181
+ return Ie(s, (i) => {
1215
1182
  const o = U(
1216
1183
  () => t.value[i.value.index],
1217
1184
  [i, t]
1218
1185
  );
1219
- return g(
1220
- M(() => o.dispose()),
1186
+ return w(
1187
+ K(() => o.dispose()),
1221
1188
  f(e(o, i))
1222
1189
  );
1223
1190
  })(n);
1224
- }, Tr = (t) => {
1225
- const e = t.element, r = e.style.getPropertyValue(":empty");
1226
- return e.style.setProperty(":empty", "display:none"), (n) => {
1227
- n && e.style.setProperty(":empty", r);
1191
+ }, fr = (t, e) => (r) => {
1192
+ r = r.makeRef();
1193
+ const n = t.map((o) => f(e(o)));
1194
+ let s = () => {
1228
1195
  };
1229
- };
1230
- function ze(t, e) {
1196
+ const i = n.on((o) => {
1197
+ s(!0), s = o(r);
1198
+ });
1199
+ return (o) => {
1200
+ i(), s(o);
1201
+ };
1202
+ }, Oe = (t, e, r) => Ct(
1203
+ t.map((n) => n ? !0 : null),
1204
+ () => e,
1205
+ r != null ? () => r : void 0
1206
+ ), hr = (t, e, r) => Oe(
1207
+ t.map((n) => !n),
1208
+ e,
1209
+ r
1210
+ );
1211
+ function dr(t, e, r = v) {
1212
+ return Oe(
1213
+ t.map((n) => n.length > 0),
1214
+ e,
1215
+ r
1216
+ );
1217
+ }
1218
+ const pr = (t) => (e) => t(e.element) ?? (() => {
1219
+ });
1220
+ function xe(t, e) {
1231
1221
  const r = t(e);
1232
1222
  return () => r(!0);
1233
1223
  }
1234
- function Dr(t, e, { doc: r, clear: n } = {}) {
1224
+ function mr(t, e, { doc: r, clear: n } = {}) {
1235
1225
  const s = typeof e == "string" ? (r ?? document).querySelector(e) : e;
1236
1226
  if (s === null)
1237
1227
  throw new Error(`Cannot find element by selector for render: ${e}`);
1238
- n && (r ?? s.ownerDocument) != null && yt(r ?? s.ownerDocument);
1239
- const i = lt(s), o = _e(s) ? void 0 : s, a = v.of(i, o);
1240
- return ze(t, a);
1228
+ n && (r ?? s.ownerDocument) != null && wt(r ?? s.ownerDocument);
1229
+ const i = ot(s), o = we(s) ? void 0 : s, l = b.of(i, o);
1230
+ return xe(t, l);
1241
1231
  }
1242
- const Wt = (t, e) => (r) => {
1232
+ const gr = (t, e) => (r) => {
1243
1233
  const n = r.document.querySelector(t);
1244
1234
  if (n === null)
1245
1235
  throw new Error(`Cannot find element by selector for portal: ${t}`);
1246
- return ze(
1236
+ return xe(
1247
1237
  f(e),
1248
1238
  r.withElement(n).withFirstLevel()
1249
1239
  );
1250
- }, $r = (t) => Wt("head title", P.innerText(t)), Ft = (t) => (e) => t(e.element) ?? (() => {
1251
- }), G = (t, e, r) => Ot(
1252
- t.map((n) => n ? !0 : null),
1253
- () => e,
1254
- r != null ? () => r : void 0
1255
- ), Cr = (t, e, r) => G(
1256
- t.map((n) => !n),
1257
- e,
1258
- r
1259
- ), Vt = {
1260
- partial: {
1261
- root: null,
1262
- rootMargin: "0px",
1263
- threshold: 0
1264
- },
1265
- full: {
1266
- root: null,
1267
- rootMargin: "0px",
1268
- threshold: 1
1269
- }
1270
- }, z = {
1271
- partial: /* @__PURE__ */ new Map(),
1272
- full: /* @__PURE__ */ new Map()
1273
- }, N = {
1274
- partial: null,
1275
- full: null
1276
- };
1277
- function zt(t) {
1278
- return N[t] == null && (N[t] = new IntersectionObserver((e) => {
1279
- e.forEach((r) => {
1280
- const n = z[t].get(r.target);
1281
- n == null || n.set(r.isIntersecting);
1282
- });
1283
- }, Vt[t])), N[t];
1284
- }
1285
- function qt(t, e) {
1286
- const r = A(D.isSSR());
1287
- return g(
1288
- Ft((n) => {
1289
- const s = typeof IntersectionObserver < "u" ? zt(t) : null;
1290
- return z[t].set(n, r), s == null || s.observe(n), () => {
1291
- var i;
1292
- s == null || s.unobserve(n), z[t].delete(n), z[t].size === 0 && ((i = N[t]) == null || i.disconnect(), N[t] = null);
1293
- };
1294
- }),
1295
- M(r.dispose),
1296
- f(e(r))
1297
- );
1298
- }
1299
- const Nr = (t, e, r) => qt(t, (n) => G(n, e, r ?? w)), Mr = (t, e) => (r) => {
1300
- r = r.makeRef();
1301
- const n = t.map((o) => f(e(o)));
1302
- let s = () => {
1303
- };
1304
- const i = n.on((o) => {
1305
- s(!0), s = o(r);
1306
- });
1307
- return (o) => {
1308
- i(), s(o);
1309
- };
1310
1240
  };
1311
- function Lr(t, e, r = w) {
1312
- return G(
1313
- t.map((n) => n.length > 0),
1314
- e,
1315
- r
1316
- );
1241
+ function Sr(t) {
1242
+ return Symbol(t);
1317
1243
  }
1318
- const Zt = (t) => (e) => {
1319
- const r = e.element, n = A({ width: r.clientWidth, height: r.clientHeight }), s = f(t(n))(e), i = () => {
1320
- n.set({ width: r.clientWidth, height: r.clientHeight });
1321
- };
1322
- let o;
1323
- return typeof ResizeObserver == "function" && (o = new ResizeObserver(i), o.observe(r)), (a) => {
1324
- o == null || o.disconnect(), s(a);
1325
- };
1326
- }, Xt = (t) => (e) => {
1327
- const r = A({
1328
- width: (window == null ? void 0 : window.innerWidth) ?? 0,
1329
- height: (window == null ? void 0 : window.innerHeight) ?? 0
1330
- }), n = f(t(r))(e), s = () => {
1331
- r.set({
1332
- width: (window == null ? void 0 : window.innerWidth) ?? 0,
1333
- height: (window == null ? void 0 : window.innerHeight) ?? 0
1334
- });
1335
- };
1336
- return window == null || window.addEventListener("resize", s), (i) => {
1337
- window == null || window.removeEventListener("resize", s), n(i);
1338
- };
1339
- }, Rr = {
1340
- element: Zt,
1341
- window: Xt
1342
- }, Yt = (t, e) => (r) => {
1244
+ const Fe = (t, e) => (r) => f(e)(r.withProviders(t)), br = (...t) => t.length > 0 ? t.reduceRight((e, r) => (n) => e(r(n))) : f, wr = (t, e, r) => Fe({ [t]: e }, f(r)), vr = (t, e) => Fe(t, f(e)), Lt = (t, e) => (r) => {
1343
1245
  const n = r.element, s = n.style.getPropertyValue(t);
1344
1246
  return n.style.setProperty(t, e), (i) => {
1345
1247
  i && n.style.setProperty(t, s);
1346
1248
  };
1347
- }, jt = (t, e) => (r) => {
1249
+ }, Mt = (t, e) => (r) => {
1348
1250
  const n = r.element, s = n.style.getPropertyValue(t);
1349
1251
  return e.on((i) => n.style.setProperty(t, i)), (i) => {
1350
1252
  i && n.style.setProperty(t, s);
1351
1253
  };
1352
- }, Ir = new Proxy(
1254
+ }, Ar = new Proxy(
1353
1255
  {},
1354
1256
  {
1355
- get: (t, e) => (r) => h.is(r) ? jt(e, r) : Yt(e, r)
1257
+ get: (t, e) => (r) => h.is(r) ? Mt(e, r) : Lt(e, r)
1356
1258
  }
1357
1259
  );
1358
1260
  export {
1359
- br as Async,
1360
- vr as AutoFocus,
1361
- Ar as AutoSelect,
1362
- T as Computed,
1363
- _r as Conjunction,
1364
- Er as Ctx,
1365
- v as DOMContext,
1366
- Pr as DOMEl,
1367
- Te as El,
1368
- De as ElNS,
1369
- w as Empty,
1370
- Ot as Ensure,
1371
- xt as ForEach,
1372
- g as Fragment,
1373
- $r as HTMLTitle,
1374
- Tr as HiddenWhenEmpty,
1375
- qt as InViewport,
1376
- Mr as MapSignal,
1377
- de as MemoryStore,
1378
- Lr as NotEmpty,
1379
- Ct as OnChecked,
1380
- Ft as OnMount,
1381
- M as OnUnmount,
1382
- Wt as Portal,
1383
- ke as Position,
1261
+ tr as Async,
1262
+ rr as AutoFocus,
1263
+ nr as AutoSelect,
1264
+ E as Computed,
1265
+ ir as Conjunction,
1266
+ b as DOMContext,
1267
+ cr as DOMEl,
1268
+ _e as El,
1269
+ ye as ElNS,
1270
+ v as Empty,
1271
+ Ct as Ensure,
1272
+ Nt as ForEach,
1273
+ w as Fragment,
1274
+ fr as MapSignal,
1275
+ le as MemoryStore,
1276
+ dr as NotEmpty,
1277
+ yt as OnChecked,
1278
+ lr as OnCtx,
1279
+ pr as OnMount,
1280
+ K as OnUnmount,
1281
+ gr as Portal,
1282
+ Ue as Position,
1384
1283
  q as Prop,
1385
- gr as Provide,
1386
- Ve as Repeat,
1284
+ br as Provide,
1285
+ Ie as Repeat,
1387
1286
  h as Signal,
1388
- We as Task,
1389
- sr as Text,
1390
- Cr as Unless,
1391
- pr as Use,
1392
- Tt as UseProvider,
1393
- mr as UseProviders,
1394
- G as When,
1395
- Nr as WhenInViewport,
1396
- $t as WithProvider,
1397
- wr as WithProviders,
1398
- Me as addNodeTracker,
1287
+ Le as Task,
1288
+ Kt as Text,
1289
+ hr as Unless,
1290
+ or as Use,
1291
+ ur as UseProvider,
1292
+ ar as UseProviders,
1293
+ Oe as When,
1294
+ wr as WithProvider,
1295
+ vr as WithProviders,
1296
+ Te as addNodeTracker,
1399
1297
  Ge as animate,
1400
- Gt as animateOne,
1401
- Sr as appearance,
1402
- ue as appearanceMarker,
1403
- rr as applyAnimatable,
1404
- W as applyAnimatableProp,
1405
- tr as applyInterpolatedAnimatable,
1406
- nt as applyInterpolatedAnimatableProp,
1407
- or as aria,
1298
+ qt as animateOne,
1299
+ Yt as applyAnimatable,
1300
+ O as applyAnimatableProp,
1301
+ Xt as applyInterpolatedAnimatable,
1302
+ et as applyInterpolatedAnimatableProp,
1303
+ Bt as aria,
1408
1304
  P as attr,
1409
- yr as bind,
1410
- yt as clearSSR,
1411
- Qe as colorChannelsToString,
1305
+ sr as bind,
1306
+ wt as clearSSR,
1307
+ He as colorChannelsToString,
1412
1308
  U as computed,
1413
- Jt as computedRecord,
1414
- ir as dataAttr,
1415
- He as dateInterpolate,
1416
- Kt as effect,
1417
- X as emit,
1418
- Ke as endInterpolate,
1419
- er as getComputedAnimatable,
1420
- tt as getComputedAnimatableProp,
1421
- lt as getSelfOrParentElement,
1422
- Ue as guessInterpolate,
1423
- nr as handleAnchorClick,
1424
- lr as html,
1425
- cr as input,
1426
- et as interpolateColor,
1427
- Qt as interpolateShadow,
1428
- _e as isElement,
1429
- ye as makeGetter,
1430
- Dt as makeProviderMark,
1431
- Ae as makeSetter,
1432
- hr as math,
1433
- ar as mathAttr,
1434
- Ce as maybeAddAttributeTracker,
1435
- Ne as maybeAddClassTracker,
1436
- Le as maybeAddTextTracker,
1437
- Ye as numberInterpolate,
1438
- Z as on,
1439
- L as oneof,
1440
- ie as parseColorChannels,
1441
- A as prop,
1442
- kt as propOfLocalStorage,
1443
- Bt as propOfSessionStorage,
1444
- pe as propOfStorage,
1445
- gt as removeAttributeTrackers,
1446
- St as removeClassTrackers,
1447
- S as removeDOMNode,
1448
- bt as removeNodeTrackers,
1449
- At as removeTextTrackers,
1450
- Dr as render,
1451
- ze as renderWithContext,
1309
+ Vt as computedRecord,
1310
+ Ut as dataAttr,
1311
+ Ye as dateInterpolate,
1312
+ It as effect,
1313
+ W as emit,
1314
+ je as endInterpolate,
1315
+ Zt as getComputedAnimatable,
1316
+ ke as getComputedAnimatableProp,
1317
+ ot as getSelfOrParentElement,
1318
+ Ke as guessInterpolate,
1319
+ jt as handleAnchorClick,
1320
+ Ht as html,
1321
+ Jt as input,
1322
+ Je as interpolateColor,
1323
+ Wt as interpolateShadow,
1324
+ we as isElement,
1325
+ be as makeGetter,
1326
+ Sr as makeProviderMark,
1327
+ Se as makeSetter,
1328
+ Qt as math,
1329
+ zt as mathAttr,
1330
+ Pe as maybeAddAttributeTracker,
1331
+ De as maybeAddClassTracker,
1332
+ $e as maybeAddTextTracker,
1333
+ Ze as numberInterpolate,
1334
+ V as on,
1335
+ C as oneof,
1336
+ re as parseColorChannels,
1337
+ $ as prop,
1338
+ xt as propOfLocalStorage,
1339
+ Ft as propOfSessionStorage,
1340
+ ce as propOfStorage,
1341
+ dt as removeAttributeTrackers,
1342
+ mt as removeClassTrackers,
1343
+ g as removeDOMNode,
1344
+ gt as removeNodeTrackers,
1345
+ bt as removeTextTrackers,
1346
+ mr as render,
1347
+ xe as renderWithContext,
1452
1348
  f as renderableOfTNode,
1453
- at as setAttribute,
1454
- st as setBooleanProperty,
1455
- ot as setDateProperty,
1456
- it as setNumberProperty,
1457
- ut as setStringProperty,
1458
- Ut as signal,
1459
- Pe as signalText,
1460
- Rr as size,
1461
- D as ssr,
1462
- dr as startSSR,
1463
- Ee as staticText,
1464
- je as stringInterpolate,
1465
- Ir as style,
1466
- fr as svg,
1467
- ur as svgAttr
1349
+ it as setAttribute,
1350
+ tt as setBooleanProperty,
1351
+ nt as setDateProperty,
1352
+ rt as setNumberProperty,
1353
+ st as setStringProperty,
1354
+ Ot as signal,
1355
+ Ae as signalText,
1356
+ M as ssr,
1357
+ er as startSSR,
1358
+ ve as staticText,
1359
+ Xe as stringInterpolate,
1360
+ Ar as style,
1361
+ kt as svg,
1362
+ Gt as svgAttr
1468
1363
  };