@mgdis/stencil-helpers 3.2.1 → 3.2.2
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/dist/index.es.js +412 -412
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +11 -13
- package/dist/index.umd.js.map +1 -1
- package/package.json +12 -12
package/dist/index.es.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Ye = Object.defineProperty;
|
|
2
2
|
var pe = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
class
|
|
5
|
+
var Qe = (e, t, r) => t in e ? Ye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
6
|
+
var $ = (e, t, r) => Qe(e, typeof t != "symbol" ? t + "" : t, r), ge = (e, t, r) => t.has(e) || pe("Cannot " + r);
|
|
7
|
+
var v = (e, t, r) => (ge(e, t, "read from private field"), r ? r.call(e) : t.get(e)), N = (e, t, r) => t.has(e) ? pe("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), D = (e, t, r, s) => (ge(e, t, "write to private field"), s ? s.call(e, r) : t.set(e, r), r);
|
|
8
|
+
class ir {
|
|
9
9
|
constructor(t = []) {
|
|
10
10
|
/**
|
|
11
11
|
* Available classes
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
$(this, "classes");
|
|
14
14
|
/**
|
|
15
15
|
* Add class
|
|
16
16
|
* @param className - class name to add
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
$(this, "add", (t) => {
|
|
19
19
|
this.has(t) || this.classes.push(t);
|
|
20
20
|
});
|
|
21
21
|
/**
|
|
22
22
|
* Delete class
|
|
23
23
|
* @param className - class name to delete
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
$(this, "delete", (t) => {
|
|
26
26
|
const r = this.classes.indexOf(t);
|
|
27
27
|
r > -1 && this.classes.splice(r, 1);
|
|
28
28
|
});
|
|
@@ -31,76 +31,76 @@ class nr {
|
|
|
31
31
|
* @param className - class name to check
|
|
32
32
|
* @returns class name is in the list
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
$(this, "has", (t) => this.classes.includes(t));
|
|
35
35
|
/**
|
|
36
36
|
* Join classes seperated by spaces
|
|
37
37
|
* @returns joined values
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
$(this, "join", () => this.classes.join(" "));
|
|
40
40
|
this.classes = t;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
const Q = (e) => typeof e == "object" && !Array.isArray(e) && e !== null,
|
|
43
|
+
const Q = (e) => typeof e == "object" && !Array.isArray(e) && e !== null, Ve = (e, t, r) => {
|
|
44
44
|
const s = ".";
|
|
45
45
|
if (!Q(e) || typeof t != "string")
|
|
46
46
|
return r;
|
|
47
47
|
const [n, ...i] = t.split(s);
|
|
48
|
-
return i.length ?
|
|
49
|
-
},
|
|
48
|
+
return i.length ? Ve(e[n], i.join(s)) : e[n];
|
|
49
|
+
}, or = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), et = (e) => typeof e == "string" && e.trim() !== "", ar = (e) => typeof e == "object" ? JSON.stringify(e) : String(e), lr = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, tt = (e) => e.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, r) => (r > 0 ? "-" : "") + t.toLowerCase()).replace(/[^a-z0-9-]+/g, "-").replace(/--+/g, "-").replace(/(?:^-)|(?:-$)/g, ""), cr = (e = "", t = 10) => {
|
|
50
50
|
const r = new Uint8Array(t);
|
|
51
51
|
crypto.getRandomValues(r);
|
|
52
52
|
const s = Array.from(r).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, t);
|
|
53
53
|
return e !== "" ? `${e}-${s}` : s;
|
|
54
|
-
},
|
|
54
|
+
}, fr = (e) => et(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null, ur = (e) => {
|
|
55
55
|
let t;
|
|
56
|
-
return typeof e == "string" ? t = e : e && typeof e == "object" && (Q(e) || Array.isArray(e)) ? t = JSON.stringify(e) : e != null && typeof e != "boolean" && typeof e != "object" && (t = String(e)), t &&
|
|
57
|
-
},
|
|
56
|
+
return typeof e == "string" ? t = e : e && typeof e == "object" && (Q(e) || Array.isArray(e)) ? t = JSON.stringify(e) : e != null && typeof e != "boolean" && typeof e != "object" && (t = String(e)), t && tt(t);
|
|
57
|
+
}, pr = async (e) => {
|
|
58
58
|
if (e)
|
|
59
59
|
return e();
|
|
60
|
-
},
|
|
60
|
+
}, gr = {
|
|
61
61
|
FIRST: "first",
|
|
62
62
|
NEXT: "next",
|
|
63
63
|
PREVIOUS: "previous",
|
|
64
64
|
LAST: "last"
|
|
65
|
-
},
|
|
66
|
-
class
|
|
65
|
+
}, xe = 10;
|
|
66
|
+
class rt {
|
|
67
67
|
constructor(t) {
|
|
68
68
|
/**
|
|
69
69
|
* Define items
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
$(this, "items", []);
|
|
72
72
|
/**
|
|
73
73
|
* Define total
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
$(this, "total");
|
|
76
76
|
/**
|
|
77
77
|
* Define top
|
|
78
78
|
*/
|
|
79
|
-
|
|
79
|
+
$(this, "top", xe);
|
|
80
80
|
/**
|
|
81
81
|
* Define next
|
|
82
82
|
*/
|
|
83
|
-
|
|
83
|
+
$(this, "next");
|
|
84
84
|
/**
|
|
85
85
|
* Define base index
|
|
86
86
|
*/
|
|
87
|
-
|
|
87
|
+
$(this, "baseIndex", 1);
|
|
88
88
|
/**
|
|
89
89
|
* Get index of items from cursor
|
|
90
90
|
* @param cursor - cursor to find
|
|
91
91
|
* @param oldItem - previous item
|
|
92
92
|
* @returns item index
|
|
93
93
|
*/
|
|
94
|
-
|
|
94
|
+
$(this, "getIndexFromCursor", (t = "first", r) => {
|
|
95
95
|
if (!Array.isArray(this.items) || !this.items.length)
|
|
96
96
|
return null;
|
|
97
97
|
const n = this.items.length - this.baseIndex;
|
|
98
98
|
let i, o = 0;
|
|
99
99
|
if (["previous", "next"].includes(t) && r) {
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
100
|
+
const c = this.items.findIndex((l) => JSON.stringify(l) === JSON.stringify(r));
|
|
101
|
+
if (c === -1)
|
|
102
102
|
return 0;
|
|
103
|
-
o =
|
|
103
|
+
o = c;
|
|
104
104
|
}
|
|
105
105
|
return t === "first" ? i = 0 : t === "last" ? i = n : t === "previous" ? i = JSON.stringify(this.items[o]) === JSON.stringify(this.items[0]) ? n : o - this.baseIndex : t === "next" ? i = JSON.stringify(this.items[o]) === JSON.stringify(this.items[n]) ? 0 : o + this.baseIndex : i = 0, i;
|
|
106
106
|
});
|
|
@@ -111,14 +111,14 @@ class tt {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
var O, I, U;
|
|
114
|
-
class
|
|
114
|
+
class dr {
|
|
115
115
|
constructor(t, r) {
|
|
116
116
|
/**
|
|
117
117
|
* Define paginated items
|
|
118
118
|
*/
|
|
119
|
-
|
|
119
|
+
$(this, "items", []);
|
|
120
120
|
/* Privates */
|
|
121
|
-
N(this, O,
|
|
121
|
+
N(this, O, xe);
|
|
122
122
|
N(this, I);
|
|
123
123
|
N(this, U);
|
|
124
124
|
/**
|
|
@@ -127,13 +127,13 @@ class gr {
|
|
|
127
127
|
* @param filter - filter methode
|
|
128
128
|
* @returns formated page
|
|
129
129
|
*/
|
|
130
|
-
|
|
130
|
+
$(this, "getPage", (t = 0, r) => {
|
|
131
131
|
const s = typeof r == "function" ? this.items.filter(r) : this.items;
|
|
132
132
|
let n;
|
|
133
|
-
return
|
|
134
|
-
items: s.slice(t, t +
|
|
135
|
-
total:
|
|
136
|
-
top:
|
|
133
|
+
return v(this, I) ? n = v(this, I) : s.length > t + v(this, O) && (n = () => this.getPage(t + v(this, O), r)), new rt({
|
|
134
|
+
items: s.slice(t, t + v(this, O)),
|
|
135
|
+
total: v(this, U),
|
|
136
|
+
top: v(this, O),
|
|
137
137
|
next: n
|
|
138
138
|
});
|
|
139
139
|
});
|
|
@@ -141,73 +141,73 @@ class gr {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
O = new WeakMap(), I = new WeakMap(), U = new WeakMap();
|
|
144
|
-
const $r = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,
|
|
145
|
-
const t =
|
|
144
|
+
const $r = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, hr = (e) => e.toISOString().split("T")[0], _r = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), yr = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', br = (e) => typeof e == "number" && !Number.isNaN(e), vr = (e) => {
|
|
145
|
+
const t = Ee(e), r = Se(e);
|
|
146
146
|
return [e, ...t, ...r];
|
|
147
|
-
},
|
|
147
|
+
}, Ee = (e, t = []) => {
|
|
148
148
|
if (e.self !== e.top)
|
|
149
149
|
try {
|
|
150
150
|
const r = e.parent;
|
|
151
|
-
return r ? (t.push(r),
|
|
151
|
+
return r ? (t.push(r), Ee(r, t)) : t;
|
|
152
152
|
} catch (r) {
|
|
153
153
|
return console.error("Different hosts between iframes:", r), t;
|
|
154
154
|
}
|
|
155
155
|
return t;
|
|
156
|
-
},
|
|
156
|
+
}, Se = (e, t = []) => {
|
|
157
157
|
if (e.frames.length > 0)
|
|
158
158
|
for (const r of Array.from(e.frames))
|
|
159
|
-
t.push(r),
|
|
159
|
+
t.push(r), Se(r, t);
|
|
160
160
|
return t;
|
|
161
161
|
};
|
|
162
|
-
var
|
|
162
|
+
var st = Object.defineProperty, nt = (e, t) => {
|
|
163
163
|
for (var r in t)
|
|
164
|
-
|
|
165
|
-
},
|
|
166
|
-
|
|
167
|
-
err: () =>
|
|
168
|
-
map: () =>
|
|
164
|
+
st(e, r, { get: t[r], enumerable: !0 });
|
|
165
|
+
}, it = {};
|
|
166
|
+
nt(it, {
|
|
167
|
+
err: () => Oe,
|
|
168
|
+
map: () => ot,
|
|
169
169
|
ok: () => te,
|
|
170
|
-
unwrap: () =>
|
|
171
|
-
unwrapErr: () =>
|
|
170
|
+
unwrap: () => at,
|
|
171
|
+
unwrapErr: () => lt
|
|
172
172
|
});
|
|
173
173
|
var te = (e) => ({
|
|
174
174
|
isOk: !0,
|
|
175
175
|
isErr: !1,
|
|
176
176
|
value: e
|
|
177
|
-
}),
|
|
177
|
+
}), Oe = (e) => ({
|
|
178
178
|
isOk: !1,
|
|
179
179
|
isErr: !0,
|
|
180
180
|
value: e
|
|
181
181
|
});
|
|
182
|
-
function
|
|
182
|
+
function ot(e, t) {
|
|
183
183
|
if (e.isOk) {
|
|
184
184
|
const r = t(e.value);
|
|
185
185
|
return r instanceof Promise ? r.then((s) => te(s)) : te(r);
|
|
186
186
|
}
|
|
187
187
|
if (e.isErr) {
|
|
188
188
|
const r = e.value;
|
|
189
|
-
return
|
|
189
|
+
return Oe(r);
|
|
190
190
|
}
|
|
191
191
|
throw "should never get here";
|
|
192
192
|
}
|
|
193
|
-
var
|
|
193
|
+
var at = (e) => {
|
|
194
194
|
if (e.isOk)
|
|
195
195
|
return e.value;
|
|
196
196
|
throw e.value;
|
|
197
|
-
},
|
|
197
|
+
}, lt = (e) => {
|
|
198
198
|
if (e.isErr)
|
|
199
199
|
return e.value;
|
|
200
200
|
throw e.value;
|
|
201
201
|
};
|
|
202
|
-
const
|
|
202
|
+
const Ae = (e, t) => {
|
|
203
203
|
if (!t)
|
|
204
204
|
return;
|
|
205
205
|
const r = t.split("/");
|
|
206
206
|
return `${e}${r.slice(2, r.length - 1).join("-")}--docs`;
|
|
207
|
-
},
|
|
207
|
+
}, ct = (e, t) => {
|
|
208
208
|
if (t)
|
|
209
209
|
return `${e}${t}`;
|
|
210
|
-
},
|
|
210
|
+
}, ke = (e) => {
|
|
211
211
|
let t = e.overview ? `${e.overview}
|
|
212
212
|
|
|
213
213
|
` : "";
|
|
@@ -235,7 +235,7 @@ const Oe = (e, t) => {
|
|
|
235
235
|
`), t;
|
|
236
236
|
}, re = (e) => `${e.docs}
|
|
237
237
|
|
|
238
|
-
Type: \`${e.type}\``,
|
|
238
|
+
Type: \`${e.type}\``, wr = (e, t, r, s) => ({
|
|
239
239
|
$schema: "https://json.schemastore.org/web-types",
|
|
240
240
|
name: e,
|
|
241
241
|
version: t,
|
|
@@ -243,10 +243,10 @@ Type: \`${e.type}\``, vr = (e, t, r, s) => ({
|
|
|
243
243
|
contributions: {
|
|
244
244
|
html: {
|
|
245
245
|
elements: r.components.map((n) => {
|
|
246
|
-
const i =
|
|
246
|
+
const i = Ae(s, n.filePath);
|
|
247
247
|
return {
|
|
248
248
|
name: n.tag,
|
|
249
|
-
description:
|
|
249
|
+
description: ke(n),
|
|
250
250
|
"doc-url": i,
|
|
251
251
|
attributes: n.props.filter((o) => o.attr).map((o) => ({
|
|
252
252
|
name: o.attr,
|
|
@@ -284,23 +284,23 @@ Type: \`${e.type}\``, vr = (e, t, r, s) => ({
|
|
|
284
284
|
})
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
}),
|
|
288
|
-
{ name: "Storybook", url:
|
|
289
|
-
{ name: "Sources", url:
|
|
290
|
-
],
|
|
287
|
+
}), ft = (e, t, r) => [
|
|
288
|
+
{ name: "Storybook", url: Ae(e, r) },
|
|
289
|
+
{ name: "Sources", url: ct(t, r) }
|
|
290
|
+
], ut = (e) => {
|
|
291
291
|
if (!e.values.some(({ value: t }) => t === void 0))
|
|
292
292
|
return e.values.map(({ value: t }) => ({ name: t }));
|
|
293
|
-
},
|
|
293
|
+
}, mr = (e, t, r) => ({
|
|
294
294
|
version: 1.1,
|
|
295
295
|
tags: e.components.map((s) => {
|
|
296
|
-
const n =
|
|
296
|
+
const n = ft(t, r, s.filePath);
|
|
297
297
|
return {
|
|
298
298
|
name: s.tag,
|
|
299
|
-
description:
|
|
299
|
+
description: ke(s),
|
|
300
300
|
attributes: s.props.map((i) => ({
|
|
301
301
|
name: i.attr ?? i.name,
|
|
302
302
|
description: re(i),
|
|
303
|
-
values:
|
|
303
|
+
values: ut(i),
|
|
304
304
|
references: n
|
|
305
305
|
})),
|
|
306
306
|
references: n
|
|
@@ -308,16 +308,16 @@ Type: \`${e.type}\``, vr = (e, t, r, s) => ({
|
|
|
308
308
|
}),
|
|
309
309
|
globalAttributes: [],
|
|
310
310
|
valueSets: []
|
|
311
|
-
}),
|
|
311
|
+
}), xr = (e) => ({
|
|
312
312
|
version: 1.1,
|
|
313
313
|
properties: e.components.flatMap((t) => t.styles.map((r) => ({
|
|
314
314
|
name: r.name,
|
|
315
315
|
description: r.docs
|
|
316
316
|
})))
|
|
317
|
-
}),
|
|
317
|
+
}), pt = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, Er = (e) => {
|
|
318
318
|
const t = { value: "2023", pattern: "yyyy" }, r = { value: "12", pattern: "mm" }, s = { value: "24", pattern: "dd" };
|
|
319
|
-
return
|
|
320
|
-
},
|
|
319
|
+
return dt([t.value, r.value, s.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(r.value, r.pattern).replace(s.value, s.pattern);
|
|
320
|
+
}, gt = (e, t, r) => {
|
|
321
321
|
const s = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(s == null ? void 0 : s.lang), i = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || r, o = i.split("-").shift();
|
|
322
322
|
return Object.keys(t).length === 0 ? {
|
|
323
323
|
locale: i,
|
|
@@ -326,26 +326,26 @@ Type: \`${e.type}\``, vr = (e, t, r, s) => ({
|
|
|
326
326
|
locale: i,
|
|
327
327
|
messages: t[o] || t[r] || { lang: r }
|
|
328
328
|
};
|
|
329
|
-
},
|
|
329
|
+
}, Sr = (e, t, r) => new Intl.NumberFormat(t, { style: "currency", currency: r }).format(e), Or = (e, t, r = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: r }).format(Number(e)), Ar = (e, t, r = 0) => new Intl.NumberFormat(t, {
|
|
330
330
|
style: "percent",
|
|
331
331
|
minimumFractionDigits: r,
|
|
332
332
|
maximumFractionDigits: r
|
|
333
|
-
}).format(e),
|
|
333
|
+
}).format(e), kr = (e, t, r, s = "short", n = 0) => new Intl.NumberFormat(t, {
|
|
334
334
|
style: "unit",
|
|
335
335
|
unit: r,
|
|
336
336
|
unitDisplay: s,
|
|
337
337
|
minimumFractionDigits: n,
|
|
338
338
|
maximumFractionDigits: n
|
|
339
|
-
}).format(e),
|
|
339
|
+
}).format(e), dt = (e, t, r) => typeof e != "string" || e === "" || !pt.test(e) ? "" : new Intl.DateTimeFormat(t, r).format(new Date(e)), jr = (e, t) => (r) => gt(r, e, t);
|
|
340
340
|
var V = {
|
|
341
341
|
updatable: !0,
|
|
342
342
|
slotRelocation: !0,
|
|
343
343
|
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
344
344
|
experimentalSlotFixes: !1
|
|
345
|
-
}, $t = Object.defineProperty,
|
|
345
|
+
}, $t = Object.defineProperty, ht = (e, t) => {
|
|
346
346
|
for (var r in t)
|
|
347
347
|
$t(e, r, { get: t[r], enumerable: !0 });
|
|
348
|
-
},
|
|
348
|
+
}, _t = "http://www.w3.org/2000/svg", yt = "http://www.w3.org/1999/xhtml", de = (e, t) => t in e, $e = "http://www.w3.org/1999/xlink", A = typeof window < "u" ? window : {}, M = {
|
|
349
349
|
$flags$: 0,
|
|
350
350
|
$resourcesUrl$: "",
|
|
351
351
|
jmp: (e) => e(),
|
|
@@ -353,53 +353,53 @@ var V = {
|
|
|
353
353
|
ael: (e, t, r, s) => e.addEventListener(t, r, s),
|
|
354
354
|
rel: (e, t, r, s) => e.removeEventListener(t, r, s),
|
|
355
355
|
ce: (e, t) => new CustomEvent(e, t)
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
err: () =>
|
|
359
|
-
map: () =>
|
|
356
|
+
}, bt = (e) => e != null && e !== void 0, je = (e) => (e = typeof e, e === "object" || e === "function"), vt = {};
|
|
357
|
+
ht(vt, {
|
|
358
|
+
err: () => Te,
|
|
359
|
+
map: () => wt,
|
|
360
360
|
ok: () => se,
|
|
361
|
-
unwrap: () =>
|
|
362
|
-
unwrapErr: () =>
|
|
361
|
+
unwrap: () => mt,
|
|
362
|
+
unwrapErr: () => xt
|
|
363
363
|
});
|
|
364
364
|
var se = (e) => ({
|
|
365
365
|
isOk: !0,
|
|
366
366
|
isErr: !1,
|
|
367
367
|
value: e
|
|
368
|
-
}),
|
|
368
|
+
}), Te = (e) => ({
|
|
369
369
|
isOk: !1,
|
|
370
370
|
isErr: !0,
|
|
371
371
|
value: e
|
|
372
372
|
});
|
|
373
|
-
function
|
|
373
|
+
function wt(e, t) {
|
|
374
374
|
if (e.isOk) {
|
|
375
375
|
const r = t(e.value);
|
|
376
376
|
return r instanceof Promise ? r.then((s) => se(s)) : se(r);
|
|
377
377
|
}
|
|
378
378
|
if (e.isErr) {
|
|
379
379
|
const r = e.value;
|
|
380
|
-
return
|
|
380
|
+
return Te(r);
|
|
381
381
|
}
|
|
382
382
|
throw "should never get here";
|
|
383
383
|
}
|
|
384
|
-
var
|
|
384
|
+
var mt = (e) => {
|
|
385
385
|
if (e.isOk)
|
|
386
386
|
return e.value;
|
|
387
387
|
throw e.value;
|
|
388
|
-
},
|
|
388
|
+
}, xt = (e) => {
|
|
389
389
|
if (e.isErr)
|
|
390
390
|
return e.value;
|
|
391
391
|
throw e.value;
|
|
392
|
-
},
|
|
393
|
-
const t =
|
|
394
|
-
e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" &&
|
|
395
|
-
s.nodeType === 1 && s.tagName === "SLOT-FB" && (
|
|
392
|
+
}, Re = (e) => {
|
|
393
|
+
const t = _e(e, "childNodes");
|
|
394
|
+
e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" && Ne(t, e.tagName).forEach((s) => {
|
|
395
|
+
s.nodeType === 1 && s.tagName === "SLOT-FB" && (St(s, le(s), !1).length ? s.hidden = !0 : s.hidden = !1);
|
|
396
396
|
});
|
|
397
397
|
let r = 0;
|
|
398
398
|
for (r = 0; r < t.length; r++) {
|
|
399
399
|
const s = t[r];
|
|
400
|
-
s.nodeType === 1 &&
|
|
400
|
+
s.nodeType === 1 && _e(s, "childNodes").length && Re(s);
|
|
401
401
|
}
|
|
402
|
-
},
|
|
402
|
+
}, Et = (e) => {
|
|
403
403
|
const t = [];
|
|
404
404
|
for (let r = 0; r < e.length; r++) {
|
|
405
405
|
const s = e[r]["s-nr"] || void 0;
|
|
@@ -407,13 +407,13 @@ var wt = (e) => {
|
|
|
407
407
|
}
|
|
408
408
|
return t;
|
|
409
409
|
};
|
|
410
|
-
function
|
|
410
|
+
function Ne(e, t, r) {
|
|
411
411
|
let s = 0, n = [], i;
|
|
412
412
|
for (; s < e.length; s++)
|
|
413
|
-
i = e[s], i["s-sr"] && (!t || i["s-hn"] === t) && r === void 0 && n.push(i), n = [...n, ...
|
|
413
|
+
i = e[s], i["s-sr"] && (!t || i["s-hn"] === t) && r === void 0 && n.push(i), n = [...n, ...Ne(i.childNodes, t, r)];
|
|
414
414
|
return n;
|
|
415
415
|
}
|
|
416
|
-
var
|
|
416
|
+
var St = (e, t, r = !0) => {
|
|
417
417
|
const s = [];
|
|
418
418
|
(r && e["s-sr"] || !e["s-sr"]) && s.push(e);
|
|
419
419
|
let n = e;
|
|
@@ -421,7 +421,7 @@ var Et = (e, t, r = !0) => {
|
|
|
421
421
|
le(n) === t && (r || !n["s-sr"]) && s.push(n);
|
|
422
422
|
return s;
|
|
423
423
|
}, he = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", le = (e) => typeof e["s-sn"] == "string" ? e["s-sn"] : e.nodeType === 1 && e.getAttribute("slot") || void 0;
|
|
424
|
-
function
|
|
424
|
+
function Ot(e) {
|
|
425
425
|
if (e.assignedElements || e.assignedNodes || !e["s-sr"]) return;
|
|
426
426
|
const t = (r) => (function(s) {
|
|
427
427
|
const n = [], i = this["s-sn"];
|
|
@@ -431,31 +431,31 @@ function St(e) {
|
|
|
431
431
|
If you have a particular use case, please open an issue on the Stencil repo.
|
|
432
432
|
`);
|
|
433
433
|
const o = this["s-cr"].parentElement;
|
|
434
|
-
return (o.__childNodes ? o.childNodes :
|
|
435
|
-
i === le(
|
|
434
|
+
return (o.__childNodes ? o.childNodes : Et(o.childNodes)).forEach((l) => {
|
|
435
|
+
i === le(l) && n.push(l);
|
|
436
436
|
}), r ? n.filter(
|
|
437
|
-
(
|
|
437
|
+
(l) => l.nodeType === 1
|
|
438
438
|
/* ElementNode */
|
|
439
439
|
) : n;
|
|
440
440
|
}).bind(e);
|
|
441
441
|
e.assignedElements = t(!0), e.assignedNodes = t(!1);
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function _e(e, t) {
|
|
444
444
|
if ("__" + t in e) {
|
|
445
445
|
const r = e["__" + t];
|
|
446
446
|
return typeof r != "function" ? r : r.bind(e);
|
|
447
447
|
} else
|
|
448
448
|
return typeof e[t] != "function" ? e[t] : e[t].bind(e);
|
|
449
449
|
}
|
|
450
|
-
var
|
|
451
|
-
let s = null, n = null, i = null, o = !1,
|
|
452
|
-
const
|
|
450
|
+
var At = (e, t, ...r) => {
|
|
451
|
+
let s = null, n = null, i = null, o = !1, c = !1;
|
|
452
|
+
const l = [], f = (a) => {
|
|
453
453
|
for (let g = 0; g < a.length; g++)
|
|
454
|
-
s = a[g], Array.isArray(s) ? f(s) : s != null && typeof s != "boolean" && ((o = !
|
|
454
|
+
s = a[g], Array.isArray(s) ? f(s) : s != null && typeof s != "boolean" && ((o = !je(s)) && (s = String(s)), o && c ? l[l.length - 1].$text$ += s : l.push(o ? ne(null, s) : s), c = o);
|
|
455
455
|
};
|
|
456
456
|
f(r);
|
|
457
|
-
const
|
|
458
|
-
return
|
|
457
|
+
const u = ne(e, null);
|
|
458
|
+
return u.$attrs$ = t, l.length > 0 && (u.$children$ = l), u.$key$ = n, u.$name$ = i, u;
|
|
459
459
|
}, ne = (e, t) => {
|
|
460
460
|
const r = {
|
|
461
461
|
$flags$: 0,
|
|
@@ -465,14 +465,14 @@ var Ot = (e, t, ...r) => {
|
|
|
465
465
|
$children$: null
|
|
466
466
|
};
|
|
467
467
|
return r.$attrs$ = null, r.$key$ = null, r.$name$ = null, r;
|
|
468
|
-
},
|
|
468
|
+
}, kt = {}, jt = (e) => e && e.$tag$ === kt, ye = (e, t, r, s, n, i, o) => {
|
|
469
469
|
if (r === s)
|
|
470
470
|
return;
|
|
471
|
-
let
|
|
471
|
+
let c = de(e, t), l = t.toLowerCase();
|
|
472
472
|
if (t === "class") {
|
|
473
|
-
const f = e.classList,
|
|
473
|
+
const f = e.classList, u = be(r);
|
|
474
474
|
let a = be(s);
|
|
475
|
-
f.remove(...
|
|
475
|
+
f.remove(...u.filter((g) => g && !a.includes(g))), f.add(...a.filter((g) => g && !u.includes(g)));
|
|
476
476
|
} else if (t === "style") {
|
|
477
477
|
for (const f in r)
|
|
478
478
|
(!s || s[f] == null) && (f.includes("-") ? e.style.removeProperty(f) : e.style[f] = "");
|
|
@@ -481,42 +481,42 @@ var Ot = (e, t, ...r) => {
|
|
|
481
481
|
} else if (t !== "key") if (t === "ref")
|
|
482
482
|
s && s(e);
|
|
483
483
|
else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
|
|
484
|
-
if (t[2] === "-" ? t = t.slice(3) :
|
|
485
|
-
const f = t.endsWith(
|
|
486
|
-
t = t.replace(
|
|
484
|
+
if (t[2] === "-" ? t = t.slice(3) : de(A, l) ? t = l.slice(2) : t = l[2] + t.slice(3), r || s) {
|
|
485
|
+
const f = t.endsWith(ze);
|
|
486
|
+
t = t.replace(Rt, ""), r && M.rel(e, t, r, f), s && M.ael(e, t, s, f);
|
|
487
487
|
}
|
|
488
488
|
} else {
|
|
489
|
-
const f =
|
|
490
|
-
if ((
|
|
489
|
+
const f = je(s);
|
|
490
|
+
if ((c || f && s !== null) && !n)
|
|
491
491
|
try {
|
|
492
492
|
if (e.tagName.includes("-"))
|
|
493
493
|
e[t] !== s && (e[t] = s);
|
|
494
494
|
else {
|
|
495
495
|
const a = s ?? "";
|
|
496
|
-
t === "list" ?
|
|
496
|
+
t === "list" ? c = !1 : (r == null || e[t] != a) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = a : e.setAttribute(t, a));
|
|
497
497
|
}
|
|
498
498
|
} catch {
|
|
499
499
|
}
|
|
500
|
-
let
|
|
501
|
-
|
|
500
|
+
let u = !1;
|
|
501
|
+
l !== (l = l.replace(/^xlink\:?/, "")) && (t = l, u = !0), s == null || s === !1 ? (s !== !1 || e.getAttribute(t) === "") && (u ? e.removeAttributeNS($e, t) : e.removeAttribute(t)) : (!c || i & 4 || n) && !f && e.nodeType === 1 && (s = s === !0 ? "" : s, u ? e.setAttributeNS($e, t, s) : e.setAttribute(t, s));
|
|
502
502
|
}
|
|
503
|
-
},
|
|
503
|
+
}, Tt = /\s/, be = (e) => (typeof e == "object" && e && "baseVal" in e && (e = e.baseVal), !e || typeof e != "string" ? [] : e.split(Tt)), ze = "Capture", Rt = new RegExp(ze + "$"), ie = (e, t, r, s) => {
|
|
504
504
|
const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, i = e && e.$attrs$ || {}, o = t.$attrs$ || {};
|
|
505
|
-
for (const
|
|
506
|
-
|
|
505
|
+
for (const c of ve(Object.keys(i)))
|
|
506
|
+
c in o || ye(
|
|
507
507
|
n,
|
|
508
|
-
|
|
509
|
-
i[
|
|
508
|
+
c,
|
|
509
|
+
i[c],
|
|
510
510
|
void 0,
|
|
511
511
|
r,
|
|
512
512
|
t.$flags$
|
|
513
513
|
);
|
|
514
|
-
for (const
|
|
515
|
-
|
|
514
|
+
for (const c of ve(Object.keys(o)))
|
|
515
|
+
ye(
|
|
516
516
|
n,
|
|
517
|
-
|
|
518
|
-
i[
|
|
519
|
-
o[
|
|
517
|
+
c,
|
|
518
|
+
i[c],
|
|
519
|
+
o[c],
|
|
520
520
|
r,
|
|
521
521
|
t.$flags$
|
|
522
522
|
);
|
|
@@ -530,10 +530,10 @@ function ve(e) {
|
|
|
530
530
|
e
|
|
531
531
|
);
|
|
532
532
|
}
|
|
533
|
-
var H, J,
|
|
533
|
+
var H, J, C, oe = !1, K = !1, ce = !1, y = !1, X = (e, t, r) => {
|
|
534
534
|
var s;
|
|
535
535
|
const n = t.$children$[r];
|
|
536
|
-
let i = 0, o,
|
|
536
|
+
let i = 0, o, c, l;
|
|
537
537
|
if (oe || (ce = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
|
|
538
538
|
// slot element has fallback content
|
|
539
539
|
// still create an element that "mocks" the slot element
|
|
@@ -546,88 +546,88 @@ var H, J, M, oe = !1, X = !1, ce = !1, _ = !1, K = (e, t, r) => {
|
|
|
546
546
|
))), n.$text$ !== null)
|
|
547
547
|
o = n.$elm$ = A.document.createTextNode(n.$text$);
|
|
548
548
|
else if (n.$flags$ & 1)
|
|
549
|
-
o = n.$elm$ = A.document.createTextNode(""), ie(null, n,
|
|
549
|
+
o = n.$elm$ = A.document.createTextNode(""), ie(null, n, y);
|
|
550
550
|
else {
|
|
551
|
-
if (
|
|
551
|
+
if (y || (y = n.$tag$ === "svg"), !A.document)
|
|
552
552
|
throw new Error(
|
|
553
553
|
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
554
554
|
);
|
|
555
555
|
if (o = n.$elm$ = A.document.createElementNS(
|
|
556
|
-
|
|
556
|
+
y ? _t : yt,
|
|
557
557
|
!oe && V.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
|
|
558
|
-
),
|
|
558
|
+
), y && n.$tag$ === "foreignObject" && (y = !1), ie(null, n, y), bt(H) && o["s-si"] !== H && o.classList.add(o["s-si"] = H), n.$children$)
|
|
559
559
|
for (i = 0; i < n.$children$.length; ++i)
|
|
560
|
-
|
|
561
|
-
n.$tag$ === "svg" ?
|
|
560
|
+
c = X(e, n, i), c && o.appendChild(c);
|
|
561
|
+
n.$tag$ === "svg" ? y = !1 : o.tagName === "foreignObject" && (y = !0);
|
|
562
562
|
}
|
|
563
|
-
return o["s-hn"] =
|
|
563
|
+
return o["s-hn"] = C, n.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = J, o["s-sn"] = n.$name$ || "", o["s-rf"] = (s = n.$attrs$) == null ? void 0 : s.ref, Ot(o), l = e && e.$children$ && e.$children$[r], l && l.$tag$ === n.$tag$ && e.$elm$ && P(e.$elm$, !1), Ce(J, o, t.$elm$, e == null ? void 0 : e.$elm$)), o;
|
|
564
564
|
}, P = (e, t) => {
|
|
565
|
-
|
|
565
|
+
M.$flags$ |= 1;
|
|
566
566
|
const r = Array.from(e.__childNodes || e.childNodes);
|
|
567
567
|
e["s-sr"] && V.experimentalSlotFixes;
|
|
568
568
|
for (let s = r.length - 1; s >= 0; s--) {
|
|
569
569
|
const n = r[s];
|
|
570
|
-
n["s-hn"] !==
|
|
570
|
+
n["s-hn"] !== C && n["s-ol"] && (j(W(n).parentNode, n, W(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, ce = !0), t && P(n, t);
|
|
571
571
|
}
|
|
572
|
-
|
|
573
|
-
},
|
|
574
|
-
let o = e["s-cr"] && e["s-cr"].parentNode || e,
|
|
575
|
-
for (o.shadowRoot && o.tagName ===
|
|
576
|
-
s[n] && (
|
|
577
|
-
},
|
|
572
|
+
M.$flags$ &= -2;
|
|
573
|
+
}, Ie = (e, t, r, s, n, i) => {
|
|
574
|
+
let o = e["s-cr"] && e["s-cr"].parentNode || e, c;
|
|
575
|
+
for (o.shadowRoot && o.tagName === C && (o = o.shadowRoot); n <= i; ++n)
|
|
576
|
+
s[n] && (c = X(null, r, n), c && (s[n].$elm$ = c, j(o, c, W(t))));
|
|
577
|
+
}, Me = (e, t, r) => {
|
|
578
578
|
for (let s = t; s <= r; ++s) {
|
|
579
579
|
const n = e[s];
|
|
580
580
|
if (n) {
|
|
581
581
|
const i = n.$elm$;
|
|
582
|
-
Fe(n), i && (
|
|
582
|
+
Fe(n), i && (K = !0, i["s-ol"] ? i["s-ol"].remove() : P(i, !0), i.remove());
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
|
-
},
|
|
586
|
-
let i = 0, o = 0,
|
|
585
|
+
}, Nt = (e, t, r, s, n = !1) => {
|
|
586
|
+
let i = 0, o = 0, c = 0, l = 0, f = t.length - 1, u = t[0], a = t[f], g = s.length - 1, p = s[0], d = s[g], w, h;
|
|
587
587
|
for (; i <= f && o <= g; )
|
|
588
|
-
if (
|
|
589
|
-
|
|
588
|
+
if (u == null)
|
|
589
|
+
u = t[++i];
|
|
590
590
|
else if (a == null)
|
|
591
591
|
a = t[--f];
|
|
592
|
-
else if (
|
|
593
|
-
|
|
594
|
-
else if (
|
|
595
|
-
|
|
596
|
-
else if (B(
|
|
597
|
-
z(
|
|
598
|
-
else if (B(a,
|
|
599
|
-
z(a,
|
|
600
|
-
else if (B(
|
|
601
|
-
(
|
|
602
|
-
else if (B(a,
|
|
603
|
-
(
|
|
592
|
+
else if (p == null)
|
|
593
|
+
p = s[++o];
|
|
594
|
+
else if (d == null)
|
|
595
|
+
d = s[--g];
|
|
596
|
+
else if (B(u, p, n))
|
|
597
|
+
z(u, p, n), u = t[++i], p = s[++o];
|
|
598
|
+
else if (B(a, d, n))
|
|
599
|
+
z(a, d, n), a = t[--f], d = s[--g];
|
|
600
|
+
else if (B(u, d, n))
|
|
601
|
+
(u.$tag$ === "slot" || d.$tag$ === "slot") && P(u.$elm$.parentNode, !1), z(u, d, n), j(e, u.$elm$, a.$elm$.nextSibling), u = t[++i], d = s[--g];
|
|
602
|
+
else if (B(a, p, n))
|
|
603
|
+
(u.$tag$ === "slot" || d.$tag$ === "slot") && P(a.$elm$.parentNode, !1), z(a, p, n), j(e, a.$elm$, u.$elm$), a = t[--f], p = s[++o];
|
|
604
604
|
else {
|
|
605
|
-
for (
|
|
606
|
-
if (t[
|
|
607
|
-
|
|
605
|
+
for (c = -1, l = i; l <= f; ++l)
|
|
606
|
+
if (t[l] && t[l].$key$ !== null && t[l].$key$ === p.$key$) {
|
|
607
|
+
c = l;
|
|
608
608
|
break;
|
|
609
609
|
}
|
|
610
|
-
|
|
611
|
-
W(
|
|
612
|
-
|
|
613
|
-
W(
|
|
610
|
+
c >= 0 ? (h = t[c], h.$tag$ !== p.$tag$ ? w = X(t && t[o], r, c) : (z(h, p, n), t[c] = void 0, w = h.$elm$), p = s[++o]) : (w = X(t && t[o], r, o), p = s[++o]), w && j(
|
|
611
|
+
W(u.$elm$).parentNode,
|
|
612
|
+
w,
|
|
613
|
+
W(u.$elm$)
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
|
-
i > f ?
|
|
616
|
+
i > f ? Ie(
|
|
617
617
|
e,
|
|
618
618
|
s[g + 1] == null ? null : s[g + 1].$elm$,
|
|
619
619
|
r,
|
|
620
620
|
s,
|
|
621
621
|
o,
|
|
622
622
|
g
|
|
623
|
-
) : o > g &&
|
|
623
|
+
) : o > g && Me(t, i, f);
|
|
624
624
|
}, B = (e, t, r = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : r ? (r && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, W = (e) => e && e["s-ol"] || e, z = (e, t, r = !1) => {
|
|
625
|
-
const s = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$, o = t.$tag$,
|
|
626
|
-
let
|
|
627
|
-
|
|
625
|
+
const s = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$, o = t.$tag$, c = t.$text$;
|
|
626
|
+
let l;
|
|
627
|
+
c === null ? (y = o === "svg" ? !0 : o === "foreignObject" ? !1 : y, ie(e, t, y), n !== null && i !== null ? Nt(s, n, t, i, r) : i !== null ? (e.$text$ !== null && (s.textContent = ""), Ie(s, null, t, i, 0, i.length - 1)) : (
|
|
628
628
|
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
629
|
-
!r && V.updatable && n !== null &&
|
|
630
|
-
),
|
|
629
|
+
!r && V.updatable && n !== null && Me(n, 0, n.length - 1)
|
|
630
|
+
), y && o === "svg" && (y = !1)) : (l = s["s-cr"]) ? l.parentNode.textContent = c : e.$text$ !== c && (s.data = c);
|
|
631
631
|
}, m = [], Le = (e) => {
|
|
632
632
|
let t, r, s;
|
|
633
633
|
const n = e.__childNodes || e.childNodes;
|
|
@@ -638,14 +638,14 @@ var H, J, M, oe = !1, X = !1, ce = !1, _ = !1, K = (e, t, r) => {
|
|
|
638
638
|
for (s = r.length - 1; s >= 0; s--)
|
|
639
639
|
if (t = r[s], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== i["s-hn"])
|
|
640
640
|
if (he(t, o)) {
|
|
641
|
-
let
|
|
642
|
-
|
|
641
|
+
let c = m.find((l) => l.$nodeToRelocate$ === t);
|
|
642
|
+
K = !0, t["s-sn"] = t["s-sn"] || o, c ? (c.$nodeToRelocate$["s-sh"] = i["s-hn"], c.$slotRefNode$ = i) : (t["s-sh"] = i["s-hn"], m.push({
|
|
643
643
|
$slotRefNode$: i,
|
|
644
644
|
$nodeToRelocate$: t
|
|
645
|
-
})), t["s-sr"] && m.map((
|
|
646
|
-
he(
|
|
645
|
+
})), t["s-sr"] && m.map((l) => {
|
|
646
|
+
he(l.$nodeToRelocate$, t["s-sn"]) && (c = m.find((f) => f.$nodeToRelocate$ === t), c && !l.$slotRefNode$ && (l.$slotRefNode$ = c.$slotRefNode$));
|
|
647
647
|
});
|
|
648
|
-
} else m.some((
|
|
648
|
+
} else m.some((c) => c.$nodeToRelocate$ === t) || m.push({
|
|
649
649
|
$nodeToRelocate$: t
|
|
650
650
|
});
|
|
651
651
|
}
|
|
@@ -658,71 +658,71 @@ function Ce(e, t, r, s) {
|
|
|
658
658
|
var n, i;
|
|
659
659
|
let o;
|
|
660
660
|
if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (o = t["s-si"] || e.parentNode["s-sc"])) {
|
|
661
|
-
const
|
|
661
|
+
const c = t["s-sn"], l = t["s-hn"];
|
|
662
662
|
if ((n = r.classList) == null || n.add(o + "-s"), s && ((i = s.classList) != null && i.contains(o + "-s"))) {
|
|
663
|
-
let f = (s.__childNodes || s.childNodes)[0],
|
|
663
|
+
let f = (s.__childNodes || s.childNodes)[0], u = !1;
|
|
664
664
|
for (; f; ) {
|
|
665
|
-
if (f["s-sn"] !==
|
|
666
|
-
|
|
665
|
+
if (f["s-sn"] !== c && f["s-hn"] === l && f["s-sr"]) {
|
|
666
|
+
u = !0;
|
|
667
667
|
break;
|
|
668
668
|
}
|
|
669
669
|
f = f.nextSibling;
|
|
670
670
|
}
|
|
671
|
-
|
|
671
|
+
u || s.classList.remove(o + "-s");
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
674
|
}
|
|
675
|
-
var
|
|
676
|
-
var s, n, i, o,
|
|
677
|
-
const
|
|
678
|
-
if (
|
|
679
|
-
([g,
|
|
675
|
+
var zt = (e, t, r = !1) => {
|
|
676
|
+
var s, n, i, o, c;
|
|
677
|
+
const l = e.$hostElement$, f = e.$cmpMeta$, u = e.$vnode$ || ne(null, null), a = jt(t) ? t : At(null, null, t);
|
|
678
|
+
if (C = l.tagName, f.$attrsToReflect$ && (a.$attrs$ = a.$attrs$ || {}, f.$attrsToReflect$.map(
|
|
679
|
+
([g, p]) => a.$attrs$[p] = l[g]
|
|
680
680
|
)), r && a.$attrs$)
|
|
681
681
|
for (const g of Object.keys(a.$attrs$))
|
|
682
|
-
|
|
683
|
-
a.$tag$ = null, a.$flags$ |= 4, e.$vnode$ = a, a.$elm$ =
|
|
682
|
+
l.hasAttribute(g) && !["key", "ref", "style", "class"].includes(g) && (a.$attrs$[g] = l[g]);
|
|
683
|
+
a.$tag$ = null, a.$flags$ |= 4, e.$vnode$ = a, a.$elm$ = u.$elm$ = l.shadowRoot || l, H = l["s-sc"], oe = !!(f.$flags$ & 1) && !(f.$flags$ & 128), J = l["s-cr"], K = !1, z(u, a, r);
|
|
684
684
|
{
|
|
685
|
-
if (
|
|
685
|
+
if (M.$flags$ |= 1, ce) {
|
|
686
686
|
Le(a.$elm$);
|
|
687
687
|
for (const g of m) {
|
|
688
|
-
const
|
|
689
|
-
if (!
|
|
690
|
-
const
|
|
691
|
-
|
|
688
|
+
const p = g.$nodeToRelocate$;
|
|
689
|
+
if (!p["s-ol"] && A.document) {
|
|
690
|
+
const d = A.document.createTextNode("");
|
|
691
|
+
d["s-nr"] = p, j(p.parentNode, p["s-ol"] = d, p);
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
694
|
for (const g of m) {
|
|
695
|
-
const
|
|
696
|
-
if (
|
|
697
|
-
const
|
|
698
|
-
let h =
|
|
695
|
+
const p = g.$nodeToRelocate$, d = g.$slotRefNode$;
|
|
696
|
+
if (d) {
|
|
697
|
+
const w = d.parentNode;
|
|
698
|
+
let h = d.nextSibling;
|
|
699
699
|
{
|
|
700
|
-
let
|
|
701
|
-
for (;
|
|
702
|
-
let
|
|
703
|
-
if (
|
|
704
|
-
for (
|
|
705
|
-
|
|
706
|
-
if (!
|
|
707
|
-
h =
|
|
700
|
+
let L = (s = p["s-ol"]) == null ? void 0 : s.previousSibling;
|
|
701
|
+
for (; L; ) {
|
|
702
|
+
let _ = (n = L["s-nr"]) != null ? n : null;
|
|
703
|
+
if (_ && _["s-sn"] === p["s-sn"] && w === (_.__parentNode || _.parentNode)) {
|
|
704
|
+
for (_ = _.nextSibling; _ === p || _ != null && _["s-sr"]; )
|
|
705
|
+
_ = _ == null ? void 0 : _.nextSibling;
|
|
706
|
+
if (!_ || !_["s-nr"]) {
|
|
707
|
+
h = _;
|
|
708
708
|
break;
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
|
|
711
|
+
L = L.previousSibling;
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
|
-
const S =
|
|
715
|
-
(!h &&
|
|
714
|
+
const S = p.__parentNode || p.parentNode, T = p.__nextSibling || p.nextSibling;
|
|
715
|
+
(!h && w !== S || T !== h) && p !== h && (!p["s-hn"] && p["s-ol"] && (p["s-hn"] = p["s-ol"].parentNode.nodeName), j(w, p, h), p.nodeType === 1 && p.tagName !== "SLOT-FB" && (p.hidden = (i = p["s-ih"]) != null ? i : !1)), p && typeof d["s-rf"] == "function" && d["s-rf"](d);
|
|
716
716
|
} else
|
|
717
|
-
|
|
717
|
+
p.nodeType === 1 && (r && (p["s-ih"] = (o = p.hidden) != null ? o : !1), p.hidden = !0);
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
|
-
|
|
720
|
+
K && Re(a.$elm$), M.$flags$ &= -2, m.length = 0;
|
|
721
721
|
}
|
|
722
722
|
if (V.experimentalScopedSlotChanges && f.$flags$ & 2) {
|
|
723
723
|
const g = a.$elm$.__childNodes || a.$elm$.childNodes;
|
|
724
|
-
for (const
|
|
725
|
-
|
|
724
|
+
for (const p of g)
|
|
725
|
+
p["s-hn"] !== C && !p["s-sh"] && (r && p["s-ih"] == null && (p["s-ih"] = (c = p.hidden) != null ? c : !1), p.hidden = !0);
|
|
726
726
|
}
|
|
727
727
|
J = void 0;
|
|
728
728
|
};
|
|
@@ -735,7 +735,7 @@ const q = {
|
|
|
735
735
|
tag_wrap: 0,
|
|
736
736
|
tag_wrap_width: 80,
|
|
737
737
|
trim: []
|
|
738
|
-
}, x = "__!i-£___£%__", E = "!i-£___£%_",
|
|
738
|
+
}, x = "__!i-£___£%__", E = "!i-£___£%_", Pe = [
|
|
739
739
|
"area",
|
|
740
740
|
"base",
|
|
741
741
|
"br",
|
|
@@ -750,7 +750,7 @@ const q = {
|
|
|
750
750
|
"source",
|
|
751
751
|
"track",
|
|
752
752
|
"wbr"
|
|
753
|
-
], fe = (e) => /<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\s+.*?)*?\/{0,1}>/.test(e) || /<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e) || /<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e),
|
|
753
|
+
], fe = (e) => /<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\s+.*?)*?\/{0,1}>/.test(e) || /<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e) || /<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e), We = (e, t) => {
|
|
754
754
|
if (!e || !t)
|
|
755
755
|
throw new Error("Both 'current' and 'updates' must be passed-in to mergeObjects()");
|
|
756
756
|
let r;
|
|
@@ -759,58 +759,21 @@ const q = {
|
|
|
759
759
|
else if (typeof e == "object") {
|
|
760
760
|
r = { ...e };
|
|
761
761
|
for (let s of Object.keys(t))
|
|
762
|
-
typeof t[s] != "object" ? r[s] = t[s] : r[s] =
|
|
762
|
+
typeof t[s] != "object" ? r[s] = t[s] : r[s] = We(r[s] || {}, t[s]);
|
|
763
763
|
}
|
|
764
764
|
return r;
|
|
765
|
-
},
|
|
765
|
+
}, It = (e, t) => We(structuredClone(e), t), Mt = (e) => (e = e.replace(/<[\w:\-]+([^>]*[^\/])>/g, (t, r) => t.replace(r, (s) => s.replace(/\n/g, E + "nl!").replace(/\r/g, E + "cr!").replace(/\s/g, E + "ws!"))), e), Lt = (e) => e.replace(/\n/g, x + "nl!").replace(/\r/g, x + "cr!").replace(/\s/g, x + "ws!"), Ft = (e) => {
|
|
766
766
|
const t = /\s*<([a-zA-Z0-9:-]+)[^>]*>\n\s*<\/\1>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n)|<([a-zA-Z0-9:-]+)[^>]*>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n\s*)<\/\3>/g;
|
|
767
767
|
return e.replace(t, (r, s, n, i, o) => {
|
|
768
|
-
const
|
|
769
|
-
if (!
|
|
768
|
+
const c = n || o;
|
|
769
|
+
if (!c)
|
|
770
770
|
return r;
|
|
771
|
-
const
|
|
772
|
-
return r.replace(
|
|
771
|
+
const l = c.replace(/\n/g, x + "nl!").replace(/\r/g, x + "cr!").replace(/\s/g, x + "ws!");
|
|
772
|
+
return r.replace(c, l);
|
|
773
773
|
});
|
|
774
774
|
}, Ct = (e) => {
|
|
775
775
|
const t = /<([A-Za-z][A-Za-z0-9]*|[a-z][a-z0-9._]*-[a-z0-9._-]+)((?:\s+[A-Za-z0-9_-]+="[^"]*"|\s*[a-z]*)*)>/g;
|
|
776
776
|
return e = e.replace(t, (r, s, n) => r.replace(n, (i) => i.replace(/</g, E + "lt!").replace(/>/g, E + "gt!"))), e;
|
|
777
|
-
}, Mt = (e, t) => {
|
|
778
|
-
const r = t.ignore, s = t.ignore_with, n = {
|
|
779
|
-
"<": "-" + s + "lt-",
|
|
780
|
-
">": "-" + s + "gt-",
|
|
781
|
-
"\n": "-" + s + "nl-",
|
|
782
|
-
"\r": "-" + s + "cr-",
|
|
783
|
-
" ": "-" + s + "ws-",
|
|
784
|
-
// Use space ' ' as key
|
|
785
|
-
" ": "-" + s + "tab-"
|
|
786
|
-
// Use tab '\t' as key (add placeholder if needed)
|
|
787
|
-
// Add other specific whitespace chars like \v, \f if necessary
|
|
788
|
-
}, i = /[<>\n\r \t]/g;
|
|
789
|
-
for (let o = 0; o < r.length; o++) {
|
|
790
|
-
const l = r[o].replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), c = new RegExp(
|
|
791
|
-
`<${l}[^>]*>(.*?)</${l}>`,
|
|
792
|
-
"gs"
|
|
793
|
-
// Use 'g' (global) and 's' (dotAll) flags
|
|
794
|
-
);
|
|
795
|
-
e = e.replace(
|
|
796
|
-
c,
|
|
797
|
-
(f, p) => {
|
|
798
|
-
const a = p.replace(
|
|
799
|
-
i,
|
|
800
|
-
($) => n[
|
|
801
|
-
/** @type {ReplacementKey} */
|
|
802
|
-
$
|
|
803
|
-
]
|
|
804
|
-
), g = f.indexOf(">") + 1, u = f.lastIndexOf(`</${l}>`);
|
|
805
|
-
if (g > 0 && u > 0) {
|
|
806
|
-
const $ = f.substring(0, g), b = f.substring(u);
|
|
807
|
-
return $ + a + b;
|
|
808
|
-
} else
|
|
809
|
-
return f;
|
|
810
|
-
}
|
|
811
|
-
);
|
|
812
|
-
}
|
|
813
|
-
return e;
|
|
814
777
|
}, Pt = (e, t) => {
|
|
815
778
|
for (let r = 0; r < t.length; r++) {
|
|
816
779
|
const s = new RegExp(`(<${t[r]}[^>]*>)\\s+`, "g"), n = new RegExp(`\\s+(</${t[r]}>)`, "g");
|
|
@@ -819,10 +782,10 @@ const q = {
|
|
|
819
782
|
return e;
|
|
820
783
|
}, Wt = (e) => (e = e.replace(/<[\w:\-]+([^>]*[^\/])>/g, (t, r) => t.replace(r, (s) => s.replace(new RegExp(E + "nl!", "g"), `
|
|
821
784
|
`).replace(new RegExp(E + "cr!", "g"), "\r").replace(new RegExp(E + "ws!", "g"), " "))), e), Ut = (e) => (e = e.replace(/.*__!i-£___£%__[a-z]{2}!.*/g, (t) => t.replace(/__!i-£___£%__[a-z]{2}!/g, (r) => r.replace(new RegExp(x + "nl!", "g"), `
|
|
822
|
-
`).replace(new RegExp(x + "cr!", "g"), "\r").replace(new RegExp(x + "ws!", "g"), " "))), e),
|
|
785
|
+
`).replace(new RegExp(x + "cr!", "g"), "\r").replace(new RegExp(x + "ws!", "g"), " "))), e), Ue = E.replace(
|
|
823
786
|
/[-\/\\^$*+?.()|[\]{}]/g,
|
|
824
787
|
"\\$&"
|
|
825
|
-
), Zt = new RegExp(
|
|
788
|
+
), Zt = new RegExp(Ue + "lt!", "g"), Dt = new RegExp(Ue + "gt!", "g"), Bt = (e) => {
|
|
826
789
|
const t = /<([\w:\-]+)([^>]*)>/g;
|
|
827
790
|
return e.replace(
|
|
828
791
|
t,
|
|
@@ -831,16 +794,7 @@ const q = {
|
|
|
831
794
|
return `<${s}${i}>`;
|
|
832
795
|
}
|
|
833
796
|
);
|
|
834
|
-
}, Ht = (e
|
|
835
|
-
const r = t.ignore, s = t.ignore_with;
|
|
836
|
-
for (let n = 0; n < r.length; n++) {
|
|
837
|
-
const i = new RegExp(`<${r[n]}[^>]*>((.|
|
|
838
|
-
)*?)</${r[n]}>`, "g");
|
|
839
|
-
e = e.replace(i, (o, l) => o.replace(l, (c) => c.replace(new RegExp("-" + s + "lt-", "g"), "<").replace(new RegExp("-" + s + "gt-", "g"), ">").replace(new RegExp("-" + s + "nl-", "g"), `
|
|
840
|
-
`).replace(new RegExp("-" + s + "cr-", "g"), "\r").replace(new RegExp("-" + s + "ws-", "g"), " ")));
|
|
841
|
-
}
|
|
842
|
-
return e;
|
|
843
|
-
}, qt = (e) => {
|
|
797
|
+
}, Ht = (e) => {
|
|
844
798
|
var s, n;
|
|
845
799
|
if (typeof e != "object") throw new Error("Config must be an object.");
|
|
846
800
|
if (!(Object.hasOwn(e, "content_wrap") || Object.hasOwn(e, "ignore") || Object.hasOwn(e, "ignore_with") || Object.hasOwn(e, "strict") || Object.hasOwn(e, "tab_size") || Object.hasOwn(e, "tag_wrap") || Object.hasOwn(e, "tag_wrap_width") || Object.hasOwn(e, "trim"))) return q;
|
|
@@ -865,27 +819,62 @@ const q = {
|
|
|
865
819
|
throw new Error(`tag_wrap_width config must be a number, not ${typeof e.tag_wrap_width}.`);
|
|
866
820
|
if (Object.hasOwn(e, "trim") && (!Array.isArray(e.trim) || !((n = e.trim) != null && n.every((i) => typeof i == "string"))))
|
|
867
821
|
throw new Error("Trim config must be an array of strings.");
|
|
868
|
-
return
|
|
869
|
-
},
|
|
822
|
+
return It(q, e);
|
|
823
|
+
}, qt = (e, t, r) => {
|
|
870
824
|
const s = e.trim().split(/\s+/);
|
|
871
825
|
if (s.length === 0 || s.length === 1 && s[0] === "")
|
|
872
826
|
return "";
|
|
873
827
|
const n = [];
|
|
874
828
|
let i = "";
|
|
875
829
|
const o = r;
|
|
876
|
-
s.forEach((
|
|
877
|
-
if (
|
|
878
|
-
if (
|
|
879
|
-
i !== "" && n.push(n.length === 0 ? r + i : o + i), n.push(n.length === 0 ? r +
|
|
830
|
+
s.forEach((l) => {
|
|
831
|
+
if (l === "") return;
|
|
832
|
+
if (l.length >= t) {
|
|
833
|
+
i !== "" && n.push(n.length === 0 ? r + i : o + i), n.push(n.length === 0 ? r + l : o + l), i = "";
|
|
880
834
|
return;
|
|
881
835
|
}
|
|
882
|
-
const f = i === "" ?
|
|
883
|
-
f.length <= t ? i = f : (i !== "" && n.push(n.length === 0 ? r + i : o + i), i =
|
|
836
|
+
const f = i === "" ? l : i + " " + l;
|
|
837
|
+
f.length <= t ? i = f : (i !== "" && n.push(n.length === 0 ? r + i : o + i), i = l);
|
|
884
838
|
}), i !== "" && n.push(n.length === 0 ? r + i : o + i);
|
|
885
|
-
const
|
|
839
|
+
const c = n.join(`
|
|
886
840
|
`);
|
|
887
|
-
return Lt(
|
|
888
|
-
}
|
|
841
|
+
return Lt(c);
|
|
842
|
+
};
|
|
843
|
+
function Gt(e, t) {
|
|
844
|
+
let r = e;
|
|
845
|
+
const s = /* @__PURE__ */ new Map();
|
|
846
|
+
let n = 0;
|
|
847
|
+
const i = "___HTMLFY_SPECIAL_IGNORE_MARKER_";
|
|
848
|
+
for (const o of t.ignore) {
|
|
849
|
+
const c = o.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), l = new RegExp(
|
|
850
|
+
`<${c}[^>]*>.*?</${c}>`,
|
|
851
|
+
"gs"
|
|
852
|
+
// global and dotAll
|
|
853
|
+
);
|
|
854
|
+
let f;
|
|
855
|
+
const u = [];
|
|
856
|
+
for (; (f = l.exec(r)) !== null; ) {
|
|
857
|
+
const a = `${i}${n++}___`;
|
|
858
|
+
s.set(a, f[0]), u.push({
|
|
859
|
+
start: f.index,
|
|
860
|
+
end: l.lastIndex,
|
|
861
|
+
marker: a
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
for (let a = u.length - 1; a >= 0; a--) {
|
|
865
|
+
const g = u[a];
|
|
866
|
+
r = r.substring(0, g.start) + g.marker + r.substring(g.end);
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
return { html_with_markers: r, extracted_map: s };
|
|
870
|
+
}
|
|
871
|
+
function Jt(e, t) {
|
|
872
|
+
let r = e;
|
|
873
|
+
for (const [s, n] of t)
|
|
874
|
+
r = r.split(s).join(n);
|
|
875
|
+
return r;
|
|
876
|
+
}
|
|
877
|
+
const Kt = (e, t = !0) => t && !fe(e) ? e : e.replace(/<([a-zA-Z\-0-9:]+)[^>]*>/g, (r, s) => Pe.indexOf(s) > -1 ? `${r.substring(0, r.length - 1)} />`.replace(/\/\s\//g, "/") : r.replace(/[\s]?\/>/g, `></${s}>`)), Xt = (e, t = !1) => (e = e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g, (r, s) => r.replace(s, (n) => n.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\n/g, " ").replace(/\r/g, " ").replace(/\s/g, " "))), t && (e = e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g, (r, s) => (r = r.replace(s, (n) => n.replace(/\n|\t/g, "").replace(/[a-z]+="\s*"/ig, "").replace(/>\s+</g, "><").replace(/\s+/g, " ")), r = r.replace(/\s+/g, " ").replace(/\s>/g, ">").replace(/>\s/g, ">").replace(/\s</g, "<").replace(/class=["']\s/g, (n) => n.replace(/\s/g, "")).replace(/(class=.*)\s(["'])/g, "$1$2"), r))), e), Yt = (e, t = !0) => (t && !fe(e) || (e = Xt(e), e = e.replace(/\n|\t/g, ""), e = e.replace(/>\s+</g, "><"), e = e.replace(/ {2,}/g, " "), e = e.replace(/ >/g, ">"), e = e.replace(/ </g, "<"), e = e.replace(/> /g, ">"), e = e.replace(/<\s*\//g, "</"), e = e.replace(/ = /g, "="), e = e.replace(
|
|
889
878
|
/([a-zA-Z0-9_-]+)=(['"])(.*?)\2/g,
|
|
890
879
|
(r, s, n, i) => {
|
|
891
880
|
const o = i.trim();
|
|
@@ -893,84 +882,95 @@ const q = {
|
|
|
893
882
|
}
|
|
894
883
|
), e = e.trim()), e);
|
|
895
884
|
let G, ae;
|
|
896
|
-
const
|
|
885
|
+
const F = {
|
|
897
886
|
line: []
|
|
898
|
-
}
|
|
899
|
-
|
|
887
|
+
};
|
|
888
|
+
let we;
|
|
889
|
+
const Qt = (e) => {
|
|
890
|
+
F.line = [];
|
|
900
891
|
let t = -1;
|
|
901
892
|
const r = /(<[^>]+>)|([^<]+)/g;
|
|
902
|
-
return e = e.replace(r, (s, n, i) => (n ?
|
|
893
|
+
return e = e.replace(r, (s, n, i) => (n ? F.line.push({ type: "tag", value: s }) : i && i.trim().length > 0 && F.line.push({ type: "text", value: s }), t++, `
|
|
903
894
|
[#-# : ${t} : ${s} : #-#]
|
|
904
895
|
`)), e;
|
|
905
|
-
},
|
|
896
|
+
}, Vt = (e) => (e = Kt(e, !1), ae.length > 0 && (e = Pt(e, ae)), e = Yt(e, !1), e = Qt(e), e), er = (e, t) => {
|
|
906
897
|
const r = " ".repeat(t.tab_size), s = t.tag_wrap, n = t.content_wrap, o = `-${t.ignore_with}`;
|
|
907
|
-
let
|
|
908
|
-
const
|
|
909
|
-
|
|
910
|
-
let
|
|
911
|
-
const
|
|
898
|
+
let c = "";
|
|
899
|
+
const l = [], f = /<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g, u = /\s{1}[A-Za-z-]+(?:=".*?")?/g;
|
|
900
|
+
F.line.forEach((g, p) => {
|
|
901
|
+
let d = g.value;
|
|
902
|
+
const w = d.startsWith(o + "lt--") || d.startsWith(o + "gt--") || d.startsWith(o + "nl--") || d.startsWith(o + "cr--") || d.startsWith(o + "ws--") || d.startsWith(o + "tab--");
|
|
912
903
|
let h = 0;
|
|
913
|
-
const S =
|
|
914
|
-
|
|
915
|
-
const
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
904
|
+
const S = F.line[p - 1], T = (S == null ? void 0 : S.value) ?? "";
|
|
905
|
+
c += "0", p === 0 && h++, d.trim().startsWith("</") && h++, T.trim().startsWith("<!doctype") && h++, T.trim().startsWith("<!--") && h++, T.trim().endsWith("/>") && h++, T.trim().startsWith("</") && h++, (S == null ? void 0 : S.type) === "text" && h++;
|
|
906
|
+
const _ = Math.max(0, c.length - h);
|
|
907
|
+
if (c = c.substring(0, _), g.type === "text" && /^[!,;\.]/.test(d))
|
|
908
|
+
if (d.length === 1) {
|
|
909
|
+
l[l.length - 1] = l.at(-1) + d;
|
|
910
|
+
return;
|
|
911
|
+
} else
|
|
912
|
+
l[l.length - 1] = l.at(-1) + d.charAt(0), d = d.slice(1).trim();
|
|
913
|
+
const R = r.repeat(_);
|
|
914
|
+
if (w)
|
|
915
|
+
l.push(d);
|
|
920
916
|
else {
|
|
921
|
-
if (G &&
|
|
917
|
+
if (G && d.trim().startsWith("<!--"))
|
|
922
918
|
return;
|
|
923
|
-
let
|
|
924
|
-
if (g.type === "text" && n > 0 &&
|
|
925
|
-
|
|
926
|
-
else if (s > 0 &&
|
|
927
|
-
f.lastIndex = 0,
|
|
928
|
-
const Z =
|
|
919
|
+
let b = d;
|
|
920
|
+
if (g.type === "text" && n > 0 && b.length >= n)
|
|
921
|
+
b = qt(b, n, R);
|
|
922
|
+
else if (s > 0 && b.length > s && f.test(b)) {
|
|
923
|
+
f.lastIndex = 0, u.lastIndex = 0;
|
|
924
|
+
const Z = b.split(u).filter(Boolean);
|
|
929
925
|
if (Z.length >= 2) {
|
|
930
|
-
const
|
|
926
|
+
const De = b.matchAll(u), Be = R + r;
|
|
931
927
|
let ee = R + Z[0] + `
|
|
932
928
|
`;
|
|
933
|
-
for (const
|
|
934
|
-
const Xe =
|
|
935
|
-
ee +=
|
|
929
|
+
for (const Ke of De) {
|
|
930
|
+
const Xe = Ke[0].trim();
|
|
931
|
+
ee += Be + Xe + `
|
|
936
932
|
`;
|
|
937
933
|
}
|
|
938
|
-
const ue = Z[0].match(/<([A-Za-z_:-]+)/),
|
|
939
|
-
ee +=
|
|
934
|
+
const ue = Z[0].match(/<([A-Za-z_:-]+)/), He = ue ? ue[1] : "", qe = Pe.includes(He), Ge = Z[1].trim(), Je = R + (G && qe ? " " : "");
|
|
935
|
+
ee += Je + Ge, b = ee;
|
|
940
936
|
} else
|
|
941
|
-
|
|
937
|
+
b = R + b;
|
|
942
938
|
} else
|
|
943
|
-
|
|
944
|
-
|
|
939
|
+
b = R + b;
|
|
940
|
+
l.push(b);
|
|
945
941
|
}
|
|
946
942
|
});
|
|
947
|
-
let a =
|
|
943
|
+
let a = l.join(`
|
|
948
944
|
`);
|
|
949
|
-
return s > 0 && (a =
|
|
945
|
+
return s > 0 && (a = Mt(a)), n > 0 && /\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n/.test(a) && (a = Ft(a)), a = a.replace(
|
|
950
946
|
/<(?<Element>.+).*>[^<]*?[^><\/\s][^<]*?<\/{1}\k<Element>|<script[^>]*>\s+<\/script>|<(\w+)>\s+<\/(\w+)|<(?:([\w:\._-]+)|([\w:\._-]+)[^>]*[^\/])>\s+<\/([\w:\._-]+)>/g,
|
|
951
947
|
(g) => g.replace(/\n|\t|\s{2,}/g, "")
|
|
952
948
|
), n > 0 && (a = Ut(a)), s > 0 && (a = Wt(a)), G && (a = a.replace(/\s\/>|\/>/g, ">")), a.startsWith(`
|
|
953
949
|
`) && (a = a.substring(1)), a.endsWith(`
|
|
954
950
|
`) && (a = a.substring(0, a.length - 1)), a;
|
|
955
|
-
},
|
|
951
|
+
}, tr = (e, t) => {
|
|
956
952
|
if (!fe(e)) return e;
|
|
957
|
-
const r = t ?
|
|
953
|
+
const r = t ? Ht(t) : q;
|
|
958
954
|
G = r.strict;
|
|
959
955
|
const s = r.ignore.length > 0;
|
|
960
|
-
|
|
961
|
-
|
|
956
|
+
if (ae = r.trim, s) {
|
|
957
|
+
const { html_with_markers: n, extracted_map: i } = Gt(e, r);
|
|
958
|
+
e = n, we = i;
|
|
959
|
+
}
|
|
960
|
+
return e = Ct(e), e = Vt(e), e = er(e, r), e = Bt(e), s && (e = Jt(e, we)), e;
|
|
961
|
+
}, rr = (e, t, r) => {
|
|
962
962
|
[null, void 0, "", !1].includes(r) || ["innerHTML", "style", ""].includes(t) || e.setAttribute(t, ["object", "function"].includes(typeof r) ? "⚠️ Property must be set through a script or a framework-specific syntax." : r);
|
|
963
|
-
},
|
|
963
|
+
}, Ze = (e, t, r, s, n) => {
|
|
964
964
|
if (t && typeof t == "string") {
|
|
965
965
|
const i = document.createElement(t);
|
|
966
966
|
Object.keys(r || {}).forEach((o) => {
|
|
967
|
-
|
|
967
|
+
rr(i, o, r[o]);
|
|
968
968
|
}), s == null || s.forEach((o) => {
|
|
969
|
-
|
|
969
|
+
Ze(i, o.$tag$, o.$attrs$, o.$children$, o.$text$);
|
|
970
970
|
}), r != null && r.innerHTML && (i.innerHTML = r.innerHTML), e.appendChild(i);
|
|
971
971
|
}
|
|
972
972
|
n && (e.innerHTML = n);
|
|
973
|
-
},
|
|
973
|
+
}, Tr = (e, t, r = []) => {
|
|
974
974
|
const s = {};
|
|
975
975
|
if (typeof e != "object")
|
|
976
976
|
throw new Error("filterArgs - args isn't an object.");
|
|
@@ -980,36 +980,36 @@ const C = {
|
|
|
980
980
|
(!t || !Object.keys(t).includes(n) || t[n] !== i) && (s[o] = i);
|
|
981
981
|
}
|
|
982
982
|
return s;
|
|
983
|
-
},
|
|
983
|
+
}, Rr = (e, t) => {
|
|
984
984
|
var s, n;
|
|
985
985
|
const r = document.getElementById("storybook-root");
|
|
986
986
|
if (r !== null)
|
|
987
|
-
return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((s = t.globals) == null ? void 0 : s.locale) || "en"),
|
|
987
|
+
return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((s = t.globals) == null ? void 0 : s.locale) || "en"), zt({
|
|
988
988
|
$cmpMeta$: {
|
|
989
989
|
$flags$: 0,
|
|
990
990
|
$tagName$: r.tagName
|
|
991
991
|
},
|
|
992
992
|
$hostElement$: r
|
|
993
993
|
}, e(t)), r.children[r.children.length - 1];
|
|
994
|
-
},
|
|
994
|
+
}, Nr = ({ $tag$: e, $attrs$: t, $children$: r, $text$: s }) => {
|
|
995
995
|
const n = document.createElement("div");
|
|
996
|
-
return
|
|
996
|
+
return Ze(n, e, t, r, s), tr(n.innerHTML, {
|
|
997
997
|
tag_wrap: 40,
|
|
998
998
|
content_wrap: 120
|
|
999
999
|
}).replace(/="true"/g, "");
|
|
1000
|
-
},
|
|
1000
|
+
}, me = (e, t) => {
|
|
1001
1001
|
if (!t)
|
|
1002
1002
|
return;
|
|
1003
1003
|
const r = t.split("/");
|
|
1004
1004
|
return `${e}${r.slice(2, r.length - 1).join("-")}--docs`;
|
|
1005
1005
|
};
|
|
1006
1006
|
var k, Y;
|
|
1007
|
-
class
|
|
1007
|
+
class zr {
|
|
1008
1008
|
constructor(t) {
|
|
1009
1009
|
/**
|
|
1010
1010
|
* JsonDocs
|
|
1011
1011
|
*/
|
|
1012
|
-
|
|
1012
|
+
$(this, "jsonDoc");
|
|
1013
1013
|
/**
|
|
1014
1014
|
* Get component data from the jsonDoc
|
|
1015
1015
|
* @param tagName - tag name we want to get the data from
|
|
@@ -1031,11 +1031,11 @@ class Nr {
|
|
|
1031
1031
|
* @param tagName - tag name we want to extract the arg types from
|
|
1032
1032
|
* @returns component arg types
|
|
1033
1033
|
*/
|
|
1034
|
-
|
|
1035
|
-
const r =
|
|
1036
|
-
const { control: g, options:
|
|
1034
|
+
$(this, "extractArgTypes", (t) => {
|
|
1035
|
+
const r = v(this, k).call(this, t), s = r == null ? void 0 : r.props.reduce((u, a) => {
|
|
1036
|
+
const { control: g, options: p } = v(this, Y).call(this, a);
|
|
1037
1037
|
return {
|
|
1038
|
-
...
|
|
1038
|
+
...u,
|
|
1039
1039
|
[a.name]: {
|
|
1040
1040
|
name: a.attr || a.name,
|
|
1041
1041
|
description: a.docs,
|
|
@@ -1046,11 +1046,11 @@ class Nr {
|
|
|
1046
1046
|
defaultValue: { summary: a.default }
|
|
1047
1047
|
},
|
|
1048
1048
|
control: g,
|
|
1049
|
-
options:
|
|
1049
|
+
options: p
|
|
1050
1050
|
}
|
|
1051
1051
|
};
|
|
1052
|
-
}, {}), n = r == null ? void 0 : r.events.reduce((
|
|
1053
|
-
...
|
|
1052
|
+
}, {}), n = r == null ? void 0 : r.events.reduce((u, a) => ({
|
|
1053
|
+
...u,
|
|
1054
1054
|
[a.event]: {
|
|
1055
1055
|
name: a.event,
|
|
1056
1056
|
description: a.docs,
|
|
@@ -1059,8 +1059,8 @@ class Nr {
|
|
|
1059
1059
|
type: { summary: a.detail }
|
|
1060
1060
|
}
|
|
1061
1061
|
}
|
|
1062
|
-
}), {}), i = r == null ? void 0 : r.methods.reduce((
|
|
1063
|
-
...
|
|
1062
|
+
}), {}), i = r == null ? void 0 : r.methods.reduce((u, a) => ({
|
|
1063
|
+
...u,
|
|
1064
1064
|
[a.name]: {
|
|
1065
1065
|
name: a.name,
|
|
1066
1066
|
description: a.docs,
|
|
@@ -1069,8 +1069,8 @@ class Nr {
|
|
|
1069
1069
|
type: { summary: a.signature }
|
|
1070
1070
|
}
|
|
1071
1071
|
}
|
|
1072
|
-
}), {}), o = r == null ? void 0 : r.slots.reduce((
|
|
1073
|
-
...
|
|
1072
|
+
}), {}), o = r == null ? void 0 : r.slots.reduce((u, a) => ({
|
|
1073
|
+
...u,
|
|
1074
1074
|
[a.name]: {
|
|
1075
1075
|
name: a.name !== "" ? a.name : "default",
|
|
1076
1076
|
// default slot are unnamed
|
|
@@ -1080,8 +1080,8 @@ class Nr {
|
|
|
1080
1080
|
type: { summary: void 0 }
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
|
-
}), {}),
|
|
1084
|
-
...
|
|
1083
|
+
}), {}), c = r == null ? void 0 : r.styles.reduce((u, a) => ({
|
|
1084
|
+
...u,
|
|
1085
1085
|
[a.name]: {
|
|
1086
1086
|
name: a.name,
|
|
1087
1087
|
description: a.docs,
|
|
@@ -1090,40 +1090,40 @@ class Nr {
|
|
|
1090
1090
|
type: { summary: void 0 }
|
|
1091
1091
|
}
|
|
1092
1092
|
}
|
|
1093
|
-
}), {}),
|
|
1094
|
-
const g =
|
|
1093
|
+
}), {}), l = r == null ? void 0 : r.dependencies.reduce((u, a) => {
|
|
1094
|
+
const g = v(this, k).call(this, a);
|
|
1095
1095
|
return g ? {
|
|
1096
|
-
...
|
|
1096
|
+
...u,
|
|
1097
1097
|
[a]: {
|
|
1098
1098
|
name: a,
|
|
1099
|
-
description: `<a href="./?path=/docs/${
|
|
1099
|
+
description: `<a href="./?path=/docs/${me("", g == null ? void 0 : g.filePath)}">View Component Documentation</a>`,
|
|
1100
1100
|
table: {
|
|
1101
1101
|
category: "depends on",
|
|
1102
1102
|
type: { summary: void 0 }
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
|
-
} :
|
|
1106
|
-
}, {}), f = r == null ? void 0 : r.dependents.reduce((
|
|
1107
|
-
const g =
|
|
1105
|
+
} : u;
|
|
1106
|
+
}, {}), f = r == null ? void 0 : r.dependents.reduce((u, a) => {
|
|
1107
|
+
const g = v(this, k).call(this, a);
|
|
1108
1108
|
return g ? {
|
|
1109
|
-
...
|
|
1109
|
+
...u,
|
|
1110
1110
|
[a]: {
|
|
1111
1111
|
name: a,
|
|
1112
|
-
description: `<a href="./?path=/docs/${
|
|
1112
|
+
description: `<a href="./?path=/docs/${me("", g == null ? void 0 : g.filePath)}">View Component Documentation</a>`,
|
|
1113
1113
|
table: {
|
|
1114
1114
|
category: "used by",
|
|
1115
1115
|
type: { summary: void 0 }
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
|
-
} :
|
|
1118
|
+
} : u;
|
|
1119
1119
|
}, {});
|
|
1120
1120
|
return {
|
|
1121
1121
|
...s,
|
|
1122
1122
|
...n,
|
|
1123
1123
|
...i,
|
|
1124
1124
|
...o,
|
|
1125
|
-
...l,
|
|
1126
1125
|
...c,
|
|
1126
|
+
...l,
|
|
1127
1127
|
...f
|
|
1128
1128
|
};
|
|
1129
1129
|
});
|
|
@@ -1132,33 +1132,33 @@ class Nr {
|
|
|
1132
1132
|
* @param tagName - tag name we want to extract the description from
|
|
1133
1133
|
* @returns component description
|
|
1134
1134
|
*/
|
|
1135
|
-
|
|
1136
|
-
const r =
|
|
1135
|
+
$(this, "extractComponentDescription", (t) => {
|
|
1136
|
+
const r = v(this, k).call(this, t);
|
|
1137
1137
|
return (r == null ? void 0 : r.readme) || (r == null ? void 0 : r.docs);
|
|
1138
1138
|
});
|
|
1139
1139
|
this.jsonDoc = t;
|
|
1140
1140
|
}
|
|
1141
1141
|
}
|
|
1142
1142
|
k = new WeakMap(), Y = new WeakMap();
|
|
1143
|
-
const
|
|
1143
|
+
const Ir = ({ disconnect: e, observe: t, takeRecords: r }) => {
|
|
1144
1144
|
class s {
|
|
1145
1145
|
constructor(i) {
|
|
1146
1146
|
/**
|
|
1147
1147
|
*
|
|
1148
1148
|
*/
|
|
1149
|
-
|
|
1149
|
+
$(this, "disconnect", e);
|
|
1150
1150
|
/**
|
|
1151
1151
|
*
|
|
1152
1152
|
*/
|
|
1153
|
-
|
|
1153
|
+
$(this, "observe", t);
|
|
1154
1154
|
/**
|
|
1155
1155
|
*
|
|
1156
1156
|
*/
|
|
1157
|
-
|
|
1157
|
+
$(this, "takeRecords", r);
|
|
1158
1158
|
/**
|
|
1159
1159
|
*
|
|
1160
1160
|
*/
|
|
1161
|
-
|
|
1161
|
+
$(this, "cb");
|
|
1162
1162
|
this.cb = i;
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
@@ -1169,25 +1169,25 @@ const zr = ({ disconnect: e, observe: t, takeRecords: r }) => {
|
|
|
1169
1169
|
value: s
|
|
1170
1170
|
});
|
|
1171
1171
|
}), s;
|
|
1172
|
-
},
|
|
1172
|
+
}, Mr = ({ disconnect: e, observe: t }) => {
|
|
1173
1173
|
class r {
|
|
1174
1174
|
constructor(n) {
|
|
1175
1175
|
/**
|
|
1176
1176
|
*
|
|
1177
1177
|
*/
|
|
1178
|
-
|
|
1178
|
+
$(this, "disconnect", e);
|
|
1179
1179
|
/**
|
|
1180
1180
|
*
|
|
1181
1181
|
*/
|
|
1182
|
-
|
|
1182
|
+
$(this, "observe", t);
|
|
1183
1183
|
/**
|
|
1184
1184
|
*
|
|
1185
1185
|
*/
|
|
1186
|
-
|
|
1186
|
+
$(this, "unobserve");
|
|
1187
1187
|
/**
|
|
1188
1188
|
*
|
|
1189
1189
|
*/
|
|
1190
|
-
|
|
1190
|
+
$(this, "cb");
|
|
1191
1191
|
this.cb = n;
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
@@ -1199,18 +1199,18 @@ const zr = ({ disconnect: e, observe: t, takeRecords: r }) => {
|
|
|
1199
1199
|
});
|
|
1200
1200
|
}), r;
|
|
1201
1201
|
};
|
|
1202
|
-
class
|
|
1202
|
+
class sr extends Event {
|
|
1203
1203
|
constructor() {
|
|
1204
1204
|
super(...arguments);
|
|
1205
1205
|
/**
|
|
1206
1206
|
*
|
|
1207
1207
|
*/
|
|
1208
|
-
|
|
1208
|
+
$(this, "detail");
|
|
1209
1209
|
}
|
|
1210
1210
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1211
1211
|
}
|
|
1212
1212
|
const Lr = () => {
|
|
1213
|
-
class e extends
|
|
1213
|
+
class e extends sr {
|
|
1214
1214
|
}
|
|
1215
1215
|
return [window, global].forEach((t) => {
|
|
1216
1216
|
Object.defineProperty(t, "SubmitEvent", {
|
|
@@ -1230,45 +1230,45 @@ const Lr = () => {
|
|
|
1230
1230
|
}), t;
|
|
1231
1231
|
};
|
|
1232
1232
|
export {
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1233
|
+
ir as ClassList,
|
|
1234
|
+
gr as Cursor,
|
|
1235
|
+
rt as Page,
|
|
1236
|
+
dr as Paginate,
|
|
1237
|
+
zr as StorybookPreview,
|
|
1238
|
+
or as allItemsAreString,
|
|
1239
|
+
lr as cleanString,
|
|
1240
|
+
cr as createID,
|
|
1241
1241
|
$r as dateRegExp,
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1242
|
+
hr as dateToString,
|
|
1243
|
+
jr as defineLocales,
|
|
1244
|
+
Tr as filterArgs,
|
|
1245
1245
|
yr as focusableElements,
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1246
|
+
ur as formatID,
|
|
1247
|
+
Er as getLocaleDatePattern,
|
|
1248
|
+
Ve as getObjectValueFromKey,
|
|
1249
|
+
Ee as getParentWindows,
|
|
1250
|
+
Nr as getStoryHTML,
|
|
1251
|
+
me as getStorybookUrl,
|
|
1252
|
+
vr as getWindows,
|
|
1253
1253
|
Q as isObject,
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1254
|
+
_r as isTagName,
|
|
1255
|
+
br as isValidNumber,
|
|
1256
|
+
et as isValidString,
|
|
1257
|
+
fr as isValideID,
|
|
1258
|
+
Sr as localeCurrency,
|
|
1259
|
+
dt as localeDate,
|
|
1260
|
+
Or as localeNumber,
|
|
1261
|
+
Ar as localePercent,
|
|
1262
|
+
kr as localeUnit,
|
|
1263
|
+
pr as nextTick,
|
|
1264
1264
|
Fr as setUpRequestAnimationFrameMock,
|
|
1265
|
-
|
|
1266
|
-
|
|
1265
|
+
Ir as setupMutationObserverMock,
|
|
1266
|
+
Mr as setupResizeObserverMock,
|
|
1267
1267
|
Lr as setupSubmitEventMock,
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1268
|
+
Rr as stencilWrapper,
|
|
1269
|
+
ar as toString,
|
|
1270
|
+
xr as vsCodeCssGenerator,
|
|
1271
|
+
mr as vsCodeGenerator,
|
|
1272
|
+
wr as webTypesGenerator
|
|
1273
1273
|
};
|
|
1274
1274
|
//# sourceMappingURL=index.es.js.map
|