@reactive-web-components/rwc 2.63.7 → 2.63.8

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,20 +1,20 @@
1
- var lt = Object.defineProperty;
2
- var at = (s, t, e) => t in s ? lt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var f = (s, t, e) => at(s, typeof t != "symbol" ? t + "" : t, e);
4
- const F = (s) => s && typeof s == "object" && ("classList" in s || "attributes" in s || "customAttributes" in s || "reactiveClassList" in s || "listeners" in s || "customListeners" in s || "children" in s || "effects" in s || "ref" in s || "style" in s || Object.keys(s).some(
1
+ var at = Object.defineProperty;
2
+ var dt = (e, t, s) => t in e ? at(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var f = (e, t, s) => dt(e, typeof t != "symbol" ? t + "" : t, s);
4
+ const F = (e) => e && typeof e == "object" && ("classList" in e || "attributes" in e || "customAttributes" in e || "reactiveClassList" in e || "listeners" in e || "customListeners" in e || "children" in e || "effects" in e || "ref" in e || "style" in e || Object.keys(e).some(
5
5
  (t) => t.startsWith(".") || t.startsWith("@") || t.startsWith("$")
6
- )) && !("hostElement" in s), dt = (s) => s && typeof s == "object" && "hostElement" in s && "append" in s && "set" in s && "addStyle" in s && "setAttribute" in s && "addClass" in s && "addEffect" in s && "addReactiveContent" in s && "setReactiveContent" in s && "clear" in s, G = (s, t, ...e) => {
7
- t && t.apply(s, e);
6
+ )) && !("hostElement" in e), ht = (e) => e && typeof e == "object" && "hostElement" in e && "append" in e && "set" in e && "addStyle" in e && "setAttribute" in e && "addClass" in e && "addEffect" in e && "addReactiveContent" in e && "setReactiveContent" in e && "clear" in e, G = (e, t, ...s) => {
7
+ t && t.apply(e, s);
8
8
  };
9
9
  let z = !0;
10
- const C = (...s) => {
10
+ const C = (...e) => {
11
11
  z && console.debug(
12
- ["[rwc]", ...s].join(" | "),
13
- ...Array.from(s.join("").matchAll(/%c/gm)).map((t, e) => e % 2 === 0 ? "color:red" : "color:inherit")
12
+ ["[rwc]", ...e].join(" | "),
13
+ ...Array.from(e.join("").matchAll(/%c/gm)).map((t, s) => s % 2 === 0 ? "color:red" : "color:inherit")
14
14
  );
15
- }, N = (s) => s.replace(/([A-Z])/gm, (t) => `-${t.toLowerCase()}`), ht = (s) => s.replace(/-(\w)/gm, (t, e) => e.toUpperCase()), V = (s, ...t) => {
15
+ }, N = (e) => e.replace(/([A-Z])/gm, (t) => `-${t.toLowerCase()}`), ft = (e) => e.replace(/-(\w)/gm, (t, s) => s.toUpperCase()), V = (e, ...t) => {
16
16
  if (!z) return;
17
- const e = {
17
+ const s = {
18
18
  r: "color: #ff0000",
19
19
  // red
20
20
  g: "color: #00ff00",
@@ -31,73 +31,75 @@ const C = (...s) => {
31
31
  // orange
32
32
  w: "color: #808080"
33
33
  // gray (w for white/gray)
34
- }, n = s.match(/@[rgbpycow]/g) || [], o = n.map((i) => {
34
+ }, n = e.match(/@[rgbpycow]/g) || [], o = n.map((i) => {
35
35
  const c = i.slice(1);
36
- return e[c] || "color: inherit";
36
+ return s[c] || "color: inherit";
37
37
  });
38
- let r = s;
38
+ let r = e;
39
39
  n.forEach((i) => {
40
40
  const c = new RegExp(`\\${i}([^\\s,]+)`, "g");
41
41
  r = r.replace(c, "%c$1");
42
42
  }), console.log(r, ...o, ...t);
43
43
  }, kt = () => {
44
44
  z = !0;
45
- }, ft = () => {
45
+ }, ut = () => {
46
46
  z = !1;
47
47
  };
48
- ft();
49
- const Pt = (s, t) => {
50
- s.every(Boolean) && t(s);
48
+ ut();
49
+ const Pt = (e, t) => {
50
+ e.every(Boolean) && t(e);
51
+ }, st = (e) => {
52
+ if (e.status === "active") {
53
+ U(e), M.push(e);
54
+ try {
55
+ e();
56
+ } catch (t) {
57
+ console.error("Error in effect:", t);
58
+ } finally {
59
+ M.pop();
60
+ }
61
+ }
51
62
  }, k = /* @__PURE__ */ new Set();
52
63
  let K = !1;
53
- const ut = (s) => {
54
- s.status === "active" && k.add(s), K || (K = !0, queueMicrotask(() => {
64
+ const Ft = (e) => {
65
+ e.status === "active" && k.add(e), K || (K = !0, queueMicrotask(() => {
55
66
  K = !1, C("pendingEffects.size", k.size);
56
67
  const t = Array.from(k);
57
- k.clear(), t.forEach((e) => {
58
- if (e.status === "active") {
59
- U(e), O.push(e);
60
- try {
61
- e();
62
- } catch (n) {
63
- console.error("Error in effect:", n);
64
- } finally {
65
- O.pop();
66
- }
67
- }
68
+ k.clear(), t.forEach((s) => {
69
+ st(s);
68
70
  }), C("after ------ pendingEffects.size", k.size);
69
71
  }));
70
- }, O = [], U = (s) => {
71
- var t, e, n, o;
72
- (t = s.children) == null || t.forEach((r) => {
72
+ }, M = [], U = (e) => {
73
+ var t, s, n, o;
74
+ (t = e.children) == null || t.forEach((r) => {
73
75
  var i;
74
76
  return (i = r.destroy) == null ? void 0 : i.call(r);
75
- }), (e = s.children) == null || e.clear(), (n = s.cleanupSet) == null || n.forEach((r) => r()), (o = s.cleanupSet) == null || o.clear();
77
+ }), (s = e.children) == null || s.clear(), (n = e.cleanupSet) == null || n.forEach((r) => r()), (o = e.cleanupSet) == null || o.clear();
76
78
  };
77
- function j(s, t) {
78
- let e = (t == null ? void 0 : t.signalCompareFn) || (() => !0);
79
+ function j(e, t) {
80
+ let s = (t == null ? void 0 : t.signalCompareFn) || (() => !0);
79
81
  const n = /* @__PURE__ */ new Set();
80
82
  function o() {
81
83
  var i;
82
- const r = O[O.length - 1];
83
- return r && !r.fake && !n.has(r) && r.status === "active" && (n.add(r), (i = r.cleanupSet) == null || i.add(() => n.delete(r))), !(t != null && t.name) && (r != null && r.effectId) && o.setName(r.effectId), s;
84
+ const r = M[M.length - 1];
85
+ return r && !r.fake && !n.has(r) && r.status === "active" && (n.add(r), (i = r.cleanupSet) == null || i.add(() => n.delete(r))), !(t != null && t.name) && (r != null && r.effectId) && o.setName(r.effectId), e;
84
86
  }
85
87
  return o.signalId = `${(t == null ? void 0 : t.name) || ""}_${Math.random().toString(36).substring(2, 15)}`, o.setName = function(r) {
86
88
  return o.signalId = `${r}_${Math.random().toString(36).substring(2, 15)}`, o;
87
89
  }, o.setCompareFn = function(r) {
88
- return e = r, o;
90
+ return s = r, o;
89
91
  }, o.clearSubscribers = function() {
90
92
  n.clear();
91
93
  }, o.getSubscribers = function() {
92
94
  return n;
93
95
  }, o.peek = function() {
94
- return Object.freeze(s);
95
- }, o.initValue = Object.freeze(s), o.forceSet = function(r) {
96
- s = r, n.forEach((i) => ut(i));
97
- }, o.set = function(r, i = e) {
98
- s !== r && i(s, r) && o.forceSet(r);
96
+ return Object.freeze(e);
97
+ }, o.initValue = Object.freeze(e), o.forceSet = function(r) {
98
+ e = r, n.forEach((i) => queueMicrotask(() => st(i)));
99
+ }, o.set = function(r, i = s) {
100
+ e !== r && i(e, r) && o.forceSet(r);
99
101
  }, o.update = function(r) {
100
- o.set(r(s));
102
+ o.set(r(e));
101
103
  }, o.pipe = (r, i) => {
102
104
  i != null && i.name && o.setName(i.name);
103
105
  const c = j(null);
@@ -118,91 +120,91 @@ function j(s, t) {
118
120
  ), c;
119
121
  }, o;
120
122
  }
121
- function w(s, t) {
123
+ function w(e, t) {
122
124
  var r;
123
- const e = `${(t == null ? void 0 : t.name) || ""}_${Math.random().toString(36).substring(2, 15)}`;
124
- C("current effect", `%c${e}%c`);
125
- const n = s;
126
- n.status = "active", n.children = /* @__PURE__ */ new Set(), n.effectId = e;
127
- const o = O[O.length - 1];
125
+ const s = `${(t == null ? void 0 : t.name) || ""}_${Math.random().toString(36).substring(2, 15)}`;
126
+ C("current effect", `%c${s}%c`);
127
+ const n = e;
128
+ n.status = "active", n.children = /* @__PURE__ */ new Set(), n.effectId = s;
129
+ const o = M[M.length - 1];
128
130
  return o && ((r = o.children) == null || r.add(n), n.parent = new WeakRef(o), n.destroy = () => {
129
131
  var i;
130
132
  U(n), (i = o.children) == null || i.delete(n), n.destroy = void 0, n.status = "inactive";
131
- }), n.cleanupSet = /* @__PURE__ */ new Set(), O.push(n), n(), O.pop(), n;
133
+ }), n.cleanupSet = /* @__PURE__ */ new Set(), M.push(n), n(), M.pop(), n;
132
134
  }
133
- const g = (s) => !!s && ["object", "function"].includes(typeof s) && "set" in s && "update" in s && "forceSet" in s && "signalId" in s;
134
- function Ft(s, ...t) {
135
- const e = j("");
135
+ const g = (e) => !!e && ["object", "function"].includes(typeof e) && "set" in e && "update" in e && "forceSet" in e && "signalId" in e;
136
+ function Bt(e, ...t) {
137
+ const s = j("");
136
138
  return w(() => {
137
139
  const n = t.map(
138
140
  (r) => g(r) ? String(r()) : String(r)
139
- ), o = [s[0]];
141
+ ), o = [e[0]];
140
142
  n.forEach((r, i) => {
141
- o.push(r, s[i + 1]);
142
- }), e.set(o.join(""));
143
- }), e;
143
+ o.push(r, e[i + 1]);
144
+ }), s.set(o.join(""));
145
+ }), s;
144
146
  }
145
- function Bt(s, t) {
146
- const e = j(t ?? null), n = (o) => e.set(o);
147
- return s instanceof Promise ? s.then(n) : typeof s == "function" && w(() => {
148
- const o = s();
147
+ function Vt(e, t) {
148
+ const s = j(t ?? null), n = (o) => s.set(o);
149
+ return e instanceof Promise ? e.then(n) : typeof e == "function" && w(() => {
150
+ const o = e();
149
151
  o instanceof Promise ? o.then(n) : g(o) ? w(() => n(o())) : n(o);
150
- }), e;
152
+ }), s;
151
153
  }
152
- function Vt(s, t) {
153
- let e = s(), n = t();
154
+ function Nt(e, t) {
155
+ let s = e(), n = t();
154
156
  w(() => {
155
- const o = s(), r = t();
156
- o !== r && (o !== e ? t.set(o) : r !== n && s.set(r)), e = o, n = r;
157
+ const o = e(), r = t();
158
+ o !== r && (o !== s ? t.set(o) : r !== n && e.set(r)), s = o, n = r;
157
159
  });
158
160
  }
159
- function Nt(...s) {
160
- let t = s.map((n) => n());
161
- const e = j(t);
162
- return s.forEach((n, o) => {
161
+ function qt(...e) {
162
+ let t = e.map((n) => n());
163
+ const s = j(t);
164
+ return e.forEach((n, o) => {
163
165
  w(() => {
164
166
  const r = () => t.filter((i) => i !== void 0).length;
165
- r() === s.length && (t = Array.from(t).fill(void 0)), t[o] = n(), r() === s.length && e.set([...t]);
167
+ r() === e.length && (t = Array.from(t).fill(void 0)), t[o] = n(), r() === e.length && s.set([...t]);
166
168
  });
167
- }), e;
169
+ }), s;
168
170
  }
169
- const Jt = (...s) => {
171
+ const Jt = (...e) => {
170
172
  const t = j([]);
171
173
  return w(() => {
172
174
  t.set(
173
- s.map((e) => e())
175
+ e.map((s) => s())
174
176
  );
175
177
  }), t;
176
- }, qt = (s, t) => {
177
- let e = !0;
178
+ }, zt = (e, t) => {
179
+ let s = !0;
178
180
  const n = w(() => {
179
181
  var o;
180
- e && (e = !1, t(s()), (o = n.destroy) == null || o.call(n));
182
+ s && (s = !1, t(e()), (o = n.destroy) == null || o.call(n));
181
183
  });
182
- }, J = "eventProps", q = "EVENT_CONFIG", P = "observedAttributes", zt = () => (s, t) => {
183
- Reflect.get(s, P) || Reflect.defineProperty(s, P, {
184
+ }, q = "eventProps", J = "EVENT_CONFIG", P = "observedAttributes", Dt = () => (e, t) => {
185
+ Reflect.get(e, P) || Reflect.defineProperty(e, P, {
184
186
  value: []
185
- }), Reflect.get(s, P).push(
187
+ }), Reflect.get(e, P).push(
186
188
  N(t)
187
189
  );
188
- }, Dt = (s) => (t, e) => {
189
- Reflect.get(t, J) || Reflect.defineProperty(t, J, {
190
+ }, Gt = (e) => (t, s) => {
191
+ Reflect.get(t, q) || Reflect.defineProperty(t, q, {
190
192
  value: []
191
- }), Reflect.get(t, q) || Reflect.defineProperty(t, q, {
193
+ }), Reflect.get(t, J) || Reflect.defineProperty(t, J, {
192
194
  value: {}
193
- }), Reflect.get(t, q)[e] = {
194
- bubbles: (s == null ? void 0 : s.bubbles) ?? !1,
195
- composed: (s == null ? void 0 : s.composed) ?? !1
196
- }, Reflect.get(t, J).push(e);
197
- }, st = (s, t = !1) => (e) => {
195
+ }), Reflect.get(t, J)[s] = {
196
+ bubbles: (e == null ? void 0 : e.bubbles) ?? !1,
197
+ composed: (e == null ? void 0 : e.composed) ?? !1
198
+ }, Reflect.get(t, q).push(s);
199
+ }, nt = (e, t = !1) => (s) => {
198
200
  C(
199
- s,
201
+ e,
200
202
  "start register static attr",
201
- e.prototype[P]
203
+ s.prototype[P]
202
204
  );
203
205
  const n = [];
204
- if (e.styles) {
205
- const r = e.styles, i = [];
206
+ if (s.styles) {
207
+ const r = s.styles, i = [];
206
208
  Array.isArray(r) ? i.push(...r) : i.push(r), i.forEach((c) => {
207
209
  const a = new CSSStyleSheet();
208
210
  a.replaceSync(c), n.push(a);
@@ -210,32 +212,32 @@ const Jt = (...s) => {
210
212
  b.replaceSync(c.slice(c.indexOf("@property"))), document.adoptedStyleSheets.push(b);
211
213
  });
212
214
  }
213
- class o extends e {
215
+ class o extends s {
214
216
  constructor(...i) {
215
- C("constructor", `%c${s}%c`), super(t, ...i), n.length > 0 && this.shadow.adoptedStyleSheets.push(...n);
217
+ C("constructor", `%c${e}%c`), super(t, ...i), n.length > 0 && this.shadow.adoptedStyleSheets.push(...n);
216
218
  }
217
219
  render() {
218
- return C("rwc: render from new class"), e.prototype.render.call(this);
220
+ return C("rwc: render from new class"), s.prototype.render.call(this);
219
221
  }
220
222
  attributeChangedCallback(i, c, a) {
221
223
  C(
222
224
  "%cAttribute has changed.%c",
223
225
  `%c${i}%c`,
224
226
  `oldValue: ${c}, newValue: ${a}`,
225
- `%c${s}%c`
227
+ `%c${e}%c`
226
228
  );
227
229
  try {
228
230
  a = JSON.parse(a);
229
231
  } catch {
230
232
  }
231
- const b = ht(i);
233
+ const b = ft(i);
232
234
  if (b in this && g(this[b])) {
233
235
  const h = this[b];
234
236
  h.setName(i), a === null ? (h.set(h.initValue), this.removeAttribute(i)) : h.set(a);
235
237
  }
236
238
  G(
237
239
  this,
238
- e.prototype.attributeChangedCallback,
240
+ s.prototype.attributeChangedCallback,
239
241
  i,
240
242
  c,
241
243
  a
@@ -244,7 +246,7 @@ const Jt = (...s) => {
244
246
  connectedCallback() {
245
247
  const i = () => {
246
248
  var a, b;
247
- C("rwc: connectedCallback"), C("connectedCallback", `%c${s}%c`, this), (a = this.init) == null || a.call(this), this.providers && Object.keys(this.providers).length > 0 && (C("WRAPPER for providers", s), Object.entries(this.providers).forEach(
249
+ C("rwc: connectedCallback"), C("connectedCallback", `%c${e}%c`, this), (a = this.init) == null || a.call(this), this.providers && Object.keys(this.providers).length > 0 && (C("WRAPPER for providers", e), Object.entries(this.providers).forEach(
248
250
  ([h, d]) => {
249
251
  C("register provider", h, d()), this.addEventListener(h, (m) => {
250
252
  var u;
@@ -253,10 +255,10 @@ const Jt = (...s) => {
253
255
  ((u = p.detail) == null ? void 0 : u.context) === h && (p.stopPropagation(), p.detail.callback(d));
254
256
  });
255
257
  }
256
- )), this.checkInjects(), (b = e.prototype[J]) == null || b.forEach(
258
+ )), this.checkInjects(), (b = s.prototype[q]) == null || b.forEach(
257
259
  (h) => {
258
260
  this[h] = (d) => {
259
- const m = e.prototype[q][h], { bubbles: p, composed: u } = m;
261
+ const m = s.prototype[J][h], { bubbles: p, composed: u } = m;
260
262
  g(d) ? w(() => {
261
263
  V("@oemit reactive value", d()), this.dispatchEvent(
262
264
  new CustomEvent(h, {
@@ -274,13 +276,13 @@ const Jt = (...s) => {
274
276
  ));
275
277
  };
276
278
  }
277
- ), C("start render", `%c${s}%c`, s);
279
+ ), C("start render", `%c${e}%c`, e);
278
280
  const c = () => {
279
281
  C("rwc: insertRenderTemplate");
280
282
  const d = this.render().hostElement;
281
- d && this.shadow.appendChild(d), G(this, e.prototype.connectedCallback), this.appendSlotContent();
283
+ d && this.shadow.appendChild(d), G(this, s.prototype.connectedCallback), this.appendSlotContent();
282
284
  };
283
- if (this.rootStyle && !e.styles) {
285
+ if (this.rootStyle && !s.styles) {
284
286
  const h = (p) => p instanceof Promise || Array.isArray(p) && p.every((u) => u instanceof Promise), d = this.rootStyle, m = (p) => {
285
287
  const u = new CSSStyleSheet();
286
288
  u.replaceSync(p), this.shadow.adoptedStyleSheets.push(u);
@@ -328,15 +330,15 @@ const Jt = (...s) => {
328
330
  this.allSlotContent = [], this.slotContent = {}, this.htmlSlotContent = {}, this.effectSet.forEach((i) => {
329
331
  var c, a;
330
332
  return (a = (c = i.deref()) == null ? void 0 : c.destroy) == null ? void 0 : a.call(c);
331
- }), this.effectSet.clear(), this.shadow.replaceChildren(), this.replaceChildren(), G(this, e.prototype.disconnectedCallback);
333
+ }), this.effectSet.clear(), this.shadow.replaceChildren(), this.replaceChildren(), G(this, s.prototype.disconnectedCallback);
332
334
  }
333
335
  }
334
- return f(o, "observedAttributes", e.prototype[P] ?? []), f(o, "renderTagName", s), o.toString = () => s, customElements.get(s) ? console.error(
335
- `название тега ${s} повторяется, компонент ${e.name} не зарегистрирован`
336
- ) : customElements.define(s, o), e.renderTagName = s, e;
336
+ return f(o, "observedAttributes", s.prototype[P] ?? []), f(o, "renderTagName", e), o.toString = () => e, customElements.get(e) ? console.error(
337
+ `название тега ${e} повторяется, компонент ${s.name} не зарегистрирован`
338
+ ) : customElements.define(e, o), s.renderTagName = e, s;
337
339
  };
338
340
  class _ extends HTMLElement {
339
- constructor(e = !1) {
341
+ constructor(s = !1) {
340
342
  super();
341
343
  f(this, "init");
342
344
  f(this, "isSlotLazyLoading", !1);
@@ -352,38 +354,38 @@ class _ extends HTMLElement {
352
354
  f(this, "htmlSlotContent", {});
353
355
  f(this, "shadow");
354
356
  f(this, "injects", {});
355
- this.shadow = this.attachShadow({ mode: e ? "closed" : "open" });
357
+ this.shadow = this.attachShadow({ mode: s ? "closed" : "open" });
356
358
  }
357
359
  // @ts-expect-error - appendChild is not defined in the HTMLElement interface
358
- appendChild(e, n = !0) {
360
+ appendChild(s, n = !0) {
359
361
  var o;
360
362
  if (this.isSlotLazyLoading && n) {
361
- if (e instanceof HTMLElement) {
362
- const r = e.slot || "default";
363
- this.htmlSlotContent[r] || (this.htmlSlotContent[r] = []), (o = this.htmlSlotContent[r]) == null || o.push(e);
363
+ if (s instanceof HTMLElement) {
364
+ const r = s.slot || "default";
365
+ this.htmlSlotContent[r] || (this.htmlSlotContent[r] = []), (o = this.htmlSlotContent[r]) == null || o.push(s);
364
366
  }
365
- } else return super.appendChild(e);
367
+ } else return super.appendChild(s);
366
368
  }
367
369
  appendSlotContent() {
368
- var e;
369
- (e = this.appendAllSlotContent) == null || e.call(this);
370
+ var s;
371
+ (s = this.appendAllSlotContent) == null || s.call(this);
370
372
  }
371
- inject(e) {
372
- return C("%cinject%c", e), this.injects[e] || (this.injects[e] = j(null)), this.injects[e];
373
+ inject(s) {
374
+ return C("%cinject%c", s), this.injects[s] || (this.injects[s] = j(null)), this.injects[s];
373
375
  }
374
376
  checkInjects() {
375
- Object.entries(this.injects).forEach(([e, n]) => {
377
+ Object.entries(this.injects).forEach(([s, n]) => {
376
378
  C(
377
379
  "%cinject%c",
378
- `%c${e}%c`,
380
+ `%c${s}%c`,
379
381
  "from BaseElement (dispatch event)"
380
382
  ), this.shadow.dispatchEvent(
381
- new CustomEvent(e, {
383
+ new CustomEvent(s, {
382
384
  detail: {
383
- context: e,
385
+ context: s,
384
386
  callback: (o) => w(() => {
385
387
  n.set(o());
386
- }, { name: e })
388
+ }, { name: s })
387
389
  },
388
390
  bubbles: !0,
389
391
  composed: !0
@@ -391,33 +393,33 @@ class _ extends HTMLElement {
391
393
  );
392
394
  });
393
395
  }
394
- setReactiveValue(e) {
395
- this.modelValue = e;
396
+ setReactiveValue(s) {
397
+ this.modelValue = s;
396
398
  }
397
399
  }
398
400
  f(_, "observedAttributes", []), f(_, "renderTagName", ""), f(_, "styles");
399
- const Gt = (s) => "render" in s && "setReactiveValue" in s, pt = "handleSlotContext", X = "onConnected", nt = (s) => typeof s == "string" ? s : JSON.stringify(s), mt = (s) => {
401
+ const Kt = (e) => "render" in e && "setReactiveValue" in e, pt = "handleSlotContext", X = "onConnected", ot = (e) => typeof e == "string" ? e : JSON.stringify(e), mt = (e) => {
400
402
  const t = document.createElement("span");
401
- return t.textContent = nt(s), t;
402
- }, ot = (s, t) => (s.appendChild(mt(t)), s), Et = (s, t) => (s.replaceChildren(), ot(s, t)), Q = (s) => {
403
+ return t.textContent = ot(e), t;
404
+ }, rt = (e, t) => (e.appendChild(mt(t)), e), Et = (e, t) => (e.replaceChildren(), rt(e, t)), Q = (e) => {
403
405
  const t = document.createElement("span");
404
406
  return w(() => {
405
- const e = s();
406
- t.textContent = nt(e);
407
+ const s = e();
408
+ t.textContent = ot(s);
407
409
  }), t;
408
410
  };
409
- class rt {
411
+ class it {
410
412
  constructor(t) {
411
413
  f(this, "wrapper");
412
414
  f(this, "keyedEffects", /* @__PURE__ */ new Map());
413
- f(this, "append", (...t) => (t.forEach((e) => {
415
+ f(this, "append", (...t) => (t.forEach((s) => {
414
416
  var o;
415
- const n = e.hostElement;
417
+ const n = s.hostElement;
416
418
  n && ((o = this.hostElement) == null || o.appendChild(n), X in n && setTimeout(() => {
417
419
  var r;
418
420
  (r = n.onConnected) == null || r.call(
419
421
  n,
420
- e,
422
+ s,
421
423
  n
422
424
  );
423
425
  }));
@@ -425,76 +427,76 @@ class rt {
425
427
  f(this, "set", (...t) => {
426
428
  var n;
427
429
  this.clear();
428
- const e = document.createDocumentFragment();
430
+ const s = document.createDocumentFragment();
429
431
  return t.forEach((o) => {
430
432
  const r = o.hostElement;
431
- r && e.appendChild(r);
432
- }), (n = this.hostElement) == null || n.appendChild(e), this;
433
+ r && s.appendChild(r);
434
+ }), (n = this.hostElement) == null || n.appendChild(s), this;
433
435
  });
434
- f(this, "removeChild", (...t) => (t.forEach((e) => {
436
+ f(this, "removeChild", (...t) => (t.forEach((s) => {
435
437
  var n, o;
436
438
  if (Array.from(((n = this.hostElement) == null ? void 0 : n.childNodes.values()) || []).some(
437
- (r) => r === e.hostElement
439
+ (r) => r === s.hostElement
438
440
  )) {
439
- const r = e.hostElement;
441
+ const r = s.hostElement;
440
442
  r && ((o = this.hostElement) == null || o.removeChild(r));
441
443
  }
442
444
  }), this));
443
445
  f(this, "addHtmlContent", (t) => {
444
- const e = this.hostElement;
445
- return e ? (ot(e, t), this) : this;
446
+ const s = this.hostElement;
447
+ return s ? (rt(s, t), this) : this;
446
448
  });
447
449
  f(this, "setHtmlContent", (t) => {
448
- const e = this.hostElement;
449
- return e ? (Et(e, t), this) : this;
450
+ const s = this.hostElement;
451
+ return s ? (Et(s, t), this) : this;
450
452
  });
451
- f(this, "setAttribute", (t, e) => {
453
+ f(this, "setAttribute", (t, s) => {
452
454
  var r;
453
- C("setAttribute", t, e);
455
+ C("setAttribute", t, s);
454
456
  const n = this.hostElement;
455
457
  if (!n) return this;
456
458
  let o;
457
- if ((typeof e == "boolean" || e === null) && !(n instanceof _))
458
- if (e)
459
+ if ((typeof s == "boolean" || s === null) && !(n instanceof _))
460
+ if (s)
459
461
  o = "";
460
462
  else {
461
463
  this.removeAttribute(t);
462
464
  const i = t.toLowerCase();
463
465
  return i in n && (n[i] = null), this;
464
466
  }
465
- else typeof e != "string" ? o = JSON.stringify(e) : o = e;
467
+ else typeof s != "string" ? o = JSON.stringify(s) : o = s;
466
468
  if ((r = this.hostElement) == null || r.setAttribute(N(t), o), !(n instanceof _)) {
467
469
  const i = t.toLowerCase();
468
- i in n && (n[i] = e);
470
+ i in n && (n[i] = s);
469
471
  }
470
472
  return this;
471
473
  });
472
- f(this, "setCustomAttribute", (t, e) => {
474
+ f(this, "setCustomAttribute", (t, s) => {
473
475
  var o;
474
476
  let n;
475
- return typeof e != "string" ? n = JSON.stringify(e) : n = e, (o = this.hostElement) == null || o.setAttribute(N(t), n), this;
477
+ return typeof s != "string" ? n = JSON.stringify(s) : n = s, (o = this.hostElement) == null || o.setAttribute(N(t), n), this;
476
478
  });
477
- f(this, "setReactiveAttribute", (t, e) => (this.addEffect((n) => {
478
- C("setReactiveAttribute effect", t, e), n.setAttribute(t, e());
479
+ f(this, "setReactiveAttribute", (t, s) => (this.addEffect((n) => {
480
+ C("setReactiveAttribute effect", t, s), n.setAttribute(t, s());
479
481
  }, t), this));
480
- f(this, "setReactiveCustomAttribute", (t, e) => (this.addEffect((n) => {
481
- n.setCustomAttribute(t, e());
482
+ f(this, "setReactiveCustomAttribute", (t, s) => (this.addEffect((n) => {
483
+ n.setCustomAttribute(t, s());
482
484
  }), this));
483
485
  f(this, "removeAttribute", (t) => {
484
- var e;
485
- return (e = this.hostElement) == null || e.removeAttribute(N(t)), this;
486
+ var s;
487
+ return (s = this.hostElement) == null || s.removeAttribute(N(t)), this;
486
488
  });
487
489
  f(this, "addStyle", (t) => {
488
- const e = this.hostElement;
489
- return e ? (Object.entries(t).forEach(([n, o]) => {
490
+ const s = this.hostElement;
491
+ return s ? (Object.entries(t).forEach(([n, o]) => {
490
492
  const r = n.startsWith("--");
491
493
  typeof o == "function" ? this.addEffect(() => {
492
494
  if (r) {
493
495
  const i = String(o() || "");
494
- e.style.setProperty(n, i);
496
+ s.style.setProperty(n, i);
495
497
  } else
496
- e.style[n] = o();
497
- }) : typeof o == "string" && (r ? e.style.setProperty(n, o) : e.style[n] = o);
498
+ s.style[n] = o();
499
+ }) : typeof o == "string" && (r ? s.style.setProperty(n, o) : s.style[n] = o);
498
500
  }), this) : this;
499
501
  });
500
502
  f(this, "onConnected", (t) => this.hostElement ? (Reflect.defineProperty(this.hostElement, X, {
@@ -502,156 +504,156 @@ class rt {
502
504
  return t;
503
505
  }
504
506
  }), this) : this);
505
- f(this, "addClass", (...t) => (t.forEach((e) => {
507
+ f(this, "addClass", (...t) => (t.forEach((s) => {
506
508
  var n;
507
- typeof e == "string" ? (n = this.hostElement) == null || n.classList.add(
508
- ...e.split(" ").flatMap((o) => o.split(`
509
+ typeof s == "string" ? (n = this.hostElement) == null || n.classList.add(
510
+ ...s.split(" ").flatMap((o) => o.split(`
509
511
  `)).map((o) => o.trim()).filter(Boolean)
510
512
  ) : (() => {
511
513
  let o = null;
512
514
  this.addEffect(() => {
513
- const r = e();
515
+ const r = s();
514
516
  r.length > 0 && (o ? this.replaceClass(o, r) : this.addClass(r), o = r);
515
517
  });
516
518
  })();
517
519
  }), this));
518
520
  f(this, "setClass", (...t) => {
519
- var e, n, o;
520
- return (n = this.hostElement) == null || n.classList.remove(...((e = this.hostElement) == null ? void 0 : e.classList) || []), (o = this.hostElement) == null || o.classList.add(...t), this;
521
+ var s, n, o;
522
+ return (n = this.hostElement) == null || n.classList.remove(...((s = this.hostElement) == null ? void 0 : s.classList) || []), (o = this.hostElement) == null || o.classList.add(...t), this;
521
523
  });
522
- f(this, "addReactiveClass", (t) => (Object.keys(t).forEach((e) => {
524
+ f(this, "addReactiveClass", (t) => (Object.keys(t).forEach((s) => {
523
525
  this.addEffect((n) => {
524
- t[e]() ? n.addClass(e) : n.removeClass(e);
526
+ t[s]() ? n.addClass(s) : n.removeClass(s);
525
527
  });
526
528
  }), this));
527
529
  f(this, "removeClass", (...t) => {
528
- var e;
529
- return (e = this.hostElement) == null || e.classList.remove(...t), this;
530
+ var s;
531
+ return (s = this.hostElement) == null || s.classList.remove(...t), this;
530
532
  });
531
- f(this, "replaceClass", (t, e) => {
533
+ f(this, "replaceClass", (t, s) => {
532
534
  var n;
533
- return (n = this.hostElement) == null || n.classList.replace(t, e), this;
535
+ return (n = this.hostElement) == null || n.classList.replace(t, s), this;
534
536
  });
535
- f(this, "addEffect", (t, e) => {
537
+ f(this, "addEffect", (t, s) => {
536
538
  var r, i;
537
539
  const n = this.hostElement;
538
540
  if (!n) return this;
539
541
  const o = () => t(this, n);
540
- if (e) {
541
- const c = (r = this.keyedEffects.get(e)) == null ? void 0 : r.deref();
542
+ if (s) {
543
+ const c = (r = this.keyedEffects.get(s)) == null ? void 0 : r.deref();
542
544
  c && U(c);
543
545
  }
544
- return (i = n.effectSet) == null || i.add(new WeakRef(o)), o.component = this.wrapper, w(o, { name: (e == null ? void 0 : e.toString()) || n.tagName }), this;
546
+ return (i = n.effectSet) == null || i.add(new WeakRef(o)), o.component = this.wrapper, w(o, { name: (s == null ? void 0 : s.toString()) || n.tagName }), this;
545
547
  });
546
548
  f(this, "addReactiveContent", (t) => {
547
- var e;
548
- return (e = this.hostElement) == null || e.appendChild(Q(t)), this;
549
+ var s;
550
+ return (s = this.hostElement) == null || s.appendChild(Q(t)), this;
549
551
  });
550
552
  f(this, "setReactiveContent", (t) => {
551
- var e;
552
- return this.clear(), (e = this.hostElement) == null || e.appendChild(Q(t)), this;
553
+ var s;
554
+ return this.clear(), (s = this.hostElement) == null || s.appendChild(Q(t)), this;
553
555
  });
554
556
  f(this, "clear", () => {
555
557
  var t;
556
558
  return (t = this.hostElement) == null || t.replaceChildren(), this;
557
559
  });
558
560
  this.wrapper = t;
559
- const e = t.deref();
560
- e && (e.effectSet = /* @__PURE__ */ new Set());
561
+ const s = t.deref();
562
+ s && (s.effectSet = /* @__PURE__ */ new Set());
561
563
  }
562
564
  get hostElement() {
563
565
  return this.wrapper.deref();
564
566
  }
565
- addEventlistener(t, e, n = !1) {
567
+ addEventlistener(t, s, n = !1) {
566
568
  var o;
567
569
  return (o = this.hostElement) == null || o.addEventListener(
568
570
  t,
569
- (r) => e(r, this, this.hostElement),
571
+ (r) => s(r, this, this.hostElement),
570
572
  n
571
573
  ), this;
572
574
  }
573
575
  }
574
- class Ct extends rt {
576
+ class Ct extends it {
575
577
  constructor() {
576
578
  super(...arguments);
577
- f(this, "setReactiveValue", (e) => (this.hostElement instanceof _ && this.hostElement.setReactiveValue(e), this));
578
- f(this, "setSlotTemplate", (e) => {
579
+ f(this, "setReactiveValue", (s) => (this.hostElement instanceof _ && this.hostElement.setReactiveValue(s), this));
580
+ f(this, "setSlotTemplate", (s) => {
579
581
  var o;
580
582
  const n = (o = this.hostElement) == null ? void 0 : o.slotTemplate;
581
- return n && Object.entries(e).forEach(([r, i]) => {
583
+ return n && Object.entries(s).forEach(([r, i]) => {
582
584
  n[r] = i;
583
585
  }), this;
584
586
  });
585
587
  }
586
588
  }
587
- const Kt = () => () => {
588
- }, bt = (s) => new Ct(new WeakRef(s)), St = (s) => new rt(new WeakRef(s)), yt = (s, ...t) => ({
589
- classList: [...s.map((e) => e.trim()).filter(Boolean), ...t]
590
- }), Ut = (s, ...t) => yt(s, ...t), it = (s, t) => {
589
+ const Ut = () => () => {
590
+ }, bt = (e) => new Ct(new WeakRef(e)), St = (e) => new it(new WeakRef(e)), yt = (e, ...t) => ({
591
+ classList: [...e.map((s) => s.trim()).filter(Boolean), ...t]
592
+ }), Yt = (e, ...t) => yt(e, ...t), ct = (e, t) => {
591
593
  var o;
592
- if (!t || !s.deref()) return;
593
- const e = Object.keys(t || {}).filter(
594
+ if (!t || !e.deref()) return;
595
+ const s = Object.keys(t || {}).filter(
594
596
  (r) => r.startsWith(".") || r.startsWith("@") || r.startsWith("$")
595
597
  );
596
- e.filter((r) => r.startsWith(".")).forEach((r) => {
598
+ s.filter((r) => r.startsWith(".")).forEach((r) => {
597
599
  t != null && t.attributes || (t.attributes = {}), t.attributes[r.slice(1)] = t[r];
598
- }), e.filter((r) => r.startsWith("@")).forEach((r) => {
600
+ }), s.filter((r) => r.startsWith("@")).forEach((r) => {
599
601
  t != null && t.listeners || (t.listeners = {});
600
602
  const i = r.slice(1);
601
603
  t.listeners[i] = t[r];
602
- }), e.filter((r) => r.startsWith("$")).forEach((r) => {
604
+ }), s.filter((r) => r.startsWith("$")).forEach((r) => {
603
605
  t != null && t.effects || (t.effects = []), t.effects.push(t[r]);
604
606
  });
605
- const n = s.deref();
607
+ const n = e.deref();
606
608
  if (n)
607
609
  return Rt(n, t.classList), Lt(n, t.style), It(n, t.attributes), gt(n, t.reactiveClassList), At(n, t.customAttributes), vt(n, t.children), wt(n, t.effects), tt(n, t.listeners), tt(n, t.customListeners), (o = t.ref) == null || o.set(n), n;
608
- }, tt = (s, t) => {
609
- t && Object.entries(t).forEach(([e, n]) => {
610
- typeof n == "function" && s.addEventlistener(e, n);
610
+ }, tt = (e, t) => {
611
+ t && Object.entries(t).forEach(([s, n]) => {
612
+ typeof n == "function" && e.addEventlistener(s, n);
611
613
  });
612
- }, wt = (s, t) => t == null ? void 0 : t.forEach((e) => s.addEffect(e)), vt = (s, t) => D(new WeakRef(s), ...t || []) ?? s, At = (s, t) => {
613
- const e = t;
614
- e && Object.keys(e).forEach((n) => {
615
- g(e[n]) ? s.setReactiveCustomAttribute(n, e[n]) : typeof e[n] == "function" ? s.addEffect(() => {
616
- s.setCustomAttribute(n, e[n]());
617
- }) : s.setCustomAttribute(n, e[n]);
614
+ }, wt = (e, t) => t == null ? void 0 : t.forEach((s) => e.addEffect(s)), vt = (e, t) => D(new WeakRef(e), ...t || []) ?? e, At = (e, t) => {
615
+ const s = t;
616
+ s && Object.keys(s).forEach((n) => {
617
+ g(s[n]) ? e.setReactiveCustomAttribute(n, s[n]) : typeof s[n] == "function" ? e.addEffect(() => {
618
+ e.setCustomAttribute(n, s[n]());
619
+ }) : e.setCustomAttribute(n, s[n]);
618
620
  });
619
- }, Rt = (s, t) => s.addClass(...t || []), gt = (s, t) => s.addReactiveClass(t || {}), Lt = (s, t) => s.addStyle(t || {}), It = (s, t) => {
620
- const e = t, n = (o, r) => {
621
- r !== void 0 && (C("addAttribute", o, r), g(r) ? s.setReactiveAttribute(o, r) : typeof r == "function" ? s.addEffect(() => {
622
- s.setAttribute(o, r());
623
- }) : s.setAttribute(o, r));
621
+ }, Rt = (e, t) => e.addClass(...t || []), gt = (e, t) => e.addReactiveClass(t || {}), Lt = (e, t) => e.addStyle(t || {}), It = (e, t) => {
622
+ const s = t, n = (o, r) => {
623
+ r !== void 0 && (C("addAttribute", o, r), g(r) ? e.setReactiveAttribute(o, r) : typeof r == "function" ? e.addEffect(() => {
624
+ e.setAttribute(o, r());
625
+ }) : e.setAttribute(o, r));
624
626
  };
625
- e && Object.keys(e).forEach((o) => {
626
- n(o, e[o]);
627
+ s && Object.keys(s).forEach((o) => {
628
+ n(o, s[o]);
627
629
  });
628
- }, D = (s, ...t) => {
629
- const e = s.deref();
630
- if (e)
630
+ }, D = (e, ...t) => {
631
+ const s = e.deref();
632
+ if (s)
631
633
  return t.forEach((n) => {
632
- typeof n == "string" ? n.trim().length > 0 && e.addHtmlContent(n) : g(n) ? e.addReactiveContent(n) : e.append(n);
633
- }), e;
634
- }, W = (s, t) => {
635
- const e = document.createElement(s), n = St(e);
636
- return it(new WeakRef(n), t) ?? n;
637
- }, Y = (s, t) => {
638
- const [e, ...n] = s.split(" ").map((r) => r.trim()), o = W(e, t);
634
+ typeof n == "string" ? n.trim().length > 0 && s.addHtmlContent(n) : g(n) ? s.addReactiveContent(n) : s.append(n);
635
+ }), s;
636
+ }, W = (e, t) => {
637
+ const s = document.createElement(e), n = St(s);
638
+ return ct(new WeakRef(n), t) ?? n;
639
+ }, Y = (e, t) => {
640
+ const [s, ...n] = e.split(" ").map((r) => r.trim()), o = W(s, t);
639
641
  return n.length > 0 && o.addClass(...n), (...r) => D(
640
642
  new WeakRef(o),
641
643
  ...r.filter(Boolean).flat().flatMap(
642
- (i) => typeof i == "function" && !g(i) ? M(() => i(o)) : i
644
+ (i) => typeof i == "function" && !g(i) ? O(() => i(o)) : i
643
645
  )
644
646
  ) ?? o;
645
- }, M = (s) => {
647
+ }, O = (e) => {
646
648
  const t = `getSignalContent_${Math.random().toString(36).substring(2, 15)}`;
647
- return W("div").addStyle({ display: "contents" }).addEffect((e) => {
648
- e.clear(), D(new WeakRef(e), ...[s()].flat());
649
+ return W("div").addStyle({ display: "contents" }).addEffect((s) => {
650
+ s.clear(), D(new WeakRef(s), ...[e()].flat());
649
651
  }, t);
650
- }, Yt = (s, t, e) => {
652
+ }, Zt = (e, t, s) => {
651
653
  const n = W("div").addStyle({ display: "contents" }), o = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
652
654
  let a = [];
653
655
  const b = /* @__PURE__ */ new Set();
654
- let h = s.peek();
656
+ let h = e.peek();
655
657
  const d = (u) => {
656
658
  b.delete(u), o.delete(u), r.delete(u), i.delete(u), c.delete(u);
657
659
  }, m = (u) => {
@@ -662,7 +664,7 @@ const Kt = () => () => {
662
664
  return c.get(u);
663
665
  }, p = (u, y, x) => Array.from(x.children).indexOf(u) !== y;
664
666
  return w(() => {
665
- const u = s(), y = u.map(t).map((E) => typeof E == "string" ? E : E.toString()), x = new Set(y);
667
+ const u = e(), y = u.map(t).map((E) => typeof E == "string" ? E : E.toString()), x = new Set(y);
666
668
  c.clear(), y.forEach((E, S) => {
667
669
  c.set(E, S);
668
670
  }), a = y;
@@ -689,13 +691,13 @@ const Kt = () => () => {
689
691
  j(Math.random().toString(36).substring(2, 15))
690
692
  ), r.set(
691
693
  E,
692
- () => e(A, S, u).setCustomAttribute("data-key", E)
694
+ () => s(A, S, u).setCustomAttribute("data-key", E)
693
695
  );
694
696
  else if (T && JSON.stringify(A) !== JSON.stringify(T)) {
695
697
  const R = i.get(E);
696
698
  (v = o.get(E)) == null || v.set(Math.random().toString(36).substring(2, 15)), r.set(
697
699
  E,
698
- () => e(A, S, u).setCustomAttribute("data-key", E)
700
+ () => s(A, S, u).setCustomAttribute("data-key", E)
699
701
  ), R && R.parentNode && C("mark element for update", E);
700
702
  }
701
703
  }), h = [...u.map((E) => ({ ...E }))];
@@ -726,12 +728,12 @@ const Kt = () => () => {
726
728
  };
727
729
  Promise.resolve().then(() => B());
728
730
  }), n;
729
- }, Zt = (s) => {
730
- let t = [W("div")], e = !1;
731
+ }, Xt = (e) => {
732
+ let t = [W("div")], s = !1;
731
733
  return w(() => {
732
734
  var r, i;
733
- const n = s();
734
- e = Array.isArray(n);
735
+ const n = e();
736
+ s = Array.isArray(n);
735
737
  const o = [];
736
738
  o.push(...[n].flat()), o.length === 0 && o.push(
737
739
  W("div").addStyle({ display: "none" }).setAttribute("id", "empty_template")
@@ -756,47 +758,47 @@ const Kt = () => () => {
756
758
  } catch (c) {
757
759
  console.error(c);
758
760
  }
759
- }), e ? t : t[0];
760
- }, Xt = (s) => pt in s, Qt = (s) => {
761
- const t = Y("div")().addStyle({ display: "contents" }), e = (n) => {
761
+ }), s ? t : t[0];
762
+ }, Qt = (e) => pt in e, te = (e) => {
763
+ const t = Y("div")().addStyle({ display: "contents" }), s = (n) => {
762
764
  const o = t.hostElement;
763
765
  return o && (o.innerHTML = n), t;
764
766
  };
765
- return typeof s == "string" ? e(s) : t.addEffect(() => {
766
- e(s());
767
+ return typeof e == "string" ? s(e) : t.addEffect(() => {
768
+ s(e());
767
769
  }), t;
768
- }, ct = (s, t, e) => s ? M(t) : e ? M(e) : Y("div")().setAttribute("id", "empty_div_renderIf").addStyle({ display: "none" }), Ot = (s, t, e) => M(() => ct(!!s(), t, e)), te = (s, t, e) => typeof s == "boolean" ? ct(s, t, e) : Ot(s, t, e), et = (s, t) => M(t).addEffect((e, n) => {
769
- if (typeof s == "boolean")
770
- n.style.display = s ? "block" : "none";
770
+ }, lt = (e, t, s) => e ? O(t) : s ? O(s) : Y("div")().setAttribute("id", "empty_div_renderIf").addStyle({ display: "none" }), Mt = (e, t, s) => O(() => lt(!!e(), t, s)), ee = (e, t, s) => typeof e == "boolean" ? lt(e, t, s) : Mt(e, t, s), et = (e, t) => O(t).addEffect((s, n) => {
771
+ if (typeof e == "boolean")
772
+ n.style.display = e ? "block" : "none";
771
773
  else {
772
- const o = s() ? "block" : "none";
774
+ const o = e() ? "block" : "none";
773
775
  n.style.display = o;
774
776
  }
775
- }), ee = (s, t, e) => {
777
+ }), se = (e, t, s) => {
776
778
  const n = [
777
- et(s, t)
779
+ et(e, t)
778
780
  ].flat();
779
- return e && n.push(
781
+ return s && n.push(
780
782
  ...[
781
783
  et(
782
- () => typeof s == "boolean" ? !s : !s(),
783
- e
784
+ () => typeof e == "boolean" ? !e : !e(),
785
+ s
784
786
  )
785
787
  ].flat()
786
- ), M(() => n);
787
- }, Mt = (s, t) => {
788
- C("createCustomElement", s);
789
- const e = document.createElement(s), n = bt(e);
790
- return e.init = () => {
791
- it(new WeakRef(n), t);
788
+ ), O(() => n);
789
+ }, Ot = (e, t) => {
790
+ C("createCustomElement", e);
791
+ const s = document.createElement(e), n = bt(s);
792
+ return s.init = () => {
793
+ ct(new WeakRef(n), t);
792
794
  }, n;
793
- }, jt = (s, t) => {
794
- const e = s.split(" ").slice(1).map((o) => o.trim()), n = Mt(s.split(" ")[0], t);
795
- return Array.isArray(e) && e.length > 0 && n.addClass(...e), (...o) => {
795
+ }, jt = (e, t) => {
796
+ const s = e.split(" ").slice(1).map((o) => o.trim()), n = Ot(e.split(" ")[0], t);
797
+ return Array.isArray(s) && s.length > 0 && n.addClass(...s), (...o) => {
796
798
  const r = o.filter(Boolean).flat().flatMap(
797
- (c) => typeof c == "function" && !g(c) ? M(() => c(n)) : c
799
+ (c) => typeof c == "function" && !g(c) ? O(() => c(n)) : c
798
800
  ), i = n.hostElement;
799
- return i && (i.allSlotContent = r, i.slotContent = r.filter(dt).reduce(
801
+ return i && (i.allSlotContent = r, i.slotContent = r.filter(ht).reduce(
800
802
  (c, a) => {
801
803
  var h;
802
804
  const b = ((h = a.hostElement) == null ? void 0 : h.getAttribute("slot")) || "default";
@@ -807,23 +809,23 @@ const Kt = () => () => {
807
809
  D(new WeakRef(n), ...r);
808
810
  }), n;
809
811
  };
810
- }, $t = (s, t, e) => jt(
811
- `${s.renderTagName}${t && typeof t == "string" ? " " + t : ""}`,
812
- F(t) ? t : t && typeof t == "string" ? e : void 0
813
- ), se = () => {
814
- const s = () => {
812
+ }, $t = (e, t, s) => jt(
813
+ `${e.renderTagName}${t && typeof t == "string" ? " " + t : ""}`,
814
+ F(t) ? t : t && typeof t == "string" ? s : void 0
815
+ ), ne = () => {
816
+ const e = () => {
815
817
  };
816
- return s.oldValue = null, s;
817
- }, ne = () => ({}), Tt = (s, t, e) => {
818
- const n = t ? st(t, e)(s) : s;
818
+ return e.oldValue = null, e;
819
+ }, oe = () => ({}), Tt = (e, t, s) => {
820
+ const n = t ? nt(t, s)(e) : e;
819
821
  return (o, ...r) => {
820
822
  const i = [...r];
821
823
  return o && !F(o) && i.unshift(o), $t(n, F(o) ? o : {})(...i);
822
824
  };
823
- }, oe = (s) => [
824
- Tt(s),
825
- (t, e) => {
826
- st(t, e)(s);
825
+ }, re = (e) => [
826
+ Tt(e),
827
+ (t, s) => {
828
+ nt(t, s)(e);
827
829
  }
828
830
  ], l = {}, _t = [
829
831
  "div",
@@ -887,24 +889,24 @@ const Kt = () => () => {
887
889
  "canvas",
888
890
  "slot"
889
891
  ];
890
- _t.forEach((s) => {
891
- l[s] = (t, ...e) => {
892
- let n = [...e];
893
- return t && !F(t) && (n = [t].concat(n)), Y(s, F(t) ? t : {})(...n);
892
+ _t.forEach((e) => {
893
+ l[e] = (t, ...s) => {
894
+ let n = [...s];
895
+ return t && !F(t) && (n = [t].concat(n)), Y(e, F(t) ? t : {})(...n);
894
896
  };
895
897
  });
896
- const Wt = l.div, re = l.span, ie = l.section, ce = l.input, le = l.button, ae = l.table, de = l.tr, he = l.td, fe = l.th, ue = l.ul, pe = l.li, me = l.ol, Ee = l.form, Ce = l.label, be = l.select, Se = l.option, ye = l.textarea, we = l.img, ve = l.a, Ae = l.p, Re = l.h1, ge = l.h2, Le = l.h3, Ie = l.h4, Oe = l.h5, Me = l.h6, je = l.br, $e = l.hr, Te = l.pre, _e = l.code, We = l.nav, xe = l.header, He = l.footer, ke = l.main, Pe = l.aside, Fe = l.article, Be = l.figure, Ve = l.figcaption, Ne = l.blockquote, Je = l.cite, qe = l.small, ze = l.strong, De = l.em, Ge = l.b, Ke = l.i, Ue = l.u, Ye = l.s, Ze = l.sub, Xe = l.sup, Qe = l.mark, ts = l.del, es = l.ins, ss = l.details, ns = l.summary, os = l.progress, rs = l.meter, is = l.audio, cs = l.video, ls = l.canvas, as = l.slot, ds = (s) => (t) => s(t).addClass(...t.classList ?? []).addReactiveClass(t.reactiveClassList ?? {});
897
- function xt(s, t) {
898
- let e = 0;
898
+ const Wt = l.div, ie = l.span, ce = l.section, le = l.input, ae = l.button, de = l.table, he = l.tr, fe = l.td, ue = l.th, pe = l.ul, me = l.li, Ee = l.ol, Ce = l.form, be = l.label, Se = l.select, ye = l.option, we = l.textarea, ve = l.img, Ae = l.a, Re = l.p, ge = l.h1, Le = l.h2, Ie = l.h3, Me = l.h4, Oe = l.h5, je = l.h6, $e = l.br, Te = l.hr, _e = l.pre, We = l.code, xe = l.nav, He = l.header, ke = l.footer, Pe = l.main, Fe = l.aside, Be = l.article, Ve = l.figure, Ne = l.figcaption, qe = l.blockquote, Je = l.cite, ze = l.small, De = l.strong, Ge = l.em, Ke = l.b, Ue = l.i, Ye = l.u, Ze = l.s, Xe = l.sub, Qe = l.sup, ts = l.mark, es = l.del, ss = l.ins, ns = l.details, os = l.summary, rs = l.progress, is = l.meter, cs = l.audio, ls = l.video, as = l.canvas, ds = l.slot, hs = (e) => (t) => e(t).addClass(...t.classList ?? []).addReactiveClass(t.reactiveClassList ?? {});
899
+ function xt(e, t) {
900
+ let s = 0;
899
901
  return (...n) => {
900
902
  const o = Date.now();
901
- o - e >= t && (s(...n), e = o);
903
+ o - s >= t && (e(...n), s = o);
902
904
  };
903
905
  }
904
- const hs = (s, t) => M(() => {
905
- const e = s();
906
+ const fs = (e, t) => O(() => {
907
+ const s = e();
906
908
  let n = null;
907
- return e.map(
909
+ return s.map(
908
910
  (o, r) => Wt(
909
911
  {
910
912
  "@dragstart": (i, c, a) => {
@@ -928,21 +930,21 @@ const hs = (s, t) => M(() => {
928
930
  }
929
931
  }, 200)
930
932
  },
931
- t(o, r, [...s.peek()])
933
+ t(o, r, [...e.peek()])
932
934
  )
933
935
  );
934
- }), fs = (s, t, e) => {
936
+ }), us = (e, t, s) => {
935
937
  let n = [], o = [];
936
938
  const r = W("div").addStyle({ display: "contents" }), i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
937
939
  return w(() => {
938
- const a = s(), b = a.map(t);
940
+ const a = e(), b = a.map(t);
939
941
  o.filter((d) => !b.includes(d)).forEach((d) => {
940
942
  var m, p;
941
943
  i.delete(d), (p = (m = r.hostElement) == null ? void 0 : m.querySelector(`[data-key="${d}"]`)) == null || p.remove();
942
944
  }), b.forEach((d, m) => {
943
945
  o.includes(d) || i.set(
944
946
  d,
945
- () => e(a[m], m, a).setCustomAttribute(
947
+ () => s(a[m], m, a).setCustomAttribute(
946
948
  "data-key",
947
949
  d
948
950
  )
@@ -951,7 +953,7 @@ const hs = (s, t) => M(() => {
951
953
  var p;
952
954
  if (o.includes(d)) {
953
955
  JSON.stringify(n[o.indexOf(d)]) !== JSON.stringify(a[m]) && ((p = c.get(d)) == null || p.set({
954
- templateFunc: () => e(a[m], m, a),
956
+ templateFunc: () => s(a[m], m, a),
955
957
  items: a,
956
958
  itemsKey: b,
957
959
  index: m
@@ -961,7 +963,7 @@ const hs = (s, t) => M(() => {
961
963
  c.set(
962
964
  d,
963
965
  j({
964
- templateFunc: () => e(a[m], m, a),
966
+ templateFunc: () => s(a[m], m, a),
965
967
  items: a,
966
968
  itemsKey: b,
967
969
  index: m
@@ -994,125 +996,126 @@ const hs = (s, t) => M(() => {
994
996
  };
995
997
  export {
996
998
  _ as BaseElement,
997
- ve as a,
999
+ Ae as a,
998
1000
  It as addAttributeList,
999
1001
  Rt as addClassList,
1000
1002
  At as addCustomAttributes,
1001
1003
  gt as addReactiveClassList,
1002
1004
  Lt as addStyleList,
1003
1005
  D as appendContentItem,
1004
- Fe as article,
1005
- Pe as aside,
1006
- is as audio,
1007
- Ge as b,
1008
- Vt as bindReactiveSignals,
1009
- Ne as blockquote,
1010
- je as br,
1011
- le as button,
1006
+ Be as article,
1007
+ Fe as aside,
1008
+ cs as audio,
1009
+ Ke as b,
1010
+ Nt as bindReactiveSignals,
1011
+ qe as blockquote,
1012
+ $e as br,
1013
+ ae as button,
1012
1014
  N as camelToKebab,
1013
- ls as canvas,
1015
+ as as canvas,
1014
1016
  G as checkCall,
1015
1017
  Pt as checkRef,
1016
1018
  Je as cite,
1017
1019
  yt as classList,
1018
- Ut as cls,
1019
- _e as code,
1020
+ Yt as cls,
1021
+ We as code,
1020
1022
  V as colorLog,
1021
1023
  Jt as combineLatest,
1022
- st as component,
1023
- oe as configCustomComponent,
1024
- ds as createComponent,
1024
+ nt as component,
1025
+ re as configCustomComponent,
1026
+ hs as createComponent,
1025
1027
  $t as createCustom,
1026
1028
  jt as createCustomEl,
1027
- Mt as createCustomElement,
1029
+ Ot as createCustomElement,
1028
1030
  Y as createEl,
1029
1031
  W as createElement,
1030
- Bt as createSignal,
1032
+ Vt as createSignal,
1031
1033
  bt as customElementHelpers,
1032
- hs as ddList,
1033
- ne as defineSlotTemplate,
1034
- ts as del,
1035
- ss as details,
1036
- ft as disableLogs,
1034
+ fs as ddList,
1035
+ oe as defineSlotTemplate,
1036
+ es as del,
1037
+ ns as details,
1038
+ ut as disableLogs,
1037
1039
  Wt as div,
1038
1040
  w as effect,
1039
1041
  St as elementHelpers,
1040
- De as em,
1042
+ Ge as em,
1041
1043
  kt as enableLogs,
1042
- Dt as event,
1043
- Kt as eventEmitter,
1044
- Ve as figcaption,
1045
- Be as figure,
1046
- qt as firstUpdate,
1047
- He as footer,
1048
- Nt as forkJoin,
1049
- Ee as form,
1050
- fs as getList,
1051
- M as getSignalContent,
1052
- Re as h1,
1053
- ge as h2,
1054
- Le as h3,
1055
- Ie as h4,
1044
+ Gt as event,
1045
+ Ut as eventEmitter,
1046
+ Ne as figcaption,
1047
+ Ve as figure,
1048
+ zt as firstUpdate,
1049
+ ke as footer,
1050
+ qt as forkJoin,
1051
+ Ce as form,
1052
+ us as getList,
1053
+ O as getSignalContent,
1054
+ ge as h1,
1055
+ Le as h2,
1056
+ Ie as h3,
1057
+ Me as h4,
1056
1058
  Oe as h5,
1057
- Me as h6,
1058
- xe as header,
1059
- $e as hr,
1060
- Ke as i,
1061
- we as img,
1062
- it as initComponent,
1063
- ce as input,
1064
- es as ins,
1065
- Gt as isBaseElement,
1066
- dt as isComponentConfig,
1059
+ je as h6,
1060
+ He as header,
1061
+ Te as hr,
1062
+ Ue as i,
1063
+ ve as img,
1064
+ ct as initComponent,
1065
+ le as input,
1066
+ ss as ins,
1067
+ Kt as isBaseElement,
1068
+ ht as isComponentConfig,
1067
1069
  F as isComponentInitConfig,
1068
1070
  g as isReactiveSignal,
1069
- Xt as isSlotTemplate,
1070
- ht as kebabToCamel,
1071
- Ce as label,
1072
- pe as li,
1073
- ke as main,
1074
- Qe as mark,
1075
- rs as meter,
1076
- We as nav,
1077
- se as newEventEmitter,
1078
- me as ol,
1079
- Yt as oldGetList,
1080
- Se as option,
1081
- Ae as p,
1082
- Te as pre,
1083
- os as progress,
1071
+ Qt as isSlotTemplate,
1072
+ ft as kebabToCamel,
1073
+ be as label,
1074
+ me as li,
1075
+ Pe as main,
1076
+ ts as mark,
1077
+ is as meter,
1078
+ xe as nav,
1079
+ ne as newEventEmitter,
1080
+ Ee as ol,
1081
+ Zt as oldGetList,
1082
+ ye as option,
1083
+ Re as p,
1084
+ _e as pre,
1085
+ rs as progress,
1084
1086
  C as projectLog,
1085
- zt as property,
1087
+ Dt as property,
1086
1088
  U as removeEffect,
1087
- ct as renderIf,
1088
- Ft as rs,
1089
- Ot as rxRenderIf,
1090
- Ye as s,
1091
- ie as section,
1092
- be as select,
1089
+ lt as renderIf,
1090
+ Bt as rs,
1091
+ Mt as rxRenderIf,
1092
+ Ze as s,
1093
+ ce as section,
1094
+ Se as select,
1093
1095
  vt as setChildren,
1094
1096
  wt as setEffects,
1095
1097
  tt as setListeners,
1096
- ee as show,
1098
+ Ft as sheduleEffect,
1099
+ se as show,
1097
1100
  et as showIf,
1098
1101
  j as signal,
1099
- Zt as signalComponent,
1100
- as as slot,
1101
- qe as small,
1102
- re as span,
1103
- ze as strong,
1104
- Ze as sub,
1105
- ns as summary,
1106
- Xe as sup,
1107
- ae as table,
1108
- he as td,
1109
- ye as textarea,
1110
- fe as th,
1111
- de as tr,
1112
- Ue as u,
1113
- ue as ul,
1114
- Qt as unsafeHtml,
1102
+ Xt as signalComponent,
1103
+ ds as slot,
1104
+ ze as small,
1105
+ ie as span,
1106
+ De as strong,
1107
+ Xe as sub,
1108
+ os as summary,
1109
+ Qe as sup,
1110
+ de as table,
1111
+ fe as td,
1112
+ we as textarea,
1113
+ ue as th,
1114
+ he as tr,
1115
+ Ye as u,
1116
+ pe as ul,
1117
+ te as unsafeHtml,
1115
1118
  Tt as useCustomComponent,
1116
- cs as video,
1117
- te as when
1119
+ ls as video,
1120
+ ee as when
1118
1121
  };