@iconoma/cli 0.0.1-beta.2 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,883 +0,0 @@
1
- export const id = 533;
2
- export const ids = [533];
3
- export const modules = {
4
-
5
- /***/ 5934:
6
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
7
-
8
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9
- /* harmony export */ t: () => (/* binding */ require_lib)
10
- /* harmony export */ });
11
- /* harmony import */ var _chunk_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5923);
12
-
13
-
14
- //#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/parse.js
15
- var require_parse = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/parse.js": ((exports, module) => {
16
- var openParentheses = "(".charCodeAt(0);
17
- var closeParentheses = ")".charCodeAt(0);
18
- var singleQuote = "'".charCodeAt(0);
19
- var doubleQuote = "\"".charCodeAt(0);
20
- var backslash = "\\".charCodeAt(0);
21
- var slash = "/".charCodeAt(0);
22
- var comma = ",".charCodeAt(0);
23
- var colon = ":".charCodeAt(0);
24
- var star = "*".charCodeAt(0);
25
- var uLower = "u".charCodeAt(0);
26
- var uUpper = "U".charCodeAt(0);
27
- var plus$1 = "+".charCodeAt(0);
28
- var isUnicodeRange = /^[a-f0-9?-]+$/i;
29
- module.exports = function(input) {
30
- var tokens = [];
31
- var value = input;
32
- var next, quote, prev, token, escape, escapePos, whitespacePos, parenthesesOpenPos;
33
- var pos = 0;
34
- var code = value.charCodeAt(pos);
35
- var max = value.length;
36
- var stack = [{ nodes: tokens }];
37
- var balanced = 0;
38
- var parent;
39
- var name = "";
40
- var before = "";
41
- var after = "";
42
- while (pos < max) if (code <= 32) {
43
- next = pos;
44
- do {
45
- next += 1;
46
- code = value.charCodeAt(next);
47
- } while (code <= 32);
48
- token = value.slice(pos, next);
49
- prev = tokens[tokens.length - 1];
50
- if (code === closeParentheses && balanced) after = token;
51
- else if (prev && prev.type === "div") {
52
- prev.after = token;
53
- prev.sourceEndIndex += token.length;
54
- } else if (code === comma || code === colon || code === slash && value.charCodeAt(next + 1) !== star && (!parent || parent && parent.type === "function" && parent.value !== "calc")) before = token;
55
- else tokens.push({
56
- type: "space",
57
- sourceIndex: pos,
58
- sourceEndIndex: next,
59
- value: token
60
- });
61
- pos = next;
62
- } else if (code === singleQuote || code === doubleQuote) {
63
- next = pos;
64
- quote = code === singleQuote ? "'" : "\"";
65
- token = {
66
- type: "string",
67
- sourceIndex: pos,
68
- quote
69
- };
70
- do {
71
- escape = false;
72
- next = value.indexOf(quote, next + 1);
73
- if (~next) {
74
- escapePos = next;
75
- while (value.charCodeAt(escapePos - 1) === backslash) {
76
- escapePos -= 1;
77
- escape = !escape;
78
- }
79
- } else {
80
- value += quote;
81
- next = value.length - 1;
82
- token.unclosed = true;
83
- }
84
- } while (escape);
85
- token.value = value.slice(pos + 1, next);
86
- token.sourceEndIndex = token.unclosed ? next : next + 1;
87
- tokens.push(token);
88
- pos = next + 1;
89
- code = value.charCodeAt(pos);
90
- } else if (code === slash && value.charCodeAt(pos + 1) === star) {
91
- next = value.indexOf("*/", pos);
92
- token = {
93
- type: "comment",
94
- sourceIndex: pos,
95
- sourceEndIndex: next + 2
96
- };
97
- if (next === -1) {
98
- token.unclosed = true;
99
- next = value.length;
100
- token.sourceEndIndex = next;
101
- }
102
- token.value = value.slice(pos + 2, next);
103
- tokens.push(token);
104
- pos = next + 2;
105
- code = value.charCodeAt(pos);
106
- } else if ((code === slash || code === star) && parent && parent.type === "function" && parent.value === "calc") {
107
- token = value[pos];
108
- tokens.push({
109
- type: "word",
110
- sourceIndex: pos - before.length,
111
- sourceEndIndex: pos + token.length,
112
- value: token
113
- });
114
- pos += 1;
115
- code = value.charCodeAt(pos);
116
- } else if (code === slash || code === comma || code === colon) {
117
- token = value[pos];
118
- tokens.push({
119
- type: "div",
120
- sourceIndex: pos - before.length,
121
- sourceEndIndex: pos + token.length,
122
- value: token,
123
- before,
124
- after: ""
125
- });
126
- before = "";
127
- pos += 1;
128
- code = value.charCodeAt(pos);
129
- } else if (openParentheses === code) {
130
- next = pos;
131
- do {
132
- next += 1;
133
- code = value.charCodeAt(next);
134
- } while (code <= 32);
135
- parenthesesOpenPos = pos;
136
- token = {
137
- type: "function",
138
- sourceIndex: pos - name.length,
139
- value: name,
140
- before: value.slice(parenthesesOpenPos + 1, next)
141
- };
142
- pos = next;
143
- if (name === "url" && code !== singleQuote && code !== doubleQuote) {
144
- next -= 1;
145
- do {
146
- escape = false;
147
- next = value.indexOf(")", next + 1);
148
- if (~next) {
149
- escapePos = next;
150
- while (value.charCodeAt(escapePos - 1) === backslash) {
151
- escapePos -= 1;
152
- escape = !escape;
153
- }
154
- } else {
155
- value += ")";
156
- next = value.length - 1;
157
- token.unclosed = true;
158
- }
159
- } while (escape);
160
- whitespacePos = next;
161
- do {
162
- whitespacePos -= 1;
163
- code = value.charCodeAt(whitespacePos);
164
- } while (code <= 32);
165
- if (parenthesesOpenPos < whitespacePos) {
166
- if (pos !== whitespacePos + 1) token.nodes = [{
167
- type: "word",
168
- sourceIndex: pos,
169
- sourceEndIndex: whitespacePos + 1,
170
- value: value.slice(pos, whitespacePos + 1)
171
- }];
172
- else token.nodes = [];
173
- if (token.unclosed && whitespacePos + 1 !== next) {
174
- token.after = "";
175
- token.nodes.push({
176
- type: "space",
177
- sourceIndex: whitespacePos + 1,
178
- sourceEndIndex: next,
179
- value: value.slice(whitespacePos + 1, next)
180
- });
181
- } else {
182
- token.after = value.slice(whitespacePos + 1, next);
183
- token.sourceEndIndex = next;
184
- }
185
- } else {
186
- token.after = "";
187
- token.nodes = [];
188
- }
189
- pos = next + 1;
190
- token.sourceEndIndex = token.unclosed ? next : pos;
191
- code = value.charCodeAt(pos);
192
- tokens.push(token);
193
- } else {
194
- balanced += 1;
195
- token.after = "";
196
- token.sourceEndIndex = pos + 1;
197
- tokens.push(token);
198
- stack.push(token);
199
- tokens = token.nodes = [];
200
- parent = token;
201
- }
202
- name = "";
203
- } else if (closeParentheses === code && balanced) {
204
- pos += 1;
205
- code = value.charCodeAt(pos);
206
- parent.after = after;
207
- parent.sourceEndIndex += after.length;
208
- after = "";
209
- balanced -= 1;
210
- stack[stack.length - 1].sourceEndIndex = pos;
211
- stack.pop();
212
- parent = stack[balanced];
213
- tokens = parent.nodes;
214
- } else {
215
- next = pos;
216
- do {
217
- if (code === backslash) next += 1;
218
- next += 1;
219
- code = value.charCodeAt(next);
220
- } while (next < max && !(code <= 32 || code === singleQuote || code === doubleQuote || code === comma || code === colon || code === slash || code === openParentheses || code === star && parent && parent.type === "function" && parent.value === "calc" || code === slash && parent.type === "function" && parent.value === "calc" || code === closeParentheses && balanced));
221
- token = value.slice(pos, next);
222
- if (openParentheses === code) name = token;
223
- else if ((uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) && plus$1 === token.charCodeAt(1) && isUnicodeRange.test(token.slice(2))) tokens.push({
224
- type: "unicode-range",
225
- sourceIndex: pos,
226
- sourceEndIndex: next,
227
- value: token
228
- });
229
- else tokens.push({
230
- type: "word",
231
- sourceIndex: pos,
232
- sourceEndIndex: next,
233
- value: token
234
- });
235
- pos = next;
236
- }
237
- for (pos = stack.length - 1; pos; pos -= 1) {
238
- stack[pos].unclosed = true;
239
- stack[pos].sourceEndIndex = value.length;
240
- }
241
- return stack[0].nodes;
242
- };
243
- }) });
244
-
245
- //#endregion
246
- //#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/walk.js
247
- var require_walk = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/walk.js": ((exports, module) => {
248
- module.exports = function walk$1(nodes, cb, bubble) {
249
- var i, max, node, result;
250
- for (i = 0, max = nodes.length; i < max; i += 1) {
251
- node = nodes[i];
252
- if (!bubble) result = cb(node, i, nodes);
253
- if (result !== false && node.type === "function" && Array.isArray(node.nodes)) walk$1(node.nodes, cb, bubble);
254
- if (bubble) cb(node, i, nodes);
255
- }
256
- };
257
- }) });
258
-
259
- //#endregion
260
- //#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/stringify.js
261
- var require_stringify = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/stringify.js": ((exports, module) => {
262
- function stringifyNode(node, custom) {
263
- var type = node.type;
264
- var value = node.value;
265
- var buf;
266
- var customResult;
267
- if (custom && (customResult = custom(node)) !== void 0) return customResult;
268
- else if (type === "word" || type === "space") return value;
269
- else if (type === "string") {
270
- buf = node.quote || "";
271
- return buf + value + (node.unclosed ? "" : buf);
272
- } else if (type === "comment") return "/*" + value + (node.unclosed ? "" : "*/");
273
- else if (type === "div") return (node.before || "") + value + (node.after || "");
274
- else if (Array.isArray(node.nodes)) {
275
- buf = stringify$1(node.nodes, custom);
276
- if (type !== "function") return buf;
277
- return value + "(" + (node.before || "") + buf + (node.after || "") + (node.unclosed ? "" : ")");
278
- }
279
- return value;
280
- }
281
- function stringify$1(nodes, custom) {
282
- var result, i;
283
- if (Array.isArray(nodes)) {
284
- result = "";
285
- for (i = nodes.length - 1; ~i; i -= 1) result = stringifyNode(nodes[i], custom) + result;
286
- return result;
287
- }
288
- return stringifyNode(nodes, custom);
289
- }
290
- module.exports = stringify$1;
291
- }) });
292
-
293
- //#endregion
294
- //#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/unit.js
295
- var require_unit = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/unit.js": ((exports, module) => {
296
- var minus = "-".charCodeAt(0);
297
- var plus = "+".charCodeAt(0);
298
- var dot = ".".charCodeAt(0);
299
- var exp = "e".charCodeAt(0);
300
- var EXP = "E".charCodeAt(0);
301
- function likeNumber(value) {
302
- var code = value.charCodeAt(0);
303
- var nextCode;
304
- if (code === plus || code === minus) {
305
- nextCode = value.charCodeAt(1);
306
- if (nextCode >= 48 && nextCode <= 57) return true;
307
- var nextNextCode = value.charCodeAt(2);
308
- if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) return true;
309
- return false;
310
- }
311
- if (code === dot) {
312
- nextCode = value.charCodeAt(1);
313
- if (nextCode >= 48 && nextCode <= 57) return true;
314
- return false;
315
- }
316
- if (code >= 48 && code <= 57) return true;
317
- return false;
318
- }
319
- module.exports = function(value) {
320
- var pos = 0;
321
- var length = value.length;
322
- var code;
323
- var nextCode;
324
- var nextNextCode;
325
- if (length === 0 || !likeNumber(value)) return false;
326
- code = value.charCodeAt(pos);
327
- if (code === plus || code === minus) pos++;
328
- while (pos < length) {
329
- code = value.charCodeAt(pos);
330
- if (code < 48 || code > 57) break;
331
- pos += 1;
332
- }
333
- code = value.charCodeAt(pos);
334
- nextCode = value.charCodeAt(pos + 1);
335
- if (code === dot && nextCode >= 48 && nextCode <= 57) {
336
- pos += 2;
337
- while (pos < length) {
338
- code = value.charCodeAt(pos);
339
- if (code < 48 || code > 57) break;
340
- pos += 1;
341
- }
342
- }
343
- code = value.charCodeAt(pos);
344
- nextCode = value.charCodeAt(pos + 1);
345
- nextNextCode = value.charCodeAt(pos + 2);
346
- if ((code === exp || code === EXP) && (nextCode >= 48 && nextCode <= 57 || (nextCode === plus || nextCode === minus) && nextNextCode >= 48 && nextNextCode <= 57)) {
347
- pos += nextCode === plus || nextCode === minus ? 3 : 2;
348
- while (pos < length) {
349
- code = value.charCodeAt(pos);
350
- if (code < 48 || code > 57) break;
351
- pos += 1;
352
- }
353
- }
354
- return {
355
- number: value.slice(0, pos),
356
- unit: value.slice(pos)
357
- };
358
- };
359
- }) });
360
-
361
- //#endregion
362
- //#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/index.js
363
- var require_lib = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/index.js": ((exports, module) => {
364
- var parse = require_parse();
365
- var walk = require_walk();
366
- var stringify = require_stringify();
367
- function ValueParser(value) {
368
- if (this instanceof ValueParser) {
369
- this.nodes = parse(value);
370
- return this;
371
- }
372
- return new ValueParser(value);
373
- }
374
- ValueParser.prototype.toString = function() {
375
- return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
376
- };
377
- ValueParser.prototype.walk = function(cb, bubble) {
378
- walk(this.nodes, cb, bubble);
379
- return this;
380
- };
381
- ValueParser.unit = require_unit();
382
- ValueParser.walk = walk;
383
- ValueParser.stringify = stringify;
384
- module.exports = ValueParser;
385
- }) });
386
-
387
- //#endregion
388
-
389
-
390
- /***/ }),
391
-
392
- /***/ 533:
393
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
394
-
395
- __webpack_require__.r(__webpack_exports__);
396
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
397
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
398
- /* harmony export */ });
399
- /* harmony import */ var _chunk_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5923);
400
- /* harmony import */ var _lib_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5934);
401
-
402
-
403
-
404
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/format-import-prelude.js
405
- var require_format_import_prelude = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/format-import-prelude.js": ((exports, module) => {
406
- module.exports = function formatImportPrelude$2(layer, media, supports) {
407
- const parts = [];
408
- if (typeof layer !== "undefined") {
409
- let layerParams = "layer";
410
- if (layer) layerParams = `layer(${layer})`;
411
- parts.push(layerParams);
412
- }
413
- if (typeof supports !== "undefined") parts.push(`supports(${supports})`);
414
- if (typeof media !== "undefined") parts.push(media);
415
- return parts.join(" ");
416
- };
417
- }) });
418
-
419
- //#endregion
420
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/base64-encoded-import.js
421
- var require_base64_encoded_import = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/base64-encoded-import.js": ((exports, module) => {
422
- const formatImportPrelude$1 = require_format_import_prelude();
423
- module.exports = function base64EncodedConditionalImport$1(prelude, conditions) {
424
- if (!conditions?.length) return prelude;
425
- conditions.reverse();
426
- const first = conditions.pop();
427
- let params = `${prelude} ${formatImportPrelude$1(first.layer, first.media, first.supports)}`;
428
- for (const condition of conditions) params = `'data:text/css;base64,${Buffer.from(`@import ${params}`).toString("base64")}' ${formatImportPrelude$1(condition.layer, condition.media, condition.supports)}`;
429
- return params;
430
- };
431
- }) });
432
-
433
- //#endregion
434
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-conditions.js
435
- var require_apply_conditions = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-conditions.js": ((exports, module) => {
436
- const base64EncodedConditionalImport = require_base64_encoded_import();
437
- module.exports = function applyConditions$1(bundle, atRule) {
438
- const firstImportStatementIndex = bundle.findIndex((stmt) => stmt.type === "import");
439
- const lastImportStatementIndex = bundle.findLastIndex((stmt) => stmt.type === "import");
440
- bundle.forEach((stmt, index) => {
441
- if (stmt.type === "charset" || stmt.type === "warning") return;
442
- if (stmt.type === "layer" && (index < lastImportStatementIndex && stmt.conditions?.length || index > firstImportStatementIndex && index < lastImportStatementIndex)) {
443
- stmt.type = "import";
444
- stmt.node = stmt.node.clone({
445
- name: "import",
446
- params: base64EncodedConditionalImport(`'data:text/css;base64,${Buffer.from(stmt.node.toString()).toString("base64")}'`, stmt.conditions)
447
- });
448
- return;
449
- }
450
- if (!stmt.conditions?.length) return;
451
- if (stmt.type === "import") {
452
- stmt.node.params = base64EncodedConditionalImport(stmt.fullUri, stmt.conditions);
453
- return;
454
- }
455
- let nodes;
456
- let parent;
457
- if (stmt.type === "layer") {
458
- nodes = [stmt.node];
459
- parent = stmt.node.parent;
460
- } else {
461
- nodes = stmt.nodes;
462
- parent = nodes[0].parent;
463
- }
464
- const atRules = [];
465
- for (const condition of stmt.conditions) {
466
- if (typeof condition.media !== "undefined") {
467
- const mediaNode = atRule({
468
- name: "media",
469
- params: condition.media,
470
- source: parent.source
471
- });
472
- atRules.push(mediaNode);
473
- }
474
- if (typeof condition.supports !== "undefined") {
475
- const supportsNode = atRule({
476
- name: "supports",
477
- params: `(${condition.supports})`,
478
- source: parent.source
479
- });
480
- atRules.push(supportsNode);
481
- }
482
- if (typeof condition.layer !== "undefined") {
483
- const layerNode = atRule({
484
- name: "layer",
485
- params: condition.layer,
486
- source: parent.source
487
- });
488
- atRules.push(layerNode);
489
- }
490
- }
491
- const outerAtRule = atRules.shift();
492
- const innerAtRule = atRules.reduce((previous, next) => {
493
- previous.append(next);
494
- return next;
495
- }, outerAtRule);
496
- parent.insertBefore(nodes[0], outerAtRule);
497
- nodes.forEach((node) => {
498
- node.parent = void 0;
499
- });
500
- nodes[0].raws.before = nodes[0].raws.before || "\n";
501
- innerAtRule.append(nodes);
502
- stmt.type = "nodes";
503
- stmt.nodes = [outerAtRule];
504
- delete stmt.node;
505
- });
506
- };
507
- }) });
508
-
509
- //#endregion
510
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-raws.js
511
- var require_apply_raws = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-raws.js": ((exports, module) => {
512
- module.exports = function applyRaws$1(bundle) {
513
- bundle.forEach((stmt, index) => {
514
- if (index === 0) return;
515
- if (stmt.parent) {
516
- const { before } = stmt.parent.node.raws;
517
- if (stmt.type === "nodes") stmt.nodes[0].raws.before = before;
518
- else stmt.node.raws.before = before;
519
- } else if (stmt.type === "nodes") stmt.nodes[0].raws.before = stmt.nodes[0].raws.before || "\n";
520
- });
521
- };
522
- }) });
523
-
524
- //#endregion
525
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-styles.js
526
- var require_apply_styles = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/apply-styles.js": ((exports, module) => {
527
- module.exports = function applyStyles$1(bundle, styles) {
528
- styles.nodes = [];
529
- bundle.forEach((stmt) => {
530
- if ([
531
- "charset",
532
- "import",
533
- "layer"
534
- ].includes(stmt.type)) {
535
- stmt.node.parent = void 0;
536
- styles.append(stmt.node);
537
- } else if (stmt.type === "nodes") stmt.nodes.forEach((node) => {
538
- node.parent = void 0;
539
- styles.append(node);
540
- });
541
- });
542
- };
543
- }) });
544
-
545
- //#endregion
546
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/data-url.js
547
- var require_data_url = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/data-url.js": ((exports, module) => {
548
- const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i;
549
- const base64DataURLRegexp = /^data:text\/css;base64,/i;
550
- const plainDataURLRegexp = /^data:text\/css;plain,/i;
551
- function isValid(url) {
552
- return anyDataURLRegexp.test(url);
553
- }
554
- function contents(url) {
555
- if (base64DataURLRegexp.test(url)) return Buffer.from(url.slice(21), "base64").toString();
556
- if (plainDataURLRegexp.test(url)) return decodeURIComponent(url.slice(20));
557
- return decodeURIComponent(url.slice(14));
558
- }
559
- module.exports = {
560
- isValid,
561
- contents
562
- };
563
- }) });
564
-
565
- //#endregion
566
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-statements.js
567
- var require_parse_statements = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-statements.js": ((exports, module) => {
568
- const valueParser = (0,_lib_js__WEBPACK_IMPORTED_MODULE_1__.t)();
569
- const { stringify } = valueParser;
570
- module.exports = function parseStatements$1(result, styles, conditions, from) {
571
- const statements = [];
572
- let nodes = [];
573
- let encounteredNonImportNodes = false;
574
- styles.each((node) => {
575
- let stmt;
576
- if (node.type === "atrule") {
577
- if (node.name === "import") stmt = parseImport(result, node, conditions, from);
578
- else if (node.name === "charset") stmt = parseCharset(result, node, conditions, from);
579
- else if (node.name === "layer" && !encounteredNonImportNodes && !node.nodes) stmt = parseLayer(result, node, conditions, from);
580
- } else if (node.type !== "comment") encounteredNonImportNodes = true;
581
- if (stmt) {
582
- if (nodes.length) {
583
- statements.push({
584
- type: "nodes",
585
- nodes,
586
- conditions: [...conditions],
587
- from
588
- });
589
- nodes = [];
590
- }
591
- statements.push(stmt);
592
- } else nodes.push(node);
593
- });
594
- if (nodes.length) statements.push({
595
- type: "nodes",
596
- nodes,
597
- conditions: [...conditions],
598
- from
599
- });
600
- return statements;
601
- };
602
- function parseCharset(result, atRule, conditions, from) {
603
- if (atRule.prev()) return result.warn("@charset must precede all other statements", { node: atRule });
604
- return {
605
- type: "charset",
606
- node: atRule,
607
- conditions: [...conditions],
608
- from
609
- };
610
- }
611
- function parseImport(result, atRule, conditions, from) {
612
- let prev = atRule.prev();
613
- if (prev) do {
614
- if (prev.type === "comment" || prev.type === "atrule" && prev.name === "import") {
615
- prev = prev.prev();
616
- continue;
617
- }
618
- break;
619
- } while (prev);
620
- if (prev) do {
621
- if (prev.type === "comment" || prev.type === "atrule" && (prev.name === "charset" || prev.name === "layer" && !prev.nodes)) {
622
- prev = prev.prev();
623
- continue;
624
- }
625
- return result.warn("@import must precede all other statements (besides @charset or empty @layer)", { node: atRule });
626
- } while (prev);
627
- if (atRule.nodes) return result.warn("It looks like you didn't end your @import statement correctly. Child nodes are attached to it.", { node: atRule });
628
- const params = valueParser(atRule.params).nodes;
629
- const stmt = {
630
- type: "import",
631
- uri: "",
632
- fullUri: "",
633
- node: atRule,
634
- conditions: [...conditions],
635
- from
636
- };
637
- let layer;
638
- let media;
639
- let supports;
640
- for (let i = 0; i < params.length; i++) {
641
- const node = params[i];
642
- if (node.type === "space" || node.type === "comment") continue;
643
- if (node.type === "string") {
644
- if (stmt.uri) return result.warn(`Multiple url's in '${atRule.toString()}'`, { node: atRule });
645
- if (!node.value) return result.warn(`Unable to find uri in '${atRule.toString()}'`, { node: atRule });
646
- stmt.uri = node.value;
647
- stmt.fullUri = stringify(node);
648
- continue;
649
- }
650
- if (node.type === "function" && /^url$/i.test(node.value)) {
651
- if (stmt.uri) return result.warn(`Multiple url's in '${atRule.toString()}'`, { node: atRule });
652
- if (!node.nodes?.[0]?.value) return result.warn(`Unable to find uri in '${atRule.toString()}'`, { node: atRule });
653
- stmt.uri = node.nodes[0].value;
654
- stmt.fullUri = stringify(node);
655
- continue;
656
- }
657
- if (!stmt.uri) return result.warn(`Unable to find uri in '${atRule.toString()}'`, { node: atRule });
658
- if ((node.type === "word" || node.type === "function") && /^layer$/i.test(node.value)) {
659
- if (typeof layer !== "undefined") return result.warn(`Multiple layers in '${atRule.toString()}'`, { node: atRule });
660
- if (typeof supports !== "undefined") return result.warn(`layers must be defined before support conditions in '${atRule.toString()}'`, { node: atRule });
661
- if (node.nodes) layer = stringify(node.nodes);
662
- else layer = "";
663
- continue;
664
- }
665
- if (node.type === "function" && /^supports$/i.test(node.value)) {
666
- if (typeof supports !== "undefined") return result.warn(`Multiple support conditions in '${atRule.toString()}'`, { node: atRule });
667
- supports = stringify(node.nodes);
668
- continue;
669
- }
670
- media = stringify(params.slice(i));
671
- break;
672
- }
673
- if (!stmt.uri) return result.warn(`Unable to find uri in '${atRule.toString()}'`, { node: atRule });
674
- if (typeof media !== "undefined" || typeof layer !== "undefined" || typeof supports !== "undefined") stmt.conditions.push({
675
- layer,
676
- media,
677
- supports
678
- });
679
- return stmt;
680
- }
681
- function parseLayer(result, atRule, conditions, from) {
682
- return {
683
- type: "layer",
684
- node: atRule,
685
- conditions: [...conditions],
686
- from
687
- };
688
- }
689
- }) });
690
-
691
- //#endregion
692
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/process-content.js
693
- var require_process_content = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/process-content.js": ((exports, module) => {
694
- const path$2 = (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.n)("path");
695
- let sugarss;
696
- module.exports = function processContent$1(result, content, filename, options, postcss) {
697
- const { plugins } = options;
698
- const ext = path$2.extname(filename);
699
- const parserList = [];
700
- if (ext === ".sss") {
701
- if (!sugarss)
702
- /* c8 ignore next 3 */
703
- try {
704
- sugarss = (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.n)("sugarss");
705
- } catch {}
706
- if (sugarss) return runPostcss(postcss, content, filename, plugins, [sugarss]);
707
- }
708
- if (result.opts.syntax?.parse) parserList.push(result.opts.syntax.parse);
709
- if (result.opts.parser) parserList.push(result.opts.parser);
710
- parserList.push(null);
711
- return runPostcss(postcss, content, filename, plugins, parserList);
712
- };
713
- function runPostcss(postcss, content, filename, plugins, parsers, index) {
714
- if (!index) index = 0;
715
- return postcss(plugins).process(content, {
716
- from: filename,
717
- parser: parsers[index]
718
- }).catch((err) => {
719
- index++;
720
- if (index === parsers.length) throw err;
721
- return runPostcss(postcss, content, filename, plugins, parsers, index);
722
- });
723
- }
724
- }) });
725
-
726
- //#endregion
727
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-styles.js
728
- var require_parse_styles = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/lib/parse-styles.js": ((exports, module) => {
729
- const path$1 = (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.n)("path");
730
- const dataURL = require_data_url();
731
- const parseStatements = require_parse_statements();
732
- const processContent = require_process_content();
733
- const resolveId$1 = (id) => id;
734
- const formatImportPrelude = require_format_import_prelude();
735
- async function parseStyles$1(result, styles, options, state, conditions, from, postcss) {
736
- const statements = parseStatements(result, styles, conditions, from);
737
- for (const stmt of statements) {
738
- if (stmt.type !== "import" || !isProcessableURL(stmt.uri)) continue;
739
- if (options.filter && !options.filter(stmt.uri)) continue;
740
- await resolveImportId(result, stmt, options, state, postcss);
741
- }
742
- let charset;
743
- const beforeBundle = [];
744
- const bundle = [];
745
- function handleCharset(stmt) {
746
- if (!charset) charset = stmt;
747
- else if (stmt.node.params.toLowerCase() !== charset.node.params.toLowerCase()) throw stmt.node.error(`Incompatible @charset statements:
748
- ${stmt.node.params} specified in ${stmt.node.source.input.file}
749
- ${charset.node.params} specified in ${charset.node.source.input.file}`);
750
- }
751
- statements.forEach((stmt) => {
752
- if (stmt.type === "charset") handleCharset(stmt);
753
- else if (stmt.type === "import") if (stmt.children) stmt.children.forEach((child, index) => {
754
- if (child.type === "import") beforeBundle.push(child);
755
- else if (child.type === "layer") beforeBundle.push(child);
756
- else if (child.type === "charset") handleCharset(child);
757
- else bundle.push(child);
758
- if (index === 0) child.parent = stmt;
759
- });
760
- else beforeBundle.push(stmt);
761
- else if (stmt.type === "layer") beforeBundle.push(stmt);
762
- else if (stmt.type === "nodes") bundle.push(stmt);
763
- });
764
- return charset ? [charset, ...beforeBundle.concat(bundle)] : beforeBundle.concat(bundle);
765
- }
766
- async function resolveImportId(result, stmt, options, state, postcss) {
767
- if (dataURL.isValid(stmt.uri)) {
768
- stmt.children = await loadImportContent(result, stmt, stmt.uri, options, state, postcss);
769
- return;
770
- } else if (dataURL.isValid(stmt.from.slice(-1))) throw stmt.node.error(`Unable to import '${stmt.uri}' from a stylesheet that is embedded in a data url`);
771
- const atRule = stmt.node;
772
- let sourceFile;
773
- if (atRule.source?.input?.file) sourceFile = atRule.source.input.file;
774
- const base = sourceFile ? path$1.dirname(atRule.source.input.file) : options.root;
775
- const paths = [await options.resolve(stmt.uri, base, options, atRule)].flat();
776
- const resolved = await Promise.all(paths.map((file) => {
777
- return !path$1.isAbsolute(file) ? resolveId$1(file, base, options, atRule) : file;
778
- }));
779
- resolved.forEach((file) => {
780
- result.messages.push({
781
- type: "dependency",
782
- plugin: "postcss-import",
783
- file,
784
- parent: sourceFile
785
- });
786
- });
787
- stmt.children = (await Promise.all(resolved.map((file) => {
788
- return loadImportContent(result, stmt, file, options, state, postcss);
789
- }))).flat().filter((x) => !!x);
790
- }
791
- async function loadImportContent(result, stmt, filename, options, state, postcss) {
792
- const atRule = stmt.node;
793
- const { conditions, from } = stmt;
794
- const stmtDuplicateCheckKey = conditions.map((condition) => formatImportPrelude(condition.layer, condition.media, condition.supports)).join(":");
795
- if (options.skipDuplicates) {
796
- if (state.importedFiles[filename]?.[stmtDuplicateCheckKey]) return;
797
- if (!state.importedFiles[filename]) state.importedFiles[filename] = {};
798
- state.importedFiles[filename][stmtDuplicateCheckKey] = true;
799
- }
800
- if (from.includes(filename)) return;
801
- const content = await options.load(filename, options);
802
- if (content.trim() === "" && options.warnOnEmpty) {
803
- result.warn(`${filename} is empty`, { node: atRule });
804
- return;
805
- }
806
- if (options.skipDuplicates && state.hashFiles[content]?.[stmtDuplicateCheckKey]) return;
807
- const importedResult = await processContent(result, content, filename, options, postcss);
808
- const styles = importedResult.root;
809
- result.messages = result.messages.concat(importedResult.messages);
810
- if (options.skipDuplicates) {
811
- if (!styles.some((child) => {
812
- return child.type === "atrule" && child.name === "import";
813
- })) {
814
- if (!state.hashFiles[content]) state.hashFiles[content] = {};
815
- state.hashFiles[content][stmtDuplicateCheckKey] = true;
816
- }
817
- }
818
- return parseStyles$1(result, styles, options, state, conditions, [...from, filename], postcss);
819
- }
820
- function isProcessableURL(uri) {
821
- if (/^(?:[a-z]+:)?\/\//i.test(uri)) return false;
822
- try {
823
- if (new URL(uri, "https://example.com").search) return false;
824
- } catch {}
825
- return true;
826
- }
827
- module.exports = parseStyles$1;
828
- }) });
829
-
830
- //#endregion
831
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/index.js
832
- var require_postcss_import = /* @__PURE__ */ (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.t)({ "../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.6/node_modules/postcss-import/index.js": ((exports, module) => {
833
- const path = (0,_chunk_js__WEBPACK_IMPORTED_MODULE_0__.n)("path");
834
- const applyConditions = require_apply_conditions();
835
- const applyRaws = require_apply_raws();
836
- const applyStyles = require_apply_styles();
837
- const loadContent = () => "";
838
- const parseStyles = require_parse_styles();
839
- const resolveId = (id) => id;
840
- function AtImport(options) {
841
- options = {
842
- root: process.cwd(),
843
- path: [],
844
- skipDuplicates: true,
845
- resolve: resolveId,
846
- load: loadContent,
847
- plugins: [],
848
- addModulesDirectories: [],
849
- warnOnEmpty: true,
850
- ...options
851
- };
852
- options.root = path.resolve(options.root);
853
- if (typeof options.path === "string") options.path = [options.path];
854
- if (!Array.isArray(options.path)) options.path = [];
855
- options.path = options.path.map((p) => path.resolve(options.root, p));
856
- return {
857
- postcssPlugin: "postcss-import",
858
- async Once(styles, { result, atRule, postcss }) {
859
- const state = {
860
- importedFiles: {},
861
- hashFiles: {}
862
- };
863
- if (styles.source?.input?.file) state.importedFiles[styles.source.input.file] = {};
864
- if (options.plugins && !Array.isArray(options.plugins)) throw new Error("plugins option must be an array");
865
- const bundle = await parseStyles(result, styles, options, state, [], [], postcss);
866
- applyRaws(bundle);
867
- applyConditions(bundle, atRule);
868
- applyStyles(bundle, styles);
869
- }
870
- };
871
- }
872
- AtImport.postcss = true;
873
- module.exports = AtImport;
874
- }) });
875
-
876
- //#endregion
877
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (require_postcss_import());
878
-
879
-
880
-
881
- /***/ })
882
-
883
- };