@reactive-web-components/rwc 2.61.10 → 2.63.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -1
- package/package.json +5 -5
- package/{reactive-web-component.f_B19_fm.js → reactive-web-component.BmjLtNib.js} +391 -396
- package/reactive-web-component.Bx_Hbzlr.umd.cjs +2 -0
- package/shared/types/element.d.ts +1 -0
- package/shared/utils/signal/signal.d.ts +1 -1
- package/shared/utils/signal/utils.d.ts +6 -0
- package/reactive-web-component.rx6nheib.umd.cjs +0 -2
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var f = (s, 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 || "style" in s || Object.keys(s).some(
|
|
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(
|
|
5
5
|
(t) => t.startsWith(".") || t.startsWith("@") || t.startsWith("$")
|
|
6
|
-
)) && !("hostElement" in s),
|
|
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
7
|
t && t.apply(s, e);
|
|
8
8
|
};
|
|
9
9
|
let z = !0;
|
|
10
|
-
const
|
|
10
|
+
const C = (...s) => {
|
|
11
11
|
z && console.debug(
|
|
12
12
|
["[rwc]", ...s].join(" | "),
|
|
13
13
|
...Array.from(s.join("").matchAll(/%c/gm)).map((t, e) => e % 2 === 0 ? "color:red" : "color:inherit")
|
|
14
14
|
);
|
|
15
|
-
},
|
|
15
|
+
}, N = (s) => s.replace(/([A-Z])/gm, (t) => `-${t.toLowerCase()}`), ht = (s) => s.replace(/-(\w)/gm, (t, e) => e.toUpperCase()), V = (s, ...t) => {
|
|
16
16
|
if (!z) return;
|
|
17
17
|
const e = {
|
|
18
18
|
r: "color: #ff0000",
|
|
@@ -31,70 +31,56 @@ const S = (...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((
|
|
35
|
-
const
|
|
36
|
-
return e[
|
|
34
|
+
}, n = s.match(/@[rgbpycow]/g) || [], o = n.map((i) => {
|
|
35
|
+
const c = i.slice(1);
|
|
36
|
+
return e[c] || "color: inherit";
|
|
37
37
|
});
|
|
38
38
|
let r = s;
|
|
39
|
-
n.forEach((
|
|
40
|
-
const
|
|
41
|
-
r = r.replace(
|
|
39
|
+
n.forEach((i) => {
|
|
40
|
+
const c = new RegExp(`\\${i}([^\\s,]+)`, "g");
|
|
41
|
+
r = r.replace(c, "%c$1");
|
|
42
42
|
}), console.log(r, ...o, ...t);
|
|
43
|
-
},
|
|
43
|
+
}, kt = () => {
|
|
44
44
|
z = !0;
|
|
45
|
-
},
|
|
45
|
+
}, ft = () => {
|
|
46
46
|
z = !1;
|
|
47
47
|
};
|
|
48
|
-
|
|
49
|
-
const
|
|
48
|
+
ft();
|
|
49
|
+
const Pt = (s, t) => {
|
|
50
50
|
s.every(Boolean) && t(s);
|
|
51
51
|
}, k = /* @__PURE__ */ new Set();
|
|
52
|
-
let
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
K = !
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
console.error("Error in effect:", e);
|
|
67
|
-
} finally {
|
|
68
|
-
O.pop();
|
|
69
|
-
}
|
|
52
|
+
let K = !1;
|
|
53
|
+
const ut = (s) => {
|
|
54
|
+
s.status === "active" && k.add(s), K || (K = !0, queueMicrotask(() => {
|
|
55
|
+
K = !1, C("pendingEffects.size", k.size);
|
|
56
|
+
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();
|
|
70
66
|
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
function Et() {
|
|
78
|
-
queueMicrotask(mt);
|
|
79
|
-
}
|
|
80
|
-
const nt = () => {
|
|
81
|
-
Y || (Y = !0, Et());
|
|
82
|
-
}, Ct = (s) => {
|
|
83
|
-
k.add(s), nt();
|
|
84
|
-
}, O = [], Z = (s) => {
|
|
67
|
+
}
|
|
68
|
+
}), C("after ------ pendingEffects.size", k.size);
|
|
69
|
+
}));
|
|
70
|
+
}, O = [], U = (s) => {
|
|
85
71
|
var t, e, n, o;
|
|
86
72
|
(t = s.children) == null || t.forEach((r) => {
|
|
87
|
-
var
|
|
88
|
-
return (
|
|
73
|
+
var i;
|
|
74
|
+
return (i = r.destroy) == null ? void 0 : i.call(r);
|
|
89
75
|
}), (e = s.children) == null || e.clear(), (n = s.cleanupSet) == null || n.forEach((r) => r()), (o = s.cleanupSet) == null || o.clear();
|
|
90
76
|
};
|
|
91
77
|
function j(s, t) {
|
|
92
78
|
let e = (t == null ? void 0 : t.signalCompareFn) || (() => !0);
|
|
93
79
|
const n = /* @__PURE__ */ new Set();
|
|
94
80
|
function o() {
|
|
95
|
-
var
|
|
81
|
+
var i;
|
|
96
82
|
const r = O[O.length - 1];
|
|
97
|
-
return r && !r.fake && !n.has(r) && r.status === "active" && (n.add(r), (
|
|
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;
|
|
98
84
|
}
|
|
99
85
|
return o.signalId = `${(t == null ? void 0 : t.name) || ""}_${Math.random().toString(36).substring(2, 15)}`, o.setName = function(r) {
|
|
100
86
|
return o.signalId = `${r}_${Math.random().toString(36).substring(2, 15)}`, o;
|
|
@@ -107,93 +93,99 @@ function j(s, t) {
|
|
|
107
93
|
}, o.peek = function() {
|
|
108
94
|
return Object.freeze(s);
|
|
109
95
|
}, o.initValue = Object.freeze(s), o.forceSet = function(r) {
|
|
110
|
-
s = r, n.forEach((
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}, o.set = function(r, c = e) {
|
|
114
|
-
s !== r && c(s, r) && o.forceSet(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);
|
|
115
99
|
}, o.update = function(r) {
|
|
116
100
|
o.set(r(s));
|
|
117
|
-
}, o.pipe = (r,
|
|
118
|
-
|
|
119
|
-
const
|
|
101
|
+
}, o.pipe = (r, i) => {
|
|
102
|
+
i != null && i.name && o.setName(i.name);
|
|
103
|
+
const c = j(null);
|
|
120
104
|
return w(
|
|
121
105
|
() => {
|
|
122
106
|
const a = o();
|
|
123
107
|
w(
|
|
124
108
|
() => {
|
|
125
109
|
const h = r(a);
|
|
126
|
-
h instanceof Promise ? h.then((m) =>
|
|
110
|
+
h instanceof Promise ? h.then((m) => c.set(m)) : g(h) ? w(() => c.set(h()), {
|
|
127
111
|
name: "pipe_effect_inner"
|
|
128
|
-
}) :
|
|
112
|
+
}) : c.set(h);
|
|
129
113
|
},
|
|
130
114
|
{ name: "pipe_effect" }
|
|
131
115
|
);
|
|
132
116
|
},
|
|
133
|
-
{ name: (
|
|
134
|
-
),
|
|
117
|
+
{ name: (i == null ? void 0 : i.name) || `pipe_${o.signalId}` }
|
|
118
|
+
), c;
|
|
135
119
|
}, o;
|
|
136
120
|
}
|
|
137
121
|
function w(s, t) {
|
|
138
122
|
var r;
|
|
139
123
|
const e = `${(t == null ? void 0 : t.name) || ""}_${Math.random().toString(36).substring(2, 15)}`;
|
|
140
|
-
|
|
124
|
+
C("current effect", `%c${e}%c`);
|
|
141
125
|
const n = s;
|
|
142
126
|
n.status = "active", n.children = /* @__PURE__ */ new Set(), n.effectId = e;
|
|
143
127
|
const o = O[O.length - 1];
|
|
144
|
-
o && ((r = o.children) == null || r.add(n), n.parent = new WeakRef(o), n.destroy = () => {
|
|
145
|
-
var
|
|
146
|
-
|
|
147
|
-
}), n.cleanupSet = /* @__PURE__ */ new Set(), O.push(n), n(), O.pop();
|
|
128
|
+
return o && ((r = o.children) == null || r.add(n), n.parent = new WeakRef(o), n.destroy = () => {
|
|
129
|
+
var i;
|
|
130
|
+
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;
|
|
148
132
|
}
|
|
149
133
|
const g = (s) => !!s && ["object", "function"].includes(typeof s) && "set" in s && "update" in s && "forceSet" in s && "signalId" in s;
|
|
150
|
-
function
|
|
134
|
+
function Ft(s, ...t) {
|
|
151
135
|
const e = j("");
|
|
152
136
|
return w(() => {
|
|
153
137
|
const n = t.map(
|
|
154
138
|
(r) => g(r) ? String(r()) : String(r)
|
|
155
139
|
), o = [s[0]];
|
|
156
|
-
n.forEach((r,
|
|
157
|
-
o.push(r, s[
|
|
140
|
+
n.forEach((r, i) => {
|
|
141
|
+
o.push(r, s[i + 1]);
|
|
158
142
|
}), e.set(o.join(""));
|
|
159
143
|
}), e;
|
|
160
144
|
}
|
|
161
|
-
function
|
|
145
|
+
function Bt(s, t) {
|
|
162
146
|
const e = j(t ?? null), n = (o) => e.set(o);
|
|
163
147
|
return s instanceof Promise ? s.then(n) : typeof s == "function" && w(() => {
|
|
164
148
|
const o = s();
|
|
165
149
|
o instanceof Promise ? o.then(n) : g(o) ? w(() => n(o())) : n(o);
|
|
166
150
|
}), e;
|
|
167
151
|
}
|
|
168
|
-
function
|
|
152
|
+
function Vt(s, t) {
|
|
169
153
|
let e = s(), n = t();
|
|
170
154
|
w(() => {
|
|
171
155
|
const o = s(), r = t();
|
|
172
156
|
o !== r && (o !== e ? t.set(o) : r !== n && s.set(r)), e = o, n = r;
|
|
173
157
|
});
|
|
174
158
|
}
|
|
175
|
-
function
|
|
159
|
+
function Nt(...s) {
|
|
176
160
|
let t = s.map((n) => n());
|
|
177
161
|
const e = j(t);
|
|
178
162
|
return s.forEach((n, o) => {
|
|
179
163
|
w(() => {
|
|
180
|
-
const r = () => t.filter((
|
|
164
|
+
const r = () => t.filter((i) => i !== void 0).length;
|
|
181
165
|
r() === s.length && (t = Array.from(t).fill(void 0)), t[o] = n(), r() === s.length && e.set([...t]);
|
|
182
166
|
});
|
|
183
167
|
}), e;
|
|
184
168
|
}
|
|
185
|
-
const
|
|
169
|
+
const Jt = (...s) => {
|
|
186
170
|
const t = j([]);
|
|
187
171
|
return w(() => {
|
|
188
|
-
t.set(
|
|
172
|
+
t.set(
|
|
173
|
+
s.map((e) => e())
|
|
174
|
+
);
|
|
189
175
|
}), t;
|
|
190
|
-
},
|
|
176
|
+
}, qt = (s, t) => {
|
|
177
|
+
let e = !0;
|
|
178
|
+
const n = w(() => {
|
|
179
|
+
var o;
|
|
180
|
+
e && (e = !1, t(s()), (o = n.destroy) == null || o.call(n));
|
|
181
|
+
});
|
|
182
|
+
}, J = "eventProps", q = "EVENT_CONFIG", P = "observedAttributes", zt = () => (s, t) => {
|
|
191
183
|
Reflect.get(s, P) || Reflect.defineProperty(s, P, {
|
|
192
184
|
value: []
|
|
193
185
|
}), Reflect.get(s, P).push(
|
|
194
|
-
|
|
186
|
+
N(t)
|
|
195
187
|
);
|
|
196
|
-
},
|
|
188
|
+
}, Dt = (s) => (t, e) => {
|
|
197
189
|
Reflect.get(t, J) || Reflect.defineProperty(t, J, {
|
|
198
190
|
value: []
|
|
199
191
|
}), Reflect.get(t, q) || Reflect.defineProperty(t, q, {
|
|
@@ -202,78 +194,78 @@ const Gt = (...s) => {
|
|
|
202
194
|
bubbles: (s == null ? void 0 : s.bubbles) ?? !1,
|
|
203
195
|
composed: (s == null ? void 0 : s.composed) ?? !1
|
|
204
196
|
}, Reflect.get(t, J).push(e);
|
|
205
|
-
},
|
|
206
|
-
|
|
197
|
+
}, st = (s, t = !1) => (e) => {
|
|
198
|
+
C(
|
|
207
199
|
s,
|
|
208
200
|
"start register static attr",
|
|
209
201
|
e.prototype[P]
|
|
210
202
|
);
|
|
211
203
|
const n = [];
|
|
212
204
|
if (e.styles) {
|
|
213
|
-
const r = e.styles,
|
|
214
|
-
Array.isArray(r) ?
|
|
205
|
+
const r = e.styles, i = [];
|
|
206
|
+
Array.isArray(r) ? i.push(...r) : i.push(r), i.forEach((c) => {
|
|
215
207
|
const a = new CSSStyleSheet();
|
|
216
|
-
a.replaceSync(
|
|
217
|
-
const
|
|
218
|
-
|
|
208
|
+
a.replaceSync(c), n.push(a);
|
|
209
|
+
const b = new CSSStyleSheet();
|
|
210
|
+
b.replaceSync(c.slice(c.indexOf("@property"))), document.adoptedStyleSheets.push(b);
|
|
219
211
|
});
|
|
220
212
|
}
|
|
221
213
|
class o extends e {
|
|
222
|
-
constructor(...
|
|
223
|
-
|
|
214
|
+
constructor(...i) {
|
|
215
|
+
C("constructor", `%c${s}%c`), super(t, ...i), n.length > 0 && this.shadow.adoptedStyleSheets.push(...n);
|
|
224
216
|
}
|
|
225
217
|
render() {
|
|
226
|
-
return
|
|
218
|
+
return C("rwc: render from new class"), e.prototype.render.call(this);
|
|
227
219
|
}
|
|
228
|
-
attributeChangedCallback(
|
|
229
|
-
|
|
220
|
+
attributeChangedCallback(i, c, a) {
|
|
221
|
+
C(
|
|
230
222
|
"%cAttribute has changed.%c",
|
|
231
|
-
`%c${
|
|
232
|
-
`oldValue: ${
|
|
223
|
+
`%c${i}%c`,
|
|
224
|
+
`oldValue: ${c}, newValue: ${a}`,
|
|
233
225
|
`%c${s}%c`
|
|
234
226
|
);
|
|
235
227
|
try {
|
|
236
228
|
a = JSON.parse(a);
|
|
237
229
|
} catch {
|
|
238
230
|
}
|
|
239
|
-
const
|
|
240
|
-
if (
|
|
241
|
-
const h = this[
|
|
242
|
-
h.setName(
|
|
231
|
+
const b = ht(i);
|
|
232
|
+
if (b in this && g(this[b])) {
|
|
233
|
+
const h = this[b];
|
|
234
|
+
h.setName(i), a === null ? (h.set(h.initValue), this.removeAttribute(i)) : h.set(a);
|
|
243
235
|
}
|
|
244
236
|
G(
|
|
245
237
|
this,
|
|
246
238
|
e.prototype.attributeChangedCallback,
|
|
247
|
-
c,
|
|
248
239
|
i,
|
|
240
|
+
c,
|
|
249
241
|
a
|
|
250
242
|
);
|
|
251
243
|
}
|
|
252
244
|
connectedCallback() {
|
|
253
|
-
const
|
|
254
|
-
var a,
|
|
255
|
-
|
|
245
|
+
const i = () => {
|
|
246
|
+
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(
|
|
256
248
|
([h, d]) => {
|
|
257
|
-
|
|
249
|
+
C("register provider", h, d()), this.addEventListener(h, (m) => {
|
|
258
250
|
var u;
|
|
259
|
-
|
|
251
|
+
C("send provider", h, d());
|
|
260
252
|
const p = m;
|
|
261
253
|
((u = p.detail) == null ? void 0 : u.context) === h && (p.stopPropagation(), p.detail.callback(d));
|
|
262
254
|
});
|
|
263
255
|
}
|
|
264
|
-
)), this.checkInjects(), (
|
|
256
|
+
)), this.checkInjects(), (b = e.prototype[J]) == null || b.forEach(
|
|
265
257
|
(h) => {
|
|
266
258
|
this[h] = (d) => {
|
|
267
259
|
const m = e.prototype[q][h], { bubbles: p, composed: u } = m;
|
|
268
260
|
g(d) ? w(() => {
|
|
269
|
-
|
|
261
|
+
V("@oemit reactive value", d()), this.dispatchEvent(
|
|
270
262
|
new CustomEvent(h, {
|
|
271
263
|
detail: d(),
|
|
272
264
|
bubbles: p,
|
|
273
265
|
composed: u
|
|
274
266
|
})
|
|
275
267
|
);
|
|
276
|
-
}) : (
|
|
268
|
+
}) : (V("@oemit value", d), this.dispatchEvent(
|
|
277
269
|
new CustomEvent(h, {
|
|
278
270
|
detail: d,
|
|
279
271
|
bubbles: p,
|
|
@@ -282,9 +274,9 @@ const Gt = (...s) => {
|
|
|
282
274
|
));
|
|
283
275
|
};
|
|
284
276
|
}
|
|
285
|
-
),
|
|
286
|
-
const
|
|
287
|
-
|
|
277
|
+
), C("start render", `%c${s}%c`, s);
|
|
278
|
+
const c = () => {
|
|
279
|
+
C("rwc: insertRenderTemplate");
|
|
288
280
|
const d = this.render().hostElement;
|
|
289
281
|
d && this.shadow.appendChild(d), G(this, e.prototype.connectedCallback), this.appendSlotContent();
|
|
290
282
|
};
|
|
@@ -297,25 +289,25 @@ const Gt = (...s) => {
|
|
|
297
289
|
};
|
|
298
290
|
if (h(d)) {
|
|
299
291
|
const p = [];
|
|
300
|
-
Array.isArray(d) ? p.push(...d) : p.push(d), Promise.all(p).then((u) => u.forEach((y) => m(y.default))).then(() =>
|
|
292
|
+
Array.isArray(d) ? p.push(...d) : p.push(d), Promise.all(p).then((u) => u.forEach((y) => m(y.default))).then(() => c());
|
|
301
293
|
} else {
|
|
302
294
|
const p = [];
|
|
303
|
-
Array.isArray(d) ? p.push(...d) : p.push(d), p.forEach((u) => m(u)),
|
|
295
|
+
Array.isArray(d) ? p.push(...d) : p.push(d), p.forEach((u) => m(u)), c();
|
|
304
296
|
}
|
|
305
297
|
} else
|
|
306
|
-
|
|
298
|
+
c();
|
|
307
299
|
this.slotContext && Object.keys(this.slotContext).length > 0 && this.shadow.querySelectorAll("slot").forEach((h) => {
|
|
308
|
-
|
|
300
|
+
C(
|
|
309
301
|
this.slotContext,
|
|
310
302
|
this.slotContext && this.slotContext[h.name]
|
|
311
|
-
),
|
|
303
|
+
), V(
|
|
312
304
|
"@bslot element",
|
|
313
305
|
h,
|
|
314
306
|
`name:${h.name};`,
|
|
315
307
|
h.assignedElements()
|
|
316
308
|
), h.assignedElements().forEach((d) => {
|
|
317
309
|
const m = this.slotContext[h.name];
|
|
318
|
-
this.slotContext && g(m) && (
|
|
310
|
+
this.slotContext && g(m) && (V(
|
|
319
311
|
"@oslot element",
|
|
320
312
|
h,
|
|
321
313
|
`name:${h.name};`,
|
|
@@ -330,12 +322,12 @@ const Gt = (...s) => {
|
|
|
330
322
|
});
|
|
331
323
|
});
|
|
332
324
|
};
|
|
333
|
-
|
|
325
|
+
i.fake = !0, i.component = new WeakRef(this), this.effectSet.add(new WeakRef(i)), w(i, { name: "FAKE_wrapperEffect" });
|
|
334
326
|
}
|
|
335
327
|
disconnectedCallback() {
|
|
336
|
-
this.allSlotContent = [], this.slotContent = {}, this.htmlSlotContent = {}, this.effectSet.forEach((
|
|
337
|
-
var
|
|
338
|
-
return (a = (
|
|
328
|
+
this.allSlotContent = [], this.slotContent = {}, this.htmlSlotContent = {}, this.effectSet.forEach((i) => {
|
|
329
|
+
var c, a;
|
|
330
|
+
return (a = (c = i.deref()) == null ? void 0 : c.destroy) == null ? void 0 : a.call(c);
|
|
339
331
|
}), this.effectSet.clear(), this.shadow.replaceChildren(), this.replaceChildren(), G(this, e.prototype.disconnectedCallback);
|
|
340
332
|
}
|
|
341
333
|
}
|
|
@@ -377,11 +369,11 @@ class _ extends HTMLElement {
|
|
|
377
369
|
(e = this.appendAllSlotContent) == null || e.call(this);
|
|
378
370
|
}
|
|
379
371
|
inject(e) {
|
|
380
|
-
return
|
|
372
|
+
return C("%cinject%c", e), this.injects[e] || (this.injects[e] = j(null)), this.injects[e];
|
|
381
373
|
}
|
|
382
374
|
checkInjects() {
|
|
383
375
|
Object.entries(this.injects).forEach(([e, n]) => {
|
|
384
|
-
|
|
376
|
+
C(
|
|
385
377
|
"%cinject%c",
|
|
386
378
|
`%c${e}%c`,
|
|
387
379
|
"from BaseElement (dispatch event)"
|
|
@@ -404,24 +396,24 @@ class _ extends HTMLElement {
|
|
|
404
396
|
}
|
|
405
397
|
}
|
|
406
398
|
f(_, "observedAttributes", []), f(_, "renderTagName", ""), f(_, "styles");
|
|
407
|
-
const
|
|
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) => {
|
|
408
400
|
const t = document.createElement("span");
|
|
409
|
-
return t.textContent =
|
|
410
|
-
},
|
|
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) => {
|
|
411
403
|
const t = document.createElement("span");
|
|
412
404
|
return w(() => {
|
|
413
405
|
const e = s();
|
|
414
|
-
t.textContent =
|
|
406
|
+
t.textContent = nt(e);
|
|
415
407
|
}), t;
|
|
416
408
|
};
|
|
417
|
-
class
|
|
409
|
+
class rt {
|
|
418
410
|
constructor(t) {
|
|
419
411
|
f(this, "wrapper");
|
|
420
412
|
f(this, "keyedEffects", /* @__PURE__ */ new Map());
|
|
421
413
|
f(this, "append", (...t) => (t.forEach((e) => {
|
|
422
414
|
var o;
|
|
423
415
|
const n = e.hostElement;
|
|
424
|
-
n && ((o = this.hostElement) == null || o.appendChild(n),
|
|
416
|
+
n && ((o = this.hostElement) == null || o.appendChild(n), X in n && setTimeout(() => {
|
|
425
417
|
var r;
|
|
426
418
|
(r = n.onConnected) == null || r.call(
|
|
427
419
|
n,
|
|
@@ -450,14 +442,15 @@ class it {
|
|
|
450
442
|
}), this));
|
|
451
443
|
f(this, "addHtmlContent", (t) => {
|
|
452
444
|
const e = this.hostElement;
|
|
453
|
-
return e ? (
|
|
445
|
+
return e ? (ot(e, t), this) : this;
|
|
454
446
|
});
|
|
455
447
|
f(this, "setHtmlContent", (t) => {
|
|
456
448
|
const e = this.hostElement;
|
|
457
|
-
return e ? (
|
|
449
|
+
return e ? (Et(e, t), this) : this;
|
|
458
450
|
});
|
|
459
451
|
f(this, "setAttribute", (t, e) => {
|
|
460
452
|
var r;
|
|
453
|
+
C("setAttribute", t, e);
|
|
461
454
|
const n = this.hostElement;
|
|
462
455
|
if (!n) return this;
|
|
463
456
|
let o;
|
|
@@ -466,30 +459,30 @@ class it {
|
|
|
466
459
|
o = "";
|
|
467
460
|
else {
|
|
468
461
|
this.removeAttribute(t);
|
|
469
|
-
const
|
|
470
|
-
return
|
|
462
|
+
const i = t.toLowerCase();
|
|
463
|
+
return i in n && (n[i] = null), this;
|
|
471
464
|
}
|
|
472
465
|
else typeof e != "string" ? o = JSON.stringify(e) : o = e;
|
|
473
|
-
if ((r = this.hostElement) == null || r.setAttribute(
|
|
474
|
-
const
|
|
475
|
-
|
|
466
|
+
if ((r = this.hostElement) == null || r.setAttribute(N(t), o), !(n instanceof _)) {
|
|
467
|
+
const i = t.toLowerCase();
|
|
468
|
+
i in n && (n[i] = e);
|
|
476
469
|
}
|
|
477
470
|
return this;
|
|
478
471
|
});
|
|
479
472
|
f(this, "setCustomAttribute", (t, e) => {
|
|
480
473
|
var o;
|
|
481
474
|
let n;
|
|
482
|
-
return typeof e != "string" ? n = JSON.stringify(e) : n = e, (o = this.hostElement) == null || o.setAttribute(
|
|
475
|
+
return typeof e != "string" ? n = JSON.stringify(e) : n = e, (o = this.hostElement) == null || o.setAttribute(N(t), n), this;
|
|
483
476
|
});
|
|
484
477
|
f(this, "setReactiveAttribute", (t, e) => (this.addEffect((n) => {
|
|
485
|
-
n.setAttribute(t, e());
|
|
478
|
+
C("setReactiveAttribute effect", t, e), n.setAttribute(t, e());
|
|
486
479
|
}, t), this));
|
|
487
480
|
f(this, "setReactiveCustomAttribute", (t, e) => (this.addEffect((n) => {
|
|
488
481
|
n.setCustomAttribute(t, e());
|
|
489
482
|
}), this));
|
|
490
483
|
f(this, "removeAttribute", (t) => {
|
|
491
484
|
var e;
|
|
492
|
-
return (e = this.hostElement) == null || e.removeAttribute(
|
|
485
|
+
return (e = this.hostElement) == null || e.removeAttribute(N(t)), this;
|
|
493
486
|
});
|
|
494
487
|
f(this, "addStyle", (t) => {
|
|
495
488
|
const e = this.hostElement;
|
|
@@ -497,14 +490,14 @@ class it {
|
|
|
497
490
|
const r = n.startsWith("--");
|
|
498
491
|
typeof o == "function" ? this.addEffect(() => {
|
|
499
492
|
if (r) {
|
|
500
|
-
const
|
|
501
|
-
e.style.setProperty(n,
|
|
493
|
+
const i = String(o() || "");
|
|
494
|
+
e.style.setProperty(n, i);
|
|
502
495
|
} else
|
|
503
496
|
e.style[n] = o();
|
|
504
497
|
}) : typeof o == "string" && (r ? e.style.setProperty(n, o) : e.style[n] = o);
|
|
505
498
|
}), this) : this;
|
|
506
499
|
});
|
|
507
|
-
f(this, "onConnected", (t) => this.hostElement ? (Reflect.defineProperty(this.hostElement,
|
|
500
|
+
f(this, "onConnected", (t) => this.hostElement ? (Reflect.defineProperty(this.hostElement, X, {
|
|
508
501
|
get() {
|
|
509
502
|
return t;
|
|
510
503
|
}
|
|
@@ -540,23 +533,23 @@ class it {
|
|
|
540
533
|
return (n = this.hostElement) == null || n.classList.replace(t, e), this;
|
|
541
534
|
});
|
|
542
535
|
f(this, "addEffect", (t, e) => {
|
|
543
|
-
var r,
|
|
536
|
+
var r, i;
|
|
544
537
|
const n = this.hostElement;
|
|
545
538
|
if (!n) return this;
|
|
546
539
|
const o = () => t(this, n);
|
|
547
540
|
if (e) {
|
|
548
|
-
const
|
|
549
|
-
|
|
541
|
+
const c = (r = this.keyedEffects.get(e)) == null ? void 0 : r.deref();
|
|
542
|
+
c && U(c);
|
|
550
543
|
}
|
|
551
|
-
return (
|
|
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;
|
|
552
545
|
});
|
|
553
546
|
f(this, "addReactiveContent", (t) => {
|
|
554
547
|
var e;
|
|
555
|
-
return (e = this.hostElement) == null || e.appendChild(
|
|
548
|
+
return (e = this.hostElement) == null || e.appendChild(Q(t)), this;
|
|
556
549
|
});
|
|
557
550
|
f(this, "setReactiveContent", (t) => {
|
|
558
551
|
var e;
|
|
559
|
-
return this.clear(), (e = this.hostElement) == null || e.appendChild(
|
|
552
|
+
return this.clear(), (e = this.hostElement) == null || e.appendChild(Q(t)), this;
|
|
560
553
|
});
|
|
561
554
|
f(this, "clear", () => {
|
|
562
555
|
var t;
|
|
@@ -578,53 +571,54 @@ class it {
|
|
|
578
571
|
), this;
|
|
579
572
|
}
|
|
580
573
|
}
|
|
581
|
-
class
|
|
574
|
+
class Ct extends rt {
|
|
582
575
|
constructor() {
|
|
583
576
|
super(...arguments);
|
|
584
577
|
f(this, "setReactiveValue", (e) => (this.hostElement instanceof _ && this.hostElement.setReactiveValue(e), this));
|
|
585
578
|
f(this, "setSlotTemplate", (e) => {
|
|
586
579
|
var o;
|
|
587
580
|
const n = (o = this.hostElement) == null ? void 0 : o.slotTemplate;
|
|
588
|
-
return n && Object.entries(e).forEach(([r,
|
|
589
|
-
n[r] =
|
|
581
|
+
return n && Object.entries(e).forEach(([r, i]) => {
|
|
582
|
+
n[r] = i;
|
|
590
583
|
}), this;
|
|
591
584
|
});
|
|
592
585
|
}
|
|
593
586
|
}
|
|
594
|
-
const
|
|
595
|
-
},
|
|
587
|
+
const Kt = () => () => {
|
|
588
|
+
}, bt = (s) => new Ct(new WeakRef(s)), St = (s) => new rt(new WeakRef(s)), yt = (s, ...t) => ({
|
|
596
589
|
classList: [...s.map((e) => e.trim()).filter(Boolean), ...t]
|
|
597
|
-
}),
|
|
590
|
+
}), Ut = (s, ...t) => yt(s, ...t), it = (s, t) => {
|
|
591
|
+
var o;
|
|
598
592
|
if (!t || !s.deref()) return;
|
|
599
593
|
const e = Object.keys(t || {}).filter(
|
|
600
|
-
(
|
|
594
|
+
(r) => r.startsWith(".") || r.startsWith("@") || r.startsWith("$")
|
|
601
595
|
);
|
|
602
|
-
e.filter((
|
|
603
|
-
t != null && t.attributes || (t.attributes = {}), t.attributes[
|
|
604
|
-
}), e.filter((
|
|
596
|
+
e.filter((r) => r.startsWith(".")).forEach((r) => {
|
|
597
|
+
t != null && t.attributes || (t.attributes = {}), t.attributes[r.slice(1)] = t[r];
|
|
598
|
+
}), e.filter((r) => r.startsWith("@")).forEach((r) => {
|
|
605
599
|
t != null && t.listeners || (t.listeners = {});
|
|
606
|
-
const
|
|
607
|
-
t.listeners[
|
|
608
|
-
}), e.filter((
|
|
609
|
-
t != null && t.effects || (t.effects = []), t.effects.push(t[
|
|
600
|
+
const i = r.slice(1);
|
|
601
|
+
t.listeners[i] = t[r];
|
|
602
|
+
}), e.filter((r) => r.startsWith("$")).forEach((r) => {
|
|
603
|
+
t != null && t.effects || (t.effects = []), t.effects.push(t[r]);
|
|
610
604
|
});
|
|
611
605
|
const n = s.deref();
|
|
612
606
|
if (n)
|
|
613
|
-
return
|
|
614
|
-
},
|
|
607
|
+
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) => {
|
|
615
609
|
t && Object.entries(t).forEach(([e, n]) => {
|
|
616
610
|
typeof n == "function" && s.addEventlistener(e, n);
|
|
617
611
|
});
|
|
618
|
-
},
|
|
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) => {
|
|
619
613
|
const e = t;
|
|
620
614
|
e && Object.keys(e).forEach((n) => {
|
|
621
615
|
g(e[n]) ? s.setReactiveCustomAttribute(n, e[n]) : typeof e[n] == "function" ? s.addEffect(() => {
|
|
622
616
|
s.setCustomAttribute(n, e[n]());
|
|
623
617
|
}) : s.setCustomAttribute(n, e[n]);
|
|
624
618
|
});
|
|
625
|
-
},
|
|
619
|
+
}, Rt = (s, t) => s.addClass(...t || []), gt = (s, t) => s.addReactiveClass(t || {}), Lt = (s, t) => s.addStyle(t || {}), It = (s, t) => {
|
|
626
620
|
const e = t, n = (o, r) => {
|
|
627
|
-
r !== void 0 && (g(r) ? s.setReactiveAttribute(o, r) : typeof r == "function" ? s.addEffect(() => {
|
|
621
|
+
r !== void 0 && (C("addAttribute", o, r), g(r) ? s.setReactiveAttribute(o, r) : typeof r == "function" ? s.addEffect(() => {
|
|
628
622
|
s.setAttribute(o, r());
|
|
629
623
|
}) : s.setAttribute(o, r));
|
|
630
624
|
};
|
|
@@ -638,14 +632,14 @@ const Ut = () => () => {
|
|
|
638
632
|
typeof n == "string" ? n.trim().length > 0 && e.addHtmlContent(n) : g(n) ? e.addReactiveContent(n) : e.append(n);
|
|
639
633
|
}), e;
|
|
640
634
|
}, W = (s, t) => {
|
|
641
|
-
const e = document.createElement(s), n =
|
|
642
|
-
return
|
|
643
|
-
},
|
|
635
|
+
const e = document.createElement(s), n = St(e);
|
|
636
|
+
return it(new WeakRef(n), t) ?? n;
|
|
637
|
+
}, Y = (s, t) => {
|
|
644
638
|
const [e, ...n] = s.split(" ").map((r) => r.trim()), o = W(e, t);
|
|
645
639
|
return n.length > 0 && o.addClass(...n), (...r) => D(
|
|
646
640
|
new WeakRef(o),
|
|
647
641
|
...r.filter(Boolean).flat().flatMap(
|
|
648
|
-
(
|
|
642
|
+
(i) => typeof i == "function" && !g(i) ? M(() => i(o)) : i
|
|
649
643
|
)
|
|
650
644
|
) ?? o;
|
|
651
645
|
}, M = (s) => {
|
|
@@ -653,89 +647,89 @@ const Ut = () => () => {
|
|
|
653
647
|
return W("div").addStyle({ display: "contents" }).addEffect((e) => {
|
|
654
648
|
e.clear(), D(new WeakRef(e), ...[s()].flat());
|
|
655
649
|
}, t);
|
|
656
|
-
},
|
|
657
|
-
const n = W("div").addStyle({ display: "contents" }), o = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(),
|
|
650
|
+
}, Yt = (s, t, e) => {
|
|
651
|
+
const n = W("div").addStyle({ display: "contents" }), o = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
658
652
|
let a = [];
|
|
659
|
-
const
|
|
653
|
+
const b = /* @__PURE__ */ new Set();
|
|
660
654
|
let h = s.peek();
|
|
661
655
|
const d = (u) => {
|
|
662
|
-
|
|
656
|
+
b.delete(u), o.delete(u), r.delete(u), i.delete(u), c.delete(u);
|
|
663
657
|
}, m = (u) => {
|
|
664
|
-
if (!
|
|
658
|
+
if (!c.has(u)) {
|
|
665
659
|
const y = a.indexOf(u);
|
|
666
|
-
return
|
|
660
|
+
return c.set(u, y), y;
|
|
667
661
|
}
|
|
668
|
-
return
|
|
662
|
+
return c.get(u);
|
|
669
663
|
}, p = (u, y, x) => Array.from(x.children).indexOf(u) !== y;
|
|
670
664
|
return w(() => {
|
|
671
665
|
const u = s(), y = u.map(t).map((E) => typeof E == "string" ? E : E.toString()), x = new Set(y);
|
|
672
|
-
|
|
673
|
-
|
|
666
|
+
c.clear(), y.forEach((E, S) => {
|
|
667
|
+
c.set(E, S);
|
|
674
668
|
}), a = y;
|
|
675
669
|
const L = n.hostElement;
|
|
676
670
|
if (!L) return;
|
|
677
|
-
|
|
671
|
+
C(
|
|
678
672
|
"containerChildren",
|
|
679
673
|
Array.from(L.children),
|
|
680
674
|
a
|
|
681
675
|
);
|
|
682
676
|
const H = [];
|
|
683
677
|
Array.from(L.children).forEach((E) => {
|
|
684
|
-
const
|
|
685
|
-
|
|
678
|
+
const S = E.dataset.key;
|
|
679
|
+
S && !x.has(S) && H.push(E);
|
|
686
680
|
}), H.forEach((E) => {
|
|
687
|
-
const
|
|
688
|
-
|
|
689
|
-
}), y.forEach((E,
|
|
681
|
+
const S = E.dataset.key;
|
|
682
|
+
C("remove element", S, E), E.remove(), d(S);
|
|
683
|
+
}), y.forEach((E, S) => {
|
|
690
684
|
var v;
|
|
691
|
-
const A = u[
|
|
685
|
+
const A = u[S], T = h[S];
|
|
692
686
|
if (!o.has(E))
|
|
693
|
-
|
|
687
|
+
C("create new element", E, A), o.set(
|
|
694
688
|
E,
|
|
695
689
|
j(Math.random().toString(36).substring(2, 15))
|
|
696
690
|
), r.set(
|
|
697
691
|
E,
|
|
698
|
-
() => e(A,
|
|
692
|
+
() => e(A, S, u).setCustomAttribute("data-key", E)
|
|
699
693
|
);
|
|
700
|
-
else if (
|
|
701
|
-
const R =
|
|
694
|
+
else if (T && JSON.stringify(A) !== JSON.stringify(T)) {
|
|
695
|
+
const R = i.get(E);
|
|
702
696
|
(v = o.get(E)) == null || v.set(Math.random().toString(36).substring(2, 15)), r.set(
|
|
703
697
|
E,
|
|
704
|
-
() => e(A,
|
|
705
|
-
), R && R.parentNode &&
|
|
698
|
+
() => e(A, S, u).setCustomAttribute("data-key", E)
|
|
699
|
+
), R && R.parentNode && C("mark element for update", E);
|
|
706
700
|
}
|
|
707
701
|
}), h = [...u.map((E) => ({ ...E }))];
|
|
708
|
-
const
|
|
709
|
-
o.forEach((E,
|
|
710
|
-
|
|
711
|
-
var
|
|
702
|
+
const B = () => {
|
|
703
|
+
o.forEach((E, S) => {
|
|
704
|
+
C("key from setTimeout foreach currItemSignalMap", S), b.has(S) || (b.add(S), w(() => {
|
|
705
|
+
var Z;
|
|
712
706
|
E();
|
|
713
|
-
const A = m(
|
|
714
|
-
if (
|
|
715
|
-
const v = n.hostElement, R =
|
|
707
|
+
const A = m(S), T = (Z = r.get(S)) == null ? void 0 : Z();
|
|
708
|
+
if (!T || !T.hostElement) return;
|
|
709
|
+
const v = n.hostElement, R = T.hostElement;
|
|
716
710
|
if (!v) return;
|
|
717
|
-
|
|
718
|
-
const I =
|
|
711
|
+
C("call effect from setTimeout", S, R);
|
|
712
|
+
const I = i.get(S);
|
|
719
713
|
if (I && I.parentNode === v) {
|
|
720
714
|
if (p(I, A, v)) {
|
|
721
|
-
const
|
|
722
|
-
|
|
715
|
+
const $ = v.children[A];
|
|
716
|
+
$ && $ !== I ? v.insertBefore(I, $) : $ || v.appendChild(I);
|
|
723
717
|
}
|
|
724
|
-
R !== I && (I.replaceWith(R),
|
|
725
|
-
} else if (
|
|
726
|
-
const
|
|
727
|
-
|
|
718
|
+
R !== I && (I.replaceWith(R), i.set(S, R));
|
|
719
|
+
} else if (i.set(S, R), A < v.children.length) {
|
|
720
|
+
const $ = v.children[A];
|
|
721
|
+
$ ? v.insertBefore(R, $) : v.appendChild(R);
|
|
728
722
|
} else
|
|
729
723
|
v.appendChild(R);
|
|
730
724
|
}));
|
|
731
725
|
});
|
|
732
726
|
};
|
|
733
|
-
Promise.resolve().then(() =>
|
|
727
|
+
Promise.resolve().then(() => B());
|
|
734
728
|
}), n;
|
|
735
|
-
},
|
|
729
|
+
}, Zt = (s) => {
|
|
736
730
|
let t = [W("div")], e = !1;
|
|
737
731
|
return w(() => {
|
|
738
|
-
var r,
|
|
732
|
+
var r, i;
|
|
739
733
|
const n = s();
|
|
740
734
|
e = Array.isArray(n);
|
|
741
735
|
const o = [];
|
|
@@ -743,95 +737,95 @@ const Ut = () => () => {
|
|
|
743
737
|
W("div").addStyle({ display: "none" }).setAttribute("id", "empty_template")
|
|
744
738
|
);
|
|
745
739
|
try {
|
|
746
|
-
|
|
740
|
+
C(
|
|
747
741
|
"newReactiveComponent.map",
|
|
748
|
-
o.map((
|
|
742
|
+
o.map((c) => {
|
|
749
743
|
var a;
|
|
750
|
-
return
|
|
744
|
+
return C("newReactiveComponent hostElement", c.hostElement), (a = c.hostElement) == null ? void 0 : a.id;
|
|
751
745
|
})
|
|
752
|
-
),
|
|
746
|
+
), C(
|
|
753
747
|
"currComponent[0].hostElement?.id",
|
|
754
748
|
(r = t[0].hostElement) == null ? void 0 : r.id,
|
|
755
749
|
t
|
|
756
|
-
), (
|
|
757
|
-
...o.map((
|
|
758
|
-
), t.slice(1).forEach((
|
|
750
|
+
), (i = t[0].hostElement) == null || i.replaceWith(
|
|
751
|
+
...o.map((c) => c.hostElement).filter(Boolean)
|
|
752
|
+
), t.slice(1).forEach((c) => {
|
|
759
753
|
var a;
|
|
760
|
-
return (a =
|
|
754
|
+
return (a = c.hostElement) == null ? void 0 : a.remove();
|
|
761
755
|
}), t = o;
|
|
762
|
-
} catch (
|
|
763
|
-
console.error(
|
|
756
|
+
} catch (c) {
|
|
757
|
+
console.error(c);
|
|
764
758
|
}
|
|
765
759
|
}), e ? t : t[0];
|
|
766
|
-
},
|
|
767
|
-
const t =
|
|
760
|
+
}, Xt = (s) => pt in s, Qt = (s) => {
|
|
761
|
+
const t = Y("div")().addStyle({ display: "contents" }), e = (n) => {
|
|
768
762
|
const o = t.hostElement;
|
|
769
763
|
return o && (o.innerHTML = n), t;
|
|
770
764
|
};
|
|
771
765
|
return typeof s == "string" ? e(s) : t.addEffect(() => {
|
|
772
766
|
e(s());
|
|
773
767
|
}), t;
|
|
774
|
-
},
|
|
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) => {
|
|
775
769
|
if (typeof s == "boolean")
|
|
776
770
|
n.style.display = s ? "block" : "none";
|
|
777
771
|
else {
|
|
778
772
|
const o = s() ? "block" : "none";
|
|
779
773
|
n.style.display = o;
|
|
780
774
|
}
|
|
781
|
-
}),
|
|
775
|
+
}), ee = (s, t, e) => {
|
|
782
776
|
const n = [
|
|
783
|
-
|
|
777
|
+
et(s, t)
|
|
784
778
|
].flat();
|
|
785
779
|
return e && n.push(
|
|
786
780
|
...[
|
|
787
|
-
|
|
781
|
+
et(
|
|
788
782
|
() => typeof s == "boolean" ? !s : !s(),
|
|
789
783
|
e
|
|
790
784
|
)
|
|
791
785
|
].flat()
|
|
792
786
|
), M(() => n);
|
|
793
|
-
},
|
|
794
|
-
|
|
795
|
-
const e = document.createElement(s), n =
|
|
787
|
+
}, Mt = (s, t) => {
|
|
788
|
+
C("createCustomElement", s);
|
|
789
|
+
const e = document.createElement(s), n = bt(e);
|
|
796
790
|
return e.init = () => {
|
|
797
|
-
|
|
791
|
+
it(new WeakRef(n), t);
|
|
798
792
|
}, n;
|
|
799
|
-
},
|
|
800
|
-
const e = s.split(" ").slice(1).map((o) => o.trim()), n =
|
|
793
|
+
}, jt = (s, t) => {
|
|
794
|
+
const e = s.split(" ").slice(1).map((o) => o.trim()), n = Mt(s.split(" ")[0], t);
|
|
801
795
|
return Array.isArray(e) && e.length > 0 && n.addClass(...e), (...o) => {
|
|
802
796
|
const r = o.filter(Boolean).flat().flatMap(
|
|
803
|
-
(
|
|
804
|
-
),
|
|
805
|
-
return
|
|
806
|
-
(
|
|
797
|
+
(c) => typeof c == "function" && !g(c) ? M(() => c(n)) : c
|
|
798
|
+
), i = n.hostElement;
|
|
799
|
+
return i && (i.allSlotContent = r, i.slotContent = r.filter(dt).reduce(
|
|
800
|
+
(c, a) => {
|
|
807
801
|
var h;
|
|
808
|
-
const
|
|
809
|
-
return
|
|
802
|
+
const b = ((h = a.hostElement) == null ? void 0 : h.getAttribute("slot")) || "default";
|
|
803
|
+
return c[b] || (c[b] = []), c[b].push(a), c;
|
|
810
804
|
},
|
|
811
805
|
{}
|
|
812
|
-
),
|
|
806
|
+
), i.appendAllSlotContent = () => {
|
|
813
807
|
D(new WeakRef(n), ...r);
|
|
814
808
|
}), n;
|
|
815
809
|
};
|
|
816
|
-
},
|
|
810
|
+
}, $t = (s, t, e) => jt(
|
|
817
811
|
`${s.renderTagName}${t && typeof t == "string" ? " " + t : ""}`,
|
|
818
812
|
F(t) ? t : t && typeof t == "string" ? e : void 0
|
|
819
|
-
),
|
|
813
|
+
), se = () => {
|
|
820
814
|
const s = () => {
|
|
821
815
|
};
|
|
822
816
|
return s.oldValue = null, s;
|
|
823
|
-
},
|
|
824
|
-
const n = t ?
|
|
817
|
+
}, ne = () => ({}), Tt = (s, t, e) => {
|
|
818
|
+
const n = t ? st(t, e)(s) : s;
|
|
825
819
|
return (o, ...r) => {
|
|
826
|
-
const
|
|
827
|
-
return o && !F(o) &&
|
|
820
|
+
const i = [...r];
|
|
821
|
+
return o && !F(o) && i.unshift(o), $t(n, F(o) ? o : {})(...i);
|
|
828
822
|
};
|
|
829
|
-
},
|
|
830
|
-
|
|
823
|
+
}, oe = (s) => [
|
|
824
|
+
Tt(s),
|
|
831
825
|
(t, e) => {
|
|
832
|
-
|
|
826
|
+
st(t, e)(s);
|
|
833
827
|
}
|
|
834
|
-
], l = {},
|
|
828
|
+
], l = {}, _t = [
|
|
835
829
|
"div",
|
|
836
830
|
"span",
|
|
837
831
|
"section",
|
|
@@ -893,43 +887,43 @@ const Ut = () => () => {
|
|
|
893
887
|
"canvas",
|
|
894
888
|
"slot"
|
|
895
889
|
];
|
|
896
|
-
|
|
890
|
+
_t.forEach((s) => {
|
|
897
891
|
l[s] = (t, ...e) => {
|
|
898
892
|
let n = [...e];
|
|
899
|
-
return t && !F(t) && (n = [t].concat(n)),
|
|
893
|
+
return t && !F(t) && (n = [t].concat(n)), Y(s, F(t) ? t : {})(...n);
|
|
900
894
|
};
|
|
901
895
|
});
|
|
902
|
-
const
|
|
903
|
-
function
|
|
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) {
|
|
904
898
|
let e = 0;
|
|
905
899
|
return (...n) => {
|
|
906
900
|
const o = Date.now();
|
|
907
901
|
o - e >= t && (s(...n), e = o);
|
|
908
902
|
};
|
|
909
903
|
}
|
|
910
|
-
const
|
|
904
|
+
const hs = (s, t) => M(() => {
|
|
911
905
|
const e = s();
|
|
912
906
|
let n = null;
|
|
913
907
|
return e.map(
|
|
914
|
-
(o, r) =>
|
|
908
|
+
(o, r) => Wt(
|
|
915
909
|
{
|
|
916
|
-
"@dragstart": (
|
|
910
|
+
"@dragstart": (i, c, a) => {
|
|
917
911
|
n = a;
|
|
918
912
|
},
|
|
919
|
-
"@dragend": (
|
|
913
|
+
"@dragend": (i, c, a) => {
|
|
920
914
|
a.style.transform = "", a.removeAttribute("draggable");
|
|
921
915
|
},
|
|
922
|
-
"@mousedown": (
|
|
916
|
+
"@mousedown": (i, c, a) => {
|
|
923
917
|
a.style.transform = "translateZ(0)", a.setAttribute("draggable", "true");
|
|
924
918
|
},
|
|
925
|
-
"@dragover": (
|
|
926
|
-
|
|
919
|
+
"@dragover": (i) => {
|
|
920
|
+
i.preventDefault();
|
|
927
921
|
},
|
|
928
|
-
"@dragenter":
|
|
929
|
-
var
|
|
930
|
-
if (
|
|
922
|
+
"@dragenter": xt((i, c, a) => {
|
|
923
|
+
var b, h, d;
|
|
924
|
+
if (i.preventDefault(), n) {
|
|
931
925
|
let m = n, p = a;
|
|
932
|
-
const u = ((
|
|
926
|
+
const u = ((b = n.getClientRects().item(0)) == null ? void 0 : b.y) ?? 0, y = ((h = a.getClientRects().item(0)) == null ? void 0 : h.y) ?? 0;
|
|
933
927
|
u < y && ([m, p] = [a, n]), (d = a.parentElement) == null || d.insertBefore(m, p);
|
|
934
928
|
}
|
|
935
929
|
}, 200)
|
|
@@ -937,53 +931,53 @@ const ps = (s, t) => M(() => {
|
|
|
937
931
|
t(o, r, [...s.peek()])
|
|
938
932
|
)
|
|
939
933
|
);
|
|
940
|
-
}),
|
|
934
|
+
}), fs = (s, t, e) => {
|
|
941
935
|
let n = [], o = [];
|
|
942
|
-
const r = W("div").addStyle({ display: "contents" }),
|
|
936
|
+
const r = W("div").addStyle({ display: "contents" }), i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
943
937
|
return w(() => {
|
|
944
|
-
const a = s(),
|
|
945
|
-
o.filter((d) => !
|
|
938
|
+
const a = s(), b = a.map(t);
|
|
939
|
+
o.filter((d) => !b.includes(d)).forEach((d) => {
|
|
946
940
|
var m, p;
|
|
947
|
-
|
|
948
|
-
}),
|
|
949
|
-
o.includes(d) ||
|
|
941
|
+
i.delete(d), (p = (m = r.hostElement) == null ? void 0 : m.querySelector(`[data-key="${d}"]`)) == null || p.remove();
|
|
942
|
+
}), b.forEach((d, m) => {
|
|
943
|
+
o.includes(d) || i.set(
|
|
950
944
|
d,
|
|
951
945
|
() => e(a[m], m, a).setCustomAttribute(
|
|
952
946
|
"data-key",
|
|
953
947
|
d
|
|
954
948
|
)
|
|
955
949
|
);
|
|
956
|
-
}),
|
|
950
|
+
}), b.forEach((d, m) => {
|
|
957
951
|
var p;
|
|
958
952
|
if (o.includes(d)) {
|
|
959
|
-
JSON.stringify(n[o.indexOf(d)]) !== JSON.stringify(a[m]) && ((p =
|
|
953
|
+
JSON.stringify(n[o.indexOf(d)]) !== JSON.stringify(a[m]) && ((p = c.get(d)) == null || p.set({
|
|
960
954
|
templateFunc: () => e(a[m], m, a),
|
|
961
955
|
items: a,
|
|
962
|
-
itemsKey:
|
|
956
|
+
itemsKey: b,
|
|
963
957
|
index: m
|
|
964
958
|
}));
|
|
965
959
|
return;
|
|
966
960
|
}
|
|
967
|
-
|
|
961
|
+
c.set(
|
|
968
962
|
d,
|
|
969
963
|
j({
|
|
970
964
|
templateFunc: () => e(a[m], m, a),
|
|
971
965
|
items: a,
|
|
972
|
-
itemsKey:
|
|
966
|
+
itemsKey: b,
|
|
973
967
|
index: m
|
|
974
968
|
})
|
|
975
969
|
), queueMicrotask(() => {
|
|
976
970
|
w(() => {
|
|
977
|
-
var H,
|
|
978
|
-
const { templateFunc: u, index: y } = ((H =
|
|
971
|
+
var H, B, E;
|
|
972
|
+
const { templateFunc: u, index: y } = ((H = c.get(d)) == null ? void 0 : H()) ?? {}, x = (B = r.hostElement) == null ? void 0 : B.querySelector(
|
|
979
973
|
`[data-key="${d}"]`
|
|
980
974
|
), L = (u == null ? void 0 : u().setCustomAttribute("data-key", d).hostElement) ?? document.createElement("div");
|
|
981
|
-
x ? (E = r.hostElement) == null || E.childNodes.forEach((
|
|
982
|
-
|
|
975
|
+
x ? (E = r.hostElement) == null || E.childNodes.forEach((S, A) => {
|
|
976
|
+
S instanceof HTMLElement && S.getAttribute("data-key") === d && (y === A ? (h(
|
|
983
977
|
y ?? 0,
|
|
984
978
|
r.hostElement,
|
|
985
979
|
L
|
|
986
|
-
),
|
|
980
|
+
), S.remove()) : h(
|
|
987
981
|
y ?? 0,
|
|
988
982
|
r.hostElement,
|
|
989
983
|
L
|
|
@@ -995,129 +989,130 @@ const ps = (s, t) => M(() => {
|
|
|
995
989
|
const h = (d, m, p) => {
|
|
996
990
|
p && m && (d < m.children.length ? m.insertBefore(p, m.children[d]) : m.appendChild(p));
|
|
997
991
|
};
|
|
998
|
-
o =
|
|
992
|
+
o = b, n = [...a];
|
|
999
993
|
}), r;
|
|
1000
994
|
};
|
|
1001
995
|
export {
|
|
1002
996
|
_ as BaseElement,
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
997
|
+
ve as a,
|
|
998
|
+
It as addAttributeList,
|
|
999
|
+
Rt as addClassList,
|
|
1000
|
+
At as addCustomAttributes,
|
|
1001
|
+
gt as addReactiveClassList,
|
|
1002
|
+
Lt as addStyleList,
|
|
1009
1003
|
D as appendContentItem,
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
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,
|
|
1012
|
+
N as camelToKebab,
|
|
1013
|
+
ls as canvas,
|
|
1020
1014
|
G as checkCall,
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1015
|
+
Pt as checkRef,
|
|
1016
|
+
Je as cite,
|
|
1017
|
+
yt as classList,
|
|
1018
|
+
Ut as cls,
|
|
1019
|
+
_e as code,
|
|
1020
|
+
V as colorLog,
|
|
1021
|
+
Jt as combineLatest,
|
|
1022
|
+
st as component,
|
|
1023
|
+
oe as configCustomComponent,
|
|
1024
|
+
ds as createComponent,
|
|
1025
|
+
$t as createCustom,
|
|
1026
|
+
jt as createCustomEl,
|
|
1027
|
+
Mt as createCustomElement,
|
|
1028
|
+
Y as createEl,
|
|
1035
1029
|
W as createElement,
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1030
|
+
Bt as createSignal,
|
|
1031
|
+
bt as customElementHelpers,
|
|
1032
|
+
hs as ddList,
|
|
1033
|
+
ne as defineSlotTemplate,
|
|
1034
|
+
ts as del,
|
|
1035
|
+
ss as details,
|
|
1036
|
+
ft as disableLogs,
|
|
1037
|
+
Wt as div,
|
|
1044
1038
|
w as effect,
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1039
|
+
St as elementHelpers,
|
|
1040
|
+
De as em,
|
|
1041
|
+
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,
|
|
1056
1051
|
M as getSignalContent,
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1052
|
+
Re as h1,
|
|
1053
|
+
ge as h2,
|
|
1054
|
+
Le as h3,
|
|
1055
|
+
Ie as h4,
|
|
1056
|
+
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,
|
|
1072
1067
|
F as isComponentInitConfig,
|
|
1073
1068
|
g as isReactiveSignal,
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
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,
|
|
1084
|
+
C as projectLog,
|
|
1085
|
+
zt as property,
|
|
1086
|
+
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,
|
|
1093
|
+
vt as setChildren,
|
|
1094
|
+
wt as setEffects,
|
|
1095
|
+
tt as setListeners,
|
|
1096
|
+
ee as show,
|
|
1097
|
+
et as showIf,
|
|
1103
1098
|
j as signal,
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
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,
|
|
1115
|
+
Tt as useCustomComponent,
|
|
1116
|
+
cs as video,
|
|
1117
|
+
te as when
|
|
1123
1118
|
};
|