xote 1.3.0 → 1.3.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.
package/dist/xote.mjs CHANGED
@@ -1,11 +1,15 @@
1
- function $e(e) {
1
+ function fe(e) {
2
2
  return e === void 0 ? {
3
3
  BS_PRIVATE_NESTED_SOME_NONE: 0
4
4
  } : e !== null && e.BS_PRIVATE_NESTED_SOME_NONE !== void 0 ? {
5
5
  BS_PRIVATE_NESTED_SOME_NONE: e.BS_PRIVATE_NESTED_SOME_NONE + 1 | 0
6
6
  } : e;
7
7
  }
8
- function v(e) {
8
+ function je(e) {
9
+ if (e != null)
10
+ return fe(e);
11
+ }
12
+ function l(e) {
9
13
  if (!(e !== null && e.BS_PRIVATE_NESTED_SOME_NONE !== void 0))
10
14
  return e;
11
15
  var n = e.BS_PRIVATE_NESTED_SOME_NONE;
@@ -14,20 +18,23 @@ function v(e) {
14
18
  BS_PRIVATE_NESTED_SOME_NONE: n - 1 | 0
15
19
  };
16
20
  }
17
- function ye(e) {
21
+ function Oe(e, n) {
22
+ return e !== void 0 ? l(e) : n;
23
+ }
24
+ function ke(e) {
18
25
  return e !== void 0;
19
26
  }
20
- var z = {
27
+ var K = {
21
28
  contents: 0
22
29
  };
23
- function W() {
24
- return z.contents = z.contents + 1 | 0, z.contents;
30
+ function U() {
31
+ return K.contents = K.contents + 1 | 0, K.contents;
25
32
  }
26
- var Z = (function(e, n) {
33
+ var ue = (function(e, n) {
27
34
  for (var r in e)
28
35
  n(r);
29
36
  });
30
- function L(e, n) {
37
+ function q(e, n) {
31
38
  if (e === n)
32
39
  return !0;
33
40
  var r = typeof e;
@@ -60,7 +67,7 @@ function L(e, n) {
60
67
  var c = f;
61
68
  if (c === o)
62
69
  return !0;
63
- if (!L(e[c], n[c]))
70
+ if (!q(e[c], n[c]))
64
71
  return !1;
65
72
  f = c + 1 | 0;
66
73
  }
@@ -69,28 +76,28 @@ function L(e, n) {
69
76
  return !(e > n || e < n);
70
77
  var d = {
71
78
  contents: !0
72
- }, S = function(h) {
73
- if (!Object.prototype.hasOwnProperty.call(n, h)) {
79
+ }, v = function($) {
80
+ if (!Object.prototype.hasOwnProperty.call(n, $)) {
74
81
  d.contents = !1;
75
82
  return;
76
83
  }
77
- }, T = function(h) {
78
- if (!Object.prototype.hasOwnProperty.call(e, h) || !L(n[h], e[h])) {
84
+ }, S = function($) {
85
+ if (!Object.prototype.hasOwnProperty.call(e, $) || !q(n[$], e[$])) {
79
86
  d.contents = !1;
80
87
  return;
81
88
  }
82
89
  };
83
- return Z(e, S), d.contents && Z(n, T), d.contents;
90
+ return ue(e, v), d.contents && ue(n, S), d.contents;
84
91
  }
85
92
  else
86
93
  return !1;
87
94
  }
88
- function ee(e, n, r) {
95
+ function ae(e, n, r) {
89
96
  for (var t = new Array(r), u = 0, a = n; u < r; )
90
97
  t[u] = e[a], u = u + 1 | 0, a = a + 1 | 0;
91
98
  return t;
92
99
  }
93
- function te(e, n) {
100
+ function ce(e, n) {
94
101
  for (; ; ) {
95
102
  var r = n, t = e, u = t.length, a = u === 0 ? 1 : u, o = r.length, i = a - o | 0;
96
103
  if (i === 0)
@@ -98,13 +105,13 @@ function te(e, n) {
98
105
  if (i >= 0)
99
106
  return /* @__PURE__ */ (function(f, c) {
100
107
  return function(d) {
101
- return te(f, c.concat([d]));
108
+ return ce(f, c.concat([d]));
102
109
  };
103
110
  })(t, r);
104
- n = ee(r, a, -i | 0), e = t.apply(null, ee(r, 0, a));
111
+ n = ae(r, a, -i | 0), e = t.apply(null, ae(r, 0, a));
105
112
  }
106
113
  }
107
- function be(e, n) {
114
+ function Ie(e, n) {
108
115
  var r = e.length;
109
116
  if (r === 1)
110
117
  return e(n);
@@ -136,13 +143,13 @@ function be(e, n) {
136
143
  return e(n, t, u, a, o, i, f);
137
144
  };
138
145
  default:
139
- return te(e, [n]);
146
+ return ce(e, [n]);
140
147
  }
141
148
  }
142
- function Te(e) {
149
+ function Me(e) {
143
150
  var n = e.length;
144
151
  return n === 1 ? e : function(r) {
145
- return be(e, r);
152
+ return Ie(e, r);
146
153
  };
147
154
  }
148
155
  function O(e) {
@@ -158,7 +165,7 @@ function _(e, n, r, t) {
158
165
  r: t
159
166
  };
160
167
  }
161
- function Ae(e, n) {
168
+ function Ne(e, n) {
162
169
  return {
163
170
  k: e,
164
171
  v: n,
@@ -167,7 +174,7 @@ function Ae(e, n) {
167
174
  r: void 0
168
175
  };
169
176
  }
170
- function Ce(e, n) {
177
+ function we(e, n) {
171
178
  return e.v === n ? e : {
172
179
  k: e.k,
173
180
  v: n,
@@ -193,31 +200,31 @@ function k(e, n, r, t) {
193
200
  var f = t.l, c = t.r;
194
201
  return O(c) >= O(f) ? _(_(e, n, r, f), t.k, t.v, c) : _(_(e, n, r, f.l), f.k, f.v, _(f.r, t.k, t.v, c));
195
202
  }
196
- function ue(e, n, r) {
203
+ function de(e, n, r) {
197
204
  var t = e.l;
198
- return t !== void 0 ? k(ue(t, n, r), e.k, e.v, e.r) : (n.contents = e.k, r.contents = e.v, e.r);
205
+ return t !== void 0 ? k(de(t, n, r), e.k, e.v, e.r) : (n.contents = e.k, r.contents = e.v, e.r);
199
206
  }
200
- function je(e, n) {
207
+ function Pe(e, n) {
201
208
  for (; ; ) {
202
209
  var r = e;
203
210
  if (r === void 0)
204
211
  return;
205
212
  var t = r.k;
206
213
  if (n === t)
207
- return $e(r.v);
214
+ return fe(r.v);
208
215
  e = n < t ? r.l : r.r;
209
216
  }
210
217
  }
211
218
  function A(e, n, r) {
212
219
  if (e === void 0)
213
- return Ae(n, r);
220
+ return Ne(n, r);
214
221
  var t = e.k;
215
222
  if (n === t)
216
- return Ce(e, r);
223
+ return we(e, r);
217
224
  var u = e.v;
218
225
  return n < t ? k(A(e.l, n, r), t, u, e.r) : k(e.l, t, u, A(e.r, n, r));
219
226
  }
220
- function x(e, n) {
227
+ function W(e, n) {
221
228
  var r = e.k, t = e.l, u = e.r;
222
229
  if (n === r) {
223
230
  if (t === void 0)
@@ -228,28 +235,28 @@ function x(e, n) {
228
235
  contents: u.k
229
236
  }, o = {
230
237
  contents: u.v
231
- }, i = ue(u, a, o);
238
+ }, i = de(u, a, o);
232
239
  return k(t, a.contents, o.contents, i);
233
240
  }
234
241
  if (n < r) {
235
242
  if (t === void 0)
236
243
  return e;
237
- var f = x(t, n);
244
+ var f = W(t, n);
238
245
  return f === t ? e : k(f, r, e.v, u);
239
246
  }
240
247
  if (u === void 0)
241
248
  return e;
242
- var c = x(u, n);
249
+ var c = W(u, n);
243
250
  return k(t, r, e.v, c);
244
251
  }
245
- function Oe(e, n) {
252
+ function Ge(e, n) {
246
253
  if (e !== void 0)
247
- return x(e, n);
254
+ return W(e, n);
248
255
  }
249
- var C = je;
250
- function ne(e) {
256
+ var C = Pe;
257
+ function ie(e) {
251
258
  if (e !== void 0)
252
- return v(e);
259
+ return l(e);
253
260
  throw {
254
261
  RE_EXN_ID: "Not_found",
255
262
  Error: new Error()
@@ -264,7 +271,7 @@ function m(e, n, r) {
264
271
  r
265
272
  };
266
273
  }
267
- function ke(e) {
274
+ function Re(e) {
268
275
  return {
269
276
  v: e,
270
277
  h: 1,
@@ -272,14 +279,14 @@ function ke(e) {
272
279
  r: void 0
273
280
  };
274
281
  }
275
- function re(e, n) {
282
+ function oe(e, n) {
276
283
  return n !== void 0 ? e !== void 0 ? e.h >= n.h : !1 : !0;
277
284
  }
278
285
  function I(e, n, r) {
279
286
  var t = e !== void 0 ? e.h : 0, u = r !== void 0 ? r.h : 0;
280
287
  if (t > (u + 2 | 0)) {
281
288
  var a = e.l, o = e.r;
282
- return re(a, o) ? m(a, e.v, m(o, n, r)) : m(m(a, e.v, o.l), o.v, m(o.r, n, r));
289
+ return oe(a, o) ? m(a, e.v, m(o, n, r)) : m(m(a, e.v, o.l), o.v, m(o.r, n, r));
283
290
  }
284
291
  if (u <= (t + 2 | 0))
285
292
  return {
@@ -289,24 +296,24 @@ function I(e, n, r) {
289
296
  r
290
297
  };
291
298
  var i = r.l, f = r.r;
292
- return re(f, i) ? m(m(e, n, i), r.v, f) : m(m(e, n, i.l), i.v, m(i.r, r.v, f));
299
+ return oe(f, i) ? m(m(e, n, i), r.v, f) : m(m(e, n, i.l), i.v, m(i.r, r.v, f));
293
300
  }
294
- function ae(e, n) {
301
+ function ve(e, n) {
295
302
  var r = e.l;
296
- return r !== void 0 ? I(ae(r, n), e.v, e.r) : (n.contents = e.v, e.r);
303
+ return r !== void 0 ? I(ve(r, n), e.v, e.r) : (n.contents = e.v, e.r);
297
304
  }
298
- function ie(e, n) {
305
+ function se(e, n) {
299
306
  for (; ; ) {
300
307
  var r = e;
301
308
  if (r === void 0)
302
309
  return;
303
- ie(r.l, n), n(r.v), e = r.r;
310
+ se(r.l, n), n(r.v), e = r.r;
304
311
  }
305
312
  }
306
- function Ie(e, n) {
307
- ie(e, Te(n));
313
+ function De(e, n) {
314
+ se(e, Me(n));
308
315
  }
309
- function Me(e, n) {
316
+ function Xe(e, n) {
310
317
  for (; ; ) {
311
318
  var r = e;
312
319
  if (r === void 0)
@@ -317,21 +324,21 @@ function Me(e, n) {
317
324
  e = n < t ? r.l : r.r;
318
325
  }
319
326
  }
320
- function G(e, n) {
327
+ function R(e, n) {
321
328
  if (e === void 0)
322
- return ke(n);
329
+ return Re(n);
323
330
  var r = e.v;
324
331
  if (n === r)
325
332
  return e;
326
333
  var t = e.l, u = e.r;
327
334
  if (n < r) {
328
- var a = G(t, n);
335
+ var a = R(t, n);
329
336
  return a === t ? e : I(a, r, u);
330
337
  }
331
- var o = G(u, n);
338
+ var o = R(u, n);
332
339
  return o === u ? e : I(t, r, o);
333
340
  }
334
- function K(e, n) {
341
+ function H(e, n) {
335
342
  if (e === void 0)
336
343
  return e;
337
344
  var r = e.v, t = e.l, u = e.r;
@@ -342,113 +349,114 @@ function K(e, n) {
342
349
  return t;
343
350
  var a = {
344
351
  contents: u.v
345
- }, o = ae(u, a);
352
+ }, o = ve(u, a);
346
353
  return I(t, a.contents, o);
347
354
  }
348
355
  if (n < r) {
349
- var i = K(t, n);
356
+ var i = H(t, n);
350
357
  return i === t ? e : I(i, r, u);
351
358
  }
352
- var f = K(u, n);
359
+ var f = H(u, n);
353
360
  return f === u ? e : I(t, r, f);
354
361
  }
355
- var Ne = Me, B = Ie, E = {
362
+ var Ve = Xe, F = De, E = {
356
363
  contents: void 0
357
364
  }, p = {
358
365
  contents: void 0
359
- }, we = {
366
+ }, Be = {
360
367
  contents: void 0
361
368
  }, s = {
362
369
  contents: void 0
363
- }, $ = {
370
+ }, y = {
364
371
  contents: void 0
365
- }, w = {
372
+ }, P = {
366
373
  contents: !1
367
374
  };
368
- function F(e) {
375
+ function x(e) {
369
376
  var n = C(p.contents, e);
370
377
  if (n === void 0) {
371
378
  p.contents = A(p.contents, e, void 0);
372
379
  return;
373
380
  }
374
381
  }
375
- function oe(e, n) {
376
- F(n);
377
- var r = ne(C(E.contents, e));
378
- if (L(s.contents, e) && Ne(r.deps, n) === !1) {
379
- r.deps = G(r.deps, n);
380
- var t = ne(C(p.contents, n));
381
- p.contents = A(p.contents, n, G(t, e));
382
+ function le(e, n) {
383
+ x(n);
384
+ var r = ie(C(E.contents, e));
385
+ if (q(s.contents, e) && Ve(r.deps, n) === !1) {
386
+ r.deps = R(r.deps, n);
387
+ var t = ie(C(p.contents, n));
388
+ p.contents = A(p.contents, n, R(t, e));
382
389
  }
383
390
  }
384
- function R(e) {
385
- B(e.deps, (function(n) {
391
+ function D(e) {
392
+ F(e.deps, (function(n) {
386
393
  var r = C(p.contents, n);
387
394
  if (r !== void 0) {
388
- p.contents = A(p.contents, n, K(v(r), e.id));
395
+ p.contents = A(p.contents, n, H(l(r), e.id));
389
396
  return;
390
397
  }
391
398
  })), e.deps = void 0;
392
399
  }
393
- function H(e) {
394
- if ($.contents = G($.contents, e), w.contents === !1) {
395
- var n = $.contents;
396
- $.contents = void 0, B(n, (function(r) {
400
+ function Q(e) {
401
+ if (y.contents = R(y.contents, e), P.contents === !1) {
402
+ var n = y.contents;
403
+ y.contents = void 0, F(n, (function(r) {
397
404
  var t = C(E.contents, r);
398
405
  if (t !== void 0) {
399
- R(t), s.contents = r, t.run(), s.contents = void 0;
400
- return;
406
+ D(t);
407
+ var u = s.contents;
408
+ s.contents = r, t.run(), s.contents = u;
401
409
  }
402
410
  }));
403
411
  }
404
412
  }
405
- function fe(e) {
406
- F(e);
413
+ function he(e) {
414
+ x(e);
407
415
  var n = C(p.contents, e);
408
416
  if (n !== void 0)
409
- return B(v(n), H);
417
+ return F(l(n), Q);
410
418
  }
411
- function Pe(e) {
419
+ function Fe(e) {
412
420
  var n = s.contents;
413
421
  s.contents = void 0;
414
422
  var r = e();
415
423
  return s.contents = n, r;
416
424
  }
417
- function Ge(e) {
418
- var n = w.contents;
419
- w.contents = !0;
425
+ function xe(e) {
426
+ var n = P.contents;
427
+ P.contents = !0;
420
428
  var r = e();
421
- if (w.contents = n, $.contents !== void 0) {
422
- var t = $.contents;
423
- $.contents = void 0, B(t, (function(u) {
424
- H(u);
429
+ if (P.contents = n, y.contents !== void 0) {
430
+ var t = y.contents;
431
+ y.contents = void 0, F(t, (function(u) {
432
+ Q(u);
425
433
  }));
426
434
  }
427
435
  return r;
428
436
  }
429
- var Re, De, Xe, Ve;
430
- const Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
437
+ var ze, Le, Ke, qe;
438
+ const We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
431
439
  __proto__: null,
432
- Id: Ve,
433
- IntMap: De,
434
- IntSet: Re,
435
- Observer: Xe,
436
- addDep: oe,
437
- batch: Ge,
438
- batching: w,
439
- clearDeps: R,
440
+ Id: qe,
441
+ IntMap: Le,
442
+ IntSet: ze,
443
+ Observer: Ke,
444
+ addDep: le,
445
+ batch: xe,
446
+ batching: P,
447
+ clearDeps: D,
440
448
  currentObserverId: s,
441
- ensureSignalBucket: F,
442
- notify: fe,
449
+ ensureSignalBucket: x,
450
+ notify: he,
443
451
  observers: E,
444
- pending: $,
445
- schedule: H,
452
+ pending: y,
453
+ schedule: Q,
446
454
  signalObservers: p,
447
- signalPeeks: we,
448
- untrack: Pe
455
+ signalPeeks: Be,
456
+ untrack: Fe
449
457
  }, Symbol.toStringTag, { value: "Module" }));
450
458
  function N(e) {
451
- var n = W(), r = {
459
+ var n = U(), r = {
452
460
  id: n,
453
461
  kind: "Effect",
454
462
  run: (function() {
@@ -456,32 +464,34 @@ function N(e) {
456
464
  }),
457
465
  deps: void 0
458
466
  };
459
- E.contents = A(E.contents, n, r), R(r), s.contents = n, r.run(), s.contents = void 0;
460
- var t = function() {
461
- var u = C(E.contents, n);
462
- if (u !== void 0) {
463
- R(u), E.contents = Oe(E.contents, n);
467
+ E.contents = A(E.contents, n, r), D(r);
468
+ var t = s.contents;
469
+ s.contents = n, r.run(), s.contents = t;
470
+ var u = function() {
471
+ var a = C(E.contents, n);
472
+ if (a !== void 0) {
473
+ D(a), E.contents = Ge(E.contents, n);
464
474
  return;
465
475
  }
466
476
  };
467
477
  return {
468
- dispose: t
478
+ dispose: u
469
479
  };
470
480
  }
471
- var Fe, ze, Le, xe, Ke, qe;
472
- const We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
481
+ var He, Je, Ue, Qe, Ye, Ze;
482
+ const en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
473
483
  __proto__: null,
474
- Core: qe,
475
- Id: Le,
476
- IntMap: ze,
477
- IntSet: Fe,
478
- Observer: xe,
479
- Signal: Ke,
484
+ Core: Ze,
485
+ Id: Ue,
486
+ IntMap: Je,
487
+ IntSet: He,
488
+ Observer: Qe,
489
+ Signal: Ye,
480
490
  run: N
481
491
  }, Symbol.toStringTag, { value: "Module" }));
482
- function J(e) {
483
- var n = W();
484
- return F(n), {
492
+ function Y(e) {
493
+ var n = U();
494
+ return x(n), {
485
495
  id: n,
486
496
  value: {
487
497
  contents: e
@@ -491,39 +501,39 @@ function J(e) {
491
501
  }
492
502
  };
493
503
  }
494
- function y(e) {
504
+ function b(e) {
495
505
  var n = s.contents;
496
- return n !== void 0 && oe(n, e.id), e.value.contents;
506
+ return n !== void 0 && le(n, e.id), e.value.contents;
497
507
  }
498
- function V(e) {
508
+ function B(e) {
499
509
  return e.value.contents;
500
510
  }
501
- function b(e, n) {
502
- e.value.contents = n, e.version.contents = e.version.contents + 1 | 0, fe(e.id);
511
+ function T(e, n) {
512
+ e.value.contents = n, e.version.contents = e.version.contents + 1 | 0, he(e.id);
503
513
  }
504
- function He(e, n) {
505
- b(e, n(e.value.contents));
514
+ function nn(e, n) {
515
+ T(e, n(e.value.contents));
506
516
  }
507
- var Je, Ue, Qe, Ye, Ze;
508
- const en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
517
+ var rn, tn, un, an, on;
518
+ const fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
509
519
  __proto__: null,
510
- Core: Ze,
511
- Id: Ye,
512
- IntMap: Ue,
513
- IntSet: Je,
514
- Observer: Qe,
515
- get: y,
516
- make: J,
517
- peek: V,
518
- set: b,
519
- update: He
520
+ Core: on,
521
+ Id: an,
522
+ IntMap: tn,
523
+ IntSet: rn,
524
+ Observer: un,
525
+ get: b,
526
+ make: Y,
527
+ peek: B,
528
+ set: T,
529
+ update: nn
520
530
  }, Symbol.toStringTag, { value: "Module" }));
521
531
  function M(e) {
522
- var n = J(), r = {
532
+ var n = Y(), r = {
523
533
  contents: !1
524
- }, t = W(), u = function() {
525
- var o = e();
526
- return r.contents === !1 && (r.contents = !0), b(n, o);
534
+ }, t = U(), u = function() {
535
+ var i = e();
536
+ return r.contents === !1 && (r.contents = !0), T(n, i);
527
537
  }, a = {
528
538
  id: t,
529
539
  kind: {
@@ -533,20 +543,22 @@ function M(e) {
533
543
  run: u,
534
544
  deps: void 0
535
545
  };
536
- return E.contents = A(E.contents, t, a), R(a), s.contents = t, a.run(), s.contents = void 0, n;
546
+ E.contents = A(E.contents, t, a), D(a);
547
+ var o = s.contents;
548
+ return s.contents = t, a.run(), s.contents = o, n;
537
549
  }
538
- var nn, rn, tn, un, an, on;
539
- const fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
550
+ var cn, dn, vn, sn, ln, hn;
551
+ const pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
540
552
  __proto__: null,
541
- Core: un,
542
- Id: on,
543
- IntMap: rn,
544
- IntSet: nn,
545
- Observer: an,
546
- Signal: tn,
553
+ Core: sn,
554
+ Id: hn,
555
+ IntMap: dn,
556
+ IntSet: cn,
557
+ Observer: ln,
558
+ Signal: vn,
547
559
  make: M
548
560
  }, Symbol.toStringTag, { value: "Module" }));
549
- function D(e, n) {
561
+ function X(e, n) {
550
562
  return [
551
563
  e,
552
564
  {
@@ -555,7 +567,7 @@ function D(e, n) {
555
567
  }
556
568
  ];
557
569
  }
558
- function ce(e, n) {
570
+ function pe(e, n) {
559
571
  return [
560
572
  e,
561
573
  {
@@ -564,7 +576,7 @@ function ce(e, n) {
564
576
  }
565
577
  ];
566
578
  }
567
- function de(e, n) {
579
+ function _e(e, n) {
568
580
  return [
569
581
  e,
570
582
  {
@@ -573,41 +585,41 @@ function de(e, n) {
573
585
  }
574
586
  ];
575
587
  }
576
- function ve(e) {
588
+ function me(e) {
577
589
  return {
578
590
  TAG: "Text",
579
591
  _0: e
580
592
  };
581
593
  }
582
- function cn(e) {
594
+ function _n(e) {
583
595
  var n = M(e);
584
596
  return {
585
597
  TAG: "SignalText",
586
598
  _0: n
587
599
  };
588
600
  }
589
- function U(e) {
601
+ function Z(e) {
590
602
  return {
591
603
  TAG: "Fragment",
592
604
  _0: e
593
605
  };
594
606
  }
595
- function Q(e) {
607
+ function ee(e) {
596
608
  return {
597
609
  TAG: "SignalFragment",
598
610
  _0: e
599
611
  };
600
612
  }
601
- function dn(e, n) {
613
+ function mn(e, n) {
602
614
  var r = M(function() {
603
- return y(e).map(n);
615
+ return b(e).map(n);
604
616
  });
605
617
  return {
606
618
  TAG: "SignalFragment",
607
619
  _0: r
608
620
  };
609
621
  }
610
- function l(e, n, r, t, u) {
622
+ function h(e, n, r, t, u) {
611
623
  var a = n !== void 0 ? n : [].map(function(f) {
612
624
  return f;
613
625
  }), o = r !== void 0 ? r : [].map(function(f) {
@@ -623,198 +635,216 @@ function l(e, n, r, t, u) {
623
635
  children: i
624
636
  };
625
637
  }
626
- function vn(e, n, r, t) {
627
- return l("div", e, n, r);
638
+ function gn(e, n, r, t) {
639
+ return h("div", e, n, r);
640
+ }
641
+ function En(e, n, r, t) {
642
+ return h("span", e, n, r);
628
643
  }
629
- function sn(e, n, r, t) {
630
- return l("span", e, n, r);
644
+ function Sn(e, n, r, t) {
645
+ return h("button", e, n, r);
631
646
  }
632
- function ln(e, n, r, t) {
633
- return l("button", e, n, r);
647
+ function $n(e, n, r) {
648
+ return h("input", e, n, void 0);
634
649
  }
635
- function hn(e, n, r) {
636
- return l("input", e, n, void 0);
650
+ function yn(e, n, r, t) {
651
+ return h("h1", e, n, r);
637
652
  }
638
- function pn(e, n, r, t) {
639
- return l("h1", e, n, r);
653
+ function bn(e, n, r, t) {
654
+ return h("h2", e, n, r);
640
655
  }
641
- function _n(e, n, r, t) {
642
- return l("h2", e, n, r);
656
+ function Tn(e, n, r, t) {
657
+ return h("h3", e, n, r);
643
658
  }
644
- function mn(e, n, r, t) {
645
- return l("h3", e, n, r);
659
+ function An(e, n, r, t) {
660
+ return h("p", e, n, r);
646
661
  }
647
- function gn(e, n, r, t) {
648
- return l("p", e, n, r);
662
+ function Cn(e, n, r, t) {
663
+ return h("ul", e, n, r);
649
664
  }
650
- function En(e, n, r, t) {
651
- return l("ul", e, n, r);
665
+ function jn(e, n, r, t) {
666
+ return h("li", e, n, r);
652
667
  }
653
- function Sn(e, n, r, t) {
654
- return l("li", e, n, r);
668
+ function ge(e, n, r, t) {
669
+ return h("a", e, n, r);
655
670
  }
656
- function se(e, n, r, t) {
657
- return l("a", e, n, r);
671
+ function w(e, n) {
672
+ var r = Oe(je(e.__xote_disposers), []);
673
+ e.__xote_disposers = r.concat([n]);
658
674
  }
659
- function P(e) {
675
+ function ne(e) {
676
+ var n = e.__xote_disposers;
677
+ n != null && (n.forEach(function(t) {
678
+ t.dispose();
679
+ }), e.__xote_disposers = []);
680
+ var r = Array.from(e.childNodes || []);
681
+ r.forEach(ne);
682
+ }
683
+ function G(e) {
660
684
  switch (e.TAG) {
661
685
  case "Element":
662
686
  var n = document.createElement(e.tag);
663
- return e.attrs.forEach(function(i) {
664
- var f = i[1], c = i[0];
665
- switch (f.TAG) {
687
+ return e.attrs.forEach(function(c) {
688
+ var d = c[1], v = c[0];
689
+ switch (d.TAG) {
666
690
  case "Static":
667
- n.setAttribute(c, f._0);
691
+ n.setAttribute(v, d._0);
668
692
  return;
669
693
  case "SignalValue":
670
- var d = f._0;
671
- n.setAttribute(c, V(d)), N(function() {
672
- var h = y(d);
673
- n.setAttribute(c, h);
694
+ var S = d._0;
695
+ n.setAttribute(v, B(S));
696
+ var $ = N(function() {
697
+ var L = b(S);
698
+ n.setAttribute(v, L);
674
699
  });
675
- return;
700
+ return w(n, $);
676
701
  case "Compute":
677
- var S = f._0, T = M(function() {
678
- return S();
702
+ var z = d._0, te = M(function() {
703
+ return z();
679
704
  });
680
- n.setAttribute(c, V(T)), N(function() {
681
- var h = y(T);
682
- n.setAttribute(c, h);
705
+ n.setAttribute(v, B(te));
706
+ var Ce = N(function() {
707
+ var L = b(te);
708
+ n.setAttribute(v, L);
683
709
  });
684
- return;
710
+ return w(n, Ce);
685
711
  }
686
- }), e.events.forEach(function(i) {
687
- n.addEventListener(i[0], i[1]);
688
- }), e.children.forEach(function(i) {
689
- var f = P(i);
690
- n.appendChild(f);
712
+ }), e.events.forEach(function(c) {
713
+ n.addEventListener(c[0], c[1]);
714
+ }), e.children.forEach(function(c) {
715
+ var d = G(c);
716
+ n.appendChild(d);
691
717
  }), n;
692
718
  case "Text":
693
719
  return document.createTextNode(e._0);
694
720
  case "SignalText":
695
- var r = e._0, t = document.createTextNode(V(r));
696
- return N(function() {
697
- var i = y(r);
698
- t.textContent = i;
699
- }), t;
721
+ var r = e._0, t = document.createTextNode(B(r)), u = N(function() {
722
+ var c = b(r);
723
+ t.textContent = c;
724
+ });
725
+ return w(t, u), t;
700
726
  case "Fragment":
701
- var u = document.createDocumentFragment();
702
- return e._0.forEach(function(i) {
703
- var f = P(i);
704
- u.appendChild(f);
705
- }), u;
727
+ var a = document.createDocumentFragment();
728
+ return e._0.forEach(function(c) {
729
+ var d = G(c);
730
+ a.appendChild(d);
731
+ }), a;
706
732
  case "SignalFragment":
707
- var a = e._0, o = document.createElement("div");
708
- return o.setAttribute("data-signal-fragment", "true"), o.setAttribute("style", "display: contents"), N(function() {
709
- var i = y(a);
710
- o.innerHTML = "", i.forEach(function(f) {
711
- var c = P(f);
712
- o.appendChild(c);
733
+ var o = e._0, i = document.createElement("div");
734
+ i.setAttribute("data-signal-fragment", "true"), i.setAttribute("style", "display: contents");
735
+ var f = N(function() {
736
+ var c = b(o), d = Array.from(i.childNodes || []);
737
+ d.forEach(ne), i.innerHTML = "", c.forEach(function(v) {
738
+ var S = G(v);
739
+ i.appendChild(S);
713
740
  });
714
- }), o;
741
+ });
742
+ return w(i, f), i;
715
743
  }
716
744
  }
717
- function le(e, n) {
718
- var r = P(e);
745
+ function Ee(e, n) {
746
+ var r = G(e);
719
747
  n.appendChild(r);
720
748
  }
721
- function $n(e, n) {
749
+ function On(e, n) {
722
750
  var r = document.getElementById(n);
723
751
  if (r == null) {
724
752
  console.error("Container element not found: " + n);
725
753
  return;
726
754
  } else
727
- return le(e, r);
755
+ return Ee(e, r);
728
756
  }
729
- var yn, bn, Tn, An;
730
- const Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
757
+ var kn, In, Mn, Nn;
758
+ const wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
731
759
  __proto__: null,
732
- Computed: An,
733
- Core: Tn,
734
- Effect: bn,
735
- Signal: yn,
736
- a: se,
737
- attr: D,
738
- button: ln,
739
- computedAttr: de,
740
- div: vn,
741
- element: l,
742
- fragment: U,
743
- h1: pn,
744
- h2: _n,
745
- h3: mn,
746
- input: hn,
747
- li: Sn,
748
- list: dn,
749
- mount: le,
750
- mountById: $n,
751
- p: gn,
752
- render: P,
753
- signalAttr: ce,
754
- signalFragment: Q,
755
- span: sn,
756
- text: ve,
757
- textSignal: cn,
758
- ul: En
760
+ Computed: Nn,
761
+ Core: Mn,
762
+ Effect: In,
763
+ Signal: kn,
764
+ a: ge,
765
+ addDisposer: w,
766
+ attr: X,
767
+ button: Sn,
768
+ computedAttr: _e,
769
+ disposeElement: ne,
770
+ div: gn,
771
+ element: h,
772
+ fragment: Z,
773
+ h1: yn,
774
+ h2: bn,
775
+ h3: Tn,
776
+ input: $n,
777
+ li: jn,
778
+ list: mn,
779
+ mount: Ee,
780
+ mountById: On,
781
+ p: An,
782
+ render: G,
783
+ signalAttr: pe,
784
+ signalFragment: ee,
785
+ span: En,
786
+ text: me,
787
+ textSignal: _n,
788
+ ul: Cn
759
789
  }, Symbol.toStringTag, { value: "Module" }));
760
- function jn(e, n) {
790
+ function Pn(e, n) {
761
791
  return e(n);
762
792
  }
763
- function On(e, n) {
793
+ function Gn(e, n) {
764
794
  return e(n);
765
795
  }
766
- function kn(e, n, r, t) {
796
+ function Rn(e, n, r, t) {
767
797
  return e(n);
768
798
  }
769
- function In(e, n, r, t) {
799
+ function Dn(e, n, r, t) {
770
800
  return e(n);
771
801
  }
772
- function Mn(e) {
802
+ function Xn(e) {
773
803
  var n = e.children;
774
- return n !== void 0 ? n : U([]);
804
+ return n !== void 0 ? n : Z([]);
775
805
  }
776
- function Nn(e) {
777
- return U(e);
806
+ function Vn(e) {
807
+ return Z(e);
778
808
  }
779
- function wn() {
780
- return ve("");
809
+ function Bn() {
810
+ return me("");
781
811
  }
782
- function Pn(e) {
812
+ function Fn(e) {
783
813
  return e;
784
814
  }
785
- function Gn(e) {
815
+ function xn(e) {
786
816
  return e;
787
817
  }
788
818
  function g(e, n) {
789
- return typeof n == "function" ? de(e, n) : typeof n == "object" && ye(n.id) ? ce(e, n) : D(e, n);
819
+ return typeof n == "function" ? _e(e, n) : typeof n == "object" && ke(n.id) ? pe(e, n) : X(e, n);
790
820
  }
791
- function he(e) {
821
+ function Se(e) {
792
822
  var n = [], r = e.id;
793
- r !== void 0 && n.push(g("id", v(r)));
823
+ r !== void 0 && n.push(g("id", l(r)));
794
824
  var t = e.class;
795
- t !== void 0 && n.push(g("class", v(t)));
825
+ t !== void 0 && n.push(g("class", l(t)));
796
826
  var u = e.style;
797
- u !== void 0 && n.push(g("style", v(u)));
827
+ u !== void 0 && n.push(g("style", l(u)));
798
828
  var a = e.type;
799
- a !== void 0 && n.push(g("type", v(a)));
829
+ a !== void 0 && n.push(g("type", l(a)));
800
830
  var o = e.value;
801
- o !== void 0 && n.push(g("value", v(o)));
831
+ o !== void 0 && n.push(g("value", l(o)));
802
832
  var i = e.placeholder;
803
- i !== void 0 && n.push(g("placeholder", v(i)));
833
+ i !== void 0 && n.push(g("placeholder", l(i)));
804
834
  var f = e.disabled;
805
- f !== void 0 && f && n.push(D("disabled", "true"));
835
+ f !== void 0 && f && n.push(X("disabled", "true"));
806
836
  var c = e.checked;
807
- c !== void 0 && c && n.push(D("checked", "true"));
837
+ c !== void 0 && c && n.push(X("checked", "true"));
808
838
  var d = e.href;
809
- d !== void 0 && n.push(g("href", v(d)));
810
- var S = e.target;
811
- S !== void 0 && n.push(g("target", v(S)));
812
- var T = e.data;
813
- return T !== void 0 && Object.entries(T).forEach(([h, Se]) => {
814
- n.push(g("data-" + h, Se));
839
+ d !== void 0 && n.push(g("href", l(d)));
840
+ var v = e.target;
841
+ v !== void 0 && n.push(g("target", l(v)));
842
+ var S = e.data;
843
+ return S !== void 0 && Object.entries(S).forEach(([$, z]) => {
844
+ n.push(g("data-" + $, z));
815
845
  }), n;
816
846
  }
817
- function pe(e) {
847
+ function $e(e) {
818
848
  var n = [], r = e.onClick;
819
849
  r !== void 0 && n.push([
820
850
  "click",
@@ -860,70 +890,70 @@ function pe(e) {
860
890
  "mouseenter",
861
891
  d
862
892
  ]);
863
- var S = e.onMouseLeave;
864
- return S !== void 0 && n.push([
893
+ var v = e.onMouseLeave;
894
+ return v !== void 0 && n.push([
865
895
  "mouseleave",
866
- S
896
+ v
867
897
  ]), n;
868
898
  }
869
- function _e(e) {
899
+ function ye(e) {
870
900
  var n = e.children;
871
901
  return n !== void 0 ? n.TAG === "Fragment" ? n._0 : [n] : [];
872
902
  }
873
- function X(e, n) {
903
+ function V(e, n) {
874
904
  return {
875
905
  TAG: "Element",
876
906
  tag: e,
877
- attrs: he(n),
878
- events: pe(n),
879
- children: _e(n)
907
+ attrs: Se(n),
908
+ events: $e(n),
909
+ children: ye(n)
880
910
  };
881
911
  }
882
- function Rn(e, n) {
883
- return X(e, n);
912
+ function zn(e, n) {
913
+ return V(e, n);
884
914
  }
885
- function Dn(e, n) {
886
- return X(e, n);
915
+ function Ln(e, n) {
916
+ return V(e, n);
887
917
  }
888
- function Xn(e, n, r, t) {
889
- return X(e, n);
918
+ function Kn(e, n, r, t) {
919
+ return V(e, n);
890
920
  }
891
- function Vn(e, n, r, t) {
892
- return X(e, n);
921
+ function qn(e, n, r, t) {
922
+ return V(e, n);
893
923
  }
894
- var Bn = {
895
- signal: Pn,
896
- computed: Gn,
924
+ var Wn = {
925
+ signal: Fn,
926
+ computed: xn,
897
927
  convertAttrValue: g,
898
- propsToAttrs: he,
899
- propsToEvents: pe,
900
- getChildren: _e,
901
- createElement: X,
902
- jsx: Rn,
903
- jsxs: Dn,
904
- jsxKeyed: Xn,
905
- jsxsKeyed: Vn
906
- }, Fn;
907
- const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
928
+ propsToAttrs: Se,
929
+ propsToEvents: $e,
930
+ getChildren: ye,
931
+ createElement: V,
932
+ jsx: zn,
933
+ jsxs: Ln,
934
+ jsxKeyed: Kn,
935
+ jsxsKeyed: qn
936
+ }, Hn;
937
+ const Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
908
938
  __proto__: null,
909
- $$null: wn,
910
- Component: Fn,
911
- Elements: Bn,
912
- array: Nn,
913
- jsx: jn,
914
- jsxFragment: Mn,
915
- jsxKeyed: kn,
916
- jsxs: On,
917
- jsxsKeyed: In
939
+ $$null: Bn,
940
+ Component: Hn,
941
+ Elements: Wn,
942
+ array: Vn,
943
+ jsx: Pn,
944
+ jsxFragment: Xn,
945
+ jsxKeyed: Rn,
946
+ jsxs: Gn,
947
+ jsxsKeyed: Dn
918
948
  }, Symbol.toStringTag, { value: "Module" }));
919
- function Ln(e, n) {
949
+ function Un(e, n) {
920
950
  for (var r = e.length, t = new Array(r), u = 0, a = 0; a < r; ++a) {
921
951
  var o = e[a], i = n(o);
922
- i !== void 0 && (t[u] = v(i), u = u + 1 | 0);
952
+ i !== void 0 && (t[u] = l(i), u = u + 1 | 0);
923
953
  }
924
954
  return t.length = u, t;
925
955
  }
926
- function xn(e, n) {
956
+ function Qn(e, n) {
927
957
  for (var r = 0; ; ) {
928
958
  var t = r;
929
959
  if (t === e.length)
@@ -934,8 +964,8 @@ function xn(e, n) {
934
964
  r = t + 1 | 0;
935
965
  }
936
966
  }
937
- function me(e) {
938
- return Ln(e.split("/"), (function(n) {
967
+ function be(e) {
968
+ return Un(e.split("/"), (function(n) {
939
969
  if (n !== "")
940
970
  return n.startsWith(":") ? {
941
971
  TAG: "Param",
@@ -946,7 +976,7 @@ function me(e) {
946
976
  };
947
977
  }));
948
978
  }
949
- function ge(e, n) {
979
+ function Te(e, n) {
950
980
  var r = n.split("/").filter(function(a) {
951
981
  return a !== "";
952
982
  });
@@ -961,100 +991,100 @@ function ge(e, n) {
961
991
  _0: t
962
992
  } : "NoMatch";
963
993
  }
964
- function Y(e, n) {
965
- return ge(me(e), n);
994
+ function re(e, n) {
995
+ return Te(be(e), n);
966
996
  }
967
- const Kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
997
+ const Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
968
998
  __proto__: null,
969
- match: Y,
970
- matchPath: ge,
971
- parsePattern: me
999
+ match: re,
1000
+ matchPath: Te,
1001
+ parsePattern: be
972
1002
  }, Symbol.toStringTag, { value: "Module" }));
973
- var j = J({
1003
+ var j = Y({
974
1004
  pathname: "/",
975
1005
  search: "",
976
1006
  hash: ""
977
1007
  });
978
- function q() {
1008
+ function J() {
979
1009
  return {
980
1010
  pathname: window.location.pathname,
981
1011
  search: window.location.search,
982
1012
  hash: window.location.hash
983
1013
  };
984
1014
  }
985
- function qn() {
986
- b(j, q());
1015
+ function Zn() {
1016
+ T(j, J());
987
1017
  var e = function(n) {
988
- b(j, q());
1018
+ T(j, J());
989
1019
  };
990
1020
  window.addEventListener("popstate", e);
991
1021
  }
992
- function Ee(e, n, r, t) {
1022
+ function Ae(e, n, r, t) {
993
1023
  var u = n !== void 0 ? n : "", a = r !== void 0 ? r : "", o = {
994
1024
  pathname: e,
995
1025
  search: u,
996
1026
  hash: a
997
1027
  }, i = e + u + a, f = {};
998
- window.history.pushState(f, "", i), b(j, o);
1028
+ window.history.pushState(f, "", i), T(j, o);
999
1029
  }
1000
- function Wn(e, n, r, t) {
1030
+ function er(e, n, r, t) {
1001
1031
  var u = n !== void 0 ? n : "", a = r !== void 0 ? r : "", o = {
1002
1032
  pathname: e,
1003
1033
  search: u,
1004
1034
  hash: a
1005
1035
  }, i = e + u + a, f = {};
1006
- window.history.replaceState(f, "", i), b(j, o);
1036
+ window.history.replaceState(f, "", i), T(j, o);
1007
1037
  }
1008
- function Hn(e, n) {
1009
- return Q(M(function() {
1010
- var r = y(j), t = Y(e, r.pathname);
1038
+ function nr(e, n) {
1039
+ return ee(M(function() {
1040
+ var r = b(j), t = re(e, r.pathname);
1011
1041
  return typeof t != "object" ? [] : [n(t._0)];
1012
1042
  }));
1013
1043
  }
1014
- function Jn(e) {
1015
- return Q(M(function() {
1016
- var n = y(j), r = xn(e, (function(t) {
1017
- var u = Y(t.pattern, n.pathname);
1044
+ function rr(e) {
1045
+ return ee(M(function() {
1046
+ var n = b(j), r = Qn(e, (function(t) {
1047
+ var u = re(t.pattern, n.pathname);
1018
1048
  if (typeof u == "object")
1019
1049
  return t.render(u._0);
1020
1050
  }));
1021
1051
  return r !== void 0 ? [r] : [];
1022
1052
  }));
1023
1053
  }
1024
- function Un(e, n, r, t) {
1054
+ function tr(e, n, r, t) {
1025
1055
  var u = n !== void 0 ? n : [], a = r !== void 0 ? r : [], o = function(i) {
1026
- i.preventDefault(), Ee(e, void 0, void 0);
1056
+ i.preventDefault(), Ae(e, void 0, void 0);
1027
1057
  };
1028
- return se(u.concat([D("href", e)]), [[
1058
+ return ge(u.concat([X("href", e)]), [[
1029
1059
  "click",
1030
1060
  o
1031
1061
  ]], a);
1032
1062
  }
1033
- var Qn, Yn, Zn, er, nr;
1034
- const rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1063
+ var ur, ar, ir, or, fr;
1064
+ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1035
1065
  __proto__: null,
1036
1066
  $$location: j,
1037
- Component: Zn,
1038
- Computed: Yn,
1039
- Core: nr,
1040
- Route: er,
1041
- Signal: Qn,
1042
- getCurrentLocation: q,
1043
- init: qn,
1044
- link: Un,
1045
- push: Ee,
1046
- replace: Wn,
1047
- route: Hn,
1048
- routes: Jn
1067
+ Component: ir,
1068
+ Computed: ar,
1069
+ Core: fr,
1070
+ Route: or,
1071
+ Signal: ur,
1072
+ getCurrentLocation: J,
1073
+ init: Zn,
1074
+ link: tr,
1075
+ push: Ae,
1076
+ replace: er,
1077
+ route: nr,
1078
+ routes: rr
1049
1079
  }, Symbol.toStringTag, { value: "Module" }));
1050
- var tr = Cn, ur = fn, ar = Be, ir = We, or = zn, fr = Kn, cr = rr, dr = en;
1080
+ var dr = wn, vr = pn, sr = We, lr = en, hr = Jn, pr = Yn, _r = cr, mr = fn;
1051
1081
  export {
1052
- tr as Component,
1053
- ur as Computed,
1054
- ar as Core,
1055
- ir as Effect,
1056
- or as JSX,
1057
- fr as Route,
1058
- cr as Router,
1059
- dr as Signal
1082
+ dr as Component,
1083
+ vr as Computed,
1084
+ sr as Core,
1085
+ lr as Effect,
1086
+ hr as JSX,
1087
+ pr as Route,
1088
+ _r as Router,
1089
+ mr as Signal
1060
1090
  };