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