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