@manyducks.co/dolla 2.0.0-alpha.30 → 2.0.0-alpha.31

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,16 +1,16 @@
1
1
  var jt = Object.defineProperty;
2
- var ot = (r) => {
2
+ var ut = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
- var Ut = (r, t, e) => t in r ? jt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
6
- var o = (r, t, e) => Ut(r, typeof t != "symbol" ? t + "" : t, e), ut = (r, t, e) => t.has(r) || ot("Cannot " + e);
7
- var O = (r, t, e) => (ut(r, t, "read from private field"), e ? e.call(r) : t.get(r)), W = (r, t, e) => t.has(r) ? ot("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), F = (r, t, e, n) => (ut(r, t, "write to private field"), n ? n.call(r, e) : t.set(r, e), e);
8
- function Mt(r) {
5
+ var Rt = (r, t, e) => t in r ? jt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
6
+ var o = (r, t, e) => Rt(r, typeof t != "symbol" ? t + "" : t, e), ct = (r, t, e) => t.has(r) || ut("Cannot " + e);
7
+ var O = (r, t, e) => (ct(r, t, "read from private field"), e ? e.call(r) : t.get(r)), W = (r, t, e) => t.has(r) ? ut("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), T = (r, t, e, n) => (ct(r, t, "write to private field"), n ? n.call(r, e) : t.set(r, e), e);
8
+ function kt(r) {
9
9
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
10
10
  }
11
- var P = { exports: {} }, ct;
12
- function Rt() {
13
- return ct || (ct = 1, function(r, t) {
11
+ var P = { exports: {} }, at;
12
+ function Ut() {
13
+ return at || (at = 1, function(r, t) {
14
14
  Object.defineProperty(t, "__esModule", { value: !0 });
15
15
  var e = /* @__PURE__ */ function() {
16
16
  function h(a, f) {
@@ -38,14 +38,14 @@ function Rt() {
38
38
  return 16 > f ? a + "0" + f.toString(16) : a + f.toString(16);
39
39
  }, "#");
40
40
  }, s = function(h, a, f) {
41
- var l = 0.5 > f ? f * (1 + a) : f + a - f * a, d = 2 * f - l, p = function(w, C, S) {
41
+ var l = 0.5 > f ? f * (1 + a) : f + a - f * a, d = 2 * f - l, p = function(w, v, S) {
42
42
  var z = Math.round, g = 0 > S ? S + 1 : 1 < S ? S - 1 : S;
43
- return g = g < 1 / 6 ? w + 6 * (C - w) * g : g < 1 / 2 ? C : g < 2 / 3 ? w + 6 * (C - w) * (2 / 3 - g) : w, z(255 * g);
43
+ return g = g < 1 / 6 ? w + 6 * (v - w) * g : g < 1 / 2 ? v : g < 2 / 3 ? w + 6 * (v - w) * (2 / 3 - g) : w, z(255 * g);
44
44
  }, _ = p(d, l, h + 1 / 3), x = p(d, l, h), y = p(d, l, h - 1 / 3);
45
45
  return [_, x, y];
46
46
  }, i = function(h, a, f, l) {
47
- var d = h % 1007 / 1007, p = function(w, C, S) {
48
- return w * (S - C) + C;
47
+ var d = h % 1007 / 1007, p = function(w, v, S) {
48
+ return w * (S - v) + v;
49
49
  }, _ = p(d, a.min, a.max), x = p(d, f.min, f.max), y = p(d, l.max, l.min);
50
50
  return [_, x, y];
51
51
  }, u = function(h) {
@@ -53,14 +53,14 @@ function Rt() {
53
53
  return a * f.charCodeAt(0) * l + 1;
54
54
  }, 1);
55
55
  }, c = function(h) {
56
- var a = h.str, f = h.hue, l = f === void 0 ? { min: 0, max: 360 } : f, d = h.sat, p = d === void 0 ? { min: 0.35, max: 0.65 } : d, _ = h.light, x = _ === void 0 ? { min: 0.3, max: 0.7 } : _, y = h.hashFunction, w = y === void 0 ? u : y, C = h.scheme, S = C === void 0 ? "hex" : C, z = i(w(a), l, p, x), g = e(z, 3), nt = g[0], rt = g[1], st = g[2], it = s(nt / 360, rt, st), qt = n(it);
57
- return S === "hsl" ? [nt, rt, st] : S === "rgb" ? it : qt;
56
+ var a = h.str, f = h.hue, l = f === void 0 ? { min: 0, max: 360 } : f, d = h.sat, p = d === void 0 ? { min: 0.35, max: 0.65 } : d, _ = h.light, x = _ === void 0 ? { min: 0.3, max: 0.7 } : _, y = h.hashFunction, w = y === void 0 ? u : y, v = h.scheme, S = v === void 0 ? "hex" : v, z = i(w(a), l, p, x), g = e(z, 3), rt = g[0], st = g[1], it = g[2], ot = s(rt / 360, st, it), qt = n(ot);
57
+ return S === "hsl" ? [rt, st, it] : S === "rgb" ? ot : qt;
58
58
  };
59
59
  t.default = c, r.exports = t.default;
60
60
  }(P, P.exports)), P.exports;
61
61
  }
62
- var Dt = Rt();
63
- const zt = /* @__PURE__ */ Mt(Dt);
62
+ var Dt = Ut();
63
+ const zt = /* @__PURE__ */ kt(Dt);
64
64
  function V(r) {
65
65
  const t = typeof r;
66
66
  switch (t) {
@@ -76,34 +76,28 @@ function V(r) {
76
76
  return t;
77
77
  }
78
78
  }
79
- function xe(r, t) {
80
- if (!r)
81
- throw new TypeError(
82
- R(r, t || "Failed assertion. Value is not truthy. Got type: %t, value: %v")
83
- );
84
- }
85
79
  function A(r) {
86
80
  return Array.isArray(r);
87
81
  }
88
- function kt(...r) {
82
+ function bt(...r) {
89
83
  const t = r[0], e = (n) => A(n) && n.every((s) => t(s));
90
84
  return r.length < 2 ? e : e(r[1]);
91
85
  }
92
- function Me(...r) {
86
+ function xe(...r) {
93
87
  const t = r[0], e = b(r[2]) ? r[2] : "Expected an array of valid items. Got type: %t, value: %v", n = (s) => {
94
88
  if (A(s) && s.every((i) => t(i)))
95
89
  return !0;
96
- throw new TypeError(R(s, e));
90
+ throw new TypeError(U(s, e));
97
91
  };
98
92
  return r.length < 2 ? n : n(r[1]);
99
93
  }
100
94
  function b(r) {
101
95
  return typeof r == "string";
102
96
  }
103
- function ke(r, t) {
97
+ function Me(r, t) {
104
98
  if (b(r))
105
99
  return !0;
106
- throw new TypeError(R(r, t ?? "Expected a string. Got type: %t, value: %v"));
100
+ throw new TypeError(U(r, t ?? "Expected a string. Got type: %t, value: %v"));
107
101
  }
108
102
  function I(r) {
109
103
  return typeof r == "function" && !Kt(r);
@@ -114,25 +108,30 @@ function Gt(r) {
114
108
  function Kt(r) {
115
109
  return typeof r == "function" && /^\s*class\s+/.test(r.toString());
116
110
  }
117
- function be(...r) {
111
+ function ke(...r) {
118
112
  const t = r[0], e = b(r[2]) ? r[2] : `Expected instance of ${t.name}. Got type: %t, value: %v`, n = (s) => {
119
113
  if (s instanceof t)
120
114
  return !0;
121
- throw new TypeError(R(s, e));
115
+ throw new TypeError(U(s, e));
122
116
  };
123
117
  return r.length < 2 ? n : n(r[1]);
124
118
  }
125
- function bt(r) {
119
+ function Z(r) {
126
120
  return r != null && typeof r == "object" && !A(r);
127
121
  }
128
- function R(r, t) {
122
+ function be(r, t) {
123
+ if (Z(r))
124
+ return !0;
125
+ throw new TypeError(U(r, t));
126
+ }
127
+ function U(r, t) {
129
128
  var s;
130
129
  const e = V(r), n = ((s = r == null ? void 0 : r.toString) == null ? void 0 : s.call(r)) || String(r);
131
130
  return t.replaceAll("%t", e).replaceAll("%v", n);
132
131
  }
133
- var G, at;
132
+ var G, ht;
134
133
  function Bt() {
135
- return at || (at = 1, G = function r(t, e) {
134
+ return ht || (ht = 1, G = function r(t, e) {
136
135
  if (t === e) return !0;
137
136
  if (t && e && typeof t == "object" && typeof e == "object") {
138
137
  if (t.constructor !== e.constructor) return !1;
@@ -179,10 +178,10 @@ function Bt() {
179
178
  }), G;
180
179
  }
181
180
  var Ht = Bt();
182
- const Yt = /* @__PURE__ */ Mt(Ht), Zt = () => {
181
+ const Yt = /* @__PURE__ */ kt(Ht), Zt = () => {
183
182
  };
184
183
  let K = 1;
185
- function Z() {
184
+ function J() {
186
185
  return K = K % Number.MAX_SAFE_INTEGER + 1, K.toString(36) + Date.now().toString(36);
187
186
  }
188
187
  function Et(r, t) {
@@ -259,10 +258,10 @@ function Ve(r) {
259
258
  return !(i.some((u) => u(n)) || s.length > 0 && !s.some((u) => u(n)));
260
259
  };
261
260
  }
262
- var Xt = Object.defineProperty, Qt = (r, t, e) => t in r ? Xt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, ht = (r, t, e) => Qt(r, typeof t != "symbol" ? t + "" : t, e);
261
+ var Xt = Object.defineProperty, Qt = (r, t, e) => t in r ? Xt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, lt = (r, t, e) => Qt(r, typeof t != "symbol" ? t + "" : t, e);
263
262
  class q {
264
263
  constructor() {
265
- ht(this, "_l", /* @__PURE__ */ new Map()), ht(this, "_a", (t) => {
264
+ lt(this, "_l", /* @__PURE__ */ new Map()), lt(this, "_a", (t) => {
266
265
  if (typeof t != "string" && !(t instanceof Symbol))
267
266
  throw new TypeError("Emitter: eventName should be a string or symbol");
268
267
  });
@@ -309,7 +308,7 @@ class $e {
309
308
  // #dolla;
310
309
  W(this, $);
311
310
  W(this, E);
312
- F(this, $, t.createLogger("Dolla.stats")), F(this, E, N());
311
+ T(this, $, t.createLogger("Dolla.stats")), T(this, E, N());
313
312
  let e;
314
313
  O(this, E).emitter.on("statsChanged", () => {
315
314
  e && clearTimeout(e), e = setTimeout(() => {
@@ -320,7 +319,7 @@ class $e {
320
319
  }
321
320
  $ = new WeakMap(), E = new WeakMap();
322
321
  const B = Symbol.for("DollaStatsStore");
323
- function lt() {
322
+ function ft() {
324
323
  const r = new q(), t = {
325
324
  watcherCount: 0,
326
325
  viewCount: 0
@@ -332,7 +331,7 @@ function lt() {
332
331
  }), { emitter: r, stats: t };
333
332
  }
334
333
  function N() {
335
- return typeof window < "u" ? (window[B] || (window[B] = lt()), window[B]) : lt();
334
+ return typeof window < "u" ? (window[B] || (window[B] = ft()), window[B]) : ft();
336
335
  }
337
336
  function At() {
338
337
  N().emitter.emit("_incrementWatcherCount", 1);
@@ -346,15 +345,15 @@ function te() {
346
345
  function ee() {
347
346
  N().emitter.emit("_incrementViewCount", -1);
348
347
  }
349
- const Vt = Symbol.for("DollaState"), $t = Symbol.for("DollaRef"), Lt = Symbol.for("DollaMarkup"), M = Symbol.for("DollaMarkupElement"), ne = Symbol.for("DollaStore"), Nt = Symbol.for("DollaStoreFactory");
348
+ const Vt = Symbol.for("DollaState"), $t = Symbol.for("DollaRef"), Lt = Symbol.for("DollaMarkup"), M = Symbol.for("DollaMarkupElement"), ne = Symbol.for("DollaStore"), Nt = Symbol.for("DollaStoreFactory"), Le = Symbol.for("DollaRouter");
350
349
  function m(r) {
351
350
  return (r == null ? void 0 : r[Vt]) === !0;
352
351
  }
353
352
  function re(r) {
354
353
  return m(r) ? r.get() : r;
355
354
  }
356
- function J(r) {
357
- return m(r) ? r : new X({
355
+ function X(r) {
356
+ return m(r) ? r : new Q({
358
357
  get() {
359
358
  return r;
360
359
  },
@@ -391,11 +390,11 @@ class se {
391
390
  };
392
391
  }
393
392
  }
394
- var mt;
395
- mt = Vt;
396
- class X {
393
+ var _t;
394
+ _t = Vt;
395
+ class Q {
397
396
  constructor(t) {
398
- o(this, mt, !0);
397
+ o(this, _t, !0);
399
398
  o(this, "__value");
400
399
  this.__value = t;
401
400
  }
@@ -408,9 +407,9 @@ class X {
408
407
  }
409
408
  function Y(r, t) {
410
409
  const e = new se(r, t);
411
- return [new X(e), (s) => e.set(s)];
410
+ return [new Q(e), (s) => e.set(s)];
412
411
  }
413
- const ft = Symbol("EMPTY");
412
+ const dt = Symbol("EMPTY");
414
413
  class ie {
415
414
  constructor(t, e, n) {
416
415
  o(this, "equals", Et);
@@ -441,7 +440,7 @@ class ie {
441
440
  /**
442
441
  * The current value as returned from `fn` (may be a State)
443
442
  */
444
- o(this, "value", ft);
443
+ o(this, "value", dt);
445
444
  /**
446
445
  * The current unwrapped value.
447
446
  */
@@ -450,7 +449,7 @@ class ie {
450
449
  * When value is a State, this function will stop watching its value.
451
450
  */
452
451
  o(this, "stopWatchingCurrentValue");
453
- this.sources = t.map(J), this.fn = e, n != null && n.equals && (this.equals = n.equals), this.previousSourceValues = new Array(t.length).fill(ft, 0, t.length);
452
+ this.sources = t.map(X), this.fn = e, n != null && n.equals && (this.equals = n.equals), this.previousSourceValues = new Array(t.length).fill(dt, 0, t.length);
454
453
  }
455
454
  /*==========================*\
456
455
  || "Public" methods ||
@@ -506,7 +505,7 @@ class ie {
506
505
  }
507
506
  function oe(r, t, e) {
508
507
  const n = new ie(r, t, e);
509
- return new X(n);
508
+ return new Q(n);
510
509
  }
511
510
  function D() {
512
511
  const r = [];
@@ -514,7 +513,7 @@ function D() {
514
513
  watch(t, e) {
515
514
  if (t.length === 0)
516
515
  throw new TypeError("Expected at least one state to watch.");
517
- t = t.map(J);
516
+ t = t.map(X);
518
517
  let n;
519
518
  return t.length > 1 ? n = oe(t, e).watch(() => null) : n = t[0].watch(e), r.push(n), () => {
520
519
  let s = r.indexOf(n);
@@ -527,7 +526,7 @@ function D() {
527
526
  }
528
527
  };
529
528
  }
530
- function Le(r) {
529
+ function Ne(r) {
531
530
  function t() {
532
531
  if (arguments.length === 1)
533
532
  r = arguments[0];
@@ -541,7 +540,7 @@ function ue(r) {
541
540
  return (r == null ? void 0 : r[$t]) === !0;
542
541
  }
543
542
  var L;
544
- class Q {
543
+ class tt {
545
544
  constructor(t, e) {
546
545
  o(this, "type");
547
546
  o(this, "detail");
@@ -552,7 +551,7 @@ class Q {
552
551
  return O(this, L);
553
552
  }
554
553
  stopPropagation() {
555
- F(this, L, !0);
554
+ T(this, L, !0);
556
555
  }
557
556
  get [Symbol.toStringTag]() {
558
557
  return "ContextEvent";
@@ -624,7 +623,7 @@ let ce = class {
624
623
  this.__store._elementContext.emitter.once(t, e);
625
624
  }
626
625
  emit(t, e) {
627
- return this.__store._elementContext.emitter.emit(t, new Q(t, e));
626
+ return this.__store._elementContext.emitter.emit(t, new tt(t, e));
628
627
  }
629
628
  onMount(t) {
630
629
  this.__store._emitter.on("mounted", t);
@@ -697,8 +696,8 @@ function he(r) {
697
696
  function le(r) {
698
697
  return (r == null ? void 0 : r[ne]) === !0;
699
698
  }
700
- function We(r) {
701
- const t = Z();
699
+ function Te(r) {
700
+ const t = J();
702
701
  function e(n) {
703
702
  return new ae(t, r, n);
704
703
  }
@@ -706,6 +705,9 @@ function We(r) {
706
705
  }
707
706
  class H extends Error {
708
707
  }
708
+ function Pe(r, t) {
709
+ return t.outlet();
710
+ }
709
711
  function fe(r) {
710
712
  for (var t, e, n = arguments, s = 1, i = "", u = "", c = [0], h = function(l) {
711
713
  s === 1 && (l || (i = i.replace(/^\s*\n\s*|\s*\n\s*$/g, ""))) ? c.push(l ? n[l] : i) : s === 3 && (l || i) ? (c[1] = l ? n[l] : i, s = 2) : s === 2 && i === "..." && l ? c[2] = Object.assign(c[2] || {}, n[l]) : s === 2 && i && !l ? (c[2] = c[2] || {})[i] = !0 : s >= 5 && (s === 5 ? ((c[2] = c[2] || {})[e] = l ? i ? i + n[l] : n[l] : i, s = 6) : (l || i) && (c[2][e] += l ? i + n[l] : i)), i = "";
@@ -716,11 +718,11 @@ function fe(r) {
716
718
  }
717
719
  return h(), c.length > 2 ? c.slice(1) : c[1];
718
720
  }
719
- var _t;
720
- _t = M;
721
- class dt {
721
+ var wt;
722
+ wt = M;
723
+ class pt {
722
724
  constructor(t) {
723
- o(this, _t, !0);
725
+ o(this, wt, !0);
724
726
  o(this, "node");
725
727
  this.node = t;
726
728
  }
@@ -735,18 +737,18 @@ class dt {
735
737
  }
736
738
  }
737
739
  const de = (r) => /^on[A-Z]/.test(r);
738
- var wt;
739
- wt = M;
740
+ var gt;
741
+ gt = M;
740
742
  class pe {
741
743
  constructor({ tag: t, props: e, children: n, elementContext: s }) {
742
- o(this, wt, !0);
744
+ o(this, gt, !0);
743
745
  o(this, "node");
744
746
  o(this, "props");
745
747
  o(this, "childMarkup", []);
746
748
  o(this, "children", []);
747
749
  o(this, "stopCallbacks", []);
748
750
  o(this, "elementContext");
749
- o(this, "uniqueId", Z());
751
+ o(this, "uniqueId", J());
750
752
  o(this, "_batchWrite");
751
753
  // Track the ref so we can nullify it on unmount.
752
754
  o(this, "ref");
@@ -936,7 +938,7 @@ class pe {
936
938
  });
937
939
  n.push(u), s.push(u);
938
940
  } else {
939
- const i = Ft(e);
941
+ const i = Tt(e);
940
942
  for (const u in i) {
941
943
  const { value: c, priority: h } = i[u];
942
944
  if (m(c)) {
@@ -993,12 +995,12 @@ function Wt(r) {
993
995
  const e = r.split(" ");
994
996
  for (const n of e)
995
997
  t[n] = !0;
996
- } else bt(r) ? Object.assign(t, r) : Array.isArray(r) && Array.from(r).filter(Boolean).forEach((e) => {
998
+ } else Z(r) ? Object.assign(t, r) : Array.isArray(r) && Array.from(r).filter(Boolean).forEach((e) => {
997
999
  Object.assign(t, Wt(e));
998
1000
  });
999
1001
  return delete t.undefined, t;
1000
1002
  }
1001
- function Ft(r) {
1003
+ function Tt(r) {
1002
1004
  let t = {};
1003
1005
  if (b(r)) {
1004
1006
  const e = r.split(";").filter((n) => n.trim() !== "");
@@ -1006,26 +1008,26 @@ function Ft(r) {
1006
1008
  const [s, i] = n.split(":"), u = {
1007
1009
  value: i
1008
1010
  };
1009
- i.includes("!important") ? (u.priority = "important", u.value = i.replace("!important", "").trim()) : u.value = i.trim(), t[pt(s.trim())] = u;
1011
+ i.includes("!important") ? (u.priority = "important", u.value = i.replace("!important", "").trim()) : u.value = i.trim(), t[mt(s.trim())] = u;
1010
1012
  }
1011
1013
  }
1012
- if (bt(r))
1014
+ if (Z(r))
1013
1015
  for (const e in r)
1014
- e.startsWith("--") ? t[e] = { value: r[e] } : t[pt(e)] = { value: r[e] };
1016
+ e.startsWith("--") ? t[e] = { value: r[e] } : t[mt(e)] = { value: r[e] };
1015
1017
  else Array.isArray(r) && Array.from(r).filter((e) => e != null).forEach((e) => {
1016
- Object.assign(t, Ft(e));
1018
+ Object.assign(t, Tt(e));
1017
1019
  });
1018
1020
  return t;
1019
1021
  }
1020
- function pt(r) {
1022
+ function mt(r) {
1021
1023
  return r.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, e) => (e ? "-" : "") + t.toLowerCase());
1022
1024
  }
1023
1025
  const me = ["ref", "children", "class", "style", "data"];
1024
- var gt;
1025
- gt = M;
1026
+ var yt;
1027
+ yt = M;
1026
1028
  class _e {
1027
1029
  constructor({ sources: t, renderFn: e, elementContext: n }) {
1028
- o(this, gt, !0);
1030
+ o(this, yt, !0);
1029
1031
  o(this, "node", document.createTextNode(""));
1030
1032
  o(this, "children", []);
1031
1033
  o(this, "renderFn");
@@ -1060,7 +1062,7 @@ class _e {
1060
1062
  var i, u, c;
1061
1063
  if (this.cleanup(!1), t == null || t.length === 0 || !this.isMounted)
1062
1064
  return;
1063
- const e = t.flatMap((h) => Tt(h) ? h : k(this.elementContext, tt(h)));
1065
+ const e = t.flatMap((h) => Ft(h) ? h : k(this.elementContext, et(h)));
1064
1066
  for (const h of e) {
1065
1067
  const a = ((i = this.children.at(-1)) == null ? void 0 : i.node) || this.node;
1066
1068
  h.mount(this.node.parentNode, a), this.children.push(h);
@@ -1069,11 +1071,11 @@ class _e {
1069
1071
  n.insertBefore(this.node, s);
1070
1072
  }
1071
1073
  }
1072
- var yt;
1073
- yt = M;
1074
+ var St;
1075
+ St = M;
1074
1076
  class Pt {
1075
1077
  constructor(t) {
1076
- o(this, yt, !0);
1078
+ o(this, St, !0);
1077
1079
  o(this, "node", document.createTextNode(""));
1078
1080
  o(this, "isMounted", !1);
1079
1081
  o(this, "source");
@@ -1105,11 +1107,11 @@ class Pt {
1105
1107
  }
1106
1108
  }
1107
1109
  }
1108
- var St;
1109
- St = M;
1110
+ var Ct;
1111
+ Ct = M;
1110
1112
  class we {
1111
1113
  constructor(t) {
1112
- o(this, St, !0);
1114
+ o(this, Ct, !0);
1113
1115
  o(this, "config");
1114
1116
  o(this, "element");
1115
1117
  this.config = t;
@@ -1119,7 +1121,7 @@ class we {
1119
1121
  }
1120
1122
  mount(t, e) {
1121
1123
  const { content: n, parent: s } = this.config;
1122
- Tt(n) ? this.element = n : this.element = T(k(this.config.elementContext, tt(n))), this.element.mount(s);
1124
+ Ft(n) ? this.element = n : this.element = F(k(this.config.elementContext, et(n))), this.element.mount(s);
1123
1125
  }
1124
1126
  unmount(t = !1) {
1125
1127
  var e;
@@ -1196,7 +1198,7 @@ class ge {
1196
1198
  this.__view._elementContext.emitter.once(t, e);
1197
1199
  }
1198
1200
  emit(t, e) {
1199
- return this.__view._elementContext.emitter.emit(t, new Q(t, e));
1201
+ return this.__view._elementContext.emitter.emit(t, new tt(t, e));
1200
1202
  }
1201
1203
  attachStore(t) {
1202
1204
  if (t.attach(this.__view._elementContext))
@@ -1249,15 +1251,15 @@ class ge {
1249
1251
  }
1250
1252
  }
1251
1253
  outlet() {
1252
- return v("$outlet", { $children: this.__view._$children });
1254
+ return C("$outlet", { $children: this.__view._$children });
1253
1255
  }
1254
1256
  }
1255
1257
  var vt;
1256
1258
  vt = M;
1257
- const et = class et {
1259
+ const nt = class nt {
1258
1260
  constructor(t, e, n, s = []) {
1259
1261
  o(this, vt, !0);
1260
- o(this, "uniqueId", Z());
1262
+ o(this, "uniqueId", J());
1261
1263
  o(this, "_elementContext");
1262
1264
  o(this, "_logger");
1263
1265
  o(this, "_view");
@@ -1281,7 +1283,7 @@ const et = class et {
1281
1283
  this._logger.error({ error: i, eventName: u, args: c }), this._logger.crash(i);
1282
1284
  }), this._elementContext.emitter.on("*", (i, u) => {
1283
1285
  var c;
1284
- u instanceof Q && (u.propagationStopped || (c = this._elementContext.parent) == null || c.emitter.emit(i, u));
1286
+ u instanceof tt && (u.propagationStopped || (c = this._elementContext.parent) == null || c.emitter.emit(i, u));
1285
1287
  });
1286
1288
  }
1287
1289
  /*===============================*\
@@ -1302,7 +1304,7 @@ const et = class et {
1302
1304
  }
1303
1305
  setChildView(t) {
1304
1306
  this._childMarkup = [];
1305
- const e = new et(this._elementContext, t, {});
1307
+ const e = new nt(this._elementContext, t, {});
1306
1308
  return this._setChildren([e]), e;
1307
1309
  }
1308
1310
  /*===============================*\
@@ -1317,12 +1319,12 @@ const et = class et {
1317
1319
  throw n instanceof Error && this._logger.crash(n), n;
1318
1320
  }
1319
1321
  if (e !== null) if (e instanceof Node)
1320
- this._element = T(k(this._elementContext, v("$node", { value: e })));
1321
- else if (U(e) || kt(U, e))
1322
- this._element = T(k(this._elementContext, e));
1322
+ this._element = F(k(this._elementContext, C("$node", { value: e })));
1323
+ else if (R(e) || bt(R, e))
1324
+ this._element = F(k(this._elementContext, e));
1323
1325
  else if (m(e))
1324
- this._element = T(
1325
- k(this._elementContext, v("$observer", { sources: [e], renderFn: (n) => n }))
1326
+ this._element = F(
1327
+ k(this._elementContext, C("$observer", { sources: [e], renderFn: (n) => n }))
1326
1328
  );
1327
1329
  else {
1328
1330
  const n = new TypeError(
@@ -1332,12 +1334,12 @@ const et = class et {
1332
1334
  }
1333
1335
  }
1334
1336
  };
1335
- let j = et;
1336
- var Ct;
1337
- Ct = M;
1337
+ let j = nt;
1338
+ var xt;
1339
+ xt = M;
1338
1340
  class ye {
1339
1341
  constructor({ elementContext: t, $items: e, renderFn: n, keyFn: s }) {
1340
- o(this, Ct, !0);
1342
+ o(this, xt, !0);
1341
1343
  o(this, "node", document.createTextNode(""));
1342
1344
  o(this, "$items");
1343
1345
  o(this, "stopCallback");
@@ -1413,45 +1415,45 @@ class ye {
1413
1415
  function Se({ $value: r, $index: t, renderFn: e }, n) {
1414
1416
  return n.setName("@RepeatItem"), e.call(n, r, t, n);
1415
1417
  }
1416
- function U(r) {
1418
+ function R(r) {
1417
1419
  return (r == null ? void 0 : r[Lt]) === !0;
1418
1420
  }
1419
- function Tt(r) {
1421
+ function Ft(r) {
1420
1422
  return (r == null ? void 0 : r[M]) === !0;
1421
1423
  }
1422
- function tt(r) {
1423
- return A(r) || (r = [r]), r.flat(1 / 0).filter((t) => t != null && t !== !1).map((t) => U(t) ? t : t instanceof Node ? v("$node", { value: t }) : m(t) ? v("$observer", {
1424
+ function et(r) {
1425
+ return A(r) || (r = [r]), r.flat(1 / 0).filter((t) => t != null && t !== !1).map((t) => R(t) ? t : t instanceof Node ? C("$node", { value: t }) : m(t) ? C("$observer", {
1424
1426
  sources: [t],
1425
1427
  renderFn: (e) => e
1426
- }) : v("$text", { value: t }));
1428
+ }) : C("$text", { value: t }));
1427
1429
  }
1428
- function v(r, t, ...e) {
1429
- return new ve(r, t, ...e);
1430
+ function C(r, t, ...e) {
1431
+ return new Ce(r, t, ...e);
1430
1432
  }
1431
- var xt;
1432
- xt = Lt;
1433
- class ve {
1433
+ var Mt;
1434
+ Mt = Lt;
1435
+ class Ce {
1434
1436
  constructor(t, e, ...n) {
1435
- o(this, xt, !0);
1437
+ o(this, Mt, !0);
1436
1438
  o(this, "type");
1437
1439
  o(this, "props");
1438
1440
  o(this, "children");
1439
- this.type = t, this.props = e, this.children = tt(n);
1441
+ this.type = t, this.props = e, this.children = et(n);
1440
1442
  }
1441
1443
  }
1442
- const Pe = fe.bind(v);
1443
- function Te(r, t, e) {
1444
- return v("$observer", {
1444
+ const Ie = fe.bind(C);
1445
+ function qe(r, t, e) {
1446
+ return C("$observer", {
1445
1447
  sources: [r],
1446
1448
  renderFn: (n) => n && t ? t : !n && e ? e : null
1447
1449
  });
1448
1450
  }
1449
- function Ie(r, t, e) {
1450
- const n = J(r);
1451
- return v("$repeat", { $items: n, keyFn: t, renderFn: e });
1451
+ function je(r, t, e) {
1452
+ const n = X(r);
1453
+ return C("$repeat", { $items: n, keyFn: t, renderFn: e });
1452
1454
  }
1453
- function qe(r, t) {
1454
- return v("$portal", { parent: r, content: t });
1455
+ function Re(r, t) {
1456
+ return C("$portal", { parent: r, content: t });
1455
1457
  }
1456
1458
  function k(r, t) {
1457
1459
  return (A(t) ? t : [t]).map((n) => {
@@ -1461,11 +1463,11 @@ function k(r, t) {
1461
1463
  switch (n.type) {
1462
1464
  case "$node": {
1463
1465
  const s = n.props;
1464
- return new dt(s.value);
1466
+ return new pt(s.value);
1465
1467
  }
1466
1468
  case "$text": {
1467
1469
  const s = n.props;
1468
- return new dt(document.createTextNode(String(s.value)));
1470
+ return new pt(document.createTextNode(String(s.value)));
1469
1471
  }
1470
1472
  case "$repeat": {
1471
1473
  const s = n.props;
@@ -1510,54 +1512,52 @@ function k(r, t) {
1510
1512
  throw new TypeError(`Expected a string or view function. Got: ${n.type}`);
1511
1513
  });
1512
1514
  }
1513
- function T(r) {
1515
+ function F(r) {
1514
1516
  return r.length === 1 ? r[0] : new Pt(r);
1515
1517
  }
1516
1518
  function It(r) {
1517
- return r == null || r === !1 || b(r) || Gt(r) || U(r) || m(r) || kt(It, r);
1518
- }
1519
- function je(r, t) {
1520
- return t.outlet();
1519
+ return r == null || r === !1 || b(r) || Gt(r) || R(r) || m(r) || bt(It, r);
1521
1520
  }
1522
1521
  export {
1523
1522
  Zt as A,
1524
1523
  Oe as B,
1525
- Q as C,
1526
- T as D,
1524
+ tt as C,
1525
+ F as D,
1527
1526
  k as E,
1528
- We as F,
1527
+ Te as F,
1529
1528
  Et as G,
1530
- qe as H,
1531
- Ie as I,
1532
- Fe as J,
1533
- je as P,
1529
+ Re as H,
1530
+ Le as I,
1531
+ je as J,
1532
+ Fe as K,
1533
+ Pe as P,
1534
1534
  $e as S,
1535
1535
  j as V,
1536
- b as a,
1537
- Ae as b,
1538
- Y as c,
1539
- oe as d,
1540
- I as e,
1541
- ke as f,
1542
- Me as g,
1543
- xe as h,
1544
- bt as i,
1545
- Pe as j,
1546
- Te as k,
1536
+ Me as a,
1537
+ xe as b,
1538
+ be as c,
1539
+ Y as d,
1540
+ oe as e,
1541
+ b as f,
1542
+ Z as g,
1543
+ Ae as h,
1544
+ I as i,
1545
+ Ie as j,
1546
+ qe as k,
1547
1547
  D as l,
1548
1548
  Ve as m,
1549
- J as n,
1549
+ X as n,
1550
1550
  re as o,
1551
1551
  q as p,
1552
1552
  m as q,
1553
- Le as r,
1553
+ Ne as r,
1554
1554
  Ee as s,
1555
1555
  V as t,
1556
1556
  ue as u,
1557
1557
  he as v,
1558
1558
  H as w,
1559
1559
  le as x,
1560
- be as y,
1561
- v as z
1560
+ ke as y,
1561
+ C as z
1562
1562
  };
1563
- //# sourceMappingURL=passthrough-d2lcM0cd.js.map
1563
+ //# sourceMappingURL=markup-D1i09ddt.js.map