unplugin-tailwindcss-mangle 4.0.1 → 4.0.3

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.
@@ -0,0 +1,503 @@
1
+ // ../../node_modules/.pnpm/tsup@8.3.6_jiti@2.4.2_postcss@8.5.2_tsx@4.19.2_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/esm_shims.js
2
+ import { fileURLToPath } from "url";
3
+ import path from "path";
4
+ var getFilename = () => fileURLToPath(import.meta.url);
5
+ var getDirname = () => path.dirname(getFilename());
6
+ var __dirname = /* @__PURE__ */ getDirname();
7
+
8
+ // src/utils.ts
9
+ import fs from "node:fs/promises";
10
+ import process2 from "node:process";
11
+ import { groupBy } from "@tailwindcss-mangle/shared";
12
+
13
+ // ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
14
+ var _lazyMatch = () => {
15
+ var __lib__ = (() => {
16
+ var m = Object.defineProperty, V = Object.getOwnPropertyDescriptor, G = Object.getOwnPropertyNames, T = Object.prototype.hasOwnProperty, q = (r, e) => {
17
+ for (var n in e) m(r, n, { get: e[n], enumerable: true });
18
+ }, H = (r, e, n, a) => {
19
+ if (e && typeof e == "object" || typeof e == "function") for (let t of G(e)) !T.call(r, t) && t !== n && m(r, t, { get: () => e[t], enumerable: !(a = V(e, t)) || a.enumerable });
20
+ return r;
21
+ }, J = (r) => H(m({}, "__esModule", { value: true }), r), w = {};
22
+ q(w, { default: () => re });
23
+ var A = (r) => Array.isArray(r), d = (r) => typeof r == "function", Q = (r) => r.length === 0, W = (r) => typeof r == "number", K = (r) => typeof r == "object" && r !== null, X = (r) => r instanceof RegExp, b = (r) => typeof r == "string", h = (r) => r === void 0, Y = (r) => {
24
+ const e = /* @__PURE__ */ new Map();
25
+ return (n) => {
26
+ const a = e.get(n);
27
+ if (a) return a;
28
+ const t = r(n);
29
+ return e.set(n, t), t;
30
+ };
31
+ }, rr = (r, e, n = {}) => {
32
+ const a = { cache: {}, input: r, index: 0, indexMax: 0, options: n, output: [] };
33
+ if (v(e)(a) && a.index === r.length) return a.output;
34
+ throw new Error(`Failed to parse at index ${a.indexMax}`);
35
+ }, i = (r, e) => A(r) ? er(r, e) : b(r) ? ar(r, e) : nr(r, e), er = (r, e) => {
36
+ const n = {};
37
+ for (const a of r) {
38
+ if (a.length !== 1) throw new Error(`Invalid character: "${a}"`);
39
+ const t = a.charCodeAt(0);
40
+ n[t] = true;
41
+ }
42
+ return (a) => {
43
+ const t = a.index, o = a.input;
44
+ for (; a.index < o.length && o.charCodeAt(a.index) in n; ) a.index += 1;
45
+ const u = a.index;
46
+ if (u > t) {
47
+ if (!h(e) && !a.options.silent) {
48
+ const s = a.input.slice(t, u), c = d(e) ? e(s, o, String(t)) : e;
49
+ h(c) || a.output.push(c);
50
+ }
51
+ a.indexMax = Math.max(a.indexMax, a.index);
52
+ }
53
+ return true;
54
+ };
55
+ }, nr = (r, e) => {
56
+ const n = r.source, a = r.flags.replace(/y|$/, "y"), t = new RegExp(n, a);
57
+ return g((o) => {
58
+ t.lastIndex = o.index;
59
+ const u = t.exec(o.input);
60
+ if (u) {
61
+ if (!h(e) && !o.options.silent) {
62
+ const s = d(e) ? e(...u, o.input, String(o.index)) : e;
63
+ h(s) || o.output.push(s);
64
+ }
65
+ return o.index += u[0].length, o.indexMax = Math.max(o.indexMax, o.index), true;
66
+ } else return false;
67
+ });
68
+ }, ar = (r, e) => (n) => {
69
+ if (n.input.startsWith(r, n.index)) {
70
+ if (!h(e) && !n.options.silent) {
71
+ const t = d(e) ? e(r, n.input, String(n.index)) : e;
72
+ h(t) || n.output.push(t);
73
+ }
74
+ return n.index += r.length, n.indexMax = Math.max(n.indexMax, n.index), true;
75
+ } else return false;
76
+ }, C = (r, e, n, a) => {
77
+ const t = v(r);
78
+ return g(_(M((o) => {
79
+ let u = 0;
80
+ for (; u < n; ) {
81
+ const s = o.index;
82
+ if (!t(o) || (u += 1, o.index === s)) break;
83
+ }
84
+ return u >= e;
85
+ })));
86
+ }, tr = (r, e) => C(r, 0, 1), f = (r, e) => C(r, 0, 1 / 0), x = (r, e) => {
87
+ const n = r.map(v);
88
+ return g(_(M((a) => {
89
+ for (let t = 0, o = n.length; t < o; t++) if (!n[t](a)) return false;
90
+ return true;
91
+ })));
92
+ }, l = (r, e) => {
93
+ const n = r.map(v);
94
+ return g(_((a) => {
95
+ for (let t = 0, o = n.length; t < o; t++) if (n[t](a)) return true;
96
+ return false;
97
+ }));
98
+ }, M = (r, e = false) => {
99
+ const n = v(r);
100
+ return (a) => {
101
+ const t = a.index, o = a.output.length, u = n(a);
102
+ return (!u || e) && (a.index = t, a.output.length !== o && (a.output.length = o)), u;
103
+ };
104
+ }, _ = (r, e) => {
105
+ const n = v(r);
106
+ return n;
107
+ }, g = /* @__PURE__ */ (() => {
108
+ let r = 0;
109
+ return (e) => {
110
+ const n = v(e), a = r += 1;
111
+ return (t) => {
112
+ var o;
113
+ if (t.options.memoization === false) return n(t);
114
+ const u = t.index, s = (o = t.cache)[a] || (o[a] = /* @__PURE__ */ new Map()), c = s.get(u);
115
+ if (c === false) return false;
116
+ if (W(c)) return t.index = c, true;
117
+ if (c) return t.index = c.index, c.output?.length && t.output.push(...c.output), true;
118
+ {
119
+ const Z = t.output.length;
120
+ if (n(t)) {
121
+ const D = t.index, U = t.output.length;
122
+ if (U > Z) {
123
+ const ee = t.output.slice(Z, U);
124
+ s.set(u, { index: D, output: ee });
125
+ } else s.set(u, D);
126
+ return true;
127
+ } else return s.set(u, false), false;
128
+ }
129
+ };
130
+ };
131
+ })(), E = (r) => {
132
+ let e;
133
+ return (n) => (e || (e = v(r())), e(n));
134
+ }, v = Y((r) => {
135
+ if (d(r)) return Q(r) ? E(r) : r;
136
+ if (b(r) || X(r)) return i(r);
137
+ if (A(r)) return x(r);
138
+ if (K(r)) return l(Object.values(r));
139
+ throw new Error("Invalid rule");
140
+ }), P = "abcdefghijklmnopqrstuvwxyz", ir = (r) => {
141
+ let e = "";
142
+ for (; r > 0; ) {
143
+ const n = (r - 1) % 26;
144
+ e = P[n] + e, r = Math.floor((r - 1) / 26);
145
+ }
146
+ return e;
147
+ }, O = (r) => {
148
+ let e = 0;
149
+ for (let n = 0, a = r.length; n < a; n++) e = e * 26 + P.indexOf(r[n]) + 1;
150
+ return e;
151
+ }, S = (r, e) => {
152
+ if (e < r) return S(e, r);
153
+ const n = [];
154
+ for (; r <= e; ) n.push(r++);
155
+ return n;
156
+ }, or = (r, e, n) => S(r, e).map((a) => String(a).padStart(n, "0")), R = (r, e) => S(O(r), O(e)).map(ir), p = (r) => r, z = (r) => ur((e) => rr(e, r, { memoization: false }).join("")), ur = (r) => {
157
+ const e = {};
158
+ return (n) => e[n] ?? (e[n] = r(n));
159
+ }, sr = i(/^\*\*\/\*$/, ".*"), cr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/, (r, e, n) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}`), lr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/, (r, e, n, a) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}(?:${a.replaceAll(",", "|").replaceAll(".", "\\.")})`), y = i(/\\./, p), pr = i(/[$.*+?^(){}[\]\|]/, (r) => `\\${r}`), vr = i(/./, p), hr = i(/^(?:!!)*!(.*)$/, (r, e) => `(?!^${L(e)}$).*?`), dr = i(/^(!!)+/, ""), fr = l([hr, dr]), xr = i(/\/(\*\*\/)+/, "(?:/.+/|/)"), gr = i(/^(\*\*\/)+/, "(?:^|.*/)"), mr = i(/\/(\*\*)$/, "(?:/.*|$)"), _r = i(/\*\*/, ".*"), j = l([xr, gr, mr, _r]), Sr = i(/\*\/(?!\*\*\/)/, "[^/]*/"), yr = i(/\*/, "[^/]*"), N = l([Sr, yr]), k = i("?", "[^/]"), $r = i("[", p), wr = i("]", p), Ar = i(/[!^]/, "^/"), br = i(/[a-z]-[a-z]|[0-9]-[0-9]/i, p), Cr = i(/[$.*+?^(){}[\|]/, (r) => `\\${r}`), Mr = i(/[^\]]/, p), Er = l([y, Cr, br, Mr]), B = x([$r, tr(Ar), f(Er), wr]), Pr = i("{", "(?:"), Or = i("}", ")"), Rr = i(/(\d+)\.\.(\d+)/, (r, e, n) => or(+e, +n, Math.min(e.length, n.length)).join("|")), zr = i(/([a-z]+)\.\.([a-z]+)/, (r, e, n) => R(e, n).join("|")), jr = i(/([A-Z]+)\.\.([A-Z]+)/, (r, e, n) => R(e.toLowerCase(), n.toLowerCase()).join("|").toUpperCase()), Nr = l([Rr, zr, jr]), I = x([Pr, Nr, Or]), kr = i("{", "(?:"), Br = i("}", ")"), Ir = i(",", "|"), Fr = i(/[$.*+?^(){[\]\|]/, (r) => `\\${r}`), Lr = i(/[^}]/, p), Zr = E(() => F), Dr = l([j, N, k, B, I, Zr, y, Fr, Ir, Lr]), F = x([kr, f(Dr), Br]), Ur = f(l([sr, cr, lr, fr, j, N, k, B, I, F, y, pr, vr])), Vr = Ur, Gr = z(Vr), L = Gr, Tr = i(/\\./, p), qr = i(/./, p), Hr = i(/\*\*\*+/, "*"), Jr = i(/([^/{[(!])\*\*/, (r, e) => `${e}*`), Qr = i(/(^|.)\*\*(?=[^*/)\]}])/, (r, e) => `${e}*`), Wr = f(l([Tr, Hr, Jr, Qr, qr])), Kr = Wr, Xr = z(Kr), Yr = Xr, $ = (r, e) => {
160
+ const n = Array.isArray(r) ? r : [r];
161
+ if (!n.length) return false;
162
+ const a = n.map($.compile), t = n.every((s) => /(\/(?:\*\*)?|\[\/\])$/.test(s)), o = e.replace(/[\\\/]+/g, "/").replace(/\/$/, t ? "/" : "");
163
+ return a.some((s) => s.test(o));
164
+ };
165
+ $.compile = (r) => new RegExp(`^${L(Yr(r))}$`, "s");
166
+ var re = $;
167
+ return J(w);
168
+ })();
169
+ return __lib__.default || __lib__;
170
+ };
171
+ var _match;
172
+ var zeptomatch = (path2, pattern) => {
173
+ if (!_match) {
174
+ _match = _lazyMatch();
175
+ _lazyMatch = null;
176
+ }
177
+ return _match(path2, pattern);
178
+ };
179
+ var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
180
+ function normalizeWindowsPath(input = "") {
181
+ if (!input) {
182
+ return input;
183
+ }
184
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
185
+ }
186
+ var _UNC_REGEX = /^[/\\]{2}/;
187
+ var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
188
+ var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
189
+ var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
190
+ var _EXTNAME_RE = /.(\.[^./]+|\.)$/;
191
+ var _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
192
+ var sep = "/";
193
+ var normalize = function(path2) {
194
+ if (path2.length === 0) {
195
+ return ".";
196
+ }
197
+ path2 = normalizeWindowsPath(path2);
198
+ const isUNCPath = path2.match(_UNC_REGEX);
199
+ const isPathAbsolute = isAbsolute(path2);
200
+ const trailingSeparator = path2[path2.length - 1] === "/";
201
+ path2 = normalizeString(path2, !isPathAbsolute);
202
+ if (path2.length === 0) {
203
+ if (isPathAbsolute) {
204
+ return "/";
205
+ }
206
+ return trailingSeparator ? "./" : ".";
207
+ }
208
+ if (trailingSeparator) {
209
+ path2 += "/";
210
+ }
211
+ if (_DRIVE_LETTER_RE.test(path2)) {
212
+ path2 += "/";
213
+ }
214
+ if (isUNCPath) {
215
+ if (!isPathAbsolute) {
216
+ return `//./${path2}`;
217
+ }
218
+ return `//${path2}`;
219
+ }
220
+ return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
221
+ };
222
+ var join = function(...segments) {
223
+ let path2 = "";
224
+ for (const seg of segments) {
225
+ if (!seg) {
226
+ continue;
227
+ }
228
+ if (path2.length > 0) {
229
+ const pathTrailing = path2[path2.length - 1] === "/";
230
+ const segLeading = seg[0] === "/";
231
+ const both = pathTrailing && segLeading;
232
+ if (both) {
233
+ path2 += seg.slice(1);
234
+ } else {
235
+ path2 += pathTrailing || segLeading ? seg : `/${seg}`;
236
+ }
237
+ } else {
238
+ path2 += seg;
239
+ }
240
+ }
241
+ return normalize(path2);
242
+ };
243
+ function cwd() {
244
+ if (typeof process !== "undefined" && typeof process.cwd === "function") {
245
+ return process.cwd().replace(/\\/g, "/");
246
+ }
247
+ return "/";
248
+ }
249
+ var resolve = function(...arguments_) {
250
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
251
+ let resolvedPath = "";
252
+ let resolvedAbsolute = false;
253
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
254
+ const path2 = index >= 0 ? arguments_[index] : cwd();
255
+ if (!path2 || path2.length === 0) {
256
+ continue;
257
+ }
258
+ resolvedPath = `${path2}/${resolvedPath}`;
259
+ resolvedAbsolute = isAbsolute(path2);
260
+ }
261
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
262
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
263
+ return `/${resolvedPath}`;
264
+ }
265
+ return resolvedPath.length > 0 ? resolvedPath : ".";
266
+ };
267
+ function normalizeString(path2, allowAboveRoot) {
268
+ let res = "";
269
+ let lastSegmentLength = 0;
270
+ let lastSlash = -1;
271
+ let dots = 0;
272
+ let char = null;
273
+ for (let index = 0; index <= path2.length; ++index) {
274
+ if (index < path2.length) {
275
+ char = path2[index];
276
+ } else if (char === "/") {
277
+ break;
278
+ } else {
279
+ char = "/";
280
+ }
281
+ if (char === "/") {
282
+ if (lastSlash === index - 1 || dots === 1) ;
283
+ else if (dots === 2) {
284
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
285
+ if (res.length > 2) {
286
+ const lastSlashIndex = res.lastIndexOf("/");
287
+ if (lastSlashIndex === -1) {
288
+ res = "";
289
+ lastSegmentLength = 0;
290
+ } else {
291
+ res = res.slice(0, lastSlashIndex);
292
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
293
+ }
294
+ lastSlash = index;
295
+ dots = 0;
296
+ continue;
297
+ } else if (res.length > 0) {
298
+ res = "";
299
+ lastSegmentLength = 0;
300
+ lastSlash = index;
301
+ dots = 0;
302
+ continue;
303
+ }
304
+ }
305
+ if (allowAboveRoot) {
306
+ res += res.length > 0 ? "/.." : "..";
307
+ lastSegmentLength = 2;
308
+ }
309
+ } else {
310
+ if (res.length > 0) {
311
+ res += `/${path2.slice(lastSlash + 1, index)}`;
312
+ } else {
313
+ res = path2.slice(lastSlash + 1, index);
314
+ }
315
+ lastSegmentLength = index - lastSlash - 1;
316
+ }
317
+ lastSlash = index;
318
+ dots = 0;
319
+ } else if (char === "." && dots !== -1) {
320
+ ++dots;
321
+ } else {
322
+ dots = -1;
323
+ }
324
+ }
325
+ return res;
326
+ }
327
+ var isAbsolute = function(p) {
328
+ return _IS_ABSOLUTE_RE.test(p);
329
+ };
330
+ var toNamespacedPath = function(p) {
331
+ return normalizeWindowsPath(p);
332
+ };
333
+ var extname = function(p) {
334
+ if (p === "..") return "";
335
+ const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
336
+ return match && match[1] || "";
337
+ };
338
+ var relative = function(from, to) {
339
+ const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
340
+ const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
341
+ if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
342
+ return _to.join("/");
343
+ }
344
+ const _fromCopy = [..._from];
345
+ for (const segment of _fromCopy) {
346
+ if (_to[0] !== segment) {
347
+ break;
348
+ }
349
+ _from.shift();
350
+ _to.shift();
351
+ }
352
+ return [..._from.map(() => ".."), ..._to].join("/");
353
+ };
354
+ var dirname = function(p) {
355
+ const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
356
+ if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
357
+ segments[0] += "/";
358
+ }
359
+ return segments.join("/") || (isAbsolute(p) ? "/" : ".");
360
+ };
361
+ var format = function(p) {
362
+ const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
363
+ const segments = [p.root, p.dir, p.base ?? (p.name ?? "") + ext].filter(
364
+ Boolean
365
+ );
366
+ return normalizeWindowsPath(
367
+ p.root ? resolve(...segments) : segments.join("/")
368
+ );
369
+ };
370
+ var basename = function(p, extension) {
371
+ const segments = normalizeWindowsPath(p).split("/");
372
+ let lastSegment = "";
373
+ for (let i = segments.length - 1; i >= 0; i--) {
374
+ const val = segments[i];
375
+ if (val) {
376
+ lastSegment = val;
377
+ break;
378
+ }
379
+ }
380
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
381
+ };
382
+ var parse = function(p) {
383
+ const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
384
+ const base = basename(p);
385
+ const extension = extname(base);
386
+ return {
387
+ root,
388
+ dir: dirname(p),
389
+ base,
390
+ ext: extension,
391
+ name: base.slice(0, base.length - extension.length)
392
+ };
393
+ };
394
+ var matchesGlob = (path2, pattern) => {
395
+ return zeptomatch(pattern, normalize(path2));
396
+ };
397
+ var _path = {
398
+ __proto__: null,
399
+ basename,
400
+ dirname,
401
+ extname,
402
+ format,
403
+ isAbsolute,
404
+ join,
405
+ matchesGlob,
406
+ normalize,
407
+ normalizeString,
408
+ parse,
409
+ relative,
410
+ resolve,
411
+ sep,
412
+ toNamespacedPath
413
+ };
414
+
415
+ // ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs
416
+ var delimiter = /* @__PURE__ */ (() => globalThis.process?.platform === "win32" ? ";" : ":")();
417
+ var _platforms = { posix: void 0, win32: void 0 };
418
+ var mix = (del = delimiter) => {
419
+ return new Proxy(_path, {
420
+ get(_, prop) {
421
+ if (prop === "delimiter") return del;
422
+ if (prop === "posix") return posix;
423
+ if (prop === "win32") return win32;
424
+ return _platforms[prop] || _path[prop];
425
+ }
426
+ });
427
+ };
428
+ var posix = /* @__PURE__ */ mix(":");
429
+ var win32 = /* @__PURE__ */ mix(";");
430
+
431
+ // src/constants.ts
432
+ var pluginName = "unplugin-tailwindcss-mangle";
433
+
434
+ // src/utils.ts
435
+ import { defaultMangleClassFilter, isMap, isRegexp } from "@tailwindcss-mangle/shared";
436
+ function escapeStringRegexp(str) {
437
+ if (typeof str !== "string") {
438
+ throw new TypeError("Expected a string");
439
+ }
440
+ return str.replaceAll(/[$()*+.?[\\\]^{|}]/g, "\\$&").replaceAll("-", "\\x2d");
441
+ }
442
+ function getGroupedEntries(entries, options = {
443
+ cssMatcher(file) {
444
+ return /\.css$/.test(file);
445
+ },
446
+ htmlMatcher(file) {
447
+ return /\.html?$/.test(file);
448
+ },
449
+ jsMatcher(file) {
450
+ return /\.[cm]?js$/.test(file);
451
+ }
452
+ }) {
453
+ const { cssMatcher, htmlMatcher, jsMatcher } = options;
454
+ const groupedEntries = groupBy(entries, ([file]) => {
455
+ if (cssMatcher(file)) {
456
+ return "css";
457
+ } else if (htmlMatcher(file)) {
458
+ return "html";
459
+ } else if (jsMatcher(file)) {
460
+ return "js";
461
+ } else {
462
+ return "other";
463
+ }
464
+ });
465
+ if (!groupedEntries.css) {
466
+ groupedEntries.css = [];
467
+ }
468
+ if (!groupedEntries.html) {
469
+ groupedEntries.html = [];
470
+ }
471
+ if (!groupedEntries.js) {
472
+ groupedEntries.js = [];
473
+ }
474
+ if (!groupedEntries.other) {
475
+ groupedEntries.other = [];
476
+ }
477
+ return groupedEntries;
478
+ }
479
+ function getCacheDir(basedir = process2.cwd()) {
480
+ return posix.resolve(basedir, "node_modules/.cache", pluginName);
481
+ }
482
+ async function ensureDir(p) {
483
+ try {
484
+ await fs.access(p);
485
+ } catch {
486
+ await fs.mkdir(p, {
487
+ recursive: true
488
+ });
489
+ }
490
+ }
491
+
492
+ export {
493
+ __dirname,
494
+ posix,
495
+ pluginName,
496
+ escapeStringRegexp,
497
+ getGroupedEntries,
498
+ getCacheDir,
499
+ ensureDir,
500
+ defaultMangleClassFilter,
501
+ isMap,
502
+ isRegexp
503
+ };
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkQJCZGHDWcjs = require('./chunk-QJCZGHDW.cjs');
5
+ var _chunkBZZ6FFT4cjs = require('./chunk-BZZ6FFT4.cjs');
6
6
 
7
7
  // src/core/plugin.ts
8
8
  var _unplugin = require('unplugin');
@@ -11,13 +11,13 @@ var _unplugin = require('unplugin');
11
11
  var _pluginutils = require('@rollup/pluginutils');
12
12
  var _core = require('@tailwindcss-mangle/core');
13
13
  var _iscssrequest = require('is-css-request');
14
- var WEBPACK_LOADER = _chunkQJCZGHDWcjs.path.resolve(__dirname, false ? "../../dist/core/loader.cjs" : "core/loader.cjs");
14
+ var WEBPACK_LOADER = _chunkBZZ6FFT4cjs.posix.resolve(__dirname, false ? "../../dist/core/loader.cjs" : "core/loader.cjs");
15
15
  var factory = (options) => {
16
16
  const ctx = new (0, _core.Context)();
17
17
  let filter = (_id) => true;
18
18
  return [
19
19
  {
20
- name: `${_chunkQJCZGHDWcjs.pluginName}:pre`,
20
+ name: `${_chunkBZZ6FFT4cjs.pluginName}:pre`,
21
21
  enforce: "pre",
22
22
  async buildStart() {
23
23
  await ctx.initConfig({
@@ -27,7 +27,7 @@ var factory = (options) => {
27
27
  }
28
28
  },
29
29
  {
30
- name: `${_chunkQJCZGHDWcjs.pluginName}`,
30
+ name: `${_chunkBZZ6FFT4cjs.pluginName}`,
31
31
  transformInclude(id) {
32
32
  return filter(id);
33
33
  },
@@ -53,8 +53,8 @@ var factory = (options) => {
53
53
  webpack(compiler) {
54
54
  const { NormalModule } = compiler.webpack;
55
55
  const isExisted = true;
56
- compiler.hooks.compilation.tap(_chunkQJCZGHDWcjs.pluginName, (compilation) => {
57
- NormalModule.getCompilationHooks(compilation).loader.tap(_chunkQJCZGHDWcjs.pluginName, (_loaderContext, module) => {
56
+ compiler.hooks.compilation.tap(_chunkBZZ6FFT4cjs.pluginName, (compilation) => {
57
+ NormalModule.getCompilationHooks(compilation).loader.tap(_chunkBZZ6FFT4cjs.pluginName, (_loaderContext, module) => {
58
58
  if (isExisted) {
59
59
  const idx = module.loaders.findIndex((x) => x.loader.includes("postcss-loader"));
60
60
  if (idx > -1) {
@@ -73,7 +73,7 @@ var factory = (options) => {
73
73
  }
74
74
  },
75
75
  {
76
- name: `${_chunkQJCZGHDWcjs.pluginName}:post`,
76
+ name: `${_chunkBZZ6FFT4cjs.pluginName}:post`,
77
77
  enforce: "post",
78
78
  vite: {
79
79
  transformIndexHtml(html) {
@@ -99,14 +99,14 @@ var factory = (options) => {
99
99
  webpack(compiler) {
100
100
  const { Compilation, sources } = compiler.webpack;
101
101
  const { ConcatSource } = sources;
102
- compiler.hooks.compilation.tap(_chunkQJCZGHDWcjs.pluginName, (compilation) => {
102
+ compiler.hooks.compilation.tap(_chunkBZZ6FFT4cjs.pluginName, (compilation) => {
103
103
  compilation.hooks.processAssets.tapPromise(
104
104
  {
105
- name: _chunkQJCZGHDWcjs.pluginName,
105
+ name: _chunkBZZ6FFT4cjs.pluginName,
106
106
  stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE
107
107
  },
108
108
  async (assets) => {
109
- const groupedEntries = _chunkQJCZGHDWcjs.getGroupedEntries.call(void 0, Object.entries(assets));
109
+ const groupedEntries = _chunkBZZ6FFT4cjs.getGroupedEntries.call(void 0, Object.entries(assets));
110
110
  if (groupedEntries.css.length > 0) {
111
111
  for (let i = 0; i < groupedEntries.css.length; i++) {
112
112
  const [id, cssSource] = groupedEntries.css[i];
package/dist/esbuild.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkQSSGNNXYcjs = require('./chunk-QSSGNNXY.cjs');
4
- require('./chunk-QJCZGHDW.cjs');
3
+ var _chunkYFLTUCKGcjs = require('./chunk-YFLTUCKG.cjs');
4
+ require('./chunk-BZZ6FFT4.cjs');
5
5
 
6
6
  // src/esbuild.ts
7
- var esbuild_default = _chunkQSSGNNXYcjs.plugin_default.esbuild;
7
+ var esbuild_default = _chunkYFLTUCKGcjs.plugin_default.esbuild;
8
8
 
9
9
 
10
10
  exports.default = esbuild_default;
package/dist/esbuild.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  plugin_default
3
- } from "./chunk-DLPKB44Y.js";
4
- import "./chunk-SQYX773M.js";
3
+ } from "./chunk-CI6RSKGG.js";
4
+ import "./chunk-DRXELMFM.js";
5
5
 
6
6
  // src/esbuild.ts
7
7
  var esbuild_default = plugin_default.esbuild;
package/dist/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkQSSGNNXYcjs = require('./chunk-QSSGNNXY.cjs');
4
- require('./chunk-QJCZGHDW.cjs');
3
+ var _chunkYFLTUCKGcjs = require('./chunk-YFLTUCKG.cjs');
4
+ require('./chunk-BZZ6FFT4.cjs');
5
5
 
6
6
 
7
- exports.default = _chunkQSSGNNXYcjs.plugin_default;
7
+ exports.default = _chunkYFLTUCKGcjs.plugin_default;
8
8
 
9
9
  module.exports = exports.default;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  plugin_default
3
- } from "./chunk-DLPKB44Y.js";
4
- import "./chunk-SQYX773M.js";
3
+ } from "./chunk-CI6RSKGG.js";
4
+ import "./chunk-DRXELMFM.js";
5
5
  export {
6
6
  plugin_default as default
7
7
  };
package/dist/nuxt.cjs CHANGED
@@ -1,17 +1,17 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkQSSGNNXYcjs = require('./chunk-QSSGNNXY.cjs');
4
- require('./chunk-QJCZGHDW.cjs');
3
+ var _chunkYFLTUCKGcjs = require('./chunk-YFLTUCKG.cjs');
4
+ require('./chunk-BZZ6FFT4.cjs');
5
5
 
6
6
  // src/nuxt.ts
7
7
  function nuxt_default(options = {}, nuxt) {
8
8
  nuxt.hook("webpack:config", (config) => {
9
9
  config.plugins = config.plugins || [];
10
- config.plugins.unshift(_chunkQSSGNNXYcjs.plugin_default.webpack(options));
10
+ config.plugins.unshift(_chunkYFLTUCKGcjs.plugin_default.webpack(options));
11
11
  });
12
12
  nuxt.hook("vite:extendConfig", (config) => {
13
13
  config.plugins = config.plugins || [];
14
- config.plugins.push(_chunkQSSGNNXYcjs.plugin_default.vite(options));
14
+ config.plugins.push(_chunkYFLTUCKGcjs.plugin_default.vite(options));
15
15
  });
16
16
  }
17
17
 
package/dist/nuxt.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  plugin_default
3
- } from "./chunk-DLPKB44Y.js";
4
- import "./chunk-SQYX773M.js";
3
+ } from "./chunk-CI6RSKGG.js";
4
+ import "./chunk-DRXELMFM.js";
5
5
 
6
6
  // src/nuxt.ts
7
7
  function nuxt_default(options = {}, nuxt) {
package/dist/rollup.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkQSSGNNXYcjs = require('./chunk-QSSGNNXY.cjs');
4
- require('./chunk-QJCZGHDW.cjs');
3
+ var _chunkYFLTUCKGcjs = require('./chunk-YFLTUCKG.cjs');
4
+ require('./chunk-BZZ6FFT4.cjs');
5
5
 
6
6
  // src/rollup.ts
7
- var rollup_default = _chunkQSSGNNXYcjs.plugin_default.rollup;
7
+ var rollup_default = _chunkYFLTUCKGcjs.plugin_default.rollup;
8
8
 
9
9
 
10
10
  exports.default = rollup_default;
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  plugin_default
3
- } from "./chunk-DLPKB44Y.js";
4
- import "./chunk-SQYX773M.js";
3
+ } from "./chunk-CI6RSKGG.js";
4
+ import "./chunk-DRXELMFM.js";
5
5
 
6
6
  // src/rollup.ts
7
7
  var rollup_default = plugin_default.rollup;