@tempots/dom 28.2.1 → 28.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.cjs +1 -1
  2. package/index.js +268 -269
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -3,16 +3,16 @@ var re = (s) => {
3
3
  throw TypeError(s);
4
4
  };
5
5
  var He = (s, e, t) => e in s ? Me(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
6
- var i = (s, e, t) => He(s, typeof e != "symbol" ? e + "" : e, t), ne = (s, e, t) => e.has(s) || re("Cannot " + t);
6
+ var o = (s, e, t) => He(s, typeof e != "symbol" ? e + "" : e, t), ne = (s, e, t) => e.has(s) || re("Cannot " + t);
7
7
  var I = (s, e, t) => (ne(s, e, "read from private field"), t ? t.call(s) : e.get(s)), ie = (s, e, t) => e.has(s) ? re("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), z = (s, e, t, r) => (ne(s, e, "write to private field"), r ? r.call(s, t) : e.set(s, t), t);
8
8
  const ke = (s, e, t) => s + (e - s) * t;
9
9
  const Ne = (s, e, t) => {
10
10
  const r = Math.max(s.length, e.length);
11
11
  let n = "";
12
- for (let o = 0; o < r; o++) {
13
- let l = s.charCodeAt(o);
12
+ for (let i = 0; i < r; i++) {
13
+ let l = s.charCodeAt(i);
14
14
  isNaN(l) && (l = 97);
15
- let c = e.charCodeAt(o);
15
+ let c = e.charCodeAt(i);
16
16
  isNaN(c) && (c = 97), n += String.fromCharCode(l + (c - l) * t);
17
17
  }
18
18
  return n;
@@ -28,24 +28,24 @@ class Q {
28
28
  /**
29
29
  * The counter of the element starting from 1.
30
30
  */
31
- i(this, "counter");
31
+ o(this, "counter");
32
32
  /**
33
33
  * Checks if the element is the first element in the collection.
34
34
  * @returns `true` if the element is the first element, `false` otherwise.
35
35
  */
36
- i(this, "isFirst");
36
+ o(this, "isFirst");
37
37
  /**
38
38
  * Checks if the counter of the element is even.
39
39
  * @returns `true` if the counter is even, `false` otherwise.
40
40
  */
41
- i(this, "isEven");
41
+ o(this, "isEven");
42
42
  /**
43
43
  * Checks if the counter of the element is odd.
44
44
  * @returns `true` if the counter is odd, `false` otherwise.
45
45
  */
46
- i(this, "isOdd");
46
+ o(this, "isOdd");
47
47
  ie(this, w);
48
- i(this, "dispose", () => {
48
+ o(this, "dispose", () => {
49
49
  var e;
50
50
  (e = I(this, w)) == null || e.dispose(), z(this, w, void 0);
51
51
  });
@@ -72,33 +72,33 @@ const H = class H {
72
72
  /**
73
73
  * @internal
74
74
  */
75
- i(this, "$__signal__", !0);
75
+ o(this, "$__signal__", !0);
76
76
  /**
77
77
  * @internal
78
78
  */
79
- i(this, "_value");
79
+ o(this, "_value");
80
80
  /**
81
81
  * @internal
82
82
  */
83
- i(this, "_derivatives", []);
83
+ o(this, "_derivatives", []);
84
84
  /**
85
85
  * @internal
86
86
  */
87
- i(this, "_onValueListeners", []);
87
+ o(this, "_onValueListeners", []);
88
88
  /**
89
89
  * @internal
90
90
  */
91
- i(this, "_onDisposeListeners", []);
91
+ o(this, "_onDisposeListeners", []);
92
92
  /**
93
93
  * Gets the current value of the signal.
94
94
  * @returns The current value of the signal.
95
95
  */
96
- i(this, "get", () => this._value);
96
+ o(this, "get", () => this._value);
97
97
  /**
98
98
  * Checks if the signal has any registered listeners.
99
99
  * @returns `true` if the signal has listeners, `false` otherwise.
100
100
  */
101
- i(this, "hasListeners", () => this._onValueListeners.length > 0);
101
+ o(this, "hasListeners", () => this._onValueListeners.length > 0);
102
102
  /**
103
103
  * Registers a listener function to be called whenever the value of the signal changes.
104
104
  * The listener function will be immediately called with the current value of the signal.
@@ -107,10 +107,10 @@ const H = class H {
107
107
  * @param listener - The listener function to be called when the value of the signal changes.
108
108
  * @param options - Options for the listener.
109
109
  */
110
- i(this, "on", (e, t = {}) => {
110
+ o(this, "on", (e, t = {}) => {
111
111
  t.skipInitial || e(this.get(), void 0);
112
- const r = t.once ? (o, l) => {
113
- n(), e(o, l);
112
+ const r = t.once ? (i, l) => {
113
+ n(), e(i, l);
114
114
  } : e;
115
115
  this._onValueListeners.push(r);
116
116
  const n = () => {
@@ -124,7 +124,7 @@ const H = class H {
124
124
  /**
125
125
  * @internal
126
126
  */
127
- i(this, "_setAndNotify", (e) => {
127
+ o(this, "_setAndNotify", (e) => {
128
128
  if (this._disposed) return;
129
129
  const t = this._value;
130
130
  this.equals(t, e) || (this._value = e, this._onValueListeners.forEach((n) => n(e, t)));
@@ -132,24 +132,24 @@ const H = class H {
132
132
  /**
133
133
  * @internal
134
134
  */
135
- i(this, "_disposed", !1);
135
+ o(this, "_disposed", !1);
136
136
  /**
137
137
  * Checks whether the signal is disposed.
138
138
  * @returns True if the signal is disposed, false otherwise.
139
139
  */
140
- i(this, "isDisposed", () => this._disposed);
140
+ o(this, "isDisposed", () => this._disposed);
141
141
  /**
142
142
  * Adds a listener function to be called when the object is disposed.
143
143
  * @param listener - The listener function to be called when the object is disposed.
144
144
  * @returns A function that can be called to remove the listener.
145
145
  */
146
- i(this, "onDispose", (e) => {
146
+ o(this, "onDispose", (e) => {
147
147
  this._onDisposeListeners.push(e);
148
148
  });
149
149
  /**
150
150
  * Disposes the signal, releasing any resources associated with it.
151
151
  */
152
- i(this, "dispose", () => {
152
+ o(this, "dispose", () => {
153
153
  this._disposed || (this._disposed = !0, this._onDisposeListeners.forEach((e) => e()), this._onDisposeListeners.length = 0, this._derivatives.length = 0);
154
154
  });
155
155
  /**
@@ -202,7 +202,7 @@ const H = class H {
202
202
  * @param equals - Optional function to determine if two transformed values are equal (defaults to strict equality)
203
203
  * @returns A new computed signal with the transformed value
204
204
  */
205
- i(this, "map", (e, t = (r, n) => r === n) => {
205
+ o(this, "map", (e, t = (r, n) => r === n) => {
206
206
  const r = new P(() => {
207
207
  try {
208
208
  return e(this.get());
@@ -222,7 +222,7 @@ const H = class H {
222
222
  * Defaults to a strict equality check (===).
223
223
  * @returns A new Signal that emits the values of the resulting Signal.
224
224
  */
225
- i(this, "flatMap", (e, t = (r, n) => r === n) => {
225
+ o(this, "flatMap", (e, t = (r, n) => r === n) => {
226
226
  const r = new P(() => {
227
227
  try {
228
228
  return e(this.get()).get();
@@ -238,26 +238,26 @@ const H = class H {
238
238
  * @param fn - The callback function to be invoked with the current value of the signal.
239
239
  * @returns A new signal that emits the same value as the original signal and invokes the callback function.
240
240
  */
241
- i(this, "tap", (e) => this.map((t) => (e(t), t)));
241
+ o(this, "tap", (e) => this.map((t) => (e(t), t)));
242
242
  /**
243
243
  * Returns a new Signal that emits the value at the specified key of the current value.
244
244
  *
245
245
  * @param key - The key of the value to retrieve.
246
246
  * @returns A new Signal that emits the value at the specified key.
247
247
  */
248
- i(this, "at", (e) => this.map((t) => t[e]));
248
+ o(this, "at", (e) => this.map((t) => t[e]));
249
249
  /**
250
250
  * @internal
251
251
  */
252
- i(this, "_$");
253
- i(this, "filter", (e, t) => {
252
+ o(this, "_$");
253
+ o(this, "filter", (e, t) => {
254
254
  let r = t ?? this.get();
255
255
  const n = new P(() => {
256
256
  try {
257
- const o = this.get();
258
- return r = e(o) ? o : r;
259
- } catch (o) {
260
- throw console.error("Error in Signal.filter:", o), o;
257
+ const i = this.get();
258
+ return r = e(i) ? i : r;
259
+ } catch (i) {
260
+ throw console.error("Error in Signal.filter:", i), i;
261
261
  }
262
262
  }, this.equals);
263
263
  return this.setDerivative(n), n;
@@ -272,9 +272,9 @@ const H = class H {
272
272
  * @param equals - Optional equality function to determine if two values are equal.
273
273
  * @returns - A new Computed object with the mapped and filtered values.
274
274
  */
275
- i(this, "filterMap", (e, t, r = (n, o) => n === o) => {
275
+ o(this, "filterMap", (e, t, r = (n, i) => n === i) => {
276
276
  let n = t;
277
- const o = new P(() => {
277
+ const i = new P(() => {
278
278
  try {
279
279
  const l = this.get(), c = e(l);
280
280
  return n = c ?? n;
@@ -282,7 +282,7 @@ const H = class H {
282
282
  throw console.error("Error in Signal.filterMap:", l), l;
283
283
  }
284
284
  }, r);
285
- return this.setDerivative(o), o;
285
+ return this.setDerivative(i), i;
286
286
  });
287
287
  /**
288
288
  * Maps the values emitted by the signal to a new value asynchronously using the provided function.
@@ -297,25 +297,25 @@ const H = class H {
297
297
  * @param equals - The equality function to compare the mapped values for equality.
298
298
  * @returns A property that holds the mapped value and can be observed for changes.
299
299
  */
300
- i(this, "mapAsync", (e, t, r, n = (o, l) => o === l) => {
301
- const o = _(t, n);
300
+ o(this, "mapAsync", (e, t, r, n = (i, l) => i === l) => {
301
+ const i = _(t, n);
302
302
  let l = 0, c = new AbortController();
303
- return o.onDispose(
303
+ return i.onDispose(
304
304
  this.on(async (a) => {
305
305
  const u = ++l;
306
306
  c.abort(), c = new AbortController();
307
307
  try {
308
308
  const h = await e(a, { abortSignal: c.signal });
309
- u === l && o.set(h);
309
+ u === l && i.set(h);
310
310
  } catch (h) {
311
311
  if (u === l)
312
312
  if (r != null)
313
- o.set(r(h));
313
+ i.set(r(h));
314
314
  else
315
315
  throw h;
316
316
  }
317
317
  })
318
- ), o;
318
+ ), i;
319
319
  });
320
320
  /**
321
321
  * Maps the values of the signal using the provided function `fn`, and returns a new signal
@@ -327,14 +327,14 @@ const H = class H {
327
327
  * @param alt - The alternative value to use when the mapped value is `undefined` or `null`.
328
328
  * @returns A new signal containing the mapped values.
329
329
  */
330
- i(this, "mapMaybe", (e, t) => this.map((r) => e(r) ?? t));
330
+ o(this, "mapMaybe", (e, t) => this.map((r) => e(r) ?? t));
331
331
  /**
332
332
  * Feeds a property into the signal and sets up disposal behavior.
333
333
  * @param prop - The property to feed into the signal.
334
334
  * @param autoDisposeProp - Determines whether the property should be automatically disposed when the signal is disposed.
335
335
  * @returns The input property.
336
336
  */
337
- i(this, "feedProp", (e, t = !1) => {
337
+ o(this, "feedProp", (e, t = !1) => {
338
338
  const r = this.on(e.set);
339
339
  return e.onDispose(r), t ? this.onDispose(e.dispose) : this.onDispose(r), e;
340
340
  });
@@ -345,7 +345,7 @@ const H = class H {
345
345
  * @param options.equals - A function that determines if two values are equal.
346
346
  * @returns The derived property.
347
347
  */
348
- i(this, "deriveProp", ({
348
+ o(this, "deriveProp", ({
349
349
  autoDisposeProp: e = !0,
350
350
  equals: t
351
351
  } = {}) => this.feedProp(_(this.get(), t), e));
@@ -353,12 +353,12 @@ const H = class H {
353
353
  * Derives a new signal from the current signal. Useful to create a new signal that emits the same values as the current signal but can be disposed independently.
354
354
  * @returns A new signal that emits the same values as the current signal.
355
355
  */
356
- i(this, "derive", () => this.map((e) => e));
356
+ o(this, "derive", () => this.map((e) => e));
357
357
  /**
358
358
  * Returns a signal that emits the count of values received so far.
359
359
  * @returns A signal that emits the count of values received so far.
360
360
  */
361
- i(this, "count", () => {
361
+ o(this, "count", () => {
362
362
  let e = 0;
363
363
  return this.map(() => ++e);
364
364
  });
@@ -368,7 +368,7 @@ const H = class H {
368
368
  * Additionally, when the computed value is disposed, it sets the signal as dirty.
369
369
  * @param computed - The computed value to add as a derivative.
370
370
  */
371
- i(this, "setDerivative", (e) => {
371
+ o(this, "setDerivative", (e) => {
372
372
  this._derivatives.push(e), e.onDispose(() => {
373
373
  this._derivatives.splice(
374
374
  this._derivatives.indexOf(e),
@@ -436,21 +436,21 @@ const H = class H {
436
436
  * @param equals - Function to compare two values for equality (defaults to strict equality)
437
437
  * @returns A Signal that represents the result of the Promise
438
438
  */
439
- i(H, "ofPromise", (e, t, r, n = (o, l) => o === l) => {
440
- const o = new H(t, n);
441
- return e.then((l) => o._setAndNotify(l)).catch((l) => {
442
- r != null ? o._setAndNotify(r(l)) : console.error(
439
+ o(H, "ofPromise", (e, t, r, n = (i, l) => i === l) => {
440
+ const i = new H(t, n);
441
+ return e.then((l) => i._setAndNotify(l)).catch((l) => {
442
+ r != null ? i._setAndNotify(r(l)) : console.error(
443
443
  "Unhandled promise rejection in Signal.ofPromise:",
444
444
  l
445
445
  );
446
- }), o;
446
+ }), i;
447
447
  }), /**
448
448
  * Checks if a value is a Signal.
449
449
  *
450
450
  * @param value - The value to check.
451
451
  * @returns `true` if the value is a Signal, `false` otherwise.
452
452
  */
453
- i(H, "is", (e) => (
453
+ o(H, "is", (e) => (
454
454
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
455
455
  e != null && e.$__signal__ === !0
456
456
  ));
@@ -467,36 +467,36 @@ class P extends d {
467
467
  /**
468
468
  * @internal
469
469
  */
470
- i(this, "$__computed__", !0);
470
+ o(this, "$__computed__", !0);
471
471
  /**
472
472
  * @internal
473
473
  */
474
- i(this, "_isDirty", !1);
474
+ o(this, "_isDirty", !1);
475
475
  /**
476
476
  * Marks the signal as dirty, indicating that its value has changed and needs to be recalculated.
477
477
  * If the signal is already dirty or disposed, this method does nothing.
478
478
  * It also marks all dependent signals as dirty and schedules a notification to update their values.
479
479
  */
480
- i(this, "setDirty", () => {
480
+ o(this, "setDirty", () => {
481
481
  this._isDirty || this._disposed || (this._isDirty = !0, this._derivatives.forEach((t) => t.setDirty()), this._scheduleNotify());
482
482
  });
483
483
  /**
484
484
  * @internal
485
485
  */
486
- i(this, "_scheduleCount", 0);
486
+ o(this, "_scheduleCount", 0);
487
487
  /**
488
488
  * Schedules a notification to be executed asynchronously.
489
489
  * If the signal is dirty, it will be updated and notified.
490
490
  * @internal
491
491
  */
492
- i(this, "_scheduleNotify", () => {
492
+ o(this, "_scheduleNotify", () => {
493
493
  const t = ++this._scheduleCount;
494
494
  je(() => {
495
495
  this._scheduleCount !== t || this._disposed || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn()));
496
496
  });
497
497
  });
498
498
  /** {@inheritDoc Signal.get} */
499
- i(this, "get", () => (this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn())), this._value));
499
+ o(this, "get", () => (this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn())), this._value));
500
500
  this._fn = t, this.setDirty();
501
501
  }
502
502
  /**
@@ -519,20 +519,20 @@ const J = class J extends d {
519
519
  /**
520
520
  * @internal
521
521
  */
522
- i(this, "$__prop__", !0);
522
+ o(this, "$__prop__", !0);
523
523
  /**
524
524
  * Changes the value of the property and notifies its listeners.
525
525
  *
526
526
  * @param value - The new value of the property.
527
527
  */
528
- i(this, "set", (t) => {
528
+ o(this, "set", (t) => {
529
529
  this._setAndNotify(t);
530
530
  });
531
531
  /**
532
532
  * Updates the value of the signal by applying the provided function to the current value.
533
533
  * @param fn - The function to apply to the current value.
534
534
  */
535
- i(this, "update", (t) => {
535
+ o(this, "update", (t) => {
536
536
  this._setAndNotify(t(this.get()));
537
537
  });
538
538
  /**
@@ -541,16 +541,16 @@ const J = class J extends d {
541
541
  * @param effects - An array of effects to be executed after the state is updated.
542
542
  * @returns A dispatch function that can be used to update the state and trigger the effects.
543
543
  */
544
- i(this, "reducer", (t, ...r) => {
544
+ o(this, "reducer", (t, ...r) => {
545
545
  const n = this;
546
- return function o(l) {
546
+ return function i(l) {
547
547
  const c = n.value;
548
548
  n.update((a) => t(a, l)), !n.equals(c, n.value) && r.forEach(
549
549
  (a) => a({
550
550
  previousState: c,
551
551
  state: n.value,
552
552
  action: l,
553
- dispatch: o
553
+ dispatch: i
554
554
  })
555
555
  );
556
556
  };
@@ -566,9 +566,9 @@ const J = class J extends d {
566
566
  * Defaults to a strict equality check (===).
567
567
  * @returns A Prop object representing the isomorphism.
568
568
  */
569
- i(this, "iso", (t, r, n = (o, l) => o === l) => {
570
- const o = new J(t(this.get()), n);
571
- return o.onDispose(this.on((l) => o.set(t(l)))), o.on((l) => this._setAndNotify(r(l))), o;
569
+ o(this, "iso", (t, r, n = (i, l) => i === l) => {
570
+ const i = new J(t(this.get()), n);
571
+ return i.onDispose(this.on((l) => i.set(t(l)))), i.on((l) => this._setAndNotify(r(l))), i;
572
572
  });
573
573
  /**
574
574
  * Returns a `Prop` that represents the value at the specified key of the current value.
@@ -576,7 +576,7 @@ const J = class J extends d {
576
576
  * @param key - The key of the value to access.
577
577
  * @returns A `Prop` that represents the value at the specified key.
578
578
  */
579
- i(this, "atProp", (t) => this.iso(
579
+ o(this, "atProp", (t) => this.iso(
580
580
  (r) => r[t],
581
581
  (r) => ({ ...this.value, [t]: r })
582
582
  ));
@@ -596,7 +596,7 @@ const J = class J extends d {
596
596
  * @param value - The value to check.
597
597
  * @returns `true` if the value is a Prop, `false` otherwise.
598
598
  */
599
- i(J, "is", (t) => (
599
+ o(J, "is", (t) => (
600
600
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
601
601
  t != null && t.$__prop__ === !0
602
602
  ));
@@ -606,7 +606,7 @@ const Z = (s, e, t = (r, n) => r === n) => {
606
606
  return e.forEach((n) => n.setDerivative(r)), r;
607
607
  }, Ve = (s, e, t = {}) => {
608
608
  let r = t.once ? () => {
609
- o(), s();
609
+ i(), s();
610
610
  } : s;
611
611
  if (t.skipInitial) {
612
612
  let l = !1;
@@ -615,10 +615,10 @@ const Z = (s, e, t = (r, n) => r === n) => {
615
615
  l ? c() : l = !0;
616
616
  };
617
617
  }
618
- const n = Z(r, e), o = () => {
619
- n.dispose(), t.abortSignal != null && t.abortSignal.removeEventListener("abort", o);
618
+ const n = Z(r, e), i = () => {
619
+ n.dispose(), t.abortSignal != null && t.abortSignal.removeEventListener("abort", i);
620
620
  };
621
- return t.abortSignal != null && t.abortSignal.addEventListener("abort", o), o;
621
+ return t.abortSignal != null && t.abortSignal.addEventListener("abort", i), i;
622
622
  }, _ = (s, e = (t, r) => t === r) => new j(s, e), G = (s, e = (t, r) => t === r) => new d(s, e), le = () => (
623
623
  /* c8 ignore next */
624
624
  typeof window < "u" ? window : void 0
@@ -715,19 +715,19 @@ const Z = (s, e, t = (r, n) => r === n) => {
715
715
  };
716
716
  class ce {
717
717
  constructor() {
718
- i(this, "_store", /* @__PURE__ */ new Map());
718
+ o(this, "_store", /* @__PURE__ */ new Map());
719
719
  /**
720
720
  * Retrieves the value associated with the specified key from the memory store.
721
721
  * @param key - The key to retrieve the value for.
722
722
  * @returns The value associated with the key, or `null` if the key is not found.
723
723
  */
724
- i(this, "getItem", (e) => this._store.get(e) ?? null);
724
+ o(this, "getItem", (e) => this._store.get(e) ?? null);
725
725
  /**
726
726
  * Sets the value associated with the specified key in the memory store.
727
727
  * @param key - The key to set the value for.
728
728
  * @param value - The value to set.
729
729
  */
730
- i(this, "setItem", (e, t) => {
730
+ o(this, "setItem", (e, t) => {
731
731
  this._store.set(e, t);
732
732
  });
733
733
  }
@@ -738,16 +738,14 @@ const ae = ({
738
738
  store: t,
739
739
  serialize: r = JSON.stringify,
740
740
  deserialize: n = JSON.parse,
741
- equals: o = (c, a) => c === a,
741
+ equals: i = (c, a) => c === a,
742
742
  onLoad: l = (c) => c
743
743
  }) => {
744
744
  const c = t.getItem(s), a = new j(
745
745
  c != null ? l(n(c)) : typeof e == "function" ? e() : e,
746
- o
746
+ i
747
747
  );
748
- return a.on((u) => {
749
- t.setItem(s, r(u));
750
- }), a;
748
+ return a.on((u) => t.setItem(s, r(u))), a;
751
749
  }, Dt = (s) => {
752
750
  var e;
753
751
  return ae({
@@ -767,7 +765,7 @@ function oe(s) {
767
765
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame(s) : setTimeout(s, 0);
768
766
  }
769
767
  const Fe = (s, e, t, r) => {
770
- const n = (r == null ? void 0 : r.duration) ?? 300, o = (r == null ? void 0 : r.easing) ?? ((A) => A), l = (r == null ? void 0 : r.equals) ?? ((A, $) => A === $);
768
+ const n = (r == null ? void 0 : r.duration) ?? 300, i = (r == null ? void 0 : r.easing) ?? ((A) => A), l = (r == null ? void 0 : r.equals) ?? ((A, $) => A === $);
771
769
  let c = r == null ? void 0 : r.interpolate, a = s, u = e(), h = performance.now(), g = null, y = !0;
772
770
  const p = new P(e, l), m = _(s, l);
773
771
  m.onDispose(() => {
@@ -778,7 +776,7 @@ const Fe = (s, e, t, r) => {
778
776
  const C = (A) => {
779
777
  u = A, h = performance.now(), a = m.value, y && (y = !1, g = oe(te));
780
778
  }, te = () => {
781
- const $ = (performance.now() - h) / T.get(n), Oe = o($);
779
+ const $ = (performance.now() - h) / T.get(n), Oe = i($);
782
780
  c == null && (c = Re(a));
783
781
  let se = c(a, u, Oe);
784
782
  $ >= 1 ? (y = !0, se = u) : g = oe(te), m.set(se);
@@ -797,22 +795,23 @@ const Fe = (s, e, t, r) => {
797
795
  const t = Object.values(s).filter(d.is), r = Object.keys(s);
798
796
  return Z(() => {
799
797
  const n = {};
800
- for (const o of r)
801
- n[o] = T.get(s[o]);
798
+ for (const i of r)
799
+ n[i] = T.get(s[i]);
802
800
  return e(n);
803
801
  }, t);
804
802
  }, Ht = (s) => Be(s, (e) => e), kt = (s, e) => {
805
803
  const t = _(s.get());
806
804
  let r = null;
807
- return s.on((n) => {
805
+ const n = s.on((i) => {
808
806
  r != null && clearTimeout(r), r = setTimeout(
809
807
  () => {
810
- r = null, t.set(n);
808
+ r = null, t.set(i);
811
809
  },
812
- typeof e == "function" ? e(n) : e
810
+ typeof e == "function" ? e(i) : e
813
811
  );
814
- }), t.onDispose(() => {
815
- r != null && clearTimeout(r);
812
+ });
813
+ return t.onDispose(() => {
814
+ n(), r != null && clearTimeout(r);
816
815
  }), t;
817
816
  }, ue = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), he = /* @__PURE__ */ new Set(["selected"]), fe = /* @__PURE__ */ new Set([
818
817
  "rowSpan",
@@ -866,7 +865,7 @@ class L {
866
865
  * @param namespace - The namespace URI to create the element in, or `undefined` to create a standard HTML element.
867
866
  * @returns The newly created element.
868
867
  */
869
- i(this, "createElement", (e, t) => t !== void 0 ? this.document.createElementNS(t, e) : this.document.createElement(e));
868
+ o(this, "createElement", (e, t) => t !== void 0 ? this.document.createElementNS(t, e) : this.document.createElement(e));
870
869
  /**
871
870
  * Creates a new child element and appends it to the current element, returning a new context.
872
871
  *
@@ -889,7 +888,7 @@ class L {
889
888
  * @param namespace - The namespace URI for the element, or undefined for HTML elements
890
889
  * @returns A new DOMContext focused on the newly created child element
891
890
  */
892
- i(this, "makeChildElement", (e, t) => {
891
+ o(this, "makeChildElement", (e, t) => {
893
892
  const r = this.createElement(e, t);
894
893
  return this.appendOrInsert(r), this.withElement(r);
895
894
  });
@@ -898,13 +897,13 @@ class L {
898
897
  * @param text - The text content for the new text node.
899
898
  * @returns A new `Text` node with the specified text content.
900
899
  */
901
- i(this, "createText", (e) => this.document.createTextNode(e));
900
+ o(this, "createText", (e) => this.document.createTextNode(e));
902
901
  /**
903
902
  * Creates a new text node with the specified text content and appends it to the current element.
904
903
  * @param text - The text content for the new text node.
905
904
  * @returns A new `DOMContext` with a reference to the new text node.
906
905
  */
907
- i(this, "makeChildText", (e) => {
906
+ o(this, "makeChildText", (e) => {
908
907
  const t = this.createText(e);
909
908
  return this.appendOrInsert(t), this.withReference(t);
910
909
  });
@@ -912,14 +911,14 @@ class L {
912
911
  * Sets the text content of the current element.
913
912
  * @param text - The text content to set.
914
913
  */
915
- i(this, "setText", (e) => {
914
+ o(this, "setText", (e) => {
916
915
  this.reference.nodeValue = e;
917
916
  });
918
917
  /**
919
918
  * Gets the text content of the current element or text node.
920
919
  * @returns The text content of the current element or text node.
921
920
  */
922
- i(this, "getText", () => {
921
+ o(this, "getText", () => {
923
922
  var e;
924
923
  return ((e = this.reference) == null ? void 0 : e.nodeValue) ?? this.element.textContent ?? "";
925
924
  });
@@ -928,7 +927,7 @@ class L {
928
927
  * The text node is appended or inserted to the current `DOMContext`.
929
928
  * The new `DOMContext` with the reference is returned.
930
929
  */
931
- i(this, "makeRef", () => {
930
+ o(this, "makeRef", () => {
932
931
  const e = this.createText("");
933
932
  return this.appendOrInsert(e), this.withReference(e);
934
933
  });
@@ -937,7 +936,7 @@ class L {
937
936
  *
938
937
  * @param child - The child node to append or insert.
939
938
  */
940
- i(this, "appendOrInsert", (e) => {
939
+ o(this, "appendOrInsert", (e) => {
941
940
  this.reference === void 0 ? this.element.appendChild(e) : this.element.insertBefore(e, this.reference);
942
941
  });
943
942
  /**
@@ -945,7 +944,7 @@ class L {
945
944
  * @param element - The DOM element to use in the new `DOMContext` instance.
946
945
  * @returns A new `DOMContext` instance with the provided `element`.
947
946
  */
948
- i(this, "withElement", (e) => new L(this.document, e, void 0, this.providers));
947
+ o(this, "withElement", (e) => new L(this.document, e, void 0, this.providers));
949
948
  /**
950
949
  * Creates a portal to render content in a different part of the DOM tree.
951
950
  *
@@ -990,7 +989,7 @@ class L {
990
989
  * @returns A new DOMContext focused on the portal target element
991
990
  * @throws {Error} When the selector doesn't match any element in the document
992
991
  */
993
- i(this, "makePortal", (e) => {
992
+ o(this, "makePortal", (e) => {
994
993
  const t = typeof e == "string" ? this.document.querySelector(e) : e;
995
994
  if (t == null)
996
995
  throw new Error(`Cannot find element by selector for portal: ${e}`);
@@ -1002,7 +1001,7 @@ class L {
1002
1001
  * @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
1003
1002
  * @returns A new `DOMContext` instance with the specified reference.
1004
1003
  */
1005
- i(this, "withReference", (e) => new L(this.document, this.element, e, this.providers));
1004
+ o(this, "withReference", (e) => new L(this.document, this.element, e, this.providers));
1006
1005
  /**
1007
1006
  * Sets a provider for the given provider mark.
1008
1007
  *
@@ -1010,7 +1009,7 @@ class L {
1010
1009
  * @param value - The provider to set for the given mark.
1011
1010
  * @returns A new `DOMContext` instance with the specified provider.
1012
1011
  */
1013
- i(this, "setProvider", (e, t, r) => new L(this.document, this.element, this.reference, {
1012
+ o(this, "setProvider", (e, t, r) => new L(this.document, this.element, this.reference, {
1014
1013
  ...this.providers,
1015
1014
  [e]: [t, r]
1016
1015
  }));
@@ -1021,34 +1020,34 @@ class L {
1021
1020
  * @returns The provider for the given mark.
1022
1021
  * @throws Throws `ProviderNotFoundError` if the provider for the given mark is not found.
1023
1022
  */
1024
- i(this, "getProvider", (e) => {
1023
+ o(this, "getProvider", (e) => {
1025
1024
  if (this.providers[e] === void 0)
1026
1025
  throw new me(e);
1027
1026
  const [t, r] = this.providers[e];
1028
1027
  return { value: t, onUse: r };
1029
1028
  });
1030
- i(this, "clear", (e) => {
1029
+ o(this, "clear", (e) => {
1031
1030
  e && (this.reference !== void 0 ? V(this.reference) : V(this.element));
1032
1031
  });
1033
1032
  /**
1034
1033
  * Adds classes to the element.
1035
1034
  * @param tokens - The class names to add.
1036
1035
  */
1037
- i(this, "addClasses", (e) => {
1036
+ o(this, "addClasses", (e) => {
1038
1037
  this.element.classList.add(...e);
1039
1038
  });
1040
1039
  /**
1041
1040
  * Removes classes from the element.
1042
1041
  * @param tokens - The class names to remove.
1043
1042
  */
1044
- i(this, "removeClasses", (e) => {
1043
+ o(this, "removeClasses", (e) => {
1045
1044
  this.element.classList.remove(...e);
1046
1045
  });
1047
1046
  /**
1048
1047
  * Gets the classes of the element.
1049
1048
  * @returns The classes of the element.
1050
1049
  */
1051
- i(this, "getClasses", () => Array.from(this.element.classList));
1050
+ o(this, "getClasses", () => Array.from(this.element.classList));
1052
1051
  /**
1053
1052
  * Adds an event listener to the element.
1054
1053
  * @param event - The event to listen for.
@@ -1056,10 +1055,10 @@ class L {
1056
1055
  * @param options - The options for the event listener.
1057
1056
  * @returns A function to remove the event listener.
1058
1057
  */
1059
- i(this, "on", (e, t, r) => {
1060
- const n = (o) => t(o, this);
1061
- return this.element.addEventListener(e, n, r), (o) => {
1062
- o && this.element.removeEventListener(e, n, r);
1058
+ o(this, "on", (e, t, r) => {
1059
+ const n = (i) => t(i, this);
1060
+ return this.element.addEventListener(e, n, r), (i) => {
1061
+ i && this.element.removeEventListener(e, n, r);
1063
1062
  };
1064
1063
  });
1065
1064
  /**
@@ -1067,28 +1066,28 @@ class L {
1067
1066
  * @returns `true` if the context is a browser DOM context.
1068
1067
  * @deprecated Use `isBrowser()` instead.
1069
1068
  */
1070
- i(this, "isBrowserDOM", () => !0);
1069
+ o(this, "isBrowserDOM", () => !0);
1071
1070
  /**
1072
1071
  * Returns `true` if the context is a browser context.
1073
1072
  * @returns `true` if the context is a browser context.
1074
1073
  */
1075
- i(this, "isBrowser", () => !0);
1074
+ o(this, "isBrowser", () => !0);
1076
1075
  /**
1077
1076
  * Returns `true` if the context is a headless DOM context.
1078
1077
  * @returns `true` if the context is a headless DOM context.
1079
1078
  */
1080
- i(this, "isHeadlessDOM", () => !1);
1079
+ o(this, "isHeadlessDOM", () => !1);
1081
1080
  /**
1082
1081
  * Returns `true` if the context is a headless context.
1083
1082
  * @returns `true` if the context is a headless context.
1084
1083
  */
1085
- i(this, "isHeadless", () => !1);
1084
+ o(this, "isHeadless", () => !1);
1086
1085
  /**
1087
1086
  * Sets the style of the element.
1088
1087
  * @param name - The name of the style to set.
1089
1088
  * @param value - The value of the style to set.
1090
1089
  */
1091
- i(this, "setStyle", (e, t) => {
1090
+ o(this, "setStyle", (e, t) => {
1092
1091
  this.element.style[e] = t;
1093
1092
  });
1094
1093
  /**
@@ -1096,12 +1095,12 @@ class L {
1096
1095
  * @param name - The name of the style to get.
1097
1096
  * @returns The value of the style.
1098
1097
  */
1099
- i(this, "getStyle", (e) => this.element.style[e]);
1100
- i(this, "makeAccessors", (e) => ({
1098
+ o(this, "getStyle", (e) => this.element.style[e]);
1099
+ o(this, "makeAccessors", (e) => ({
1101
1100
  get: Ue(e, this.element),
1102
1101
  set: We(e, this.element)
1103
1102
  }));
1104
- i(this, "getWindow", () => this.document.defaultView);
1103
+ o(this, "getWindow", () => this.document.defaultView);
1105
1104
  this.document = e, this.element = t, this.reference = r, this.providers = n;
1106
1105
  }
1107
1106
  /**
@@ -1119,14 +1118,14 @@ class L {
1119
1118
  const Ge = (s) => Symbol(s), K = (s, e) => {
1120
1119
  const t = s(e);
1121
1120
  return (r = !0) => t(r);
1122
- }, Nt = (s, e, { doc: t, clear: r, disposeWithParent: n = !0, providers: o = {} } = {}) => {
1121
+ }, Nt = (s, e, { doc: t, clear: r, disposeWithParent: n = !0, providers: i = {} } = {}) => {
1123
1122
  const l = typeof e == "string" ? (t ?? document).querySelector(e) : e;
1124
1123
  if (l === null)
1125
1124
  throw new Xe(
1126
1125
  `Cannot find element by selector for render: ${e}`
1127
1126
  );
1128
1127
  r !== !1 && (t ?? l.ownerDocument) != null && l.nodeType === 1 && (l.innerHTML = "");
1129
- const c = Je(l), a = ge(l) ? void 0 : l, u = L.of(c, a, o), h = K(s, u);
1128
+ const c = Je(l), a = ge(l) ? void 0 : l, u = L.of(c, a, i), h = K(s, u);
1130
1129
  let g;
1131
1130
  return n && (g = new MutationObserver((y) => {
1132
1131
  var p;
@@ -1147,10 +1146,10 @@ const Ge = (s) => Symbol(s), K = (s, e) => {
1147
1146
  } = {
1148
1147
  selector: "body"
1149
1148
  }) => {
1150
- const n = T.toSignal(e).deriveProp(), o = new Ae(t, void 0), l = new D(o, void 0, { currentURL: n }, r);
1149
+ const n = T.toSignal(e).deriveProp(), i = new Ae(t, void 0), l = new D(i, void 0, { currentURL: n }, r);
1151
1150
  return {
1152
1151
  clear: K(s(), l),
1153
- root: o,
1152
+ root: i,
1154
1153
  currentURL: n
1155
1154
  };
1156
1155
  };
@@ -1166,7 +1165,7 @@ class It {
1166
1165
  getAttribute: t,
1167
1166
  setAttribute: r,
1168
1167
  getClass: n,
1169
- setClass: o,
1168
+ setClass: i,
1170
1169
  getStyles: l,
1171
1170
  setStyles: c,
1172
1171
  appendHTML: a,
@@ -1180,74 +1179,74 @@ class It {
1180
1179
  * @param selector - The selector to select elements from. The supported selectors are CSS selectors whose complexity depends on the adapter implementation.
1181
1180
  * @returns An array of elements.
1182
1181
  */
1183
- i(this, "select");
1182
+ o(this, "select");
1184
1183
  /**
1185
1184
  * Gets the value of an attribute from an element.
1186
1185
  * @param el - The element to get the attribute from.
1187
1186
  * @param attr - The attribute to get the value from.
1188
1187
  * @returns The value of the attribute or null if the attribute is not set.
1189
1188
  */
1190
- i(this, "getAttribute");
1189
+ o(this, "getAttribute");
1191
1190
  /**
1192
1191
  * Sets the value of an attribute on an element.
1193
1192
  * @param el - The element to set the attribute on.
1194
1193
  * @param attr - The attribute to set the value of.
1195
1194
  * @param value - The value to set the attribute to.
1196
1195
  */
1197
- i(this, "setAttribute");
1196
+ o(this, "setAttribute");
1198
1197
  /**
1199
1198
  * Gets the class of an element.
1200
1199
  * @param el - The element to get the class from.
1201
1200
  * @returns The class of the element or an empty string if the class is not set.
1202
1201
  */
1203
- i(this, "getClass");
1202
+ o(this, "getClass");
1204
1203
  /**
1205
1204
  * Sets the class of an element.
1206
1205
  * @param el - The element to set the class on.
1207
1206
  * @param cls - The class to set.
1208
1207
  */
1209
- i(this, "setClass");
1208
+ o(this, "setClass");
1210
1209
  /**
1211
1210
  * Gets the styles of an element.
1212
1211
  * @param el - The element to get the styles from.
1213
1212
  * @returns The styles of the element.
1214
1213
  */
1215
- i(this, "getStyles");
1214
+ o(this, "getStyles");
1216
1215
  /**
1217
1216
  * Sets the styles of an element.
1218
1217
  * @param el - The element to set the styles on.
1219
1218
  */
1220
- i(this, "setStyles");
1219
+ o(this, "setStyles");
1221
1220
  /**
1222
1221
  * Appends HTML to an element.
1223
1222
  * @param el - The element to append the HTML to.
1224
1223
  * @param html - The HTML to append.
1225
1224
  */
1226
- i(this, "appendHTML");
1225
+ o(this, "appendHTML");
1227
1226
  /**
1228
1227
  * Gets the inner HTML of an element.
1229
1228
  * @param el - The element to get the inner HTML from.
1230
1229
  * @returns The inner HTML of the element or an empty string if the inner HTML is not set.
1231
1230
  */
1232
- i(this, "getInnerHTML");
1231
+ o(this, "getInnerHTML");
1233
1232
  /**
1234
1233
  * Sets the inner HTML of an element.
1235
1234
  * @param el - The element to set the inner HTML on.
1236
1235
  * @param html - The inner HTML to set.
1237
1236
  */
1238
- i(this, "setInnerHTML");
1237
+ o(this, "setInnerHTML");
1239
1238
  /**
1240
1239
  * Gets the inner text of an element.
1241
1240
  * @param el - The element to get the inner text from.
1242
1241
  * @returns The inner text of the element or an empty string if the inner text is not set.
1243
1242
  */
1244
- i(this, "getInnerText");
1243
+ o(this, "getInnerText");
1245
1244
  /**
1246
1245
  * Sets the inner text of an element.
1247
1246
  * @param el - The element to set the inner text on.
1248
1247
  * @param text - The inner text to set.
1249
1248
  */
1250
- i(this, "setInnerText");
1249
+ o(this, "setInnerText");
1251
1250
  /**
1252
1251
  * Sets the content of the root element from a HeadlessPortal. Generally this will be the same instance that is
1253
1252
  * returned by `runHeadless`.
@@ -1256,10 +1255,10 @@ class It {
1256
1255
  * @param setPlaceholders - Whether to set placeholders for the content. This allows you to restore the original content
1257
1256
  * when you render on the server and then hydrate on the client.
1258
1257
  */
1259
- i(this, "setFromRoot", (e, t) => {
1258
+ o(this, "setFromRoot", (e, t) => {
1260
1259
  e.getPortals().forEach((n) => {
1261
- const o = typeof n.selector == "string" ? this.select(n.selector) : [n.selector];
1262
- for (const l of o) {
1260
+ const i = typeof n.selector == "string" ? this.select(n.selector) : [n.selector];
1261
+ for (const l of i) {
1263
1262
  if (l == null)
1264
1263
  throw new Error(
1265
1264
  `Cannot find element by selector for render: ${n.selector}`
@@ -1316,7 +1315,7 @@ class It {
1316
1315
  }
1317
1316
  });
1318
1317
  });
1319
- this.select = e, this.getAttribute = t, this.setAttribute = r, this.getClass = n, this.setClass = o, this.getStyles = l, this.setStyles = c, this.appendHTML = a, this.getInnerHTML = u, this.setInnerHTML = h, this.getInnerText = g, this.setInnerText = y;
1318
+ this.select = e, this.getAttribute = t, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = l, this.setStyles = c, this.appendHTML = a, this.getInnerHTML = u, this.setInnerHTML = h, this.getInnerText = g, this.setInnerText = y;
1320
1319
  }
1321
1320
  }
1322
1321
  const Ye = () => {
@@ -1361,38 +1360,38 @@ const Ye = () => {
1361
1360
  }, S = Symbol("class"), E = Symbol("style"), x = Symbol("handler"), be = () => Math.random().toString(36).substring(2, 15), ot = (s) => s.replace(/<[^>]*>?/g, "");
1362
1361
  class Se {
1363
1362
  constructor(e) {
1364
- i(this, "id", be());
1365
- i(this, "properties", {});
1366
- i(this, "children", []);
1367
- i(this, "isElement", () => !0);
1368
- i(this, "isText", () => !1);
1369
- i(this, "getText", () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? ot(this.properties.innerHTML) : this.children.map((e) => e.getText()).join(""));
1370
- i(this, "removeChild", (e) => {
1363
+ o(this, "id", be());
1364
+ o(this, "properties", {});
1365
+ o(this, "children", []);
1366
+ o(this, "isElement", () => !0);
1367
+ o(this, "isText", () => !1);
1368
+ o(this, "getText", () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? ot(this.properties.innerHTML) : this.children.map((e) => e.getText()).join(""));
1369
+ o(this, "removeChild", (e) => {
1371
1370
  const t = this.children.indexOf(e);
1372
1371
  t !== -1 && this.children.splice(t, 1);
1373
1372
  });
1374
- i(this, "remove", () => {
1373
+ o(this, "remove", () => {
1375
1374
  if (this.parent != null)
1376
1375
  this.parent.removeChild(this);
1377
1376
  else
1378
1377
  throw new Error("Parent is undefined");
1379
1378
  });
1380
- i(this, "getPortals", () => {
1379
+ o(this, "getPortals", () => {
1381
1380
  const e = this.elements().flatMap((t) => t.isPortal() ? [t, ...t.getPortals()] : t.getPortals());
1382
1381
  return this.isPortal() && e.unshift(this), e;
1383
1382
  });
1384
- i(this, "elements", () => this.children.filter((e) => e.isElement()));
1385
- i(this, "hasInnerHTML", () => this.properties.innerHTML != null);
1386
- i(this, "getInnerHTML", () => this.properties.innerHTML ?? "");
1387
- i(this, "getInnerText", () => this.properties.innerText ?? "");
1388
- i(this, "hasInnerText", () => this.properties.innerText != null);
1389
- i(this, "hasChildren", () => this.children.length > 0);
1390
- i(this, "hasClasses", () => this.properties[S] != null);
1391
- i(this, "hasStyles", () => this.properties[E] != null);
1392
- i(this, "hasAttributes", () => Object.keys(this.properties).length > 0);
1393
- i(this, "hasHandlers", () => this.properties[x] != null);
1394
- i(this, "hasRenderableProperties", () => this.hasClasses() || this.hasAttributes() || this.hasStyles());
1395
- i(this, "getById", (e) => {
1383
+ o(this, "elements", () => this.children.filter((e) => e.isElement()));
1384
+ o(this, "hasInnerHTML", () => this.properties.innerHTML != null);
1385
+ o(this, "getInnerHTML", () => this.properties.innerHTML ?? "");
1386
+ o(this, "getInnerText", () => this.properties.innerText ?? "");
1387
+ o(this, "hasInnerText", () => this.properties.innerText != null);
1388
+ o(this, "hasChildren", () => this.children.length > 0);
1389
+ o(this, "hasClasses", () => this.properties[S] != null);
1390
+ o(this, "hasStyles", () => this.properties[E] != null);
1391
+ o(this, "hasAttributes", () => Object.keys(this.properties).length > 0);
1392
+ o(this, "hasHandlers", () => this.properties[x] != null);
1393
+ o(this, "hasRenderableProperties", () => this.hasClasses() || this.hasAttributes() || this.hasStyles());
1394
+ o(this, "getById", (e) => {
1396
1395
  if (this.properties.id === e)
1397
1396
  return this;
1398
1397
  for (const t of this.elements()) {
@@ -1401,25 +1400,25 @@ class Se {
1401
1400
  return r;
1402
1401
  }
1403
1402
  });
1404
- i(this, "trigger", (e, t) => {
1403
+ o(this, "trigger", (e, t) => {
1405
1404
  ((this.properties[x] ?? {})[e] ?? []).forEach((n) => n(t));
1406
1405
  });
1407
- i(this, "click", () => {
1406
+ o(this, "click", () => {
1408
1407
  this.trigger("click", {});
1409
1408
  });
1410
- i(this, "on", (e, t, r, n) => {
1409
+ o(this, "on", (e, t, r, n) => {
1411
1410
  var a;
1412
- const o = (a = this.properties)[x] ?? (a[x] = {}), l = n != null && n.once ? (u) => {
1411
+ const i = (a = this.properties)[x] ?? (a[x] = {}), l = n != null && n.once ? (u) => {
1413
1412
  c(), t(u, r);
1414
1413
  } : (u) => t(u, r);
1415
- o[e] = [...o[e] ?? [], l];
1414
+ i[e] = [...i[e] ?? [], l];
1416
1415
  const c = () => {
1417
- const u = o[e] ?? [], h = u.indexOf(l);
1418
- h !== -1 && (u.splice(h, 1), u.length === 0 ? (delete o[e], Object.keys(o).length === 0 && delete this.properties[x]) : o[e] = u, (n == null ? void 0 : n.signal) != null && n.signal.removeEventListener("abort", c));
1416
+ const u = i[e] ?? [], h = u.indexOf(l);
1417
+ h !== -1 && (u.splice(h, 1), u.length === 0 ? (delete i[e], Object.keys(i).length === 0 && delete this.properties[x]) : i[e] = u, (n == null ? void 0 : n.signal) != null && n.signal.removeEventListener("abort", c));
1419
1418
  };
1420
1419
  return (n == null ? void 0 : n.signal) != null && n.signal.addEventListener("abort", c), c;
1421
1420
  });
1422
- i(this, "addClasses", (e) => {
1421
+ o(this, "addClasses", (e) => {
1423
1422
  var r;
1424
1423
  if (e.length === 0)
1425
1424
  return;
@@ -1428,34 +1427,34 @@ class Se {
1428
1427
  t.includes(n) || t.push(n);
1429
1428
  });
1430
1429
  });
1431
- i(this, "removeClasses", (e) => {
1430
+ o(this, "removeClasses", (e) => {
1432
1431
  var r;
1433
1432
  if (e.length === 0)
1434
1433
  return;
1435
1434
  const t = (r = this.properties)[S] ?? (r[S] = []);
1436
1435
  e.forEach((n) => {
1437
- const o = t.indexOf(n);
1438
- o !== -1 && t.splice(o, 1);
1436
+ const i = t.indexOf(n);
1437
+ i !== -1 && t.splice(i, 1);
1439
1438
  }), t.length === 0 && delete this.properties[S];
1440
1439
  });
1441
- i(this, "getClasses", () => this.properties[S] ?? []);
1442
- i(this, "getAttributes", () => Object.entries(this.properties).filter(
1440
+ o(this, "getClasses", () => this.properties[S] ?? []);
1441
+ o(this, "getAttributes", () => Object.entries(this.properties).filter(
1443
1442
  ([e]) => !["innerText", "innerHTML"].includes(e)
1444
1443
  ));
1445
- i(this, "getVisibleAttributes", () => Reflect.ownKeys(this.properties).flatMap(
1444
+ o(this, "getVisibleAttributes", () => Reflect.ownKeys(this.properties).flatMap(
1446
1445
  (e) => e === S ? [["class", this.getClasses()]] : e === E ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
1447
1446
  ));
1448
- i(this, "setStyle", (e, t) => {
1447
+ o(this, "setStyle", (e, t) => {
1449
1448
  var n;
1450
1449
  const r = (n = this.properties)[E] ?? (n[E] = {});
1451
1450
  r[e] = t, t === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[E]);
1452
1451
  });
1453
- i(this, "getStyle", (e) => {
1452
+ o(this, "getStyle", (e) => {
1454
1453
  var t;
1455
1454
  return ((t = this.properties[E]) == null ? void 0 : t[e]) ?? "";
1456
1455
  });
1457
- i(this, "getStyles", () => this.properties[E] ?? {});
1458
- i(this, "makeAccessors", (e) => {
1456
+ o(this, "getStyles", () => this.properties[E] ?? {});
1457
+ o(this, "makeAccessors", (e) => {
1459
1458
  const t = this.properties;
1460
1459
  return {
1461
1460
  get: () => t[e],
@@ -1469,12 +1468,12 @@ const lt = (s) => s.replace(/"/g, "&quot;"), ct = (s) => s.replace(/&/g, "&amp;"
1469
1468
  class at extends Se {
1470
1469
  constructor(t, r, n) {
1471
1470
  super(n);
1472
- i(this, "isPortal", () => !1);
1473
- i(this, "toHTML", (t = !1) => {
1471
+ o(this, "isPortal", () => !1);
1472
+ o(this, "toHTML", (t = !1) => {
1474
1473
  const r = this.children.map((a) => a.toHTML()).join(""), n = this.namespace ? ` xmlns="${this.namespace}"` : "";
1475
- let o = null;
1476
- const l = this.getVisibleAttributes().map(([a, u]) => a === "class" ? ` class="${u.join(" ")}"` : a === "style" ? typeof u == "string" ? ` style="${u}"` : ` style="${Object.entries(u).map(([h, g]) => `${h}: ${g};`).join(" ")}"` : ht.has(a) ? ` ${a}` : a === "innerHTML" ? (o = u, "") : a === "innerText" ? (o = ct(u), "") : ` ${a}="${lt(u)}"`).join(""), c = t ? ` ${ye}` : "";
1477
- return ft.has(this.tagName) && r === "" ? `<${this.tagName}${n}${l}${c} />` : `<${this.tagName}${n}${l}${c}>${o ?? r}</${this.tagName}>`;
1474
+ let i = null;
1475
+ const l = this.getVisibleAttributes().map(([a, u]) => a === "class" ? ` class="${u.join(" ")}"` : a === "style" ? typeof u == "string" ? ` style="${u}"` : ` style="${Object.entries(u).map(([h, g]) => `${h}: ${g};`).join(" ")}"` : ht.has(a) ? ` ${a}` : a === "innerHTML" ? (i = u, "") : a === "innerText" ? (i = ct(u), "") : ` ${a}="${lt(u)}"`).join(""), c = t ? ` ${ye}` : "";
1476
+ return ft.has(this.tagName) && r === "" ? `<${this.tagName}${n}${l}${c} />` : `<${this.tagName}${n}${l}${c}>${i ?? r}</${this.tagName}>`;
1478
1477
  });
1479
1478
  this.tagName = t, this.namespace = r;
1480
1479
  }
@@ -1482,32 +1481,32 @@ class at extends Se {
1482
1481
  class Ae extends Se {
1483
1482
  constructor(t, r) {
1484
1483
  super(r);
1485
- i(this, "isPortal", () => !0);
1486
- i(this, "toHTML", () => "");
1487
- i(this, "contentToHTML", (t = !1) => this.children.map((r) => r.toHTML(t)).join(""));
1484
+ o(this, "isPortal", () => !0);
1485
+ o(this, "toHTML", () => "");
1486
+ o(this, "contentToHTML", (t = !1) => this.children.map((r) => r.toHTML(t)).join(""));
1488
1487
  this.selector = t;
1489
1488
  }
1490
1489
  }
1491
1490
  class ut {
1492
1491
  constructor(e) {
1493
- i(this, "id", be());
1494
- i(this, "isElement", () => !1);
1495
- i(this, "isText", () => !0);
1496
- i(this, "getText", () => this.text);
1497
- i(this, "toHTML", () => this.text);
1492
+ o(this, "id", be());
1493
+ o(this, "isElement", () => !1);
1494
+ o(this, "isText", () => !0);
1495
+ o(this, "getText", () => this.text);
1496
+ o(this, "toHTML", () => this.text);
1498
1497
  this.text = e;
1499
1498
  }
1500
1499
  }
1501
1500
  class D {
1502
1501
  constructor(e, t, r, n) {
1503
- i(this, "appendOrInsert", (e) => {
1502
+ o(this, "appendOrInsert", (e) => {
1504
1503
  if (this.reference != null) {
1505
1504
  const t = this.element.children.indexOf(this.reference);
1506
1505
  this.element.children.splice(t, 0, e);
1507
1506
  } else
1508
1507
  this.element.children.push(e);
1509
1508
  });
1510
- i(this, "makeChildElement", (e, t) => {
1509
+ o(this, "makeChildElement", (e, t) => {
1511
1510
  const r = new at(e, t, this.element);
1512
1511
  return this.appendOrInsert(r), new D(
1513
1512
  r,
@@ -1516,7 +1515,7 @@ class D {
1516
1515
  this.providers
1517
1516
  );
1518
1517
  });
1519
- i(this, "makeChildText", (e) => {
1518
+ o(this, "makeChildText", (e) => {
1520
1519
  const t = new ut(e);
1521
1520
  return this.appendOrInsert(t), new D(
1522
1521
  this.element,
@@ -1525,15 +1524,15 @@ class D {
1525
1524
  this.providers
1526
1525
  );
1527
1526
  });
1528
- i(this, "setText", (e) => {
1527
+ o(this, "setText", (e) => {
1529
1528
  this.reference && this.reference.isText() && (this.reference.text = e);
1530
1529
  });
1531
- i(this, "getText", () => {
1530
+ o(this, "getText", () => {
1532
1531
  var e;
1533
1532
  return ((e = this.reference) == null ? void 0 : e.getText()) ?? this.element.getText();
1534
1533
  });
1535
- i(this, "makeRef", () => this.makeChildText(""));
1536
- i(this, "makePortal", (e) => {
1534
+ o(this, "makeRef", () => this.makeChildText(""));
1535
+ o(this, "makePortal", (e) => {
1537
1536
  const t = new Ae(e, this.element);
1538
1537
  return this.appendOrInsert(t), new D(
1539
1538
  t,
@@ -1549,30 +1548,30 @@ class D {
1549
1548
  * @param value - The provider to set for the given mark.
1550
1549
  * @returns A new `DOMContext` instance with the specified provider.
1551
1550
  */
1552
- i(this, "setProvider", (e, t, r) => new D(this.element, this.reference, this.container, {
1551
+ o(this, "setProvider", (e, t, r) => new D(this.element, this.reference, this.container, {
1553
1552
  ...this.providers,
1554
1553
  [e]: [t, r]
1555
1554
  }));
1556
- i(this, "getProvider", (e) => {
1555
+ o(this, "getProvider", (e) => {
1557
1556
  if (this.providers[e] === void 0)
1558
1557
  throw new me(e);
1559
1558
  const [t, r] = this.providers[e];
1560
1559
  return { value: t, onUse: r };
1561
1560
  });
1562
- i(this, "clear", (e) => {
1561
+ o(this, "clear", (e) => {
1563
1562
  e && (this.reference !== void 0 ? this.element.removeChild(this.reference) : this.element.remove());
1564
1563
  });
1565
- i(this, "on", (e, t) => this.element.on(e, t, this));
1566
- i(this, "addClasses", (e) => this.element.addClasses(e));
1567
- i(this, "removeClasses", (e) => this.element.removeClasses(e));
1568
- i(this, "getClasses", () => this.element.getClasses());
1569
- i(this, "isBrowserDOM", () => !1);
1570
- i(this, "isBrowser", () => !1);
1571
- i(this, "isHeadlessDOM", () => !0);
1572
- i(this, "isHeadless", () => !0);
1573
- i(this, "setStyle", (e, t) => this.element.setStyle(e, t));
1574
- i(this, "getStyle", (e) => this.element.getStyle(e));
1575
- i(this, "makeAccessors", (e) => this.element.makeAccessors(e));
1564
+ o(this, "on", (e, t) => this.element.on(e, t, this));
1565
+ o(this, "addClasses", (e) => this.element.addClasses(e));
1566
+ o(this, "removeClasses", (e) => this.element.removeClasses(e));
1567
+ o(this, "getClasses", () => this.element.getClasses());
1568
+ o(this, "isBrowserDOM", () => !1);
1569
+ o(this, "isBrowser", () => !1);
1570
+ o(this, "isHeadlessDOM", () => !0);
1571
+ o(this, "isHeadless", () => !0);
1572
+ o(this, "setStyle", (e, t) => this.element.setStyle(e, t));
1573
+ o(this, "getStyle", (e) => this.element.getStyle(e));
1574
+ o(this, "makeAccessors", (e) => this.element.makeAccessors(e));
1576
1575
  this.element = e, this.reference = t, this.container = r, this.providers = n;
1577
1576
  }
1578
1577
  }
@@ -1599,20 +1598,20 @@ const ht = /* @__PURE__ */ new Set([
1599
1598
  }), pt = (s) => (e) => {
1600
1599
  let t = [];
1601
1600
  const r = s.on((n) => {
1602
- e.removeClasses(t), t = (n ?? "").split(" ").filter((o) => o.length > 0), e.addClasses(t);
1601
+ e.removeClasses(t), t = (n ?? "").split(" ").filter((i) => i.length > 0), e.addClasses(t);
1603
1602
  });
1604
1603
  return (n) => {
1605
1604
  r(), n && e.removeClasses(t), t.length = 0;
1606
1605
  };
1607
1606
  }, k = (s, e) => (t) => {
1608
- const { get: r, set: n } = t.makeAccessors(s), o = r();
1607
+ const { get: r, set: n } = t.makeAccessors(s), i = r();
1609
1608
  return n(e), (l) => {
1610
- l && n(o);
1609
+ l && n(i);
1611
1610
  };
1612
1611
  }, N = (s, e) => (t) => {
1613
- const { get: r, set: n } = t.makeAccessors(s), o = r(), l = e.on(n);
1612
+ const { get: r, set: n } = t.makeAccessors(s), i = r(), l = e.on(n);
1614
1613
  return (c) => {
1615
- l(), c && n(o);
1614
+ l(), c && n(i);
1616
1615
  };
1617
1616
  }, O = new Proxy(
1618
1617
  {},
@@ -1724,14 +1723,14 @@ const ht = /* @__PURE__ */ new Set([
1724
1723
  return s;
1725
1724
  throw new Error(`Unknown type: '${typeof s}' for child: ${s}`);
1726
1725
  }, Ee = (s, ...e) => (t) => {
1727
- const r = t.makeChildElement(s, void 0), n = e.map((o) => f(o)(r));
1728
- return (o) => {
1729
- n.forEach((l) => l(!1)), r.clear(o);
1726
+ const r = t.makeChildElement(s, void 0), n = e.map((i) => f(i)(r));
1727
+ return (i) => {
1728
+ n.forEach((l) => l(!1)), r.clear(i);
1730
1729
  };
1731
1730
  }, we = (s, e, ...t) => (r) => {
1732
- const n = r.makeChildElement(s, e), o = t.map((l) => f(l)(n));
1731
+ const n = r.makeChildElement(s, e), i = t.map((l) => f(l)(n));
1733
1732
  return (l) => {
1734
- o.forEach((c) => c(!1)), n.clear(l);
1733
+ i.forEach((c) => c(!1)), n.clear(l);
1735
1734
  };
1736
1735
  }, Wt = new Proxy(
1737
1736
  {},
@@ -1776,10 +1775,10 @@ const ht = /* @__PURE__ */ new Set([
1776
1775
  ), Ce = (s, e) => {
1777
1776
  if (typeof e == "function")
1778
1777
  return Ce(s, { then: e });
1779
- const t = e.pending != null ? f(e.pending()) : v, r = e.then, n = e.error != null ? (o) => f(e.error(o)) : () => v;
1780
- return (o) => {
1778
+ const t = e.pending != null ? f(e.pending()) : v, r = e.then, n = e.error != null ? (i) => f(e.error(i)) : () => v;
1779
+ return (i) => {
1781
1780
  let l = !0;
1782
- const c = s(), a = o.makeRef();
1781
+ const c = s(), a = i.makeRef();
1783
1782
  let u = f(t)(a);
1784
1783
  return c.then(
1785
1784
  (h) => {
@@ -1841,12 +1840,12 @@ const ht = /* @__PURE__ */ new Set([
1841
1840
  const t = e.target;
1842
1841
  if (t.value === "")
1843
1842
  return;
1844
- const r = t.value.split("T"), n = r[0].split("-"), o = new Date(
1843
+ const r = t.value.split("T"), n = r[0].split("-"), i = new Date(
1845
1844
  Number(n[0]),
1846
1845
  Number(n[1]) - 1,
1847
1846
  Number(n[2])
1848
1847
  ), l = r[1].split(":");
1849
- o.setHours(Number(l[0])), o.setMinutes(Number(l[1])), o.setSeconds(Number(l[2])), s(o);
1848
+ i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), s(i);
1850
1849
  }, zt = (s) => (e) => {
1851
1850
  const t = e.target;
1852
1851
  if (t.value === "") {
@@ -1858,12 +1857,12 @@ const ht = /* @__PURE__ */ new Set([
1858
1857
  s(null);
1859
1858
  return;
1860
1859
  }
1861
- const n = r[0].split("-"), o = new Date(
1860
+ const n = r[0].split("-"), i = new Date(
1862
1861
  Number(n[0]),
1863
1862
  Number(n[1]) - 1,
1864
1863
  Number(n[2])
1865
1864
  ), l = r[1].split(":");
1866
- o.setHours(Number(l[0] ?? 0)), o.setMinutes(Number(l[1] ?? 0)), o.setSeconds(Number(l[2] ?? 0)), s(o);
1865
+ i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)), s(i);
1867
1866
  }, Qt = (s) => (e) => {
1868
1867
  const t = e.target;
1869
1868
  s(t.checked);
@@ -1877,18 +1876,18 @@ const ht = /* @__PURE__ */ new Set([
1877
1876
  if (d.is(s))
1878
1877
  return (r) => {
1879
1878
  const n = r.makeRef();
1880
- let o, l;
1879
+ let i, l;
1881
1880
  const c = s.map((h) => Object.keys(h)[0]);
1882
1881
  let a;
1883
1882
  const u = c.on((h) => {
1884
1883
  if (h !== a) {
1885
- a = h, l == null || l.dispose(), o == null || o(!0), l = s.map((y) => y[h]);
1884
+ a = h, l == null || l.dispose(), i == null || i(!0), l = s.map((y) => y[h]);
1886
1885
  const g = e[h](l);
1887
- o = f(g)(n);
1886
+ i = f(g)(n);
1888
1887
  }
1889
1888
  });
1890
1889
  return (h) => {
1891
- l == null || l.dispose(), u(), n.clear(h), o == null || o(h);
1890
+ l == null || l.dispose(), u(), n.clear(h), i == null || i(h);
1892
1891
  };
1893
1892
  };
1894
1893
  const t = Object.keys(s)[0];
@@ -1906,7 +1905,7 @@ const ht = /* @__PURE__ */ new Set([
1906
1905
  ), as = (s, e = {}) => (t) => {
1907
1906
  const r = (e == null ? void 0 : e.firstSeparator) ?? s, n = (e == null ? void 0 : e.lastSeparator) ?? s;
1908
1907
  return _t(
1909
- t.map((o) => o.isFirst ? "first" : o.isLast ? "last" : "other"),
1908
+ t.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
1910
1909
  {
1911
1910
  first: r,
1912
1911
  last: n,
@@ -1919,16 +1918,16 @@ const ht = /* @__PURE__ */ new Set([
1919
1918
  if (d.is(s)) {
1920
1919
  const r = s;
1921
1920
  return (n) => {
1922
- const o = n.makeRef();
1921
+ const i = n.makeRef();
1923
1922
  let l = () => {
1924
1923
  }, c = !1, a = null;
1925
1924
  const u = r.on((h) => {
1926
- h == null ? (l(!0), l = f(t == null ? void 0 : t())(o), c = !1, a == null || a.dispose(), a = null) : c ? a.set(h) : (a = _(h), l(!0), l = f(e(a))(
1927
- o
1925
+ h == null ? (l(!0), l = f(t == null ? void 0 : t())(i), c = !1, a == null || a.dispose(), a = null) : c ? a.set(h) : (a = _(h), l(!0), l = f(e(a))(
1926
+ i
1928
1927
  ), c = !0);
1929
1928
  });
1930
1929
  return (h) => {
1931
- a == null || a.dispose(), u(), l == null || l(h), o.clear(h);
1930
+ a == null || a.dispose(), u(), l == null || l(h), i.clear(h);
1932
1931
  };
1933
1932
  };
1934
1933
  } else {
@@ -1982,14 +1981,14 @@ const ht = /* @__PURE__ */ new Set([
1982
1981
  if (d.is(s)) {
1983
1982
  const r = s;
1984
1983
  return (n) => {
1985
- const o = n.makeRef();
1984
+ const i = n.makeRef();
1986
1985
  let l = () => {
1987
1986
  };
1988
1987
  const c = r.on((a) => {
1989
- l(!0), a ? l = f(e())(o) : l = f(t == null ? void 0 : t())(o);
1988
+ l(!0), a ? l = f(e())(i) : l = f(t == null ? void 0 : t())(i);
1990
1989
  });
1991
1990
  return (a) => {
1992
- l(a), c(), o.clear(a);
1991
+ l(a), c(), i.clear(a);
1993
1992
  };
1994
1993
  };
1995
1994
  } else {
@@ -2008,7 +2007,7 @@ const ht = /* @__PURE__ */ new Set([
2008
2007
  return De(s, (r) => {
2009
2008
  const n = new Q(
2010
2009
  r.index,
2011
- r.total.map((o) => o - 1)
2010
+ r.total.map((i) => i - 1)
2012
2011
  );
2013
2012
  return b(
2014
2013
  M(n.dispose),
@@ -2022,7 +2021,7 @@ const ht = /* @__PURE__ */ new Set([
2022
2021
  });
2023
2022
  if (d.is(s))
2024
2023
  return (r) => {
2025
- const n = s.derive(), o = r.makeRef(), l = [];
2024
+ const n = s.derive(), i = r.makeRef(), l = [];
2026
2025
  return n.on((c) => {
2027
2026
  const a = l.splice(c);
2028
2027
  for (const u of a)
@@ -2033,37 +2032,37 @@ const ht = /* @__PURE__ */ new Set([
2033
2032
  b(
2034
2033
  M(h.dispose),
2035
2034
  f(e(h))
2036
- )(o)
2035
+ )(i)
2037
2036
  );
2038
2037
  }
2039
2038
  }), (c) => {
2040
2039
  n.dispose();
2041
2040
  for (const a of l)
2042
2041
  a(c);
2043
- l.length = 0, o.clear(c);
2042
+ l.length = 0, i.clear(c);
2044
2043
  };
2045
2044
  };
2046
2045
  {
2047
2046
  const r = G(s);
2048
2047
  return b(
2049
- ...Array.from({ length: s }, (n, o) => o).map((n) => {
2050
- const o = new Q(n, r);
2048
+ ...Array.from({ length: s }, (n, i) => i).map((n) => {
2049
+ const i = new Q(n, r);
2051
2050
  return b(
2052
- M(o.dispose),
2053
- f(e(o))
2051
+ M(i.dispose),
2052
+ f(e(i))
2054
2053
  );
2055
2054
  })
2056
2055
  );
2057
2056
  }
2058
2057
  }, ps = (s, e, t) => {
2059
- const r = T.map(s, (o) => o.length), n = T.toSignal(s);
2058
+ const r = T.map(s, (i) => i.length), n = T.toSignal(s);
2060
2059
  return De(
2061
2060
  r,
2062
- (o) => {
2063
- const l = n.map((c) => c[o.index]);
2061
+ (i) => {
2062
+ const l = n.map((c) => c[i.index]);
2064
2063
  return b(
2065
2064
  M(l.dispose),
2066
- f(e(l, o))
2065
+ f(e(l, i))
2067
2066
  );
2068
2067
  },
2069
2068
  t
@@ -2074,13 +2073,13 @@ const ht = /* @__PURE__ */ new Set([
2074
2073
  return (r) => {
2075
2074
  r = r.makeRef();
2076
2075
  const n = t.map((c) => f(e(c)));
2077
- let o = () => {
2076
+ let i = () => {
2078
2077
  };
2079
2078
  const l = n.on((c) => {
2080
- o(!0), o = c(r);
2079
+ i(!0), i = c(r);
2081
2080
  });
2082
2081
  return (c) => {
2083
- l(), o(c);
2082
+ l(), i(c);
2084
2083
  };
2085
2084
  };
2086
2085
  }
@@ -2106,15 +2105,15 @@ const ht = /* @__PURE__ */ new Set([
2106
2105
  };
2107
2106
  if (R.has(s))
2108
2107
  throw new Error(`Probe already exists: ${s.description}`);
2109
- const n = setTimeout(() => r("timeout"), t), o = { counter: 0, timeoutId: n };
2110
- return R.set(s, o), {
2108
+ const n = setTimeout(() => r("timeout"), t), i = { counter: 0, timeoutId: n };
2109
+ return R.set(s, i), {
2111
2110
  value: () => {
2112
2111
  clearTimeout(n);
2113
2112
  const c = R.get(s);
2114
2113
  c != null && --c.counter === 0 && r("resolved");
2115
2114
  },
2116
2115
  dispose: () => r("disposed"),
2117
- onUse: () => o.counter++
2116
+ onUse: () => i.counter++
2118
2117
  };
2119
2118
  }
2120
2119
  }), Ts = vt(Symbol("GlobalProbe")), Et = (s, e) => (t) => {
@@ -2123,9 +2122,9 @@ const ht = /* @__PURE__ */ new Set([
2123
2122
  n && t.setStyle(s, r);
2124
2123
  };
2125
2124
  }, wt = (s, e) => (t) => {
2126
- const r = t.getStyle(s);
2127
- return e.on((n) => t.setStyle(s, n)), (n) => {
2128
- n && t.setStyle(s, r);
2125
+ const r = t.getStyle(s), n = e.on((i) => t.setStyle(s, i));
2126
+ return (i) => {
2127
+ n(), i && t.setStyle(s, r);
2129
2128
  };
2130
2129
  }, bs = new Proxy(
2131
2130
  {},
@@ -2168,20 +2167,20 @@ const ht = /* @__PURE__ */ new Set([
2168
2167
  function n(c) {
2169
2168
  t = c;
2170
2169
  }
2171
- const o = [], l = s({
2170
+ const i = [], l = s({
2172
2171
  use: ({ mark: c }) => {
2173
2172
  const { value: a, onUse: u } = r().getProvider(c);
2174
2173
  return u == null || u(), a;
2175
2174
  },
2176
2175
  set: ({ mark: c, create: a }, u) => {
2177
2176
  const { value: h, dispose: g, onUse: y } = a(u, r());
2178
- o.push(g), n(r().setProvider(c, h, y));
2177
+ i.push(g), n(r().setProvider(c, h, y));
2179
2178
  }
2180
2179
  });
2181
2180
  return l == null ? () => {
2182
2181
  } : b(
2183
2182
  f(l),
2184
- M(() => o.forEach((c) => c()))
2183
+ M(() => i.forEach((c) => c()))
2185
2184
  )(r());
2186
2185
  }, vs = (s, e, t) => ee(({ set: r }) => (r(s, e), t())), Es = (s, e) => ee(({ use: t }) => e(t(s))), ws = (...s) => (e) => ee(({ use: t }) => {
2187
2186
  const r = s.map(t);