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