xote 1.2.0 → 1.3.0

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