vite-plugin-vue-devtools 7.2.1 → 7.3.0-beta.1

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.
@@ -1,2040 +0,0 @@
1
- const Fe = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/, Ve = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/, He = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
2
- function Ge(e, t) {
3
- if (e === "__proto__" || e === "constructor" && t && typeof t == "object" && "prototype" in t) {
4
- Be(e);
5
- return;
6
- }
7
- return t;
8
- }
9
- function Be(e) {
10
- console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`);
11
- }
12
- function ze(e, t = {}) {
13
- if (typeof e != "string")
14
- return e;
15
- const n = e.trim();
16
- if (
17
- // eslint-disable-next-line unicorn/prefer-at
18
- e[0] === '"' && e.endsWith('"') && !e.includes("\\")
19
- )
20
- return n.slice(1, -1);
21
- if (n.length <= 9) {
22
- const s = n.toLowerCase();
23
- if (s === "true")
24
- return !0;
25
- if (s === "false")
26
- return !1;
27
- if (s === "undefined")
28
- return;
29
- if (s === "null")
30
- return null;
31
- if (s === "nan")
32
- return Number.NaN;
33
- if (s === "infinity")
34
- return Number.POSITIVE_INFINITY;
35
- if (s === "-infinity")
36
- return Number.NEGATIVE_INFINITY;
37
- }
38
- if (!He.test(e)) {
39
- if (t.strict)
40
- throw new SyntaxError("[destr] Invalid JSON");
41
- return e;
42
- }
43
- try {
44
- if (Fe.test(e) || Ve.test(e)) {
45
- if (t.strict)
46
- throw new Error("[destr] Possible prototype pollution");
47
- return JSON.parse(e, Ge);
48
- }
49
- return JSON.parse(e);
50
- } catch (s) {
51
- if (t.strict)
52
- throw s;
53
- return e;
54
- }
55
- }
56
- const qe = /#/g, We = /&/g, Ke = /\//g, Je = /=/g, se = /\+/g, Xe = /%5e/gi, Qe = /%60/gi, Ye = /%7c/gi, Ze = /%20/gi;
57
- function et(e) {
58
- return encodeURI("" + e).replace(Ye, "|");
59
- }
60
- function ee(e) {
61
- return et(typeof e == "string" ? e : JSON.stringify(e)).replace(se, "%2B").replace(Ze, "+").replace(qe, "%23").replace(We, "%26").replace(Qe, "`").replace(Xe, "^").replace(Ke, "%2F");
62
- }
63
- function J(e) {
64
- return ee(e).replace(Je, "%3D");
65
- }
66
- function Ee(e = "") {
67
- try {
68
- return decodeURIComponent("" + e);
69
- } catch {
70
- return "" + e;
71
- }
72
- }
73
- function tt(e) {
74
- return Ee(e.replace(se, " "));
75
- }
76
- function nt(e) {
77
- return Ee(e.replace(se, " "));
78
- }
79
- function st(e = "") {
80
- const t = {};
81
- e[0] === "?" && (e = e.slice(1));
82
- for (const n of e.split("&")) {
83
- const s = n.match(/([^=]+)=?(.*)/) || [];
84
- if (s.length < 2)
85
- continue;
86
- const o = tt(s[1]);
87
- if (o === "__proto__" || o === "constructor")
88
- continue;
89
- const r = nt(s[2] || "");
90
- t[o] === void 0 ? t[o] = r : Array.isArray(t[o]) ? t[o].push(r) : t[o] = [t[o], r];
91
- }
92
- return t;
93
- }
94
- function ot(e, t) {
95
- return (typeof t == "number" || typeof t == "boolean") && (t = String(t)), t ? Array.isArray(t) ? t.map((n) => `${J(e)}=${ee(n)}`).join("&") : `${J(e)}=${ee(t)}` : J(e);
96
- }
97
- function rt(e) {
98
- return Object.keys(e).filter((t) => e[t] !== void 0).map((t) => ot(t, e[t])).filter(Boolean).join("&");
99
- }
100
- const it = /^[\s\w\0+.-]{2,}:([/\\]{1,2})/, at = /^[\s\w\0+.-]{2,}:([/\\]{2})?/, ct = /^([/\\]\s*){2,}[^/\\]/, lt = /\/$|\/\?|\/#/, ut = /^\.?\//;
101
- function xe(e, t = {}) {
102
- return typeof t == "boolean" && (t = { acceptRelative: t }), t.strict ? it.test(e) : at.test(e) || (t.acceptRelative ? ct.test(e) : !1);
103
- }
104
- function te(e = "", t) {
105
- return t ? lt.test(e) : e.endsWith("/");
106
- }
107
- function ft(e = "", t) {
108
- if (!t)
109
- return (te(e) ? e.slice(0, -1) : e) || "/";
110
- if (!te(e, !0))
111
- return e || "/";
112
- let n = e, s = "";
113
- const o = e.indexOf("#");
114
- o >= 0 && (n = e.slice(0, o), s = e.slice(o));
115
- const [r, ...a] = n.split("?");
116
- return ((r.endsWith("/") ? r.slice(0, -1) : r) || "/") + (a.length > 0 ? `?${a.join("?")}` : "") + s;
117
- }
118
- function pt(e = "", t) {
119
- if (!t)
120
- return e.endsWith("/") ? e : e + "/";
121
- if (te(e, !0))
122
- return e || "/";
123
- let n = e, s = "";
124
- const o = e.indexOf("#");
125
- if (o >= 0 && (n = e.slice(0, o), s = e.slice(o), !n))
126
- return s;
127
- const [r, ...a] = n.split("?");
128
- return r + "/" + (a.length > 0 ? `?${a.join("?")}` : "") + s;
129
- }
130
- function dt(e, t) {
131
- if (ht(t) || xe(e))
132
- return e;
133
- const n = ft(t);
134
- return e.startsWith(n) ? e : gt(n, e);
135
- }
136
- function mt(e, t) {
137
- const n = Ce(e), s = { ...st(n.search), ...t };
138
- return n.search = rt(s), yt(n);
139
- }
140
- function ht(e) {
141
- return !e || e === "/";
142
- }
143
- function _t(e) {
144
- return e && e !== "/";
145
- }
146
- function gt(e, ...t) {
147
- let n = e || "";
148
- for (const s of t.filter((o) => _t(o)))
149
- if (n) {
150
- const o = s.replace(ut, "");
151
- n = pt(n) + o;
152
- } else
153
- n = s;
154
- return n;
155
- }
156
- const Ae = Symbol.for("ufo:protocolRelative");
157
- function Ce(e = "", t) {
158
- const n = e.match(
159
- /^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i
160
- );
161
- if (n) {
162
- const [, u, d = ""] = n;
163
- return {
164
- protocol: u.toLowerCase(),
165
- pathname: d,
166
- href: u + d,
167
- auth: "",
168
- host: "",
169
- search: "",
170
- hash: ""
171
- };
172
- }
173
- if (!xe(e, { acceptRelative: !0 }))
174
- return t ? Ce(t + e) : ae(e);
175
- const [, s = "", o, r = ""] = e.replace(/\\/g, "/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/) || [], [, a = "", l = ""] = r.match(/([^#/?]*)(.*)?/) || [], { pathname: c, search: f, hash: i } = ae(
176
- l.replace(/\/(?=[A-Za-z]:)/, "")
177
- );
178
- return {
179
- protocol: s.toLowerCase(),
180
- auth: o ? o.slice(0, Math.max(0, o.length - 1)) : "",
181
- host: a,
182
- pathname: c,
183
- search: f,
184
- hash: i,
185
- [Ae]: !s
186
- };
187
- }
188
- function ae(e = "") {
189
- const [t = "", n = "", s = ""] = (e.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1);
190
- return {
191
- pathname: t,
192
- search: n,
193
- hash: s
194
- };
195
- }
196
- function yt(e) {
197
- const t = e.pathname || "", n = e.search ? (e.search.startsWith("?") ? "" : "?") + e.search : "", s = e.hash || "", o = e.auth ? e.auth + "@" : "", r = e.host || "";
198
- return (e.protocol || e[Ae] ? (e.protocol || "") + "//" : "") + o + r + t + n + s;
199
- }
200
- class bt extends Error {
201
- constructor(t, n) {
202
- super(t, n), this.name = "FetchError", n != null && n.cause && !this.cause && (this.cause = n.cause);
203
- }
204
- }
205
- function vt(e) {
206
- var c, f, i, u, d;
207
- const t = ((c = e.error) == null ? void 0 : c.message) || ((f = e.error) == null ? void 0 : f.toString()) || "", n = ((i = e.request) == null ? void 0 : i.method) || ((u = e.options) == null ? void 0 : u.method) || "GET", s = ((d = e.request) == null ? void 0 : d.url) || String(e.request) || "/", o = `[${n}] ${JSON.stringify(s)}`, r = e.response ? `${e.response.status} ${e.response.statusText}` : "<no response>", a = `${o}: ${r}${t ? ` ${t}` : ""}`, l = new bt(
208
- a,
209
- e.error ? { cause: e.error } : void 0
210
- );
211
- for (const m of ["request", "options", "response"])
212
- Object.defineProperty(l, m, {
213
- get() {
214
- return e[m];
215
- }
216
- });
217
- for (const [m, h] of [
218
- ["data", "_data"],
219
- ["status", "status"],
220
- ["statusCode", "status"],
221
- ["statusText", "statusText"],
222
- ["statusMessage", "statusText"]
223
- ])
224
- Object.defineProperty(l, m, {
225
- get() {
226
- return e.response && e.response[h];
227
- }
228
- });
229
- return l;
230
- }
231
- const wt = new Set(
232
- Object.freeze(["PATCH", "POST", "PUT", "DELETE"])
233
- );
234
- function ce(e = "GET") {
235
- return wt.has(e.toUpperCase());
236
- }
237
- function St(e) {
238
- if (e === void 0)
239
- return !1;
240
- const t = typeof e;
241
- return t === "string" || t === "number" || t === "boolean" || t === null ? !0 : t !== "object" ? !1 : Array.isArray(e) ? !0 : e.buffer ? !1 : e.constructor && e.constructor.name === "Object" || typeof e.toJSON == "function";
242
- }
243
- const Et = /* @__PURE__ */ new Set([
244
- "image/svg",
245
- "application/xml",
246
- "application/xhtml",
247
- "application/html"
248
- ]), xt = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;
249
- function At(e = "") {
250
- if (!e)
251
- return "json";
252
- const t = e.split(";").shift() || "";
253
- return xt.test(t) ? "json" : Et.has(t) || t.startsWith("text/") ? "text" : "blob";
254
- }
255
- function Ct(e, t, n = globalThis.Headers) {
256
- const s = {
257
- ...t,
258
- ...e
259
- };
260
- if (t != null && t.params && (e != null && e.params) && (s.params = {
261
- ...t == null ? void 0 : t.params,
262
- ...e == null ? void 0 : e.params
263
- }), t != null && t.query && (e != null && e.query) && (s.query = {
264
- ...t == null ? void 0 : t.query,
265
- ...e == null ? void 0 : e.query
266
- }), t != null && t.headers && (e != null && e.headers)) {
267
- s.headers = new n((t == null ? void 0 : t.headers) || {});
268
- for (const [o, r] of new n((e == null ? void 0 : e.headers) || {}))
269
- s.headers.set(o, r);
270
- }
271
- return s;
272
- }
273
- const Ot = /* @__PURE__ */ new Set([
274
- 408,
275
- // Request Timeout
276
- 409,
277
- // Conflict
278
- 425,
279
- // Too Early
280
- 429,
281
- // Too Many Requests
282
- 500,
283
- // Internal Server Error
284
- 502,
285
- // Bad Gateway
286
- 503,
287
- // Service Unavailable
288
- 504
289
- // Gateway Timeout
290
- ]), kt = /* @__PURE__ */ new Set([101, 204, 205, 304]);
291
- function Oe(e = {}) {
292
- const {
293
- fetch: t = globalThis.fetch,
294
- Headers: n = globalThis.Headers,
295
- AbortController: s = globalThis.AbortController
296
- } = e;
297
- async function o(l) {
298
- const c = l.error && l.error.name === "AbortError" && !l.options.timeout || !1;
299
- if (l.options.retry !== !1 && !c) {
300
- let i;
301
- typeof l.options.retry == "number" ? i = l.options.retry : i = ce(l.options.method) ? 0 : 1;
302
- const u = l.response && l.response.status || 500;
303
- if (i > 0 && (Array.isArray(l.options.retryStatusCodes) ? l.options.retryStatusCodes.includes(u) : Ot.has(u))) {
304
- const d = l.options.retryDelay || 0;
305
- return d > 0 && await new Promise((m) => setTimeout(m, d)), r(l.request, {
306
- ...l.options,
307
- retry: i - 1
308
- });
309
- }
310
- }
311
- const f = vt(l);
312
- throw Error.captureStackTrace && Error.captureStackTrace(f, r), f;
313
- }
314
- const r = async function(c, f = {}) {
315
- var m;
316
- const i = {
317
- request: c,
318
- options: Ct(f, e.defaults, n),
319
- response: void 0,
320
- error: void 0
321
- };
322
- i.options.method = (m = i.options.method) == null ? void 0 : m.toUpperCase(), i.options.onRequest && await i.options.onRequest(i), typeof i.request == "string" && (i.options.baseURL && (i.request = dt(i.request, i.options.baseURL)), (i.options.query || i.options.params) && (i.request = mt(i.request, {
323
- ...i.options.params,
324
- ...i.options.query
325
- }))), i.options.body && ce(i.options.method) && (St(i.options.body) ? (i.options.body = typeof i.options.body == "string" ? i.options.body : JSON.stringify(i.options.body), i.options.headers = new n(i.options.headers || {}), i.options.headers.has("content-type") || i.options.headers.set("content-type", "application/json"), i.options.headers.has("accept") || i.options.headers.set("accept", "application/json")) : (
326
- // ReadableStream Body
327
- ("pipeTo" in i.options.body && typeof i.options.body.pipeTo == "function" || // Node.js Stream Body
328
- typeof i.options.body.pipe == "function") && ("duplex" in i.options || (i.options.duplex = "half"))
329
- ));
330
- let u;
331
- if (!i.options.signal && i.options.timeout) {
332
- const h = new s();
333
- u = setTimeout(
334
- () => h.abort(),
335
- i.options.timeout
336
- ), i.options.signal = h.signal;
337
- }
338
- try {
339
- i.response = await t(
340
- i.request,
341
- i.options
342
- );
343
- } catch (h) {
344
- return i.error = h, i.options.onRequestError && await i.options.onRequestError(i), await o(i);
345
- } finally {
346
- u && clearTimeout(u);
347
- }
348
- if (i.response.body && !kt.has(i.response.status) && i.options.method !== "HEAD") {
349
- const h = (i.options.parseResponse ? "json" : i.options.responseType) || At(i.response.headers.get("content-type") || "");
350
- switch (h) {
351
- case "json": {
352
- const _ = await i.response.text(), b = i.options.parseResponse || ze;
353
- i.response._data = b(_);
354
- break;
355
- }
356
- case "stream": {
357
- i.response._data = i.response.body;
358
- break;
359
- }
360
- default:
361
- i.response._data = await i.response[h]();
362
- }
363
- }
364
- return i.options.onResponse && await i.options.onResponse(i), !i.options.ignoreResponseError && i.response.status >= 400 && i.response.status < 600 ? (i.options.onResponseError && await i.options.onResponseError(i), await o(i)) : i.response;
365
- }, a = async function(c, f) {
366
- return (await r(c, f))._data;
367
- };
368
- return a.raw = r, a.native = (...l) => t(...l), a.create = (l = {}) => Oe({
369
- ...e,
370
- defaults: {
371
- ...e.defaults,
372
- ...l
373
- }
374
- }), a;
375
- }
376
- const oe = function() {
377
- if (typeof globalThis < "u")
378
- return globalThis;
379
- if (typeof self < "u")
380
- return self;
381
- if (typeof window < "u")
382
- return window;
383
- if (typeof global < "u")
384
- return global;
385
- throw new Error("unable to locate global object");
386
- }(), Rt = oe.fetch || (() => Promise.reject(new Error("[ofetch] global.fetch is not supported!"))), Tt = oe.Headers, $t = oe.AbortController, Mt = Oe({ fetch: Rt, Headers: Tt, AbortController: $t }), Lt = Mt;
387
- function Ut(e) {
388
- const t = e.length;
389
- let n = -1, s, o = "";
390
- const r = e.charCodeAt(0);
391
- for (; ++n < t; ) {
392
- if (s = e.charCodeAt(n), s === 0) {
393
- o += "�";
394
- continue;
395
- }
396
- if (s === 37) {
397
- o += "\\%";
398
- continue;
399
- }
400
- if (s === 44) {
401
- o += "\\,";
402
- continue;
403
- }
404
- if (
405
- // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
406
- // U+007F, […]
407
- s >= 1 && s <= 31 || s === 127 || n === 0 && s >= 48 && s <= 57 || n === 1 && s >= 48 && s <= 57 && r === 45
408
- ) {
409
- o += `\\${s.toString(16)} `;
410
- continue;
411
- }
412
- if (
413
- // If the character is the first character and is a `-` (U+002D), and
414
- // there is no second character, […]
415
- n === 0 && t === 1 && s === 45
416
- ) {
417
- o += `\\${e.charAt(n)}`;
418
- continue;
419
- }
420
- if (s >= 128 || s === 45 || s === 95 || s >= 48 && s <= 57 || s >= 65 && s <= 90 || s >= 97 && s <= 122) {
421
- o += e.charAt(n);
422
- continue;
423
- }
424
- o += `\\${e.charAt(n)}`;
425
- }
426
- return o;
427
- }
428
- const X = Ut;
429
- function I(e = []) {
430
- return Array.isArray(e) ? e : [e];
431
- }
432
- function W(e) {
433
- return Array.from(new Set(e));
434
- }
435
- function It(e, t) {
436
- return e.reduce((n, s) => (n.findIndex((r) => t(s, r)) === -1 && n.push(s), n), []);
437
- }
438
- function L(e) {
439
- return typeof e == "string";
440
- }
441
- function H(e) {
442
- return L(e) ? e : (Array.isArray(e) ? e : Object.entries(e)).filter((t) => t[1] != null);
443
- }
444
- function Nt(e) {
445
- return Array.isArray(e) ? e.find((t) => !Array.isArray(t) || Array.isArray(t[0])) ? e.map((t) => H(t)) : [e] : [H(e)];
446
- }
447
- function Dt(e) {
448
- return e.filter(([t, n], s) => {
449
- if (t.startsWith("$$"))
450
- return !1;
451
- for (let o = s - 1; o >= 0; o--)
452
- if (e[o][0] === t && e[o][1] === n)
453
- return !1;
454
- return !0;
455
- });
456
- }
457
- function Q(e) {
458
- return e == null ? "" : Dt(e).map(([t, n]) => n != null ? `${t}:${n};` : void 0).filter(Boolean).join("");
459
- }
460
- function G(e) {
461
- return e && typeof e == "object" && !Array.isArray(e);
462
- }
463
- function ke(e, t, n = !1) {
464
- const s = e, o = t;
465
- if (Array.isArray(o))
466
- return n && Array.isArray(o) ? [...s, ...o] : [...o];
467
- const r = { ...s };
468
- return G(s) && G(o) && Object.keys(o).forEach((a) => {
469
- G(s[a]) && G(o[a]) || Array.isArray(s[a]) && Array.isArray(o[a]) ? r[a] = ke(s[a], o[a], n) : Object.assign(r, { [a]: o[a] });
470
- }), r;
471
- }
472
- function z(e) {
473
- let t, n, s;
474
- if (Array.isArray(e)) {
475
- for (n = Array(t = e.length); t--; )
476
- n[t] = (s = e[t]) && typeof s == "object" ? z(s) : s;
477
- return n;
478
- }
479
- if (Object.prototype.toString.call(e) === "[object Object]") {
480
- n = {};
481
- for (t in e)
482
- t === "__proto__" ? Object.defineProperty(n, t, {
483
- value: z(e[t]),
484
- configurable: !0,
485
- enumerable: !0,
486
- writable: !0
487
- }) : n[t] = (s = e[t]) && typeof s == "object" ? z(s) : s;
488
- return n;
489
- }
490
- return e;
491
- }
492
- function jt(e) {
493
- return L(e[0]);
494
- }
495
- function Pt(e) {
496
- return L(e[0]);
497
- }
498
- const le = "$$shortcut-no-merge";
499
- function Ft(e) {
500
- return typeof e == "function" ? { match: e } : e;
501
- }
502
- function ue(e) {
503
- return e.length === 3;
504
- }
505
- function Vt(e) {
506
- return e != null;
507
- }
508
- function Ht() {
509
- }
510
- var Gt = Object.defineProperty, Bt = (e, t, n) => t in e ? Gt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, zt = (e, t, n) => (Bt(e, t + "", n), n);
511
- class qt {
512
- constructor() {
513
- zt(this, "_map", /* @__PURE__ */ new Map());
514
- }
515
- get(t, n) {
516
- const s = this._map.get(t);
517
- if (s)
518
- return s.get(n);
519
- }
520
- getFallback(t, n, s) {
521
- let o = this._map.get(t);
522
- return o || (o = /* @__PURE__ */ new Map(), this._map.set(t, o)), o.has(n) || o.set(n, s), o.get(n);
523
- }
524
- set(t, n, s) {
525
- let o = this._map.get(t);
526
- return o || (o = /* @__PURE__ */ new Map(), this._map.set(t, o)), o.set(n, s), this;
527
- }
528
- has(t, n) {
529
- var s;
530
- return (s = this._map.get(t)) == null ? void 0 : s.has(n);
531
- }
532
- delete(t, n) {
533
- var s;
534
- return ((s = this._map.get(t)) == null ? void 0 : s.delete(n)) || !1;
535
- }
536
- deleteTop(t) {
537
- return this._map.delete(t);
538
- }
539
- map(t) {
540
- return Array.from(this._map.entries()).flatMap(([n, s]) => Array.from(s.entries()).map(([o, r]) => t(r, n, o)));
541
- }
542
- }
543
- class Wt extends Map {
544
- getFallback(t, n) {
545
- const s = this.get(t);
546
- return s === void 0 ? (this.set(t, n), n) : s;
547
- }
548
- map(t) {
549
- const n = [];
550
- return this.forEach((s, o) => {
551
- n.push(t(s, o));
552
- }), n;
553
- }
554
- flatMap(t) {
555
- const n = [];
556
- return this.forEach((s, o) => {
557
- n.push(...t(s, o));
558
- }), n;
559
- }
560
- }
561
- var Kt = Object.defineProperty, Jt = (e, t, n) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Xt = (e, t, n) => (Jt(e, t + "", n), n);
562
- class Re extends Set {
563
- constructor(t) {
564
- super(t), Xt(this, "_map"), this._map ?? (this._map = /* @__PURE__ */ new Map());
565
- }
566
- add(t) {
567
- return this._map ?? (this._map = /* @__PURE__ */ new Map()), this._map.set(t, (this._map.get(t) ?? 0) + 1), super.add(t);
568
- }
569
- delete(t) {
570
- return this._map.delete(t), super.delete(t);
571
- }
572
- clear() {
573
- this._map.clear(), super.clear();
574
- }
575
- getCount(t) {
576
- return this._map.get(t) ?? 0;
577
- }
578
- setCount(t, n) {
579
- return this._map.set(t, n), super.add(t);
580
- }
581
- }
582
- function Y(e) {
583
- return e instanceof Re;
584
- }
585
- const B = {};
586
- function Qt(e = ["-", ":"]) {
587
- const t = e.join("|");
588
- return B[t] || (B[t] = new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`, "gm")), B[t].lastIndex = 0, B[t];
589
- }
590
- function Yt(e, t = ["-", ":"], n = 5) {
591
- const s = Qt(t);
592
- let o, r = e.toString();
593
- const a = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
594
- do
595
- o = !1, r = r.replace(
596
- s,
597
- (f, i, u, d, m) => {
598
- var b;
599
- if (!t.includes(u))
600
- return f;
601
- o = !0, a.add(i + u);
602
- const h = m + i.length + u.length + 1, _ = { length: f.length, items: [] };
603
- l.set(m, _);
604
- for (const C of [...d.matchAll(/\S+/g)]) {
605
- const A = h + C.index;
606
- let g = (b = l.get(A)) == null ? void 0 : b.items;
607
- g ? l.delete(A) : g = [{
608
- offset: A,
609
- length: C[0].length,
610
- className: C[0]
611
- }];
612
- for (const S of g)
613
- S.className = S.className === "~" ? i : S.className.replace(/^(!?)(.*)/, `$1${i}${u}$2`), _.items.push(S);
614
- }
615
- return "$".repeat(f.length);
616
- }
617
- ), n -= 1;
618
- while (o && n);
619
- let c;
620
- if (typeof e == "string") {
621
- c = "";
622
- let f = 0;
623
- for (const [i, u] of l)
624
- c += e.slice(f, i), c += u.items.map((d) => d.className).join(" "), f = i + u.length;
625
- c += e.slice(f);
626
- } else {
627
- c = e;
628
- for (const [f, i] of l)
629
- c.overwrite(
630
- f,
631
- f + i.length,
632
- i.items.map((u) => u.className).join(" ")
633
- );
634
- }
635
- return {
636
- prefixes: Array.from(a),
637
- hasChanged: o,
638
- groupsByOffset: l,
639
- // Computed lazily because MagicString's toString does a lot of work
640
- get expanded() {
641
- return c.toString();
642
- }
643
- };
644
- }
645
- function Zt(e, t = ["-", ":"], n = 5) {
646
- const s = Yt(e, t, n);
647
- return typeof e == "string" ? s.expanded : e;
648
- }
649
- const fe = /* @__PURE__ */ new Set();
650
- function Te(e) {
651
- fe.has(e) || (console.warn("[unocss]", e), fe.add(e));
652
- }
653
- const en = /[\\:]?[\s'"`;{}]+/g;
654
- function tn(e) {
655
- return e.split(en);
656
- }
657
- const nn = {
658
- name: "@unocss/core/extractor-split",
659
- order: 0,
660
- extract({ code: e }) {
661
- return tn(e);
662
- }
663
- };
664
- function sn() {
665
- return {
666
- events: {},
667
- emit(e, ...t) {
668
- (this.events[e] || []).forEach((n) => n(...t));
669
- },
670
- on(e, t) {
671
- return (this.events[e] = this.events[e] || []).push(t), () => this.events[e] = (this.events[e] || []).filter((n) => n !== t);
672
- }
673
- };
674
- }
675
- const q = "default", ne = "preflights", on = "shortcuts", rn = "imports", an = {
676
- [rn]: -200,
677
- [ne]: -100,
678
- [on]: -10,
679
- [q]: 0
680
- };
681
- function $e(e) {
682
- return I(e).flatMap((t) => Array.isArray(t) ? [t] : Object.entries(t));
683
- }
684
- const pe = "_uno_resolved";
685
- function cn(e) {
686
- var s;
687
- let t = typeof e == "function" ? e() : e;
688
- if (pe in t)
689
- return t;
690
- t = { ...t }, Object.defineProperty(t, pe, {
691
- value: !0,
692
- enumerable: !1
693
- });
694
- const n = t.shortcuts ? $e(t.shortcuts) : void 0;
695
- if (t.shortcuts = n, t.prefix || t.layer) {
696
- const o = (r) => {
697
- r[2] || (r[2] = {});
698
- const a = r[2];
699
- a.prefix == null && t.prefix && (a.prefix = I(t.prefix)), a.layer == null && t.layer && (a.layer = t.layer);
700
- };
701
- n == null || n.forEach(o), (s = t.rules) == null || s.forEach(o);
702
- }
703
- return t;
704
- }
705
- function Me(e) {
706
- const t = cn(e);
707
- if (!t.presets)
708
- return [t];
709
- const n = (t.presets || []).flatMap(I).flatMap(Me);
710
- return [t, ...n];
711
- }
712
- function de(e = {}, t = {}) {
713
- var S, w;
714
- const n = Object.assign({}, t, e), s = It((n.presets || []).flatMap(I).flatMap(Me), (p, v) => p.name === v.name), o = [
715
- ...s.filter((p) => p.enforce === "pre"),
716
- ...s.filter((p) => !p.enforce),
717
- ...s.filter((p) => p.enforce === "post")
718
- ], r = [
719
- ...o,
720
- n
721
- ], a = [...r].reverse(), l = Object.assign({}, an, ...r.map((p) => p.layers));
722
- function c(p) {
723
- return W(r.flatMap((v) => I(v[p] || [])));
724
- }
725
- const f = c("extractors");
726
- let i = (S = a.find((p) => p.extractorDefault !== void 0)) == null ? void 0 : S.extractorDefault;
727
- i === void 0 && (i = nn), i && !f.includes(i) && f.unshift(i), f.sort((p, v) => (p.order || 0) - (v.order || 0));
728
- const u = c("rules"), d = {}, m = u.length, h = u.map((p, v) => {
729
- var k;
730
- if (jt(p)) {
731
- I(((k = p[2]) == null ? void 0 : k.prefix) || "").forEach((T) => {
732
- d[T + p[0]] = [v, p[1], p[2], p];
733
- });
734
- return;
735
- }
736
- return [v, ...p];
737
- }).filter(Boolean).reverse();
738
- let _ = ln(r.map((p) => p.theme));
739
- const b = c("extendTheme");
740
- for (const p of b)
741
- _ = p(_) || _;
742
- const C = {
743
- templates: W(r.flatMap((p) => {
744
- var v;
745
- return I((v = p.autocomplete) == null ? void 0 : v.templates);
746
- })),
747
- extractors: r.flatMap((p) => {
748
- var v;
749
- return I((v = p.autocomplete) == null ? void 0 : v.extractors);
750
- }).sort((p, v) => (p.order || 0) - (v.order || 0)),
751
- shorthands: un(r.map((p) => {
752
- var v;
753
- return ((v = p.autocomplete) == null ? void 0 : v.shorthands) || {};
754
- }))
755
- };
756
- let A = c("separators");
757
- A.length || (A = [":", "-"]);
758
- const g = {
759
- mergeSelectors: !0,
760
- warn: !0,
761
- sortLayers: (p) => p,
762
- ...n,
763
- blocklist: c("blocklist"),
764
- presets: o,
765
- envMode: n.envMode || "build",
766
- shortcutsLayer: n.shortcutsLayer || "shortcuts",
767
- layers: l,
768
- theme: _,
769
- rulesSize: m,
770
- rulesDynamic: h,
771
- rulesStaticMap: d,
772
- preprocess: c("preprocess"),
773
- postprocess: c("postprocess"),
774
- preflights: c("preflights"),
775
- autocomplete: C,
776
- variants: c("variants").map(Ft).sort((p, v) => (p.order || 0) - (v.order || 0)),
777
- shortcuts: $e(c("shortcuts")).reverse(),
778
- extractors: f,
779
- safelist: c("safelist"),
780
- separators: A,
781
- details: n.details ?? n.envMode === "dev"
782
- };
783
- for (const p of r)
784
- (w = p == null ? void 0 : p.configResolved) == null || w.call(p, g);
785
- return g;
786
- }
787
- function ln(e) {
788
- return e.map((t) => t ? z(t) : {}).reduce((t, n) => ke(t, n), {});
789
- }
790
- function un(e) {
791
- return e.reduce((t, n) => {
792
- const s = {};
793
- for (const o in n) {
794
- const r = n[o];
795
- Array.isArray(r) ? s[o] = `(${r.join("|")})` : s[o] = r;
796
- }
797
- return {
798
- ...t,
799
- ...s
800
- };
801
- }, {});
802
- }
803
- const fn = "0.60.2";
804
- var pn = Object.defineProperty, dn = (e, t, n) => t in e ? pn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, j = (e, t, n) => (dn(e, typeof t != "symbol" ? t + "" : t, n), n);
805
- class mn {
806
- constructor(t = {}, n = {}) {
807
- this.userConfig = t, this.defaults = n, j(this, "version", fn), j(this, "_cache", /* @__PURE__ */ new Map()), j(this, "config"), j(this, "blocked", /* @__PURE__ */ new Set()), j(this, "parentOrders", /* @__PURE__ */ new Map()), j(this, "events", sn()), this.config = de(t, n), this.events.emit("config", this.config);
808
- }
809
- setConfig(t, n) {
810
- t && (n && (this.defaults = n), this.userConfig = t, this.blocked.clear(), this.parentOrders.clear(), this._cache.clear(), this.config = de(t, this.defaults), this.events.emit("config", this.config));
811
- }
812
- async applyExtractors(t, n, s = /* @__PURE__ */ new Set()) {
813
- var r;
814
- const o = {
815
- original: t,
816
- code: t,
817
- id: n,
818
- extracted: s,
819
- envMode: this.config.envMode
820
- };
821
- for (const a of this.config.extractors) {
822
- const l = await ((r = a.extract) == null ? void 0 : r.call(a, o));
823
- if (l)
824
- if (Y(l) && Y(s))
825
- for (const c of l)
826
- s.setCount(c, s.getCount(c) + l.getCount(c));
827
- else
828
- for (const c of l)
829
- s.add(c);
830
- }
831
- return s;
832
- }
833
- makeContext(t, n) {
834
- const s = {
835
- rawSelector: t,
836
- currentSelector: n[1],
837
- theme: this.config.theme,
838
- generator: this,
839
- variantHandlers: n[2],
840
- constructCSS: (...o) => this.constructCustomCSS(s, ...o),
841
- variantMatch: n
842
- };
843
- return s;
844
- }
845
- async parseToken(t, n) {
846
- var f;
847
- if (this.blocked.has(t))
848
- return;
849
- const s = `${t}${n ? ` ${n}` : ""}`;
850
- if (this._cache.has(s))
851
- return this._cache.get(s);
852
- let o = t;
853
- for (const i of this.config.preprocess)
854
- o = i(t);
855
- if (this.isBlocked(o)) {
856
- this.blocked.add(t), this._cache.set(s, null);
857
- return;
858
- }
859
- const r = await this.matchVariants(t, o);
860
- if (!r || this.isBlocked(r[1])) {
861
- this.blocked.add(t), this._cache.set(s, null);
862
- return;
863
- }
864
- const a = this.makeContext(t, [n || r[0], r[1], r[2], r[3]]);
865
- this.config.details && (a.variants = [...r[3]]);
866
- const l = await this.expandShortcut(a.currentSelector, a), c = l ? await this.stringifyShortcuts(a.variantMatch, a, l[0], l[1]) : (f = await this.parseUtil(a.variantMatch, a)) == null ? void 0 : f.map((i) => this.stringifyUtil(i, a)).filter(Vt);
867
- if (c != null && c.length)
868
- return this._cache.set(s, c), c;
869
- this._cache.set(s, null);
870
- }
871
- async generate(t, n = {}) {
872
- const {
873
- id: s,
874
- scope: o,
875
- preflights: r = !0,
876
- safelist: a = !0,
877
- minify: l = !1,
878
- extendedInfo: c = !1
879
- } = n, f = this.config.outputToCssLayers, i = L(t) ? await this.applyExtractors(
880
- t,
881
- s,
882
- c ? new Re() : /* @__PURE__ */ new Set()
883
- ) : Array.isArray(t) ? new Set(t) : t;
884
- if (a) {
885
- const w = {
886
- generator: this,
887
- theme: this.config.theme
888
- };
889
- this.config.safelist.flatMap((p) => typeof p == "function" ? p(w) : p).forEach((p) => {
890
- i.has(p) || i.add(p);
891
- });
892
- }
893
- const u = l ? "" : `
894
- `, d = /* @__PURE__ */ new Set([q]), m = c ? /* @__PURE__ */ new Map() : /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Map();
895
- let _ = {};
896
- const b = Array.from(i).map(async (w) => {
897
- var v;
898
- if (m.has(w))
899
- return;
900
- const p = await this.parseToken(w);
901
- if (p != null) {
902
- m instanceof Map ? m.set(w, {
903
- data: p,
904
- count: Y(i) ? i.getCount(w) : -1
905
- }) : m.add(w);
906
- for (const k of p) {
907
- const O = k[3] || "", T = (v = k[4]) == null ? void 0 : v.layer;
908
- h.has(O) || h.set(O, []), h.get(O).push(k), T && d.add(T);
909
- }
910
- }
911
- });
912
- await Promise.all(b), await (async () => {
913
- if (!r)
914
- return;
915
- const w = {
916
- generator: this,
917
- theme: this.config.theme
918
- }, p = /* @__PURE__ */ new Set([]);
919
- this.config.preflights.forEach(({ layer: v = ne }) => {
920
- d.add(v), p.add(v);
921
- }), _ = Object.fromEntries(
922
- await Promise.all(Array.from(p).map(
923
- async (v) => {
924
- const O = (await Promise.all(
925
- this.config.preflights.filter((T) => (T.layer || ne) === v).map(async (T) => await T.getCSS(w))
926
- )).filter(Boolean).join(u);
927
- return [v, O];
928
- }
929
- ))
930
- );
931
- })();
932
- const C = this.config.sortLayers(Array.from(d).sort((w, p) => (this.config.layers[w] ?? 0) - (this.config.layers[p] ?? 0) || w.localeCompare(p))), A = {}, g = (w = q) => {
933
- var k;
934
- if (A[w])
935
- return A[w];
936
- let p = Array.from(h).sort((O, T) => {
937
- var N;
938
- return (this.parentOrders.get(O[0]) ?? 0) - (this.parentOrders.get(T[0]) ?? 0) || ((N = O[0]) == null ? void 0 : N.localeCompare(T[0] || "")) || 0;
939
- }).map(([O, T]) => {
940
- const N = T.length, D = T.filter((R) => {
941
- var y;
942
- return (((y = R[4]) == null ? void 0 : y.layer) || q) === w;
943
- }).sort((R, y) => {
944
- var E, x, U, $, M, V, ie;
945
- return R[0] - y[0] || (((E = R[4]) == null ? void 0 : E.sort) || 0) - (((x = y[4]) == null ? void 0 : x.sort) || 0) || ((M = (U = R[5]) == null ? void 0 : U.currentSelector) == null ? void 0 : M.localeCompare((($ = y[5]) == null ? void 0 : $.currentSelector) ?? "")) || ((V = R[1]) == null ? void 0 : V.localeCompare(y[1] || "")) || ((ie = R[2]) == null ? void 0 : ie.localeCompare(y[2] || "")) || 0;
946
- }).map(([, R, y, , E, , x]) => [
947
- [[(R && gn(R, o)) ?? "", (E == null ? void 0 : E.sort) ?? 0]],
948
- y,
949
- !!(x ?? (E == null ? void 0 : E.noMerge))
950
- ]);
951
- if (!D.length)
952
- return;
953
- const P = D.reverse().map(([R, y, E], x) => {
954
- if (!E && this.config.mergeSelectors)
955
- for (let $ = x + 1; $ < N; $++) {
956
- const M = D[$];
957
- if (M && !M[2] && (R && M[0] || R == null && M[0] == null) && M[1] === y)
958
- return R && M[0] && M[0].push(...R), null;
959
- }
960
- const U = R ? W(R.sort(($, M) => {
961
- var V;
962
- return $[1] - M[1] || ((V = $[0]) == null ? void 0 : V.localeCompare(M[0] || "")) || 0;
963
- }).map(($) => $[0]).filter(Boolean)) : [];
964
- return U.length ? `${U.join(`,${u}`)}{${y}}` : y;
965
- }).filter(Boolean).reverse().join(u);
966
- if (!O)
967
- return P;
968
- const F = O.split(" $$ ");
969
- return `${F.join("{")}{${u}${P}${u}${"}".repeat(F.length)}`;
970
- }).filter(Boolean).join(u);
971
- if (r && (p = [_[w], p].filter(Boolean).join(u)), f && p) {
972
- let O = typeof f == "object" ? (k = f.cssLayerName) == null ? void 0 : k.call(f, w) : void 0;
973
- O !== null && (O || (O = w), p = `@layer ${O}{${u}${p}${u}}`);
974
- }
975
- const v = l ? "" : `/* layer: ${w} */${u}`;
976
- return A[w] = p ? v + p : "";
977
- }, S = (w = C, p) => w.filter((v) => !(p != null && p.includes(v))).map((v) => g(v) || "").filter(Boolean).join(u);
978
- return {
979
- get css() {
980
- return S();
981
- },
982
- layers: C,
983
- matched: m,
984
- getLayers: S,
985
- getLayer: g
986
- };
987
- }
988
- async matchVariants(t, n) {
989
- const s = /* @__PURE__ */ new Set(), o = [];
990
- let r = n || t, a = !0;
991
- const l = {
992
- rawSelector: t,
993
- theme: this.config.theme,
994
- generator: this
995
- };
996
- for (; a; ) {
997
- a = !1;
998
- for (const c of this.config.variants) {
999
- if (!c.multiPass && s.has(c))
1000
- continue;
1001
- let f = await c.match(r, l);
1002
- if (f) {
1003
- if (L(f)) {
1004
- if (f === r)
1005
- continue;
1006
- f = { matcher: f };
1007
- }
1008
- r = f.matcher, o.unshift(f), s.add(c), a = !0;
1009
- break;
1010
- }
1011
- }
1012
- if (!a)
1013
- break;
1014
- if (o.length > 500)
1015
- throw new Error(`Too many variants applied to "${t}"`);
1016
- }
1017
- return [t, r, o, s];
1018
- }
1019
- applyVariants(t, n = t[4], s = t[1]) {
1020
- const r = n.slice().sort((f, i) => (f.order || 0) - (i.order || 0)).reduceRight(
1021
- (f, i) => (u) => {
1022
- var h, _;
1023
- const d = ((h = i.body) == null ? void 0 : h.call(i, u.entries)) || u.entries, m = Array.isArray(i.parent) ? i.parent : [i.parent, void 0];
1024
- return (i.handle ?? bn)({
1025
- ...u,
1026
- entries: d,
1027
- selector: ((_ = i.selector) == null ? void 0 : _.call(i, u.selector, d)) || u.selector,
1028
- parent: m[0] || u.parent,
1029
- parentOrder: m[1] || u.parentOrder,
1030
- layer: i.layer || u.layer,
1031
- sort: i.sort || u.sort
1032
- }, f);
1033
- },
1034
- (f) => f
1035
- )({
1036
- prefix: "",
1037
- selector: yn(s),
1038
- pseudo: "",
1039
- entries: t[2]
1040
- }), { parent: a, parentOrder: l } = r;
1041
- a != null && l != null && this.parentOrders.set(a, l);
1042
- const c = {
1043
- selector: [
1044
- r.prefix,
1045
- r.selector,
1046
- r.pseudo
1047
- ].join(""),
1048
- entries: r.entries,
1049
- parent: a,
1050
- layer: r.layer,
1051
- sort: r.sort,
1052
- noMerge: r.noMerge
1053
- };
1054
- for (const f of this.config.postprocess)
1055
- f(c);
1056
- return c;
1057
- }
1058
- constructCustomCSS(t, n, s) {
1059
- const o = H(n);
1060
- if (L(o))
1061
- return o;
1062
- const { selector: r, entries: a, parent: l } = this.applyVariants([0, s || t.rawSelector, o, void 0, t.variantHandlers]), c = `${r}{${Q(a)}}`;
1063
- return l ? `${l}{${c}}` : c;
1064
- }
1065
- async parseUtil(t, n, s = !1, o) {
1066
- var i;
1067
- const [r, a, l] = L(t) ? await this.matchVariants(t) : t;
1068
- this.config.details && (n.rules = n.rules ?? []);
1069
- const c = this.config.rulesStaticMap[a];
1070
- if (c && c[1] && (s || !((i = c[2]) != null && i.internal))) {
1071
- this.config.details && n.rules.push(c[3]);
1072
- const u = c[0], d = H(c[1]), m = c[2];
1073
- return L(d) ? [[u, d, m]] : [[u, r, d, m, l]];
1074
- }
1075
- n.variantHandlers = l;
1076
- const { rulesDynamic: f } = this.config;
1077
- for (const [u, d, m, h] of f) {
1078
- if (h != null && h.internal && !s)
1079
- continue;
1080
- let _ = a;
1081
- if (h != null && h.prefix) {
1082
- const g = I(h.prefix);
1083
- if (o) {
1084
- const S = I(o);
1085
- if (!g.some((w) => S.includes(w)))
1086
- continue;
1087
- } else {
1088
- const S = g.find((w) => a.startsWith(w));
1089
- if (S == null)
1090
- continue;
1091
- _ = a.slice(S.length);
1092
- }
1093
- }
1094
- const b = _.match(d);
1095
- if (!b)
1096
- continue;
1097
- const C = await m(b, n);
1098
- if (!C)
1099
- continue;
1100
- this.config.details && n.rules.push([d, m, h]);
1101
- const A = Nt(C).filter((g) => g.length);
1102
- if (A.length)
1103
- return A.map((g) => L(g) ? [u, g, h] : [u, r, g, h, l]);
1104
- }
1105
- }
1106
- stringifyUtil(t, n) {
1107
- if (!t)
1108
- return;
1109
- if (ue(t))
1110
- return [t[0], void 0, t[1], void 0, t[2], this.config.details ? n : void 0, void 0];
1111
- const { selector: s, entries: o, parent: r, layer: a, sort: l, noMerge: c } = this.applyVariants(t), f = Q(o);
1112
- if (!f)
1113
- return;
1114
- const { layer: i, sort: u, ...d } = t[3] ?? {}, m = {
1115
- ...d,
1116
- layer: a ?? i,
1117
- sort: l ?? u
1118
- };
1119
- return [t[0], s, f, r, m, this.config.details ? n : void 0, c];
1120
- }
1121
- async expandShortcut(t, n, s = 5) {
1122
- var l;
1123
- if (s === 0)
1124
- return;
1125
- const o = this.config.details ? (c) => {
1126
- n.shortcuts = n.shortcuts ?? [], n.shortcuts.push(c);
1127
- } : Ht;
1128
- let r, a;
1129
- for (const c of this.config.shortcuts) {
1130
- let f = t;
1131
- if ((l = c[2]) != null && l.prefix) {
1132
- const u = I(c[2].prefix).find((d) => t.startsWith(d));
1133
- if (u == null)
1134
- continue;
1135
- f = t.slice(u.length);
1136
- }
1137
- if (Pt(c)) {
1138
- if (c[0] === f) {
1139
- r = r || c[2], a = c[1], o(c);
1140
- break;
1141
- }
1142
- } else {
1143
- const i = f.match(c[0]);
1144
- if (i && (a = c[1](i, n)), a) {
1145
- r = r || c[2], o(c);
1146
- break;
1147
- }
1148
- }
1149
- }
1150
- if (L(a) && (a = Zt(a.trim()).split(/\s+/g)), !a) {
1151
- const [c, f] = L(t) ? await this.matchVariants(t) : t;
1152
- if (c !== f) {
1153
- const i = await this.expandShortcut(f, n, s - 1);
1154
- i && (a = i[0].map((u) => L(u) ? c.replace(f, u) : u));
1155
- }
1156
- }
1157
- if (a)
1158
- return [
1159
- (await Promise.all(a.map(async (c) => {
1160
- var f;
1161
- return (L(c) ? (f = await this.expandShortcut(c, n, s - 1)) == null ? void 0 : f[0] : void 0) || [c];
1162
- }))).flat(1).filter(Boolean),
1163
- r
1164
- ];
1165
- }
1166
- async stringifyShortcuts(t, n, s, o = { layer: this.config.shortcutsLayer }) {
1167
- var i;
1168
- const r = new Wt(), a = (await Promise.all(W(s).map(async (u) => {
1169
- const d = L(u) ? await this.parseUtil(u, n, !0, o.prefix) : [[Number.POSITIVE_INFINITY, "{inline}", H(u), void 0, []]];
1170
- return !d && this.config.warn && Te(`unmatched utility "${u}" in shortcut "${t[1]}"`), d || [];
1171
- }))).flat(1).filter(Boolean).sort((u, d) => u[0] - d[0]), [l, , c] = t, f = [];
1172
- for (const u of a) {
1173
- if (ue(u)) {
1174
- f.push([u[0], void 0, u[1], void 0, u[2], n, void 0]);
1175
- continue;
1176
- }
1177
- const { selector: d, entries: m, parent: h, sort: _, noMerge: b, layer: C } = this.applyVariants(u, [...u[4], ...c], l);
1178
- r.getFallback(C ?? o.layer, new qt()).getFallback(d, h, [[], u[0]])[0].push([m, !!(b ?? ((i = u[3]) == null ? void 0 : i.noMerge)), _ ?? 0]);
1179
- }
1180
- return f.concat(r.flatMap(
1181
- (u, d) => u.map(([m, h], _, b) => {
1182
- const C = (g, S, w) => {
1183
- const p = Math.max(...w.map((k) => k[1])), v = w.map((k) => k[0]);
1184
- return (g ? [v.flat(1)] : v).map((k) => {
1185
- const O = Q(k);
1186
- if (O)
1187
- return [h, _, O, b, { ...o, noMerge: S, sort: p, layer: d }, n, void 0];
1188
- });
1189
- };
1190
- return [
1191
- [m.filter(([, g]) => g).map(([g, , S]) => [g, S]), !0],
1192
- [m.filter(([, g]) => !g).map(([g, , S]) => [g, S]), !1]
1193
- ].map(([g, S]) => [
1194
- ...C(!1, S, g.filter(([w]) => w.some((p) => p[0] === le))),
1195
- ...C(!0, S, g.filter(([w]) => w.every((p) => p[0] !== le)))
1196
- ]);
1197
- }).flat(2).filter(Boolean)
1198
- ));
1199
- }
1200
- isBlocked(t) {
1201
- return !t || this.config.blocklist.map((n) => Array.isArray(n) ? n[0] : n).some((n) => typeof n == "function" ? n(t) : L(n) ? n === t : n.test(t));
1202
- }
1203
- getBlocked(t) {
1204
- const n = this.config.blocklist.find((s) => {
1205
- const o = Array.isArray(s) ? s[0] : s;
1206
- return typeof o == "function" ? o(t) : L(o) ? o === t : o.test(t);
1207
- });
1208
- return n ? Array.isArray(n) ? n : [n, void 0] : void 0;
1209
- }
1210
- }
1211
- function hn(e, t) {
1212
- return new mn(e, t);
1213
- }
1214
- const Le = /\s\$\$\s+/g;
1215
- function _n(e) {
1216
- return Le.test(e);
1217
- }
1218
- function gn(e, t) {
1219
- return _n(e) ? e.replace(Le, t ? ` ${t} ` : " ") : t ? `${t} ${e}` : e;
1220
- }
1221
- const me = /^\[(.+?)(~?=)"(.*)"\]$/;
1222
- function yn(e) {
1223
- return me.test(e) ? e.replace(me, (t, n, s, o) => `[${X(n)}${s}"${X(o)}"]`) : `.${X(e)}`;
1224
- }
1225
- function bn(e, t) {
1226
- return t(e);
1227
- }
1228
- var he = { npm_package_dependencies__vueuse_core: "^10.9.0", COREPACK_ROOT: "/Users/arlo/Library/Application Support/fnm/node-versions/v20.12.2/installation/lib/node_modules/corepack", TERM_PROGRAM: "vscode", npm_package_devDependencies__types_splitpanes: "^2.2.6", FNM_LOGLEVEL: "info", NODE: "/Users/arlo/Library/Application Support/fnm/node-versions/v20.12.2/installation/bin/node", INIT_CWD: "/Users/arlo/g/devtools-next/packages/client", TURBO_INVOCATION_DIR: "/Users/arlo/g/devtools-next", npm_package_devDependencies_vite: "^5.2.11", SHELL: "/bin/zsh", TERM: "xterm-256color", npm_config_shamefully_hoist: "true", npm_package_devDependencies_ohash: "^1.1.3", npm_package_devDependencies_floating_vue: "5.2.2", npm_package_dependencies__vue_devtools_shared: "workspace:^", FNM_NODE_DIST_MIRROR: "https://nodejs.org/dist", npm_package_dependencies__unocss_runtime: "^0.60.2", TMPDIR: "/var/folders/6s/79hm4q7x5f982tndmbvckmn80000gn/T/", TERM_PROGRAM_VERSION: "1.88.0", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.4", npm_package_devDependencies_unplugin_vue_components: "^0.27.0", MallocNanoZone: "0", ORIGINAL_XDG_CURRENT_DESKTOP: "undefined", ZDOTDIR: "/Users/arlo", TERM_SESSION_ID: "w0t0p0:730F72ED-5006-40A7-8D8A-3B997BF910AE", npm_config_registry: "https://registry.npmjs.org/", npm_package_private: "true", PNPM_HOME: "/Users/arlo/Library/pnpm", ZSH: "/Users/arlo/.oh-my-zsh", FNM_COREPACK_ENABLED: "false", npm_package_devDependencies__vitejs_plugin_vue_jsx: "^3.1.0", USER: "arlo", npm_package_license: "MIT", LS_COLORS: "di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43", COMMAND_MODE: "unix2003", PNPM_SCRIPT_SRC_DIR: "/Users/arlo/g/devtools-next/packages/client", npm_config_strict_peer_dependencies: "", SSH_AUTH_SOCK: "/private/tmp/com.apple.launchd.M7q1yHrUIS/Listeners", npm_package_devDependencies_dayjs: "^1.11.11", __CF_USER_TEXT_ENCODING: "0x1F5:0x19:0x34", npm_execpath: "/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.1.1/node_modules/pnpm/bin/pnpm.cjs", PAGER: "less", npm_package_devDependencies_unplugin_auto_import: "^0.17.6", npm_package_scripts_build_lib: "vite build --config vite.lib.config.ts", npm_config_frozen_lockfile: "", FNM_VERSION_FILE_STRATEGY: "local", LSCOLORS: "Gxfxcxdxbxegedabagacad", npm_package_dependencies_vue_virtual_scroller: "2.0.0-beta.8", npm_package_dependencies_fuse_js: "^7.0.0", FNM_ARCH: "arm64", PATH: "/Users/arlo/g/devtools-next/packages/client/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.1.1/node_modules/pnpm/dist/node-gyp-bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/g/devtools-next/packages/client/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.1.1/node_modules/pnpm/dist/node-gyp-bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.1.1/node_modules/pnpm/dist/node-gyp-bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/.cache/node/corepack/v1/pnpm/9.1.1/dist/node-gyp-bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/Library/Caches/fnm_multishells/6012_1716125490276/bin:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/arlo/Library/pnpm:/Users/arlo/Library/Caches/fnm_multishells/741_1716123065533/bin:/opt/homebrew/bin:/Applications/WebStorm.app/Contents/MacOS:/Applications/WebStorm.app/Contents/MacOS", npm_package_dependencies__vue_devtools_ui: "workspace:*", npm_package_scripts_stub_lib: "vite build --config vite.lib.config.ts --watch", LaunchInstanceID: "52DCC620-8DA8-4D02-A134-A66BF1A07673", npm_package_dependencies_splitpanes: "^3.1.5", npm_package_author: "webfansplz", COREPACK_ENABLE_DOWNLOAD_PROMPT: "1", USER_ZDOTDIR: "/Users/arlo", __CFBundleIdentifier: "com.microsoft.VSCode", npm_command: "run-script", PWD: "/Users/arlo/g/devtools-next/packages/client", npm_package_exports____: "./dist/*", npm_lifecycle_event: "build:lib", npm_package_devDependencies_vue: "^3.4.27", npm_package_name: "@vue/devtools-client", LANG: "zh_CN.UTF-8", ITERM_PROFILE: "Default", npm_package_devDependencies_simple_git_hooks: "^2.11.1", npm_package_devDependencies_sass: "^1.77.1", npm_package_devDependencies__unocss_reset: "^0.60.2", npm_package_scripts_build: "tsx ./scripts/pre-build.ts && (nr build:lib & vite build)", NODE_PATH: "/Users/arlo/g/devtools-next/node_modules/.pnpm/vite@5.2.11_@types+node@20.12.12_sass@1.77.1_terser@5.26.0/node_modules/vite/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/vite@5.2.11_@types+node@20.12.12_sass@1.77.1_terser@5.26.0/node_modules/vite/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/vite@5.2.11_@types+node@20.12.12_sass@1.77.1_terser@5.26.0/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.1.1/node_modules/pnpm/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.1.1/node_modules/pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.1.1/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.1.1/node_modules/pnpm/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.1.1/node_modules/pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.1.1/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/turbo@1.13.3/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.1.1/node_modules/pnpm/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.1.1/node_modules/pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.1.1/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/Library/pnpm/global/5/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/bin/node_modules:/Users/arlo/Library/pnpm/global/5/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/node_modules:/Users/arlo/Library/pnpm/global/5/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/node_modules:/Users/arlo/Library/pnpm/global/5/.pnpm/@antfu+ni@0.21.12/node_modules:/Users/arlo/Library/pnpm/global/5/.pnpm/node_modules", npm_package_devDependencies_pinia: "^2.1.7", FNM_MULTISHELL_PATH: "/Users/arlo/Library/Caches/fnm_multishells/6012_1716125490276", TURBO_HASH: "0032a3a778c49290", VSCODE_GIT_ASKPASS_EXTRA_ARGS: "", XPC_FLAGS: "0x0", npm_package_devDependencies__unocss_core: "^0.60.2", npm_package_engines_node: ">=v14.21.3", npm_config_node_gyp: "/Users/arlo/.cache/node/corepack/v1/pnpm/9.1.1/dist/node_modules/node-gyp/bin/node-gyp.js", npm_config_side_effects_cache: "", npm_package_dependencies_colord: "^2.9.3", npm_package_devDependencies__iconify_json: "^2.2.210", npm_package_dependencies_minimatch: "^9.0.4", npm_package_version: "7.2.1", XPC_SERVICE_NAME: "0", npm_package_dependencies__vue_devtools_applet: "workspace:^", VSCODE_INJECTION: "1", npm_package_devDependencies_unocss: "^0.60.2", npm_package_dependencies__vue_devtools_core: "workspace:^", npm_package_type: "module", COLORFGBG: "7;0", HOME: "/Users/arlo", SHLVL: "3", VSCODE_GIT_ASKPASS_MAIN: "/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass-main.js", npm_package_dependencies_vite_hot_client: "^0.2.3", LC_TERMINAL_VERSION: "3.4.23", FNM_DIR: "/Users/arlo/Library/Application Support/fnm", npm_package_dependencies_vis_network: "^9.1.9", ITERM_SESSION_ID: "w0t0p0:730F72ED-5006-40A7-8D8A-3B997BF910AE", npm_package_peerDependencies_vite: "^3.1.0 || ^4.0.0-0 || ^5.0.0-0", LESS: "-R", LOGNAME: "arlo", npm_lifecycle_script: "vite build --config vite.lib.config.ts", npm_package_dependencies__vue_devtools_kit: "workspace:^", npm_package_dependencies__vueuse_integrations: "^10.9.0", VSCODE_GIT_IPC_HANDLE: "/var/folders/6s/79hm4q7x5f982tndmbvckmn80000gn/T/vscode-git-dffc443db3.sock", npm_config_user_agent: "pnpm/9.1.1 npm/? node/v20.12.2 darwin arm64", FNM_RESOLVE_ENGINES: "false", npm_package_devDependencies__types_node: "^20.12.12", GIT_ASKPASS: "/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass.sh", VSCODE_GIT_ASKPASS_NODE: "/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)", npm_package_scripts_stub: "nr stub:lib & vite build --watch", LC_TERMINAL: "iTerm2", npm_package_files_0: "dist", npm_package_devDependencies_unplugin: "^1.10.1", npm_package_dependencies_vue_router: "^4.3.2", npm_package_dependencies_shiki: "1.5.2", SECURITYSESSIONID: "186a4", npm_package_dependencies__unocss_preset_icons: "^0.60.2", npm_node_execpath: "/Users/arlo/Library/Application Support/fnm/node-versions/v20.12.2/installation/bin/node", npm_config_shell_emulator: "true", COLORTERM: "truecolor", NODE_ENV: "production" };
1229
- const vn = Object.freeze(
1230
- {
1231
- left: 0,
1232
- top: 0,
1233
- width: 16,
1234
- height: 16
1235
- }
1236
- ), K = Object.freeze({
1237
- rotate: 0,
1238
- vFlip: !1,
1239
- hFlip: !1
1240
- }), Ue = Object.freeze({
1241
- ...vn,
1242
- ...K
1243
- }), wn = Object.freeze({
1244
- ...Ue,
1245
- body: "",
1246
- hidden: !1
1247
- }), Sn = Object.freeze({
1248
- width: null,
1249
- height: null
1250
- }), Ie = Object.freeze({
1251
- // Dimensions
1252
- ...Sn,
1253
- // Transformations
1254
- ...K
1255
- });
1256
- function En(e, t) {
1257
- const n = {};
1258
- !e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
1259
- const s = ((e.rotate || 0) + (t.rotate || 0)) % 4;
1260
- return s && (n.rotate = s), n;
1261
- }
1262
- function _e(e, t) {
1263
- const n = En(e, t);
1264
- for (const s in wn)
1265
- s in K ? s in e && !(s in n) && (n[s] = K[s]) : s in t ? n[s] = t[s] : s in e && (n[s] = e[s]);
1266
- return n;
1267
- }
1268
- function xn(e, t) {
1269
- const n = e.icons, s = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
1270
- function r(a) {
1271
- if (n[a])
1272
- return o[a] = [];
1273
- if (!(a in o)) {
1274
- o[a] = null;
1275
- const l = s[a] && s[a].parent, c = l && r(l);
1276
- c && (o[a] = [l].concat(c));
1277
- }
1278
- return o[a];
1279
- }
1280
- return (t || Object.keys(n).concat(Object.keys(s))).forEach(r), o;
1281
- }
1282
- function ge(e, t, n) {
1283
- const s = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
1284
- let r = {};
1285
- function a(l) {
1286
- r = _e(
1287
- s[l] || o[l],
1288
- r
1289
- );
1290
- }
1291
- return a(t), n.forEach(a), _e(e, r);
1292
- }
1293
- function An(e, t) {
1294
- if (e.icons[t])
1295
- return ge(e, t, []);
1296
- const n = xn(e, [t])[t];
1297
- return n ? ge(e, t, n) : null;
1298
- }
1299
- const Cn = /(-?[0-9.]*[0-9]+[0-9.]*)/g, On = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
1300
- function ye(e, t, n) {
1301
- if (t === 1)
1302
- return e;
1303
- if (n = n || 100, typeof e == "number")
1304
- return Math.ceil(e * t * n) / n;
1305
- if (typeof e != "string")
1306
- return e;
1307
- const s = e.split(Cn);
1308
- if (s === null || !s.length)
1309
- return e;
1310
- const o = [];
1311
- let r = s.shift(), a = On.test(r);
1312
- for (; ; ) {
1313
- if (a) {
1314
- const l = parseFloat(r);
1315
- isNaN(l) ? o.push(r) : o.push(Math.ceil(l * t * n) / n);
1316
- } else
1317
- o.push(r);
1318
- if (r = s.shift(), r === void 0)
1319
- return o.join("");
1320
- a = !a;
1321
- }
1322
- }
1323
- function kn(e, t = "defs") {
1324
- let n = "";
1325
- const s = e.indexOf("<" + t);
1326
- for (; s >= 0; ) {
1327
- const o = e.indexOf(">", s), r = e.indexOf("</" + t);
1328
- if (o === -1 || r === -1)
1329
- break;
1330
- const a = e.indexOf(">", r);
1331
- if (a === -1)
1332
- break;
1333
- n += e.slice(o + 1, r).trim(), e = e.slice(0, s).trim() + e.slice(a + 1);
1334
- }
1335
- return {
1336
- defs: n,
1337
- content: e
1338
- };
1339
- }
1340
- function Rn(e, t) {
1341
- return e ? "<defs>" + e + "</defs>" + t : t;
1342
- }
1343
- function Tn(e, t, n) {
1344
- const s = kn(e);
1345
- return Rn(s.defs, t + s.content + n);
1346
- }
1347
- const re = (e) => e === "unset" || e === "undefined" || e === "none";
1348
- function $n(e, t) {
1349
- const n = {
1350
- ...Ue,
1351
- ...e
1352
- }, s = {
1353
- ...Ie,
1354
- ...t
1355
- }, o = {
1356
- left: n.left,
1357
- top: n.top,
1358
- width: n.width,
1359
- height: n.height
1360
- };
1361
- let r = n.body;
1362
- [n, s].forEach((_) => {
1363
- const b = [], C = _.hFlip, A = _.vFlip;
1364
- let g = _.rotate;
1365
- C ? A ? g += 2 : (b.push(
1366
- "translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"
1367
- ), b.push("scale(-1 1)"), o.top = o.left = 0) : A && (b.push(
1368
- "translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"
1369
- ), b.push("scale(1 -1)"), o.top = o.left = 0);
1370
- let S;
1371
- switch (g < 0 && (g -= Math.floor(g / 4) * 4), g = g % 4, g) {
1372
- case 1:
1373
- S = o.height / 2 + o.top, b.unshift(
1374
- "rotate(90 " + S.toString() + " " + S.toString() + ")"
1375
- );
1376
- break;
1377
- case 2:
1378
- b.unshift(
1379
- "rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")"
1380
- );
1381
- break;
1382
- case 3:
1383
- S = o.width / 2 + o.left, b.unshift(
1384
- "rotate(-90 " + S.toString() + " " + S.toString() + ")"
1385
- );
1386
- break;
1387
- }
1388
- g % 2 === 1 && (o.left !== o.top && (S = o.left, o.left = o.top, o.top = S), o.width !== o.height && (S = o.width, o.width = o.height, o.height = S)), b.length && (r = Tn(
1389
- r,
1390
- '<g transform="' + b.join(" ") + '">',
1391
- "</g>"
1392
- ));
1393
- });
1394
- const a = s.width, l = s.height, c = o.width, f = o.height;
1395
- let i, u;
1396
- a === null ? (u = l === null ? "1em" : l === "auto" ? f : l, i = ye(u, c / f)) : (i = a === "auto" ? c : a, u = l === null ? ye(i, f / c) : l === "auto" ? f : l);
1397
- const d = {}, m = (_, b) => {
1398
- re(b) || (d[_] = b.toString());
1399
- };
1400
- m("width", i), m("height", u);
1401
- const h = [o.left, o.top, c, f];
1402
- return d.viewBox = h.join(" "), {
1403
- attributes: d,
1404
- viewBox: h,
1405
- body: r
1406
- };
1407
- }
1408
- function Mn(e) {
1409
- return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1410
- }
1411
- function Ln(e) {
1412
- let t = e.startsWith("<svg>") ? e.replace("<svg>", "<svg >") : e;
1413
- return !t.includes(" xmlns:xlink=") && t.includes(" xlink:") && (t = t.replace(
1414
- "<svg ",
1415
- '<svg xmlns:xlink="http://www.w3.org/1999/xlink" '
1416
- )), t.includes(" xmlns=") || (t = t.replace(
1417
- "<svg ",
1418
- '<svg xmlns="http://www.w3.org/2000/svg" '
1419
- )), Mn(t);
1420
- }
1421
- function Un(e) {
1422
- return e.replace(/(['"])\s*\n\s*([^>\\/\s])/g, "$1 $2").replace(/(["';{}><])\s*\n\s*/g, "$1").replace(/\s*\n\s*/g, " ").replace(/\s+"/g, '"').replace(/="\s+/g, '="').replace(/(\s)+\/>/g, "/>").trim();
1423
- }
1424
- const In = /\swidth\s*=\s*["']([\w.]+)["']/, Nn = /\sheight\s*=\s*["']([\w.]+)["']/, Z = /<svg\s+/;
1425
- function Dn(e, t, n) {
1426
- const s = e.slice(0, e.indexOf(">")), o = (r, a) => {
1427
- const l = a.exec(s), c = l != null, f = t[r];
1428
- return !f && !re(f) && (typeof n == "number" ? n > 0 && (t[r] = `${n}em`) : l && (t[r] = l[1])), c;
1429
- };
1430
- return [o("width", In), o("height", Nn)];
1431
- }
1432
- async function Ne(e, t, n, s, o, r) {
1433
- const { scale: a, addXmlNs: l = !1 } = s ?? {}, { additionalProps: c = {}, iconCustomizer: f } = (s == null ? void 0 : s.customizations) ?? {}, i = await (o == null ? void 0 : o()) ?? {};
1434
- await (f == null ? void 0 : f(t, n, i)), Object.keys(c).forEach((_) => {
1435
- const b = c[_];
1436
- b != null && (i[_] = b);
1437
- }), r == null || r(i);
1438
- const [u, d] = Dn(e, i, a);
1439
- l && (!e.includes("xmlns=") && !i.xmlns && (i.xmlns = "http://www.w3.org/2000/svg"), !e.includes("xmlns:xlink=") && e.includes("xlink:") && !i["xmlns:xlink"] && (i["xmlns:xlink"] = "http://www.w3.org/1999/xlink"));
1440
- const m = Object.keys(i).map(
1441
- (_) => _ === "width" && u || _ === "height" && d ? null : `${_}="${i[_]}"`
1442
- ).filter((_) => _ != null);
1443
- if (m.length && (e = e.replace(Z, `<svg ${m.join(" ")} `)), s) {
1444
- const { defaultStyle: _, defaultClass: b } = s;
1445
- b && !e.includes("class=") && (e = e.replace(Z, `<svg class="${b}" `)), _ && !e.includes("style=") && (e = e.replace(Z, `<svg style="${_}" `));
1446
- }
1447
- const h = s == null ? void 0 : s.usedProps;
1448
- return h && (Object.keys(c).forEach((_) => {
1449
- const b = i[_];
1450
- b != null && (h[_] = b);
1451
- }), typeof i.width < "u" && i.width !== null && (h.width = i.width), typeof i.height < "u" && i.height !== null && (h.height = i.height)), e;
1452
- }
1453
- async function be(e, t, n, s) {
1454
- var r;
1455
- let o;
1456
- try {
1457
- if (typeof e == "function")
1458
- o = await e(n);
1459
- else {
1460
- const a = e[n];
1461
- o = typeof a == "function" ? await a() : a;
1462
- }
1463
- } catch (a) {
1464
- console.warn(
1465
- `Failed to load custom icon "${n}" in "${t}":`,
1466
- a
1467
- );
1468
- return;
1469
- }
1470
- if (o) {
1471
- const a = o.indexOf("<svg");
1472
- a > 0 && (o = o.slice(a));
1473
- const { transform: l } = (s == null ? void 0 : s.customizations) ?? {};
1474
- return o = typeof l == "function" ? await l(o, t, n) : o, o.startsWith("<svg") ? await Ne(
1475
- ((r = s == null ? void 0 : s.customizations) == null ? void 0 : r.trimCustomSvg) === !0 ? Un(o) : o,
1476
- t,
1477
- n,
1478
- s,
1479
- void 0
1480
- ) : (console.warn(
1481
- `Custom icon "${n}" in "${t}" is not a valid SVG`
1482
- ), o);
1483
- }
1484
- }
1485
- async function De(e, t, n, s) {
1486
- let o;
1487
- const { customize: r } = (s == null ? void 0 : s.customizations) ?? {};
1488
- for (const a of n)
1489
- if (o = An(e, a), o) {
1490
- let l = { ...Ie };
1491
- typeof r == "function" && (l = r(l));
1492
- const {
1493
- attributes: { width: c, height: f, ...i },
1494
- body: u
1495
- } = $n(o, l), d = s == null ? void 0 : s.scale;
1496
- return await Ne(
1497
- // DON'T remove space on <svg >
1498
- `<svg >${u}</svg>`,
1499
- t,
1500
- a,
1501
- s,
1502
- () => ({ ...i }),
1503
- (m) => {
1504
- const h = (_, b) => {
1505
- const C = m[_];
1506
- let A;
1507
- if (!re(C)) {
1508
- if (C)
1509
- return;
1510
- typeof d == "number" ? d && (A = `${d}em`) : A = b;
1511
- }
1512
- A ? m[_] = A : delete m[_];
1513
- };
1514
- h("width", c), h("height", f);
1515
- }
1516
- );
1517
- }
1518
- }
1519
- const je = async (e, t, n) => {
1520
- var o;
1521
- const s = (o = n == null ? void 0 : n.customCollections) == null ? void 0 : o[e];
1522
- if (s)
1523
- if (typeof s == "function") {
1524
- let r;
1525
- try {
1526
- r = await s(t);
1527
- } catch (a) {
1528
- console.warn(
1529
- `Failed to load custom icon "${t}" in "${e}":`,
1530
- a
1531
- );
1532
- return;
1533
- }
1534
- if (r) {
1535
- if (typeof r == "string")
1536
- return await be(
1537
- () => r,
1538
- e,
1539
- t,
1540
- n
1541
- );
1542
- if ("icons" in r) {
1543
- const a = [
1544
- t,
1545
- t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(),
1546
- t.replace(/([a-z])(\d+)/g, "$1-$2")
1547
- ];
1548
- return await De(
1549
- r,
1550
- e,
1551
- a,
1552
- n
1553
- );
1554
- }
1555
- }
1556
- } else
1557
- return await be(s, e, t, n);
1558
- };
1559
- function jn(e) {
1560
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1561
- }
1562
- var Pn = [
1563
- "academicons",
1564
- "akar-icons",
1565
- "ant-design",
1566
- "arcticons",
1567
- "basil",
1568
- "bi",
1569
- "bitcoin-icons",
1570
- "bpmn",
1571
- "brandico",
1572
- "bx",
1573
- "bxl",
1574
- "bxs",
1575
- "bytesize",
1576
- "carbon",
1577
- "cbi",
1578
- "charm",
1579
- "ci",
1580
- "cib",
1581
- "cif",
1582
- "cil",
1583
- "circle-flags",
1584
- "circum",
1585
- "clarity",
1586
- "codicon",
1587
- "covid",
1588
- "cryptocurrency-color",
1589
- "cryptocurrency",
1590
- "dashicons",
1591
- "devicon-line",
1592
- "devicon-original",
1593
- "devicon-plain",
1594
- "devicon",
1595
- "ei",
1596
- "el",
1597
- "emblemicons",
1598
- "emojione-monotone",
1599
- "emojione-v1",
1600
- "emojione",
1601
- "entypo-social",
1602
- "entypo",
1603
- "eos-icons",
1604
- "ep",
1605
- "et",
1606
- "eva",
1607
- "f7",
1608
- "fa-brands",
1609
- "fa-regular",
1610
- "fa-solid",
1611
- "fa",
1612
- "fa6-brands",
1613
- "fa6-regular",
1614
- "fa6-solid",
1615
- "fad",
1616
- "fe",
1617
- "feather",
1618
- "file-icons",
1619
- "flag",
1620
- "flagpack",
1621
- "flat-color-icons",
1622
- "flat-ui",
1623
- "flowbite",
1624
- "fluent-emoji-flat",
1625
- "fluent-emoji-high-contrast",
1626
- "fluent-emoji",
1627
- "fluent-mdl2",
1628
- "fluent",
1629
- "fontelico",
1630
- "fontisto",
1631
- "formkit",
1632
- "foundation",
1633
- "fxemoji",
1634
- "gala",
1635
- "game-icons",
1636
- "geo",
1637
- "gg",
1638
- "gis",
1639
- "gravity-ui",
1640
- "gridicons",
1641
- "grommet-icons",
1642
- "guidance",
1643
- "healthicons",
1644
- "heroicons-outline",
1645
- "heroicons-solid",
1646
- "heroicons",
1647
- "humbleicons",
1648
- "ic",
1649
- "icomoon-free",
1650
- "icon-park-outline",
1651
- "icon-park-solid",
1652
- "icon-park-twotone",
1653
- "icon-park",
1654
- "iconamoon",
1655
- "iconoir",
1656
- "icons8",
1657
- "il",
1658
- "ion",
1659
- "iwwa",
1660
- "jam",
1661
- "la",
1662
- "lets-icons",
1663
- "line-md",
1664
- "logos",
1665
- "ls",
1666
- "lucide",
1667
- "mage",
1668
- "majesticons",
1669
- "maki",
1670
- "map",
1671
- "marketeq",
1672
- "material-symbols-light",
1673
- "material-symbols",
1674
- "mdi-light",
1675
- "mdi",
1676
- "medical-icon",
1677
- "memory",
1678
- "meteocons",
1679
- "mi",
1680
- "mingcute",
1681
- "mono-icons",
1682
- "mynaui",
1683
- "nimbus",
1684
- "nonicons",
1685
- "noto-v1",
1686
- "noto",
1687
- "octicon",
1688
- "oi",
1689
- "ooui",
1690
- "openmoji",
1691
- "oui",
1692
- "pajamas",
1693
- "pepicons-pencil",
1694
- "pepicons-pop",
1695
- "pepicons-print",
1696
- "pepicons",
1697
- "ph",
1698
- "pixelarticons",
1699
- "prime",
1700
- "ps",
1701
- "quill",
1702
- "radix-icons",
1703
- "raphael",
1704
- "ri",
1705
- "si-glyph",
1706
- "simple-icons",
1707
- "simple-line-icons",
1708
- "skill-icons",
1709
- "solar",
1710
- "streamline-emojis",
1711
- "streamline",
1712
- "subway",
1713
- "svg-spinners",
1714
- "system-uicons",
1715
- "tabler",
1716
- "tdesign",
1717
- "teenyicons",
1718
- "token-branded",
1719
- "token",
1720
- "topcoat",
1721
- "twemoji",
1722
- "typcn",
1723
- "uil",
1724
- "uim",
1725
- "uis",
1726
- "uit",
1727
- "uiw",
1728
- "unjs",
1729
- "vaadin",
1730
- "vs",
1731
- "vscode-icons",
1732
- "websymbol",
1733
- "whh",
1734
- "wi",
1735
- "wpf",
1736
- "zmdi",
1737
- "zondicons"
1738
- ];
1739
- const Fn = /* @__PURE__ */ jn(Pn), Vn = 3;
1740
- function Hn(e) {
1741
- return (t = {}) => {
1742
- const {
1743
- scale: n = 1,
1744
- mode: s = "auto",
1745
- prefix: o = "i-",
1746
- warn: r = !1,
1747
- collections: a,
1748
- extraProperties: l = {},
1749
- customizations: c = {},
1750
- autoInstall: f = !1,
1751
- collectionsNodeResolvePath: i,
1752
- layer: u = "icons",
1753
- unit: d,
1754
- processor: m
1755
- } = t, h = Gn(), _ = {
1756
- addXmlNs: !0,
1757
- scale: n,
1758
- customCollections: a,
1759
- autoInstall: f,
1760
- cwd: i,
1761
- // avoid warn from @iconify/loader: we'll warn below if not found
1762
- warn: void 0,
1763
- customizations: {
1764
- ...c,
1765
- additionalProps: { ...l },
1766
- trimCustomSvg: !0,
1767
- async iconCustomizer(C, A, g) {
1768
- var S;
1769
- await ((S = c.iconCustomizer) == null ? void 0 : S.call(c, C, A, g)), d && (g.width || (g.width = `${n}${d}`), g.height || (g.height = `${n}${d}`));
1770
- }
1771
- }
1772
- };
1773
- let b;
1774
- return {
1775
- name: "@unocss/preset-icons",
1776
- enforce: "pre",
1777
- options: t,
1778
- layers: { icons: -30 },
1779
- rules: [[
1780
- /^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,
1781
- async (C) => {
1782
- let [A, g, S = s] = C, w = "", p = "", v;
1783
- b = b || await e(t);
1784
- const k = {};
1785
- if (g.includes(":"))
1786
- [w, p] = g.split(":"), v = await b(w, p, { ..._, usedProps: k });
1787
- else {
1788
- const N = g.split(/-/g);
1789
- for (let D = Vn; D >= 1 && (w = N.slice(0, D).join("-"), p = N.slice(D).join("-"), v = await b(w, p, { ..._, usedProps: k }), !v); D--)
1790
- ;
1791
- }
1792
- if (!v) {
1793
- r && !h.isESLint && Te(`failed to load icon "${A}"`);
1794
- return;
1795
- }
1796
- let O;
1797
- const T = `url("data:image/svg+xml;utf8,${Ln(v)}")`;
1798
- return S === "auto" && (S = v.includes("currentColor") ? "mask" : "bg"), S === "mask" ? O = {
1799
- "--un-icon": T,
1800
- "-webkit-mask": "var(--un-icon) no-repeat",
1801
- mask: "var(--un-icon) no-repeat",
1802
- "-webkit-mask-size": "100% 100%",
1803
- "mask-size": "100% 100%",
1804
- "background-color": "currentColor",
1805
- // for Safari https://github.com/elk-zone/elk/pull/264
1806
- color: "inherit",
1807
- ...k
1808
- } : O = {
1809
- background: `${T} no-repeat`,
1810
- "background-size": "100% 100%",
1811
- "background-color": "transparent",
1812
- ...k
1813
- }, m == null || m(O, { collection: w, icon: p, svg: v, mode: S }), O;
1814
- },
1815
- { layer: u, prefix: o }
1816
- ]]
1817
- };
1818
- };
1819
- }
1820
- function Pe(e, t) {
1821
- const n = /* @__PURE__ */ new Map();
1822
- function s(o) {
1823
- if (Fn.includes(o))
1824
- return n.has(o) || n.set(o, e(`${t}@iconify-json/${o}/icons.json`)), n.get(o);
1825
- }
1826
- return async (o, r, a) => {
1827
- let l = await je(o, r, a);
1828
- if (l)
1829
- return l;
1830
- const c = await s(o);
1831
- if (c) {
1832
- const f = [
1833
- r,
1834
- r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(),
1835
- r.replace(/([a-z])(\d+)/g, "$1-$2")
1836
- ];
1837
- l = await De(c, o, f, a);
1838
- }
1839
- return l;
1840
- };
1841
- }
1842
- function Gn() {
1843
- const e = typeof process < "u" && process.stdout && !process.versions.deno, t = e && !!he.VSCODE_CWD, n = e && !!he.ESLINT;
1844
- return {
1845
- isNode: e,
1846
- isVSCode: t,
1847
- isESLint: n
1848
- };
1849
- }
1850
- function Bn(e) {
1851
- return Pe(Lt, e);
1852
- }
1853
- const zn = Hn(async (e) => {
1854
- const t = e == null ? void 0 : e.customFetch, n = e == null ? void 0 : e.cdn;
1855
- return t && n ? Pe(t, n) : n ? Bn(n) : je;
1856
- });
1857
- function qn(e) {
1858
- return e.replace(/-(\w)/g, (t, n) => n ? n.toUpperCase() : "");
1859
- }
1860
- function ve(e) {
1861
- return e.charAt(0).toUpperCase() + e.slice(1);
1862
- }
1863
- function we(e) {
1864
- return e.replace(/(?:^|\B)([A-Z])/g, "-$1").toLowerCase();
1865
- }
1866
- var Se = ["Webkit", "Moz", "ms"];
1867
- function Wn(e) {
1868
- const t = {};
1869
- function n(s) {
1870
- const o = t[s];
1871
- if (o)
1872
- return o;
1873
- let r = qn(s);
1874
- if (r !== "filter" && r in e)
1875
- return t[s] = we(r);
1876
- r = ve(r);
1877
- for (let a = 0; a < Se.length; a++) {
1878
- const l = `${Se[a]}${r}`;
1879
- if (l in e)
1880
- return t[s] = we(ve(l));
1881
- }
1882
- return s;
1883
- }
1884
- return ({ entries: s }) => s.forEach((o) => {
1885
- o[0].startsWith("--") || (o[0] = n(o[0]));
1886
- });
1887
- }
1888
- function Kn(e) {
1889
- return e.replace(/&amp;/g, "&").replace(/&gt;/g, ">").replace(/&lt;/g, "<");
1890
- }
1891
- function Jn(e = {}) {
1892
- var P, F, R;
1893
- if (typeof window > "u") {
1894
- console.warn("@unocss/runtime been used in non-browser environment, skipped.");
1895
- return;
1896
- }
1897
- const t = window, n = window.document, s = () => n.documentElement, o = t.__unocss || {}, r = Object.assign({}, e, o.runtime), a = r.defaults || {}, l = r.cloakAttribute ?? "un-cloak";
1898
- r.autoPrefix && (a.postprocess = I(a.postprocess)).unshift(Wn(n.createElement("div").style)), (P = r.configResolved) == null || P.call(r, o, a);
1899
- const c = hn(o, a), f = (y) => r.inject ? r.inject(y) : s().prepend(y), i = () => r.rootElement ? r.rootElement() : n.body, u = /* @__PURE__ */ new Map();
1900
- let d = !0, m = /* @__PURE__ */ new Set(), h, _, b = [];
1901
- const C = () => new Promise((y) => {
1902
- b.push(y), _ != null && clearTimeout(_), _ = setTimeout(() => S().then(() => {
1903
- const E = b;
1904
- b = [], E.forEach((x) => x());
1905
- }), 0);
1906
- });
1907
- function A(y) {
1908
- if (y.nodeType !== 1)
1909
- return;
1910
- const E = y;
1911
- E.hasAttribute(l) && E.removeAttribute(l), E.querySelectorAll(`[${l}]`).forEach((x) => {
1912
- x.removeAttribute(l);
1913
- });
1914
- }
1915
- function g(y, E) {
1916
- let x = u.get(y);
1917
- if (!x)
1918
- if (x = n.createElement("style"), x.setAttribute("data-unocss-runtime-layer", y), u.set(y, x), E == null)
1919
- f(x);
1920
- else {
1921
- const U = g(E), $ = U.parentNode;
1922
- $ ? $.insertBefore(x, U.nextSibling) : f(x);
1923
- }
1924
- return x;
1925
- }
1926
- async function S() {
1927
- const y = await c.generate(m);
1928
- return y.layers.reduce((E, x) => (g(x, E).innerHTML = y.getLayer(x) ?? "", x), void 0), m = y.matched, {
1929
- ...y,
1930
- getStyleElement: (E) => u.get(E),
1931
- getStyleElements: () => u
1932
- };
1933
- }
1934
- async function w(y) {
1935
- const E = m.size;
1936
- await c.applyExtractors(y, void 0, m), E !== m.size && await C();
1937
- }
1938
- async function p(y = i()) {
1939
- const E = y && y.outerHTML;
1940
- E && (await w(`${E} ${Kn(E)}`), A(s()), A(y));
1941
- }
1942
- const v = new MutationObserver((y) => {
1943
- d || y.forEach(async (E) => {
1944
- if (E.target.nodeType !== 1)
1945
- return;
1946
- const x = E.target;
1947
- for (const U of u)
1948
- if (x === U[1])
1949
- return;
1950
- if (E.type === "childList")
1951
- E.addedNodes.forEach(async (U) => {
1952
- if (U.nodeType !== 1)
1953
- return;
1954
- const $ = U;
1955
- h && !h($) || (await w($.outerHTML), A($));
1956
- });
1957
- else {
1958
- if (h && !h(x))
1959
- return;
1960
- if (E.attributeName !== l) {
1961
- const U = Array.from(x.attributes).map((M) => M.value ? `${M.name}="${M.value}"` : M.name).join(" "), $ = `<${x.tagName.toLowerCase()} ${U}>`;
1962
- await w($);
1963
- }
1964
- x.hasAttribute(l) && x.removeAttribute(l);
1965
- }
1966
- });
1967
- });
1968
- let k = !1;
1969
- function O() {
1970
- var E, x;
1971
- if (k)
1972
- return;
1973
- const y = (E = r.observer) != null && E.target ? r.observer.target() : i();
1974
- y && (v.observe(y, {
1975
- childList: !0,
1976
- subtree: !0,
1977
- attributes: !0,
1978
- attributeFilter: (x = r.observer) == null ? void 0 : x.attributeFilter
1979
- }), k = !0);
1980
- }
1981
- function T() {
1982
- r.bypassDefined && Xn(c.blocked), p(), O();
1983
- }
1984
- function N() {
1985
- n.readyState === "loading" ? t.addEventListener("DOMContentLoaded", T) : T();
1986
- }
1987
- const D = t.__unocss_runtime = t.__unocss_runtime = {
1988
- version: c.version,
1989
- uno: c,
1990
- async extract(y) {
1991
- L(y) || (y.forEach((E) => m.add(E)), y = ""), await w(y);
1992
- },
1993
- extractAll: p,
1994
- inspect(y) {
1995
- h = y;
1996
- },
1997
- toggleObserver(y) {
1998
- y === void 0 ? d = !d : d = !!y, !k && !d && N();
1999
- },
2000
- update: S,
2001
- presets: ((F = t.__unocss_runtime) == null ? void 0 : F.presets) ?? {}
2002
- };
2003
- ((R = r.ready) == null ? void 0 : R.call(r, D)) !== !1 && (d = !1, N());
2004
- }
2005
- function Xn(e = /* @__PURE__ */ new Set()) {
2006
- for (let t = 0; t < document.styleSheets.length; t++) {
2007
- const n = document.styleSheets[t];
2008
- let s;
2009
- try {
2010
- if (s = n.cssRules || n.rules, !s)
2011
- continue;
2012
- Array.from(s).flatMap((o) => {
2013
- var r;
2014
- return ((r = o.selectorText) == null ? void 0 : r.split(/,/g)) || [];
2015
- }).forEach((o) => {
2016
- o && (o = o.trim(), o.startsWith(".") && (o = o.slice(1)), e.add(o));
2017
- });
2018
- } catch {
2019
- continue;
2020
- }
2021
- }
2022
- return e;
2023
- }
2024
- Jn({
2025
- defaults: {
2026
- presets: [
2027
- zn({
2028
- prefix: ["i-", ""],
2029
- collections: {},
2030
- cdn: "https://esm.sh/",
2031
- scale: 1.2,
2032
- extraProperties: {
2033
- display: "inline-block",
2034
- "vertical-align": "middle"
2035
- }
2036
- })
2037
- ]
2038
- },
2039
- bypassDefined: !0
2040
- });