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