@manyducks.co/dolla 2.0.0-alpha.35 → 2.0.0-alpha.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
- var Ue = Object.defineProperty;
2
- var me = (n) => {
1
+ var Ee = Object.defineProperty;
2
+ var te = (n) => {
3
3
  throw TypeError(n);
4
4
  };
5
- var Ge = (n, e, t) => e in n ? Ue(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
6
- var l = (n, e, t) => Ge(n, typeof e != "symbol" ? e + "" : e, t), _e = (n, e, t) => e.has(n) || me("Cannot " + t);
7
- var T = (n, e, t) => (_e(n, e, "read from private field"), t ? t.call(n) : e.get(n)), L = (n, e, t) => e.has(n) ? me("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), I = (n, e, t, s) => (_e(n, e, "write to private field"), s ? s.call(n, t) : e.set(n, t), t);
8
- var D = /* @__PURE__ */ ((n) => (n[n.Computed = 1] = "Computed", n[n.Effect = 2] = "Effect", n[n.Tracking = 4] = "Tracking", n[n.Notified = 8] = "Notified", n[n.Recursed = 16] = "Recursed", n[n.Dirty = 32] = "Dirty", n[n.PendingComputed = 64] = "PendingComputed", n[n.PendingEffect = 128] = "PendingEffect", n[n.Propagated = 224] = "Propagated", n))(D || {});
9
- function ze({
5
+ var Se = (n, e, t) => e in n ? Ee(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
6
+ var l = (n, e, t) => Se(n, typeof e != "symbol" ? e + "" : e, t), ne = (n, e, t) => e.has(n) || te("Cannot " + t);
7
+ var T = (n, e, t) => (ne(n, e, "read from private field"), t ? t.call(n) : e.get(n)), I = (n, e, t) => e.has(n) ? te("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), $ = (n, e, t, s) => (ne(n, e, "write to private field"), s ? s.call(n, t) : e.set(n, t), t);
8
+ var S = /* @__PURE__ */ ((n) => (n[n.Computed = 1] = "Computed", n[n.Effect = 2] = "Effect", n[n.Tracking = 4] = "Tracking", n[n.Notified = 8] = "Notified", n[n.Recursed = 16] = "Recursed", n[n.Dirty = 32] = "Dirty", n[n.PendingComputed = 64] = "PendingComputed", n[n.PendingEffect = 128] = "PendingEffect", n[n.Propagated = 224] = "Propagated", n))(S || {});
9
+ function Ne({
10
10
  updateComputed: n,
11
11
  notifyEffect: e
12
12
  }) {
@@ -44,23 +44,23 @@ function ze({
44
44
  propagate(r) {
45
45
  let u = 32, f = r, h = 0;
46
46
  e: do {
47
- const d = r.sub, m = d.flags;
48
- if (!(m & 244) && (d.flags = m | u | 8, !0) || m & 16 && !(m & 4) && (d.flags = m & -17 | u | 8, !0) || !(m & 224) && a(r, d) && (d.flags = m | 16 | u | 8, d.subs !== void 0)) {
49
- const _ = d.subs;
50
- if (_ !== void 0) {
51
- _.nextSub !== void 0 ? (_.prevSub = f, r = f = _, u = 64, ++h) : (r = _, u = m & 2 ? 128 : 64);
47
+ const d = r.sub, p = d.flags;
48
+ if (!(p & 244) && (d.flags = p | u | 8, !0) || p & 16 && !(p & 4) && (d.flags = p & -17 | u | 8, !0) || !(p & 224) && a(r, d) && (d.flags = p | 16 | u | 8, d.subs !== void 0)) {
49
+ const x = d.subs;
50
+ if (x !== void 0) {
51
+ x.nextSub !== void 0 ? (x.prevSub = f, r = f = x, u = 64, ++h) : (r = x, u = p & 2 ? 128 : 64);
52
52
  continue;
53
53
  }
54
- m & 2 && (s !== void 0 ? s.depsTail.nextDep = d.deps : t = d, s = d);
55
- } else m & (4 | u) ? !(m & u) && m & 224 && a(r, d) && (d.flags = m | u) : (d.flags = m | u | 8, (m & 10) === 2 && (s !== void 0 ? s.depsTail.nextDep = d.deps : t = d, s = d));
54
+ p & 2 && (s !== void 0 ? s.depsTail.nextDep = d.deps : t = d, s = d);
55
+ } else p & (4 | u) ? !(p & u) && p & 224 && a(r, d) && (d.flags = p | u) : (d.flags = p | u | 8, (p & 10) === 2 && (s !== void 0 ? s.depsTail.nextDep = d.deps : t = d, s = d));
56
56
  if ((r = f.nextSub) !== void 0) {
57
57
  f = r, u = h ? 64 : 32;
58
58
  continue;
59
59
  }
60
60
  for (; h; ) {
61
61
  --h;
62
- const g = f.dep.subs;
63
- if (f = g.prevSub, g.prevSub = void 0, (r = f.nextSub) !== void 0) {
62
+ const ee = f.dep.subs;
63
+ if (f = ee.prevSub, ee.prevSub = void 0, (r = f.nextSub) !== void 0) {
64
64
  f = r, u = h ? 64 : 32;
65
65
  continue e;
66
66
  }
@@ -91,8 +91,8 @@ function ze({
91
91
  const u = r.depsTail;
92
92
  if (u !== void 0) {
93
93
  const f = u.nextDep;
94
- f !== void 0 && (p(f), u.nextDep = void 0);
95
- } else r.deps !== void 0 && (p(r.deps), r.deps = void 0);
94
+ f !== void 0 && (m(f), u.nextDep = void 0);
95
+ } else r.deps !== void 0 && (m(r.deps), r.deps = void 0);
96
96
  r.flags &= -5;
97
97
  },
98
98
  /**
@@ -170,8 +170,8 @@ function ze({
170
170
  if (h === void 0 ? u.deps = d : h.nextDep = d, r.subs === void 0)
171
171
  r.subs = d;
172
172
  else {
173
- const m = r.subsTail;
174
- d.prevSub = m, m.nextSub = d;
173
+ const p = r.subsTail;
174
+ d.prevSub = p, p.nextSub = d;
175
175
  }
176
176
  return u.depsTail = d, r.subsTail = d, d;
177
177
  }
@@ -184,12 +184,12 @@ function ze({
184
184
  const d = h.flags;
185
185
  if ((d & 33) === 33) {
186
186
  if (n(h)) {
187
- const m = h.subs;
188
- m.nextSub !== void 0 && c(m), f = !0;
187
+ const p = h.subs;
188
+ p.nextSub !== void 0 && c(p), f = !0;
189
189
  }
190
190
  } else if ((d & 65) === 65) {
191
- const m = h.subs;
192
- m.nextSub !== void 0 && (m.prevSub = r), r = h.deps, ++u;
191
+ const p = h.subs;
192
+ p.nextSub !== void 0 && (p.prevSub = r), r = h.deps, ++u;
193
193
  continue;
194
194
  }
195
195
  }
@@ -201,24 +201,24 @@ function ze({
201
201
  let d = r.sub;
202
202
  do {
203
203
  --u;
204
- const m = d.subs;
204
+ const p = d.subs;
205
205
  if (f) {
206
206
  if (n(d)) {
207
- (r = m.prevSub) !== void 0 ? (m.prevSub = void 0, c(d.subs), d = r.sub) : d = m.sub;
207
+ (r = p.prevSub) !== void 0 ? (p.prevSub = void 0, c(d.subs), d = r.sub) : d = p.sub;
208
208
  continue;
209
209
  }
210
210
  } else
211
211
  d.flags &= -65;
212
- if ((r = m.prevSub) !== void 0) {
213
- if (m.prevSub = void 0, r.nextDep !== void 0) {
212
+ if ((r = p.prevSub) !== void 0) {
213
+ if (p.prevSub = void 0, r.nextDep !== void 0) {
214
214
  r = r.nextDep;
215
215
  continue e;
216
216
  }
217
217
  d = r.sub;
218
218
  } else {
219
- if ((r = m.nextDep) !== void 0)
219
+ if ((r = p.nextDep) !== void 0)
220
220
  continue e;
221
- d = m.sub;
221
+ d = p.sub;
222
222
  }
223
223
  f = !1;
224
224
  } while (u);
@@ -246,15 +246,15 @@ function ze({
246
246
  }
247
247
  return !1;
248
248
  }
249
- function p(r) {
249
+ function m(r) {
250
250
  do {
251
251
  const u = r.dep, f = r.nextDep, h = r.nextSub, d = r.prevSub;
252
252
  if (h !== void 0 ? h.prevSub = d : u.subsTail = d, d !== void 0 ? d.nextSub = h : u.subs = h, u.subs === void 0 && "deps" in u) {
253
- const m = u.flags;
254
- m & 32 || (u.flags = m | 32);
255
- const _ = u.deps;
256
- if (_ !== void 0) {
257
- r = _, u.depsTail.nextDep = f, u.deps = void 0, u.depsTail = void 0;
253
+ const p = u.flags;
254
+ p & 32 || (u.flags = p | 32);
255
+ const x = u.deps;
256
+ if (x !== void 0) {
257
+ r = x, u.depsTail.nextDep = f, u.deps = void 0, u.depsTail = void 0;
258
258
  continue;
259
259
  }
260
260
  }
@@ -262,7 +262,7 @@ function ze({
262
262
  } while (r !== void 0);
263
263
  }
264
264
  }
265
- function q(n) {
265
+ function C(n) {
266
266
  const e = typeof n;
267
267
  switch (e) {
268
268
  case "undefined":
@@ -277,127 +277,120 @@ function q(n) {
277
277
  return e;
278
278
  }
279
279
  }
280
- function $(n) {
280
+ function P(n) {
281
281
  return Array.isArray(n);
282
282
  }
283
- function De(...n) {
284
- const e = n[0], t = (s) => $(s) && s.every((i) => e(i));
285
- return n.length < 2 ? t : t(n[1]);
283
+ function F(n, e) {
284
+ return P(e) && e.every((t) => n(t));
286
285
  }
287
- function Tt(...n) {
288
- const e = n[0], t = P(n[2]) ? n[2] : "Expected an array of valid items. Got type: %t, value: %v", s = (i) => {
289
- if ($(i) && i.every((o) => e(o)))
290
- return !0;
291
- throw new TypeError(K(i, t));
292
- };
293
- return n.length < 2 ? s : s(n[1]);
286
+ function tt(n, e, t) {
287
+ if (F(n, e))
288
+ return !0;
289
+ throw new TypeError(R(e, t));
294
290
  }
295
- function P(n) {
291
+ function D(n) {
296
292
  return typeof n == "string";
297
293
  }
298
- function Nt(n, e) {
299
- if (P(n))
294
+ function nt(n, e) {
295
+ if (D(n))
300
296
  return !0;
301
- throw new TypeError(K(n, e ?? "Expected a string. Got type: %t, value: %v"));
297
+ throw new TypeError(R(n, e ?? "Expected a string. Got type: %t, value: %v"));
302
298
  }
303
- function A(n) {
304
- return typeof n == "function" && !Be(n);
299
+ function E(n) {
300
+ return C(n) === "function";
305
301
  }
306
- function Fe(n) {
302
+ function Te(n) {
307
303
  return typeof n == "number" && !isNaN(n);
308
304
  }
309
- function Be(n) {
310
- return typeof n == "function" && /^\s*class\s+/.test(n.toString());
311
- }
312
- function At(...n) {
313
- const e = n[0], t = P(n[2]) ? n[2] : `Expected instance of ${e.name}. Got type: %t, value: %v`, s = (i) => {
305
+ function st(...n) {
306
+ const e = n[0], t = D(n[2]) ? n[2] : `Expected instance of ${e.name}. Got type: %t, value: %v`, s = (i) => {
314
307
  if (i instanceof e)
315
308
  return !0;
316
- throw new TypeError(K(i, t));
309
+ throw new TypeError(R(i, t));
317
310
  };
318
311
  return n.length < 2 ? s : s(n[1]);
319
312
  }
320
- function te(n) {
321
- return n != null && typeof n == "object" && !$(n);
313
+ function W(n) {
314
+ return n != null && typeof n == "object" && !P(n);
322
315
  }
323
- function Dt(n, e) {
324
- if (te(n))
316
+ function it(n, e) {
317
+ if (W(n))
325
318
  return !0;
326
- throw new TypeError(K(n, e));
319
+ throw new TypeError(R(n, e));
327
320
  }
328
- function K(n, e) {
321
+ function R(n, e) {
329
322
  var i;
330
- const t = q(n), s = ((i = n == null ? void 0 : n.toString) == null ? void 0 : i.call(n)) || String(n);
323
+ const t = C(n), s = ((i = n == null ? void 0 : n.toString) == null ? void 0 : i.call(n)) || String(n);
331
324
  return e.replaceAll("%t", t).replaceAll("%v", s);
332
325
  }
333
- const ne = Symbol.for("DollaReactive"), se = Symbol("dependency"), {
334
- link: ke,
335
- propagate: He,
336
- updateDirtyFlag: We,
337
- startTracking: ie,
338
- endTracking: re,
339
- processEffectNotifications: Ke,
340
- processComputedUpdate: Ze,
341
- processPendingInnerEffects: Xe
342
- } = ze({
326
+ const K = Symbol.for("DollaReactive"), Z = Symbol("dependency"), {
327
+ link: pe,
328
+ propagate: Le,
329
+ updateDirtyFlag: ke,
330
+ startTracking: H,
331
+ endTracking: X,
332
+ processEffectNotifications: Ce,
333
+ processComputedUpdate: De,
334
+ processPendingInnerEffects: Ae
335
+ } = Ne({
343
336
  updateComputed(n) {
344
- const e = M;
345
- M = n, ie(n);
337
+ const e = w;
338
+ w = n, H(n);
346
339
  try {
347
340
  const t = n.currentValue, s = n.getter(t);
348
341
  return n.equals(t, s) ? !1 : (n.currentValue = s, !0);
349
342
  } finally {
350
- M = e, re(n);
343
+ w = e, X(n);
351
344
  }
352
345
  },
353
346
  notifyEffect(n) {
354
347
  const e = n.flags;
355
- return e & D.Dirty || e & D.PendingComputed && We(n, e) ? Oe(n) : Xe(n, n.flags), !0;
348
+ return e & S.Dirty || e & S.PendingComputed && ke(n, e) ? me(n) : Ae(n, n.flags), !0;
356
349
  }
357
350
  });
358
- let M;
359
- const j = [];
360
- let X = !1;
361
- function Ye() {
362
- X || (X = !0, queueMicrotask(() => {
363
- X = !1;
364
- for (let n = 0; n < j.length; n++) {
365
- const e = j[n], t = M;
366
- M = e, ie(e);
351
+ let w;
352
+ const k = [];
353
+ let U = !1;
354
+ function Oe() {
355
+ U || (U = !0, queueMicrotask(() => {
356
+ U = !1;
357
+ for (let n = 0; n < k.length; n++) {
358
+ const e = k[n], t = w;
359
+ w = e, H(e);
367
360
  try {
368
361
  e.fn();
369
362
  } finally {
370
- M = t, re(e);
363
+ w = t, X(e);
371
364
  }
372
365
  }
373
- j.length = 0;
366
+ k.length = 0;
374
367
  }));
375
368
  }
376
- function Oe(n) {
377
- j.push(n), Ye();
369
+ function me(n) {
370
+ k.push(n), Oe();
378
371
  }
379
- function Je() {
380
- ie(this), re(this), queueMicrotask(() => {
381
- j.splice(j.indexOf(this), 1);
372
+ function Pe() {
373
+ H(this), X(this), queueMicrotask(() => {
374
+ k.splice(k.indexOf(this), 1);
382
375
  });
383
376
  }
384
- var N, R;
385
- class Qe {
377
+ var M, A;
378
+ class Ie {
386
379
  constructor(e, t) {
387
- L(this, N);
388
- L(this, R);
380
+ I(this, M);
381
+ I(this, A);
389
382
  /**
390
383
  * A label for debugging purposes.
391
384
  */
392
385
  l(this, "name");
393
- I(this, N, e), I(this, R, (t == null ? void 0 : t.equals) ?? Object.is), t != null && t.name && (this.name = t.name), Object.defineProperties(this, {
394
- [ne]: {
386
+ $(this, M, e), $(this, A, (t == null ? void 0 : t.equals) ?? Object.is), t != null && t.name && (this.name = t.name), Object.defineProperties(this, {
387
+ [K]: {
395
388
  value: !0,
396
389
  configurable: !1,
397
390
  enumerable: !1,
398
391
  writable: !1
399
392
  },
400
- [se]: {
393
+ [Z]: {
401
394
  value: e,
402
395
  configurable: !1,
403
396
  enumerable: !1,
@@ -406,29 +399,29 @@ class Qe {
406
399
  });
407
400
  }
408
401
  get value() {
409
- return T(this, N).currentValue;
402
+ return T(this, M).currentValue;
410
403
  }
411
404
  set value(e) {
412
- if (!T(this, R).call(this, T(this, N).currentValue, e)) {
413
- T(this, N).currentValue = e;
414
- const t = T(this, N).subs;
415
- t !== void 0 && (He(t), Ke());
405
+ if (!T(this, A).call(this, T(this, M).currentValue, e)) {
406
+ T(this, M).currentValue = e;
407
+ const t = T(this, M).subs;
408
+ t !== void 0 && (Le(t), Ce());
416
409
  }
417
410
  }
418
411
  }
419
- N = new WeakMap(), R = new WeakMap();
420
- var V;
421
- class et {
412
+ M = new WeakMap(), A = new WeakMap();
413
+ var O;
414
+ class $e {
422
415
  constructor(e) {
423
- L(this, V);
424
- I(this, V, e), Object.defineProperties(this, {
425
- [ne]: {
416
+ I(this, O);
417
+ $(this, O, e), Object.defineProperties(this, {
418
+ [K]: {
426
419
  value: !0,
427
420
  configurable: !1,
428
421
  enumerable: !1,
429
422
  writable: !1
430
423
  },
431
- [se]: {
424
+ [Z]: {
432
425
  value: e,
433
426
  configurable: !1,
434
427
  enumerable: !1,
@@ -437,123 +430,70 @@ class et {
437
430
  });
438
431
  }
439
432
  get value() {
440
- const e = T(this, V), t = e.flags;
441
- return t & (D.Dirty | D.PendingComputed) && Ze(e, t), e.currentValue;
433
+ const e = T(this, O), t = e.flags;
434
+ return t & (S.Dirty | S.PendingComputed) && De(e, t), e.currentValue;
442
435
  }
443
436
  }
444
- V = new WeakMap();
445
- function w(n) {
446
- return n != null && n[ne] === !0;
437
+ O = new WeakMap();
438
+ function g(n) {
439
+ return n != null && n[K] === !0;
447
440
  }
448
- function Q(n, e) {
449
- return new Qe({ currentValue: n, subs: void 0, subsTail: void 0 }, e);
441
+ function G(n, e) {
442
+ return new Ie({ currentValue: n, subs: void 0, subsTail: void 0 }, e);
450
443
  }
451
- function oe(n, e) {
452
- return new et({
444
+ function Y(n, e) {
445
+ return new $e({
453
446
  currentValue: void 0,
454
447
  equals: (e == null ? void 0 : e.equals) ?? Object.is,
455
448
  subs: void 0,
456
449
  subsTail: void 0,
457
450
  deps: void 0,
458
451
  depsTail: void 0,
459
- flags: D.Computed | D.Dirty,
452
+ flags: S.Computed | S.Dirty,
460
453
  getter: (t) => {
461
454
  let s = n(t);
462
- return s = S(s), s;
455
+ return s = b(s), s;
463
456
  }
464
457
  });
465
458
  }
466
- function tt(n, e) {
467
- if (A(e))
459
+ function je(n, e) {
460
+ if (E(e))
468
461
  n.value = e(n.value);
469
462
  else if (arguments.length > 1)
470
463
  n.value = e;
471
464
  else
472
- return (t) => tt(n, t);
465
+ return (t) => je(n, t);
473
466
  }
474
- function S(n) {
475
- if (w(n)) {
476
- if (M !== void 0) {
477
- const e = n[se];
478
- ke(e, M);
467
+ function b(n) {
468
+ if (g(n)) {
469
+ if (w !== void 0) {
470
+ const e = n[Z];
471
+ pe(e, w);
479
472
  }
480
473
  return n.value;
481
474
  } else
482
475
  return n;
483
476
  }
484
- function kt(n) {
485
- return w(n) ? n.value : n;
477
+ function rt(n) {
478
+ return g(n) ? n.value : n;
486
479
  }
487
- function b(n) {
480
+ function y(n) {
488
481
  const e = {
489
482
  fn: n,
490
483
  subs: void 0,
491
484
  subsTail: void 0,
492
485
  deps: void 0,
493
486
  depsTail: void 0,
494
- flags: D.Effect
487
+ flags: S.Effect
495
488
  };
496
- return M !== void 0 && ke(e, M), Oe(e), Je.bind(e);
489
+ return w !== void 0 && pe(e, w), me(e), Pe.bind(e);
497
490
  }
498
- function Pe(n) {
491
+ function qe(n) {
499
492
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
500
493
  }
501
- var z = { exports: {} }, ge;
502
- function nt() {
503
- return ge || (ge = 1, function(n, e) {
504
- Object.defineProperty(e, "__esModule", { value: !0 });
505
- var t = /* @__PURE__ */ function() {
506
- function p(r, u) {
507
- var f = [], h = !0, d = !1, m = void 0;
508
- try {
509
- for (var _, g = r[Symbol.iterator](); !(h = (_ = g.next()).done) && (f.push(_.value), !(u && f.length === u)); h = !0) ;
510
- } catch (y) {
511
- d = !0, m = y;
512
- } finally {
513
- try {
514
- !h && g.return && g.return();
515
- } finally {
516
- if (d) throw m;
517
- }
518
- }
519
- return f;
520
- }
521
- return function(r, u) {
522
- if (Array.isArray(r)) return r;
523
- if (Symbol.iterator in Object(r)) return p(r, u);
524
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
525
- };
526
- }(), s = function(p) {
527
- return p.reduce(function(r, u) {
528
- return 16 > u ? r + "0" + u.toString(16) : r + u.toString(16);
529
- }, "#");
530
- }, i = function(p, r, u) {
531
- var f = 0.5 > u ? u * (1 + r) : u + r - u * r, h = 2 * u - f, d = function(y, C, x) {
532
- var Z = Math.round, v = 0 > x ? x + 1 : 1 < x ? x - 1 : x;
533
- return v = v < 1 / 6 ? y + 6 * (C - y) * v : v < 1 / 2 ? C : v < 2 / 3 ? y + 6 * (C - y) * (2 / 3 - v) : y, Z(255 * v);
534
- }, m = d(h, f, p + 1 / 3), _ = d(h, f, p), g = d(h, f, p - 1 / 3);
535
- return [m, _, g];
536
- }, o = function(p, r, u, f) {
537
- var h = p % 1007 / 1007, d = function(y, C, x) {
538
- return y * (x - C) + C;
539
- }, m = d(h, r.min, r.max), _ = d(h, u.min, u.max), g = d(h, f.max, f.min);
540
- return [m, _, g];
541
- }, c = function(p) {
542
- return p.split("").reduce(function(r, u, f) {
543
- return r * u.charCodeAt(0) * f + 1;
544
- }, 1);
545
- }, a = function(p) {
546
- var r = p.str, u = p.hue, f = u === void 0 ? { min: 0, max: 360 } : u, h = p.sat, d = h === void 0 ? { min: 0.35, max: 0.65 } : h, m = p.light, _ = m === void 0 ? { min: 0.3, max: 0.7 } : m, g = p.hashFunction, y = g === void 0 ? c : g, C = p.scheme, x = C === void 0 ? "hex" : C, Z = o(y(r), f, d, _), v = t(Z, 3), ae = v[0], de = v[1], he = v[2], pe = i(ae / 360, de, he), Ve = s(pe);
547
- return x === "hsl" ? [ae, de, he] : x === "rgb" ? pe : Ve;
548
- };
549
- e.default = a, n.exports = e.default;
550
- }(z, z.exports)), z.exports;
551
- }
552
- var st = nt();
553
- const it = /* @__PURE__ */ Pe(st);
554
- var Y, we;
555
- function rt() {
556
- return we || (we = 1, Y = function n(e, t) {
494
+ var z, se;
495
+ function _e() {
496
+ return se || (se = 1, z = function n(e, t) {
557
497
  if (e === t) return !0;
558
498
  if (e && t && typeof e == "object" && typeof t == "object") {
559
499
  if (e.constructor !== t.constructor) return !1;
@@ -597,22 +537,22 @@ function rt() {
597
537
  return !0;
598
538
  }
599
539
  return e !== e && t !== t;
600
- }), Y;
540
+ }), z;
601
541
  }
602
- var ot = rt();
603
- const ut = /* @__PURE__ */ Pe(ot), Ot = () => {
542
+ var Ve = _e();
543
+ const Re = /* @__PURE__ */ qe(Ve), ot = () => {
604
544
  };
605
- let J = 1;
606
- function ue() {
607
- return J = J % Number.MAX_SAFE_INTEGER + 1, J.toString(36) + Date.now().toString(36);
545
+ let B = 1;
546
+ function ge() {
547
+ return B = B % Number.MAX_SAFE_INTEGER + 1, B.toString(36) + Date.now().toString(36);
608
548
  }
609
- function Pt(n, e) {
549
+ function ut(n, e) {
610
550
  return Object.is(n, e);
611
551
  }
612
- function Lt(n, e) {
552
+ function ft(n, e) {
613
553
  if (Object.is(n, e)) return !0;
614
- const t = q(n);
615
- if (t !== q(e))
554
+ const t = C(n);
555
+ if (t !== C(e))
616
556
  return !1;
617
557
  switch (t) {
618
558
  case "object":
@@ -633,7 +573,7 @@ function Lt(n, e) {
633
573
  if (n[i] !== e[i]) return !1;
634
574
  return !0;
635
575
  case "set":
636
- if (A(n.symmetricDifference))
576
+ if (E(n.symmetricDifference))
637
577
  return n.symmetricDifference(e).size === 0;
638
578
  for (const i of n.keys())
639
579
  if (n[i] !== e.get(i)) return !1;
@@ -641,8 +581,8 @@ function Lt(n, e) {
641
581
  }
642
582
  return !1;
643
583
  }
644
- const It = ut;
645
- function ft(n, e) {
584
+ const ct = Re;
585
+ function Ue(n, e) {
646
586
  const t = (s) => {
647
587
  const i = {};
648
588
  for (const o in s)
@@ -651,14 +591,13 @@ function ft(n, e) {
651
591
  };
652
592
  return e == null ? t : t(e);
653
593
  }
654
- function jt(n) {
655
- return it({
656
- str: n,
657
- sat: { min: 0.35, max: 0.55 },
658
- light: { min: 0.6, max: 0.6 }
659
- });
594
+ function lt(n) {
595
+ let e = 0;
596
+ for (let t = 0; t < n.length; t++)
597
+ e = (e + n.charCodeAt(t) * 10) % 360;
598
+ return `oklch(0.68 0.15 ${e}deg)`;
660
599
  }
661
- function $t(n) {
600
+ function at(n) {
662
601
  if (n instanceof RegExp)
663
602
  return (s) => n.test(s);
664
603
  const e = {
@@ -680,25 +619,25 @@ function $t(n) {
680
619
  return !(o.some((c) => c(s)) || i.length > 0 && !i.some((c) => c(s)));
681
620
  };
682
621
  }
683
- const qt = Symbol.for("DollaRef"), Le = Symbol.for("DollaMarkup"), k = Symbol.for("DollaMarkupElement"), Rt = Symbol.for("DollaRouter");
684
- function Vt(n, e) {
622
+ const ye = Symbol.for("DollaMarkup"), N = Symbol.for("DollaMarkupElement"), dt = Symbol.for("DollaRouter");
623
+ function ht(n, e) {
685
624
  return e.outlet();
686
625
  }
687
- function ct(n) {
688
- for (var e, t, s = arguments, i = 1, o = "", c = "", a = [0], p = function(f) {
626
+ function ze(n) {
627
+ for (var e, t, s = arguments, i = 1, o = "", c = "", a = [0], m = function(f) {
689
628
  i === 1 && (f || (o = o.replace(/^\s*\n\s*|\s*\n\s*$/g, ""))) ? a.push(f ? s[f] : o) : i === 3 && (f || o) ? (a[1] = f ? s[f] : o, i = 2) : i === 2 && o === "..." && f ? a[2] = Object.assign(a[2] || {}, s[f]) : i === 2 && o && !f ? (a[2] = a[2] || {})[o] = !0 : i >= 5 && (i === 5 ? ((a[2] = a[2] || {})[t] = f ? o ? o + s[f] : s[f] : o, i = 6) : (f || o) && (a[2][t] += f ? o + s[f] : o)), o = "";
690
629
  }, r = 0; r < n.length; r++) {
691
- r && (i === 1 && p(), p(r));
692
- for (var u = 0; u < n[r].length; u++) e = n[r][u], i === 1 ? e === "<" ? (p(), a = [a, "", null], i = 3) : o += e : i === 4 ? o === "--" && e === ">" ? (i = 1, o = "") : o = e + o[0] : c ? e === c ? c = "" : o += e : e === '"' || e === "'" ? c = e : e === ">" ? (p(), i = 1) : i && (e === "=" ? (i = 5, t = o, o = "") : e === "/" && (i < 5 || n[r][u + 1] === ">") ? (p(), i === 3 && (a = a[0]), i = a, (a = a[0]).push(this.apply(null, i.slice(1))), i = 0) : e === " " || e === " " || e === `
693
- ` || e === "\r" ? (p(), i = 2) : o += e), i === 3 && o === "!--" && (i = 4, a = a[0]);
630
+ r && (i === 1 && m(), m(r));
631
+ for (var u = 0; u < n[r].length; u++) e = n[r][u], i === 1 ? e === "<" ? (m(), a = [a, "", null], i = 3) : o += e : i === 4 ? o === "--" && e === ">" ? (i = 1, o = "") : o = e + o[0] : c ? e === c ? c = "" : o += e : e === '"' || e === "'" ? c = e : e === ">" ? (m(), i = 1) : i && (e === "=" ? (i = 5, t = o, o = "") : e === "/" && (i < 5 || n[r][u + 1] === ">") ? (m(), i === 3 && (a = a[0]), i = a, (a = a[0]).push(this.apply(null, i.slice(1))), i = 0) : e === " " || e === " " || e === `
632
+ ` || e === "\r" ? (m(), i = 2) : o += e), i === 3 && o === "!--" && (i = 4, a = a[0]);
694
633
  }
695
- return p(), a.length > 2 ? a.slice(1) : a[1];
634
+ return m(), a.length > 2 ? a.slice(1) : a[1];
696
635
  }
697
- var xe;
698
- xe = k;
699
- class be {
636
+ var oe;
637
+ oe = N;
638
+ class ie {
700
639
  constructor(e) {
701
- l(this, xe, !0);
640
+ l(this, oe, !0);
702
641
  l(this, "node");
703
642
  this.node = e;
704
643
  }
@@ -712,11 +651,11 @@ class be {
712
651
  this.node.parentNode && !e && this.node.parentNode.removeChild(this.node);
713
652
  }
714
653
  }
715
- var Se;
716
- Se = k;
717
- class lt {
654
+ var ue;
655
+ ue = N;
656
+ class Be {
718
657
  constructor(e) {
719
- l(this, Se, !0);
658
+ l(this, ue, !0);
720
659
  l(this, "node", document.createTextNode(""));
721
660
  l(this, "children", []);
722
661
  l(this, "elementContext");
@@ -728,13 +667,13 @@ class lt {
728
667
  return this.node.parentNode != null;
729
668
  }
730
669
  mount(e, t) {
731
- this.isMounted || (e.insertBefore(this.node, (t == null ? void 0 : t.nextSibling) ?? null), this.unsubscribe = b(() => {
732
- const s = S(this.source);
733
- if (!Re(s))
670
+ this.isMounted || (e.insertBefore(this.node, (t == null ? void 0 : t.nextSibling) ?? null), this.unsubscribe = y(() => {
671
+ const s = b(this.source);
672
+ if (console.log("dynamic updated", s, this.source), !Me(s))
734
673
  throw console.error(s), new TypeError(
735
- `Dynamic received invalid value to render. Got type: ${q(s)}, value: ${s}`
674
+ `Dynamic received invalid value to render. Got type: ${C(s)}, value: ${s}`
736
675
  );
737
- this.update($(s) ? s : [s]);
676
+ this.update(P(s) ? s : [s]);
738
677
  }));
739
678
  }
740
679
  unmount(e = !1) {
@@ -750,41 +689,44 @@ class lt {
750
689
  var o, c, a;
751
690
  if (this.cleanup(!1), e == null || e.length === 0 || !this.isMounted)
752
691
  return;
753
- const t = e.flatMap((p) => qe(p) ? p : O(this.elementContext, ce(p)));
754
- for (const p of t) {
692
+ const t = e.flatMap((m) => xe(m) ? m : L(this.elementContext, J(m)));
693
+ for (const m of t) {
755
694
  const r = ((o = this.children.at(-1)) == null ? void 0 : o.node) || this.node;
756
- p.mount(this.node.parentNode, r), this.children.push(p);
695
+ m.mount(this.node.parentNode, r), this.children.push(m);
757
696
  }
758
697
  const s = this.node.parentNode, i = ((a = (c = this.children.at(-1)) == null ? void 0 : c.node) == null ? void 0 : a.nextSibling) ?? null;
759
698
  s.insertBefore(this.node, i);
760
699
  }
761
700
  }
762
- const at = (n) => /^on[A-Z]/.test(n);
763
- var Me;
764
- Me = k;
765
- class dt {
701
+ const Ge = (n) => /^on[A-Z]/.test(n);
702
+ var fe;
703
+ fe = N;
704
+ class Fe {
766
705
  constructor({ tag: e, props: t, children: s, elementContext: i }) {
767
- l(this, Me, !0);
706
+ l(this, fe, !0);
768
707
  l(this, "node");
769
708
  l(this, "props");
770
709
  l(this, "childMarkup", []);
771
710
  l(this, "children", []);
772
711
  l(this, "unsubscribers", []);
773
712
  l(this, "elementContext");
774
- l(this, "uniqueId", ue());
713
+ // private uniqueId = getUniqueId();
775
714
  // Track the ref so we can nullify it on unmount.
776
715
  l(this, "ref");
777
716
  // Prevents 'onClickOutside' handlers from firing in the same cycle in which the element is connected.
778
717
  l(this, "canClickAway", !1);
779
- if (i = { ...i }, e.toLowerCase() === "svg" && (i.isSVG = !0), i.isSVG ? this.node = document.createElementNS("http://www.w3.org/2000/svg", e) : this.node = document.createElement(e), t.ref)
780
- if (A(t.ref))
718
+ if (e.toLowerCase() === "svg" && (i = {
719
+ ...i,
720
+ isSVG: !0
721
+ }), i.isSVG ? this.node = document.createElementNS("http://www.w3.org/2000/svg", e) : this.node = document.createElement(e), i.root.getEnv() === "development" && i.viewName && (this.node.dataset.view = i.viewName), t.ref)
722
+ if (E(t.ref))
781
723
  this.ref = t.ref, this.ref(this.node);
782
724
  else
783
725
  throw new Error("Expected ref to be a function. Got: " + t.ref);
784
726
  this.props = {
785
- ...ft(["ref", "class", "className"], t),
727
+ ...Ue(["ref", "class", "className"], t),
786
728
  class: t.className ?? t.class
787
- }, s && (this.childMarkup = s), this.elementContext = i, this.children = O(this.elementContext, this.childMarkup);
729
+ }, s && (this.childMarkup = s), this.elementContext = i, this.children = L(this.elementContext, this.childMarkup);
788
730
  }
789
731
  get isMounted() {
790
732
  return this.node.parentNode != null;
@@ -806,19 +748,17 @@ class dt {
806
748
  unmount(e = !1) {
807
749
  var t;
808
750
  if (this.isMounted) {
751
+ e || (t = this.node.parentNode) == null || t.removeChild(this.node);
809
752
  for (const s of this.children)
810
753
  s.unmount(!0);
811
- e || (t = this.node.parentNode) == null || t.removeChild(this.node), this.ref && this.ref(void 0), this.canClickAway = !1;
754
+ this.ref && this.ref(void 0), this.canClickAway = !1;
812
755
  for (const s of this.unsubscribers)
813
756
  s();
814
757
  this.unsubscribers.length = 0;
815
758
  }
816
759
  }
817
- getUpdateKey(e, t) {
818
- return `${this.uniqueId}:${e}:${t}`;
819
- }
820
760
  attachProp(e, t) {
821
- w(e) ? this.unsubscribers.push(b(() => t(S(e)))) : t(e);
761
+ g(e) ? this.unsubscribers.push(y(() => t(b(e)))) : t(e);
822
762
  }
823
763
  applyProps(e, t) {
824
764
  for (const s in t) {
@@ -831,13 +771,13 @@ class dt {
831
771
  });
832
772
  } else if (s === "onClickOutside" || s === "onclickoutside") {
833
773
  const o = (a) => {
834
- this.canClickAway && !e.contains(a.target) && (w(i) ? i.value(a) : i(a));
774
+ this.canClickAway && !e.contains(a.target) && (g(i) ? i.value(a) : i(a));
835
775
  }, c = { capture: !0 };
836
776
  window.addEventListener("click", o, c), this.unsubscribers.push(() => {
837
777
  window.removeEventListener("click", o, c);
838
778
  });
839
- } else if (at(s)) {
840
- const o = s.slice(2).toLowerCase(), c = w(i) ? (a) => i.value(a) : i;
779
+ } else if (Ge(s)) {
780
+ const o = s.slice(2).toLowerCase(), c = g(i) ? (a) => i.value(a) : i;
841
781
  e.addEventListener(o, c), this.unsubscribers.push(() => {
842
782
  e.removeEventListener(o, c);
843
783
  });
@@ -845,7 +785,7 @@ class dt {
845
785
  this.attachProp(i, (o) => {
846
786
  o == null ? e.removeAttribute(s) : e.setAttribute(s, String(o));
847
787
  });
848
- else if (!ht.includes(s))
788
+ else if (!We.includes(s))
849
789
  if (this.elementContext.isSVG)
850
790
  this.attachProp(i, (o) => {
851
791
  o != null ? e.setAttribute(s, String(t[s])) : e.removeAttribute(s);
@@ -897,19 +837,19 @@ class dt {
897
837
  }
898
838
  applyStyles(e, t, s) {
899
839
  const i = [];
900
- if (w(t)) {
840
+ if (g(t)) {
901
841
  let o;
902
- const c = b(() => {
903
- A(o) && o(), e.style.cssText = "", o = this.applyStyles(e, S(t), s);
842
+ const c = y(() => {
843
+ E(o) && o(), e.style.cssText = "", o = this.applyStyles(e, b(t), s);
904
844
  });
905
845
  s.push(c), i.push(c);
906
846
  } else {
907
- const o = je(t);
847
+ const o = we(t);
908
848
  for (const c in o) {
909
- const { value: a, priority: p } = o[c];
910
- if (w(a)) {
911
- const r = b(() => {
912
- S(a) ? e.style.setProperty(c, String(a.value), p) : e.style.removeProperty(c);
849
+ const { value: a, priority: m } = o[c];
850
+ if (g(a)) {
851
+ const r = y(() => {
852
+ b(a) ? e.style.setProperty(c, String(a.value), m) : e.style.removeProperty(c);
913
853
  });
914
854
  s.push(r), i.push(r);
915
855
  } else a != null && e.style.setProperty(c, String(a));
@@ -922,21 +862,21 @@ class dt {
922
862
  }
923
863
  applyClasses(e, t, s) {
924
864
  const i = [];
925
- if (w(t)) {
865
+ if (g(t)) {
926
866
  let o;
927
- const c = b(() => {
928
- A(o) && o(), e.removeAttribute("class"), o = this.applyClasses(e, S(t), s);
867
+ const c = y(() => {
868
+ E(o) && o(), e.removeAttribute("class"), o = this.applyClasses(e, b(t), s);
929
869
  });
930
870
  s.push(c), i.push(c);
931
871
  } else {
932
- const o = Ie(t);
872
+ const o = be(t);
933
873
  for (const c in o) {
934
874
  const a = o[c];
935
- if (w(a)) {
936
- const p = b(() => {
937
- S(a) ? e.classList.add(c) : e.classList.remove(c);
875
+ if (g(a)) {
876
+ const m = y(() => {
877
+ b(a) ? e.classList.add(c) : e.classList.remove(c);
938
878
  });
939
- s.push(p), i.push(p);
879
+ s.push(m), i.push(m);
940
880
  } else a && e.classList.add(c);
941
881
  }
942
882
  }
@@ -946,183 +886,90 @@ class dt {
946
886
  };
947
887
  }
948
888
  }
949
- function Ie(n) {
889
+ function be(n) {
950
890
  let e = {};
951
- if (P(n)) {
891
+ if (D(n)) {
952
892
  const t = n.split(" ");
953
893
  for (const s of t)
954
894
  e[s] = !0;
955
- } else te(n) ? Object.assign(e, n) : Array.isArray(n) && Array.from(n).filter(Boolean).forEach((t) => {
956
- Object.assign(e, Ie(t));
895
+ } else W(n) ? Object.assign(e, n) : Array.isArray(n) && Array.from(n).filter(Boolean).forEach((t) => {
896
+ Object.assign(e, be(t));
957
897
  });
958
898
  return delete e.undefined, e;
959
899
  }
960
- function je(n) {
900
+ function we(n) {
961
901
  let e = {};
962
- if (P(n)) {
902
+ if (D(n)) {
963
903
  const t = n.split(";").filter((s) => s.trim() !== "");
964
904
  for (const s of t) {
965
905
  const [i, o] = s.split(":"), c = {
966
906
  value: o
967
907
  };
968
- o.includes("!important") ? (c.priority = "important", c.value = o.replace("!important", "").trim()) : c.value = o.trim(), e[ye(i.trim())] = c;
908
+ o.includes("!important") ? (c.priority = "important", c.value = o.replace("!important", "").trim()) : c.value = o.trim(), e[re(i.trim())] = c;
969
909
  }
970
910
  }
971
- if (te(n))
911
+ if (W(n))
972
912
  for (const t in n)
973
- t.startsWith("--") ? e[t] = { value: n[t] } : e[ye(t)] = { value: n[t] };
913
+ t.startsWith("--") ? e[t] = { value: n[t] } : e[re(t)] = { value: n[t] };
974
914
  else Array.isArray(n) && Array.from(n).filter((t) => t != null).forEach((t) => {
975
- Object.assign(e, je(t));
915
+ Object.assign(e, we(t));
976
916
  });
977
917
  return e;
978
918
  }
979
- function ye(n) {
919
+ function re(n) {
980
920
  return n.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (e, t) => (t ? "-" : "") + e.toLowerCase());
981
921
  }
982
- const ht = ["ref", "children", "class", "style", "data"];
983
- var pt = Object.defineProperty, mt = (n, e, t) => e in n ? pt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, ve = (n, e, t) => mt(n, typeof e != "symbol" ? e + "" : e, t);
984
- class ee {
985
- constructor() {
986
- ve(this, "_l", /* @__PURE__ */ new Map()), ve(this, "_a", (e) => {
987
- if (typeof e != "string" && !(e instanceof Symbol))
988
- throw new TypeError("Emitter: eventName should be a string or symbol");
989
- });
990
- }
991
- emit(e, ...t) {
992
- let s = this.listeners(e);
993
- for (const i of s)
994
- try {
995
- i(...t);
996
- } catch (o) {
997
- let c = this._l.get("error");
998
- if (c != null && c.length)
999
- for (const a of c)
1000
- a(o, e, i, ...t);
1001
- else throw o;
1002
- }
1003
- return e != "*" && this.emit("*", e, ...t) || s.length > 0;
1004
- }
1005
- on(e, t) {
1006
- return this.listeners(e).push(t), this;
1007
- }
1008
- off(e, t) {
1009
- const s = this.listeners(e);
1010
- return s.splice(s.indexOf(t), 1), this;
1011
- }
1012
- once(e, t) {
1013
- return this.on(e, (...s) => {
1014
- t(...s), this.off(e, t);
1015
- });
1016
- }
1017
- clear() {
1018
- this._l.clear();
1019
- }
1020
- listeners(e) {
1021
- return this._l.get(e) ?? (this._a(e), this._l.set(e, []).get(e));
1022
- }
1023
- events() {
1024
- return [...this._l.entries()].filter(([, e]) => e.length).map(([e]) => e);
1025
- }
1026
- }
1027
- var U, G;
1028
- class fe {
922
+ const We = ["ref", "children", "class", "style", "data"];
923
+ let Ke = class {
1029
924
  constructor(e) {
1030
- L(this, U);
1031
- L(this, G, !1);
1032
- I(this, U, e);
1033
- }
1034
- get type() {
1035
- return T(this, U);
1036
- }
1037
- get isStopped() {
1038
- return T(this, G);
1039
- }
1040
- stop() {
1041
- I(this, G, !0);
1042
- }
1043
- get [Symbol.toStringTag]() {
1044
- return "ContextEvent";
1045
- }
1046
- }
1047
- U = new WeakMap(), G = new WeakMap();
1048
- let _t = class {
1049
- constructor(e) {
1050
- l(this, "__store");
1051
- this.__store = e;
1052
- const t = Object.getOwnPropertyDescriptors(this.__store._logger);
925
+ l(this, "store");
926
+ this.store = e;
927
+ const t = Object.getOwnPropertyDescriptors(this.store.logger);
1053
928
  for (const s in t)
1054
929
  s !== "setName" && Object.defineProperty(this, s, t[s]);
1055
930
  }
1056
931
  get isMounted() {
1057
- return this.__store.isMounted;
932
+ return this.store.isMounted;
1058
933
  }
1059
934
  get name() {
1060
- return this.__store._name;
935
+ return this.store.name || this.store.id;
1061
936
  }
1062
937
  set name(e) {
1063
- this.__store._name = e, this.__store._logger.setName(e);
1064
- }
1065
- on(e, t) {
1066
- if (e === "*") {
1067
- const s = (i, o, ...c) => {
1068
- t(o, ...c);
1069
- };
1070
- this.__store._elementContext.emitter.on(e, s), this.__store._wildcardListeners.set(t, s);
1071
- } else
1072
- this.__store._elementContext.emitter.on(e, t);
1073
- }
1074
- off(e, t) {
1075
- if (e === "*") {
1076
- const s = this.__store._wildcardListeners.get(t);
1077
- s && (this.__store._elementContext.emitter.off(e, s), this.__store._wildcardListeners.delete(t));
1078
- } else
1079
- this.__store._elementContext.emitter.off(e, t);
1080
- }
1081
- once(e, t) {
1082
- if (e === "*") {
1083
- const s = (i, o, ...c) => {
1084
- this.__store._wildcardListeners.delete(t), t(o, ...c);
1085
- };
1086
- this.__store._elementContext.emitter.once(e, s), this.__store._wildcardListeners.set(t, s);
1087
- } else
1088
- this.__store._elementContext.emitter.once(e, t);
1089
- }
1090
- emit(e, ...t) {
1091
- return this.__store._elementContext.emitter.emit(e, new fe(e), ...t);
938
+ this.store.name = e, this.store.logger.setName(e);
1092
939
  }
1093
940
  get(e) {
1094
- if (A(e)) {
1095
- let t = this.__store._elementContext, s;
941
+ if (E(e)) {
942
+ let t = this.store.elementContext, s;
1096
943
  for (; s = t.stores.get(e), s == null && t.parent != null; )
1097
944
  t = t.parent;
1098
945
  if (s == null)
1099
- throw new B(`Store '${e.name}' is not provided on this context.`);
946
+ throw new q(`Store '${e.name}' is not provided on this context.`);
1100
947
  return s.value;
1101
948
  } else
1102
- throw new B("Invalid store.");
949
+ throw new q("Invalid store.");
1103
950
  }
1104
951
  onMount(e) {
1105
- this.__store._emitter.on("mounted", e);
952
+ this.store.lifecycleListeners.mount.push(e);
1106
953
  }
1107
954
  onUnmount(e) {
1108
- this.__store._emitter.on("unmounted", e);
955
+ this.store.lifecycleListeners.unmount.push(e);
1109
956
  }
1110
957
  effect(e) {
1111
- const t = this.__store;
958
+ const t = this.store;
1112
959
  if (t.isMounted) {
1113
- const s = b(e);
1114
- return t._unsubscribes.push(s), s;
960
+ const s = y(e);
961
+ return t.lifecycleListeners.unmount.push(s), s;
1115
962
  } else {
1116
963
  let s, i = !1;
1117
- return t._emitter.on("mounted", () => {
1118
- i || (s = b(e), t._unsubscribes.push(s));
964
+ return t.lifecycleListeners.mount.push(() => {
965
+ i || (s = y(e), t.lifecycleListeners.unmount.push(s));
1119
966
  }), () => {
1120
967
  s != null && (i = !0, s());
1121
968
  };
1122
969
  }
1123
970
  }
1124
971
  };
1125
- class gt {
972
+ class Ze {
1126
973
  constructor(e, t) {
1127
974
  l(this, "fn");
1128
975
  l(this, "_options");
@@ -1131,17 +978,12 @@ class gt {
1131
978
  */
1132
979
  l(this, "value");
1133
980
  l(this, "isMounted", !1);
1134
- l(this, "_elementContext");
1135
- l(this, "_emitter", new ee());
1136
- l(this, "_wildcardListeners", /* @__PURE__ */ new Map());
1137
- l(this, "_logger");
1138
- l(this, "_unsubscribes", []);
1139
- l(this, "_name");
1140
- l(this, "_id", ue());
1141
- this.fn = e, this._name = e.name, this._options = t;
1142
- }
1143
- get name() {
1144
- return this._name || this._id;
981
+ l(this, "elementContext");
982
+ l(this, "lifecycleListeners", { mount: [], unmount: [] });
983
+ l(this, "logger");
984
+ l(this, "id", ge());
985
+ l(this, "name");
986
+ this.fn = e, this.name = e.name, this._options = t;
1145
987
  }
1146
988
  /**
1147
989
  * Attaches this Store to the elementContext.
@@ -1150,222 +992,190 @@ class gt {
1150
992
  attach(e) {
1151
993
  if (e.stores.has(this.fn))
1152
994
  return !1;
1153
- this._elementContext = e, this._logger = e.root.createLogger(this._name), this._emitter.on("error", (s, i, ...o) => {
1154
- this._logger.error({ error: s, eventName: i, args: o }), this._logger.crash(s);
1155
- });
1156
- const t = new _t(this);
995
+ this.elementContext = e, this.logger = e.root.createLogger(this.name);
996
+ const t = new Ke(this);
1157
997
  try {
1158
998
  this.value = this.fn.call(t, this._options, t);
1159
999
  } catch (s) {
1160
- throw this._logger.crash(s), s;
1000
+ throw this.logger.crash(s), s;
1161
1001
  }
1162
1002
  return e.stores.set(this.fn, this), !0;
1163
1003
  }
1164
1004
  handleMount() {
1165
- this.isMounted = !0, this._emitter.emit("mounted");
1005
+ this.isMounted = !0;
1006
+ for (const e of this.lifecycleListeners.mount)
1007
+ e();
1008
+ this.lifecycleListeners.mount.length = 0;
1166
1009
  }
1167
1010
  handleUnmount() {
1168
- this.isMounted = !1, this._emitter.emit("unmounted"), this._emitter.clear();
1169
- for (const e of this._unsubscribes)
1011
+ this.isMounted = !1;
1012
+ for (const e of this.lifecycleListeners.unmount)
1170
1013
  e();
1171
- this._unsubscribes.length = 0;
1014
+ this.lifecycleListeners.unmount.length = 0;
1172
1015
  }
1173
1016
  }
1174
- class B extends Error {
1017
+ class q extends Error {
1175
1018
  }
1176
- class wt {
1019
+ class He {
1177
1020
  constructor(e) {
1178
- l(this, "__view");
1179
- l(this, "list", Mt);
1180
- l(this, "if", St);
1181
- l(this, "portal", Et);
1182
- this.__view = e;
1183
- const t = Object.getOwnPropertyDescriptors(this.__view._logger);
1021
+ l(this, "view");
1022
+ this.view = e;
1023
+ const t = Object.getOwnPropertyDescriptors(this.view.logger);
1184
1024
  for (const s in t)
1185
1025
  s !== "setName" && Object.defineProperty(this, s, t[s]);
1186
1026
  }
1187
1027
  get uid() {
1188
- return this.__view.uniqueId;
1028
+ return this.view.uniqueId;
1189
1029
  }
1190
1030
  get isMounted() {
1191
- return this.__view.isMounted;
1031
+ return this.view.isMounted;
1192
1032
  }
1193
1033
  get name() {
1194
- return this.__view._elementContext.viewName || this.__view.uniqueId;
1034
+ return this.view.elementContext.viewName || this.view.uniqueId;
1195
1035
  }
1196
1036
  set name(e) {
1197
- this.__view._elementContext.viewName = e, this.__view._logger.setName(e);
1198
- }
1199
- on(e, t) {
1200
- if (e === "*") {
1201
- const s = (i, o, ...c) => {
1202
- t(o, ...c);
1203
- };
1204
- this.__view._elementContext.emitter.on(e, s), this.__view._wildcardListeners.set(t, s);
1205
- } else
1206
- this.__view._elementContext.emitter.on(e, t);
1207
- }
1208
- off(e, t) {
1209
- if (e === "*") {
1210
- const s = this.__view._wildcardListeners.get(t);
1211
- s && (this.__view._elementContext.emitter.off(e, s), this.__view._wildcardListeners.delete(t));
1212
- } else
1213
- this.__view._elementContext.emitter.off(e, t);
1214
- }
1215
- once(e, t) {
1216
- if (e === "*") {
1217
- const s = (i, o, ...c) => {
1218
- this.__view._wildcardListeners.delete(t), t(o, ...c);
1219
- };
1220
- this.__view._elementContext.emitter.once(e, s), this.__view._wildcardListeners.set(t, s);
1221
- } else
1222
- this.__view._elementContext.emitter.once(e, t);
1223
- }
1224
- emit(e, ...t) {
1225
- return this.__view._elementContext.emitter.emit(e, new fe(e), ...t);
1037
+ this.view.elementContext.viewName = e, this.view.logger.setName(e);
1226
1038
  }
1227
1039
  provide(e, t) {
1228
- const s = new gt(e, t);
1229
- if (s.attach(this.__view._elementContext))
1230
- return this.__view._emitter.on("mounted", () => {
1040
+ const s = new Ze(e, t);
1041
+ if (s.attach(this.view.elementContext))
1042
+ return this.view.lifecycleListeners.mount.push(() => {
1231
1043
  s.handleMount();
1232
- }), this.__view._emitter.on("unmounted", () => {
1044
+ }), this.view.lifecycleListeners.unmount.push(() => {
1233
1045
  s.handleUnmount();
1234
1046
  }), s.value;
1235
1047
  {
1236
1048
  let o = e.name ? `'${e.name}'` : "this store";
1237
- return this.__view._logger.warn(`An instance of ${o} was already attached to this context.`), this.get(e);
1049
+ return this.view.logger.warn(`An instance of ${o} was already attached to this context.`), this.get(e);
1238
1050
  }
1239
1051
  }
1240
1052
  get(e) {
1241
- if (A(e)) {
1242
- let t = this.__view._elementContext, s;
1053
+ if (E(e)) {
1054
+ let t = this.view.elementContext, s;
1243
1055
  for (; s = t.stores.get(e), s == null && t.parent != null; )
1244
1056
  t = t.parent;
1245
1057
  if (s == null)
1246
- throw new B(`Store '${e.name}' is not provided on this context.`);
1058
+ throw new q(`Store '${e.name}' is not provided on this context.`);
1247
1059
  return s.value;
1248
1060
  } else
1249
- throw new B("Invalid store.");
1061
+ throw new q("Invalid store.");
1250
1062
  }
1251
1063
  beforeMount(e) {
1252
- this.__view._emitter.on("beforeMount", e);
1064
+ this.view.lifecycleListeners.beforeMount.push(e);
1253
1065
  }
1254
1066
  onMount(e) {
1255
- this.__view._emitter.on("mounted", e);
1067
+ this.view.lifecycleListeners.mount.push(e);
1256
1068
  }
1257
1069
  beforeUnmount(e) {
1258
- this.__view._emitter.on("beforeUnmount", e);
1070
+ this.view.lifecycleListeners.beforeUnmount.push(e);
1259
1071
  }
1260
1072
  onUnmount(e) {
1261
- this.__view._emitter.on("unmounted", e);
1073
+ this.view.lifecycleListeners.unmount.push(e);
1262
1074
  }
1263
1075
  effect(e) {
1264
- const t = this.__view;
1265
- if (t.isMounted) {
1266
- const s = b(e);
1267
- return this.__view._unsubscribes.push(s), s;
1076
+ if (this.view.isMounted) {
1077
+ const t = y(e);
1078
+ return this.view.lifecycleListeners.unmount.push(t), t;
1268
1079
  } else {
1269
- let s, i = !1;
1270
- return t._emitter.on("mounted", () => {
1271
- i || (s = b(e), this.__view._unsubscribes.push(s));
1080
+ let t, s = !1;
1081
+ return this.view.lifecycleListeners.mount.push(() => {
1082
+ s || (t = y(e), this.view.lifecycleListeners.unmount.push(t));
1272
1083
  }), () => {
1273
- s != null && (i = !0, s());
1084
+ t != null && (s = !0, t());
1274
1085
  };
1275
1086
  }
1276
1087
  }
1277
1088
  outlet() {
1278
- return E("$outlet", { children: this.__view._children });
1089
+ return v("$outlet", { children: this.view.children });
1279
1090
  }
1280
1091
  }
1281
- var Ee;
1282
- Ee = k;
1283
- const le = class le {
1092
+ var ce;
1093
+ ce = N;
1094
+ const Q = class Q {
1284
1095
  constructor(e, t, s, i = []) {
1285
- l(this, Ee, !0);
1286
- l(this, "uniqueId", ue());
1287
- l(this, "_elementContext");
1288
- l(this, "_logger");
1289
- l(this, "_view");
1290
- l(this, "_props");
1291
- l(this, "_element");
1292
- l(this, "_childMarkup");
1293
- l(this, "_children", Q([]));
1294
- l(this, "_unsubscribes", []);
1295
- l(this, "_emitter", new ee());
1296
- l(this, "_wildcardListeners", /* @__PURE__ */ new Map());
1096
+ l(this, ce, !0);
1097
+ l(this, "uniqueId", ge());
1098
+ l(this, "elementContext");
1099
+ l(this, "logger");
1100
+ l(this, "props");
1101
+ l(this, "fn");
1102
+ l(this, "element");
1103
+ l(this, "childMarkup");
1104
+ l(this, "children", G([]));
1105
+ l(this, "lifecycleListeners", { beforeMount: [], mount: [], beforeUnmount: [], unmount: [] });
1297
1106
  l(this, "isMounted", !1);
1298
- this._elementContext = {
1107
+ this.elementContext = {
1299
1108
  ...e,
1300
- data: {},
1301
1109
  parent: e,
1302
1110
  viewName: t.name,
1303
- emitter: new ee(),
1304
1111
  stores: /* @__PURE__ */ new Map()
1305
- }, this._logger = e.root.createLogger(t.name || "🌇 anonymous view", { uid: this.uniqueId }), this._view = t, this._props = s, this._childMarkup = i, this._emitter.on("error", (o, c, ...a) => {
1306
- console.error([o, c, ...a]), this._logger.error(o.message, { error: o, type: c, args: a }), this._logger.crash(o);
1307
- }), this._elementContext.emitter.on("*", (o, c, ...a) => {
1308
- var p;
1309
- c instanceof fe && (c.isStopped || (p = this._elementContext.parent) == null || p.emitter.emit(o, c, ...a));
1310
- });
1112
+ }, this.logger = e.root.createLogger(t.name || "🌇 anonymous view", { uid: this.uniqueId }), this.props = s, this.fn = t, this.childMarkup = i;
1311
1113
  }
1312
1114
  /*===============================*\
1313
1115
  || "Public" API ||
1314
1116
  \*===============================*/
1315
1117
  get node() {
1316
1118
  var e;
1317
- return (e = this._element) == null ? void 0 : e.node;
1119
+ return (e = this.element) == null ? void 0 : e.node;
1318
1120
  }
1319
1121
  mount(e, t) {
1320
1122
  const s = this.isMounted;
1321
- s || (this._initialize(), this._emitter.emit("beforeMount")), this._element && this._element.mount(e, t), s || (this.isMounted = !0, requestAnimationFrame(() => {
1322
- this._emitter.emit("mounted");
1123
+ if (!s) {
1124
+ this._initialize();
1125
+ for (const i of this.lifecycleListeners.beforeMount)
1126
+ i();
1127
+ }
1128
+ this.element && this.element.mount(e, t), s || (this.isMounted = !0, requestAnimationFrame(() => {
1129
+ for (const i of this.lifecycleListeners.mount)
1130
+ i();
1323
1131
  }));
1324
1132
  }
1325
1133
  unmount(e = !1) {
1326
- this._emitter.emit("beforeUnmount"), this._element && this._element.unmount(e), this.isMounted = !1, this._emitter.emit("unmounted"), this._emitter.clear();
1327
- for (const t of this._unsubscribes)
1134
+ for (const t of this.lifecycleListeners.beforeUnmount)
1328
1135
  t();
1329
- this._unsubscribes.length = 0;
1136
+ this.element && this.element.unmount(e), this.isMounted = !1;
1137
+ for (const t of this.lifecycleListeners.unmount)
1138
+ t();
1139
+ this.lifecycleListeners.beforeMount.length = 0, this.lifecycleListeners.mount.length = 0, this.lifecycleListeners.beforeUnmount.length = 0, this.lifecycleListeners.unmount.length = 0;
1330
1140
  }
1331
1141
  setChildView(e) {
1332
- this._childMarkup = [];
1333
- const t = new le(this._elementContext, e, {});
1334
- return this._children.value = [t], t;
1142
+ this.childMarkup = [];
1143
+ const t = new Q(this.elementContext, e, {});
1144
+ return this.children.value = [t], t;
1335
1145
  }
1336
1146
  /*===============================*\
1337
1147
  || Internal ||
1338
1148
  \*===============================*/
1339
1149
  _initialize() {
1340
- const e = new wt(this);
1150
+ const e = new He(this);
1341
1151
  let t;
1342
1152
  try {
1343
- t = this._view.call(e, this._props, e), this._childMarkup.length && (this._children.value = O(this._elementContext, this._childMarkup));
1153
+ t = this.fn.call(e, this.props, e), this.childMarkup.length && (this.children.value = L(this.elementContext, this.childMarkup));
1344
1154
  } catch (s) {
1345
- throw s instanceof Error && this._logger.crash(s), s;
1155
+ throw s instanceof Error && this.logger.crash(s), s;
1346
1156
  }
1347
1157
  if (t !== null) if (t instanceof Node)
1348
- this._element = F(O(this._elementContext, E("$node", { value: t })));
1349
- else if (w(t))
1350
- this._element = F(
1351
- O(this._elementContext, E("$dynamic", { source: t }))
1158
+ this.element = j(L(this.elementContext, v("$node", { value: t })));
1159
+ else if (g(t))
1160
+ this.element = j(
1161
+ L(this.elementContext, v("$dynamic", { source: t }))
1352
1162
  );
1353
- else if (W(t) || De(W, t))
1354
- this._element = F(O(this._elementContext, t));
1163
+ else if (V(t) || F(V, t))
1164
+ this.element = j(L(this.elementContext, t));
1355
1165
  else {
1356
1166
  const s = new TypeError(
1357
- `Expected '${this._view.name}' function to return a DOM node, Markup element, Readable or null. Got: ${q(t)}`
1167
+ `Expected '${this.fn.name}' function to return a DOM node, Markup element, Readable or null. Got: ${C(t)}`
1358
1168
  );
1359
- this._logger.crash(s);
1169
+ this.logger.crash(s);
1360
1170
  }
1361
1171
  }
1362
1172
  };
1363
- let H = le;
1364
- var Ce;
1365
- Ce = k;
1366
- class bt {
1173
+ let _ = Q;
1174
+ var le;
1175
+ le = N;
1176
+ class Xe {
1367
1177
  constructor({ elementContext: e, items: t, renderFn: s, keyFn: i }) {
1368
- l(this, Ce, !0);
1178
+ l(this, le, !0);
1369
1179
  l(this, "node", document.createTextNode(""));
1370
1180
  l(this, "items");
1371
1181
  l(this, "unsubscribe", null);
@@ -1379,8 +1189,8 @@ class bt {
1379
1189
  return this.node.parentNode != null;
1380
1190
  }
1381
1191
  mount(e, t) {
1382
- this.isMounted || (e.insertBefore(this.node, (t == null ? void 0 : t.nextSibling) ?? null), this.unsubscribe = b(() => {
1383
- let s = S(this.items);
1192
+ this.isMounted || (e.insertBefore(this.node, (t == null ? void 0 : t.nextSibling) ?? null), this.unsubscribe = y(() => {
1193
+ let s = b(this.items);
1384
1194
  s == null && (s = [], console.log("list received empty value", s, this)), this._update(Array.from(s));
1385
1195
  }));
1386
1196
  }
@@ -1394,7 +1204,7 @@ class bt {
1394
1204
  this.connectedItems = [];
1395
1205
  }
1396
1206
  _update(e) {
1397
- var c, a, p;
1207
+ var c, a, m;
1398
1208
  if (e.length === 0 || !this.isMounted)
1399
1209
  return this._cleanup(!1);
1400
1210
  const t = [];
@@ -1413,13 +1223,13 @@ class bt {
1413
1223
  if (u)
1414
1224
  u.item.value = r.value, u.index.value = r.index, i[r.index] = u;
1415
1225
  else {
1416
- const f = Q(r.value), h = Q(r.index);
1226
+ const f = G(r.value), h = G(r.index);
1417
1227
  i[r.index] = {
1418
1228
  key: r.key,
1419
1229
  item: f,
1420
1230
  index: h,
1421
- element: new H(this.elementContext, yt, {
1422
- item: oe(() => f.value),
1231
+ element: new _(this.elementContext, Ye, {
1232
+ item: Y(() => f.value),
1423
1233
  index: h,
1424
1234
  renderFn: this.renderFn
1425
1235
  })
@@ -1432,17 +1242,17 @@ class bt {
1432
1242
  }
1433
1243
  this.connectedItems = i;
1434
1244
  const o = ((a = i.at(-1)) == null ? void 0 : a.element.node) ?? this.node;
1435
- (p = this.node.parentNode) == null || p.insertBefore(this.node, o.nextSibling);
1245
+ (m = this.node.parentNode) == null || m.insertBefore(this.node, o.nextSibling);
1436
1246
  }
1437
1247
  }
1438
- function yt(n, e) {
1248
+ function Ye(n, e) {
1439
1249
  return e.name = "@ListItem", n.renderFn.call(e, n.item, n.index, e);
1440
1250
  }
1441
- var Te;
1442
- Te = k;
1443
- class $e {
1251
+ var ae;
1252
+ ae = N;
1253
+ class ve {
1444
1254
  constructor(e) {
1445
- l(this, Te, !0);
1255
+ l(this, ae, !0);
1446
1256
  l(this, "node", document.createTextNode(""));
1447
1257
  l(this, "isMounted", !1);
1448
1258
  l(this, "source");
@@ -1451,8 +1261,8 @@ class $e {
1451
1261
  this.source = e;
1452
1262
  }
1453
1263
  mount(e, t) {
1454
- this.isMounted || (this.isMounted = !0, e.insertBefore(this.node, (t == null ? void 0 : t.nextSibling) ?? null), w(this.source) ? this.unsubscribe = b(() => {
1455
- this.update(S(this.source));
1264
+ this.isMounted || (this.isMounted = !0, e.insertBefore(this.node, (t == null ? void 0 : t.nextSibling) ?? null), g(this.source) ? this.unsubscribe = y(() => {
1265
+ this.update(b(this.source));
1456
1266
  }) : this.update(this.elements));
1457
1267
  }
1458
1268
  unmount(e = !1) {
@@ -1474,11 +1284,11 @@ class $e {
1474
1284
  }
1475
1285
  }
1476
1286
  }
1477
- var Ne;
1478
- Ne = k;
1479
- class vt {
1287
+ var de;
1288
+ de = N;
1289
+ class Je {
1480
1290
  constructor(e) {
1481
- l(this, Ne, !0);
1291
+ l(this, de, !0);
1482
1292
  l(this, "config");
1483
1293
  l(this, "element");
1484
1294
  this.config = e;
@@ -1488,68 +1298,68 @@ class vt {
1488
1298
  }
1489
1299
  mount(e, t) {
1490
1300
  const { content: s, parent: i } = this.config;
1491
- qe(s) ? this.element = s : this.element = F(O(this.config.elementContext, ce(s))), this.element.mount(i);
1301
+ xe(s) ? this.element = s : this.element = j(L(this.config.elementContext, J(s))), this.element.mount(i);
1492
1302
  }
1493
1303
  unmount(e = !1) {
1494
1304
  var t;
1495
1305
  (t = this.element) != null && t.isMounted && this.element.unmount(e);
1496
1306
  }
1497
1307
  }
1498
- function W(n) {
1499
- return (n == null ? void 0 : n[Le]) === !0;
1308
+ function V(n) {
1309
+ return (n == null ? void 0 : n[ye]) === !0;
1500
1310
  }
1501
- function qe(n) {
1502
- return (n == null ? void 0 : n[k]) === !0;
1311
+ function xe(n) {
1312
+ return (n == null ? void 0 : n[N]) === !0;
1503
1313
  }
1504
- function ce(n) {
1505
- return $(n) || (n = [n]), n.flat(1 / 0).filter((e) => e != null && e !== !1).map((e) => W(e) ? e : e instanceof Node ? E("$node", { value: e }) : w(e) ? E("$dynamic", { source: e }) : E("$text", { value: e }));
1314
+ function J(n) {
1315
+ return P(n) || (n = [n]), n.flat(1 / 0).filter((e) => e != null && e !== !1).map((e) => V(e) ? e : e instanceof Node ? v("$node", { value: e }) : g(e) ? v("$dynamic", { source: e }) : v("$text", { value: e }));
1506
1316
  }
1507
- function E(n, e, ...t) {
1508
- return new xt(n, e, ...t);
1317
+ function v(n, e, ...t) {
1318
+ return new Qe(n, e, ...t);
1509
1319
  }
1510
- var Ae;
1511
- Ae = Le;
1512
- class xt {
1320
+ var he;
1321
+ he = ye;
1322
+ class Qe {
1513
1323
  constructor(e, t, ...s) {
1514
- l(this, Ae, !0);
1324
+ l(this, he, !0);
1515
1325
  l(this, "type");
1516
1326
  l(this, "props");
1517
1327
  l(this, "children");
1518
- this.type = e, this.props = t, this.children = ce(s);
1328
+ this.type = e, this.props = t, this.children = J(s);
1519
1329
  }
1520
1330
  }
1521
- const Gt = ct.bind(E);
1522
- function St(n, e, t) {
1523
- return E("$dynamic", {
1524
- source: oe(() => {
1525
- const s = S(n);
1526
- return s && e ? e : !s && t ? t : null;
1331
+ const mt = ze.bind(v);
1332
+ function gt(n, e, t) {
1333
+ return v("$dynamic", {
1334
+ source: Y(() => {
1335
+ const s = b(n);
1336
+ return console.log("cond updated", s), s && e ? e : !s && t ? t : null;
1527
1337
  })
1528
1338
  });
1529
1339
  }
1530
- function Mt(n, e, t) {
1531
- return E("$list", { items: oe(() => n), keyFn: e, renderFn: t });
1340
+ function yt(n, e, t) {
1341
+ return v("$list", { items: Y(() => n), keyFn: e, renderFn: t });
1532
1342
  }
1533
- function Et(n, e) {
1534
- return E("$portal", { parent: n, content: e });
1343
+ function bt(n, e) {
1344
+ return v("$portal", { parent: n, content: e });
1535
1345
  }
1536
- function O(n, e) {
1537
- return ($(e) ? e : [e]).map((s) => {
1538
- if (A(s.type))
1539
- return new H(n, s.type, s.props, s.children);
1540
- if (P(s.type))
1346
+ function L(n, e) {
1347
+ return (P(e) ? e : [e]).map((s) => {
1348
+ if (E(s.type))
1349
+ return new _(n, s.type, s.props, s.children);
1350
+ if (D(s.type))
1541
1351
  switch (s.type) {
1542
1352
  case "$node": {
1543
1353
  const i = s.props;
1544
- return new be(i.value);
1354
+ return new ie(i.value);
1545
1355
  }
1546
1356
  case "$text": {
1547
1357
  const i = s.props;
1548
- return new be(document.createTextNode(String(i.value)));
1358
+ return new ie(document.createTextNode(String(i.value)));
1549
1359
  }
1550
1360
  case "$list": {
1551
1361
  const i = s.props;
1552
- return new bt({
1362
+ return new Xe({
1553
1363
  items: i.items,
1554
1364
  keyFn: i.keyFn,
1555
1365
  renderFn: i.renderFn,
@@ -1558,18 +1368,18 @@ function O(n, e) {
1558
1368
  }
1559
1369
  case "$dynamic": {
1560
1370
  const i = s.props;
1561
- return new lt({
1371
+ return new Be({
1562
1372
  source: i.source,
1563
1373
  elementContext: n
1564
1374
  });
1565
1375
  }
1566
1376
  case "$outlet": {
1567
1377
  const i = s.props;
1568
- return new $e(i.children);
1378
+ return new ve(i.children);
1569
1379
  }
1570
1380
  case "$portal": {
1571
1381
  const i = s.props;
1572
- return new vt({
1382
+ return new Je({
1573
1383
  content: i.content,
1574
1384
  parent: i.parent,
1575
1385
  elementContext: n
@@ -1578,7 +1388,7 @@ function O(n, e) {
1578
1388
  default:
1579
1389
  if (s.type.startsWith("$"))
1580
1390
  throw new Error(`Unknown markup type: ${s.type}`);
1581
- return new dt({
1391
+ return new Fe({
1582
1392
  tag: s.type,
1583
1393
  props: s.props ?? {},
1584
1394
  children: s.children,
@@ -1589,46 +1399,44 @@ function O(n, e) {
1589
1399
  throw new TypeError(`Expected a string or view function. Got: ${s.type}`);
1590
1400
  });
1591
1401
  }
1592
- function F(n) {
1593
- return n.length === 1 ? n[0] : new $e(n);
1402
+ function j(n) {
1403
+ return n.length === 1 ? n[0] : new ve(n);
1594
1404
  }
1595
- function Re(n) {
1596
- return n == null || n === !1 || P(n) || Fe(n) || W(n) || w(n) || De(Re, n);
1405
+ function Me(n) {
1406
+ return n == null || n === !1 || D(n) || Te(n) || V(n) || g(n) || F(Me, n);
1597
1407
  }
1598
1408
  export {
1599
- kt as A,
1600
- Pt as B,
1601
- Et as C,
1602
- Mt as D,
1603
- qt as I,
1604
- Vt as P,
1605
- gt as S,
1606
- H as V,
1607
- Nt as a,
1608
- Tt as b,
1609
- Rt as c,
1610
- Q as d,
1611
- oe as e,
1612
- Dt as f,
1613
- S as g,
1614
- P as h,
1615
- A as i,
1616
- te as j,
1617
- It as k,
1618
- Gt as l,
1619
- St as m,
1620
- $t as n,
1621
- B as o,
1622
- ee as p,
1623
- At as q,
1624
- E as r,
1625
- Lt as s,
1626
- q as t,
1627
- Ot as u,
1628
- jt as v,
1629
- F as w,
1630
- O as x,
1631
- b as y,
1632
- tt as z
1409
+ bt as A,
1410
+ yt as B,
1411
+ dt as I,
1412
+ ht as P,
1413
+ Ze as S,
1414
+ _ as V,
1415
+ nt as a,
1416
+ tt as b,
1417
+ G as c,
1418
+ Y as d,
1419
+ it as e,
1420
+ D as f,
1421
+ b as g,
1422
+ W as h,
1423
+ E as i,
1424
+ ct as j,
1425
+ mt as k,
1426
+ gt as l,
1427
+ at as m,
1428
+ q as n,
1429
+ st as o,
1430
+ v as p,
1431
+ j as q,
1432
+ L as r,
1433
+ ft as s,
1434
+ C as t,
1435
+ ot as u,
1436
+ lt as v,
1437
+ y as w,
1438
+ je as x,
1439
+ rt as y,
1440
+ ut as z
1633
1441
  };
1634
- //# sourceMappingURL=markup-BWJWLvDF.js.map
1442
+ //# sourceMappingURL=markup-ILMFXzoo.js.map