@mgdis/stencil-helpers 3.2.8 → 3.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +2794 -826
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +36 -32
- package/dist/index.umd.js.map +1 -1
- package/package.json +10 -10
package/dist/index.es.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
class
|
|
1
|
+
class Ii {
|
|
2
2
|
/**
|
|
3
3
|
* Available classes
|
|
4
4
|
*/
|
|
5
5
|
classes;
|
|
6
|
-
constructor(
|
|
7
|
-
this.classes =
|
|
6
|
+
constructor(e = []) {
|
|
7
|
+
this.classes = e;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Add class
|
|
11
11
|
* @param className - class name to add
|
|
12
12
|
*/
|
|
13
|
-
add = (
|
|
14
|
-
this.has(
|
|
13
|
+
add = (e) => {
|
|
14
|
+
this.has(e) || this.classes.push(e);
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* Delete class
|
|
18
18
|
* @param className - class name to delete
|
|
19
19
|
*/
|
|
20
|
-
delete = (
|
|
21
|
-
const
|
|
22
|
-
|
|
20
|
+
delete = (e) => {
|
|
21
|
+
const s = this.classes.indexOf(e);
|
|
22
|
+
s > -1 && this.classes.splice(s, 1);
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* Check if class exist in list
|
|
26
26
|
* @param className - class name to check
|
|
27
27
|
* @returns class name is in the list
|
|
28
28
|
*/
|
|
29
|
-
has = (
|
|
29
|
+
has = (e) => this.classes.includes(e);
|
|
30
30
|
/**
|
|
31
31
|
* Join classes seperated by spaces
|
|
32
32
|
* @returns joined values
|
|
33
33
|
*/
|
|
34
34
|
join = () => this.classes.join(" ");
|
|
35
35
|
}
|
|
36
|
-
const
|
|
37
|
-
if (!
|
|
38
|
-
return
|
|
39
|
-
const [n, ...i] =
|
|
40
|
-
return i.length ?
|
|
41
|
-
},
|
|
42
|
-
const
|
|
43
|
-
crypto.getRandomValues(
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
},
|
|
47
|
-
let
|
|
48
|
-
return typeof
|
|
49
|
-
},
|
|
50
|
-
if (
|
|
51
|
-
return
|
|
52
|
-
},
|
|
36
|
+
const at = (t) => typeof t == "object" && !Array.isArray(t) && t !== null, Hs = (t, e, s) => {
|
|
37
|
+
if (!at(t) || typeof e != "string")
|
|
38
|
+
return s;
|
|
39
|
+
const [n, ...i] = e.split(".");
|
|
40
|
+
return i.length ? Hs(t[n], i.join("."), s) : t[n] ?? s;
|
|
41
|
+
}, Wi = (t) => Array.isArray(t) && t.every((e) => typeof e == "string"), Fs = (t) => typeof t == "string" && t.trim() !== "", zi = (t) => typeof t == "object" ? JSON.stringify(t) : String(t), Gi = (t) => typeof t == "string" ? t.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : t, Bs = (t) => t.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (e, s) => (s > 0 ? "-" : "") + e.toLowerCase()).replace(/[^a-z0-9-]+/g, "-").replace(/--+/g, "-").replace(/(?:^-)|(?:-$)/g, ""), Hi = (t = "", e = 10) => {
|
|
42
|
+
const s = new Uint8Array(e);
|
|
43
|
+
crypto.getRandomValues(s);
|
|
44
|
+
const r = Array.from(s).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, e);
|
|
45
|
+
return t !== "" ? `${t}-${r}` : r;
|
|
46
|
+
}, Fi = (t) => Fs(t) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(t) !== null, Bi = (t) => {
|
|
47
|
+
let e;
|
|
48
|
+
return typeof t == "string" ? e = t : t && typeof t == "object" && (at(t) || Array.isArray(t)) ? e = JSON.stringify(t) : t != null && typeof t != "boolean" && typeof t != "object" && (e = String(t)), e && Bs(e);
|
|
49
|
+
}, Ui = async (t) => {
|
|
50
|
+
if (t)
|
|
51
|
+
return t();
|
|
52
|
+
}, Zi = {
|
|
53
53
|
FIRST: "first",
|
|
54
54
|
NEXT: "next",
|
|
55
55
|
PREVIOUS: "previous",
|
|
56
56
|
LAST: "last"
|
|
57
|
-
},
|
|
58
|
-
class
|
|
57
|
+
}, Xt = 10;
|
|
58
|
+
class Us {
|
|
59
59
|
/**
|
|
60
60
|
* Define items
|
|
61
61
|
*/
|
|
@@ -67,7 +67,7 @@ class We {
|
|
|
67
67
|
/**
|
|
68
68
|
* Define top
|
|
69
69
|
*/
|
|
70
|
-
top =
|
|
70
|
+
top = Xt;
|
|
71
71
|
/**
|
|
72
72
|
* Define next
|
|
73
73
|
*/
|
|
@@ -76,9 +76,9 @@ class We {
|
|
|
76
76
|
* Define base index
|
|
77
77
|
*/
|
|
78
78
|
baseIndex = 1;
|
|
79
|
-
constructor(
|
|
80
|
-
if (
|
|
81
|
-
Array.isArray(
|
|
79
|
+
constructor(e) {
|
|
80
|
+
if (at(e))
|
|
81
|
+
Array.isArray(e.items) && (this.items = e.items), typeof e.top == "number" && (this.top = e.top), this.total = typeof e.total == "number" ? e.total : this.items.length, this.next = e.next;
|
|
82
82
|
else
|
|
83
83
|
throw new Error("Page - init must match IPage type.");
|
|
84
84
|
}
|
|
@@ -88,31 +88,31 @@ class We {
|
|
|
88
88
|
* @param oldItem - previous item
|
|
89
89
|
* @returns item index
|
|
90
90
|
*/
|
|
91
|
-
getIndexFromCursor = (
|
|
91
|
+
getIndexFromCursor = (e = "first", s) => {
|
|
92
92
|
if (!Array.isArray(this.items) || !this.items.length)
|
|
93
93
|
return null;
|
|
94
94
|
const n = this.items.length - this.baseIndex;
|
|
95
|
-
let i,
|
|
96
|
-
if (["previous", "next"].includes(
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
95
|
+
let i, a = 0;
|
|
96
|
+
if (["previous", "next"].includes(e) && s) {
|
|
97
|
+
const o = this.items.findIndex((l) => JSON.stringify(l) === JSON.stringify(s));
|
|
98
|
+
if (o === -1)
|
|
99
99
|
return 0;
|
|
100
|
-
|
|
100
|
+
a = o;
|
|
101
101
|
}
|
|
102
|
-
return
|
|
102
|
+
return e === "first" ? i = 0 : e === "last" ? i = n : e === "previous" ? i = JSON.stringify(this.items[a]) === JSON.stringify(this.items[0]) ? n : a - this.baseIndex : e === "next" ? i = JSON.stringify(this.items[a]) === JSON.stringify(this.items[n]) ? 0 : a + this.baseIndex : i = 0, i;
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
class
|
|
105
|
+
class qi {
|
|
106
106
|
/**
|
|
107
107
|
* Define paginated items
|
|
108
108
|
*/
|
|
109
109
|
items = [];
|
|
110
110
|
/* Privates */
|
|
111
|
-
#e =
|
|
111
|
+
#e = Xt;
|
|
112
112
|
#t;
|
|
113
|
-
#
|
|
114
|
-
constructor(
|
|
115
|
-
Array.isArray(
|
|
113
|
+
#s;
|
|
114
|
+
constructor(e, s) {
|
|
115
|
+
Array.isArray(e) && (this.items = e), s && (["string", "function"].includes(typeof s.next) || at(s.next) && URL.canParse(s.next)) && (this.#t = s.next), typeof s?.top == "number" && (this.#e = s.top), typeof s?.total == "number" && (this.#s = s.total);
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
118
|
* Get page
|
|
@@ -120,188 +120,1168 @@ class rr {
|
|
|
120
120
|
* @param filter - filter methode
|
|
121
121
|
* @returns formated page
|
|
122
122
|
*/
|
|
123
|
-
getPage = (
|
|
124
|
-
const
|
|
123
|
+
getPage = (e = 0, s) => {
|
|
124
|
+
const r = typeof s == "function" ? this.items.filter(s) : this.items;
|
|
125
125
|
let n;
|
|
126
|
-
return this.#t ? n = this.#t :
|
|
127
|
-
items:
|
|
128
|
-
total: this.#
|
|
126
|
+
return this.#t ? n = this.#t : r.length > e + this.#e && (n = () => this.getPage(e + this.#e, s)), new Us({
|
|
127
|
+
items: r.slice(e, e + this.#e),
|
|
128
|
+
total: this.#s,
|
|
129
129
|
top: this.#e,
|
|
130
130
|
next: n
|
|
131
131
|
});
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
const
|
|
135
|
-
const
|
|
136
|
-
return [
|
|
137
|
-
},
|
|
138
|
-
if (
|
|
134
|
+
const Ji = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, Xi = (t) => t.toISOString().split("T")[0], Yi = (t, e) => e.includes(t?.tagName.toLowerCase()), Ki = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Qi = (t) => typeof t == "number" && !Number.isNaN(t), Vi = (t) => {
|
|
135
|
+
const e = Yt(t), s = Kt(t);
|
|
136
|
+
return [t, ...e, ...s];
|
|
137
|
+
}, Yt = (t, e = []) => {
|
|
138
|
+
if (t.self !== t.top)
|
|
139
139
|
try {
|
|
140
|
-
const
|
|
141
|
-
return
|
|
142
|
-
} catch (
|
|
143
|
-
return console.error("Different hosts between iframes:",
|
|
140
|
+
const s = t.parent;
|
|
141
|
+
return s ? (e.push(s), Yt(s, e)) : e;
|
|
142
|
+
} catch (s) {
|
|
143
|
+
return console.error("Different hosts between iframes:", s), e;
|
|
144
144
|
}
|
|
145
|
+
return e;
|
|
146
|
+
}, Kt = (t, e = []) => {
|
|
147
|
+
if (t.frames.length > 0)
|
|
148
|
+
for (const s of Array.from(t.frames))
|
|
149
|
+
e.push(s), Kt(s, e);
|
|
150
|
+
return e;
|
|
151
|
+
};
|
|
152
|
+
var Zs = Object.create, ot = Object.defineProperty, qs = Object.getOwnPropertyDescriptor, Qt = Object.getOwnPropertyNames, Js = Object.getPrototypeOf, Xs = Object.prototype.hasOwnProperty, Vt = (t) => {
|
|
153
|
+
throw TypeError(t);
|
|
154
|
+
}, Ys = (t, e, s) => e in t ? ot(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, es = (t, e) => function() {
|
|
155
|
+
return e || (0, t[Qt(t)[0]])((e = { exports: {} }).exports, e), e.exports;
|
|
156
|
+
}, Ks = (t, e) => {
|
|
157
|
+
for (var s in e)
|
|
158
|
+
ot(t, s, { get: e[s], enumerable: !0 });
|
|
159
|
+
}, Qs = (t, e, s, r) => {
|
|
160
|
+
if (e && typeof e == "object" || typeof e == "function")
|
|
161
|
+
for (let n of Qt(e))
|
|
162
|
+
!Xs.call(t, n) && n !== s && ot(t, n, { get: () => e[n], enumerable: !(r = qs(e, n)) || r.enumerable });
|
|
145
163
|
return t;
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
164
|
+
}, Vs = (t, e, s) => (s = t != null ? Zs(Js(t)) : {}, Qs(
|
|
165
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
166
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
167
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
168
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
169
|
+
ot(s, "default", { value: t, enumerable: !0 }),
|
|
170
|
+
t
|
|
171
|
+
)), er = (t, e, s) => Ys(t, e + "", s), bt = (t, e, s) => e.has(t) || Vt("Cannot " + s), v = (t, e, s) => (bt(t, e, "read from private field"), s ? s.call(t) : e.get(t)), Z = (t, e, s) => e.has(t) ? Vt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), R = (t, e, s, r) => (bt(t, e, "write to private field"), e.set(t, s), s), ue = (t, e, s) => (bt(t, e, "access private method"), s), tr = es({
|
|
172
|
+
"node_modules/balanced-match/index.js"(t, e) {
|
|
173
|
+
e.exports = s;
|
|
174
|
+
function s(i, a, o) {
|
|
175
|
+
i instanceof RegExp && (i = r(i, o)), a instanceof RegExp && (a = r(a, o));
|
|
176
|
+
var l = n(i, a, o);
|
|
177
|
+
return l && {
|
|
178
|
+
start: l[0],
|
|
179
|
+
end: l[1],
|
|
180
|
+
pre: o.slice(0, l[0]),
|
|
181
|
+
body: o.slice(l[0] + i.length, l[1]),
|
|
182
|
+
post: o.slice(l[1] + a.length)
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function r(i, a) {
|
|
186
|
+
var o = a.match(i);
|
|
187
|
+
return o ? o[0] : null;
|
|
188
|
+
}
|
|
189
|
+
s.range = n;
|
|
190
|
+
function n(i, a, o) {
|
|
191
|
+
var l, h, c, u, d, g = o.indexOf(i), f = o.indexOf(a, g + 1), p = g;
|
|
192
|
+
if (g >= 0 && f > 0) {
|
|
193
|
+
if (i === a)
|
|
194
|
+
return [g, f];
|
|
195
|
+
for (l = [], c = o.length; p >= 0 && !d; )
|
|
196
|
+
p == g ? (l.push(p), g = o.indexOf(i, p + 1)) : l.length == 1 ? d = [l.pop(), f] : (h = l.pop(), h < c && (c = h, u = f), f = o.indexOf(a, p + 1)), p = g < f && g >= 0 ? g : f;
|
|
197
|
+
l.length && (d = [c, u]);
|
|
198
|
+
}
|
|
199
|
+
return d;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}), sr = es({
|
|
203
|
+
"node_modules/brace-expansion/index.js"(t, e) {
|
|
204
|
+
var s = tr();
|
|
205
|
+
e.exports = d;
|
|
206
|
+
var r = "\0SLASH" + Math.random() + "\0", n = "\0OPEN" + Math.random() + "\0", i = "\0CLOSE" + Math.random() + "\0", a = "\0COMMA" + Math.random() + "\0", o = "\0PERIOD" + Math.random() + "\0";
|
|
207
|
+
function l($) {
|
|
208
|
+
return parseInt($, 10) == $ ? parseInt($, 10) : $.charCodeAt(0);
|
|
209
|
+
}
|
|
210
|
+
function h($) {
|
|
211
|
+
return $.split("\\\\").join(r).split("\\{").join(n).split("\\}").join(i).split("\\,").join(a).split("\\.").join(o);
|
|
212
|
+
}
|
|
213
|
+
function c($) {
|
|
214
|
+
return $.split(r).join("\\").split(n).join("{").split(i).join("}").split(a).join(",").split(o).join(".");
|
|
215
|
+
}
|
|
216
|
+
function u($) {
|
|
217
|
+
if (!$)
|
|
218
|
+
return [""];
|
|
219
|
+
var w = [], b = s("{", "}", $);
|
|
220
|
+
if (!b)
|
|
221
|
+
return $.split(",");
|
|
222
|
+
var m = b.pre, D = b.body, L = b.post, x = m.split(",");
|
|
223
|
+
x[x.length - 1] += "{" + D + "}";
|
|
224
|
+
var M = u(L);
|
|
225
|
+
return L.length && (x[x.length - 1] += M.shift(), x.push.apply(x, M)), w.push.apply(w, x), w;
|
|
226
|
+
}
|
|
227
|
+
function d($) {
|
|
228
|
+
return $ ? ($.substr(0, 2) === "{}" && ($ = "\\{\\}" + $.substr(2)), E(h($), !0).map(c)) : [];
|
|
229
|
+
}
|
|
230
|
+
function g($) {
|
|
231
|
+
return "{" + $ + "}";
|
|
232
|
+
}
|
|
233
|
+
function f($) {
|
|
234
|
+
return /^-?0\d/.test($);
|
|
235
|
+
}
|
|
236
|
+
function p($, w) {
|
|
237
|
+
return $ <= w;
|
|
238
|
+
}
|
|
239
|
+
function y($, w) {
|
|
240
|
+
return $ >= w;
|
|
241
|
+
}
|
|
242
|
+
function E($, w) {
|
|
243
|
+
var b = [], m = s("{", "}", $);
|
|
244
|
+
if (!m) return [$];
|
|
245
|
+
var D = m.pre, L = m.post.length ? E(m.post, !1) : [""];
|
|
246
|
+
if (/\$$/.test(m.pre))
|
|
247
|
+
for (var x = 0; x < L.length; x++) {
|
|
248
|
+
var M = D + "{" + m.body + "}" + L[x];
|
|
249
|
+
b.push(M);
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
var me = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body), oe = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body), Q = me || oe, Ae = m.body.indexOf(",") >= 0;
|
|
253
|
+
if (!Q && !Ae)
|
|
254
|
+
return m.post.match(/,(?!,).*\}/) ? ($ = m.pre + "{" + m.body + i + m.post, E($)) : [$];
|
|
255
|
+
var S;
|
|
256
|
+
if (Q)
|
|
257
|
+
S = m.body.split(/\.\./);
|
|
258
|
+
else if (S = u(m.body), S.length === 1 && (S = E(S[0], !1).map(g), S.length === 1))
|
|
259
|
+
return L.map(function(gt) {
|
|
260
|
+
return m.pre + S[0] + gt;
|
|
261
|
+
});
|
|
262
|
+
var I;
|
|
263
|
+
if (Q) {
|
|
264
|
+
var le = l(S[0]), Re = l(S[1]), ut = Math.max(S[0].length, S[1].length), Ne = S.length == 3 ? Math.abs(l(S[2])) : 1, Le = p, ft = Re < le;
|
|
265
|
+
ft && (Ne *= -1, Le = y);
|
|
266
|
+
var pt = S.some(f);
|
|
267
|
+
I = [];
|
|
268
|
+
for (var V = le; Le(V, Re); V += Ne) {
|
|
269
|
+
var A;
|
|
270
|
+
if (oe)
|
|
271
|
+
A = String.fromCharCode(V), A === "\\" && (A = "");
|
|
272
|
+
else if (A = String(V), pt) {
|
|
273
|
+
var Me = ut - A.length;
|
|
274
|
+
if (Me > 0) {
|
|
275
|
+
var ke = new Array(Me + 1).join("0");
|
|
276
|
+
V < 0 ? A = "-" + ke + A.slice(1) : A = ke + A;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
I.push(A);
|
|
280
|
+
}
|
|
281
|
+
} else {
|
|
282
|
+
I = [];
|
|
283
|
+
for (var G = 0; G < S.length; G++)
|
|
284
|
+
I.push.apply(I, E(S[G], !1));
|
|
285
|
+
}
|
|
286
|
+
for (var G = 0; G < I.length; G++)
|
|
287
|
+
for (var x = 0; x < L.length; x++) {
|
|
288
|
+
var M = D + I[G] + L[x];
|
|
289
|
+
(!w || Q || M) && b.push(M);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return b;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}), rr = Vs(sr()), nr = 1024 * 64, Ve = (t) => {
|
|
296
|
+
if (typeof t != "string")
|
|
297
|
+
throw new TypeError("invalid pattern");
|
|
298
|
+
if (t.length > nr)
|
|
299
|
+
throw new TypeError("pattern is too long");
|
|
300
|
+
}, ir = {
|
|
301
|
+
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
|
|
302
|
+
"[:alpha:]": ["\\p{L}\\p{Nl}", !0],
|
|
303
|
+
"[:ascii:]": ["\\x00-\\x7f", !1],
|
|
304
|
+
"[:blank:]": ["\\p{Zs}\\t", !0],
|
|
305
|
+
"[:cntrl:]": ["\\p{Cc}", !0],
|
|
306
|
+
"[:digit:]": ["\\p{Nd}", !0],
|
|
307
|
+
"[:graph:]": ["\\p{Z}\\p{C}", !0, !0],
|
|
308
|
+
"[:lower:]": ["\\p{Ll}", !0],
|
|
309
|
+
"[:print:]": ["\\p{C}", !0],
|
|
310
|
+
"[:punct:]": ["\\p{P}", !0],
|
|
311
|
+
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", !0],
|
|
312
|
+
"[:upper:]": ["\\p{Lu}", !0],
|
|
313
|
+
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
|
|
314
|
+
"[:xdigit:]": ["A-Fa-f0-9", !1]
|
|
315
|
+
}, Ce = (t) => t.replace(/[[\]\\-]/g, "\\$&"), ar = (t) => t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), Lt = (t) => t.join(""), or = (t, e) => {
|
|
316
|
+
const s = e;
|
|
317
|
+
if (t.charAt(s) !== "[")
|
|
318
|
+
throw new Error("not in a brace expression");
|
|
319
|
+
const r = [], n = [];
|
|
320
|
+
let i = s + 1, a = !1, o = !1, l = !1, h = !1, c = s, u = "";
|
|
321
|
+
e: for (; i < t.length; ) {
|
|
322
|
+
const p = t.charAt(i);
|
|
323
|
+
if ((p === "!" || p === "^") && i === s + 1) {
|
|
324
|
+
h = !0, i++;
|
|
325
|
+
continue;
|
|
326
|
+
}
|
|
327
|
+
if (p === "]" && a && !l) {
|
|
328
|
+
c = i + 1;
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
331
|
+
if (a = !0, p === "\\" && !l) {
|
|
332
|
+
l = !0, i++;
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
if (p === "[" && !l) {
|
|
336
|
+
for (const [y, [E, $, w]] of Object.entries(ir))
|
|
337
|
+
if (t.startsWith(y, i)) {
|
|
338
|
+
if (u)
|
|
339
|
+
return ["$.", !1, t.length - s, !0];
|
|
340
|
+
i += y.length, w ? n.push(E) : r.push(E), o = o || $;
|
|
341
|
+
continue e;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
if (l = !1, u) {
|
|
345
|
+
p > u ? r.push(Ce(u) + "-" + Ce(p)) : p === u && r.push(Ce(p)), u = "", i++;
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
if (t.startsWith("-]", i + 1)) {
|
|
349
|
+
r.push(Ce(p + "-")), i += 2;
|
|
350
|
+
continue;
|
|
351
|
+
}
|
|
352
|
+
if (t.startsWith("-", i + 1)) {
|
|
353
|
+
u = p, i += 2;
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
r.push(Ce(p)), i++;
|
|
357
|
+
}
|
|
358
|
+
if (c < i)
|
|
359
|
+
return ["", !1, 0, !1];
|
|
360
|
+
if (!r.length && !n.length)
|
|
361
|
+
return ["$.", !1, t.length - s, !0];
|
|
362
|
+
if (n.length === 0 && r.length === 1 && /^\\?.$/.test(r[0]) && !h) {
|
|
363
|
+
const p = r[0].length === 2 ? r[0].slice(-1) : r[0];
|
|
364
|
+
return [ar(p), !1, c - s, !1];
|
|
365
|
+
}
|
|
366
|
+
const d = "[" + (h ? "^" : "") + Lt(r) + "]", g = "[" + (h ? "" : "^") + Lt(n) + "]";
|
|
367
|
+
return [r.length && n.length ? "(" + d + "|" + g + ")" : r.length ? d : g, o, c - s, !0];
|
|
368
|
+
}, We = (t, { windowsPathsNoEscape: e = !1 } = {}) => e ? t.replace(/\[([^\/\\])\]/g, "$1") : t.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1"), lr = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), Mt = (t) => lr.has(t), cr = "(?!(?:^|/)\\.\\.?(?:$|/))", qe = "(?!\\.)", hr = /* @__PURE__ */ new Set(["[", "."]), ur = /* @__PURE__ */ new Set(["..", "."]), fr = new Set("().*{}+?[]^$\\!"), pr = (t) => t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), St = "[^/]", ts = St + "*?", ss = St + "+?", j, W, ie, O, k, fe, be, de, ee, ye, et, Pe, rs, xe, Ye, dt, ns, re = class ce {
|
|
369
|
+
constructor(e, s, r = {}) {
|
|
370
|
+
Z(this, Pe), er(this, "type"), Z(this, j), Z(this, W), Z(this, ie, !1), Z(this, O, []), Z(this, k), Z(this, fe), Z(this, be), Z(this, de, !1), Z(this, ee), Z(this, ye), Z(this, et, !1), this.type = e, e && R(this, W, !0), R(this, k, s), R(this, j, v(this, k) ? v(v(this, k), j) : this), R(this, ee, v(this, j) === this ? r : v(v(this, j), ee)), R(this, be, v(this, j) === this ? [] : v(v(this, j), be)), e === "!" && !v(v(this, j), de) && v(this, be).push(this), R(this, fe, v(this, k) ? v(v(this, k), O).length : 0);
|
|
371
|
+
}
|
|
372
|
+
get hasMagic() {
|
|
373
|
+
if (v(this, W) !== void 0)
|
|
374
|
+
return v(this, W);
|
|
375
|
+
for (const e of v(this, O))
|
|
376
|
+
if (typeof e != "string" && (e.type || e.hasMagic))
|
|
377
|
+
return R(this, W, !0);
|
|
378
|
+
return v(this, W);
|
|
379
|
+
}
|
|
380
|
+
// reconstructs the pattern
|
|
381
|
+
toString() {
|
|
382
|
+
return v(this, ye) !== void 0 ? v(this, ye) : this.type ? R(this, ye, this.type + "(" + v(this, O).map((e) => String(e)).join("|") + ")") : R(this, ye, v(this, O).map((e) => String(e)).join(""));
|
|
383
|
+
}
|
|
384
|
+
push(...e) {
|
|
385
|
+
for (const s of e)
|
|
386
|
+
if (s !== "") {
|
|
387
|
+
if (typeof s != "string" && !(s instanceof ce && v(s, k) === this))
|
|
388
|
+
throw new Error("invalid part: " + s);
|
|
389
|
+
v(this, O).push(s);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
toJSON() {
|
|
393
|
+
var e;
|
|
394
|
+
const s = this.type === null ? v(this, O).slice().map((r) => typeof r == "string" ? r : r.toJSON()) : [this.type, ...v(this, O).map((r) => r.toJSON())];
|
|
395
|
+
return this.isStart() && !this.type && s.unshift([]), this.isEnd() && (this === v(this, j) || v(v(this, j), de) && ((e = v(this, k)) == null ? void 0 : e.type) === "!") && s.push({}), s;
|
|
396
|
+
}
|
|
397
|
+
isStart() {
|
|
398
|
+
var e;
|
|
399
|
+
if (v(this, j) === this)
|
|
400
|
+
return !0;
|
|
401
|
+
if (!((e = v(this, k)) != null && e.isStart()))
|
|
402
|
+
return !1;
|
|
403
|
+
if (v(this, fe) === 0)
|
|
404
|
+
return !0;
|
|
405
|
+
const s = v(this, k);
|
|
406
|
+
for (let r = 0; r < v(this, fe); r++) {
|
|
407
|
+
const n = v(s, O)[r];
|
|
408
|
+
if (!(n instanceof ce && n.type === "!"))
|
|
409
|
+
return !1;
|
|
410
|
+
}
|
|
411
|
+
return !0;
|
|
412
|
+
}
|
|
413
|
+
isEnd() {
|
|
414
|
+
var e, s, r;
|
|
415
|
+
if (v(this, j) === this || ((e = v(this, k)) == null ? void 0 : e.type) === "!")
|
|
416
|
+
return !0;
|
|
417
|
+
if (!((s = v(this, k)) != null && s.isEnd()))
|
|
418
|
+
return !1;
|
|
419
|
+
if (!this.type)
|
|
420
|
+
return (r = v(this, k)) == null ? void 0 : r.isEnd();
|
|
421
|
+
const n = v(this, k) ? v(v(this, k), O).length : 0;
|
|
422
|
+
return v(this, fe) === n - 1;
|
|
423
|
+
}
|
|
424
|
+
copyIn(e) {
|
|
425
|
+
typeof e == "string" ? this.push(e) : this.push(e.clone(this));
|
|
426
|
+
}
|
|
427
|
+
clone(e) {
|
|
428
|
+
const s = new ce(this.type, e);
|
|
429
|
+
for (const r of v(this, O))
|
|
430
|
+
s.copyIn(r);
|
|
431
|
+
return s;
|
|
432
|
+
}
|
|
433
|
+
static fromGlob(e, s = {}) {
|
|
434
|
+
var r;
|
|
435
|
+
const n = new ce(null, void 0, s);
|
|
436
|
+
return ue(r = ce, xe, Ye).call(r, e, n, 0, s), n;
|
|
437
|
+
}
|
|
438
|
+
// returns the regular expression if there's magic, or the unescaped
|
|
439
|
+
// string if not.
|
|
440
|
+
toMMPattern() {
|
|
441
|
+
if (this !== v(this, j))
|
|
442
|
+
return v(this, j).toMMPattern();
|
|
443
|
+
const e = this.toString(), [s, r, n, i] = this.toRegExpSource();
|
|
444
|
+
if (!(n || v(this, W) || v(this, ee).nocase && !v(this, ee).nocaseMagicOnly && e.toUpperCase() !== e.toLowerCase()))
|
|
445
|
+
return r;
|
|
446
|
+
const o = (v(this, ee).nocase ? "i" : "") + (i ? "u" : "");
|
|
447
|
+
return Object.assign(new RegExp(`^${s}$`, o), {
|
|
448
|
+
_src: s,
|
|
449
|
+
_glob: e
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
get options() {
|
|
453
|
+
return v(this, ee);
|
|
454
|
+
}
|
|
455
|
+
// returns the string match, the regexp source, whether there's magic
|
|
456
|
+
// in the regexp (so a regular expression is required) and whether or
|
|
457
|
+
// not the uflag is needed for the regular expression (for posix classes)
|
|
458
|
+
// TODO: instead of injecting the start/end at this point, just return
|
|
459
|
+
// the BODY of the regexp, along with the start/end portions suitable
|
|
460
|
+
// for binding the start/end in either a joined full-path makeRe context
|
|
461
|
+
// (where we bind to (^|/), or a standalone matchPart context (where
|
|
462
|
+
// we bind to ^, and not /). Otherwise slashes get duped!
|
|
463
|
+
//
|
|
464
|
+
// In part-matching mode, the start is:
|
|
465
|
+
// - if not isStart: nothing
|
|
466
|
+
// - if traversal possible, but not allowed: ^(?!\.\.?$)
|
|
467
|
+
// - if dots allowed or not possible: ^
|
|
468
|
+
// - if dots possible and not allowed: ^(?!\.)
|
|
469
|
+
// end is:
|
|
470
|
+
// - if not isEnd(): nothing
|
|
471
|
+
// - else: $
|
|
472
|
+
//
|
|
473
|
+
// In full-path matching mode, we put the slash at the START of the
|
|
474
|
+
// pattern, so start is:
|
|
475
|
+
// - if first pattern: same as part-matching mode
|
|
476
|
+
// - if not isStart(): nothing
|
|
477
|
+
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
|
|
478
|
+
// - if dots allowed or not possible: /
|
|
479
|
+
// - if dots possible and not allowed: /(?!\.)
|
|
480
|
+
// end is:
|
|
481
|
+
// - if last pattern, same as part-matching mode
|
|
482
|
+
// - else nothing
|
|
483
|
+
//
|
|
484
|
+
// Always put the (?:$|/) on negated tails, though, because that has to be
|
|
485
|
+
// there to bind the end of the negated pattern portion, and it's easier to
|
|
486
|
+
// just stick it in now rather than try to inject it later in the middle of
|
|
487
|
+
// the pattern.
|
|
488
|
+
//
|
|
489
|
+
// We can just always return the same end, and leave it up to the caller
|
|
490
|
+
// to know whether it's going to be used joined or in parts.
|
|
491
|
+
// And, if the start is adjusted slightly, can do the same there:
|
|
492
|
+
// - if not isStart: nothing
|
|
493
|
+
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
|
|
494
|
+
// - if dots allowed or not possible: (?:/|^)
|
|
495
|
+
// - if dots possible and not allowed: (?:/|^)(?!\.)
|
|
496
|
+
//
|
|
497
|
+
// But it's better to have a simpler binding without a conditional, for
|
|
498
|
+
// performance, so probably better to return both start options.
|
|
499
|
+
//
|
|
500
|
+
// Then the caller just ignores the end if it's not the first pattern,
|
|
501
|
+
// and the start always gets applied.
|
|
502
|
+
//
|
|
503
|
+
// But that's always going to be $ if it's the ending pattern, or nothing,
|
|
504
|
+
// so the caller can just attach $ at the end of the pattern when building.
|
|
505
|
+
//
|
|
506
|
+
// So the todo is:
|
|
507
|
+
// - better detect what kind of start is needed
|
|
508
|
+
// - return both flavors of starting pattern
|
|
509
|
+
// - attach $ at the end of the pattern when creating the actual RegExp
|
|
510
|
+
//
|
|
511
|
+
// Ah, but wait, no, that all only applies to the root when the first pattern
|
|
512
|
+
// is not an extglob. If the first pattern IS an extglob, then we need all
|
|
513
|
+
// that dot prevention biz to live in the extglob portions, because eg
|
|
514
|
+
// +(*|.x*) can match .xy but not .yx.
|
|
515
|
+
//
|
|
516
|
+
// So, return the two flavors if it's #root and the first child is not an
|
|
517
|
+
// AST, otherwise leave it to the child AST to handle it, and there,
|
|
518
|
+
// use the (?:^|/) style of start binding.
|
|
519
|
+
//
|
|
520
|
+
// Even simplified further:
|
|
521
|
+
// - Since the start for a join is eg /(?!\.) and the start for a part
|
|
522
|
+
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
523
|
+
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
524
|
+
toRegExpSource(e) {
|
|
525
|
+
var s;
|
|
526
|
+
const r = e ?? !!v(this, ee).dot;
|
|
527
|
+
if (v(this, j) === this && ue(this, Pe, rs).call(this), !this.type) {
|
|
528
|
+
const h = this.isStart() && this.isEnd(), c = v(this, O).map((f) => {
|
|
529
|
+
var p;
|
|
530
|
+
const [y, E, $, w] = typeof f == "string" ? ue(p = ce, xe, ns).call(p, f, v(this, W), h) : f.toRegExpSource(e);
|
|
531
|
+
return R(this, W, v(this, W) || $), R(this, ie, v(this, ie) || w), y;
|
|
532
|
+
}).join("");
|
|
533
|
+
let u = "";
|
|
534
|
+
if (this.isStart() && typeof v(this, O)[0] == "string" && !(v(this, O).length === 1 && ur.has(v(this, O)[0]))) {
|
|
535
|
+
const p = hr, y = (
|
|
536
|
+
// dots are allowed, and the pattern starts with [ or .
|
|
537
|
+
r && p.has(c.charAt(0)) || // the pattern starts with \., and then [ or .
|
|
538
|
+
c.startsWith("\\.") && p.has(c.charAt(2)) || // the pattern starts with \.\., and then [ or .
|
|
539
|
+
c.startsWith("\\.\\.") && p.has(c.charAt(4))
|
|
540
|
+
), E = !r && !e && p.has(c.charAt(0));
|
|
541
|
+
u = y ? cr : E ? qe : "";
|
|
542
|
+
}
|
|
543
|
+
let d = "";
|
|
544
|
+
return this.isEnd() && v(v(this, j), de) && ((s = v(this, k)) == null ? void 0 : s.type) === "!" && (d = "(?:$|\\/)"), [
|
|
545
|
+
u + c + d,
|
|
546
|
+
We(c),
|
|
547
|
+
R(this, W, !!v(this, W)),
|
|
548
|
+
v(this, ie)
|
|
549
|
+
];
|
|
550
|
+
}
|
|
551
|
+
const n = this.type === "*" || this.type === "+", i = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
552
|
+
let a = ue(this, Pe, dt).call(this, r);
|
|
553
|
+
if (this.isStart() && this.isEnd() && !a && this.type !== "!") {
|
|
554
|
+
const h = this.toString();
|
|
555
|
+
return R(this, O, [h]), this.type = null, R(this, W, void 0), [h, We(this.toString()), !1, !1];
|
|
556
|
+
}
|
|
557
|
+
let o = !n || e || r || !qe ? "" : ue(this, Pe, dt).call(this, !0);
|
|
558
|
+
o === a && (o = ""), o && (a = `(?:${a})(?:${o})*?`);
|
|
559
|
+
let l = "";
|
|
560
|
+
if (this.type === "!" && v(this, et))
|
|
561
|
+
l = (this.isStart() && !r ? qe : "") + ss;
|
|
562
|
+
else {
|
|
563
|
+
const h = this.type === "!" ? (
|
|
564
|
+
// !() must match something,but !(x) can match ''
|
|
565
|
+
"))" + (this.isStart() && !r && !e ? qe : "") + ts + ")"
|
|
566
|
+
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && o ? ")" : this.type === "*" && o ? ")?" : `)${this.type}`;
|
|
567
|
+
l = i + a + h;
|
|
568
|
+
}
|
|
569
|
+
return [
|
|
570
|
+
l,
|
|
571
|
+
We(a),
|
|
572
|
+
R(this, W, !!v(this, W)),
|
|
573
|
+
v(this, ie)
|
|
574
|
+
];
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
j = /* @__PURE__ */ new WeakMap();
|
|
578
|
+
W = /* @__PURE__ */ new WeakMap();
|
|
579
|
+
ie = /* @__PURE__ */ new WeakMap();
|
|
580
|
+
O = /* @__PURE__ */ new WeakMap();
|
|
581
|
+
k = /* @__PURE__ */ new WeakMap();
|
|
582
|
+
fe = /* @__PURE__ */ new WeakMap();
|
|
583
|
+
be = /* @__PURE__ */ new WeakMap();
|
|
584
|
+
de = /* @__PURE__ */ new WeakMap();
|
|
585
|
+
ee = /* @__PURE__ */ new WeakMap();
|
|
586
|
+
ye = /* @__PURE__ */ new WeakMap();
|
|
587
|
+
et = /* @__PURE__ */ new WeakMap();
|
|
588
|
+
Pe = /* @__PURE__ */ new WeakSet();
|
|
589
|
+
rs = function() {
|
|
590
|
+
if (this !== v(this, j))
|
|
591
|
+
throw new Error("should only call on root");
|
|
592
|
+
if (v(this, de))
|
|
593
|
+
return this;
|
|
594
|
+
this.toString(), R(this, de, !0);
|
|
595
|
+
let t;
|
|
596
|
+
for (; t = v(this, be).pop(); ) {
|
|
597
|
+
if (t.type !== "!")
|
|
598
|
+
continue;
|
|
599
|
+
let e = t, s = v(e, k);
|
|
600
|
+
for (; s; ) {
|
|
601
|
+
for (let r = v(e, fe) + 1; !s.type && r < v(s, O).length; r++)
|
|
602
|
+
for (const n of v(t, O)) {
|
|
603
|
+
if (typeof n == "string")
|
|
604
|
+
throw new Error("string part in extglob AST??");
|
|
605
|
+
n.copyIn(v(s, O)[r]);
|
|
606
|
+
}
|
|
607
|
+
e = s, s = v(e, k);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
return this;
|
|
611
|
+
};
|
|
612
|
+
xe = /* @__PURE__ */ new WeakSet();
|
|
613
|
+
Ye = function(t, e, s, r) {
|
|
614
|
+
var n, i;
|
|
615
|
+
let a = !1, o = !1, l = -1, h = !1;
|
|
616
|
+
if (e.type === null) {
|
|
617
|
+
let f = s, p = "";
|
|
618
|
+
for (; f < t.length; ) {
|
|
619
|
+
const y = t.charAt(f++);
|
|
620
|
+
if (a || y === "\\") {
|
|
621
|
+
a = !a, p += y;
|
|
622
|
+
continue;
|
|
623
|
+
}
|
|
624
|
+
if (o) {
|
|
625
|
+
f === l + 1 ? (y === "^" || y === "!") && (h = !0) : y === "]" && !(f === l + 2 && h) && (o = !1), p += y;
|
|
626
|
+
continue;
|
|
627
|
+
} else if (y === "[") {
|
|
628
|
+
o = !0, l = f, h = !1, p += y;
|
|
629
|
+
continue;
|
|
630
|
+
}
|
|
631
|
+
if (!r.noext && Mt(y) && t.charAt(f) === "(") {
|
|
632
|
+
e.push(p), p = "";
|
|
633
|
+
const E = new re(y, e);
|
|
634
|
+
f = ue(n = re, xe, Ye).call(n, t, E, f, r), e.push(E);
|
|
635
|
+
continue;
|
|
636
|
+
}
|
|
637
|
+
p += y;
|
|
638
|
+
}
|
|
639
|
+
return e.push(p), f;
|
|
640
|
+
}
|
|
641
|
+
let c = s + 1, u = new re(null, e);
|
|
642
|
+
const d = [];
|
|
643
|
+
let g = "";
|
|
644
|
+
for (; c < t.length; ) {
|
|
645
|
+
const f = t.charAt(c++);
|
|
646
|
+
if (a || f === "\\") {
|
|
647
|
+
a = !a, g += f;
|
|
648
|
+
continue;
|
|
649
|
+
}
|
|
650
|
+
if (o) {
|
|
651
|
+
c === l + 1 ? (f === "^" || f === "!") && (h = !0) : f === "]" && !(c === l + 2 && h) && (o = !1), g += f;
|
|
652
|
+
continue;
|
|
653
|
+
} else if (f === "[") {
|
|
654
|
+
o = !0, l = c, h = !1, g += f;
|
|
655
|
+
continue;
|
|
656
|
+
}
|
|
657
|
+
if (Mt(f) && t.charAt(c) === "(") {
|
|
658
|
+
u.push(g), g = "";
|
|
659
|
+
const p = new re(f, u);
|
|
660
|
+
u.push(p), c = ue(i = re, xe, Ye).call(i, t, p, c, r);
|
|
661
|
+
continue;
|
|
662
|
+
}
|
|
663
|
+
if (f === "|") {
|
|
664
|
+
u.push(g), g = "", d.push(u), u = new re(null, e);
|
|
665
|
+
continue;
|
|
666
|
+
}
|
|
667
|
+
if (f === ")")
|
|
668
|
+
return g === "" && v(e, O).length === 0 && R(e, et, !0), u.push(g), g = "", e.push(...d, u), c;
|
|
669
|
+
g += f;
|
|
670
|
+
}
|
|
671
|
+
return e.type = null, R(e, W, void 0), R(e, O, [t.substring(s - 1)]), c;
|
|
672
|
+
};
|
|
673
|
+
dt = function(t) {
|
|
674
|
+
return v(this, O).map((e) => {
|
|
675
|
+
if (typeof e == "string")
|
|
676
|
+
throw new Error("string type in extglob ast??");
|
|
677
|
+
const [s, r, n, i] = e.toRegExpSource(t);
|
|
678
|
+
return R(this, ie, v(this, ie) || i), s;
|
|
679
|
+
}).filter((e) => !(this.isStart() && this.isEnd()) || !!e).join("|");
|
|
680
|
+
};
|
|
681
|
+
ns = function(t, e, s = !1) {
|
|
682
|
+
let r = !1, n = "", i = !1;
|
|
683
|
+
for (let a = 0; a < t.length; a++) {
|
|
684
|
+
const o = t.charAt(a);
|
|
685
|
+
if (r) {
|
|
686
|
+
r = !1, n += (fr.has(o) ? "\\" : "") + o;
|
|
687
|
+
continue;
|
|
688
|
+
}
|
|
689
|
+
if (o === "\\") {
|
|
690
|
+
a === t.length - 1 ? n += "\\\\" : r = !0;
|
|
691
|
+
continue;
|
|
692
|
+
}
|
|
693
|
+
if (o === "[") {
|
|
694
|
+
const [l, h, c, u] = or(t, a);
|
|
695
|
+
if (c) {
|
|
696
|
+
n += l, i = i || h, a += c - 1, e = e || u;
|
|
697
|
+
continue;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
if (o === "*") {
|
|
701
|
+
s && t === "*" ? n += ss : n += ts, e = !0;
|
|
702
|
+
continue;
|
|
703
|
+
}
|
|
704
|
+
if (o === "?") {
|
|
705
|
+
n += St, e = !0;
|
|
706
|
+
continue;
|
|
707
|
+
}
|
|
708
|
+
n += pr(o);
|
|
709
|
+
}
|
|
710
|
+
return [n, We(t), !!e, i];
|
|
151
711
|
};
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
712
|
+
Z(re, xe);
|
|
713
|
+
var is = re, gr = (t, { windowsPathsNoEscape: e = !1 } = {}) => e ? t.replace(/[?*()[\]]/g, "[$&]") : t.replace(/[?*()[\]\\]/g, "\\$&"), H = (t, e, s = {}) => (Ve(e), !s.nocomment && e.charAt(0) === "#" ? !1 : new lt(e, s).match(t)), dr = /^\*+([^+@!?\*\[\(]*)$/, $r = (t) => (e) => !e.startsWith(".") && e.endsWith(t), vr = (t) => (e) => e.endsWith(t), _r = (t) => (t = t.toLowerCase(), (e) => !e.startsWith(".") && e.toLowerCase().endsWith(t)), mr = (t) => (t = t.toLowerCase(), (e) => e.toLowerCase().endsWith(t)), yr = /^\*+\.\*+$/, Er = (t) => !t.startsWith(".") && t.includes("."), wr = (t) => t !== "." && t !== ".." && t.includes("."), br = /^\.\*+$/, Sr = (t) => t !== "." && t !== ".." && t.startsWith("."), xr = /^\*+$/, Or = (t) => t.length !== 0 && !t.startsWith("."), Tr = (t) => t.length !== 0 && t !== "." && t !== "..", Ar = /^\?+([^+@!?\*\[\(]*)?$/, Rr = ([t, e = ""]) => {
|
|
714
|
+
const s = as([t]);
|
|
715
|
+
return e ? (e = e.toLowerCase(), (r) => s(r) && r.toLowerCase().endsWith(e)) : s;
|
|
716
|
+
}, Nr = ([t, e = ""]) => {
|
|
717
|
+
const s = os([t]);
|
|
718
|
+
return e ? (e = e.toLowerCase(), (r) => s(r) && r.toLowerCase().endsWith(e)) : s;
|
|
719
|
+
}, Lr = ([t, e = ""]) => {
|
|
720
|
+
const s = os([t]);
|
|
721
|
+
return e ? (r) => s(r) && r.endsWith(e) : s;
|
|
722
|
+
}, Mr = ([t, e = ""]) => {
|
|
723
|
+
const s = as([t]);
|
|
724
|
+
return e ? (r) => s(r) && r.endsWith(e) : s;
|
|
725
|
+
}, as = ([t]) => {
|
|
726
|
+
const e = t.length;
|
|
727
|
+
return (s) => s.length === e && !s.startsWith(".");
|
|
728
|
+
}, os = ([t]) => {
|
|
729
|
+
const e = t.length;
|
|
730
|
+
return (s) => s.length === e && s !== "." && s !== "..";
|
|
731
|
+
}, ls = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix", kt = {
|
|
732
|
+
win32: { sep: "\\" },
|
|
733
|
+
posix: { sep: "/" }
|
|
734
|
+
}, kr = ls === "win32" ? kt.win32.sep : kt.posix.sep;
|
|
735
|
+
H.sep = kr;
|
|
736
|
+
var Y = /* @__PURE__ */ Symbol("globstar **");
|
|
737
|
+
H.GLOBSTAR = Y;
|
|
738
|
+
var Cr = "[^/]", jr = Cr + "*?", Pr = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", Dr = "(?:(?!(?:\\/|^)\\.).)*?", Ir = (t, e = {}) => (s) => H(s, t, e);
|
|
739
|
+
H.filter = Ir;
|
|
740
|
+
var J = (t, e = {}) => Object.assign({}, t, e), Wr = (t) => {
|
|
741
|
+
if (!t || typeof t != "object" || !Object.keys(t).length)
|
|
742
|
+
return H;
|
|
743
|
+
const e = H;
|
|
744
|
+
return Object.assign((r, n, i = {}) => e(r, n, J(t, i)), {
|
|
745
|
+
Minimatch: class extends e.Minimatch {
|
|
746
|
+
constructor(n, i = {}) {
|
|
747
|
+
super(n, J(t, i));
|
|
748
|
+
}
|
|
749
|
+
static defaults(n) {
|
|
750
|
+
return e.defaults(J(t, n)).Minimatch;
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
AST: class extends e.AST {
|
|
754
|
+
/* c8 ignore start */
|
|
755
|
+
constructor(n, i, a = {}) {
|
|
756
|
+
super(n, i, J(t, a));
|
|
757
|
+
}
|
|
758
|
+
/* c8 ignore stop */
|
|
759
|
+
static fromGlob(n, i = {}) {
|
|
760
|
+
return e.AST.fromGlob(n, J(t, i));
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
unescape: (r, n = {}) => e.unescape(r, J(t, n)),
|
|
764
|
+
escape: (r, n = {}) => e.escape(r, J(t, n)),
|
|
765
|
+
filter: (r, n = {}) => e.filter(r, J(t, n)),
|
|
766
|
+
defaults: (r) => e.defaults(J(t, r)),
|
|
767
|
+
makeRe: (r, n = {}) => e.makeRe(r, J(t, n)),
|
|
768
|
+
braceExpand: (r, n = {}) => e.braceExpand(r, J(t, n)),
|
|
769
|
+
match: (r, n, i = {}) => e.match(r, n, J(t, i)),
|
|
770
|
+
sep: e.sep,
|
|
771
|
+
GLOBSTAR: Y
|
|
772
|
+
});
|
|
773
|
+
};
|
|
774
|
+
H.defaults = Wr;
|
|
775
|
+
var cs = (t, e = {}) => (Ve(t), e.nobrace || !/\{(?:(?!\{).)*\}/.test(t) ? [t] : (0, rr.default)(t));
|
|
776
|
+
H.braceExpand = cs;
|
|
777
|
+
var zr = (t, e = {}) => new lt(t, e).makeRe();
|
|
778
|
+
H.makeRe = zr;
|
|
779
|
+
var Gr = (t, e, s = {}) => {
|
|
780
|
+
const r = new lt(e, s);
|
|
781
|
+
return t = t.filter((n) => r.match(n)), r.options.nonull && !t.length && t.push(e), t;
|
|
782
|
+
};
|
|
783
|
+
H.match = Gr;
|
|
784
|
+
var Ct = /[?*]|[+@!]\(.*?\)|\[|\]/, Hr = (t) => t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), lt = class {
|
|
785
|
+
options;
|
|
786
|
+
set;
|
|
787
|
+
pattern;
|
|
788
|
+
windowsPathsNoEscape;
|
|
789
|
+
nonegate;
|
|
790
|
+
negate;
|
|
791
|
+
comment;
|
|
792
|
+
empty;
|
|
793
|
+
preserveMultipleSlashes;
|
|
794
|
+
partial;
|
|
795
|
+
globSet;
|
|
796
|
+
globParts;
|
|
797
|
+
nocase;
|
|
798
|
+
isWindows;
|
|
799
|
+
platform;
|
|
800
|
+
windowsNoMagicRoot;
|
|
801
|
+
regexp;
|
|
802
|
+
constructor(e, s = {}) {
|
|
803
|
+
Ve(e), s = s || {}, this.options = s, this.pattern = e, this.platform = s.platform || ls, this.isWindows = this.platform === "win32", this.windowsPathsNoEscape = !!s.windowsPathsNoEscape || s.allowWindowsEscape === !1, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, "/")), this.preserveMultipleSlashes = !!s.preserveMultipleSlashes, this.regexp = null, this.negate = !1, this.nonegate = !!s.nonegate, this.comment = !1, this.empty = !1, this.partial = !!s.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = s.windowsNoMagicRoot !== void 0 ? s.windowsNoMagicRoot : !!(this.isWindows && this.nocase), this.globSet = [], this.globParts = [], this.set = [], this.make();
|
|
804
|
+
}
|
|
805
|
+
hasMagic() {
|
|
806
|
+
if (this.options.magicalBraces && this.set.length > 1)
|
|
807
|
+
return !0;
|
|
808
|
+
for (const e of this.set)
|
|
809
|
+
for (const s of e)
|
|
810
|
+
if (typeof s != "string")
|
|
811
|
+
return !0;
|
|
812
|
+
return !1;
|
|
813
|
+
}
|
|
814
|
+
debug(...e) {
|
|
815
|
+
}
|
|
816
|
+
make() {
|
|
817
|
+
const e = this.pattern, s = this.options;
|
|
818
|
+
if (!s.nocomment && e.charAt(0) === "#") {
|
|
819
|
+
this.comment = !0;
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
if (!e) {
|
|
823
|
+
this.empty = !0;
|
|
824
|
+
return;
|
|
825
|
+
}
|
|
826
|
+
this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], s.debug && (this.debug = (...i) => console.error(...i)), this.debug(this.pattern, this.globSet);
|
|
827
|
+
const r = this.globSet.map((i) => this.slashSplit(i));
|
|
828
|
+
this.globParts = this.preprocess(r), this.debug(this.pattern, this.globParts);
|
|
829
|
+
let n = this.globParts.map((i, a, o) => {
|
|
830
|
+
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
831
|
+
const l = i[0] === "" && i[1] === "" && (i[2] === "?" || !Ct.test(i[2])) && !Ct.test(i[3]), h = /^[a-z]:/i.test(i[0]);
|
|
832
|
+
if (l)
|
|
833
|
+
return [...i.slice(0, 4), ...i.slice(4).map((c) => this.parse(c))];
|
|
834
|
+
if (h)
|
|
835
|
+
return [i[0], ...i.slice(1).map((c) => this.parse(c))];
|
|
836
|
+
}
|
|
837
|
+
return i.map((l) => this.parse(l));
|
|
838
|
+
});
|
|
839
|
+
if (this.debug(this.pattern, n), this.set = n.filter((i) => i.indexOf(!1) === -1), this.isWindows)
|
|
840
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
841
|
+
const a = this.set[i];
|
|
842
|
+
a[0] === "" && a[1] === "" && this.globParts[i][2] === "?" && typeof a[3] == "string" && /^[a-z]:$/i.test(a[3]) && (a[2] = "?");
|
|
843
|
+
}
|
|
844
|
+
this.debug(this.pattern, this.set);
|
|
845
|
+
}
|
|
846
|
+
// various transforms to equivalent pattern sets that are
|
|
847
|
+
// faster to process in a filesystem walk. The goal is to
|
|
848
|
+
// eliminate what we can, and push all ** patterns as far
|
|
849
|
+
// to the right as possible, even if it increases the number
|
|
850
|
+
// of patterns that we have to process.
|
|
851
|
+
preprocess(e) {
|
|
852
|
+
if (this.options.noglobstar)
|
|
853
|
+
for (let r = 0; r < e.length; r++)
|
|
854
|
+
for (let n = 0; n < e[r].length; n++)
|
|
855
|
+
e[r][n] === "**" && (e[r][n] = "*");
|
|
856
|
+
const { optimizationLevel: s = 1 } = this.options;
|
|
857
|
+
return s >= 2 ? (e = this.firstPhasePreProcess(e), e = this.secondPhasePreProcess(e)) : s >= 1 ? e = this.levelOneOptimize(e) : e = this.adjascentGlobstarOptimize(e), e;
|
|
858
|
+
}
|
|
859
|
+
// just get rid of adjascent ** portions
|
|
860
|
+
adjascentGlobstarOptimize(e) {
|
|
861
|
+
return e.map((s) => {
|
|
862
|
+
let r = -1;
|
|
863
|
+
for (; (r = s.indexOf("**", r + 1)) !== -1; ) {
|
|
864
|
+
let n = r;
|
|
865
|
+
for (; s[n + 1] === "**"; )
|
|
866
|
+
n++;
|
|
867
|
+
n !== r && s.splice(r, n - r);
|
|
868
|
+
}
|
|
869
|
+
return s;
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
// get rid of adjascent ** and resolve .. portions
|
|
873
|
+
levelOneOptimize(e) {
|
|
874
|
+
return e.map((s) => (s = s.reduce((r, n) => {
|
|
875
|
+
const i = r[r.length - 1];
|
|
876
|
+
return n === "**" && i === "**" ? r : n === ".." && i && i !== ".." && i !== "." && i !== "**" ? (r.pop(), r) : (r.push(n), r);
|
|
877
|
+
}, []), s.length === 0 ? [""] : s));
|
|
878
|
+
}
|
|
879
|
+
levelTwoFileOptimize(e) {
|
|
880
|
+
Array.isArray(e) || (e = this.slashSplit(e));
|
|
881
|
+
let s = !1;
|
|
882
|
+
do {
|
|
883
|
+
if (s = !1, !this.preserveMultipleSlashes) {
|
|
884
|
+
for (let n = 1; n < e.length - 1; n++) {
|
|
885
|
+
const i = e[n];
|
|
886
|
+
n === 1 && i === "" && e[0] === "" || (i === "." || i === "") && (s = !0, e.splice(n, 1), n--);
|
|
887
|
+
}
|
|
888
|
+
e[0] === "." && e.length === 2 && (e[1] === "." || e[1] === "") && (s = !0, e.pop());
|
|
889
|
+
}
|
|
890
|
+
let r = 0;
|
|
891
|
+
for (; (r = e.indexOf("..", r + 1)) !== -1; ) {
|
|
892
|
+
const n = e[r - 1];
|
|
893
|
+
n && n !== "." && n !== ".." && n !== "**" && (s = !0, e.splice(r - 1, 2), r -= 2);
|
|
894
|
+
}
|
|
895
|
+
} while (s);
|
|
896
|
+
return e.length === 0 ? [""] : e;
|
|
897
|
+
}
|
|
898
|
+
// First phase: single-pattern processing
|
|
899
|
+
// <pre> is 1 or more portions
|
|
900
|
+
// <rest> is 1 or more portions
|
|
901
|
+
// <p> is any portion other than ., .., '', or **
|
|
902
|
+
// <e> is . or ''
|
|
903
|
+
//
|
|
904
|
+
// **/.. is *brutal* for filesystem walking performance, because
|
|
905
|
+
// it effectively resets the recursive walk each time it occurs,
|
|
906
|
+
// and ** cannot be reduced out by a .. pattern part like a regexp
|
|
907
|
+
// or most strings (other than .., ., and '') can be.
|
|
908
|
+
//
|
|
909
|
+
// <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
|
|
910
|
+
// <pre>/<e>/<rest> -> <pre>/<rest>
|
|
911
|
+
// <pre>/<p>/../<rest> -> <pre>/<rest>
|
|
912
|
+
// **/**/<rest> -> **/<rest>
|
|
913
|
+
//
|
|
914
|
+
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
|
|
915
|
+
// this WOULD be allowed if ** did follow symlinks, or * didn't
|
|
916
|
+
firstPhasePreProcess(e) {
|
|
917
|
+
let s = !1;
|
|
918
|
+
do {
|
|
919
|
+
s = !1;
|
|
920
|
+
for (let r of e) {
|
|
921
|
+
let n = -1;
|
|
922
|
+
for (; (n = r.indexOf("**", n + 1)) !== -1; ) {
|
|
923
|
+
let a = n;
|
|
924
|
+
for (; r[a + 1] === "**"; )
|
|
925
|
+
a++;
|
|
926
|
+
a > n && r.splice(n + 1, a - n);
|
|
927
|
+
let o = r[n + 1];
|
|
928
|
+
const l = r[n + 2], h = r[n + 3];
|
|
929
|
+
if (o !== ".." || !l || l === "." || l === ".." || !h || h === "." || h === "..")
|
|
930
|
+
continue;
|
|
931
|
+
s = !0, r.splice(n, 1);
|
|
932
|
+
const c = r.slice(0);
|
|
933
|
+
c[n] = "**", e.push(c), n--;
|
|
934
|
+
}
|
|
935
|
+
if (!this.preserveMultipleSlashes) {
|
|
936
|
+
for (let a = 1; a < r.length - 1; a++) {
|
|
937
|
+
const o = r[a];
|
|
938
|
+
a === 1 && o === "" && r[0] === "" || (o === "." || o === "") && (s = !0, r.splice(a, 1), a--);
|
|
939
|
+
}
|
|
940
|
+
r[0] === "." && r.length === 2 && (r[1] === "." || r[1] === "") && (s = !0, r.pop());
|
|
941
|
+
}
|
|
942
|
+
let i = 0;
|
|
943
|
+
for (; (i = r.indexOf("..", i + 1)) !== -1; ) {
|
|
944
|
+
const a = r[i - 1];
|
|
945
|
+
if (a && a !== "." && a !== ".." && a !== "**") {
|
|
946
|
+
s = !0;
|
|
947
|
+
const l = i === 1 && r[i + 1] === "**" ? ["."] : [];
|
|
948
|
+
r.splice(i - 1, 2, ...l), r.length === 0 && r.push(""), i -= 2;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
} while (s);
|
|
953
|
+
return e;
|
|
954
|
+
}
|
|
955
|
+
// second phase: multi-pattern dedupes
|
|
956
|
+
// {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
|
|
957
|
+
// {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
|
|
958
|
+
// {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
|
|
959
|
+
//
|
|
960
|
+
// {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
|
|
961
|
+
// ^-- not valid because ** doens't follow symlinks
|
|
962
|
+
secondPhasePreProcess(e) {
|
|
963
|
+
for (let s = 0; s < e.length - 1; s++)
|
|
964
|
+
for (let r = s + 1; r < e.length; r++) {
|
|
965
|
+
const n = this.partsMatch(e[s], e[r], !this.preserveMultipleSlashes);
|
|
966
|
+
n && (e[s] = n, e[r] = []);
|
|
967
|
+
}
|
|
968
|
+
return e.filter((s) => s.length);
|
|
969
|
+
}
|
|
970
|
+
partsMatch(e, s, r = !1) {
|
|
971
|
+
let n = 0, i = 0, a = [], o = "";
|
|
972
|
+
for (; n < e.length && i < s.length; )
|
|
973
|
+
if (e[n] === s[i])
|
|
974
|
+
a.push(o === "b" ? s[i] : e[n]), n++, i++;
|
|
975
|
+
else if (r && e[n] === "**" && s[i] === e[n + 1])
|
|
976
|
+
a.push(e[n]), n++;
|
|
977
|
+
else if (r && s[i] === "**" && e[n] === s[i + 1])
|
|
978
|
+
a.push(s[i]), i++;
|
|
979
|
+
else if (e[n] === "*" && s[i] && (this.options.dot || !s[i].startsWith(".")) && s[i] !== "**") {
|
|
980
|
+
if (o === "b")
|
|
981
|
+
return !1;
|
|
982
|
+
o = "a", a.push(e[n]), n++, i++;
|
|
983
|
+
} else if (s[i] === "*" && e[n] && (this.options.dot || !e[n].startsWith(".")) && e[n] !== "**") {
|
|
984
|
+
if (o === "a")
|
|
985
|
+
return !1;
|
|
986
|
+
o = "b", a.push(s[i]), n++, i++;
|
|
987
|
+
} else
|
|
988
|
+
return !1;
|
|
989
|
+
return e.length === s.length && a;
|
|
990
|
+
}
|
|
991
|
+
parseNegate() {
|
|
992
|
+
if (this.nonegate)
|
|
993
|
+
return;
|
|
994
|
+
const e = this.pattern;
|
|
995
|
+
let s = !1, r = 0;
|
|
996
|
+
for (let n = 0; n < e.length && e.charAt(n) === "!"; n++)
|
|
997
|
+
s = !s, r++;
|
|
998
|
+
r && (this.pattern = e.slice(r)), this.negate = s;
|
|
999
|
+
}
|
|
1000
|
+
// set partial to true to test if, for example,
|
|
1001
|
+
// "/a/b" matches the start of "/*/b/*/d"
|
|
1002
|
+
// Partial means, if you run out of file before you run
|
|
1003
|
+
// out of pattern, then that's fine, as long as all
|
|
1004
|
+
// the parts match.
|
|
1005
|
+
matchOne(e, s, r = !1) {
|
|
1006
|
+
const n = this.options;
|
|
1007
|
+
if (this.isWindows) {
|
|
1008
|
+
const p = typeof e[0] == "string" && /^[a-z]:$/i.test(e[0]), y = !p && e[0] === "" && e[1] === "" && e[2] === "?" && /^[a-z]:$/i.test(e[3]), E = typeof s[0] == "string" && /^[a-z]:$/i.test(s[0]), $ = !E && s[0] === "" && s[1] === "" && s[2] === "?" && typeof s[3] == "string" && /^[a-z]:$/i.test(s[3]), w = y ? 3 : p ? 0 : void 0, b = $ ? 3 : E ? 0 : void 0;
|
|
1009
|
+
if (typeof w == "number" && typeof b == "number") {
|
|
1010
|
+
const [m, D] = [e[w], s[b]];
|
|
1011
|
+
m.toLowerCase() === D.toLowerCase() && (s[b] = m, b > w ? s = s.slice(b) : w > b && (e = e.slice(w)));
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
const { optimizationLevel: i = 1 } = this.options;
|
|
1015
|
+
i >= 2 && (e = this.levelTwoFileOptimize(e)), this.debug("matchOne", this, { file: e, pattern: s }), this.debug("matchOne", e.length, s.length);
|
|
1016
|
+
for (var a = 0, o = 0, l = e.length, h = s.length; a < l && o < h; a++, o++) {
|
|
1017
|
+
this.debug("matchOne loop");
|
|
1018
|
+
var c = s[o], u = e[a];
|
|
1019
|
+
if (this.debug(s, c, u), c === !1)
|
|
1020
|
+
return !1;
|
|
1021
|
+
if (c === Y) {
|
|
1022
|
+
this.debug("GLOBSTAR", [s, c, u]);
|
|
1023
|
+
var d = a, g = o + 1;
|
|
1024
|
+
if (g === h) {
|
|
1025
|
+
for (this.debug("** at the end"); a < l; a++)
|
|
1026
|
+
if (e[a] === "." || e[a] === ".." || !n.dot && e[a].charAt(0) === ".")
|
|
1027
|
+
return !1;
|
|
1028
|
+
return !0;
|
|
1029
|
+
}
|
|
1030
|
+
for (; d < l; ) {
|
|
1031
|
+
var f = e[d];
|
|
1032
|
+
if (this.debug(`
|
|
1033
|
+
globstar while`, e, d, s, g, f), this.matchOne(e.slice(d), s.slice(g), r))
|
|
1034
|
+
return this.debug("globstar found match!", d, l, f), !0;
|
|
1035
|
+
if (f === "." || f === ".." || !n.dot && f.charAt(0) === ".") {
|
|
1036
|
+
this.debug("dot detected!", e, d, s, g);
|
|
1037
|
+
break;
|
|
1038
|
+
}
|
|
1039
|
+
this.debug("globstar swallow a segment, and continue"), d++;
|
|
1040
|
+
}
|
|
1041
|
+
return !!(r && (this.debug(`
|
|
1042
|
+
>>> no match, partial?`, e, d, s, g), d === l));
|
|
1043
|
+
}
|
|
1044
|
+
let p;
|
|
1045
|
+
if (typeof c == "string" ? (p = u === c, this.debug("string match", c, u, p)) : (p = c.test(u), this.debug("pattern match", c, u, p)), !p)
|
|
1046
|
+
return !1;
|
|
1047
|
+
}
|
|
1048
|
+
if (a === l && o === h)
|
|
1049
|
+
return !0;
|
|
1050
|
+
if (a === l)
|
|
1051
|
+
return r;
|
|
1052
|
+
if (o === h)
|
|
1053
|
+
return a === l - 1 && e[a] === "";
|
|
1054
|
+
throw new Error("wtf?");
|
|
1055
|
+
}
|
|
1056
|
+
braceExpand() {
|
|
1057
|
+
return cs(this.pattern, this.options);
|
|
1058
|
+
}
|
|
1059
|
+
parse(e) {
|
|
1060
|
+
Ve(e);
|
|
1061
|
+
const s = this.options;
|
|
1062
|
+
if (e === "**")
|
|
1063
|
+
return Y;
|
|
1064
|
+
if (e === "")
|
|
1065
|
+
return "";
|
|
1066
|
+
let r, n = null;
|
|
1067
|
+
(r = e.match(xr)) ? n = s.dot ? Tr : Or : (r = e.match(dr)) ? n = (s.nocase ? s.dot ? mr : _r : s.dot ? vr : $r)(r[1]) : (r = e.match(Ar)) ? n = (s.nocase ? s.dot ? Nr : Rr : s.dot ? Lr : Mr)(r) : (r = e.match(yr)) ? n = s.dot ? wr : Er : (r = e.match(br)) && (n = Sr);
|
|
1068
|
+
const i = is.fromGlob(e, this.options).toMMPattern();
|
|
1069
|
+
return n && typeof i == "object" && Reflect.defineProperty(i, "test", { value: n }), i;
|
|
1070
|
+
}
|
|
1071
|
+
makeRe() {
|
|
1072
|
+
if (this.regexp || this.regexp === !1)
|
|
1073
|
+
return this.regexp;
|
|
1074
|
+
const e = this.set;
|
|
1075
|
+
if (!e.length)
|
|
1076
|
+
return this.regexp = !1, this.regexp;
|
|
1077
|
+
const s = this.options, r = s.noglobstar ? jr : s.dot ? Pr : Dr, n = new Set(s.nocase ? ["i"] : []);
|
|
1078
|
+
let i = e.map((l) => {
|
|
1079
|
+
const h = l.map((c) => {
|
|
1080
|
+
if (c instanceof RegExp)
|
|
1081
|
+
for (const u of c.flags.split(""))
|
|
1082
|
+
n.add(u);
|
|
1083
|
+
return typeof c == "string" ? Hr(c) : c === Y ? Y : c._src;
|
|
1084
|
+
});
|
|
1085
|
+
return h.forEach((c, u) => {
|
|
1086
|
+
const d = h[u + 1], g = h[u - 1];
|
|
1087
|
+
c !== Y || g === Y || (g === void 0 ? d !== void 0 && d !== Y ? h[u + 1] = "(?:\\/|" + r + "\\/)?" + d : h[u] = r : d === void 0 ? h[u - 1] = g + "(?:\\/|" + r + ")?" : d !== Y && (h[u - 1] = g + "(?:\\/|\\/" + r + "\\/)" + d, h[u + 1] = Y));
|
|
1088
|
+
}), h.filter((c) => c !== Y).join("/");
|
|
1089
|
+
}).join("|");
|
|
1090
|
+
const [a, o] = e.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
1091
|
+
i = "^" + a + i + o + "$", this.negate && (i = "^(?!" + i + ").+$");
|
|
1092
|
+
try {
|
|
1093
|
+
this.regexp = new RegExp(i, [...n].join(""));
|
|
1094
|
+
} catch {
|
|
1095
|
+
this.regexp = !1;
|
|
1096
|
+
}
|
|
1097
|
+
return this.regexp;
|
|
1098
|
+
}
|
|
1099
|
+
slashSplit(e) {
|
|
1100
|
+
return this.preserveMultipleSlashes ? e.split("/") : this.isWindows && /^\/\/[^\/]+/.test(e) ? ["", ...e.split(/\/+/)] : e.split(/\/+/);
|
|
1101
|
+
}
|
|
1102
|
+
match(e, s = this.partial) {
|
|
1103
|
+
if (this.debug("match", e, this.pattern), this.comment)
|
|
1104
|
+
return !1;
|
|
1105
|
+
if (this.empty)
|
|
1106
|
+
return e === "";
|
|
1107
|
+
if (e === "/" && s)
|
|
1108
|
+
return !0;
|
|
1109
|
+
const r = this.options;
|
|
1110
|
+
this.isWindows && (e = e.split("\\").join("/"));
|
|
1111
|
+
const n = this.slashSplit(e);
|
|
1112
|
+
this.debug(this.pattern, "split", n);
|
|
1113
|
+
const i = this.set;
|
|
1114
|
+
this.debug(this.pattern, "set", i);
|
|
1115
|
+
let a = n[n.length - 1];
|
|
1116
|
+
if (!a)
|
|
1117
|
+
for (let o = n.length - 2; !a && o >= 0; o--)
|
|
1118
|
+
a = n[o];
|
|
1119
|
+
for (let o = 0; o < i.length; o++) {
|
|
1120
|
+
const l = i[o];
|
|
1121
|
+
let h = n;
|
|
1122
|
+
if (r.matchBase && l.length === 1 && (h = [a]), this.matchOne(h, l, s))
|
|
1123
|
+
return r.flipNegate ? !0 : !this.negate;
|
|
1124
|
+
}
|
|
1125
|
+
return r.flipNegate ? !1 : this.negate;
|
|
1126
|
+
}
|
|
1127
|
+
static defaults(e) {
|
|
1128
|
+
return H.defaults(e).Minimatch;
|
|
1129
|
+
}
|
|
1130
|
+
};
|
|
1131
|
+
H.AST = is;
|
|
1132
|
+
H.Minimatch = lt;
|
|
1133
|
+
H.escape = gr;
|
|
1134
|
+
H.unescape = We;
|
|
1135
|
+
var Fr = (t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Br = {};
|
|
1136
|
+
Ks(Br, {
|
|
1137
|
+
err: () => hs,
|
|
1138
|
+
map: () => Ur,
|
|
1139
|
+
ok: () => $t,
|
|
1140
|
+
unwrap: () => Zr,
|
|
1141
|
+
unwrapErr: () => qr
|
|
162
1142
|
});
|
|
163
|
-
var
|
|
1143
|
+
var $t = (t) => ({
|
|
164
1144
|
isOk: !0,
|
|
165
1145
|
isErr: !1,
|
|
166
|
-
value:
|
|
167
|
-
}),
|
|
1146
|
+
value: t
|
|
1147
|
+
}), hs = (t) => ({
|
|
168
1148
|
isOk: !1,
|
|
169
1149
|
isErr: !0,
|
|
170
|
-
value:
|
|
1150
|
+
value: t
|
|
171
1151
|
});
|
|
172
|
-
function
|
|
173
|
-
if (
|
|
174
|
-
const
|
|
175
|
-
return
|
|
1152
|
+
function Ur(t, e) {
|
|
1153
|
+
if (t.isOk) {
|
|
1154
|
+
const s = e(t.value);
|
|
1155
|
+
return s instanceof Promise ? s.then((r) => $t(r)) : $t(s);
|
|
176
1156
|
}
|
|
177
|
-
if (
|
|
178
|
-
const
|
|
179
|
-
return
|
|
1157
|
+
if (t.isErr) {
|
|
1158
|
+
const s = t.value;
|
|
1159
|
+
return hs(s);
|
|
180
1160
|
}
|
|
181
1161
|
throw "should never get here";
|
|
182
1162
|
}
|
|
183
|
-
var
|
|
184
|
-
if (
|
|
185
|
-
return
|
|
186
|
-
throw
|
|
187
|
-
},
|
|
188
|
-
if (
|
|
189
|
-
return
|
|
190
|
-
throw
|
|
191
|
-
},
|
|
192
|
-
const
|
|
1163
|
+
var Zr = (t) => {
|
|
1164
|
+
if (t.isOk)
|
|
1165
|
+
return t.value;
|
|
1166
|
+
throw t.value;
|
|
1167
|
+
}, qr = (t) => {
|
|
1168
|
+
if (t.isErr)
|
|
1169
|
+
return t.value;
|
|
1170
|
+
throw t.value;
|
|
1171
|
+
}, xt = (t) => {
|
|
1172
|
+
const e = Fr(t);
|
|
193
1173
|
return new RegExp(
|
|
194
1174
|
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
195
1175
|
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
196
|
-
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${
|
|
1176
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,
|
|
197
1177
|
"g"
|
|
198
1178
|
);
|
|
199
1179
|
};
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
const
|
|
204
|
-
if (!
|
|
1180
|
+
xt("::slotted");
|
|
1181
|
+
xt(":host");
|
|
1182
|
+
xt(":host-context");
|
|
1183
|
+
const us = (t, e) => {
|
|
1184
|
+
if (!e)
|
|
205
1185
|
return;
|
|
206
|
-
const
|
|
207
|
-
return `${
|
|
208
|
-
},
|
|
209
|
-
if (
|
|
210
|
-
return `${
|
|
211
|
-
},
|
|
212
|
-
let
|
|
1186
|
+
const s = e.split("/");
|
|
1187
|
+
return `${t}${s.slice(2, s.length - 1).join("-")}--docs`;
|
|
1188
|
+
}, Jr = (t, e) => {
|
|
1189
|
+
if (e)
|
|
1190
|
+
return `${t}${e}`;
|
|
1191
|
+
}, fs = (t) => {
|
|
1192
|
+
let e = t.overview ? `${t.overview}
|
|
213
1193
|
|
|
214
1194
|
` : "";
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
`,
|
|
218
|
-
`).join(""),
|
|
1195
|
+
const s = t.props.filter(({ attr: n }) => n !== void 0);
|
|
1196
|
+
s.length && (e += `Attributes:
|
|
1197
|
+
`, e += s.map(({ attr: n, docs: i }) => `- \`${n}\`: ${i}
|
|
1198
|
+
`).join(""), e += `
|
|
219
1199
|
`);
|
|
220
|
-
const
|
|
221
|
-
return
|
|
222
|
-
`,
|
|
223
|
-
`).join(""),
|
|
224
|
-
`),
|
|
225
|
-
`,
|
|
226
|
-
`).join(""),
|
|
227
|
-
`),
|
|
228
|
-
`,
|
|
229
|
-
`).join(""),
|
|
230
|
-
`),
|
|
231
|
-
`,
|
|
232
|
-
`).join(""),
|
|
233
|
-
`),
|
|
234
|
-
`,
|
|
235
|
-
`).join(""),
|
|
236
|
-
`),
|
|
237
|
-
},
|
|
1200
|
+
const r = t.props.filter(({ attr: n }) => n === void 0);
|
|
1201
|
+
return r.length && (e += `Properties:
|
|
1202
|
+
`, e += r.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
1203
|
+
`).join(""), e += `
|
|
1204
|
+
`), t.methods.length && (e += `Methods:
|
|
1205
|
+
`, e += t.methods.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
1206
|
+
`).join(""), e += `
|
|
1207
|
+
`), t.events.length && (e += `Events:
|
|
1208
|
+
`, e += t.events.map(({ event: n, docs: i }) => `- \`${n}\`: ${i}
|
|
1209
|
+
`).join(""), e += `
|
|
1210
|
+
`), t.listeners.length && (e += `Listeners:
|
|
1211
|
+
`, e += t.listeners.map(({ event: n }) => `- \`${n}\`
|
|
1212
|
+
`).join(""), e += `
|
|
1213
|
+
`), t.slots.length && (e += `Slots:
|
|
1214
|
+
`, e += t.slots.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
1215
|
+
`).join(""), e += `
|
|
1216
|
+
`), e;
|
|
1217
|
+
}, vt = (t) => `${t.docs}
|
|
238
1218
|
|
|
239
|
-
Type: \`${
|
|
1219
|
+
Type: \`${t.type}\``, ra = (t, e, s, r) => ({
|
|
240
1220
|
$schema: "https://json.schemastore.org/web-types",
|
|
241
|
-
name:
|
|
242
|
-
version:
|
|
1221
|
+
name: t,
|
|
1222
|
+
version: e,
|
|
243
1223
|
"description-markup": "markdown",
|
|
244
1224
|
contributions: {
|
|
245
1225
|
html: {
|
|
246
|
-
elements:
|
|
247
|
-
const i =
|
|
1226
|
+
elements: s.components.map((n) => {
|
|
1227
|
+
const i = us(r, n.filePath);
|
|
248
1228
|
return {
|
|
249
1229
|
name: n.tag,
|
|
250
|
-
description:
|
|
1230
|
+
description: fs(n),
|
|
251
1231
|
"doc-url": i,
|
|
252
|
-
attributes: n.props.filter((
|
|
253
|
-
name:
|
|
254
|
-
description:
|
|
1232
|
+
attributes: n.props.filter((a) => a.attr).map((a) => ({
|
|
1233
|
+
name: a.attr,
|
|
1234
|
+
description: vt(a),
|
|
255
1235
|
"doc-url": i,
|
|
256
1236
|
value: {
|
|
257
|
-
type:
|
|
258
|
-
default:
|
|
259
|
-
required:
|
|
1237
|
+
type: a.type,
|
|
1238
|
+
default: a.default,
|
|
1239
|
+
required: a.required
|
|
260
1240
|
}
|
|
261
1241
|
})),
|
|
262
1242
|
js: {
|
|
263
|
-
properties: n.props.map((
|
|
264
|
-
name:
|
|
265
|
-
description:
|
|
1243
|
+
properties: n.props.map((a) => ({
|
|
1244
|
+
name: a.name,
|
|
1245
|
+
description: vt(a),
|
|
266
1246
|
"doc-url": i,
|
|
267
1247
|
value: {
|
|
268
|
-
type:
|
|
269
|
-
default:
|
|
270
|
-
required:
|
|
1248
|
+
type: a.type,
|
|
1249
|
+
default: a.default,
|
|
1250
|
+
required: a.required
|
|
271
1251
|
}
|
|
272
1252
|
})),
|
|
273
|
-
events: n.events.map((
|
|
274
|
-
name:
|
|
275
|
-
description:
|
|
1253
|
+
events: n.events.map((a) => ({
|
|
1254
|
+
name: a.event,
|
|
1255
|
+
description: a.docs
|
|
276
1256
|
}))
|
|
277
1257
|
},
|
|
278
1258
|
css: {
|
|
279
|
-
properties: n.styles.map((
|
|
280
|
-
name:
|
|
281
|
-
description:
|
|
1259
|
+
properties: n.styles.map((a) => ({
|
|
1260
|
+
name: a.name,
|
|
1261
|
+
description: a.docs
|
|
282
1262
|
}))
|
|
283
1263
|
}
|
|
284
1264
|
};
|
|
285
1265
|
})
|
|
286
1266
|
}
|
|
287
1267
|
}
|
|
288
|
-
}),
|
|
289
|
-
{ name: "Storybook", url:
|
|
290
|
-
{ name: "Sources", url:
|
|
291
|
-
],
|
|
292
|
-
if (!
|
|
293
|
-
return
|
|
294
|
-
},
|
|
1268
|
+
}), Xr = (t, e, s) => [
|
|
1269
|
+
{ name: "Storybook", url: us(t, s) },
|
|
1270
|
+
{ name: "Sources", url: Jr(e, s) }
|
|
1271
|
+
], Yr = (t) => {
|
|
1272
|
+
if (!t.values.some(({ value: e }) => e === void 0))
|
|
1273
|
+
return t.values.map(({ value: e }) => ({ name: e }));
|
|
1274
|
+
}, na = (t, e, s) => ({
|
|
295
1275
|
version: 1.1,
|
|
296
|
-
tags:
|
|
297
|
-
const n =
|
|
1276
|
+
tags: t.components.map((r) => {
|
|
1277
|
+
const n = Xr(e, s, r.filePath);
|
|
298
1278
|
return {
|
|
299
|
-
name:
|
|
300
|
-
description:
|
|
301
|
-
attributes:
|
|
1279
|
+
name: r.tag,
|
|
1280
|
+
description: fs(r),
|
|
1281
|
+
attributes: r.props.map((i) => ({
|
|
302
1282
|
name: i.attr ?? i.name,
|
|
303
|
-
description:
|
|
304
|
-
values:
|
|
1283
|
+
description: vt(i),
|
|
1284
|
+
values: Yr(i),
|
|
305
1285
|
references: n
|
|
306
1286
|
})),
|
|
307
1287
|
references: n
|
|
@@ -309,245 +1289,1225 @@ Type: \`${e.type}\``, cr = (e, t, r, s) => ({
|
|
|
309
1289
|
}),
|
|
310
1290
|
globalAttributes: [],
|
|
311
1291
|
valueSets: []
|
|
312
|
-
}),
|
|
1292
|
+
}), ia = (t) => ({
|
|
313
1293
|
version: 1.1,
|
|
314
|
-
properties:
|
|
315
|
-
name:
|
|
316
|
-
description:
|
|
1294
|
+
properties: t.components.flatMap((e) => e.styles.map((s) => ({
|
|
1295
|
+
name: s.name,
|
|
1296
|
+
description: s.docs
|
|
317
1297
|
})))
|
|
318
|
-
}),
|
|
319
|
-
const
|
|
320
|
-
return
|
|
321
|
-
},
|
|
322
|
-
const
|
|
323
|
-
return Object.keys(
|
|
1298
|
+
}), Kr = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, aa = (t) => {
|
|
1299
|
+
const e = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
|
|
1300
|
+
return Vr([e.value, s.value, r.value].join("-"), t, { timeZone: "UTC" }).replace(e.value, e.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
|
|
1301
|
+
}, Qr = (t, e, s) => {
|
|
1302
|
+
const r = t.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(r?.lang), i = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || s, a = i.split("-").shift();
|
|
1303
|
+
return Object.keys(e).length === 0 ? {
|
|
324
1304
|
locale: i,
|
|
325
|
-
messages: { lang:
|
|
1305
|
+
messages: { lang: s }
|
|
326
1306
|
} : {
|
|
327
1307
|
locale: i,
|
|
328
|
-
messages:
|
|
1308
|
+
messages: e[a] ?? e[s] ?? { lang: s }
|
|
329
1309
|
};
|
|
330
|
-
},
|
|
1310
|
+
}, oa = (t, e, s) => new Intl.NumberFormat(e, { style: "currency", currency: s }).format(t), la = (t, e, s = 0) => new Intl.NumberFormat(e, { minimumFractionDigits: s }).format(Number(t)), ca = (t, e, s = 0) => new Intl.NumberFormat(e, {
|
|
331
1311
|
style: "percent",
|
|
332
|
-
minimumFractionDigits:
|
|
333
|
-
maximumFractionDigits:
|
|
334
|
-
}).format(
|
|
1312
|
+
minimumFractionDigits: s,
|
|
1313
|
+
maximumFractionDigits: s
|
|
1314
|
+
}).format(t), ha = (t, e, s, r = "short", n = 0) => new Intl.NumberFormat(e, {
|
|
335
1315
|
style: "unit",
|
|
336
|
-
unit:
|
|
337
|
-
unitDisplay:
|
|
1316
|
+
unit: s,
|
|
1317
|
+
unitDisplay: r,
|
|
338
1318
|
minimumFractionDigits: n,
|
|
339
1319
|
maximumFractionDigits: n
|
|
340
|
-
}).format(
|
|
341
|
-
var
|
|
1320
|
+
}).format(t), Vr = (t, e, s) => typeof t != "string" || t === "" || !Kr.test(t) ? "" : new Intl.DateTimeFormat(e, s).format(new Date(t)), ua = (t, e) => (s) => Qr(s, t, e);
|
|
1321
|
+
var He = {
|
|
342
1322
|
updatable: !0,
|
|
343
1323
|
slotRelocation: !0,
|
|
344
1324
|
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
345
1325
|
experimentalSlotFixes: !1
|
|
346
|
-
},
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
1326
|
+
}, en = Object.create, ct = Object.defineProperty, tn = Object.getOwnPropertyDescriptor, ps = Object.getOwnPropertyNames, sn = Object.getPrototypeOf, rn = Object.prototype.hasOwnProperty, gs = (t) => {
|
|
1327
|
+
throw TypeError(t);
|
|
1328
|
+
}, nn = (t, e, s) => e in t ? ct(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, ds = (t, e) => function() {
|
|
1329
|
+
return e || (0, t[ps(t)[0]])((e = { exports: {} }).exports, e), e.exports;
|
|
1330
|
+
}, an = (t, e) => {
|
|
1331
|
+
for (var s in e)
|
|
1332
|
+
ct(t, s, { get: e[s], enumerable: !0 });
|
|
1333
|
+
}, on = (t, e, s, r) => {
|
|
1334
|
+
if (e && typeof e == "object" || typeof e == "function")
|
|
1335
|
+
for (let n of ps(e))
|
|
1336
|
+
!rn.call(t, n) && n !== s && ct(t, n, { get: () => e[n], enumerable: !(r = tn(e, n)) || r.enumerable });
|
|
1337
|
+
return t;
|
|
1338
|
+
}, ln = (t, e, s) => (s = t != null ? en(sn(t)) : {}, on(
|
|
1339
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
1340
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
1341
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1342
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1343
|
+
ct(s, "default", { value: t, enumerable: !0 }),
|
|
1344
|
+
t
|
|
1345
|
+
)), cn = (t, e, s) => nn(t, e + "", s), Ot = (t, e, s) => e.has(t) || gs("Cannot " + s), _ = (t, e, s) => (Ot(t, e, "read from private field"), s ? s.call(t) : e.get(t)), q = (t, e, s) => e.has(t) ? gs("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), N = (t, e, s, r) => (Ot(t, e, "write to private field"), e.set(t, s), s), pe = (t, e, s) => (Ot(t, e, "access private method"), s), hn = ds({
|
|
1346
|
+
"node_modules/balanced-match/index.js"(t, e) {
|
|
1347
|
+
e.exports = s;
|
|
1348
|
+
function s(i, a, o) {
|
|
1349
|
+
i instanceof RegExp && (i = r(i, o)), a instanceof RegExp && (a = r(a, o));
|
|
1350
|
+
var l = n(i, a, o);
|
|
1351
|
+
return l && {
|
|
1352
|
+
start: l[0],
|
|
1353
|
+
end: l[1],
|
|
1354
|
+
pre: o.slice(0, l[0]),
|
|
1355
|
+
body: o.slice(l[0] + i.length, l[1]),
|
|
1356
|
+
post: o.slice(l[1] + a.length)
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1359
|
+
function r(i, a) {
|
|
1360
|
+
var o = a.match(i);
|
|
1361
|
+
return o ? o[0] : null;
|
|
1362
|
+
}
|
|
1363
|
+
s.range = n;
|
|
1364
|
+
function n(i, a, o) {
|
|
1365
|
+
var l, h, c, u, d, g = o.indexOf(i), f = o.indexOf(a, g + 1), p = g;
|
|
1366
|
+
if (g >= 0 && f > 0) {
|
|
1367
|
+
if (i === a)
|
|
1368
|
+
return [g, f];
|
|
1369
|
+
for (l = [], c = o.length; p >= 0 && !d; )
|
|
1370
|
+
p == g ? (l.push(p), g = o.indexOf(i, p + 1)) : l.length == 1 ? d = [l.pop(), f] : (h = l.pop(), h < c && (c = h, u = f), f = o.indexOf(a, p + 1)), p = g < f && g >= 0 ? g : f;
|
|
1371
|
+
l.length && (d = [c, u]);
|
|
1372
|
+
}
|
|
1373
|
+
return d;
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
}), un = ds({
|
|
1377
|
+
"node_modules/brace-expansion/index.js"(t, e) {
|
|
1378
|
+
var s = hn();
|
|
1379
|
+
e.exports = d;
|
|
1380
|
+
var r = "\0SLASH" + Math.random() + "\0", n = "\0OPEN" + Math.random() + "\0", i = "\0CLOSE" + Math.random() + "\0", a = "\0COMMA" + Math.random() + "\0", o = "\0PERIOD" + Math.random() + "\0";
|
|
1381
|
+
function l($) {
|
|
1382
|
+
return parseInt($, 10) == $ ? parseInt($, 10) : $.charCodeAt(0);
|
|
1383
|
+
}
|
|
1384
|
+
function h($) {
|
|
1385
|
+
return $.split("\\\\").join(r).split("\\{").join(n).split("\\}").join(i).split("\\,").join(a).split("\\.").join(o);
|
|
1386
|
+
}
|
|
1387
|
+
function c($) {
|
|
1388
|
+
return $.split(r).join("\\").split(n).join("{").split(i).join("}").split(a).join(",").split(o).join(".");
|
|
1389
|
+
}
|
|
1390
|
+
function u($) {
|
|
1391
|
+
if (!$)
|
|
1392
|
+
return [""];
|
|
1393
|
+
var w = [], b = s("{", "}", $);
|
|
1394
|
+
if (!b)
|
|
1395
|
+
return $.split(",");
|
|
1396
|
+
var m = b.pre, D = b.body, L = b.post, x = m.split(",");
|
|
1397
|
+
x[x.length - 1] += "{" + D + "}";
|
|
1398
|
+
var M = u(L);
|
|
1399
|
+
return L.length && (x[x.length - 1] += M.shift(), x.push.apply(x, M)), w.push.apply(w, x), w;
|
|
1400
|
+
}
|
|
1401
|
+
function d($) {
|
|
1402
|
+
return $ ? ($.substr(0, 2) === "{}" && ($ = "\\{\\}" + $.substr(2)), E(h($), !0).map(c)) : [];
|
|
1403
|
+
}
|
|
1404
|
+
function g($) {
|
|
1405
|
+
return "{" + $ + "}";
|
|
1406
|
+
}
|
|
1407
|
+
function f($) {
|
|
1408
|
+
return /^-?0\d/.test($);
|
|
1409
|
+
}
|
|
1410
|
+
function p($, w) {
|
|
1411
|
+
return $ <= w;
|
|
1412
|
+
}
|
|
1413
|
+
function y($, w) {
|
|
1414
|
+
return $ >= w;
|
|
1415
|
+
}
|
|
1416
|
+
function E($, w) {
|
|
1417
|
+
var b = [], m = s("{", "}", $);
|
|
1418
|
+
if (!m) return [$];
|
|
1419
|
+
var D = m.pre, L = m.post.length ? E(m.post, !1) : [""];
|
|
1420
|
+
if (/\$$/.test(m.pre))
|
|
1421
|
+
for (var x = 0; x < L.length; x++) {
|
|
1422
|
+
var M = D + "{" + m.body + "}" + L[x];
|
|
1423
|
+
b.push(M);
|
|
1424
|
+
}
|
|
1425
|
+
else {
|
|
1426
|
+
var me = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body), oe = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body), Q = me || oe, Ae = m.body.indexOf(",") >= 0;
|
|
1427
|
+
if (!Q && !Ae)
|
|
1428
|
+
return m.post.match(/,(?!,).*\}/) ? ($ = m.pre + "{" + m.body + i + m.post, E($)) : [$];
|
|
1429
|
+
var S;
|
|
1430
|
+
if (Q)
|
|
1431
|
+
S = m.body.split(/\.\./);
|
|
1432
|
+
else if (S = u(m.body), S.length === 1 && (S = E(S[0], !1).map(g), S.length === 1))
|
|
1433
|
+
return L.map(function(gt) {
|
|
1434
|
+
return m.pre + S[0] + gt;
|
|
1435
|
+
});
|
|
1436
|
+
var I;
|
|
1437
|
+
if (Q) {
|
|
1438
|
+
var le = l(S[0]), Re = l(S[1]), ut = Math.max(S[0].length, S[1].length), Ne = S.length == 3 ? Math.abs(l(S[2])) : 1, Le = p, ft = Re < le;
|
|
1439
|
+
ft && (Ne *= -1, Le = y);
|
|
1440
|
+
var pt = S.some(f);
|
|
1441
|
+
I = [];
|
|
1442
|
+
for (var V = le; Le(V, Re); V += Ne) {
|
|
1443
|
+
var A;
|
|
1444
|
+
if (oe)
|
|
1445
|
+
A = String.fromCharCode(V), A === "\\" && (A = "");
|
|
1446
|
+
else if (A = String(V), pt) {
|
|
1447
|
+
var Me = ut - A.length;
|
|
1448
|
+
if (Me > 0) {
|
|
1449
|
+
var ke = new Array(Me + 1).join("0");
|
|
1450
|
+
V < 0 ? A = "-" + ke + A.slice(1) : A = ke + A;
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
I.push(A);
|
|
1454
|
+
}
|
|
1455
|
+
} else {
|
|
1456
|
+
I = [];
|
|
1457
|
+
for (var G = 0; G < S.length; G++)
|
|
1458
|
+
I.push.apply(I, E(S[G], !1));
|
|
1459
|
+
}
|
|
1460
|
+
for (var G = 0; G < I.length; G++)
|
|
1461
|
+
for (var x = 0; x < L.length; x++) {
|
|
1462
|
+
var M = D + I[G] + L[x];
|
|
1463
|
+
(!w || Q || M) && b.push(M);
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
return b;
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
}), fn = "http://www.w3.org/2000/svg", pn = "http://www.w3.org/1999/xhtml", jt = (t, e) => e in t, Pt = "http://www.w3.org/1999/xlink", $e = typeof window < "u" ? window : {}, Oe = {
|
|
350
1470
|
$flags$: 0,
|
|
351
1471
|
$resourcesUrl$: "",
|
|
352
|
-
jmp: (
|
|
353
|
-
raf: (
|
|
354
|
-
ael: (e,
|
|
355
|
-
rel: (e,
|
|
356
|
-
ce: (
|
|
357
|
-
},
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
1472
|
+
jmp: (t) => t(),
|
|
1473
|
+
raf: (t) => requestAnimationFrame(t),
|
|
1474
|
+
ael: (t, e, s, r) => t.addEventListener(e, s, r),
|
|
1475
|
+
rel: (t, e, s, r) => t.removeEventListener(e, s, r),
|
|
1476
|
+
ce: (t, e) => new CustomEvent(t, e)
|
|
1477
|
+
}, gn = (t) => t != null && t !== void 0, $s = (t) => (t = typeof t, t === "object" || t === "function"), dn = ln(un()), $n = 1024 * 64, tt = (t) => {
|
|
1478
|
+
if (typeof t != "string")
|
|
1479
|
+
throw new TypeError("invalid pattern");
|
|
1480
|
+
if (t.length > $n)
|
|
1481
|
+
throw new TypeError("pattern is too long");
|
|
1482
|
+
}, vn = {
|
|
1483
|
+
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
|
|
1484
|
+
"[:alpha:]": ["\\p{L}\\p{Nl}", !0],
|
|
1485
|
+
"[:ascii:]": ["\\x00-\\x7f", !1],
|
|
1486
|
+
"[:blank:]": ["\\p{Zs}\\t", !0],
|
|
1487
|
+
"[:cntrl:]": ["\\p{Cc}", !0],
|
|
1488
|
+
"[:digit:]": ["\\p{Nd}", !0],
|
|
1489
|
+
"[:graph:]": ["\\p{Z}\\p{C}", !0, !0],
|
|
1490
|
+
"[:lower:]": ["\\p{Ll}", !0],
|
|
1491
|
+
"[:print:]": ["\\p{C}", !0],
|
|
1492
|
+
"[:punct:]": ["\\p{P}", !0],
|
|
1493
|
+
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", !0],
|
|
1494
|
+
"[:upper:]": ["\\p{Lu}", !0],
|
|
1495
|
+
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
|
|
1496
|
+
"[:xdigit:]": ["A-Fa-f0-9", !1]
|
|
1497
|
+
}, je = (t) => t.replace(/[[\]\\-]/g, "\\$&"), _n = (t) => t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), Dt = (t) => t.join(""), mn = (t, e) => {
|
|
1498
|
+
const s = e;
|
|
1499
|
+
if (t.charAt(s) !== "[")
|
|
1500
|
+
throw new Error("not in a brace expression");
|
|
1501
|
+
const r = [], n = [];
|
|
1502
|
+
let i = s + 1, a = !1, o = !1, l = !1, h = !1, c = s, u = "";
|
|
1503
|
+
e: for (; i < t.length; ) {
|
|
1504
|
+
const p = t.charAt(i);
|
|
1505
|
+
if ((p === "!" || p === "^") && i === s + 1) {
|
|
1506
|
+
h = !0, i++;
|
|
1507
|
+
continue;
|
|
1508
|
+
}
|
|
1509
|
+
if (p === "]" && a && !l) {
|
|
1510
|
+
c = i + 1;
|
|
1511
|
+
break;
|
|
1512
|
+
}
|
|
1513
|
+
if (a = !0, p === "\\" && !l) {
|
|
1514
|
+
l = !0, i++;
|
|
1515
|
+
continue;
|
|
1516
|
+
}
|
|
1517
|
+
if (p === "[" && !l) {
|
|
1518
|
+
for (const [y, [E, $, w]] of Object.entries(vn))
|
|
1519
|
+
if (t.startsWith(y, i)) {
|
|
1520
|
+
if (u)
|
|
1521
|
+
return ["$.", !1, t.length - s, !0];
|
|
1522
|
+
i += y.length, w ? n.push(E) : r.push(E), o = o || $;
|
|
1523
|
+
continue e;
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
if (l = !1, u) {
|
|
1527
|
+
p > u ? r.push(je(u) + "-" + je(p)) : p === u && r.push(je(p)), u = "", i++;
|
|
1528
|
+
continue;
|
|
1529
|
+
}
|
|
1530
|
+
if (t.startsWith("-]", i + 1)) {
|
|
1531
|
+
r.push(je(p + "-")), i += 2;
|
|
1532
|
+
continue;
|
|
1533
|
+
}
|
|
1534
|
+
if (t.startsWith("-", i + 1)) {
|
|
1535
|
+
u = p, i += 2;
|
|
1536
|
+
continue;
|
|
1537
|
+
}
|
|
1538
|
+
r.push(je(p)), i++;
|
|
1539
|
+
}
|
|
1540
|
+
if (c < i)
|
|
1541
|
+
return ["", !1, 0, !1];
|
|
1542
|
+
if (!r.length && !n.length)
|
|
1543
|
+
return ["$.", !1, t.length - s, !0];
|
|
1544
|
+
if (n.length === 0 && r.length === 1 && /^\\?.$/.test(r[0]) && !h) {
|
|
1545
|
+
const p = r[0].length === 2 ? r[0].slice(-1) : r[0];
|
|
1546
|
+
return [_n(p), !1, c - s, !1];
|
|
1547
|
+
}
|
|
1548
|
+
const d = "[" + (h ? "^" : "") + Dt(r) + "]", g = "[" + (h ? "" : "^") + Dt(n) + "]";
|
|
1549
|
+
return [r.length && n.length ? "(" + d + "|" + g + ")" : r.length ? d : g, o, c - s, !0];
|
|
1550
|
+
}, ze = (t, { windowsPathsNoEscape: e = !1 } = {}) => e ? t.replace(/\[([^\/\\])\]/g, "$1") : t.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1"), yn = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), It = (t) => yn.has(t), En = "(?!(?:^|/)\\.\\.?(?:$|/))", Je = "(?!\\.)", wn = /* @__PURE__ */ new Set(["[", "."]), bn = /* @__PURE__ */ new Set(["..", "."]), Sn = new Set("().*{}+?[]^$\\!"), xn = (t) => t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), Tt = "[^/]", vs = Tt + "*?", _s = Tt + "+?", P, z, ae, T, C, ge, Se, ve, te, Ee, st, De, ms, Te, Ke, _t, ys, ne = class he {
|
|
1551
|
+
constructor(e, s, r = {}) {
|
|
1552
|
+
q(this, De), cn(this, "type"), q(this, P), q(this, z), q(this, ae, !1), q(this, T, []), q(this, C), q(this, ge), q(this, Se), q(this, ve, !1), q(this, te), q(this, Ee), q(this, st, !1), this.type = e, e && N(this, z, !0), N(this, C, s), N(this, P, _(this, C) ? _(_(this, C), P) : this), N(this, te, _(this, P) === this ? r : _(_(this, P), te)), N(this, Se, _(this, P) === this ? [] : _(_(this, P), Se)), e === "!" && !_(_(this, P), ve) && _(this, Se).push(this), N(this, ge, _(this, C) ? _(_(this, C), T).length : 0);
|
|
1553
|
+
}
|
|
1554
|
+
get hasMagic() {
|
|
1555
|
+
if (_(this, z) !== void 0)
|
|
1556
|
+
return _(this, z);
|
|
1557
|
+
for (const e of _(this, T))
|
|
1558
|
+
if (typeof e != "string" && (e.type || e.hasMagic))
|
|
1559
|
+
return N(this, z, !0);
|
|
1560
|
+
return _(this, z);
|
|
1561
|
+
}
|
|
1562
|
+
// reconstructs the pattern
|
|
1563
|
+
toString() {
|
|
1564
|
+
return _(this, Ee) !== void 0 ? _(this, Ee) : this.type ? N(this, Ee, this.type + "(" + _(this, T).map((e) => String(e)).join("|") + ")") : N(this, Ee, _(this, T).map((e) => String(e)).join(""));
|
|
1565
|
+
}
|
|
1566
|
+
push(...e) {
|
|
1567
|
+
for (const s of e)
|
|
1568
|
+
if (s !== "") {
|
|
1569
|
+
if (typeof s != "string" && !(s instanceof he && _(s, C) === this))
|
|
1570
|
+
throw new Error("invalid part: " + s);
|
|
1571
|
+
_(this, T).push(s);
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
toJSON() {
|
|
1575
|
+
var e;
|
|
1576
|
+
const s = this.type === null ? _(this, T).slice().map((r) => typeof r == "string" ? r : r.toJSON()) : [this.type, ..._(this, T).map((r) => r.toJSON())];
|
|
1577
|
+
return this.isStart() && !this.type && s.unshift([]), this.isEnd() && (this === _(this, P) || _(_(this, P), ve) && ((e = _(this, C)) == null ? void 0 : e.type) === "!") && s.push({}), s;
|
|
1578
|
+
}
|
|
1579
|
+
isStart() {
|
|
1580
|
+
var e;
|
|
1581
|
+
if (_(this, P) === this)
|
|
1582
|
+
return !0;
|
|
1583
|
+
if (!((e = _(this, C)) != null && e.isStart()))
|
|
1584
|
+
return !1;
|
|
1585
|
+
if (_(this, ge) === 0)
|
|
1586
|
+
return !0;
|
|
1587
|
+
const s = _(this, C);
|
|
1588
|
+
for (let r = 0; r < _(this, ge); r++) {
|
|
1589
|
+
const n = _(s, T)[r];
|
|
1590
|
+
if (!(n instanceof he && n.type === "!"))
|
|
1591
|
+
return !1;
|
|
1592
|
+
}
|
|
1593
|
+
return !0;
|
|
1594
|
+
}
|
|
1595
|
+
isEnd() {
|
|
1596
|
+
var e, s, r;
|
|
1597
|
+
if (_(this, P) === this || ((e = _(this, C)) == null ? void 0 : e.type) === "!")
|
|
1598
|
+
return !0;
|
|
1599
|
+
if (!((s = _(this, C)) != null && s.isEnd()))
|
|
1600
|
+
return !1;
|
|
1601
|
+
if (!this.type)
|
|
1602
|
+
return (r = _(this, C)) == null ? void 0 : r.isEnd();
|
|
1603
|
+
const n = _(this, C) ? _(_(this, C), T).length : 0;
|
|
1604
|
+
return _(this, ge) === n - 1;
|
|
1605
|
+
}
|
|
1606
|
+
copyIn(e) {
|
|
1607
|
+
typeof e == "string" ? this.push(e) : this.push(e.clone(this));
|
|
1608
|
+
}
|
|
1609
|
+
clone(e) {
|
|
1610
|
+
const s = new he(this.type, e);
|
|
1611
|
+
for (const r of _(this, T))
|
|
1612
|
+
s.copyIn(r);
|
|
1613
|
+
return s;
|
|
1614
|
+
}
|
|
1615
|
+
static fromGlob(e, s = {}) {
|
|
1616
|
+
var r;
|
|
1617
|
+
const n = new he(null, void 0, s);
|
|
1618
|
+
return pe(r = he, Te, Ke).call(r, e, n, 0, s), n;
|
|
1619
|
+
}
|
|
1620
|
+
// returns the regular expression if there's magic, or the unescaped
|
|
1621
|
+
// string if not.
|
|
1622
|
+
toMMPattern() {
|
|
1623
|
+
if (this !== _(this, P))
|
|
1624
|
+
return _(this, P).toMMPattern();
|
|
1625
|
+
const e = this.toString(), [s, r, n, i] = this.toRegExpSource();
|
|
1626
|
+
if (!(n || _(this, z) || _(this, te).nocase && !_(this, te).nocaseMagicOnly && e.toUpperCase() !== e.toLowerCase()))
|
|
1627
|
+
return r;
|
|
1628
|
+
const o = (_(this, te).nocase ? "i" : "") + (i ? "u" : "");
|
|
1629
|
+
return Object.assign(new RegExp(`^${s}$`, o), {
|
|
1630
|
+
_src: s,
|
|
1631
|
+
_glob: e
|
|
1632
|
+
});
|
|
1633
|
+
}
|
|
1634
|
+
get options() {
|
|
1635
|
+
return _(this, te);
|
|
1636
|
+
}
|
|
1637
|
+
// returns the string match, the regexp source, whether there's magic
|
|
1638
|
+
// in the regexp (so a regular expression is required) and whether or
|
|
1639
|
+
// not the uflag is needed for the regular expression (for posix classes)
|
|
1640
|
+
// TODO: instead of injecting the start/end at this point, just return
|
|
1641
|
+
// the BODY of the regexp, along with the start/end portions suitable
|
|
1642
|
+
// for binding the start/end in either a joined full-path makeRe context
|
|
1643
|
+
// (where we bind to (^|/), or a standalone matchPart context (where
|
|
1644
|
+
// we bind to ^, and not /). Otherwise slashes get duped!
|
|
1645
|
+
//
|
|
1646
|
+
// In part-matching mode, the start is:
|
|
1647
|
+
// - if not isStart: nothing
|
|
1648
|
+
// - if traversal possible, but not allowed: ^(?!\.\.?$)
|
|
1649
|
+
// - if dots allowed or not possible: ^
|
|
1650
|
+
// - if dots possible and not allowed: ^(?!\.)
|
|
1651
|
+
// end is:
|
|
1652
|
+
// - if not isEnd(): nothing
|
|
1653
|
+
// - else: $
|
|
1654
|
+
//
|
|
1655
|
+
// In full-path matching mode, we put the slash at the START of the
|
|
1656
|
+
// pattern, so start is:
|
|
1657
|
+
// - if first pattern: same as part-matching mode
|
|
1658
|
+
// - if not isStart(): nothing
|
|
1659
|
+
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
|
|
1660
|
+
// - if dots allowed or not possible: /
|
|
1661
|
+
// - if dots possible and not allowed: /(?!\.)
|
|
1662
|
+
// end is:
|
|
1663
|
+
// - if last pattern, same as part-matching mode
|
|
1664
|
+
// - else nothing
|
|
1665
|
+
//
|
|
1666
|
+
// Always put the (?:$|/) on negated tails, though, because that has to be
|
|
1667
|
+
// there to bind the end of the negated pattern portion, and it's easier to
|
|
1668
|
+
// just stick it in now rather than try to inject it later in the middle of
|
|
1669
|
+
// the pattern.
|
|
1670
|
+
//
|
|
1671
|
+
// We can just always return the same end, and leave it up to the caller
|
|
1672
|
+
// to know whether it's going to be used joined or in parts.
|
|
1673
|
+
// And, if the start is adjusted slightly, can do the same there:
|
|
1674
|
+
// - if not isStart: nothing
|
|
1675
|
+
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
|
|
1676
|
+
// - if dots allowed or not possible: (?:/|^)
|
|
1677
|
+
// - if dots possible and not allowed: (?:/|^)(?!\.)
|
|
1678
|
+
//
|
|
1679
|
+
// But it's better to have a simpler binding without a conditional, for
|
|
1680
|
+
// performance, so probably better to return both start options.
|
|
1681
|
+
//
|
|
1682
|
+
// Then the caller just ignores the end if it's not the first pattern,
|
|
1683
|
+
// and the start always gets applied.
|
|
1684
|
+
//
|
|
1685
|
+
// But that's always going to be $ if it's the ending pattern, or nothing,
|
|
1686
|
+
// so the caller can just attach $ at the end of the pattern when building.
|
|
1687
|
+
//
|
|
1688
|
+
// So the todo is:
|
|
1689
|
+
// - better detect what kind of start is needed
|
|
1690
|
+
// - return both flavors of starting pattern
|
|
1691
|
+
// - attach $ at the end of the pattern when creating the actual RegExp
|
|
1692
|
+
//
|
|
1693
|
+
// Ah, but wait, no, that all only applies to the root when the first pattern
|
|
1694
|
+
// is not an extglob. If the first pattern IS an extglob, then we need all
|
|
1695
|
+
// that dot prevention biz to live in the extglob portions, because eg
|
|
1696
|
+
// +(*|.x*) can match .xy but not .yx.
|
|
1697
|
+
//
|
|
1698
|
+
// So, return the two flavors if it's #root and the first child is not an
|
|
1699
|
+
// AST, otherwise leave it to the child AST to handle it, and there,
|
|
1700
|
+
// use the (?:^|/) style of start binding.
|
|
1701
|
+
//
|
|
1702
|
+
// Even simplified further:
|
|
1703
|
+
// - Since the start for a join is eg /(?!\.) and the start for a part
|
|
1704
|
+
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
1705
|
+
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
1706
|
+
toRegExpSource(e) {
|
|
1707
|
+
var s;
|
|
1708
|
+
const r = e ?? !!_(this, te).dot;
|
|
1709
|
+
if (_(this, P) === this && pe(this, De, ms).call(this), !this.type) {
|
|
1710
|
+
const h = this.isStart() && this.isEnd(), c = _(this, T).map((f) => {
|
|
1711
|
+
var p;
|
|
1712
|
+
const [y, E, $, w] = typeof f == "string" ? pe(p = he, Te, ys).call(p, f, _(this, z), h) : f.toRegExpSource(e);
|
|
1713
|
+
return N(this, z, _(this, z) || $), N(this, ae, _(this, ae) || w), y;
|
|
1714
|
+
}).join("");
|
|
1715
|
+
let u = "";
|
|
1716
|
+
if (this.isStart() && typeof _(this, T)[0] == "string" && !(_(this, T).length === 1 && bn.has(_(this, T)[0]))) {
|
|
1717
|
+
const p = wn, y = (
|
|
1718
|
+
// dots are allowed, and the pattern starts with [ or .
|
|
1719
|
+
r && p.has(c.charAt(0)) || // the pattern starts with \., and then [ or .
|
|
1720
|
+
c.startsWith("\\.") && p.has(c.charAt(2)) || // the pattern starts with \.\., and then [ or .
|
|
1721
|
+
c.startsWith("\\.\\.") && p.has(c.charAt(4))
|
|
1722
|
+
), E = !r && !e && p.has(c.charAt(0));
|
|
1723
|
+
u = y ? En : E ? Je : "";
|
|
1724
|
+
}
|
|
1725
|
+
let d = "";
|
|
1726
|
+
return this.isEnd() && _(_(this, P), ve) && ((s = _(this, C)) == null ? void 0 : s.type) === "!" && (d = "(?:$|\\/)"), [
|
|
1727
|
+
u + c + d,
|
|
1728
|
+
ze(c),
|
|
1729
|
+
N(this, z, !!_(this, z)),
|
|
1730
|
+
_(this, ae)
|
|
1731
|
+
];
|
|
1732
|
+
}
|
|
1733
|
+
const n = this.type === "*" || this.type === "+", i = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
1734
|
+
let a = pe(this, De, _t).call(this, r);
|
|
1735
|
+
if (this.isStart() && this.isEnd() && !a && this.type !== "!") {
|
|
1736
|
+
const h = this.toString();
|
|
1737
|
+
return N(this, T, [h]), this.type = null, N(this, z, void 0), [h, ze(this.toString()), !1, !1];
|
|
1738
|
+
}
|
|
1739
|
+
let o = !n || e || r || !Je ? "" : pe(this, De, _t).call(this, !0);
|
|
1740
|
+
o === a && (o = ""), o && (a = `(?:${a})(?:${o})*?`);
|
|
1741
|
+
let l = "";
|
|
1742
|
+
if (this.type === "!" && _(this, st))
|
|
1743
|
+
l = (this.isStart() && !r ? Je : "") + _s;
|
|
1744
|
+
else {
|
|
1745
|
+
const h = this.type === "!" ? (
|
|
1746
|
+
// !() must match something,but !(x) can match ''
|
|
1747
|
+
"))" + (this.isStart() && !r && !e ? Je : "") + vs + ")"
|
|
1748
|
+
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && o ? ")" : this.type === "*" && o ? ")?" : `)${this.type}`;
|
|
1749
|
+
l = i + a + h;
|
|
1750
|
+
}
|
|
1751
|
+
return [
|
|
1752
|
+
l,
|
|
1753
|
+
ze(a),
|
|
1754
|
+
N(this, z, !!_(this, z)),
|
|
1755
|
+
_(this, ae)
|
|
1756
|
+
];
|
|
1757
|
+
}
|
|
1758
|
+
};
|
|
1759
|
+
P = /* @__PURE__ */ new WeakMap();
|
|
1760
|
+
z = /* @__PURE__ */ new WeakMap();
|
|
1761
|
+
ae = /* @__PURE__ */ new WeakMap();
|
|
1762
|
+
T = /* @__PURE__ */ new WeakMap();
|
|
1763
|
+
C = /* @__PURE__ */ new WeakMap();
|
|
1764
|
+
ge = /* @__PURE__ */ new WeakMap();
|
|
1765
|
+
Se = /* @__PURE__ */ new WeakMap();
|
|
1766
|
+
ve = /* @__PURE__ */ new WeakMap();
|
|
1767
|
+
te = /* @__PURE__ */ new WeakMap();
|
|
1768
|
+
Ee = /* @__PURE__ */ new WeakMap();
|
|
1769
|
+
st = /* @__PURE__ */ new WeakMap();
|
|
1770
|
+
De = /* @__PURE__ */ new WeakSet();
|
|
1771
|
+
ms = function() {
|
|
1772
|
+
if (this !== _(this, P))
|
|
1773
|
+
throw new Error("should only call on root");
|
|
1774
|
+
if (_(this, ve))
|
|
1775
|
+
return this;
|
|
1776
|
+
this.toString(), N(this, ve, !0);
|
|
1777
|
+
let t;
|
|
1778
|
+
for (; t = _(this, Se).pop(); ) {
|
|
1779
|
+
if (t.type !== "!")
|
|
1780
|
+
continue;
|
|
1781
|
+
let e = t, s = _(e, C);
|
|
1782
|
+
for (; s; ) {
|
|
1783
|
+
for (let r = _(e, ge) + 1; !s.type && r < _(s, T).length; r++)
|
|
1784
|
+
for (const n of _(t, T)) {
|
|
1785
|
+
if (typeof n == "string")
|
|
1786
|
+
throw new Error("string part in extglob AST??");
|
|
1787
|
+
n.copyIn(_(s, T)[r]);
|
|
1788
|
+
}
|
|
1789
|
+
e = s, s = _(e, C);
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
return this;
|
|
1793
|
+
};
|
|
1794
|
+
Te = /* @__PURE__ */ new WeakSet();
|
|
1795
|
+
Ke = function(t, e, s, r) {
|
|
1796
|
+
var n, i;
|
|
1797
|
+
let a = !1, o = !1, l = -1, h = !1;
|
|
1798
|
+
if (e.type === null) {
|
|
1799
|
+
let f = s, p = "";
|
|
1800
|
+
for (; f < t.length; ) {
|
|
1801
|
+
const y = t.charAt(f++);
|
|
1802
|
+
if (a || y === "\\") {
|
|
1803
|
+
a = !a, p += y;
|
|
1804
|
+
continue;
|
|
1805
|
+
}
|
|
1806
|
+
if (o) {
|
|
1807
|
+
f === l + 1 ? (y === "^" || y === "!") && (h = !0) : y === "]" && !(f === l + 2 && h) && (o = !1), p += y;
|
|
1808
|
+
continue;
|
|
1809
|
+
} else if (y === "[") {
|
|
1810
|
+
o = !0, l = f, h = !1, p += y;
|
|
1811
|
+
continue;
|
|
1812
|
+
}
|
|
1813
|
+
if (!r.noext && It(y) && t.charAt(f) === "(") {
|
|
1814
|
+
e.push(p), p = "";
|
|
1815
|
+
const E = new ne(y, e);
|
|
1816
|
+
f = pe(n = ne, Te, Ke).call(n, t, E, f, r), e.push(E);
|
|
1817
|
+
continue;
|
|
1818
|
+
}
|
|
1819
|
+
p += y;
|
|
1820
|
+
}
|
|
1821
|
+
return e.push(p), f;
|
|
1822
|
+
}
|
|
1823
|
+
let c = s + 1, u = new ne(null, e);
|
|
1824
|
+
const d = [];
|
|
1825
|
+
let g = "";
|
|
1826
|
+
for (; c < t.length; ) {
|
|
1827
|
+
const f = t.charAt(c++);
|
|
1828
|
+
if (a || f === "\\") {
|
|
1829
|
+
a = !a, g += f;
|
|
1830
|
+
continue;
|
|
1831
|
+
}
|
|
1832
|
+
if (o) {
|
|
1833
|
+
c === l + 1 ? (f === "^" || f === "!") && (h = !0) : f === "]" && !(c === l + 2 && h) && (o = !1), g += f;
|
|
1834
|
+
continue;
|
|
1835
|
+
} else if (f === "[") {
|
|
1836
|
+
o = !0, l = c, h = !1, g += f;
|
|
1837
|
+
continue;
|
|
1838
|
+
}
|
|
1839
|
+
if (It(f) && t.charAt(c) === "(") {
|
|
1840
|
+
u.push(g), g = "";
|
|
1841
|
+
const p = new ne(f, u);
|
|
1842
|
+
u.push(p), c = pe(i = ne, Te, Ke).call(i, t, p, c, r);
|
|
1843
|
+
continue;
|
|
1844
|
+
}
|
|
1845
|
+
if (f === "|") {
|
|
1846
|
+
u.push(g), g = "", d.push(u), u = new ne(null, e);
|
|
1847
|
+
continue;
|
|
1848
|
+
}
|
|
1849
|
+
if (f === ")")
|
|
1850
|
+
return g === "" && _(e, T).length === 0 && N(e, st, !0), u.push(g), g = "", e.push(...d, u), c;
|
|
1851
|
+
g += f;
|
|
1852
|
+
}
|
|
1853
|
+
return e.type = null, N(e, z, void 0), N(e, T, [t.substring(s - 1)]), c;
|
|
1854
|
+
};
|
|
1855
|
+
_t = function(t) {
|
|
1856
|
+
return _(this, T).map((e) => {
|
|
1857
|
+
if (typeof e == "string")
|
|
1858
|
+
throw new Error("string type in extglob ast??");
|
|
1859
|
+
const [s, r, n, i] = e.toRegExpSource(t);
|
|
1860
|
+
return N(this, ae, _(this, ae) || i), s;
|
|
1861
|
+
}).filter((e) => !(this.isStart() && this.isEnd()) || !!e).join("|");
|
|
1862
|
+
};
|
|
1863
|
+
ys = function(t, e, s = !1) {
|
|
1864
|
+
let r = !1, n = "", i = !1;
|
|
1865
|
+
for (let a = 0; a < t.length; a++) {
|
|
1866
|
+
const o = t.charAt(a);
|
|
1867
|
+
if (r) {
|
|
1868
|
+
r = !1, n += (Sn.has(o) ? "\\" : "") + o;
|
|
1869
|
+
continue;
|
|
1870
|
+
}
|
|
1871
|
+
if (o === "\\") {
|
|
1872
|
+
a === t.length - 1 ? n += "\\\\" : r = !0;
|
|
1873
|
+
continue;
|
|
1874
|
+
}
|
|
1875
|
+
if (o === "[") {
|
|
1876
|
+
const [l, h, c, u] = mn(t, a);
|
|
1877
|
+
if (c) {
|
|
1878
|
+
n += l, i = i || h, a += c - 1, e = e || u;
|
|
1879
|
+
continue;
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
if (o === "*") {
|
|
1883
|
+
s && t === "*" ? n += _s : n += vs, e = !0;
|
|
1884
|
+
continue;
|
|
1885
|
+
}
|
|
1886
|
+
if (o === "?") {
|
|
1887
|
+
n += Tt, e = !0;
|
|
1888
|
+
continue;
|
|
1889
|
+
}
|
|
1890
|
+
n += xn(o);
|
|
1891
|
+
}
|
|
1892
|
+
return [n, ze(t), !!e, i];
|
|
1893
|
+
};
|
|
1894
|
+
q(ne, Te);
|
|
1895
|
+
var Es = ne, On = (t, { windowsPathsNoEscape: e = !1 } = {}) => e ? t.replace(/[?*()[\]]/g, "[$&]") : t.replace(/[?*()[\]\\]/g, "\\$&"), F = (t, e, s = {}) => (tt(e), !s.nocomment && e.charAt(0) === "#" ? !1 : new ht(e, s).match(t)), Tn = /^\*+([^+@!?\*\[\(]*)$/, An = (t) => (e) => !e.startsWith(".") && e.endsWith(t), Rn = (t) => (e) => e.endsWith(t), Nn = (t) => (t = t.toLowerCase(), (e) => !e.startsWith(".") && e.toLowerCase().endsWith(t)), Ln = (t) => (t = t.toLowerCase(), (e) => e.toLowerCase().endsWith(t)), Mn = /^\*+\.\*+$/, kn = (t) => !t.startsWith(".") && t.includes("."), Cn = (t) => t !== "." && t !== ".." && t.includes("."), jn = /^\.\*+$/, Pn = (t) => t !== "." && t !== ".." && t.startsWith("."), Dn = /^\*+$/, In = (t) => t.length !== 0 && !t.startsWith("."), Wn = (t) => t.length !== 0 && t !== "." && t !== "..", zn = /^\?+([^+@!?\*\[\(]*)?$/, Gn = ([t, e = ""]) => {
|
|
1896
|
+
const s = ws([t]);
|
|
1897
|
+
return e ? (e = e.toLowerCase(), (r) => s(r) && r.toLowerCase().endsWith(e)) : s;
|
|
1898
|
+
}, Hn = ([t, e = ""]) => {
|
|
1899
|
+
const s = bs([t]);
|
|
1900
|
+
return e ? (e = e.toLowerCase(), (r) => s(r) && r.toLowerCase().endsWith(e)) : s;
|
|
1901
|
+
}, Fn = ([t, e = ""]) => {
|
|
1902
|
+
const s = bs([t]);
|
|
1903
|
+
return e ? (r) => s(r) && r.endsWith(e) : s;
|
|
1904
|
+
}, Bn = ([t, e = ""]) => {
|
|
1905
|
+
const s = ws([t]);
|
|
1906
|
+
return e ? (r) => s(r) && r.endsWith(e) : s;
|
|
1907
|
+
}, ws = ([t]) => {
|
|
1908
|
+
const e = t.length;
|
|
1909
|
+
return (s) => s.length === e && !s.startsWith(".");
|
|
1910
|
+
}, bs = ([t]) => {
|
|
1911
|
+
const e = t.length;
|
|
1912
|
+
return (s) => s.length === e && s !== "." && s !== "..";
|
|
1913
|
+
}, Ss = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix", Wt = {
|
|
1914
|
+
win32: { sep: "\\" },
|
|
1915
|
+
posix: { sep: "/" }
|
|
1916
|
+
}, Un = Ss === "win32" ? Wt.win32.sep : Wt.posix.sep;
|
|
1917
|
+
F.sep = Un;
|
|
1918
|
+
var K = /* @__PURE__ */ Symbol("globstar **");
|
|
1919
|
+
F.GLOBSTAR = K;
|
|
1920
|
+
var Zn = "[^/]", qn = Zn + "*?", Jn = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", Xn = "(?:(?!(?:\\/|^)\\.).)*?", Yn = (t, e = {}) => (s) => F(s, t, e);
|
|
1921
|
+
F.filter = Yn;
|
|
1922
|
+
var X = (t, e = {}) => Object.assign({}, t, e), Kn = (t) => {
|
|
1923
|
+
if (!t || typeof t != "object" || !Object.keys(t).length)
|
|
1924
|
+
return F;
|
|
1925
|
+
const e = F;
|
|
1926
|
+
return Object.assign((r, n, i = {}) => e(r, n, X(t, i)), {
|
|
1927
|
+
Minimatch: class extends e.Minimatch {
|
|
1928
|
+
constructor(n, i = {}) {
|
|
1929
|
+
super(n, X(t, i));
|
|
1930
|
+
}
|
|
1931
|
+
static defaults(n) {
|
|
1932
|
+
return e.defaults(X(t, n)).Minimatch;
|
|
1933
|
+
}
|
|
1934
|
+
},
|
|
1935
|
+
AST: class extends e.AST {
|
|
1936
|
+
/* c8 ignore start */
|
|
1937
|
+
constructor(n, i, a = {}) {
|
|
1938
|
+
super(n, i, X(t, a));
|
|
1939
|
+
}
|
|
1940
|
+
/* c8 ignore stop */
|
|
1941
|
+
static fromGlob(n, i = {}) {
|
|
1942
|
+
return e.AST.fromGlob(n, X(t, i));
|
|
1943
|
+
}
|
|
1944
|
+
},
|
|
1945
|
+
unescape: (r, n = {}) => e.unescape(r, X(t, n)),
|
|
1946
|
+
escape: (r, n = {}) => e.escape(r, X(t, n)),
|
|
1947
|
+
filter: (r, n = {}) => e.filter(r, X(t, n)),
|
|
1948
|
+
defaults: (r) => e.defaults(X(t, r)),
|
|
1949
|
+
makeRe: (r, n = {}) => e.makeRe(r, X(t, n)),
|
|
1950
|
+
braceExpand: (r, n = {}) => e.braceExpand(r, X(t, n)),
|
|
1951
|
+
match: (r, n, i = {}) => e.match(r, n, X(t, i)),
|
|
1952
|
+
sep: e.sep,
|
|
1953
|
+
GLOBSTAR: K
|
|
1954
|
+
});
|
|
1955
|
+
};
|
|
1956
|
+
F.defaults = Kn;
|
|
1957
|
+
var xs = (t, e = {}) => (tt(t), e.nobrace || !/\{(?:(?!\{).)*\}/.test(t) ? [t] : (0, dn.default)(t));
|
|
1958
|
+
F.braceExpand = xs;
|
|
1959
|
+
var Qn = (t, e = {}) => new ht(t, e).makeRe();
|
|
1960
|
+
F.makeRe = Qn;
|
|
1961
|
+
var Vn = (t, e, s = {}) => {
|
|
1962
|
+
const r = new ht(e, s);
|
|
1963
|
+
return t = t.filter((n) => r.match(n)), r.options.nonull && !t.length && t.push(e), t;
|
|
1964
|
+
};
|
|
1965
|
+
F.match = Vn;
|
|
1966
|
+
var zt = /[?*]|[+@!]\(.*?\)|\[|\]/, ei = (t) => t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), ht = class {
|
|
1967
|
+
options;
|
|
1968
|
+
set;
|
|
1969
|
+
pattern;
|
|
1970
|
+
windowsPathsNoEscape;
|
|
1971
|
+
nonegate;
|
|
1972
|
+
negate;
|
|
1973
|
+
comment;
|
|
1974
|
+
empty;
|
|
1975
|
+
preserveMultipleSlashes;
|
|
1976
|
+
partial;
|
|
1977
|
+
globSet;
|
|
1978
|
+
globParts;
|
|
1979
|
+
nocase;
|
|
1980
|
+
isWindows;
|
|
1981
|
+
platform;
|
|
1982
|
+
windowsNoMagicRoot;
|
|
1983
|
+
regexp;
|
|
1984
|
+
constructor(t, e = {}) {
|
|
1985
|
+
tt(t), e = e || {}, this.options = e, this.pattern = t, this.platform = e.platform || Ss, this.isWindows = this.platform === "win32", this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || e.allowWindowsEscape === !1, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, "/")), this.preserveMultipleSlashes = !!e.preserveMultipleSlashes, this.regexp = null, this.negate = !1, this.nonegate = !!e.nonegate, this.comment = !1, this.empty = !1, this.partial = !!e.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = e.windowsNoMagicRoot !== void 0 ? e.windowsNoMagicRoot : !!(this.isWindows && this.nocase), this.globSet = [], this.globParts = [], this.set = [], this.make();
|
|
1986
|
+
}
|
|
1987
|
+
hasMagic() {
|
|
1988
|
+
if (this.options.magicalBraces && this.set.length > 1)
|
|
1989
|
+
return !0;
|
|
1990
|
+
for (const t of this.set)
|
|
1991
|
+
for (const e of t)
|
|
1992
|
+
if (typeof e != "string")
|
|
1993
|
+
return !0;
|
|
1994
|
+
return !1;
|
|
1995
|
+
}
|
|
1996
|
+
debug(...t) {
|
|
1997
|
+
}
|
|
1998
|
+
make() {
|
|
1999
|
+
const t = this.pattern, e = this.options;
|
|
2000
|
+
if (!e.nocomment && t.charAt(0) === "#") {
|
|
2001
|
+
this.comment = !0;
|
|
2002
|
+
return;
|
|
2003
|
+
}
|
|
2004
|
+
if (!t) {
|
|
2005
|
+
this.empty = !0;
|
|
2006
|
+
return;
|
|
2007
|
+
}
|
|
2008
|
+
this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], e.debug && (this.debug = (...n) => console.error(...n)), this.debug(this.pattern, this.globSet);
|
|
2009
|
+
const s = this.globSet.map((n) => this.slashSplit(n));
|
|
2010
|
+
this.globParts = this.preprocess(s), this.debug(this.pattern, this.globParts);
|
|
2011
|
+
let r = this.globParts.map((n, i, a) => {
|
|
2012
|
+
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
2013
|
+
const o = n[0] === "" && n[1] === "" && (n[2] === "?" || !zt.test(n[2])) && !zt.test(n[3]), l = /^[a-z]:/i.test(n[0]);
|
|
2014
|
+
if (o)
|
|
2015
|
+
return [...n.slice(0, 4), ...n.slice(4).map((h) => this.parse(h))];
|
|
2016
|
+
if (l)
|
|
2017
|
+
return [n[0], ...n.slice(1).map((h) => this.parse(h))];
|
|
2018
|
+
}
|
|
2019
|
+
return n.map((o) => this.parse(o));
|
|
2020
|
+
});
|
|
2021
|
+
if (this.debug(this.pattern, r), this.set = r.filter((n) => n.indexOf(!1) === -1), this.isWindows)
|
|
2022
|
+
for (let n = 0; n < this.set.length; n++) {
|
|
2023
|
+
const i = this.set[n];
|
|
2024
|
+
i[0] === "" && i[1] === "" && this.globParts[n][2] === "?" && typeof i[3] == "string" && /^[a-z]:$/i.test(i[3]) && (i[2] = "?");
|
|
2025
|
+
}
|
|
2026
|
+
this.debug(this.pattern, this.set);
|
|
2027
|
+
}
|
|
2028
|
+
// various transforms to equivalent pattern sets that are
|
|
2029
|
+
// faster to process in a filesystem walk. The goal is to
|
|
2030
|
+
// eliminate what we can, and push all ** patterns as far
|
|
2031
|
+
// to the right as possible, even if it increases the number
|
|
2032
|
+
// of patterns that we have to process.
|
|
2033
|
+
preprocess(t) {
|
|
2034
|
+
if (this.options.noglobstar)
|
|
2035
|
+
for (let s = 0; s < t.length; s++)
|
|
2036
|
+
for (let r = 0; r < t[s].length; r++)
|
|
2037
|
+
t[s][r] === "**" && (t[s][r] = "*");
|
|
2038
|
+
const { optimizationLevel: e = 1 } = this.options;
|
|
2039
|
+
return e >= 2 ? (t = this.firstPhasePreProcess(t), t = this.secondPhasePreProcess(t)) : e >= 1 ? t = this.levelOneOptimize(t) : t = this.adjascentGlobstarOptimize(t), t;
|
|
2040
|
+
}
|
|
2041
|
+
// just get rid of adjascent ** portions
|
|
2042
|
+
adjascentGlobstarOptimize(t) {
|
|
2043
|
+
return t.map((e) => {
|
|
2044
|
+
let s = -1;
|
|
2045
|
+
for (; (s = e.indexOf("**", s + 1)) !== -1; ) {
|
|
2046
|
+
let r = s;
|
|
2047
|
+
for (; e[r + 1] === "**"; )
|
|
2048
|
+
r++;
|
|
2049
|
+
r !== s && e.splice(s, r - s);
|
|
2050
|
+
}
|
|
2051
|
+
return e;
|
|
2052
|
+
});
|
|
2053
|
+
}
|
|
2054
|
+
// get rid of adjascent ** and resolve .. portions
|
|
2055
|
+
levelOneOptimize(t) {
|
|
2056
|
+
return t.map((e) => (e = e.reduce((s, r) => {
|
|
2057
|
+
const n = s[s.length - 1];
|
|
2058
|
+
return r === "**" && n === "**" ? s : r === ".." && n && n !== ".." && n !== "." && n !== "**" ? (s.pop(), s) : (s.push(r), s);
|
|
2059
|
+
}, []), e.length === 0 ? [""] : e));
|
|
2060
|
+
}
|
|
2061
|
+
levelTwoFileOptimize(t) {
|
|
2062
|
+
Array.isArray(t) || (t = this.slashSplit(t));
|
|
2063
|
+
let e = !1;
|
|
2064
|
+
do {
|
|
2065
|
+
if (e = !1, !this.preserveMultipleSlashes) {
|
|
2066
|
+
for (let r = 1; r < t.length - 1; r++) {
|
|
2067
|
+
const n = t[r];
|
|
2068
|
+
r === 1 && n === "" && t[0] === "" || (n === "." || n === "") && (e = !0, t.splice(r, 1), r--);
|
|
2069
|
+
}
|
|
2070
|
+
t[0] === "." && t.length === 2 && (t[1] === "." || t[1] === "") && (e = !0, t.pop());
|
|
2071
|
+
}
|
|
2072
|
+
let s = 0;
|
|
2073
|
+
for (; (s = t.indexOf("..", s + 1)) !== -1; ) {
|
|
2074
|
+
const r = t[s - 1];
|
|
2075
|
+
r && r !== "." && r !== ".." && r !== "**" && (e = !0, t.splice(s - 1, 2), s -= 2);
|
|
2076
|
+
}
|
|
2077
|
+
} while (e);
|
|
2078
|
+
return t.length === 0 ? [""] : t;
|
|
2079
|
+
}
|
|
2080
|
+
// First phase: single-pattern processing
|
|
2081
|
+
// <pre> is 1 or more portions
|
|
2082
|
+
// <rest> is 1 or more portions
|
|
2083
|
+
// <p> is any portion other than ., .., '', or **
|
|
2084
|
+
// <e> is . or ''
|
|
2085
|
+
//
|
|
2086
|
+
// **/.. is *brutal* for filesystem walking performance, because
|
|
2087
|
+
// it effectively resets the recursive walk each time it occurs,
|
|
2088
|
+
// and ** cannot be reduced out by a .. pattern part like a regexp
|
|
2089
|
+
// or most strings (other than .., ., and '') can be.
|
|
2090
|
+
//
|
|
2091
|
+
// <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
|
|
2092
|
+
// <pre>/<e>/<rest> -> <pre>/<rest>
|
|
2093
|
+
// <pre>/<p>/../<rest> -> <pre>/<rest>
|
|
2094
|
+
// **/**/<rest> -> **/<rest>
|
|
2095
|
+
//
|
|
2096
|
+
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
|
|
2097
|
+
// this WOULD be allowed if ** did follow symlinks, or * didn't
|
|
2098
|
+
firstPhasePreProcess(t) {
|
|
2099
|
+
let e = !1;
|
|
2100
|
+
do {
|
|
2101
|
+
e = !1;
|
|
2102
|
+
for (let s of t) {
|
|
2103
|
+
let r = -1;
|
|
2104
|
+
for (; (r = s.indexOf("**", r + 1)) !== -1; ) {
|
|
2105
|
+
let i = r;
|
|
2106
|
+
for (; s[i + 1] === "**"; )
|
|
2107
|
+
i++;
|
|
2108
|
+
i > r && s.splice(r + 1, i - r);
|
|
2109
|
+
let a = s[r + 1];
|
|
2110
|
+
const o = s[r + 2], l = s[r + 3];
|
|
2111
|
+
if (a !== ".." || !o || o === "." || o === ".." || !l || l === "." || l === "..")
|
|
2112
|
+
continue;
|
|
2113
|
+
e = !0, s.splice(r, 1);
|
|
2114
|
+
const h = s.slice(0);
|
|
2115
|
+
h[r] = "**", t.push(h), r--;
|
|
2116
|
+
}
|
|
2117
|
+
if (!this.preserveMultipleSlashes) {
|
|
2118
|
+
for (let i = 1; i < s.length - 1; i++) {
|
|
2119
|
+
const a = s[i];
|
|
2120
|
+
i === 1 && a === "" && s[0] === "" || (a === "." || a === "") && (e = !0, s.splice(i, 1), i--);
|
|
2121
|
+
}
|
|
2122
|
+
s[0] === "." && s.length === 2 && (s[1] === "." || s[1] === "") && (e = !0, s.pop());
|
|
2123
|
+
}
|
|
2124
|
+
let n = 0;
|
|
2125
|
+
for (; (n = s.indexOf("..", n + 1)) !== -1; ) {
|
|
2126
|
+
const i = s[n - 1];
|
|
2127
|
+
if (i && i !== "." && i !== ".." && i !== "**") {
|
|
2128
|
+
e = !0;
|
|
2129
|
+
const o = n === 1 && s[n + 1] === "**" ? ["."] : [];
|
|
2130
|
+
s.splice(n - 1, 2, ...o), s.length === 0 && s.push(""), n -= 2;
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
} while (e);
|
|
2135
|
+
return t;
|
|
2136
|
+
}
|
|
2137
|
+
// second phase: multi-pattern dedupes
|
|
2138
|
+
// {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
|
|
2139
|
+
// {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
|
|
2140
|
+
// {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
|
|
2141
|
+
//
|
|
2142
|
+
// {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
|
|
2143
|
+
// ^-- not valid because ** doens't follow symlinks
|
|
2144
|
+
secondPhasePreProcess(t) {
|
|
2145
|
+
for (let e = 0; e < t.length - 1; e++)
|
|
2146
|
+
for (let s = e + 1; s < t.length; s++) {
|
|
2147
|
+
const r = this.partsMatch(t[e], t[s], !this.preserveMultipleSlashes);
|
|
2148
|
+
r && (t[e] = r, t[s] = []);
|
|
2149
|
+
}
|
|
2150
|
+
return t.filter((e) => e.length);
|
|
2151
|
+
}
|
|
2152
|
+
partsMatch(t, e, s = !1) {
|
|
2153
|
+
let r = 0, n = 0, i = [], a = "";
|
|
2154
|
+
for (; r < t.length && n < e.length; )
|
|
2155
|
+
if (t[r] === e[n])
|
|
2156
|
+
i.push(a === "b" ? e[n] : t[r]), r++, n++;
|
|
2157
|
+
else if (s && t[r] === "**" && e[n] === t[r + 1])
|
|
2158
|
+
i.push(t[r]), r++;
|
|
2159
|
+
else if (s && e[n] === "**" && t[r] === e[n + 1])
|
|
2160
|
+
i.push(e[n]), n++;
|
|
2161
|
+
else if (t[r] === "*" && e[n] && (this.options.dot || !e[n].startsWith(".")) && e[n] !== "**") {
|
|
2162
|
+
if (a === "b")
|
|
2163
|
+
return !1;
|
|
2164
|
+
a = "a", i.push(t[r]), r++, n++;
|
|
2165
|
+
} else if (e[n] === "*" && t[r] && (this.options.dot || !t[r].startsWith(".")) && t[r] !== "**") {
|
|
2166
|
+
if (a === "a")
|
|
2167
|
+
return !1;
|
|
2168
|
+
a = "b", i.push(e[n]), r++, n++;
|
|
2169
|
+
} else
|
|
2170
|
+
return !1;
|
|
2171
|
+
return t.length === e.length && i;
|
|
2172
|
+
}
|
|
2173
|
+
parseNegate() {
|
|
2174
|
+
if (this.nonegate)
|
|
2175
|
+
return;
|
|
2176
|
+
const t = this.pattern;
|
|
2177
|
+
let e = !1, s = 0;
|
|
2178
|
+
for (let r = 0; r < t.length && t.charAt(r) === "!"; r++)
|
|
2179
|
+
e = !e, s++;
|
|
2180
|
+
s && (this.pattern = t.slice(s)), this.negate = e;
|
|
2181
|
+
}
|
|
2182
|
+
// set partial to true to test if, for example,
|
|
2183
|
+
// "/a/b" matches the start of "/*/b/*/d"
|
|
2184
|
+
// Partial means, if you run out of file before you run
|
|
2185
|
+
// out of pattern, then that's fine, as long as all
|
|
2186
|
+
// the parts match.
|
|
2187
|
+
matchOne(t, e, s = !1) {
|
|
2188
|
+
const r = this.options;
|
|
2189
|
+
if (this.isWindows) {
|
|
2190
|
+
const f = typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]), p = !f && t[0] === "" && t[1] === "" && t[2] === "?" && /^[a-z]:$/i.test(t[3]), y = typeof e[0] == "string" && /^[a-z]:$/i.test(e[0]), E = !y && e[0] === "" && e[1] === "" && e[2] === "?" && typeof e[3] == "string" && /^[a-z]:$/i.test(e[3]), $ = p ? 3 : f ? 0 : void 0, w = E ? 3 : y ? 0 : void 0;
|
|
2191
|
+
if (typeof $ == "number" && typeof w == "number") {
|
|
2192
|
+
const [b, m] = [t[$], e[w]];
|
|
2193
|
+
b.toLowerCase() === m.toLowerCase() && (e[w] = b, w > $ ? e = e.slice(w) : $ > w && (t = t.slice($)));
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
const { optimizationLevel: n = 1 } = this.options;
|
|
2197
|
+
n >= 2 && (t = this.levelTwoFileOptimize(t)), this.debug("matchOne", this, { file: t, pattern: e }), this.debug("matchOne", t.length, e.length);
|
|
2198
|
+
for (var i = 0, a = 0, o = t.length, l = e.length; i < o && a < l; i++, a++) {
|
|
2199
|
+
this.debug("matchOne loop");
|
|
2200
|
+
var h = e[a], c = t[i];
|
|
2201
|
+
if (this.debug(e, h, c), h === !1)
|
|
2202
|
+
return !1;
|
|
2203
|
+
if (h === K) {
|
|
2204
|
+
this.debug("GLOBSTAR", [e, h, c]);
|
|
2205
|
+
var u = i, d = a + 1;
|
|
2206
|
+
if (d === l) {
|
|
2207
|
+
for (this.debug("** at the end"); i < o; i++)
|
|
2208
|
+
if (t[i] === "." || t[i] === ".." || !r.dot && t[i].charAt(0) === ".")
|
|
2209
|
+
return !1;
|
|
2210
|
+
return !0;
|
|
2211
|
+
}
|
|
2212
|
+
for (; u < o; ) {
|
|
2213
|
+
var g = t[u];
|
|
2214
|
+
if (this.debug(`
|
|
2215
|
+
globstar while`, t, u, e, d, g), this.matchOne(t.slice(u), e.slice(d), s))
|
|
2216
|
+
return this.debug("globstar found match!", u, o, g), !0;
|
|
2217
|
+
if (g === "." || g === ".." || !r.dot && g.charAt(0) === ".") {
|
|
2218
|
+
this.debug("dot detected!", t, u, e, d);
|
|
2219
|
+
break;
|
|
2220
|
+
}
|
|
2221
|
+
this.debug("globstar swallow a segment, and continue"), u++;
|
|
2222
|
+
}
|
|
2223
|
+
return !!(s && (this.debug(`
|
|
2224
|
+
>>> no match, partial?`, t, u, e, d), u === o));
|
|
2225
|
+
}
|
|
2226
|
+
let f;
|
|
2227
|
+
if (typeof h == "string" ? (f = c === h, this.debug("string match", h, c, f)) : (f = h.test(c), this.debug("pattern match", h, c, f)), !f)
|
|
2228
|
+
return !1;
|
|
2229
|
+
}
|
|
2230
|
+
if (i === o && a === l)
|
|
2231
|
+
return !0;
|
|
2232
|
+
if (i === o)
|
|
2233
|
+
return s;
|
|
2234
|
+
if (a === l)
|
|
2235
|
+
return i === o - 1 && t[i] === "";
|
|
2236
|
+
throw new Error("wtf?");
|
|
2237
|
+
}
|
|
2238
|
+
braceExpand() {
|
|
2239
|
+
return xs(this.pattern, this.options);
|
|
2240
|
+
}
|
|
2241
|
+
parse(t) {
|
|
2242
|
+
tt(t);
|
|
2243
|
+
const e = this.options;
|
|
2244
|
+
if (t === "**")
|
|
2245
|
+
return K;
|
|
2246
|
+
if (t === "")
|
|
2247
|
+
return "";
|
|
2248
|
+
let s, r = null;
|
|
2249
|
+
(s = t.match(Dn)) ? r = e.dot ? Wn : In : (s = t.match(Tn)) ? r = (e.nocase ? e.dot ? Ln : Nn : e.dot ? Rn : An)(s[1]) : (s = t.match(zn)) ? r = (e.nocase ? e.dot ? Hn : Gn : e.dot ? Fn : Bn)(s) : (s = t.match(Mn)) ? r = e.dot ? Cn : kn : (s = t.match(jn)) && (r = Pn);
|
|
2250
|
+
const n = Es.fromGlob(t, this.options).toMMPattern();
|
|
2251
|
+
return r && typeof n == "object" && Reflect.defineProperty(n, "test", { value: r }), n;
|
|
2252
|
+
}
|
|
2253
|
+
makeRe() {
|
|
2254
|
+
if (this.regexp || this.regexp === !1)
|
|
2255
|
+
return this.regexp;
|
|
2256
|
+
const t = this.set;
|
|
2257
|
+
if (!t.length)
|
|
2258
|
+
return this.regexp = !1, this.regexp;
|
|
2259
|
+
const e = this.options, s = e.noglobstar ? qn : e.dot ? Jn : Xn, r = new Set(e.nocase ? ["i"] : []);
|
|
2260
|
+
let n = t.map((o) => {
|
|
2261
|
+
const l = o.map((h) => {
|
|
2262
|
+
if (h instanceof RegExp)
|
|
2263
|
+
for (const c of h.flags.split(""))
|
|
2264
|
+
r.add(c);
|
|
2265
|
+
return typeof h == "string" ? ei(h) : h === K ? K : h._src;
|
|
2266
|
+
});
|
|
2267
|
+
return l.forEach((h, c) => {
|
|
2268
|
+
const u = l[c + 1], d = l[c - 1];
|
|
2269
|
+
h !== K || d === K || (d === void 0 ? u !== void 0 && u !== K ? l[c + 1] = "(?:\\/|" + s + "\\/)?" + u : l[c] = s : u === void 0 ? l[c - 1] = d + "(?:\\/|" + s + ")?" : u !== K && (l[c - 1] = d + "(?:\\/|\\/" + s + "\\/)" + u, l[c + 1] = K));
|
|
2270
|
+
}), l.filter((h) => h !== K).join("/");
|
|
2271
|
+
}).join("|");
|
|
2272
|
+
const [i, a] = t.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
2273
|
+
n = "^" + i + n + a + "$", this.negate && (n = "^(?!" + n + ").+$");
|
|
2274
|
+
try {
|
|
2275
|
+
this.regexp = new RegExp(n, [...r].join(""));
|
|
2276
|
+
} catch {
|
|
2277
|
+
this.regexp = !1;
|
|
2278
|
+
}
|
|
2279
|
+
return this.regexp;
|
|
2280
|
+
}
|
|
2281
|
+
slashSplit(t) {
|
|
2282
|
+
return this.preserveMultipleSlashes ? t.split("/") : this.isWindows && /^\/\/[^\/]+/.test(t) ? ["", ...t.split(/\/+/)] : t.split(/\/+/);
|
|
2283
|
+
}
|
|
2284
|
+
match(t, e = this.partial) {
|
|
2285
|
+
if (this.debug("match", t, this.pattern), this.comment)
|
|
2286
|
+
return !1;
|
|
2287
|
+
if (this.empty)
|
|
2288
|
+
return t === "";
|
|
2289
|
+
if (t === "/" && e)
|
|
2290
|
+
return !0;
|
|
2291
|
+
const s = this.options;
|
|
2292
|
+
this.isWindows && (t = t.split("\\").join("/"));
|
|
2293
|
+
const r = this.slashSplit(t);
|
|
2294
|
+
this.debug(this.pattern, "split", r);
|
|
2295
|
+
const n = this.set;
|
|
2296
|
+
this.debug(this.pattern, "set", n);
|
|
2297
|
+
let i = r[r.length - 1];
|
|
2298
|
+
if (!i)
|
|
2299
|
+
for (let a = r.length - 2; !i && a >= 0; a--)
|
|
2300
|
+
i = r[a];
|
|
2301
|
+
for (let a = 0; a < n.length; a++) {
|
|
2302
|
+
const o = n[a];
|
|
2303
|
+
let l = r;
|
|
2304
|
+
if (s.matchBase && o.length === 1 && (l = [i]), this.matchOne(l, o, e))
|
|
2305
|
+
return s.flipNegate ? !0 : !this.negate;
|
|
2306
|
+
}
|
|
2307
|
+
return s.flipNegate ? !1 : this.negate;
|
|
2308
|
+
}
|
|
2309
|
+
static defaults(t) {
|
|
2310
|
+
return F.defaults(t).Minimatch;
|
|
2311
|
+
}
|
|
2312
|
+
};
|
|
2313
|
+
F.AST = Es;
|
|
2314
|
+
F.Minimatch = ht;
|
|
2315
|
+
F.escape = On;
|
|
2316
|
+
F.unescape = ze;
|
|
2317
|
+
var ti = (t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), si = {};
|
|
2318
|
+
an(si, {
|
|
2319
|
+
err: () => Os,
|
|
2320
|
+
map: () => ri,
|
|
2321
|
+
ok: () => mt,
|
|
2322
|
+
unwrap: () => ni,
|
|
2323
|
+
unwrapErr: () => ii
|
|
364
2324
|
});
|
|
365
|
-
var
|
|
2325
|
+
var mt = (t) => ({
|
|
366
2326
|
isOk: !0,
|
|
367
2327
|
isErr: !1,
|
|
368
|
-
value:
|
|
369
|
-
}),
|
|
2328
|
+
value: t
|
|
2329
|
+
}), Os = (t) => ({
|
|
370
2330
|
isOk: !1,
|
|
371
2331
|
isErr: !0,
|
|
372
|
-
value:
|
|
2332
|
+
value: t
|
|
373
2333
|
});
|
|
374
|
-
function
|
|
375
|
-
if (
|
|
376
|
-
const
|
|
377
|
-
return
|
|
2334
|
+
function ri(t, e) {
|
|
2335
|
+
if (t.isOk) {
|
|
2336
|
+
const s = e(t.value);
|
|
2337
|
+
return s instanceof Promise ? s.then((r) => mt(r)) : mt(s);
|
|
378
2338
|
}
|
|
379
|
-
if (
|
|
380
|
-
const
|
|
381
|
-
return
|
|
2339
|
+
if (t.isErr) {
|
|
2340
|
+
const s = t.value;
|
|
2341
|
+
return Os(s);
|
|
382
2342
|
}
|
|
383
2343
|
throw "should never get here";
|
|
384
2344
|
}
|
|
385
|
-
var
|
|
386
|
-
if (
|
|
387
|
-
return
|
|
388
|
-
throw
|
|
389
|
-
},
|
|
390
|
-
if (
|
|
391
|
-
return
|
|
392
|
-
throw
|
|
393
|
-
},
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
|
|
2345
|
+
var ni = (t) => {
|
|
2346
|
+
if (t.isOk)
|
|
2347
|
+
return t.value;
|
|
2348
|
+
throw t.value;
|
|
2349
|
+
}, ii = (t) => {
|
|
2350
|
+
if (t.isErr)
|
|
2351
|
+
return t.value;
|
|
2352
|
+
throw t.value;
|
|
2353
|
+
}, Ts = (t) => {
|
|
2354
|
+
const e = Ht(t, "childNodes");
|
|
2355
|
+
t.tagName && t.tagName.includes("-") && t["s-cr"] && t.tagName !== "SLOT-FB" && As(e, t.tagName).forEach((r) => {
|
|
2356
|
+
r.nodeType === 1 && r.tagName === "SLOT-FB" && (oi(r, At(r), !1).length ? r.hidden = !0 : r.hidden = !1);
|
|
397
2357
|
});
|
|
398
|
-
let
|
|
399
|
-
for (
|
|
400
|
-
const
|
|
401
|
-
|
|
2358
|
+
let s = 0;
|
|
2359
|
+
for (s = 0; s < e.length; s++) {
|
|
2360
|
+
const r = e[s];
|
|
2361
|
+
r.nodeType === 1 && Ht(r, "childNodes").length && Ts(r);
|
|
402
2362
|
}
|
|
403
|
-
},
|
|
404
|
-
const
|
|
405
|
-
for (let
|
|
406
|
-
const
|
|
407
|
-
|
|
2363
|
+
}, ai = (t) => {
|
|
2364
|
+
const e = [];
|
|
2365
|
+
for (let s = 0; s < t.length; s++) {
|
|
2366
|
+
const r = t[s]["s-nr"] || void 0;
|
|
2367
|
+
r && r.isConnected && e.push(r);
|
|
408
2368
|
}
|
|
409
|
-
return
|
|
2369
|
+
return e;
|
|
410
2370
|
};
|
|
411
|
-
function
|
|
412
|
-
let
|
|
413
|
-
for (;
|
|
414
|
-
i =
|
|
2371
|
+
function As(t, e, s) {
|
|
2372
|
+
let r = 0, n = [], i;
|
|
2373
|
+
for (; r < t.length; r++)
|
|
2374
|
+
i = t[r], i["s-sr"] && (!e || i["s-hn"] === e) && s === void 0 && n.push(i), n = [...n, ...As(i.childNodes, e, s)];
|
|
415
2375
|
return n;
|
|
416
2376
|
}
|
|
417
|
-
var
|
|
418
|
-
const
|
|
419
|
-
(
|
|
420
|
-
let n =
|
|
2377
|
+
var oi = (t, e, s = !0) => {
|
|
2378
|
+
const r = [];
|
|
2379
|
+
(s && t["s-sr"] || !t["s-sr"]) && r.push(t);
|
|
2380
|
+
let n = t;
|
|
421
2381
|
for (; n = n.nextSibling; )
|
|
422
|
-
|
|
423
|
-
return
|
|
424
|
-
},
|
|
425
|
-
function
|
|
426
|
-
if (
|
|
427
|
-
const
|
|
2382
|
+
At(n) === e && (s || !n["s-sr"]) && r.push(n);
|
|
2383
|
+
return r;
|
|
2384
|
+
}, Gt = (t, e) => t.nodeType === 1 ? t.getAttribute("slot") === null && e === "" || t.getAttribute("slot") === e : t["s-sn"] === e ? !0 : e === "", At = (t) => typeof t["s-sn"] == "string" ? t["s-sn"] : t.nodeType === 1 && t.getAttribute("slot") || void 0;
|
|
2385
|
+
function li(t) {
|
|
2386
|
+
if (t.assignedElements || t.assignedNodes || !t["s-sr"]) return;
|
|
2387
|
+
const e = (s) => (function(r) {
|
|
428
2388
|
const n = [], i = this["s-sn"];
|
|
429
|
-
|
|
2389
|
+
r?.flatten && console.error(`
|
|
430
2390
|
Flattening is not supported for Stencil non-shadow slots.
|
|
431
2391
|
You can use \`.childNodes\` to nested slot fallback content.
|
|
432
2392
|
If you have a particular use case, please open an issue on the Stencil repo.
|
|
433
2393
|
`);
|
|
434
|
-
const
|
|
435
|
-
return (
|
|
436
|
-
i ===
|
|
437
|
-
}),
|
|
2394
|
+
const a = this["s-cr"].parentElement;
|
|
2395
|
+
return (a.__childNodes ? a.childNodes : ai(a.childNodes)).forEach((l) => {
|
|
2396
|
+
i === At(l) && n.push(l);
|
|
2397
|
+
}), s ? n.filter(
|
|
438
2398
|
(l) => l.nodeType === 1
|
|
439
2399
|
/* ElementNode */
|
|
440
2400
|
) : n;
|
|
441
|
-
}).bind(
|
|
442
|
-
|
|
2401
|
+
}).bind(t);
|
|
2402
|
+
t.assignedElements = e(!0), t.assignedNodes = e(!1);
|
|
443
2403
|
}
|
|
444
|
-
function
|
|
445
|
-
if ("__" +
|
|
446
|
-
const
|
|
447
|
-
return typeof
|
|
2404
|
+
function Ht(t, e) {
|
|
2405
|
+
if ("__" + e in t) {
|
|
2406
|
+
const s = t["__" + e];
|
|
2407
|
+
return typeof s != "function" ? s : s.bind(t);
|
|
448
2408
|
} else
|
|
449
|
-
return typeof e
|
|
2409
|
+
return typeof t[e] != "function" ? t[e] : t[e].bind(t);
|
|
450
2410
|
}
|
|
451
|
-
var
|
|
452
|
-
let
|
|
453
|
-
const l = [],
|
|
454
|
-
for (let
|
|
455
|
-
|
|
2411
|
+
var ci = (t, e, ...s) => {
|
|
2412
|
+
let r = null, n = null, i = null, a = !1, o = !1;
|
|
2413
|
+
const l = [], h = (u) => {
|
|
2414
|
+
for (let d = 0; d < u.length; d++)
|
|
2415
|
+
r = u[d], Array.isArray(r) ? h(r) : r != null && typeof r != "boolean" && ((a = !$s(r)) && (r = String(r)), a && o ? l[l.length - 1].$text$ += r : l.push(a ? yt(null, r) : r), o = a);
|
|
456
2416
|
};
|
|
457
|
-
|
|
458
|
-
const c =
|
|
459
|
-
return c.$attrs$ =
|
|
460
|
-
},
|
|
461
|
-
const
|
|
2417
|
+
h(s);
|
|
2418
|
+
const c = yt(t, null);
|
|
2419
|
+
return c.$attrs$ = e, l.length > 0 && (c.$children$ = l), c.$key$ = n, c.$name$ = i, c;
|
|
2420
|
+
}, yt = (t, e) => {
|
|
2421
|
+
const s = {
|
|
462
2422
|
$flags$: 0,
|
|
463
|
-
$tag$:
|
|
464
|
-
$text$:
|
|
2423
|
+
$tag$: t,
|
|
2424
|
+
$text$: e,
|
|
465
2425
|
$elm$: null,
|
|
466
2426
|
$children$: null
|
|
467
2427
|
};
|
|
468
|
-
return
|
|
469
|
-
},
|
|
470
|
-
const
|
|
2428
|
+
return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;
|
|
2429
|
+
}, hi = {}, ui = (t) => t && t.$tag$ === hi, Rt = (t) => {
|
|
2430
|
+
const e = ti(t);
|
|
471
2431
|
return new RegExp(
|
|
472
2432
|
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
473
2433
|
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
474
|
-
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${
|
|
2434
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,
|
|
475
2435
|
"g"
|
|
476
2436
|
);
|
|
477
2437
|
};
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
var
|
|
482
|
-
if (
|
|
2438
|
+
Rt("::slotted");
|
|
2439
|
+
Rt(":host");
|
|
2440
|
+
Rt(":host-context");
|
|
2441
|
+
var Ft = (t, e, s, r, n, i, a) => {
|
|
2442
|
+
if (s === r)
|
|
483
2443
|
return;
|
|
484
|
-
let
|
|
485
|
-
if (
|
|
486
|
-
const
|
|
487
|
-
let
|
|
488
|
-
|
|
489
|
-
} else if (
|
|
490
|
-
for (const
|
|
491
|
-
(!
|
|
492
|
-
for (const
|
|
493
|
-
(!
|
|
494
|
-
} else if (
|
|
495
|
-
|
|
496
|
-
else if (!
|
|
497
|
-
if (
|
|
498
|
-
const
|
|
499
|
-
|
|
2444
|
+
let o = jt(t, e), l = e.toLowerCase();
|
|
2445
|
+
if (e === "class") {
|
|
2446
|
+
const h = t.classList, c = Bt(s);
|
|
2447
|
+
let u = Bt(r);
|
|
2448
|
+
h.remove(...c.filter((d) => d && !u.includes(d))), h.add(...u.filter((d) => d && !c.includes(d)));
|
|
2449
|
+
} else if (e === "style") {
|
|
2450
|
+
for (const h in s)
|
|
2451
|
+
(!r || r[h] == null) && (h.includes("-") ? t.style.removeProperty(h) : t.style[h] = "");
|
|
2452
|
+
for (const h in r)
|
|
2453
|
+
(!s || r[h] !== s[h]) && (h.includes("-") ? t.style.setProperty(h, r[h]) : t.style[h] = r[h]);
|
|
2454
|
+
} else if (e !== "key") if (e === "ref")
|
|
2455
|
+
r && r(t);
|
|
2456
|
+
else if (!t.__lookupSetter__(e) && e[0] === "o" && e[1] === "n") {
|
|
2457
|
+
if (e[2] === "-" ? e = e.slice(3) : jt($e, l) ? e = l.slice(2) : e = l[2] + e.slice(3), s || r) {
|
|
2458
|
+
const h = e.endsWith(Rs);
|
|
2459
|
+
e = e.replace(pi, ""), s && Oe.rel(t, e, s, h), r && Oe.ael(t, e, r, h);
|
|
500
2460
|
}
|
|
501
2461
|
} else {
|
|
502
|
-
const
|
|
503
|
-
if ((
|
|
2462
|
+
const h = $s(r);
|
|
2463
|
+
if ((o || h && r !== null) && !n)
|
|
504
2464
|
try {
|
|
505
|
-
if (
|
|
506
|
-
e
|
|
2465
|
+
if (t.tagName.includes("-"))
|
|
2466
|
+
t[e] !== r && (t[e] = r);
|
|
507
2467
|
else {
|
|
508
|
-
const
|
|
509
|
-
|
|
2468
|
+
const u = r ?? "";
|
|
2469
|
+
e === "list" ? o = !1 : (s == null || t[e] != u) && (typeof t.__lookupSetter__(e) == "function" ? t[e] = u : t.setAttribute(e, u));
|
|
510
2470
|
}
|
|
511
2471
|
} catch {
|
|
512
2472
|
}
|
|
513
2473
|
let c = !1;
|
|
514
|
-
l !== (l = l.replace(/^xlink\:?/, "")) && (
|
|
2474
|
+
l !== (l = l.replace(/^xlink\:?/, "")) && (e = l, c = !0), r == null || r === !1 ? (r !== !1 || t.getAttribute(e) === "") && (c ? t.removeAttributeNS(Pt, e) : t.removeAttribute(e)) : (!o || i & 4 || n) && !h && t.nodeType === 1 && (r = r === !0 ? "" : r, c ? t.setAttributeNS(Pt, e, r) : t.setAttribute(e, r));
|
|
515
2475
|
}
|
|
516
|
-
},
|
|
517
|
-
const n =
|
|
518
|
-
for (const
|
|
519
|
-
|
|
2476
|
+
}, fi = /\s/, Bt = (t) => (typeof t == "object" && t && "baseVal" in t && (t = t.baseVal), !t || typeof t != "string" ? [] : t.split(fi)), Rs = "Capture", pi = new RegExp(Rs + "$"), Et = (t, e, s, r) => {
|
|
2477
|
+
const n = e.$elm$.nodeType === 11 && e.$elm$.host ? e.$elm$.host : e.$elm$, i = t && t.$attrs$ || {}, a = e.$attrs$ || {};
|
|
2478
|
+
for (const o of Ut(Object.keys(i)))
|
|
2479
|
+
o in a || Ft(
|
|
520
2480
|
n,
|
|
521
|
-
|
|
522
|
-
i[
|
|
2481
|
+
o,
|
|
2482
|
+
i[o],
|
|
523
2483
|
void 0,
|
|
524
|
-
|
|
525
|
-
|
|
2484
|
+
s,
|
|
2485
|
+
e.$flags$
|
|
526
2486
|
);
|
|
527
|
-
for (const
|
|
528
|
-
|
|
2487
|
+
for (const o of Ut(Object.keys(a)))
|
|
2488
|
+
Ft(
|
|
529
2489
|
n,
|
|
530
|
-
|
|
531
|
-
i[
|
|
532
|
-
o
|
|
533
|
-
|
|
534
|
-
|
|
2490
|
+
o,
|
|
2491
|
+
i[o],
|
|
2492
|
+
a[o],
|
|
2493
|
+
s,
|
|
2494
|
+
e.$flags$
|
|
535
2495
|
);
|
|
536
2496
|
};
|
|
537
|
-
function
|
|
538
|
-
return
|
|
2497
|
+
function Ut(t) {
|
|
2498
|
+
return t.includes("ref") ? (
|
|
539
2499
|
// we need to sort these to ensure that `'ref'` is the last attr
|
|
540
|
-
[...
|
|
2500
|
+
[...t.filter((e) => e !== "ref"), "ref"]
|
|
541
2501
|
) : (
|
|
542
2502
|
// no need to sort, return the original array
|
|
543
|
-
|
|
2503
|
+
t
|
|
544
2504
|
);
|
|
545
2505
|
}
|
|
546
|
-
var
|
|
547
|
-
var
|
|
548
|
-
const n =
|
|
549
|
-
let i = 0,
|
|
550
|
-
if (
|
|
2506
|
+
var Qe, rt, Fe, wt = !1, nt = !1, Nt = !1, B = !1, it = (t, e, s) => {
|
|
2507
|
+
var r;
|
|
2508
|
+
const n = e.$children$[s];
|
|
2509
|
+
let i = 0, a, o, l;
|
|
2510
|
+
if (wt || (Nt = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
|
|
551
2511
|
// slot element has fallback content
|
|
552
2512
|
// still create an element that "mocks" the slot element
|
|
553
2513
|
2
|
|
@@ -557,189 +2517,191 @@ var P, z, N, J = !1, H = !1, Q = !1, h = !1, G = (e, t, r) => {
|
|
|
557
2517
|
// where actual slot content should sit next to
|
|
558
2518
|
1
|
|
559
2519
|
))), n.$text$ !== null)
|
|
560
|
-
|
|
2520
|
+
a = n.$elm$ = $e.document.createTextNode(n.$text$);
|
|
561
2521
|
else if (n.$flags$ & 1)
|
|
562
|
-
|
|
2522
|
+
a = n.$elm$ = $e.document.createTextNode(""), Et(null, n, B);
|
|
563
2523
|
else {
|
|
564
|
-
if (
|
|
2524
|
+
if (B || (B = n.$tag$ === "svg"), !$e.document)
|
|
565
2525
|
throw new Error(
|
|
566
2526
|
"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."
|
|
567
2527
|
);
|
|
568
|
-
if (
|
|
569
|
-
|
|
570
|
-
!
|
|
571
|
-
),
|
|
2528
|
+
if (a = n.$elm$ = $e.document.createElementNS(
|
|
2529
|
+
B ? fn : pn,
|
|
2530
|
+
!wt && He.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
|
|
2531
|
+
), B && n.$tag$ === "foreignObject" && (B = !1), Et(null, n, B), gn(Qe) && a["s-si"] !== Qe && a.classList.add(a["s-si"] = Qe), n.$children$) {
|
|
2532
|
+
const h = n.$tag$ === "template" ? a.content : a;
|
|
572
2533
|
for (i = 0; i < n.$children$.length; ++i)
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
2534
|
+
o = it(t, n, i), o && h.appendChild(o);
|
|
2535
|
+
}
|
|
2536
|
+
n.$tag$ === "svg" ? B = !1 : a.tagName === "foreignObject" && (B = !0);
|
|
2537
|
+
}
|
|
2538
|
+
return a["s-hn"] = Fe, n.$flags$ & 3 && (a["s-sr"] = !0, a["s-cr"] = rt, a["s-sn"] = n.$name$ || "", a["s-rf"] = (r = n.$attrs$) == null ? void 0 : r.ref, li(a), l = t && t.$children$ && t.$children$[s], l && l.$tag$ === n.$tag$ && t.$elm$ && Be(t.$elm$, !1), Cs(rt, a, e.$elm$, t?.$elm$)), a;
|
|
2539
|
+
}, Be = (t, e) => {
|
|
2540
|
+
Oe.$flags$ |= 1;
|
|
2541
|
+
const s = Array.from(t.__childNodes || t.childNodes);
|
|
2542
|
+
t["s-sr"] && He.experimentalSlotFixes;
|
|
2543
|
+
for (let r = s.length - 1; r >= 0; r--) {
|
|
2544
|
+
const n = s[r];
|
|
2545
|
+
n["s-hn"] !== Fe && n["s-ol"] && (_e(Ue(n).parentNode, n, Ue(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, Nt = !0), e && Be(n, e);
|
|
2546
|
+
}
|
|
2547
|
+
Oe.$flags$ &= -2;
|
|
2548
|
+
}, Ns = (t, e, s, r, n, i) => {
|
|
2549
|
+
let a = t["s-cr"] && t["s-cr"].parentNode || t, o;
|
|
2550
|
+
for (a.shadowRoot && a.tagName === Fe && (a = a.shadowRoot), s.$tag$ === "template" && (a = a.content); n <= i; ++n)
|
|
2551
|
+
r[n] && (o = it(null, s, n), o && (r[n].$elm$ = o, _e(a, o, Ue(e))));
|
|
2552
|
+
}, Ls = (t, e, s) => {
|
|
2553
|
+
for (let r = e; r <= s; ++r) {
|
|
2554
|
+
const n = t[r];
|
|
593
2555
|
if (n) {
|
|
594
2556
|
const i = n.$elm$;
|
|
595
|
-
|
|
2557
|
+
ks(n), i && (nt = !0, i["s-ol"] ? i["s-ol"].remove() : Be(i, !0), i.remove());
|
|
596
2558
|
}
|
|
597
2559
|
}
|
|
598
|
-
},
|
|
599
|
-
let i = 0,
|
|
600
|
-
|
|
2560
|
+
}, gi = (t, e, s, r, n = !1) => {
|
|
2561
|
+
let i = 0, a = 0, o = 0, l = 0, h = e.length - 1, c = e[0], u = e[h], d = r.length - 1, g = r[0], f = r[d], p, y;
|
|
2562
|
+
const E = s.$tag$ === "template" ? t.content : t;
|
|
2563
|
+
for (; i <= h && a <= d; )
|
|
601
2564
|
if (c == null)
|
|
602
|
-
c =
|
|
603
|
-
else if (
|
|
604
|
-
|
|
605
|
-
else if ($ == null)
|
|
606
|
-
$ = s[++o];
|
|
2565
|
+
c = e[++i];
|
|
2566
|
+
else if (u == null)
|
|
2567
|
+
u = e[--h];
|
|
607
2568
|
else if (g == null)
|
|
608
|
-
g =
|
|
609
|
-
else if (
|
|
610
|
-
|
|
611
|
-
else if (
|
|
612
|
-
|
|
613
|
-
else if (
|
|
614
|
-
(
|
|
615
|
-
else if (
|
|
616
|
-
(c.$tag$ === "slot" ||
|
|
2569
|
+
g = r[++a];
|
|
2570
|
+
else if (f == null)
|
|
2571
|
+
f = r[--d];
|
|
2572
|
+
else if (Xe(c, g, n))
|
|
2573
|
+
we(c, g, n), c = e[++i], g = r[++a];
|
|
2574
|
+
else if (Xe(u, f, n))
|
|
2575
|
+
we(u, f, n), u = e[--h], f = r[--d];
|
|
2576
|
+
else if (Xe(c, f, n))
|
|
2577
|
+
(c.$tag$ === "slot" || f.$tag$ === "slot") && Be(c.$elm$.parentNode, !1), we(c, f, n), _e(E, c.$elm$, u.$elm$.nextSibling), c = e[++i], f = r[--d];
|
|
2578
|
+
else if (Xe(u, g, n))
|
|
2579
|
+
(c.$tag$ === "slot" || f.$tag$ === "slot") && Be(u.$elm$.parentNode, !1), we(u, g, n), _e(E, u.$elm$, c.$elm$), u = e[--h], g = r[++a];
|
|
617
2580
|
else {
|
|
618
|
-
for (
|
|
619
|
-
if (
|
|
620
|
-
|
|
2581
|
+
for (o = -1, l = i; l <= h; ++l)
|
|
2582
|
+
if (e[l] && e[l].$key$ !== null && e[l].$key$ === g.$key$) {
|
|
2583
|
+
o = l;
|
|
621
2584
|
break;
|
|
622
2585
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
2586
|
+
o >= 0 ? (y = e[o], y.$tag$ !== g.$tag$ ? p = it(e && e[a], s, o) : (we(y, g, n), e[o] = void 0, p = y.$elm$), g = r[++a]) : (p = it(e && e[a], s, a), g = r[++a]), p && _e(
|
|
2587
|
+
Ue(c.$elm$).parentNode,
|
|
2588
|
+
p,
|
|
2589
|
+
Ue(c.$elm$)
|
|
627
2590
|
);
|
|
628
2591
|
}
|
|
629
|
-
i >
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
r,
|
|
2592
|
+
i > h ? Ns(
|
|
2593
|
+
t,
|
|
2594
|
+
r[d + 1] == null ? null : r[d + 1].$elm$,
|
|
633
2595
|
s,
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
2596
|
+
r,
|
|
2597
|
+
a,
|
|
2598
|
+
d
|
|
2599
|
+
) : a > d && Ls(e, i, h);
|
|
2600
|
+
}, Xe = (t, e, s = !1) => t.$tag$ === e.$tag$ ? t.$tag$ === "slot" ? t.$name$ === e.$name$ : s ? (s && !t.$key$ && e.$key$ && (t.$key$ = e.$key$), !0) : t.$key$ === e.$key$ : !1, Ue = (t) => t && t["s-ol"] || t, we = (t, e, s = !1) => {
|
|
2601
|
+
const r = e.$elm$ = t.$elm$, n = t.$children$, i = e.$children$, a = e.$tag$, o = e.$text$;
|
|
639
2602
|
let l;
|
|
640
|
-
|
|
2603
|
+
o === null ? (B = a === "svg" ? !0 : a === "foreignObject" ? !1 : B, Et(t, e, B), n !== null && i !== null ? gi(r, n, e, i, s) : i !== null ? (t.$text$ !== null && (r.textContent = ""), Ns(r, null, e, i, 0, i.length - 1)) : (
|
|
641
2604
|
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
642
|
-
!
|
|
643
|
-
),
|
|
644
|
-
},
|
|
645
|
-
let
|
|
646
|
-
const n =
|
|
2605
|
+
!s && He.updatable && n !== null && Ls(n, 0, n.length - 1)
|
|
2606
|
+
), B && a === "svg" && (B = !1)) : (l = r["s-cr"]) ? l.parentNode.textContent = o : t.$text$ !== o && (r.data = o);
|
|
2607
|
+
}, se = [], Ms = (t) => {
|
|
2608
|
+
let e, s, r;
|
|
2609
|
+
const n = t.__childNodes || t.childNodes;
|
|
647
2610
|
for (const i of n) {
|
|
648
|
-
if (i["s-sr"] && (
|
|
649
|
-
|
|
650
|
-
const
|
|
651
|
-
for (
|
|
652
|
-
if (
|
|
653
|
-
if (
|
|
654
|
-
let
|
|
655
|
-
|
|
2611
|
+
if (i["s-sr"] && (e = i["s-cr"]) && e.parentNode) {
|
|
2612
|
+
s = e.parentNode.__childNodes || e.parentNode.childNodes;
|
|
2613
|
+
const a = i["s-sn"];
|
|
2614
|
+
for (r = s.length - 1; r >= 0; r--)
|
|
2615
|
+
if (e = s[r], !e["s-cn"] && !e["s-nr"] && e["s-hn"] !== i["s-hn"])
|
|
2616
|
+
if (Gt(e, a)) {
|
|
2617
|
+
let o = se.find((l) => l.$nodeToRelocate$ === e);
|
|
2618
|
+
nt = !0, e["s-sn"] = e["s-sn"] || a, o ? (o.$nodeToRelocate$["s-sh"] = i["s-hn"], o.$slotRefNode$ = i) : (e["s-sh"] = i["s-hn"], se.push({
|
|
656
2619
|
$slotRefNode$: i,
|
|
657
|
-
$nodeToRelocate$:
|
|
658
|
-
})),
|
|
659
|
-
|
|
2620
|
+
$nodeToRelocate$: e
|
|
2621
|
+
})), e["s-sr"] && se.map((l) => {
|
|
2622
|
+
Gt(l.$nodeToRelocate$, e["s-sn"]) && (o = se.find((h) => h.$nodeToRelocate$ === e), o && !l.$slotRefNode$ && (l.$slotRefNode$ = o.$slotRefNode$));
|
|
660
2623
|
});
|
|
661
|
-
} else
|
|
662
|
-
$nodeToRelocate$:
|
|
2624
|
+
} else se.some((o) => o.$nodeToRelocate$ === e) || se.push({
|
|
2625
|
+
$nodeToRelocate$: e
|
|
663
2626
|
});
|
|
664
2627
|
}
|
|
665
|
-
i.nodeType === 1 &&
|
|
2628
|
+
i.nodeType === 1 && Ms(i);
|
|
666
2629
|
}
|
|
667
|
-
},
|
|
668
|
-
|
|
669
|
-
},
|
|
670
|
-
function
|
|
2630
|
+
}, ks = (t) => {
|
|
2631
|
+
t.$attrs$ && t.$attrs$.ref && t.$attrs$.ref(null), t.$children$ && t.$children$.map(ks);
|
|
2632
|
+
}, _e = (t, e, s) => (typeof e["s-sn"] == "string" && e["s-sr"] && e["s-cr"] && Cs(e["s-cr"], e, t, e.parentElement), t?.insertBefore(e, s));
|
|
2633
|
+
function Cs(t, e, s, r) {
|
|
671
2634
|
var n, i;
|
|
672
|
-
let
|
|
673
|
-
if (
|
|
674
|
-
const
|
|
675
|
-
if ((n =
|
|
676
|
-
let
|
|
677
|
-
for (;
|
|
678
|
-
if (
|
|
2635
|
+
let a;
|
|
2636
|
+
if (t && typeof e["s-sn"] == "string" && e["s-sr"] && t.parentNode && t.parentNode["s-sc"] && (a = e["s-si"] || t.parentNode["s-sc"])) {
|
|
2637
|
+
const o = e["s-sn"], l = e["s-hn"];
|
|
2638
|
+
if ((n = s.classList) == null || n.add(a + "-s"), r && ((i = r.classList) != null && i.contains(a + "-s"))) {
|
|
2639
|
+
let h = (r.__childNodes || r.childNodes)[0], c = !1;
|
|
2640
|
+
for (; h; ) {
|
|
2641
|
+
if (h["s-sn"] !== o && h["s-hn"] === l && h["s-sr"]) {
|
|
679
2642
|
c = !0;
|
|
680
2643
|
break;
|
|
681
2644
|
}
|
|
682
|
-
|
|
2645
|
+
h = h.nextSibling;
|
|
683
2646
|
}
|
|
684
|
-
c ||
|
|
2647
|
+
c || r.classList.remove(a + "-s");
|
|
685
2648
|
}
|
|
686
2649
|
}
|
|
687
2650
|
}
|
|
688
|
-
var
|
|
689
|
-
var
|
|
690
|
-
const l =
|
|
691
|
-
if (
|
|
692
|
-
|
|
693
|
-
})),
|
|
694
|
-
for (const
|
|
695
|
-
l.hasAttribute(
|
|
696
|
-
|
|
2651
|
+
var di = (t, e, s = !1) => {
|
|
2652
|
+
var r, n, i, a, o;
|
|
2653
|
+
const l = t.$hostElement$, h = t.$cmpMeta$, c = t.$vnode$ || yt(null, null), d = ui(e) ? e : ci(null, null, e);
|
|
2654
|
+
if (Fe = l.tagName, h.$attrsToReflect$ && (d.$attrs$ = d.$attrs$ || {}, h.$attrsToReflect$.forEach(([g, f]) => {
|
|
2655
|
+
He.serializer && t.$serializerValues$.has(g) ? d.$attrs$[f] = t.$serializerValues$.get(g) : d.$attrs$[f] = l[g];
|
|
2656
|
+
})), s && d.$attrs$)
|
|
2657
|
+
for (const g of Object.keys(d.$attrs$))
|
|
2658
|
+
l.hasAttribute(g) && !["key", "ref", "style", "class"].includes(g) && (d.$attrs$[g] = l[g]);
|
|
2659
|
+
d.$tag$ = null, d.$flags$ |= 4, t.$vnode$ = d, d.$elm$ = c.$elm$ = l.shadowRoot || l, Qe = l["s-sc"], wt = !!(h.$flags$ & 1) && !(h.$flags$ & 128), rt = l["s-cr"], nt = !1, we(c, d, s);
|
|
697
2660
|
{
|
|
698
|
-
if (
|
|
699
|
-
|
|
700
|
-
for (const
|
|
701
|
-
const
|
|
702
|
-
if (!
|
|
703
|
-
const
|
|
704
|
-
|
|
2661
|
+
if (Oe.$flags$ |= 1, Nt) {
|
|
2662
|
+
Ms(d.$elm$);
|
|
2663
|
+
for (const g of se) {
|
|
2664
|
+
const f = g.$nodeToRelocate$;
|
|
2665
|
+
if (!f["s-ol"] && $e.document) {
|
|
2666
|
+
const p = $e.document.createTextNode("");
|
|
2667
|
+
p["s-nr"] = f, _e(f.parentNode, f["s-ol"] = p, f);
|
|
705
2668
|
}
|
|
706
2669
|
}
|
|
707
|
-
for (const
|
|
708
|
-
const
|
|
709
|
-
if (
|
|
710
|
-
const y =
|
|
711
|
-
let
|
|
2670
|
+
for (const g of se) {
|
|
2671
|
+
const f = g.$nodeToRelocate$, p = g.$slotRefNode$;
|
|
2672
|
+
if (f.nodeType === 1 && s && (f["s-ih"] = (r = f.hidden) != null ? r : !1), p) {
|
|
2673
|
+
const y = p.parentNode;
|
|
2674
|
+
let E = p.nextSibling;
|
|
712
2675
|
{
|
|
713
|
-
let
|
|
714
|
-
for (;
|
|
715
|
-
let
|
|
716
|
-
if (
|
|
717
|
-
for (
|
|
718
|
-
|
|
719
|
-
if (!
|
|
720
|
-
|
|
2676
|
+
let b = (n = f["s-ol"]) == null ? void 0 : n.previousSibling;
|
|
2677
|
+
for (; b; ) {
|
|
2678
|
+
let m = (i = b["s-nr"]) != null ? i : null;
|
|
2679
|
+
if (m && m["s-sn"] === f["s-sn"] && y === (m.__parentNode || m.parentNode)) {
|
|
2680
|
+
for (m = m.nextSibling; m === f || m?.["s-sr"]; )
|
|
2681
|
+
m = m?.nextSibling;
|
|
2682
|
+
if (!m || !m["s-nr"]) {
|
|
2683
|
+
E = m;
|
|
721
2684
|
break;
|
|
722
2685
|
}
|
|
723
2686
|
}
|
|
724
|
-
|
|
2687
|
+
b = b.previousSibling;
|
|
725
2688
|
}
|
|
726
2689
|
}
|
|
727
|
-
const
|
|
728
|
-
(!
|
|
729
|
-
} else
|
|
730
|
-
g.nodeType === 1 && (r && (g["s-ih"] = (o = g.hidden) != null ? o : !1), g.hidden = !0);
|
|
2690
|
+
const $ = f.__parentNode || f.parentNode, w = f.__nextSibling || f.nextSibling;
|
|
2691
|
+
(!E && y !== $ || w !== E) && f !== E && (!f["s-hn"] && f["s-ol"] && (f["s-hn"] = f["s-ol"].parentNode.nodeName), _e(y, f, E), f.nodeType === 1 && f.tagName !== "SLOT-FB" && (f.hidden = (a = f["s-ih"]) != null ? a : !1)), f && typeof p["s-rf"] == "function" && p["s-rf"](p);
|
|
2692
|
+
} else f.nodeType === 1 && (f.hidden = !0);
|
|
731
2693
|
}
|
|
732
2694
|
}
|
|
733
|
-
|
|
2695
|
+
nt && Ts(d.$elm$), Oe.$flags$ &= -2, se.length = 0;
|
|
734
2696
|
}
|
|
735
|
-
if (
|
|
736
|
-
const
|
|
737
|
-
for (const
|
|
738
|
-
|
|
2697
|
+
if (He.experimentalScopedSlotChanges && h.$flags$ & 2) {
|
|
2698
|
+
const g = d.$elm$.__childNodes || d.$elm$.childNodes;
|
|
2699
|
+
for (const f of g)
|
|
2700
|
+
f["s-hn"] !== Fe && !f["s-sh"] && f.nodeType === 1 && (s && f["s-ih"] == null && (f["s-ih"] = (o = f.hidden) != null ? o : !1), f.hidden = !0);
|
|
739
2701
|
}
|
|
740
|
-
|
|
2702
|
+
rt = void 0;
|
|
741
2703
|
};
|
|
742
|
-
const
|
|
2704
|
+
const Ie = {
|
|
743
2705
|
content_wrap: 0,
|
|
744
2706
|
ignore: [],
|
|
745
2707
|
ignore_with: "!i-£___£%_",
|
|
@@ -747,7 +2709,7 @@ const T = {
|
|
|
747
2709
|
tab_size: 2,
|
|
748
2710
|
tag_wrap: 0,
|
|
749
2711
|
trim: []
|
|
750
|
-
},
|
|
2712
|
+
}, js = [
|
|
751
2713
|
"area",
|
|
752
2714
|
"base",
|
|
753
2715
|
"br",
|
|
@@ -762,429 +2724,435 @@ const T = {
|
|
|
762
2724
|
"source",
|
|
763
2725
|
"track",
|
|
764
2726
|
"wbr"
|
|
765
|
-
],
|
|
2727
|
+
], Ps = {
|
|
766
2728
|
checked_html: !1,
|
|
767
|
-
config: { ...
|
|
2729
|
+
config: { ...Ie },
|
|
768
2730
|
ignored: !1,
|
|
769
2731
|
constants: {
|
|
770
|
-
CONTENT_IGNORE_PLACEHOLDER: `${
|
|
771
|
-
SELF_CLOSING_PLACEHOLDER: `${
|
|
772
|
-
ATTRIBUTE_IGNORE_PLACEHOLDER: `${
|
|
2732
|
+
CONTENT_IGNORE_PLACEHOLDER: `${Ie.ignore_with}_`,
|
|
2733
|
+
SELF_CLOSING_PLACEHOLDER: `${Ie.ignore_with}/_>`,
|
|
2734
|
+
ATTRIBUTE_IGNORE_PLACEHOLDER: `${Ie.ignore_with}=_`
|
|
773
2735
|
}
|
|
774
|
-
},
|
|
775
|
-
if (!
|
|
2736
|
+
}, U = () => Ps, Ze = (t) => Object.assign(Ps, t), Ds = (t) => (Ze({ checked_html: !0 }), /<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\s+.*?)*?\/{0,1}>/.test(t) || /<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(t) || /<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(t)), Is = (t, e) => {
|
|
2737
|
+
if (!t || !e)
|
|
776
2738
|
throw new Error("Both 'current' and 'updates' must be passed-in to mergeObjects()");
|
|
777
|
-
let
|
|
778
|
-
if (Array.isArray(
|
|
779
|
-
|
|
780
|
-
else if (typeof
|
|
781
|
-
|
|
782
|
-
for (let
|
|
783
|
-
typeof
|
|
2739
|
+
let s;
|
|
2740
|
+
if (Array.isArray(t))
|
|
2741
|
+
s = structuredClone(t).concat(e);
|
|
2742
|
+
else if (typeof t == "object") {
|
|
2743
|
+
s = { ...t };
|
|
2744
|
+
for (let r of Object.keys(e))
|
|
2745
|
+
typeof e[r] != "object" ? s[r] = e[r] : s[r] = Is(s[r] || {}, e[r]);
|
|
784
2746
|
}
|
|
785
|
-
return
|
|
786
|
-
},
|
|
787
|
-
const
|
|
788
|
-
return
|
|
789
|
-
config:
|
|
2747
|
+
return s;
|
|
2748
|
+
}, $i = (t, e) => {
|
|
2749
|
+
const s = Is(t, e);
|
|
2750
|
+
return Ze({
|
|
2751
|
+
config: s,
|
|
790
2752
|
constants: {
|
|
791
|
-
CONTENT_IGNORE_PLACEHOLDER: `${
|
|
792
|
-
SELF_CLOSING_PLACEHOLDER: `${
|
|
793
|
-
ATTRIBUTE_IGNORE_PLACEHOLDER: `${
|
|
2753
|
+
CONTENT_IGNORE_PLACEHOLDER: `${s.ignore_with}_`,
|
|
2754
|
+
SELF_CLOSING_PLACEHOLDER: `${s.ignore_with}/_>`,
|
|
2755
|
+
ATTRIBUTE_IGNORE_PLACEHOLDER: `${s.ignore_with}=_`
|
|
794
2756
|
}
|
|
795
|
-
}),
|
|
796
|
-
},
|
|
797
|
-
const { constants:
|
|
798
|
-
return
|
|
799
|
-
},
|
|
800
|
-
const { constants:
|
|
801
|
-
return
|
|
802
|
-
},
|
|
803
|
-
const
|
|
804
|
-
return
|
|
805
|
-
const l = i ||
|
|
2757
|
+
}), s;
|
|
2758
|
+
}, vi = (t) => {
|
|
2759
|
+
const { constants: e } = U();
|
|
2760
|
+
return t = t.replace(/<[\w:\-]+([^>]*[^\/])>/g, (s, r) => s.replace(r, (n) => n.replace(/\n/g, e.ATTRIBUTE_IGNORE_PLACEHOLDER + "nl!").replace(/\r/g, e.ATTRIBUTE_IGNORE_PLACEHOLDER + "cr!").replace(/\s/g, e.ATTRIBUTE_IGNORE_PLACEHOLDER + "ws!"))), t;
|
|
2761
|
+
}, _i = (t) => {
|
|
2762
|
+
const { constants: e } = U();
|
|
2763
|
+
return t.replace(/\n/g, e.CONTENT_IGNORE_PLACEHOLDER + "nl!").replace(/\r/g, e.CONTENT_IGNORE_PLACEHOLDER + "cr!").replace(/\s/g, e.CONTENT_IGNORE_PLACEHOLDER + "ws!");
|
|
2764
|
+
}, mi = (t) => {
|
|
2765
|
+
const e = /\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, { constants: s } = U();
|
|
2766
|
+
return t.replace(e, (r, n, i, a, o) => {
|
|
2767
|
+
const l = i || o;
|
|
806
2768
|
if (!l)
|
|
807
|
-
return
|
|
808
|
-
const
|
|
809
|
-
return
|
|
2769
|
+
return r;
|
|
2770
|
+
const h = l.replace(/\n/g, s.CONTENT_IGNORE_PLACEHOLDER + "nl!").replace(/\r/g, s.CONTENT_IGNORE_PLACEHOLDER + "cr!").replace(/\s/g, s.CONTENT_IGNORE_PLACEHOLDER + "ws!");
|
|
2771
|
+
return r.replace(l, h);
|
|
810
2772
|
});
|
|
811
|
-
},
|
|
812
|
-
const
|
|
813
|
-
return
|
|
814
|
-
},
|
|
815
|
-
for (let
|
|
816
|
-
const
|
|
817
|
-
|
|
2773
|
+
}, yi = (t) => {
|
|
2774
|
+
const e = /<([A-Za-z][A-Za-z0-9]*|[a-z][a-z0-9._]*-[a-z0-9._-]+)((?:\s+[A-Za-z0-9_-]+="[^"]*"|\s*[a-z]*)*)>/g, { constants: s } = U();
|
|
2775
|
+
return t = t.replace(e, (r, n, i) => r.replace(i, (a) => a.replace(/</g, s.ATTRIBUTE_IGNORE_PLACEHOLDER + "lt!").replace(/>/g, s.ATTRIBUTE_IGNORE_PLACEHOLDER + "gt!"))), t;
|
|
2776
|
+
}, Ei = (t, e) => {
|
|
2777
|
+
for (let s = 0; s < e.length; s++) {
|
|
2778
|
+
const r = new RegExp(`(<${e[s]}[^>]*>)\\s+`, "g"), n = new RegExp(`\\s+(</${e[s]}>)`, "g");
|
|
2779
|
+
t = t.replace(r, "$1").replace(n, "$1");
|
|
818
2780
|
}
|
|
819
|
-
return
|
|
820
|
-
},
|
|
821
|
-
const { constants:
|
|
822
|
-
return
|
|
823
|
-
`).replace(new RegExp(
|
|
824
|
-
},
|
|
825
|
-
const { constants:
|
|
826
|
-
return
|
|
827
|
-
`).replace(new RegExp(
|
|
828
|
-
},
|
|
829
|
-
const
|
|
2781
|
+
return t;
|
|
2782
|
+
}, wi = (t) => {
|
|
2783
|
+
const { constants: e } = U();
|
|
2784
|
+
return t = t.replace(/<[\w:\-]+([^>]*[^\/])>/g, (s, r) => s.replace(r, (n) => n.replace(new RegExp(e.ATTRIBUTE_IGNORE_PLACEHOLDER + "nl!", "g"), `
|
|
2785
|
+
`).replace(new RegExp(e.ATTRIBUTE_IGNORE_PLACEHOLDER + "cr!", "g"), "\r").replace(new RegExp(e.ATTRIBUTE_IGNORE_PLACEHOLDER + "ws!", "g"), " "))), t;
|
|
2786
|
+
}, bi = (t) => {
|
|
2787
|
+
const { constants: e } = U();
|
|
2788
|
+
return t = t.replace(new RegExp(`.*${e.CONTENT_IGNORE_PLACEHOLDER}[a-z]{2}!.*`, "g"), (s) => s.replace(new RegExp(`${e.CONTENT_IGNORE_PLACEHOLDER}[a-z]{2}!`, "g"), (r) => r.replace(new RegExp(e.CONTENT_IGNORE_PLACEHOLDER + "nl!", "g"), `
|
|
2789
|
+
`).replace(new RegExp(e.CONTENT_IGNORE_PLACEHOLDER + "cr!", "g"), "\r").replace(new RegExp(e.CONTENT_IGNORE_PLACEHOLDER + "ws!", "g"), " "))), t;
|
|
2790
|
+
}, Si = (t) => {
|
|
2791
|
+
const e = /<([\w:\-]+)([^>]*)>/g, { constants: s } = U(), r = s.ATTRIBUTE_IGNORE_PLACEHOLDER.replace(
|
|
830
2792
|
/[-\/\\^$*+?.()|[\]{}]/g,
|
|
831
2793
|
"\\$&"
|
|
832
|
-
), n = new RegExp(
|
|
833
|
-
return
|
|
834
|
-
|
|
835
|
-
(
|
|
836
|
-
const
|
|
837
|
-
return `<${
|
|
2794
|
+
), n = new RegExp(r + "lt!", "g"), i = new RegExp(r + "gt!", "g");
|
|
2795
|
+
return t.replace(
|
|
2796
|
+
e,
|
|
2797
|
+
(a, o, l) => {
|
|
2798
|
+
const h = l.replace(n, "<").replace(i, ">");
|
|
2799
|
+
return `<${o}${h}>`;
|
|
838
2800
|
}
|
|
839
2801
|
);
|
|
840
|
-
},
|
|
841
|
-
if (typeof
|
|
842
|
-
const
|
|
843
|
-
if (!(Object.hasOwn(
|
|
844
|
-
return
|
|
845
|
-
let
|
|
846
|
-
if (
|
|
847
|
-
if (typeof
|
|
848
|
-
if (!Number.isSafeInteger(
|
|
849
|
-
if (
|
|
850
|
-
|
|
851
|
-
}
|
|
852
|
-
if (Object.hasOwn(
|
|
853
|
-
throw new Error(`content_wrap config must be a number, not ${typeof
|
|
854
|
-
if (Object.hasOwn(
|
|
2802
|
+
}, xi = (t) => {
|
|
2803
|
+
if (typeof t != "object") throw new Error("Config must be an object.");
|
|
2804
|
+
const e = { ...Ie };
|
|
2805
|
+
if (!(Object.hasOwn(t, "content_wrap") || Object.hasOwn(t, "ignore") || Object.hasOwn(t, "ignore_with") || Object.hasOwn(t, "strict") || Object.hasOwn(t, "tab_size") || Object.hasOwn(t, "tag_wrap") || Object.hasOwn(t, "trim")))
|
|
2806
|
+
return Ze({ config: e }), e;
|
|
2807
|
+
let r = t.tab_size;
|
|
2808
|
+
if (r) {
|
|
2809
|
+
if (typeof r != "number") throw new Error(`tab_size must be a number, not ${typeof t.tab_size}.`);
|
|
2810
|
+
if (!Number.isSafeInteger(r)) throw new Error(`Tab size ${r} is not safe. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger for more info.`);
|
|
2811
|
+
if (r = Math.floor(r), r < 1 || r > 16) throw new Error("Tab size out of range. Expecting 1 to 16.");
|
|
2812
|
+
t.tab_size = r;
|
|
2813
|
+
}
|
|
2814
|
+
if (Object.hasOwn(t, "content_wrap") && typeof t.content_wrap != "number")
|
|
2815
|
+
throw new Error(`content_wrap config must be a number, not ${typeof t.content_wrap}.`);
|
|
2816
|
+
if (Object.hasOwn(t, "ignore") && (!Array.isArray(t.ignore) || !t.ignore?.every((n) => typeof n == "string")))
|
|
855
2817
|
throw new Error("Ignore config must be an array of strings.");
|
|
856
|
-
if (Object.hasOwn(
|
|
857
|
-
if (typeof
|
|
858
|
-
throw new Error(`ignore_with must be a string, not ${typeof
|
|
859
|
-
if (
|
|
2818
|
+
if (Object.hasOwn(t, "ignore_with")) {
|
|
2819
|
+
if (typeof t.ignore_with != "string")
|
|
2820
|
+
throw new Error(`ignore_with must be a string, not ${typeof t.ignore_with}.`);
|
|
2821
|
+
if (t.ignore_with.startsWith("_"))
|
|
860
2822
|
throw new Error("ignore_with cannot start with an underscore.");
|
|
861
2823
|
}
|
|
862
|
-
if (Object.hasOwn(
|
|
863
|
-
throw new Error(`Strict config must be a boolean, not ${typeof
|
|
864
|
-
if (Object.hasOwn(
|
|
865
|
-
throw new Error(`tag_wrap config must be a number, not ${typeof
|
|
866
|
-
if (Object.hasOwn(
|
|
2824
|
+
if (Object.hasOwn(t, "strict") && typeof t.strict != "boolean")
|
|
2825
|
+
throw new Error(`Strict config must be a boolean, not ${typeof t.strict}.`);
|
|
2826
|
+
if (Object.hasOwn(t, "tag_wrap") && typeof t.tag_wrap != "number")
|
|
2827
|
+
throw new Error(`tag_wrap config must be a number, not ${typeof t.tag_wrap}.`);
|
|
2828
|
+
if (Object.hasOwn(t, "trim") && (!Array.isArray(t.trim) || !t.trim?.every((n) => typeof n == "string")))
|
|
867
2829
|
throw new Error("Trim config must be an array of strings.");
|
|
868
|
-
return
|
|
869
|
-
},
|
|
870
|
-
const
|
|
871
|
-
if (
|
|
2830
|
+
return $i(e, t);
|
|
2831
|
+
}, Oi = (t, e, s) => {
|
|
2832
|
+
const r = t.trim().split(/\s+/);
|
|
2833
|
+
if (r.length === 0 || r.length === 1 && r[0] === "")
|
|
872
2834
|
return "";
|
|
873
2835
|
const n = [];
|
|
874
2836
|
let i = "";
|
|
875
|
-
const
|
|
876
|
-
|
|
2837
|
+
const a = s;
|
|
2838
|
+
r.forEach((l) => {
|
|
877
2839
|
if (l === "") return;
|
|
878
|
-
if (l.length >=
|
|
879
|
-
i !== "" && n.push(n.length === 0 ?
|
|
2840
|
+
if (l.length >= e) {
|
|
2841
|
+
i !== "" && n.push(n.length === 0 ? s + i : a + i), n.push(n.length === 0 ? s + l : a + l), i = "";
|
|
880
2842
|
return;
|
|
881
2843
|
}
|
|
882
|
-
const
|
|
883
|
-
|
|
884
|
-
}), i !== "" && n.push(n.length === 0 ?
|
|
885
|
-
const
|
|
2844
|
+
const h = i === "" ? l : i + " " + l;
|
|
2845
|
+
h.length <= e ? i = h : (i !== "" && n.push(n.length === 0 ? s + i : a + i), i = l);
|
|
2846
|
+
}), i !== "" && n.push(n.length === 0 ? s + i : a + i);
|
|
2847
|
+
const o = n.join(`
|
|
886
2848
|
`);
|
|
887
|
-
return
|
|
2849
|
+
return _i(o);
|
|
888
2850
|
};
|
|
889
|
-
function
|
|
890
|
-
|
|
891
|
-
const
|
|
892
|
-
let
|
|
893
|
-
const
|
|
2851
|
+
function Ws(t) {
|
|
2852
|
+
Ze({ ignored: !0 });
|
|
2853
|
+
const e = U().config;
|
|
2854
|
+
let s = t;
|
|
2855
|
+
const r = /* @__PURE__ */ new Map();
|
|
894
2856
|
let n = 0;
|
|
895
2857
|
const i = "___HTMLFY_SPECIAL_IGNORE_MARKER_";
|
|
896
|
-
for (const
|
|
897
|
-
const
|
|
898
|
-
`(<\\s*${
|
|
2858
|
+
for (const a of e.ignore) {
|
|
2859
|
+
const o = a.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), l = new RegExp(
|
|
2860
|
+
`(<\\s*${o}[^>]*>)(.*?)(<\\s*/\\s*${o}\\s*>)`,
|
|
899
2861
|
"gs"
|
|
900
2862
|
// global and dotAll
|
|
901
2863
|
);
|
|
902
|
-
let
|
|
2864
|
+
let h;
|
|
903
2865
|
const c = [];
|
|
904
|
-
for (; (
|
|
905
|
-
const
|
|
906
|
-
|
|
907
|
-
start:
|
|
2866
|
+
for (; (h = l.exec(s)) !== null; ) {
|
|
2867
|
+
const u = `${i}${n++}___`;
|
|
2868
|
+
r.set(u, h[2]), c.push({
|
|
2869
|
+
start: h.index + h[1].length,
|
|
908
2870
|
// start of content
|
|
909
|
-
end:
|
|
2871
|
+
end: h.index + h[1].length + h[2].length,
|
|
910
2872
|
// end of content
|
|
911
|
-
marker:
|
|
2873
|
+
marker: u
|
|
912
2874
|
});
|
|
913
2875
|
}
|
|
914
|
-
for (let
|
|
915
|
-
const
|
|
916
|
-
|
|
2876
|
+
for (let u = c.length - 1; u >= 0; u--) {
|
|
2877
|
+
const d = c[u];
|
|
2878
|
+
s = s.substring(0, d.start) + d.marker + s.substring(d.end);
|
|
917
2879
|
}
|
|
918
2880
|
}
|
|
919
|
-
return { html_with_markers:
|
|
2881
|
+
return { html_with_markers: s, extracted_map: r };
|
|
920
2882
|
}
|
|
921
|
-
function
|
|
922
|
-
|
|
923
|
-
let
|
|
924
|
-
for (const [
|
|
925
|
-
|
|
926
|
-
return
|
|
2883
|
+
function zs(t, e) {
|
|
2884
|
+
Ze({ ignored: !1 });
|
|
2885
|
+
let s = t;
|
|
2886
|
+
for (const [r, n] of e)
|
|
2887
|
+
s = s.split(r).join(n);
|
|
2888
|
+
return s;
|
|
927
2889
|
}
|
|
928
|
-
const
|
|
929
|
-
function
|
|
930
|
-
const { constants:
|
|
931
|
-
return
|
|
2890
|
+
const Ti = new RegExp(`<(${js.join("|")})(?:\\s(?:[^/>]|/(?!>))*)*>`, "g");
|
|
2891
|
+
function Ai(t) {
|
|
2892
|
+
const { constants: e } = U();
|
|
2893
|
+
return t.replace(
|
|
932
2894
|
// match only void elements that are not self-closing
|
|
933
|
-
|
|
934
|
-
(
|
|
2895
|
+
Ti,
|
|
2896
|
+
(s) => s.replace(/>$/, e.SELF_CLOSING_PLACEHOLDER)
|
|
935
2897
|
);
|
|
936
2898
|
}
|
|
937
|
-
function
|
|
938
|
-
const { constants:
|
|
939
|
-
return
|
|
2899
|
+
function Ri(t) {
|
|
2900
|
+
const { constants: e } = U();
|
|
2901
|
+
return t.replace(e.SELF_CLOSING_PLACEHOLDER, ">");
|
|
940
2902
|
}
|
|
941
|
-
const
|
|
942
|
-
`).replace(/ /g, "\r").replace(/ /g, " ").replace(/\s+/g, " "),
|
|
943
|
-
let
|
|
944
|
-
const
|
|
945
|
-
let
|
|
946
|
-
const { checked_html:
|
|
947
|
-
if (!
|
|
948
|
-
const o =
|
|
2903
|
+
const Ni = (t, e = !1) => (t = t.replace(/<\s*textarea[^>]*>((.|\n)*?)<s*\/\s*textarea\s*>/g, (s, r) => s.replace(r, (n) => n.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\n/g, " ").replace(/\r/g, " ").replace(/\s/g, " "))), e && (t = t.replace(/<\s*textarea[^>]*>(.|\n)*?<\s*\/\s*textarea\s*>/g, (s) => s.replace(/\s+/g, " ").replace(/\s>/g, ">").replace(/>\s/g, ">").replace(/\s</g, "<").replace(/<\s/g, "<").replace(/<\/\s/g, "</").replace(/class=["']\s/g, (r) => r.replace(/\s/g, "")).replace(/(class=.*)\s(["'])/g, "$1$2"))), t), Li = (t) => t = t.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g, (e, s) => e.replace(s, (r) => (r = r.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/ /g, `
|
|
2904
|
+
`).replace(/ /g, "\r").replace(/ /g, " ").replace(/\s+/g, " "), r)));
|
|
2905
|
+
let Zt;
|
|
2906
|
+
const Mi = (t, e) => {
|
|
2907
|
+
let s = !1;
|
|
2908
|
+
const { checked_html: r, ignored: n, constants: i } = U();
|
|
2909
|
+
if (!r && !Ds(t)) return t;
|
|
2910
|
+
const o = U().config.ignore.length > 0;
|
|
949
2911
|
if (!n && o) {
|
|
950
|
-
const { html_with_markers:
|
|
951
|
-
|
|
2912
|
+
const { html_with_markers: l, extracted_map: h } = Ws(t);
|
|
2913
|
+
t = l, Zt = h, s = !0;
|
|
952
2914
|
}
|
|
953
|
-
return
|
|
2915
|
+
return t = Ni(t, !0), t = t.replace(/\n|\t/g, ""), t = t.replace(/>\s+</g, "><"), t = t.replace(/ {2,}/g, " "), t = t.replace(
|
|
2916
|
+
/(\S) (<[a-zA-Z][a-zA-Z0-9_:-]*)/g,
|
|
2917
|
+
"$1___MINIFY-PROTECTED-SPACE___$2"
|
|
2918
|
+
), t = t.replace(
|
|
2919
|
+
/(<\/[a-zA-Z][a-zA-Z0-9_:-]*>) (\S)/g,
|
|
2920
|
+
"$1___MINIFY-PROTECTED-SPACE___$2"
|
|
2921
|
+
), t = t.replace(/ >/g, ">"), t = t.replace(/ </g, "<"), t = t.replace(/> /g, ">"), t = t.replace(/< /g, "<"), t = t.replace(/<\s+\//g, "</"), t = t.replace(/<\/\s+/g, "</"), t = t.replace(new RegExp("___MINIFY-PROTECTED-SPACE___", "g"), " "), t = t.replace(/ = /g, "="), t = t.replace(
|
|
954
2922
|
/([a-zA-Z0-9_-]+)=(['"])(.*?)\2/g,
|
|
955
|
-
(
|
|
956
|
-
const
|
|
957
|
-
return `${
|
|
2923
|
+
(l, h, c, u) => {
|
|
2924
|
+
const d = u.trim();
|
|
2925
|
+
return `${h}=${c}${d}${c}`;
|
|
958
2926
|
}
|
|
959
|
-
),
|
|
960
|
-
},
|
|
2927
|
+
), t = t.trim(), t = Li(t), s && (t = zs(t, Zt)), t;
|
|
2928
|
+
}, Ge = {
|
|
961
2929
|
line: []
|
|
962
2930
|
};
|
|
963
|
-
let
|
|
964
|
-
const
|
|
965
|
-
|
|
966
|
-
let
|
|
967
|
-
const
|
|
968
|
-
|
|
969
|
-
[#-# : ${
|
|
2931
|
+
let qt;
|
|
2932
|
+
const ki = (t) => {
|
|
2933
|
+
Ge.line = [];
|
|
2934
|
+
let e = -1;
|
|
2935
|
+
const s = /(<[^>]+>)|([^<]+)/g;
|
|
2936
|
+
t.replace(s, (r, n, i) => (n ? Ge.line.push({ type: "tag", value: r }) : i && i.trim().length > 0 && Ge.line.push({ type: "text", value: r }), e++, `
|
|
2937
|
+
[#-# : ${e} : ${r} : #-#]
|
|
970
2938
|
`));
|
|
971
|
-
},
|
|
972
|
-
const { config:
|
|
973
|
-
let
|
|
974
|
-
const
|
|
975
|
-
|
|
976
|
-
let
|
|
977
|
-
const
|
|
978
|
-
let
|
|
979
|
-
const y =
|
|
980
|
-
|
|
981
|
-
const
|
|
982
|
-
if (
|
|
983
|
-
if (
|
|
984
|
-
|
|
2939
|
+
}, Ci = () => {
|
|
2940
|
+
const { config: t, constants: e } = U(), s = " ".repeat(t.tab_size), r = t.tag_wrap, n = t.content_wrap, i = t.strict;
|
|
2941
|
+
let a = "";
|
|
2942
|
+
const o = [], l = /<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g, h = /\s{1}[A-Za-z-]+(?:=".*?")?/g;
|
|
2943
|
+
Ge.line.forEach((u, d) => {
|
|
2944
|
+
let g = u.value;
|
|
2945
|
+
const f = g.startsWith("___HTMLFY_SPECIAL_IGNORE_MARKER_");
|
|
2946
|
+
let p = 0;
|
|
2947
|
+
const y = Ge.line[d - 1], E = y?.value ?? "";
|
|
2948
|
+
a += "0", d === 0 && p++, g.trim().startsWith("</") && p++, E.trim().startsWith("<!doctype") && p++, E.trim().startsWith("<!--") && p++, (E.trim().endsWith("/>") || E.trim().endsWith(e.SELF_CLOSING_PLACEHOLDER)) && p++, E.trim().startsWith("</") && p++, y?.type === "text" && p++;
|
|
2949
|
+
const w = Math.max(0, a.length - p);
|
|
2950
|
+
if (a = a.substring(0, w), u.type === "text" && /^[!,;\.]/.test(g)) {
|
|
2951
|
+
if (g.length === 1) {
|
|
2952
|
+
o[o.length - 1] = o.at(-1) + g;
|
|
985
2953
|
return;
|
|
986
|
-
} else
|
|
987
|
-
|
|
988
|
-
const
|
|
989
|
-
if (
|
|
990
|
-
|
|
2954
|
+
} else if (o[o.length - 1] = o.at(-1) + g.charAt(0), g = g.slice(1).trim(), g.length === 0) return;
|
|
2955
|
+
}
|
|
2956
|
+
const b = s.repeat(w);
|
|
2957
|
+
if (f)
|
|
2958
|
+
o.push(g);
|
|
991
2959
|
else {
|
|
992
|
-
if (i &&
|
|
2960
|
+
if (i && g.trim().startsWith("<!--"))
|
|
993
2961
|
return;
|
|
994
|
-
let
|
|
995
|
-
if (
|
|
996
|
-
|
|
997
|
-
else if (
|
|
998
|
-
l.lastIndex = 0,
|
|
999
|
-
const
|
|
1000
|
-
if (
|
|
1001
|
-
const
|
|
1002
|
-
let M =
|
|
2962
|
+
let m = g;
|
|
2963
|
+
if (m = Ri(m), u.type === "text" && n > 0 && m.length >= n)
|
|
2964
|
+
m = Oi(m, n, b);
|
|
2965
|
+
else if (r > 0 && m.length > r && l.test(m)) {
|
|
2966
|
+
l.lastIndex = 0, h.lastIndex = 0;
|
|
2967
|
+
const D = m.split(h).filter(Boolean);
|
|
2968
|
+
if (D.length >= 2) {
|
|
2969
|
+
const L = m.matchAll(h), x = b + s;
|
|
2970
|
+
let M = b + D[0] + `
|
|
1003
2971
|
`;
|
|
1004
|
-
for (const
|
|
1005
|
-
const
|
|
1006
|
-
M +=
|
|
2972
|
+
for (const I of L) {
|
|
2973
|
+
const le = I[0].trim();
|
|
2974
|
+
M += x + le + `
|
|
1007
2975
|
`;
|
|
1008
2976
|
}
|
|
1009
|
-
const
|
|
1010
|
-
M +=
|
|
2977
|
+
const me = D[0].match(/<([A-Za-z_:-]+)/), oe = me ? me[1] : "", Q = D.at(-1)?.endsWith("/>") && js.includes(oe), Ae = D[1].trim(), S = b + (i && Q ? " " : "");
|
|
2978
|
+
M += S + Ae, m = M;
|
|
1011
2979
|
} else
|
|
1012
|
-
|
|
2980
|
+
m = b + m;
|
|
1013
2981
|
} else
|
|
1014
|
-
|
|
1015
|
-
|
|
2982
|
+
m = b + m;
|
|
2983
|
+
o.push(m);
|
|
1016
2984
|
}
|
|
1017
2985
|
});
|
|
1018
|
-
let c =
|
|
2986
|
+
let c = o.join(`
|
|
1019
2987
|
`);
|
|
1020
|
-
return
|
|
2988
|
+
return r > 0 && (c = vi(c)), n > 0 && new RegExp(`/\\n[ ]*[^\\n]*${e.CONTENT_IGNORE_PLACEHOLDER}[^\\n]*\\n/`).test(c) && (c = mi(c)), c = c.replace(
|
|
1021
2989
|
/<(?<Element>[^>\s]+)[^>]*>[^<]*?[^><\/\s][^<]*?<\/\k<Element>>|<script[^>]*>[\s]*<\/script>|<([\w:\._-]+)([^>]*)><\/\2>|<([\w:\._-]+)([^>]*)>[\s]+<\/\4>/g,
|
|
1022
|
-
(
|
|
1023
|
-
), n > 0 && (c =
|
|
2990
|
+
(u) => u.includes(e.SELF_CLOSING_PLACEHOLDER) || u.includes(e.CONTENT_IGNORE_PLACEHOLDER) ? u : u.replace(/\n|\t|\s{2,}/g, "")
|
|
2991
|
+
), n > 0 && (c = bi(c)), r > 0 && (c = wi(c)), i && (c = c.replace(/\s\/>|\/>/g, ">")), c.startsWith(`
|
|
1024
2992
|
`) && (c = c.substring(1)), c.endsWith(`
|
|
1025
2993
|
`) && (c = c.substring(0, c.length - 1)), c;
|
|
1026
|
-
},
|
|
1027
|
-
let
|
|
1028
|
-
const { checked_html:
|
|
1029
|
-
if (!
|
|
1030
|
-
const i =
|
|
1031
|
-
if (i.trim.length > 0 && (
|
|
1032
|
-
const { html_with_markers:
|
|
1033
|
-
|
|
1034
|
-
}
|
|
1035
|
-
return
|
|
1036
|
-
},
|
|
1037
|
-
[null, void 0, "", !1].includes(
|
|
1038
|
-
},
|
|
1039
|
-
if (
|
|
1040
|
-
const i = document.createElement(
|
|
1041
|
-
Object.keys(
|
|
1042
|
-
|
|
1043
|
-
}),
|
|
1044
|
-
|
|
1045
|
-
}),
|
|
1046
|
-
}
|
|
1047
|
-
n && (
|
|
1048
|
-
},
|
|
1049
|
-
const
|
|
1050
|
-
if (typeof
|
|
2994
|
+
}, ji = (t, e) => {
|
|
2995
|
+
let s = !1;
|
|
2996
|
+
const { checked_html: r, ignored: n } = U();
|
|
2997
|
+
if (!r && !Ds(t)) return t;
|
|
2998
|
+
const i = xi(e || {}), a = i.ignore.length > 0;
|
|
2999
|
+
if (i.trim.length > 0 && (t = Ei(t, i.trim)), !n && a) {
|
|
3000
|
+
const { html_with_markers: o, extracted_map: l } = Ws(t);
|
|
3001
|
+
t = o, qt = l, s = !0;
|
|
3002
|
+
}
|
|
3003
|
+
return t = yi(t), t = Ai(t), t = Mi(t), ki(t), t = Ci(), t = Si(t), s && (t = zs(t, qt)), t;
|
|
3004
|
+
}, Pi = (t, e, s) => {
|
|
3005
|
+
[null, void 0, "", !1].includes(s) || ["innerHTML", "style", ""].includes(e) || t.setAttribute(e, ["object", "function"].includes(typeof s) ? "⚠️ Property must be set through a script or a framework-specific syntax." : s);
|
|
3006
|
+
}, Gs = (t, e, s, r, n) => {
|
|
3007
|
+
if (e && typeof e == "string") {
|
|
3008
|
+
const i = document.createElement(e);
|
|
3009
|
+
Object.keys(s || {}).forEach((a) => {
|
|
3010
|
+
Pi(i, a, s[a]);
|
|
3011
|
+
}), r?.forEach((a) => {
|
|
3012
|
+
Gs(i, a.$tag$, a.$attrs$, a.$children$, a.$text$);
|
|
3013
|
+
}), s?.innerHTML && (i.innerHTML = s.innerHTML), t.appendChild(i);
|
|
3014
|
+
}
|
|
3015
|
+
n && (t.innerHTML = n);
|
|
3016
|
+
}, ga = (t, e, s = []) => {
|
|
3017
|
+
const r = {};
|
|
3018
|
+
if (typeof t != "object")
|
|
1051
3019
|
throw new Error("filterArgs - args isn't an object.");
|
|
1052
|
-
for (const n in
|
|
1053
|
-
if (!
|
|
1054
|
-
const i =
|
|
1055
|
-
(!
|
|
3020
|
+
for (const n in t)
|
|
3021
|
+
if (!s.includes(n)) {
|
|
3022
|
+
const i = t[n], a = n.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
3023
|
+
(!e || !Object.keys(e).includes(n) || e[n] !== i) && (r[a] = i);
|
|
1056
3024
|
}
|
|
1057
|
-
return
|
|
1058
|
-
},
|
|
1059
|
-
const
|
|
1060
|
-
if (
|
|
1061
|
-
return document.querySelector("[lang]")?.setAttribute("lang",
|
|
3025
|
+
return r;
|
|
3026
|
+
}, da = (t, e) => {
|
|
3027
|
+
const s = document.getElementById("storybook-root");
|
|
3028
|
+
if (s !== null)
|
|
3029
|
+
return document.querySelector("[lang]")?.setAttribute("lang", e.globals?.locale || "en"), di({
|
|
1062
3030
|
$cmpMeta$: {
|
|
1063
3031
|
$flags$: 0,
|
|
1064
|
-
$tagName$:
|
|
3032
|
+
$tagName$: s.tagName
|
|
1065
3033
|
},
|
|
1066
|
-
$hostElement$:
|
|
1067
|
-
}, e
|
|
1068
|
-
},
|
|
3034
|
+
$hostElement$: s
|
|
3035
|
+
}, t(e)), s.children[s.children.length - 1];
|
|
3036
|
+
}, $a = ({ $tag$: t, $attrs$: e, $children$: s, $text$: r }) => {
|
|
1069
3037
|
const n = document.createElement("div");
|
|
1070
|
-
return
|
|
3038
|
+
return Gs(n, t, e, s, r), ji(n.innerHTML, {
|
|
1071
3039
|
tag_wrap: 40,
|
|
1072
3040
|
content_wrap: 120
|
|
1073
3041
|
}).replace(/="true"/g, "");
|
|
1074
|
-
},
|
|
1075
|
-
if (!
|
|
3042
|
+
}, Jt = (t, e) => {
|
|
3043
|
+
if (!e)
|
|
1076
3044
|
return;
|
|
1077
|
-
const
|
|
1078
|
-
return `${
|
|
3045
|
+
const s = e.split("/");
|
|
3046
|
+
return `${t}${s.slice(2, s.length - 1).join("-")}--docs`;
|
|
1079
3047
|
};
|
|
1080
|
-
class
|
|
3048
|
+
class va {
|
|
1081
3049
|
/**
|
|
1082
3050
|
* JsonDocs
|
|
1083
3051
|
*/
|
|
1084
3052
|
jsonDoc;
|
|
1085
|
-
constructor(
|
|
1086
|
-
this.jsonDoc =
|
|
3053
|
+
constructor(e) {
|
|
3054
|
+
this.jsonDoc = e;
|
|
1087
3055
|
}
|
|
1088
3056
|
/**
|
|
1089
3057
|
* Get component data from the jsonDoc
|
|
1090
3058
|
* @param tagName - tag name we want to get the data from
|
|
1091
3059
|
* @returns component data
|
|
1092
3060
|
*/
|
|
1093
|
-
#e = (
|
|
3061
|
+
#e = (e) => this.jsonDoc.components.find((s) => s.tag === e);
|
|
1094
3062
|
/**
|
|
1095
3063
|
* Get the control for the given prop
|
|
1096
3064
|
* Based on https://storybook.js.org/docs/api/arg-types#controltype
|
|
1097
3065
|
* @param prop - prop to get control for
|
|
1098
3066
|
* @returns control type and options if applicable
|
|
1099
3067
|
*/
|
|
1100
|
-
#t = (
|
|
1101
|
-
const
|
|
1102
|
-
return
|
|
3068
|
+
#t = (e) => {
|
|
3069
|
+
const s = e.type.replace(/"([^"]+)"/g, "$1").replace(/\s/g, "").replace(/\(.*?\)/g, (r) => r.replace(/\|/g, " OR ")).split("|").map((r) => r.trim().replace(/ OR /g, "|"));
|
|
3070
|
+
return e.type === "string" ? { control: { type: "text" } } : e.type === "number" ? { control: { type: "number" } } : e.type === "boolean" ? { control: { type: "boolean" } } : e.type.startsWith("{") && e.type.endsWith("}") ? { control: { type: "object" } } : s.length > 1 ? s.includes("string") ? { control: { type: "text" } } : s.every((r) => r?.includes("[]")) ? { control: { type: "object" } } : (s.unshift(void 0), { control: { type: "select" }, options: s }) : { control: { type: "object" } };
|
|
1103
3071
|
};
|
|
1104
3072
|
/**
|
|
1105
3073
|
* Extract component arg types from the component data
|
|
1106
3074
|
* @param tagName - tag name we want to extract the arg types from
|
|
1107
3075
|
* @returns component arg types
|
|
1108
3076
|
*/
|
|
1109
|
-
extractArgTypes = (
|
|
1110
|
-
const
|
|
1111
|
-
const { control:
|
|
3077
|
+
extractArgTypes = (e) => {
|
|
3078
|
+
const s = this.#e(e), r = s?.props.reduce((c, u) => {
|
|
3079
|
+
const { control: d, options: g } = this.#t(u);
|
|
1112
3080
|
return {
|
|
1113
3081
|
...c,
|
|
1114
|
-
[
|
|
1115
|
-
name:
|
|
1116
|
-
description:
|
|
1117
|
-
type: { required:
|
|
3082
|
+
[u.name]: {
|
|
3083
|
+
name: u.attr || u.name,
|
|
3084
|
+
description: u.docs,
|
|
3085
|
+
type: { required: u.required },
|
|
1118
3086
|
table: {
|
|
1119
3087
|
category: "props",
|
|
1120
|
-
type: { summary:
|
|
1121
|
-
defaultValue: { summary:
|
|
3088
|
+
type: { summary: u.type },
|
|
3089
|
+
defaultValue: { summary: u.default }
|
|
1122
3090
|
},
|
|
1123
|
-
control:
|
|
1124
|
-
options:
|
|
3091
|
+
control: d,
|
|
3092
|
+
options: g
|
|
1125
3093
|
}
|
|
1126
3094
|
};
|
|
1127
|
-
}, {}), n =
|
|
3095
|
+
}, {}), n = s?.events.reduce((c, u) => ({
|
|
1128
3096
|
...c,
|
|
1129
|
-
[
|
|
1130
|
-
name:
|
|
1131
|
-
description:
|
|
3097
|
+
[u.event]: {
|
|
3098
|
+
name: u.event,
|
|
3099
|
+
description: u.docs,
|
|
1132
3100
|
table: {
|
|
1133
3101
|
category: "events",
|
|
1134
|
-
type: { summary:
|
|
3102
|
+
type: { summary: u.detail }
|
|
1135
3103
|
}
|
|
1136
3104
|
}
|
|
1137
|
-
}), {}), i =
|
|
3105
|
+
}), {}), i = s?.methods.reduce((c, u) => ({
|
|
1138
3106
|
...c,
|
|
1139
|
-
[
|
|
1140
|
-
name:
|
|
1141
|
-
description:
|
|
3107
|
+
[u.name]: {
|
|
3108
|
+
name: u.name,
|
|
3109
|
+
description: u.docs,
|
|
1142
3110
|
table: {
|
|
1143
3111
|
category: "methods",
|
|
1144
|
-
type: { summary:
|
|
3112
|
+
type: { summary: u.signature }
|
|
1145
3113
|
}
|
|
1146
3114
|
}
|
|
1147
|
-
}), {}),
|
|
3115
|
+
}), {}), a = s?.slots.reduce((c, u) => ({
|
|
1148
3116
|
...c,
|
|
1149
|
-
[
|
|
1150
|
-
name:
|
|
3117
|
+
[u.name]: {
|
|
3118
|
+
name: u.name !== "" ? u.name : "default",
|
|
1151
3119
|
// default slot are unnamed
|
|
1152
|
-
description:
|
|
3120
|
+
description: u.docs,
|
|
1153
3121
|
table: {
|
|
1154
3122
|
category: "slots",
|
|
1155
3123
|
type: { summary: void 0 }
|
|
1156
3124
|
}
|
|
1157
3125
|
}
|
|
1158
|
-
}), {}),
|
|
3126
|
+
}), {}), o = s?.styles.reduce((c, u) => ({
|
|
1159
3127
|
...c,
|
|
1160
|
-
[
|
|
1161
|
-
name:
|
|
1162
|
-
description:
|
|
3128
|
+
[u.name]: {
|
|
3129
|
+
name: u.name,
|
|
3130
|
+
description: u.docs,
|
|
1163
3131
|
table: {
|
|
1164
3132
|
category: "custom properties",
|
|
1165
3133
|
type: { summary: void 0 }
|
|
1166
3134
|
}
|
|
1167
3135
|
}
|
|
1168
|
-
}), {}), l =
|
|
1169
|
-
const
|
|
1170
|
-
return
|
|
3136
|
+
}), {}), l = s?.dependencies.reduce((c, u) => {
|
|
3137
|
+
const d = this.#e(u);
|
|
3138
|
+
return d ? {
|
|
1171
3139
|
...c,
|
|
1172
|
-
[
|
|
1173
|
-
name:
|
|
1174
|
-
description: `<a href="./?path=/docs/${
|
|
3140
|
+
[u]: {
|
|
3141
|
+
name: u,
|
|
3142
|
+
description: `<a href="./?path=/docs/${Jt("", d?.filePath)}">View Component Documentation</a>`,
|
|
1175
3143
|
table: {
|
|
1176
3144
|
category: "depends on",
|
|
1177
3145
|
type: { summary: void 0 }
|
|
1178
3146
|
}
|
|
1179
3147
|
}
|
|
1180
3148
|
} : c;
|
|
1181
|
-
}, {}),
|
|
1182
|
-
const
|
|
1183
|
-
return
|
|
3149
|
+
}, {}), h = s?.dependents.reduce((c, u) => {
|
|
3150
|
+
const d = this.#e(u);
|
|
3151
|
+
return d ? {
|
|
1184
3152
|
...c,
|
|
1185
|
-
[
|
|
1186
|
-
name:
|
|
1187
|
-
description: `<a href="./?path=/docs/${
|
|
3153
|
+
[u]: {
|
|
3154
|
+
name: u,
|
|
3155
|
+
description: `<a href="./?path=/docs/${Jt("", d?.filePath)}">View Component Documentation</a>`,
|
|
1188
3156
|
table: {
|
|
1189
3157
|
category: "used by",
|
|
1190
3158
|
type: { summary: void 0 }
|
|
@@ -1193,13 +3161,13 @@ class mr {
|
|
|
1193
3161
|
} : c;
|
|
1194
3162
|
}, {});
|
|
1195
3163
|
return {
|
|
1196
|
-
...
|
|
3164
|
+
...r,
|
|
1197
3165
|
...n,
|
|
1198
3166
|
...i,
|
|
1199
|
-
...o,
|
|
1200
3167
|
...a,
|
|
3168
|
+
...o,
|
|
1201
3169
|
...l,
|
|
1202
|
-
...
|
|
3170
|
+
...h
|
|
1203
3171
|
};
|
|
1204
3172
|
};
|
|
1205
3173
|
/**
|
|
@@ -1207,25 +3175,25 @@ class mr {
|
|
|
1207
3175
|
* @param tagName - tag name we want to extract the description from
|
|
1208
3176
|
* @returns component description
|
|
1209
3177
|
*/
|
|
1210
|
-
extractComponentDescription = (
|
|
1211
|
-
const
|
|
1212
|
-
return
|
|
3178
|
+
extractComponentDescription = (e) => {
|
|
3179
|
+
const s = this.#e(e);
|
|
3180
|
+
return s?.readme || s?.docs;
|
|
1213
3181
|
};
|
|
1214
3182
|
}
|
|
1215
|
-
const
|
|
1216
|
-
class
|
|
3183
|
+
const _a = ({ disconnect: t, observe: e, takeRecords: s }) => {
|
|
3184
|
+
class r {
|
|
1217
3185
|
/**
|
|
1218
3186
|
*
|
|
1219
3187
|
*/
|
|
1220
|
-
disconnect =
|
|
3188
|
+
disconnect = t;
|
|
1221
3189
|
/**
|
|
1222
3190
|
*
|
|
1223
3191
|
*/
|
|
1224
|
-
observe =
|
|
3192
|
+
observe = e;
|
|
1225
3193
|
/**
|
|
1226
3194
|
*
|
|
1227
3195
|
*/
|
|
1228
|
-
takeRecords =
|
|
3196
|
+
takeRecords = s;
|
|
1229
3197
|
/**
|
|
1230
3198
|
*
|
|
1231
3199
|
*/
|
|
@@ -1238,19 +3206,19 @@ const vr = ({ disconnect: e, observe: t, takeRecords: r }) => {
|
|
|
1238
3206
|
Object.defineProperty(n, "MutationObserver", {
|
|
1239
3207
|
writable: !0,
|
|
1240
3208
|
configurable: !0,
|
|
1241
|
-
value:
|
|
3209
|
+
value: r
|
|
1242
3210
|
});
|
|
1243
|
-
}),
|
|
1244
|
-
},
|
|
1245
|
-
class
|
|
3211
|
+
}), r;
|
|
3212
|
+
}, ma = ({ disconnect: t, observe: e }) => {
|
|
3213
|
+
class s {
|
|
1246
3214
|
/**
|
|
1247
3215
|
*
|
|
1248
3216
|
*/
|
|
1249
|
-
disconnect =
|
|
3217
|
+
disconnect = t;
|
|
1250
3218
|
/**
|
|
1251
3219
|
*
|
|
1252
3220
|
*/
|
|
1253
|
-
observe =
|
|
3221
|
+
observe = e;
|
|
1254
3222
|
/**
|
|
1255
3223
|
*
|
|
1256
3224
|
*/
|
|
@@ -1263,81 +3231,81 @@ const vr = ({ disconnect: e, observe: t, takeRecords: r }) => {
|
|
|
1263
3231
|
this.cb = n;
|
|
1264
3232
|
}
|
|
1265
3233
|
}
|
|
1266
|
-
return [window, global].forEach((
|
|
1267
|
-
Object.defineProperty(
|
|
3234
|
+
return [window, global].forEach((r) => {
|
|
3235
|
+
Object.defineProperty(r, "ResizeObserver", {
|
|
1268
3236
|
writable: !0,
|
|
1269
3237
|
configurable: !0,
|
|
1270
|
-
value:
|
|
3238
|
+
value: s
|
|
1271
3239
|
});
|
|
1272
|
-
}),
|
|
3240
|
+
}), s;
|
|
1273
3241
|
};
|
|
1274
|
-
class
|
|
3242
|
+
class Di extends Event {
|
|
1275
3243
|
/**
|
|
1276
3244
|
*
|
|
1277
3245
|
*/
|
|
1278
3246
|
detail;
|
|
1279
3247
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1280
3248
|
}
|
|
1281
|
-
const
|
|
1282
|
-
class
|
|
3249
|
+
const ya = () => {
|
|
3250
|
+
class t extends Di {
|
|
1283
3251
|
}
|
|
1284
|
-
return [window, global].forEach((
|
|
1285
|
-
Object.defineProperty(
|
|
3252
|
+
return [window, global].forEach((e) => {
|
|
3253
|
+
Object.defineProperty(e, "SubmitEvent", {
|
|
1286
3254
|
writable: !0,
|
|
1287
3255
|
configurable: !0,
|
|
1288
|
-
value:
|
|
3256
|
+
value: t
|
|
1289
3257
|
});
|
|
1290
|
-
}),
|
|
1291
|
-
},
|
|
1292
|
-
const
|
|
1293
|
-
return [window, global].forEach((
|
|
1294
|
-
Object.defineProperty(
|
|
3258
|
+
}), t;
|
|
3259
|
+
}, Ea = (t) => {
|
|
3260
|
+
const e = (s) => (setTimeout(s, 1), t(), 0);
|
|
3261
|
+
return [window, global].forEach((s) => {
|
|
3262
|
+
Object.defineProperty(s, "requestAnimationFrame", {
|
|
1295
3263
|
writable: !0,
|
|
1296
3264
|
configurable: !0,
|
|
1297
|
-
value:
|
|
3265
|
+
value: e
|
|
1298
3266
|
});
|
|
1299
|
-
}),
|
|
3267
|
+
}), e;
|
|
1300
3268
|
};
|
|
1301
3269
|
export {
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
3270
|
+
Ii as ClassList,
|
|
3271
|
+
Zi as Cursor,
|
|
3272
|
+
Us as Page,
|
|
3273
|
+
qi as Paginate,
|
|
3274
|
+
va as StorybookPreview,
|
|
3275
|
+
Wi as allItemsAreString,
|
|
3276
|
+
Gi as cleanString,
|
|
3277
|
+
Hi as createID,
|
|
3278
|
+
Ji as dateRegExp,
|
|
3279
|
+
Xi as dateToString,
|
|
3280
|
+
ua as defineLocales,
|
|
3281
|
+
ga as filterArgs,
|
|
3282
|
+
Ki as focusableElements,
|
|
3283
|
+
Bi as formatID,
|
|
3284
|
+
aa as getLocaleDatePattern,
|
|
3285
|
+
Hs as getObjectValueFromKey,
|
|
3286
|
+
Yt as getParentWindows,
|
|
3287
|
+
$a as getStoryHTML,
|
|
3288
|
+
Jt as getStorybookUrl,
|
|
3289
|
+
Vi as getWindows,
|
|
3290
|
+
at as isObject,
|
|
3291
|
+
Yi as isTagName,
|
|
3292
|
+
Qi as isValidNumber,
|
|
3293
|
+
Fs as isValidString,
|
|
3294
|
+
Fi as isValideID,
|
|
3295
|
+
oa as localeCurrency,
|
|
3296
|
+
Vr as localeDate,
|
|
3297
|
+
la as localeNumber,
|
|
3298
|
+
ca as localePercent,
|
|
3299
|
+
ha as localeUnit,
|
|
3300
|
+
Ui as nextTick,
|
|
3301
|
+
Ea as setUpRequestAnimationFrameMock,
|
|
3302
|
+
_a as setupMutationObserverMock,
|
|
3303
|
+
ma as setupResizeObserverMock,
|
|
3304
|
+
ya as setupSubmitEventMock,
|
|
3305
|
+
da as stencilWrapper,
|
|
3306
|
+
zi as toString,
|
|
3307
|
+
ia as vsCodeCssGenerator,
|
|
3308
|
+
na as vsCodeGenerator,
|
|
3309
|
+
ra as webTypesGenerator
|
|
1342
3310
|
};
|
|
1343
3311
|
//# sourceMappingURL=index.es.js.map
|