@pwrs/lit-css 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lit-css.cjs CHANGED
@@ -19,480 +19,2571 @@ var __copyProps = (to, from, except, desc) => {
19
19
  }
20
20
  return to;
21
21
  };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
23
30
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
31
 
25
- // node_modules/uglifycss/uglifycss-lib.js
26
- var require_uglifycss_lib = __commonJS({
27
- "node_modules/uglifycss/uglifycss-lib.js"(exports, module2) {
28
- var { readFileSync } = require("fs");
29
- var { sep, resolve } = require("path");
30
- var SEP = "/";
31
- var PATH_SEP = sep;
32
- var ___PRESERVED_TOKEN_ = "___PRESERVED_TOKEN_";
33
- var defaultOptions = {
34
- maxLineLen: 0,
35
- expandVars: false,
36
- uglyComments: false,
37
- cuteComments: false,
38
- convertUrls: "",
39
- debug: false,
40
- output: ""
32
+ // node_modules/lilconfig/src/index.js
33
+ var require_src = __commonJS({
34
+ "node_modules/lilconfig/src/index.js"(exports2, module2) {
35
+ var path = require("path");
36
+ var fs = require("fs");
37
+ var os = require("os");
38
+ var fsReadFileAsync = fs.promises.readFile;
39
+ function getDefaultSearchPlaces(name, sync) {
40
+ return [
41
+ "package.json",
42
+ `.${name}rc.json`,
43
+ `.${name}rc.js`,
44
+ `.${name}rc.cjs`,
45
+ ...sync ? [] : [`.${name}rc.mjs`],
46
+ `.config/${name}rc`,
47
+ `.config/${name}rc.json`,
48
+ `.config/${name}rc.js`,
49
+ `.config/${name}rc.cjs`,
50
+ ...sync ? [] : [`.config/${name}rc.mjs`],
51
+ `${name}.config.js`,
52
+ `${name}.config.cjs`,
53
+ ...sync ? [] : [`${name}.config.mjs`]
54
+ ];
55
+ }
56
+ function parentDir(p) {
57
+ return path.dirname(p) || path.sep;
58
+ }
59
+ var jsonLoader = (_, content) => JSON.parse(content);
60
+ var defaultLoadersSync = Object.freeze({
61
+ ".js": require,
62
+ ".json": require,
63
+ ".cjs": require,
64
+ noExt: jsonLoader
65
+ });
66
+ module2.exports.defaultLoadersSync = defaultLoadersSync;
67
+ var dynamicImport = async (id) => {
68
+ try {
69
+ const mod = await import(id);
70
+ return mod.default;
71
+ } catch (e) {
72
+ try {
73
+ return require(id);
74
+ } catch (requireE) {
75
+ if (requireE.code === "ERR_REQUIRE_ESM" || requireE instanceof SyntaxError && requireE.toString().includes("Cannot use import statement outside a module")) {
76
+ throw e;
77
+ }
78
+ throw requireE;
79
+ }
80
+ }
41
81
  };
42
- function convertRelativeUrls(css, options, preservedTokens) {
43
- const pattern = /(url\s*\()\s*(["']?)/g;
44
- const maxIndex = css.length - 1;
45
- const sb = [];
46
- let appendIndex = 0;
47
- let match;
48
- while ((match = pattern.exec(css)) !== null) {
49
- let startIndex = match.index + match[1].length;
50
- let terminator = match[2];
51
- if (terminator.length === 0) {
52
- terminator = ")";
82
+ var defaultLoaders = Object.freeze({
83
+ ".js": dynamicImport,
84
+ ".mjs": dynamicImport,
85
+ ".cjs": dynamicImport,
86
+ ".json": jsonLoader,
87
+ noExt: jsonLoader
88
+ });
89
+ module2.exports.defaultLoaders = defaultLoaders;
90
+ function getOptions(name, options, sync) {
91
+ const conf = {
92
+ stopDir: os.homedir(),
93
+ searchPlaces: getDefaultSearchPlaces(name, sync),
94
+ ignoreEmptySearchPlaces: true,
95
+ cache: true,
96
+ transform: (x) => x,
97
+ packageProp: [name],
98
+ ...options,
99
+ loaders: {
100
+ ...sync ? defaultLoadersSync : defaultLoaders,
101
+ ...options.loaders
53
102
  }
54
- let foundTerminator = false;
55
- let endIndex = pattern.lastIndex - 1;
56
- while (foundTerminator === false && endIndex + 1 <= maxIndex) {
57
- endIndex = css.indexOf(terminator, endIndex + 1);
58
- if (endIndex > 0 && css.charAt(endIndex - 1) !== "\\") {
59
- foundTerminator = true;
60
- if (terminator != ")") {
61
- endIndex = css.indexOf(")", endIndex);
62
- }
63
- }
103
+ };
104
+ conf.searchPlaces.forEach((place) => {
105
+ const key = path.extname(place) || "noExt";
106
+ const loader = conf.loaders[key];
107
+ if (!loader) {
108
+ throw new Error(`Missing loader for extension "${place}"`);
64
109
  }
65
- sb.push(css.substring(appendIndex, match.index));
66
- if (foundTerminator) {
67
- let token = css.substring(startIndex, endIndex).replace(/(^\s*|\s*$)/g, "");
68
- if (token.slice(0, 19) !== ___PRESERVED_TOKEN_) {
69
- if (terminator === "'" || terminator === '"') {
70
- token = token.slice(1, -1);
71
- } else if (terminator === ")") {
72
- terminator = "";
73
- }
74
- let url;
75
- if (options.convertUrls && token.charAt(0) !== SEP && token.slice(0, 7) !== "http://" && token.slice(0, 8) !== "https://") {
76
- let target = options.target.slice();
77
- token = token.split(SEP).join(PATH_SEP);
78
- url = resolve(options.source.join(PATH_SEP), token).split(PATH_SEP);
79
- let file = url.pop();
80
- while (target[0] === url[0]) {
81
- target.shift();
82
- url.shift();
110
+ if (typeof loader !== "function") {
111
+ throw new Error(
112
+ `Loader for extension "${place}" is not a function: Received ${typeof loader}.`
113
+ );
114
+ }
115
+ });
116
+ return conf;
117
+ }
118
+ function getPackageProp(props, obj) {
119
+ if (typeof props === "string" && props in obj)
120
+ return obj[props];
121
+ return (Array.isArray(props) ? props : props.split(".")).reduce(
122
+ (acc, prop) => acc === void 0 ? acc : acc[prop],
123
+ obj
124
+ ) || null;
125
+ }
126
+ function validateFilePath(filepath) {
127
+ if (!filepath)
128
+ throw new Error("load must pass a non-empty string");
129
+ }
130
+ function validateLoader(loader, ext) {
131
+ if (!loader)
132
+ throw new Error(`No loader specified for extension "${ext}"`);
133
+ if (typeof loader !== "function")
134
+ throw new Error("loader is not a function");
135
+ }
136
+ var makeEmplace = (enableCache) => (c, filepath, res) => {
137
+ if (enableCache)
138
+ c.set(filepath, res);
139
+ return res;
140
+ };
141
+ module2.exports.lilconfig = function lilconfig(name, options) {
142
+ const {
143
+ ignoreEmptySearchPlaces,
144
+ loaders,
145
+ packageProp,
146
+ searchPlaces,
147
+ stopDir,
148
+ transform: transform2,
149
+ cache
150
+ } = getOptions(name, options != null ? options : {}, false);
151
+ const searchCache = /* @__PURE__ */ new Map();
152
+ const loadCache = /* @__PURE__ */ new Map();
153
+ const emplace = makeEmplace(cache);
154
+ return {
155
+ async search(searchFrom = process.cwd()) {
156
+ const result = {
157
+ config: null,
158
+ filepath: ""
159
+ };
160
+ const visited = /* @__PURE__ */ new Set();
161
+ let dir = searchFrom;
162
+ dirLoop:
163
+ while (true) {
164
+ if (cache) {
165
+ const r = searchCache.get(dir);
166
+ if (r !== void 0) {
167
+ for (const p of visited)
168
+ searchCache.set(p, r);
169
+ return r;
170
+ }
171
+ visited.add(dir);
83
172
  }
84
- for (let i = 0, l = target.length; i < l; ++i) {
85
- target[i] = "..";
173
+ for (const searchPlace of searchPlaces) {
174
+ const filepath = path.join(dir, searchPlace);
175
+ try {
176
+ await fs.promises.access(filepath);
177
+ } catch (e) {
178
+ continue;
179
+ }
180
+ const content = String(await fsReadFileAsync(filepath));
181
+ const loaderKey = path.extname(searchPlace) || "noExt";
182
+ const loader = loaders[loaderKey];
183
+ if (searchPlace === "package.json") {
184
+ const pkg = await loader(filepath, content);
185
+ const maybeConfig = getPackageProp(packageProp, pkg);
186
+ if (maybeConfig != null) {
187
+ result.config = maybeConfig;
188
+ result.filepath = filepath;
189
+ break dirLoop;
190
+ }
191
+ continue;
192
+ }
193
+ const isEmpty = content.trim() === "";
194
+ if (isEmpty && ignoreEmptySearchPlaces)
195
+ continue;
196
+ if (isEmpty) {
197
+ result.isEmpty = true;
198
+ result.config = void 0;
199
+ } else {
200
+ validateLoader(loader, loaderKey);
201
+ result.config = await loader(filepath, content);
202
+ }
203
+ result.filepath = filepath;
204
+ break dirLoop;
86
205
  }
87
- url = terminator + [...target, ...url, file].join(SEP) + terminator;
88
- } else {
89
- url = terminator + token + terminator;
206
+ if (dir === stopDir || dir === parentDir(dir))
207
+ break dirLoop;
208
+ dir = parentDir(dir);
90
209
  }
91
- preservedTokens.push(url);
92
- let preserver = "url(" + ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___)";
93
- sb.push(preserver);
94
- } else {
95
- sb.push(`url(${token})`);
210
+ const transformed = (
211
+ // not found
212
+ result.filepath === "" && result.config === null ? transform2(null) : transform2(result)
213
+ );
214
+ if (cache) {
215
+ for (const p of visited)
216
+ searchCache.set(p, transformed);
217
+ }
218
+ return transformed;
219
+ },
220
+ async load(filepath) {
221
+ validateFilePath(filepath);
222
+ const absPath = path.resolve(process.cwd(), filepath);
223
+ if (cache && loadCache.has(absPath)) {
224
+ return loadCache.get(absPath);
225
+ }
226
+ const { base, ext } = path.parse(absPath);
227
+ const loaderKey = ext || "noExt";
228
+ const loader = loaders[loaderKey];
229
+ validateLoader(loader, loaderKey);
230
+ const content = String(await fsReadFileAsync(absPath));
231
+ if (base === "package.json") {
232
+ const pkg = await loader(absPath, content);
233
+ return emplace(
234
+ loadCache,
235
+ absPath,
236
+ transform2({
237
+ config: getPackageProp(packageProp, pkg),
238
+ filepath: absPath
239
+ })
240
+ );
241
+ }
242
+ const result = {
243
+ config: null,
244
+ filepath: absPath
245
+ };
246
+ const isEmpty = content.trim() === "";
247
+ if (isEmpty && ignoreEmptySearchPlaces)
248
+ return emplace(
249
+ loadCache,
250
+ absPath,
251
+ transform2({
252
+ config: void 0,
253
+ filepath: absPath,
254
+ isEmpty: true
255
+ })
256
+ );
257
+ result.config = isEmpty ? void 0 : await loader(absPath, content);
258
+ return emplace(
259
+ loadCache,
260
+ absPath,
261
+ transform2(isEmpty ? { ...result, isEmpty, config: void 0 } : result)
262
+ );
263
+ },
264
+ clearLoadCache() {
265
+ if (cache)
266
+ loadCache.clear();
267
+ },
268
+ clearSearchCache() {
269
+ if (cache)
270
+ searchCache.clear();
271
+ },
272
+ clearCaches() {
273
+ if (cache) {
274
+ loadCache.clear();
275
+ searchCache.clear();
96
276
  }
97
- appendIndex = endIndex + 1;
98
- } else {
99
- sb.push(css.substring(match.index, pattern.lastIndex));
100
- appendIndex = pattern.lastIndex;
101
- }
102
- }
103
- sb.push(css.substring(appendIndex));
104
- return sb.join("");
105
- }
106
- function extractDataUrls(css, preservedTokens) {
107
- const pattern = /url\(\s*(["']?)data\:/g;
108
- const maxIndex = css.length - 1;
109
- const sb = [];
110
- let appendIndex = 0;
111
- let match;
112
- while ((match = pattern.exec(css)) !== null) {
113
- let startIndex = match.index + 4;
114
- let terminator = match[1];
115
- if (terminator.length === 0) {
116
- terminator = ")";
117
277
  }
118
- let foundTerminator = false;
119
- let endIndex = pattern.lastIndex - 1;
120
- while (foundTerminator === false && endIndex + 1 <= maxIndex) {
121
- endIndex = css.indexOf(terminator, endIndex + 1);
122
- if (endIndex > 0 && css.charAt(endIndex - 1) !== "\\") {
123
- foundTerminator = true;
124
- if (terminator != ")") {
125
- endIndex = css.indexOf(")", endIndex);
278
+ };
279
+ };
280
+ module2.exports.lilconfigSync = function lilconfigSync(name, options) {
281
+ const {
282
+ ignoreEmptySearchPlaces,
283
+ loaders,
284
+ packageProp,
285
+ searchPlaces,
286
+ stopDir,
287
+ transform: transform2,
288
+ cache
289
+ } = getOptions(name, options != null ? options : {}, true);
290
+ const searchCache = /* @__PURE__ */ new Map();
291
+ const loadCache = /* @__PURE__ */ new Map();
292
+ const emplace = makeEmplace(cache);
293
+ return {
294
+ search(searchFrom = process.cwd()) {
295
+ const result = {
296
+ config: null,
297
+ filepath: ""
298
+ };
299
+ const visited = /* @__PURE__ */ new Set();
300
+ let dir = searchFrom;
301
+ dirLoop:
302
+ while (true) {
303
+ if (cache) {
304
+ const r = searchCache.get(dir);
305
+ if (r !== void 0) {
306
+ for (const p of visited)
307
+ searchCache.set(p, r);
308
+ return r;
309
+ }
310
+ visited.add(dir);
311
+ }
312
+ for (const searchPlace of searchPlaces) {
313
+ const filepath = path.join(dir, searchPlace);
314
+ try {
315
+ fs.accessSync(filepath);
316
+ } catch (e) {
317
+ continue;
318
+ }
319
+ const loaderKey = path.extname(searchPlace) || "noExt";
320
+ const loader = loaders[loaderKey];
321
+ const content = String(fs.readFileSync(filepath));
322
+ if (searchPlace === "package.json") {
323
+ const pkg = loader(filepath, content);
324
+ const maybeConfig = getPackageProp(packageProp, pkg);
325
+ if (maybeConfig != null) {
326
+ result.config = maybeConfig;
327
+ result.filepath = filepath;
328
+ break dirLoop;
329
+ }
330
+ continue;
331
+ }
332
+ const isEmpty = content.trim() === "";
333
+ if (isEmpty && ignoreEmptySearchPlaces)
334
+ continue;
335
+ if (isEmpty) {
336
+ result.isEmpty = true;
337
+ result.config = void 0;
338
+ } else {
339
+ validateLoader(loader, loaderKey);
340
+ result.config = loader(filepath, content);
341
+ }
342
+ result.filepath = filepath;
343
+ break dirLoop;
344
+ }
345
+ if (dir === stopDir || dir === parentDir(dir))
346
+ break dirLoop;
347
+ dir = parentDir(dir);
126
348
  }
349
+ const transformed = (
350
+ // not found
351
+ result.filepath === "" && result.config === null ? transform2(null) : transform2(result)
352
+ );
353
+ if (cache) {
354
+ for (const p of visited)
355
+ searchCache.set(p, transformed);
356
+ }
357
+ return transformed;
358
+ },
359
+ load(filepath) {
360
+ validateFilePath(filepath);
361
+ const absPath = path.resolve(process.cwd(), filepath);
362
+ if (cache && loadCache.has(absPath)) {
363
+ return loadCache.get(absPath);
364
+ }
365
+ const { base, ext } = path.parse(absPath);
366
+ const loaderKey = ext || "noExt";
367
+ const loader = loaders[loaderKey];
368
+ validateLoader(loader, loaderKey);
369
+ const content = String(fs.readFileSync(absPath));
370
+ if (base === "package.json") {
371
+ const pkg = loader(absPath, content);
372
+ return transform2({
373
+ config: getPackageProp(packageProp, pkg),
374
+ filepath: absPath
375
+ });
376
+ }
377
+ const result = {
378
+ config: null,
379
+ filepath: absPath
380
+ };
381
+ const isEmpty = content.trim() === "";
382
+ if (isEmpty && ignoreEmptySearchPlaces)
383
+ return emplace(
384
+ loadCache,
385
+ absPath,
386
+ transform2({
387
+ filepath: absPath,
388
+ config: void 0,
389
+ isEmpty: true
390
+ })
391
+ );
392
+ result.config = isEmpty ? void 0 : loader(absPath, content);
393
+ return emplace(
394
+ loadCache,
395
+ absPath,
396
+ transform2(isEmpty ? { ...result, isEmpty, config: void 0 } : result)
397
+ );
398
+ },
399
+ clearLoadCache() {
400
+ if (cache)
401
+ loadCache.clear();
402
+ },
403
+ clearSearchCache() {
404
+ if (cache)
405
+ searchCache.clear();
406
+ },
407
+ clearCaches() {
408
+ if (cache) {
409
+ loadCache.clear();
410
+ searchCache.clear();
127
411
  }
128
412
  }
129
- sb.push(css.substring(appendIndex, match.index));
130
- if (foundTerminator) {
131
- let token = css.substring(startIndex, endIndex);
132
- let parts = token.split(",");
133
- if (parts.length > 1 && parts[0].slice(-7) == ";base64") {
134
- token = token.replace(/\s+/g, "");
135
- } else {
136
- token = token.replace(/\n/g, " ");
137
- token = token.replace(/\s+/g, " ");
138
- token = token.replace(/(^\s+|\s+$)/g, "");
413
+ };
414
+ };
415
+ }
416
+ });
417
+
418
+ // node_modules/css-declaration-sorter/dist/main.cjs
419
+ var require_main = __commonJS({
420
+ "node_modules/css-declaration-sorter/dist/main.cjs"(exports2, module2) {
421
+ "use strict";
422
+ Object.defineProperty(exports2, "__esModule", { value: true });
423
+ var shorthandData = {
424
+ "animation": [
425
+ "animation-name",
426
+ "animation-duration",
427
+ "animation-timing-function",
428
+ "animation-delay",
429
+ "animation-iteration-count",
430
+ "animation-direction",
431
+ "animation-fill-mode",
432
+ "animation-play-state"
433
+ ],
434
+ "background": [
435
+ "background-image",
436
+ "background-size",
437
+ "background-position",
438
+ "background-repeat",
439
+ "background-origin",
440
+ "background-clip",
441
+ "background-attachment",
442
+ "background-color"
443
+ ],
444
+ "columns": [
445
+ "column-width",
446
+ "column-count"
447
+ ],
448
+ "column-rule": [
449
+ "column-rule-width",
450
+ "column-rule-style",
451
+ "column-rule-color"
452
+ ],
453
+ "flex": [
454
+ "flex-grow",
455
+ "flex-shrink",
456
+ "flex-basis"
457
+ ],
458
+ "flex-flow": [
459
+ "flex-direction",
460
+ "flex-wrap"
461
+ ],
462
+ "font": [
463
+ "font-style",
464
+ "font-variant",
465
+ "font-weight",
466
+ "font-stretch",
467
+ "font-size",
468
+ "font-family",
469
+ "line-height"
470
+ ],
471
+ "gap": [
472
+ "column-gap",
473
+ "row-gap"
474
+ ],
475
+ "grid": [
476
+ "grid-template-rows",
477
+ "grid-template-columns",
478
+ "grid-template-areas",
479
+ "grid-auto-rows",
480
+ "grid-auto-columns",
481
+ "grid-auto-flow",
482
+ "column-gap",
483
+ "row-gap"
484
+ ],
485
+ "grid-area": [
486
+ "grid-row-start",
487
+ "grid-column-start",
488
+ "grid-row-end",
489
+ "grid-column-end"
490
+ ],
491
+ "grid-column": [
492
+ "grid-column-start",
493
+ "grid-column-end"
494
+ ],
495
+ "grid-row": [
496
+ "grid-row-start",
497
+ "grid-row-end"
498
+ ],
499
+ "grid-template": [
500
+ "grid-template-columns",
501
+ "grid-template-rows",
502
+ "grid-template-areas"
503
+ ],
504
+ "list-style": [
505
+ "list-style-type",
506
+ "list-style-position",
507
+ "list-style-image"
508
+ ],
509
+ "offset": [
510
+ "offset-anchor",
511
+ "offset-distance",
512
+ "offset-path",
513
+ "offset-position",
514
+ "offset-rotate"
515
+ ],
516
+ "padding": [
517
+ "padding-block",
518
+ "padding-block-start",
519
+ "padding-block-end",
520
+ "padding-inline",
521
+ "padding-inline-start",
522
+ "padding-inline-end",
523
+ "padding-top",
524
+ "padding-right",
525
+ "padding-bottom",
526
+ "padding-left"
527
+ ],
528
+ "padding-block": [
529
+ "padding-block-start",
530
+ "padding-block-end",
531
+ "padding-top",
532
+ "padding-right",
533
+ "padding-bottom",
534
+ "padding-left"
535
+ ],
536
+ "padding-block-start": [
537
+ "padding-top",
538
+ "padding-right",
539
+ "padding-left"
540
+ ],
541
+ "padding-block-end": [
542
+ "padding-right",
543
+ "padding-bottom",
544
+ "padding-left"
545
+ ],
546
+ "padding-inline": [
547
+ "padding-inline-start",
548
+ "padding-inline-end",
549
+ "padding-top",
550
+ "padding-right",
551
+ "padding-bottom",
552
+ "padding-left"
553
+ ],
554
+ "padding-inline-start": [
555
+ "padding-top",
556
+ "padding-right",
557
+ "padding-left"
558
+ ],
559
+ "padding-inline-end": [
560
+ "padding-right",
561
+ "padding-bottom",
562
+ "padding-left"
563
+ ],
564
+ "margin": [
565
+ "margin-block",
566
+ "margin-block-start",
567
+ "margin-block-end",
568
+ "margin-inline",
569
+ "margin-inline-start",
570
+ "margin-inline-end",
571
+ "margin-top",
572
+ "margin-right",
573
+ "margin-bottom",
574
+ "margin-left"
575
+ ],
576
+ "margin-block": [
577
+ "margin-block-start",
578
+ "margin-block-end",
579
+ "margin-top",
580
+ "margin-right",
581
+ "margin-bottom",
582
+ "margin-left"
583
+ ],
584
+ "margin-inline": [
585
+ "margin-inline-start",
586
+ "margin-inline-end",
587
+ "margin-top",
588
+ "margin-right",
589
+ "margin-bottom",
590
+ "margin-left"
591
+ ],
592
+ "margin-inline-start": [
593
+ "margin-top",
594
+ "margin-right",
595
+ "margin-bottom",
596
+ "margin-left"
597
+ ],
598
+ "margin-inline-end": [
599
+ "margin-top",
600
+ "margin-right",
601
+ "margin-bottom",
602
+ "margin-left"
603
+ ],
604
+ "border": [
605
+ "border-top",
606
+ "border-right",
607
+ "border-bottom",
608
+ "border-left",
609
+ "border-width",
610
+ "border-style",
611
+ "border-color",
612
+ "border-top-width",
613
+ "border-right-width",
614
+ "border-bottom-width",
615
+ "border-left-width",
616
+ "border-inline-start-width",
617
+ "border-inline-end-width",
618
+ "border-block-start-width",
619
+ "border-block-end-width",
620
+ "border-top-style",
621
+ "border-right-style",
622
+ "border-bottom-style",
623
+ "border-left-style",
624
+ "border-inline-start-style",
625
+ "border-inline-end-style",
626
+ "border-block-start-style",
627
+ "border-block-end-style",
628
+ "border-top-color",
629
+ "border-right-color",
630
+ "border-bottom-color",
631
+ "border-left-color",
632
+ "border-inline-start-color",
633
+ "border-inline-end-color",
634
+ "border-block-start-color",
635
+ "border-block-end-color",
636
+ "border-block",
637
+ "border-block-start",
638
+ "border-block-end",
639
+ "border-block-width",
640
+ "border-block-style",
641
+ "border-block-color",
642
+ "border-inline",
643
+ "border-inline-start",
644
+ "border-inline-end",
645
+ "border-inline-width",
646
+ "border-inline-style",
647
+ "border-inline-color"
648
+ ],
649
+ "border-top": [
650
+ "border-width",
651
+ "border-style",
652
+ "border-color",
653
+ "border-top-width",
654
+ "border-top-style",
655
+ "border-top-color"
656
+ ],
657
+ "border-right": [
658
+ "border-width",
659
+ "border-style",
660
+ "border-color",
661
+ "border-right-width",
662
+ "border-right-style",
663
+ "border-right-color"
664
+ ],
665
+ "border-bottom": [
666
+ "border-width",
667
+ "border-style",
668
+ "border-color",
669
+ "border-bottom-width",
670
+ "border-bottom-style",
671
+ "border-bottom-color"
672
+ ],
673
+ "border-left": [
674
+ "border-width",
675
+ "border-style",
676
+ "border-color",
677
+ "border-left-width",
678
+ "border-left-style",
679
+ "border-left-color"
680
+ ],
681
+ "border-color": [
682
+ "border-top-color",
683
+ "border-bottom-color",
684
+ "border-left-color",
685
+ "border-right-color",
686
+ "border-inline-start-color",
687
+ "border-inline-end-color",
688
+ "border-block-start-color",
689
+ "border-block-end-color"
690
+ ],
691
+ "border-width": [
692
+ "border-top-width",
693
+ "border-bottom-width",
694
+ "border-left-width",
695
+ "border-right-width",
696
+ "border-inline-start-width",
697
+ "border-inline-end-width",
698
+ "border-block-start-width",
699
+ "border-block-end-width"
700
+ ],
701
+ "border-style": [
702
+ "border-top-style",
703
+ "border-bottom-style",
704
+ "border-left-style",
705
+ "border-right-style",
706
+ "border-inline-start-style",
707
+ "border-inline-end-style",
708
+ "border-block-start-style",
709
+ "border-block-end-style"
710
+ ],
711
+ "border-radius": [
712
+ "border-top-right-radius",
713
+ "border-top-left-radius",
714
+ "border-bottom-right-radius",
715
+ "border-bottom-left-radius",
716
+ "border-end-end-radius",
717
+ "border-end-start-radius",
718
+ "border-start-end-radius",
719
+ "border-start-start-radius"
720
+ ],
721
+ "border-block": [
722
+ "border-block-start",
723
+ "border-block-end",
724
+ "border-block-width",
725
+ "border-width",
726
+ "border-block-style",
727
+ "border-style",
728
+ "border-block-color",
729
+ "border-color"
730
+ ],
731
+ "border-block-start": [
732
+ "border-block-start-width",
733
+ "border-width",
734
+ "border-block-start-style",
735
+ "border-style",
736
+ "border-block-start-color",
737
+ "border-color"
738
+ ],
739
+ "border-block-end": [
740
+ "border-block-end-width",
741
+ "border-width",
742
+ "border-block-end-style",
743
+ "border-style",
744
+ "border-block-end-color",
745
+ "border-color"
746
+ ],
747
+ "border-inline": [
748
+ "border-inline-start",
749
+ "border-inline-end",
750
+ "border-inline-width",
751
+ "border-width",
752
+ "border-inline-style",
753
+ "border-style",
754
+ "border-inline-color",
755
+ "border-color"
756
+ ],
757
+ "border-inline-start": [
758
+ "border-inline-start-width",
759
+ "border-width",
760
+ "border-inline-start-style",
761
+ "border-style",
762
+ "border-inline-start-color",
763
+ "border-color"
764
+ ],
765
+ "border-inline-end": [
766
+ "border-inline-end-width",
767
+ "border-width",
768
+ "border-inline-end-style",
769
+ "border-style",
770
+ "border-inline-end-color",
771
+ "border-color"
772
+ ],
773
+ "border-image": [
774
+ "border-image-source",
775
+ "border-image-slice",
776
+ "border-image-width",
777
+ "border-image-outset",
778
+ "border-image-repeat"
779
+ ],
780
+ "mask": [
781
+ "mask-image",
782
+ "mask-mode",
783
+ "mask-position",
784
+ "mask-size",
785
+ "mask-repeat",
786
+ "mask-origin",
787
+ "mask-clip",
788
+ "mask-composite"
789
+ ],
790
+ "inline-size": [
791
+ "width",
792
+ "height"
793
+ ],
794
+ "block-size": [
795
+ "width",
796
+ "height"
797
+ ],
798
+ "max-inline-size": [
799
+ "max-width",
800
+ "max-height"
801
+ ],
802
+ "max-block-size": [
803
+ "max-width",
804
+ "max-height"
805
+ ],
806
+ "inset": [
807
+ "inset-block",
808
+ "inset-block-start",
809
+ "inset-block-end",
810
+ "inset-inline",
811
+ "inset-inline-start",
812
+ "inset-inline-end",
813
+ "top",
814
+ "right",
815
+ "bottom",
816
+ "left"
817
+ ],
818
+ "inset-block": [
819
+ "inset-block-start",
820
+ "inset-block-end",
821
+ "top",
822
+ "right",
823
+ "bottom",
824
+ "left"
825
+ ],
826
+ "inset-inline": [
827
+ "inset-inline-start",
828
+ "inset-inline-end",
829
+ "top",
830
+ "right",
831
+ "bottom",
832
+ "left"
833
+ ],
834
+ "outline": [
835
+ "outline-color",
836
+ "outline-style",
837
+ "outline-width"
838
+ ],
839
+ "overflow": [
840
+ "overflow-x",
841
+ "overflow-y"
842
+ ],
843
+ "place-content": [
844
+ "align-content",
845
+ "justify-content"
846
+ ],
847
+ "place-items": [
848
+ "align-items",
849
+ "justify-items"
850
+ ],
851
+ "place-self": [
852
+ "align-self",
853
+ "justify-self"
854
+ ],
855
+ "text-decoration": [
856
+ "text-decoration-color",
857
+ "text-decoration-style",
858
+ "text-decoration-line"
859
+ ],
860
+ "transition": [
861
+ "transition-delay",
862
+ "transition-duration",
863
+ "transition-property",
864
+ "transition-timing-function"
865
+ ],
866
+ "text-emphasis": [
867
+ "text-emphasis-style",
868
+ "text-emphasis-color"
869
+ ],
870
+ "font-synthesis": [
871
+ "font-synthesis-weight",
872
+ "font-synthesis-style",
873
+ "font-synthesis-small-caps",
874
+ "font-synthesis-position"
875
+ ]
876
+ };
877
+ function bubbleSort(list, comparator) {
878
+ let upperIndex = list.length - 1;
879
+ while (upperIndex > 0) {
880
+ let swapIndex = 0;
881
+ for (let i = 0; i < upperIndex; i += 1) {
882
+ if (comparator(list[i], list[i + 1]) > 0) {
883
+ const temp = list[i + 1];
884
+ list[i + 1] = list[i];
885
+ list[i] = temp;
886
+ swapIndex = i;
139
887
  }
140
- preservedTokens.push(token);
141
- let preserver = "url(" + ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___)";
142
- sb.push(preserver);
143
- appendIndex = endIndex + 1;
144
- } else {
145
- sb.push(css.substring(match.index, pattern.lastIndex));
146
- appendIndex = pattern.lastIndex;
147
888
  }
889
+ upperIndex = swapIndex;
148
890
  }
149
- sb.push(css.substring(appendIndex));
150
- return sb.join("");
891
+ return list;
151
892
  }
152
- function compressHexColors(css) {
153
- const pattern = /(\=\s*?["']?)?#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])(\}|[^0-9a-f{][^{]*?\})/gi;
154
- const sb = [];
155
- let index = 0;
156
- let match;
157
- while ((match = pattern.exec(css)) !== null) {
158
- sb.push(css.substring(index, match.index));
159
- let isFilter = match[1];
160
- if (isFilter) {
161
- sb.push(match[1] + "#" + (match[2] + match[3] + match[4] + match[5] + match[6] + match[7]));
162
- } else {
163
- if (match[2].toLowerCase() == match[3].toLowerCase() && match[4].toLowerCase() == match[5].toLowerCase() && match[6].toLowerCase() == match[7].toLowerCase()) {
164
- sb.push("#" + (match[3] + match[5] + match[7]).toLowerCase());
165
- } else {
166
- sb.push("#" + (match[2] + match[3] + match[4] + match[5] + match[6] + match[7]).toLowerCase());
167
- }
168
- }
169
- index = pattern.lastIndex = pattern.lastIndex - match[8].length;
893
+ function __variableDynamicImportRuntime0__(path) {
894
+ switch (path) {
895
+ case "../orders/alphabetical.mjs":
896
+ return Promise.resolve().then(function() {
897
+ return alphabetical;
898
+ });
899
+ case "../orders/concentric-css.mjs":
900
+ return Promise.resolve().then(function() {
901
+ return concentricCss;
902
+ });
903
+ case "../orders/smacss.mjs":
904
+ return Promise.resolve().then(function() {
905
+ return smacss;
906
+ });
907
+ default:
908
+ return new Promise(function(resolve, reject) {
909
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
910
+ reject.bind(null, new Error("Unknown variable dynamic import: " + path))
911
+ );
912
+ });
170
913
  }
171
- sb.push(css.substring(index));
172
- return sb.join("");
173
914
  }
174
- function keyframes(content, preservedTokens) {
175
- const pattern = /@[a-z0-9-_]*keyframes\s+[a-z0-9-_]+\s*{/gi;
176
- let index = 0;
177
- let buffer;
178
- const preserve = (part, i) => {
179
- part = part.replace(/(^\s|\s$)/g, "");
180
- if (part.charAt(0) === "0") {
181
- preservedTokens.push(part);
182
- buffer[i] = ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___";
915
+ var builtInOrders = [
916
+ "alphabetical",
917
+ "concentric-css",
918
+ "smacss"
919
+ ];
920
+ var cssDeclarationSorter = ({ order = "alphabetical", keepOverrides = false } = {}) => ({
921
+ postcssPlugin: "css-declaration-sorter",
922
+ OnceExit(css) {
923
+ let withKeepOverrides = (comparator) => comparator;
924
+ if (keepOverrides) {
925
+ withKeepOverrides = withOverridesComparator(shorthandData);
183
926
  }
184
- };
185
- while (true) {
186
- let level = 0;
187
- buffer = "";
188
- let startIndex = content.slice(index).search(pattern);
189
- if (startIndex < 0) {
190
- break;
927
+ if (typeof order === "function") {
928
+ return processCss({ css, comparator: withKeepOverrides(order) });
191
929
  }
192
- index += startIndex;
193
- startIndex = index;
194
- let len = content.length;
195
- let buffers = [];
196
- for (; index < len; ++index) {
197
- let ch = content.charAt(index);
198
- if (ch === "{") {
199
- if (level === 0) {
200
- buffers.push(buffer.replace(/(^\s|\s$)/g, ""));
201
- } else if (level === 1) {
202
- buffer = buffer.split(",");
203
- buffer.forEach(preserve);
204
- buffers.push(buffer.join(",").replace(/(^\s|\s$)/g, ""));
930
+ if (!builtInOrders.includes(order))
931
+ return Promise.reject(
932
+ Error([
933
+ `Invalid built-in order '${order}' provided.`,
934
+ `Available built-in orders are: ${builtInOrders}`
935
+ ].join("\n"))
936
+ );
937
+ return __variableDynamicImportRuntime0__(`../orders/${order}.mjs`).then(({ properties: properties2 }) => processCss({
938
+ css,
939
+ comparator: withKeepOverrides(orderComparator(properties2))
940
+ }));
941
+ }
942
+ });
943
+ cssDeclarationSorter.postcss = true;
944
+ function processCss({ css, comparator }) {
945
+ const comments = [];
946
+ const rulesCache = [];
947
+ css.walk((node) => {
948
+ const nodes = node.nodes;
949
+ const type = node.type;
950
+ if (type === "comment") {
951
+ const isNewlineNode = node.raws.before && node.raws.before.includes("\n");
952
+ const lastNewlineNode = isNewlineNode && !node.next();
953
+ const onlyNode = !node.prev() && !node.next() || !node.parent;
954
+ if (lastNewlineNode || onlyNode || node.parent.type === "root") {
955
+ return;
956
+ }
957
+ if (isNewlineNode) {
958
+ const pairedNode = node.next() || node.prev();
959
+ if (pairedNode) {
960
+ comments.unshift({
961
+ "comment": node,
962
+ "pairedNode": pairedNode,
963
+ "insertPosition": node.next() ? "Before" : "After"
964
+ });
965
+ node.remove();
205
966
  }
206
- buffer = "";
207
- level += 1;
208
- } else if (ch === "}") {
209
- if (level === 2) {
210
- buffers.push("{" + buffer.replace(/(^\s|\s$)/g, "") + "}");
211
- buffer = "";
212
- } else if (level === 1) {
213
- content = content.slice(0, startIndex) + buffers.shift() + "{" + buffers.join("") + content.slice(index);
214
- break;
967
+ } else {
968
+ const pairedNode = node.prev() || node.next();
969
+ if (pairedNode) {
970
+ comments.push({
971
+ "comment": node,
972
+ "pairedNode": pairedNode,
973
+ "insertPosition": "After"
974
+ });
975
+ node.remove();
215
976
  }
216
- level -= 1;
217
- }
218
- if (level < 0) {
219
- break;
220
- } else if (ch !== "{" && ch !== "}") {
221
- buffer += ch;
222
977
  }
978
+ return;
223
979
  }
224
- }
225
- return content;
226
- }
227
- function collectComments(content, comments) {
228
- const table = [];
229
- let from = 0;
230
- let end;
231
- while (true) {
232
- let start = content.indexOf("/*", from);
233
- if (start > -1) {
234
- end = content.indexOf("*/", start + 2);
235
- if (end > -1) {
236
- comments.push(content.slice(start + 2, end));
237
- table.push(content.slice(from, start));
238
- table.push("/*___PRESERVE_CANDIDATE_COMMENT_" + (comments.length - 1) + "___*/");
239
- from = end + 2;
240
- } else {
241
- end = -2;
242
- break;
243
- }
244
- } else {
245
- break;
980
+ const isRule = type === "rule" || type === "atrule";
981
+ if (isRule && nodes && nodes.length > 1) {
982
+ rulesCache.push(nodes);
246
983
  }
247
- }
248
- table.push(content.slice(end + 2));
249
- return table.join("");
984
+ });
985
+ rulesCache.forEach((nodes) => {
986
+ sortCssDeclarations({ nodes, comparator });
987
+ });
988
+ comments.forEach((node) => {
989
+ const pairedNode = node.pairedNode;
990
+ node.comment.remove();
991
+ pairedNode.parent && pairedNode.parent["insert" + node.insertPosition](pairedNode, node.comment);
992
+ });
250
993
  }
251
- function processString2(content = "", options = defaultOptions) {
252
- const comments = [];
253
- const preservedTokens = [];
254
- let pattern;
255
- content = extractDataUrls(content, preservedTokens);
256
- content = convertRelativeUrls(content, options, preservedTokens);
257
- content = collectComments(content, comments);
258
- pattern = /("([^\\"]|\\.|\\)*")|('([^\\']|\\.|\\)*')/g;
259
- content = content.replace(pattern, (token) => {
260
- const quote = token.substring(0, 1);
261
- token = token.slice(1, -1);
262
- if (token.indexOf("___PRESERVE_CANDIDATE_COMMENT_") >= 0) {
263
- for (let i = 0, len = comments.length; i < len; i += 1) {
264
- token = token.replace("___PRESERVE_CANDIDATE_COMMENT_" + i + "___", comments[i]);
265
- }
994
+ function sortCssDeclarations({ nodes, comparator }) {
995
+ bubbleSort(nodes, (a, b) => {
996
+ if (a.type === "decl" && b.type === "decl") {
997
+ return comparator(a.prop, b.prop);
998
+ } else {
999
+ return compareDifferentType(a, b);
266
1000
  }
267
- token = token.replace(/progid:DXImageTransform.Microsoft.Alpha\(Opacity=/gi, "alpha(opacity=");
268
- preservedTokens.push(token);
269
- return quote + ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___" + quote;
270
1001
  });
271
- for (let i = 0, len = comments.length; i < len; i += 1) {
272
- let token = comments[i];
273
- let placeholder = "___PRESERVE_CANDIDATE_COMMENT_" + i + "___";
274
- if (token.charAt(0) === "!") {
275
- if (options.cuteComments) {
276
- preservedTokens.push(token.substring(1).replace(/\r\n/g, "\n"));
277
- } else if (options.uglyComments) {
278
- preservedTokens.push(token.substring(1).replace(/[\r\n]/g, ""));
279
- } else {
280
- preservedTokens.push(token);
281
- }
282
- content = content.replace(placeholder, ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___");
283
- continue;
1002
+ }
1003
+ function withOverridesComparator(shorthandData2) {
1004
+ return function(comparator) {
1005
+ return function(a, b) {
1006
+ a = removeVendorPrefix(a);
1007
+ b = removeVendorPrefix(b);
1008
+ if (shorthandData2[a] && shorthandData2[a].includes(b))
1009
+ return 0;
1010
+ if (shorthandData2[b] && shorthandData2[b].includes(a))
1011
+ return 0;
1012
+ return comparator(a, b);
1013
+ };
1014
+ };
1015
+ }
1016
+ function orderComparator(order) {
1017
+ return function(a, b) {
1018
+ const bIndex = order.indexOf(b);
1019
+ if (bIndex === -1) {
1020
+ return 0;
284
1021
  }
285
- if (token.charAt(token.length - 1) === "\\") {
286
- preservedTokens.push("\\");
287
- content = content.replace(placeholder, ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___");
288
- i = i + 1;
289
- preservedTokens.push("");
290
- content = content.replace("___PRESERVE_CANDIDATE_COMMENT_" + i + "___", ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___");
291
- continue;
1022
+ return order.indexOf(a) - bIndex;
1023
+ };
1024
+ }
1025
+ function compareDifferentType(a, b) {
1026
+ if (b.type === "atrule" || a.type === "atrule") {
1027
+ return 0;
1028
+ }
1029
+ return a.type === "decl" ? -1 : b.type === "decl" ? 1 : 0;
1030
+ }
1031
+ function removeVendorPrefix(property) {
1032
+ return property.replace(/^-\w+-/, "");
1033
+ }
1034
+ var properties$2 = [
1035
+ "all",
1036
+ "-webkit-line-clamp",
1037
+ "-webkit-text-fill-color",
1038
+ "-webkit-text-stroke",
1039
+ "-webkit-text-stroke-color",
1040
+ "-webkit-text-stroke-width",
1041
+ "accent-color",
1042
+ "align-content",
1043
+ "align-items",
1044
+ "align-self",
1045
+ "animation",
1046
+ "animation-composition",
1047
+ "animation-delay",
1048
+ "animation-direction",
1049
+ "animation-duration",
1050
+ "animation-fill-mode",
1051
+ "animation-iteration-count",
1052
+ "animation-name",
1053
+ "animation-play-state",
1054
+ "animation-timing-function",
1055
+ "appearance",
1056
+ "ascent-override",
1057
+ "aspect-ratio",
1058
+ "backdrop-filter",
1059
+ "backface-visibility",
1060
+ "background",
1061
+ "background-attachment",
1062
+ "background-blend-mode",
1063
+ "background-clip",
1064
+ "background-color",
1065
+ "background-image",
1066
+ "background-origin",
1067
+ "background-position",
1068
+ "background-position-x",
1069
+ "background-position-y",
1070
+ "background-repeat",
1071
+ "background-size",
1072
+ "baseline-source",
1073
+ "block-size",
1074
+ "border",
1075
+ "border-block",
1076
+ "border-block-color",
1077
+ "border-block-end",
1078
+ "border-block-end-color",
1079
+ "border-block-end-style",
1080
+ "border-block-end-width",
1081
+ "border-block-start",
1082
+ "border-block-start-color",
1083
+ "border-block-start-style",
1084
+ "border-block-start-width",
1085
+ "border-block-style",
1086
+ "border-block-width",
1087
+ "border-bottom",
1088
+ "border-bottom-color",
1089
+ "border-bottom-left-radius",
1090
+ "border-bottom-right-radius",
1091
+ "border-bottom-style",
1092
+ "border-bottom-width",
1093
+ "border-collapse",
1094
+ "border-color",
1095
+ "border-end-end-radius",
1096
+ "border-end-start-radius",
1097
+ "border-image",
1098
+ "border-image-outset",
1099
+ "border-image-repeat",
1100
+ "border-image-slice",
1101
+ "border-image-source",
1102
+ "border-image-width",
1103
+ "border-inline",
1104
+ "border-inline-color",
1105
+ "border-inline-end",
1106
+ "border-inline-end-color",
1107
+ "border-inline-end-style",
1108
+ "border-inline-end-width",
1109
+ "border-inline-start",
1110
+ "border-inline-start-color",
1111
+ "border-inline-start-style",
1112
+ "border-inline-start-width",
1113
+ "border-inline-style",
1114
+ "border-inline-width",
1115
+ "border-left",
1116
+ "border-left-color",
1117
+ "border-left-style",
1118
+ "border-left-width",
1119
+ "border-radius",
1120
+ "border-right",
1121
+ "border-right-color",
1122
+ "border-right-style",
1123
+ "border-right-width",
1124
+ "border-spacing",
1125
+ "border-start-end-radius",
1126
+ "border-start-start-radius",
1127
+ "border-style",
1128
+ "border-top",
1129
+ "border-top-color",
1130
+ "border-top-left-radius",
1131
+ "border-top-right-radius",
1132
+ "border-top-style",
1133
+ "border-top-width",
1134
+ "border-width",
1135
+ "bottom",
1136
+ "box-decoration-break",
1137
+ "box-shadow",
1138
+ "box-sizing",
1139
+ "break-after",
1140
+ "break-before",
1141
+ "break-inside",
1142
+ "caption-side",
1143
+ "caret-color",
1144
+ "clear",
1145
+ "clip-path",
1146
+ "color",
1147
+ "color-interpolation",
1148
+ "color-scheme",
1149
+ "column-count",
1150
+ "column-fill",
1151
+ "column-gap",
1152
+ "column-rule",
1153
+ "column-rule-color",
1154
+ "column-rule-style",
1155
+ "column-rule-width",
1156
+ "column-span",
1157
+ "column-width",
1158
+ "columns",
1159
+ "contain",
1160
+ "contain-intrinsic-height",
1161
+ "contain-intrinsic-size",
1162
+ "contain-intrinsic-width",
1163
+ "container",
1164
+ "container-name",
1165
+ "container-type",
1166
+ "content",
1167
+ "content-visibility",
1168
+ "counter-increment",
1169
+ "counter-reset",
1170
+ "counter-set",
1171
+ "cursor",
1172
+ "descent-override",
1173
+ "direction",
1174
+ "display",
1175
+ "empty-cells",
1176
+ "filter",
1177
+ "flex",
1178
+ "flex-basis",
1179
+ "flex-direction",
1180
+ "flex-flow",
1181
+ "flex-grow",
1182
+ "flex-shrink",
1183
+ "flex-wrap",
1184
+ "float",
1185
+ "font",
1186
+ "font-display",
1187
+ "font-family",
1188
+ "font-feature-settings",
1189
+ "font-kerning",
1190
+ "font-language-override",
1191
+ "font-optical-sizing",
1192
+ "font-palette",
1193
+ "font-size",
1194
+ "font-size-adjust",
1195
+ "font-stretch",
1196
+ "font-style",
1197
+ "font-synthesis",
1198
+ "font-synthesis-position",
1199
+ "font-synthesis-small-caps",
1200
+ "font-synthesis-style",
1201
+ "font-synthesis-weight",
1202
+ "font-variant",
1203
+ "font-variant-alternates",
1204
+ "font-variant-caps",
1205
+ "font-variant-east-asian",
1206
+ "font-variant-emoji",
1207
+ "font-variant-ligatures",
1208
+ "font-variant-numeric",
1209
+ "font-variant-position",
1210
+ "font-variation-settings",
1211
+ "font-weight",
1212
+ "forced-color-adjust",
1213
+ "gap",
1214
+ "grid",
1215
+ "grid-area",
1216
+ "grid-auto-columns",
1217
+ "grid-auto-flow",
1218
+ "grid-auto-rows",
1219
+ "grid-column",
1220
+ "grid-column-end",
1221
+ "grid-column-start",
1222
+ "grid-row",
1223
+ "grid-row-end",
1224
+ "grid-row-start",
1225
+ "grid-template",
1226
+ "grid-template-areas",
1227
+ "grid-template-columns",
1228
+ "grid-template-rows",
1229
+ "hanging-punctuation",
1230
+ "height",
1231
+ "hyphenate-character",
1232
+ "hyphens",
1233
+ "image-orientation",
1234
+ "image-rendering",
1235
+ "inline-size",
1236
+ "inset",
1237
+ "inset-block",
1238
+ "inset-block-end",
1239
+ "inset-block-start",
1240
+ "inset-inline",
1241
+ "inset-inline-end",
1242
+ "inset-inline-start",
1243
+ "isolation",
1244
+ "justify-content",
1245
+ "justify-items",
1246
+ "justify-self",
1247
+ "left",
1248
+ "letter-spacing",
1249
+ "line-break",
1250
+ "line-gap-override",
1251
+ "line-height",
1252
+ "list-style",
1253
+ "list-style-image",
1254
+ "list-style-position",
1255
+ "list-style-type",
1256
+ "margin",
1257
+ "margin-block",
1258
+ "margin-block-end",
1259
+ "margin-block-start",
1260
+ "margin-bottom",
1261
+ "margin-inline",
1262
+ "margin-inline-end",
1263
+ "margin-inline-start",
1264
+ "margin-left",
1265
+ "margin-right",
1266
+ "margin-top",
1267
+ "mask",
1268
+ "mask-border",
1269
+ "mask-border-outset",
1270
+ "mask-border-repeat",
1271
+ "mask-border-slice",
1272
+ "mask-border-source",
1273
+ "mask-border-width",
1274
+ "mask-clip",
1275
+ "mask-composite",
1276
+ "mask-image",
1277
+ "mask-mode",
1278
+ "mask-origin",
1279
+ "mask-position",
1280
+ "mask-repeat",
1281
+ "mask-size",
1282
+ "mask-type",
1283
+ "math-depth",
1284
+ "math-style",
1285
+ "max-block-size",
1286
+ "max-height",
1287
+ "max-inline-size",
1288
+ "max-width",
1289
+ "min-block-size",
1290
+ "min-height",
1291
+ "min-inline-size",
1292
+ "min-width",
1293
+ "mix-blend-mode",
1294
+ "object-fit",
1295
+ "object-position",
1296
+ "offset",
1297
+ "offset-anchor",
1298
+ "offset-distance",
1299
+ "offset-path",
1300
+ "offset-position",
1301
+ "offset-rotate",
1302
+ "opacity",
1303
+ "order",
1304
+ "orphans",
1305
+ "outline",
1306
+ "outline-color",
1307
+ "outline-offset",
1308
+ "outline-style",
1309
+ "outline-width",
1310
+ "overflow",
1311
+ "overflow-anchor",
1312
+ "overflow-block",
1313
+ "overflow-clip-margin",
1314
+ "overflow-inline",
1315
+ "overflow-wrap",
1316
+ "overflow-x",
1317
+ "overflow-y",
1318
+ "overscroll-behavior",
1319
+ "overscroll-behavior-block",
1320
+ "overscroll-behavior-inline",
1321
+ "overscroll-behavior-x",
1322
+ "overscroll-behavior-y",
1323
+ "padding",
1324
+ "padding-block",
1325
+ "padding-block-end",
1326
+ "padding-block-start",
1327
+ "padding-bottom",
1328
+ "padding-inline",
1329
+ "padding-inline-end",
1330
+ "padding-inline-start",
1331
+ "padding-left",
1332
+ "padding-right",
1333
+ "padding-top",
1334
+ "page",
1335
+ "page-break-after",
1336
+ "page-break-before",
1337
+ "page-break-inside",
1338
+ "paint-order",
1339
+ "perspective",
1340
+ "perspective-origin",
1341
+ "place-content",
1342
+ "place-items",
1343
+ "place-self",
1344
+ "pointer-events",
1345
+ "position",
1346
+ "print-color-adjust",
1347
+ "quotes",
1348
+ "resize",
1349
+ "right",
1350
+ "rotate",
1351
+ "row-gap",
1352
+ "ruby-position",
1353
+ "scale",
1354
+ "scroll-behavior",
1355
+ "scroll-margin",
1356
+ "scroll-margin-block",
1357
+ "scroll-margin-block-end",
1358
+ "scroll-margin-block-start",
1359
+ "scroll-margin-bottom",
1360
+ "scroll-margin-inline",
1361
+ "scroll-margin-inline-end",
1362
+ "scroll-margin-inline-start",
1363
+ "scroll-margin-left",
1364
+ "scroll-margin-right",
1365
+ "scroll-margin-top",
1366
+ "scroll-padding",
1367
+ "scroll-padding-block",
1368
+ "scroll-padding-block-end",
1369
+ "scroll-padding-block-start",
1370
+ "scroll-padding-bottom",
1371
+ "scroll-padding-inline",
1372
+ "scroll-padding-inline-end",
1373
+ "scroll-padding-inline-start",
1374
+ "scroll-padding-left",
1375
+ "scroll-padding-right",
1376
+ "scroll-padding-top",
1377
+ "scroll-snap-align",
1378
+ "scroll-snap-stop",
1379
+ "scroll-snap-type",
1380
+ "scrollbar-color",
1381
+ "scrollbar-gutter",
1382
+ "scrollbar-width",
1383
+ "shape-image-threshold",
1384
+ "shape-margin",
1385
+ "shape-outside",
1386
+ "size-adjust",
1387
+ "src",
1388
+ "tab-size",
1389
+ "table-layout",
1390
+ "text-align",
1391
+ "text-align-last",
1392
+ "text-combine-upright",
1393
+ "text-decoration",
1394
+ "text-decoration-color",
1395
+ "text-decoration-line",
1396
+ "text-decoration-skip-ink",
1397
+ "text-decoration-style",
1398
+ "text-decoration-thickness",
1399
+ "text-emphasis",
1400
+ "text-emphasis-color",
1401
+ "text-emphasis-position",
1402
+ "text-emphasis-style",
1403
+ "text-indent",
1404
+ "text-justify",
1405
+ "text-orientation",
1406
+ "text-overflow",
1407
+ "text-rendering",
1408
+ "text-shadow",
1409
+ "text-transform",
1410
+ "text-underline-offset",
1411
+ "text-underline-position",
1412
+ "text-wrap",
1413
+ "top",
1414
+ "touch-action",
1415
+ "transform",
1416
+ "transform-box",
1417
+ "transform-origin",
1418
+ "transform-style",
1419
+ "transition",
1420
+ "transition-behavior",
1421
+ "transition-delay",
1422
+ "transition-duration",
1423
+ "transition-property",
1424
+ "transition-timing-function",
1425
+ "translate",
1426
+ "unicode-bidi",
1427
+ "unicode-range",
1428
+ "user-select",
1429
+ "vertical-align",
1430
+ "visibility",
1431
+ "white-space",
1432
+ "white-space-collapse",
1433
+ "widows",
1434
+ "width",
1435
+ "will-change",
1436
+ "word-break",
1437
+ "word-spacing",
1438
+ "writing-mode",
1439
+ "z-index"
1440
+ ];
1441
+ var alphabetical = /* @__PURE__ */ Object.freeze({
1442
+ __proto__: null,
1443
+ properties: properties$2
1444
+ });
1445
+ var properties$1 = [
1446
+ "all",
1447
+ "display",
1448
+ "position",
1449
+ "top",
1450
+ "right",
1451
+ "bottom",
1452
+ "left",
1453
+ "offset",
1454
+ "offset-anchor",
1455
+ "offset-distance",
1456
+ "offset-path",
1457
+ "offset-position",
1458
+ "offset-rotate",
1459
+ "grid",
1460
+ "grid-template-rows",
1461
+ "grid-template-columns",
1462
+ "grid-template-areas",
1463
+ "grid-auto-rows",
1464
+ "grid-auto-columns",
1465
+ "grid-auto-flow",
1466
+ "column-gap",
1467
+ "row-gap",
1468
+ "grid-area",
1469
+ "grid-row",
1470
+ "grid-row-start",
1471
+ "grid-row-end",
1472
+ "grid-column",
1473
+ "grid-column-start",
1474
+ "grid-column-end",
1475
+ "grid-template",
1476
+ "flex",
1477
+ "flex-grow",
1478
+ "flex-shrink",
1479
+ "flex-basis",
1480
+ "flex-direction",
1481
+ "flex-flow",
1482
+ "flex-wrap",
1483
+ "box-decoration-break",
1484
+ "place-content",
1485
+ "align-content",
1486
+ "justify-content",
1487
+ "place-items",
1488
+ "align-items",
1489
+ "justify-items",
1490
+ "place-self",
1491
+ "align-self",
1492
+ "justify-self",
1493
+ "vertical-align",
1494
+ "baseline-source",
1495
+ "order",
1496
+ "float",
1497
+ "clear",
1498
+ "shape-margin",
1499
+ "shape-outside",
1500
+ "shape-image-threshold",
1501
+ "orphans",
1502
+ "gap",
1503
+ "columns",
1504
+ "column-fill",
1505
+ "column-rule",
1506
+ "column-rule-width",
1507
+ "column-rule-style",
1508
+ "column-rule-color",
1509
+ "column-width",
1510
+ "column-span",
1511
+ "column-count",
1512
+ "break-before",
1513
+ "break-after",
1514
+ "break-inside",
1515
+ "page",
1516
+ "page-break-before",
1517
+ "page-break-after",
1518
+ "page-break-inside",
1519
+ "transform",
1520
+ "transform-box",
1521
+ "transform-origin",
1522
+ "transform-style",
1523
+ "translate",
1524
+ "rotate",
1525
+ "scale",
1526
+ "perspective",
1527
+ "perspective-origin",
1528
+ "appearance",
1529
+ "visibility",
1530
+ "content-visibility",
1531
+ "opacity",
1532
+ "z-index",
1533
+ "paint-order",
1534
+ "mix-blend-mode",
1535
+ "backface-visibility",
1536
+ "backdrop-filter",
1537
+ "clip-path",
1538
+ "mask",
1539
+ "mask-border",
1540
+ "mask-border-outset",
1541
+ "mask-border-repeat",
1542
+ "mask-border-slice",
1543
+ "mask-border-source",
1544
+ "mask-border-width",
1545
+ "mask-image",
1546
+ "mask-mode",
1547
+ "mask-position",
1548
+ "mask-size",
1549
+ "mask-repeat",
1550
+ "mask-origin",
1551
+ "mask-clip",
1552
+ "mask-composite",
1553
+ "mask-type",
1554
+ "filter",
1555
+ "animation",
1556
+ "animation-composition",
1557
+ "animation-duration",
1558
+ "animation-timing-function",
1559
+ "animation-delay",
1560
+ "animation-iteration-count",
1561
+ "animation-direction",
1562
+ "animation-fill-mode",
1563
+ "animation-play-state",
1564
+ "animation-name",
1565
+ "transition",
1566
+ "transition-behavior",
1567
+ "transition-delay",
1568
+ "transition-duration",
1569
+ "transition-property",
1570
+ "transition-timing-function",
1571
+ "will-change",
1572
+ "counter-increment",
1573
+ "counter-reset",
1574
+ "counter-set",
1575
+ "cursor",
1576
+ "box-sizing",
1577
+ "contain",
1578
+ "contain-intrinsic-height",
1579
+ "contain-intrinsic-size",
1580
+ "contain-intrinsic-width",
1581
+ "container",
1582
+ "container-name",
1583
+ "container-type",
1584
+ "margin",
1585
+ "margin-top",
1586
+ "margin-right",
1587
+ "margin-bottom",
1588
+ "margin-left",
1589
+ "margin-inline",
1590
+ "margin-inline-start",
1591
+ "margin-inline-end",
1592
+ "margin-block",
1593
+ "margin-block-start",
1594
+ "margin-block-end",
1595
+ "inset",
1596
+ "inset-block",
1597
+ "inset-block-end",
1598
+ "inset-block-start",
1599
+ "inset-inline",
1600
+ "inset-inline-end",
1601
+ "inset-inline-start",
1602
+ "outline",
1603
+ "outline-color",
1604
+ "outline-style",
1605
+ "outline-width",
1606
+ "outline-offset",
1607
+ "box-shadow",
1608
+ "border",
1609
+ "border-top",
1610
+ "border-right",
1611
+ "border-bottom",
1612
+ "border-left",
1613
+ "border-width",
1614
+ "border-top-width",
1615
+ "border-right-width",
1616
+ "border-bottom-width",
1617
+ "border-left-width",
1618
+ "border-style",
1619
+ "border-top-style",
1620
+ "border-right-style",
1621
+ "border-bottom-style",
1622
+ "border-left-style",
1623
+ "border-color",
1624
+ "border-top-color",
1625
+ "border-right-color",
1626
+ "border-bottom-color",
1627
+ "border-left-color",
1628
+ "border-radius",
1629
+ "border-top-right-radius",
1630
+ "border-top-left-radius",
1631
+ "border-bottom-right-radius",
1632
+ "border-bottom-left-radius",
1633
+ "border-inline",
1634
+ "border-inline-width",
1635
+ "border-inline-style",
1636
+ "border-inline-color",
1637
+ "border-inline-start",
1638
+ "border-inline-start-width",
1639
+ "border-inline-start-style",
1640
+ "border-inline-start-color",
1641
+ "border-inline-end",
1642
+ "border-inline-end-width",
1643
+ "border-inline-end-style",
1644
+ "border-inline-end-color",
1645
+ "border-block",
1646
+ "border-block-width",
1647
+ "border-block-style",
1648
+ "border-block-color",
1649
+ "border-block-start",
1650
+ "border-block-start-width",
1651
+ "border-block-start-style",
1652
+ "border-block-start-color",
1653
+ "border-block-end",
1654
+ "border-block-end-width",
1655
+ "border-block-end-style",
1656
+ "border-block-end-color",
1657
+ "border-image",
1658
+ "border-image-source",
1659
+ "border-image-slice",
1660
+ "border-image-width",
1661
+ "border-image-outset",
1662
+ "border-image-repeat",
1663
+ "border-collapse",
1664
+ "border-spacing",
1665
+ "border-start-start-radius",
1666
+ "border-start-end-radius",
1667
+ "border-end-start-radius",
1668
+ "border-end-end-radius",
1669
+ "background",
1670
+ "background-image",
1671
+ "background-position",
1672
+ "background-size",
1673
+ "background-repeat",
1674
+ "background-origin",
1675
+ "background-clip",
1676
+ "background-attachment",
1677
+ "background-color",
1678
+ "background-blend-mode",
1679
+ "background-position-x",
1680
+ "background-position-y",
1681
+ "isolation",
1682
+ "padding",
1683
+ "padding-top",
1684
+ "padding-right",
1685
+ "padding-bottom",
1686
+ "padding-left",
1687
+ "padding-inline",
1688
+ "padding-inline-start",
1689
+ "padding-inline-end",
1690
+ "padding-block",
1691
+ "padding-block-start",
1692
+ "padding-block-end",
1693
+ "image-orientation",
1694
+ "image-rendering",
1695
+ "aspect-ratio",
1696
+ "width",
1697
+ "min-width",
1698
+ "max-width",
1699
+ "height",
1700
+ "min-height",
1701
+ "max-height",
1702
+ "-webkit-line-clamp",
1703
+ "-webkit-text-fill-color",
1704
+ "-webkit-text-stroke",
1705
+ "-webkit-text-stroke-color",
1706
+ "-webkit-text-stroke-width",
1707
+ "inline-size",
1708
+ "min-inline-size",
1709
+ "max-inline-size",
1710
+ "block-size",
1711
+ "min-block-size",
1712
+ "max-block-size",
1713
+ "table-layout",
1714
+ "caption-side",
1715
+ "empty-cells",
1716
+ "overflow",
1717
+ "overflow-anchor",
1718
+ "overflow-block",
1719
+ "overflow-clip-margin",
1720
+ "overflow-inline",
1721
+ "overflow-x",
1722
+ "overflow-y",
1723
+ "overscroll-behavior",
1724
+ "overscroll-behavior-block",
1725
+ "overscroll-behavior-inline",
1726
+ "overscroll-behavior-x",
1727
+ "overscroll-behavior-y",
1728
+ "resize",
1729
+ "object-fit",
1730
+ "object-position",
1731
+ "scroll-behavior",
1732
+ "scroll-margin",
1733
+ "scroll-margin-block",
1734
+ "scroll-margin-block-end",
1735
+ "scroll-margin-block-start",
1736
+ "scroll-margin-bottom",
1737
+ "scroll-margin-inline",
1738
+ "scroll-margin-inline-end",
1739
+ "scroll-margin-inline-start",
1740
+ "scroll-margin-left",
1741
+ "scroll-margin-right",
1742
+ "scroll-margin-top",
1743
+ "scroll-padding",
1744
+ "scroll-padding-block",
1745
+ "scroll-padding-block-end",
1746
+ "scroll-padding-block-start",
1747
+ "scroll-padding-bottom",
1748
+ "scroll-padding-inline",
1749
+ "scroll-padding-inline-end",
1750
+ "scroll-padding-inline-start",
1751
+ "scroll-padding-left",
1752
+ "scroll-padding-right",
1753
+ "scroll-padding-top",
1754
+ "scroll-snap-align",
1755
+ "scroll-snap-stop",
1756
+ "scroll-snap-type",
1757
+ "scrollbar-color",
1758
+ "scrollbar-gutter",
1759
+ "scrollbar-width",
1760
+ "touch-action",
1761
+ "pointer-events",
1762
+ "content",
1763
+ "quotes",
1764
+ "hanging-punctuation",
1765
+ "color",
1766
+ "color-interpolation",
1767
+ "accent-color",
1768
+ "print-color-adjust",
1769
+ "forced-color-adjust",
1770
+ "color-scheme",
1771
+ "caret-color",
1772
+ "font",
1773
+ "font-style",
1774
+ "font-variant",
1775
+ "font-weight",
1776
+ "font-stretch",
1777
+ "font-size",
1778
+ "size-adjust",
1779
+ "line-height",
1780
+ "src",
1781
+ "font-family",
1782
+ "font-display",
1783
+ "font-kerning",
1784
+ "font-language-override",
1785
+ "font-optical-sizing",
1786
+ "font-palette",
1787
+ "font-size-adjust",
1788
+ "font-synthesis",
1789
+ "font-synthesis-weight",
1790
+ "font-synthesis-style",
1791
+ "font-synthesis-small-caps",
1792
+ "font-synthesis-position",
1793
+ "font-variant-alternates",
1794
+ "font-variant-caps",
1795
+ "font-variant-east-asian",
1796
+ "font-variant-emoji",
1797
+ "font-variant-ligatures",
1798
+ "font-variant-numeric",
1799
+ "font-variant-position",
1800
+ "font-variation-settings",
1801
+ "font-feature-settings",
1802
+ "ascent-override",
1803
+ "descent-override",
1804
+ "line-gap-override",
1805
+ "hyphens",
1806
+ "hyphenate-character",
1807
+ "letter-spacing",
1808
+ "line-break",
1809
+ "list-style",
1810
+ "list-style-type",
1811
+ "list-style-image",
1812
+ "list-style-position",
1813
+ "writing-mode",
1814
+ "direction",
1815
+ "unicode-bidi",
1816
+ "unicode-range",
1817
+ "user-select",
1818
+ "ruby-position",
1819
+ "math-depth",
1820
+ "math-style",
1821
+ "text-combine-upright",
1822
+ "text-align",
1823
+ "text-align-last",
1824
+ "text-decoration",
1825
+ "text-decoration-line",
1826
+ "text-decoration-style",
1827
+ "text-decoration-color",
1828
+ "text-decoration-thickness",
1829
+ "text-decoration-skip-ink",
1830
+ "text-emphasis",
1831
+ "text-emphasis-style",
1832
+ "text-emphasis-color",
1833
+ "text-emphasis-position",
1834
+ "text-indent",
1835
+ "text-justify",
1836
+ "text-underline-position",
1837
+ "text-underline-offset",
1838
+ "text-orientation",
1839
+ "text-overflow",
1840
+ "text-rendering",
1841
+ "text-shadow",
1842
+ "text-transform",
1843
+ "text-wrap",
1844
+ "white-space",
1845
+ "white-space-collapse",
1846
+ "word-break",
1847
+ "word-spacing",
1848
+ "overflow-wrap",
1849
+ "tab-size",
1850
+ "widows"
1851
+ ];
1852
+ var concentricCss = /* @__PURE__ */ Object.freeze({
1853
+ __proto__: null,
1854
+ properties: properties$1
1855
+ });
1856
+ var properties = [
1857
+ "all",
1858
+ "box-sizing",
1859
+ "contain",
1860
+ "contain-intrinsic-height",
1861
+ "contain-intrinsic-size",
1862
+ "contain-intrinsic-width",
1863
+ "container",
1864
+ "container-name",
1865
+ "container-type",
1866
+ "display",
1867
+ "appearance",
1868
+ "visibility",
1869
+ "content-visibility",
1870
+ "z-index",
1871
+ "paint-order",
1872
+ "position",
1873
+ "top",
1874
+ "right",
1875
+ "bottom",
1876
+ "left",
1877
+ "offset",
1878
+ "offset-anchor",
1879
+ "offset-distance",
1880
+ "offset-path",
1881
+ "offset-position",
1882
+ "offset-rotate",
1883
+ "grid",
1884
+ "grid-template-rows",
1885
+ "grid-template-columns",
1886
+ "grid-template-areas",
1887
+ "grid-auto-rows",
1888
+ "grid-auto-columns",
1889
+ "grid-auto-flow",
1890
+ "column-gap",
1891
+ "row-gap",
1892
+ "grid-area",
1893
+ "grid-row",
1894
+ "grid-row-start",
1895
+ "grid-row-end",
1896
+ "grid-column",
1897
+ "grid-column-start",
1898
+ "grid-column-end",
1899
+ "grid-template",
1900
+ "flex",
1901
+ "flex-grow",
1902
+ "flex-shrink",
1903
+ "flex-basis",
1904
+ "flex-direction",
1905
+ "flex-flow",
1906
+ "flex-wrap",
1907
+ "box-decoration-break",
1908
+ "place-content",
1909
+ "place-items",
1910
+ "place-self",
1911
+ "align-content",
1912
+ "align-items",
1913
+ "align-self",
1914
+ "justify-content",
1915
+ "justify-items",
1916
+ "justify-self",
1917
+ "order",
1918
+ "aspect-ratio",
1919
+ "width",
1920
+ "min-width",
1921
+ "max-width",
1922
+ "height",
1923
+ "min-height",
1924
+ "max-height",
1925
+ "-webkit-line-clamp",
1926
+ "-webkit-text-fill-color",
1927
+ "-webkit-text-stroke",
1928
+ "-webkit-text-stroke-color",
1929
+ "-webkit-text-stroke-width",
1930
+ "inline-size",
1931
+ "min-inline-size",
1932
+ "max-inline-size",
1933
+ "block-size",
1934
+ "min-block-size",
1935
+ "max-block-size",
1936
+ "margin",
1937
+ "margin-top",
1938
+ "margin-right",
1939
+ "margin-bottom",
1940
+ "margin-left",
1941
+ "margin-inline",
1942
+ "margin-inline-start",
1943
+ "margin-inline-end",
1944
+ "margin-block",
1945
+ "margin-block-start",
1946
+ "margin-block-end",
1947
+ "inset",
1948
+ "inset-block",
1949
+ "inset-block-end",
1950
+ "inset-block-start",
1951
+ "inset-inline",
1952
+ "inset-inline-end",
1953
+ "inset-inline-start",
1954
+ "padding",
1955
+ "padding-top",
1956
+ "padding-right",
1957
+ "padding-bottom",
1958
+ "padding-left",
1959
+ "padding-inline",
1960
+ "padding-inline-start",
1961
+ "padding-inline-end",
1962
+ "padding-block",
1963
+ "padding-block-start",
1964
+ "padding-block-end",
1965
+ "float",
1966
+ "clear",
1967
+ "overflow",
1968
+ "overflow-anchor",
1969
+ "overflow-block",
1970
+ "overflow-clip-margin",
1971
+ "overflow-inline",
1972
+ "overflow-x",
1973
+ "overflow-y",
1974
+ "overscroll-behavior",
1975
+ "overscroll-behavior-block",
1976
+ "overscroll-behavior-inline",
1977
+ "overscroll-behavior-x",
1978
+ "overscroll-behavior-y",
1979
+ "orphans",
1980
+ "gap",
1981
+ "columns",
1982
+ "column-fill",
1983
+ "column-rule",
1984
+ "column-rule-color",
1985
+ "column-rule-style",
1986
+ "column-rule-width",
1987
+ "column-span",
1988
+ "column-count",
1989
+ "column-width",
1990
+ "object-fit",
1991
+ "object-position",
1992
+ "transform",
1993
+ "transform-box",
1994
+ "transform-origin",
1995
+ "transform-style",
1996
+ "translate",
1997
+ "rotate",
1998
+ "scale",
1999
+ "border",
2000
+ "border-top",
2001
+ "border-right",
2002
+ "border-bottom",
2003
+ "border-left",
2004
+ "border-width",
2005
+ "border-top-width",
2006
+ "border-right-width",
2007
+ "border-bottom-width",
2008
+ "border-left-width",
2009
+ "border-style",
2010
+ "border-top-style",
2011
+ "border-right-style",
2012
+ "border-bottom-style",
2013
+ "border-left-style",
2014
+ "border-radius",
2015
+ "border-top-right-radius",
2016
+ "border-top-left-radius",
2017
+ "border-bottom-right-radius",
2018
+ "border-bottom-left-radius",
2019
+ "border-inline",
2020
+ "border-inline-color",
2021
+ "border-inline-style",
2022
+ "border-inline-width",
2023
+ "border-inline-start",
2024
+ "border-inline-start-color",
2025
+ "border-inline-start-style",
2026
+ "border-inline-start-width",
2027
+ "border-inline-end",
2028
+ "border-inline-end-color",
2029
+ "border-inline-end-style",
2030
+ "border-inline-end-width",
2031
+ "border-block",
2032
+ "border-block-color",
2033
+ "border-block-style",
2034
+ "border-block-width",
2035
+ "border-block-start",
2036
+ "border-block-start-color",
2037
+ "border-block-start-style",
2038
+ "border-block-start-width",
2039
+ "border-block-end",
2040
+ "border-block-end-color",
2041
+ "border-block-end-style",
2042
+ "border-block-end-width",
2043
+ "border-color",
2044
+ "border-image",
2045
+ "border-image-outset",
2046
+ "border-image-repeat",
2047
+ "border-image-slice",
2048
+ "border-image-source",
2049
+ "border-image-width",
2050
+ "border-top-color",
2051
+ "border-right-color",
2052
+ "border-bottom-color",
2053
+ "border-left-color",
2054
+ "border-collapse",
2055
+ "border-spacing",
2056
+ "border-start-start-radius",
2057
+ "border-start-end-radius",
2058
+ "border-end-start-radius",
2059
+ "border-end-end-radius",
2060
+ "outline",
2061
+ "outline-color",
2062
+ "outline-style",
2063
+ "outline-width",
2064
+ "outline-offset",
2065
+ "backdrop-filter",
2066
+ "backface-visibility",
2067
+ "background",
2068
+ "background-image",
2069
+ "background-position",
2070
+ "background-size",
2071
+ "background-repeat",
2072
+ "background-origin",
2073
+ "background-clip",
2074
+ "background-attachment",
2075
+ "background-color",
2076
+ "background-blend-mode",
2077
+ "background-position-x",
2078
+ "background-position-y",
2079
+ "box-shadow",
2080
+ "isolation",
2081
+ "content",
2082
+ "quotes",
2083
+ "hanging-punctuation",
2084
+ "color",
2085
+ "color-interpolation",
2086
+ "accent-color",
2087
+ "print-color-adjust",
2088
+ "forced-color-adjust",
2089
+ "color-scheme",
2090
+ "caret-color",
2091
+ "font",
2092
+ "font-style",
2093
+ "font-variant",
2094
+ "font-weight",
2095
+ "src",
2096
+ "font-stretch",
2097
+ "font-size",
2098
+ "size-adjust",
2099
+ "line-height",
2100
+ "font-family",
2101
+ "font-display",
2102
+ "font-kerning",
2103
+ "font-language-override",
2104
+ "font-optical-sizing",
2105
+ "font-palette",
2106
+ "font-size-adjust",
2107
+ "font-synthesis",
2108
+ "font-synthesis-weight",
2109
+ "font-synthesis-style",
2110
+ "font-synthesis-small-caps",
2111
+ "font-synthesis-position",
2112
+ "font-variant-alternates",
2113
+ "font-variant-caps",
2114
+ "font-variant-east-asian",
2115
+ "font-variant-emoji",
2116
+ "font-variant-ligatures",
2117
+ "font-variant-numeric",
2118
+ "font-variant-position",
2119
+ "font-variation-settings",
2120
+ "font-feature-settings",
2121
+ "ascent-override",
2122
+ "descent-override",
2123
+ "line-gap-override",
2124
+ "hyphens",
2125
+ "hyphenate-character",
2126
+ "letter-spacing",
2127
+ "line-break",
2128
+ "list-style",
2129
+ "list-style-image",
2130
+ "list-style-position",
2131
+ "list-style-type",
2132
+ "direction",
2133
+ "text-align",
2134
+ "text-align-last",
2135
+ "text-decoration",
2136
+ "text-decoration-line",
2137
+ "text-decoration-style",
2138
+ "text-decoration-color",
2139
+ "text-decoration-thickness",
2140
+ "text-decoration-skip-ink",
2141
+ "text-emphasis",
2142
+ "text-emphasis-style",
2143
+ "text-emphasis-color",
2144
+ "text-emphasis-position",
2145
+ "text-indent",
2146
+ "text-justify",
2147
+ "text-underline-position",
2148
+ "text-underline-offset",
2149
+ "text-orientation",
2150
+ "text-overflow",
2151
+ "text-rendering",
2152
+ "text-shadow",
2153
+ "text-transform",
2154
+ "text-wrap",
2155
+ "vertical-align",
2156
+ "baseline-source",
2157
+ "white-space",
2158
+ "white-space-collapse",
2159
+ "word-break",
2160
+ "word-spacing",
2161
+ "overflow-wrap",
2162
+ "animation",
2163
+ "animation-composition",
2164
+ "animation-duration",
2165
+ "animation-timing-function",
2166
+ "animation-delay",
2167
+ "animation-iteration-count",
2168
+ "animation-direction",
2169
+ "animation-fill-mode",
2170
+ "animation-play-state",
2171
+ "animation-name",
2172
+ "mix-blend-mode",
2173
+ "break-before",
2174
+ "break-after",
2175
+ "break-inside",
2176
+ "page",
2177
+ "page-break-before",
2178
+ "page-break-after",
2179
+ "page-break-inside",
2180
+ "caption-side",
2181
+ "clip-path",
2182
+ "counter-increment",
2183
+ "counter-reset",
2184
+ "counter-set",
2185
+ "cursor",
2186
+ "empty-cells",
2187
+ "filter",
2188
+ "image-orientation",
2189
+ "image-rendering",
2190
+ "mask",
2191
+ "mask-border",
2192
+ "mask-border-outset",
2193
+ "mask-border-repeat",
2194
+ "mask-border-slice",
2195
+ "mask-border-source",
2196
+ "mask-border-width",
2197
+ "mask-clip",
2198
+ "mask-composite",
2199
+ "mask-image",
2200
+ "mask-mode",
2201
+ "mask-origin",
2202
+ "mask-position",
2203
+ "mask-repeat",
2204
+ "mask-size",
2205
+ "mask-type",
2206
+ "opacity",
2207
+ "perspective",
2208
+ "perspective-origin",
2209
+ "pointer-events",
2210
+ "resize",
2211
+ "scroll-behavior",
2212
+ "scroll-margin",
2213
+ "scroll-margin-block",
2214
+ "scroll-margin-block-end",
2215
+ "scroll-margin-block-start",
2216
+ "scroll-margin-bottom",
2217
+ "scroll-margin-inline",
2218
+ "scroll-margin-inline-end",
2219
+ "scroll-margin-inline-start",
2220
+ "scroll-margin-left",
2221
+ "scroll-margin-right",
2222
+ "scroll-margin-top",
2223
+ "scroll-padding",
2224
+ "scroll-padding-block",
2225
+ "scroll-padding-block-end",
2226
+ "scroll-padding-block-start",
2227
+ "scroll-padding-bottom",
2228
+ "scroll-padding-inline",
2229
+ "scroll-padding-inline-end",
2230
+ "scroll-padding-inline-start",
2231
+ "scroll-padding-left",
2232
+ "scroll-padding-right",
2233
+ "scroll-padding-top",
2234
+ "scroll-snap-align",
2235
+ "scroll-snap-stop",
2236
+ "scroll-snap-type",
2237
+ "scrollbar-color",
2238
+ "scrollbar-gutter",
2239
+ "scrollbar-width",
2240
+ "shape-image-threshold",
2241
+ "shape-margin",
2242
+ "shape-outside",
2243
+ "tab-size",
2244
+ "table-layout",
2245
+ "ruby-position",
2246
+ "math-depth",
2247
+ "math-style",
2248
+ "text-combine-upright",
2249
+ "touch-action",
2250
+ "transition",
2251
+ "transition-behavior",
2252
+ "transition-delay",
2253
+ "transition-duration",
2254
+ "transition-property",
2255
+ "transition-timing-function",
2256
+ "will-change",
2257
+ "unicode-bidi",
2258
+ "unicode-range",
2259
+ "user-select",
2260
+ "widows",
2261
+ "writing-mode"
2262
+ ];
2263
+ var smacss = /* @__PURE__ */ Object.freeze({
2264
+ __proto__: null,
2265
+ properties
2266
+ });
2267
+ exports2.cssDeclarationSorter = cssDeclarationSorter;
2268
+ exports2.default = cssDeclarationSorter;
2269
+ module2.exports = cssDeclarationSorter;
2270
+ }
2271
+ });
2272
+
2273
+ // node_modules/cssnano-utils/src/rawCache.js
2274
+ var require_rawCache = __commonJS({
2275
+ "node_modules/cssnano-utils/src/rawCache.js"(exports2, module2) {
2276
+ "use strict";
2277
+ function pluginCreator() {
2278
+ return {
2279
+ postcssPlugin: "cssnano-util-raw-cache",
2280
+ /**
2281
+ * @param {import('postcss').Root} css
2282
+ * @param {{result: import('postcss').Result & {root: {rawCache?: any}}}} arg
2283
+ */
2284
+ OnceExit(css, { result }) {
2285
+ result.root.rawCache = {
2286
+ colon: ":",
2287
+ indent: "",
2288
+ beforeDecl: "",
2289
+ beforeRule: "",
2290
+ beforeOpen: "",
2291
+ beforeClose: "",
2292
+ beforeComment: "",
2293
+ after: "",
2294
+ emptyBody: "",
2295
+ commentLeft: "",
2296
+ commentRight: ""
2297
+ };
292
2298
  }
293
- if (token.length === 0) {
294
- let startIndex = content.indexOf(placeholder);
295
- if (startIndex > 2) {
296
- if (content.charAt(startIndex - 3) === ">") {
297
- preservedTokens.push("");
298
- content = content.replace(placeholder, ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___");
299
- }
300
- }
2299
+ };
2300
+ }
2301
+ pluginCreator.postcss = true;
2302
+ module2.exports = pluginCreator;
2303
+ }
2304
+ });
2305
+
2306
+ // node_modules/cssnano-utils/src/getArguments.js
2307
+ var require_getArguments = __commonJS({
2308
+ "node_modules/cssnano-utils/src/getArguments.js"(exports2, module2) {
2309
+ "use strict";
2310
+ module2.exports = function getArguments(node) {
2311
+ const list = [[]];
2312
+ for (const child of node.nodes) {
2313
+ if (child.type !== "div") {
2314
+ list[list.length - 1].push(child);
2315
+ } else {
2316
+ list.push([]);
301
2317
  }
302
- content = content.replace(`/*${placeholder}*/`, "");
303
2318
  }
304
- if (options.expandVars) {
305
- const vars = {};
306
- pattern = /@variables\s*\{\s*([^\}]+)\s*\}/g;
307
- content = content.replace(pattern, (_, f1) => {
308
- pattern = /\s*([a-z0-9\-]+)\s*:\s*([^;\}]+)\s*/gi;
309
- f1.replace(pattern, (_2, f12, f2) => {
310
- if (f12 && f2) {
311
- vars[f12] = f2;
312
- }
313
- return "";
314
- });
315
- return "";
316
- });
317
- pattern = /var\s*\(\s*([^\)]+)\s*\)/g;
318
- content = content.replace(pattern, (_, f1) => {
319
- return vars[f1] || "none";
320
- });
2319
+ return list;
2320
+ };
2321
+ }
2322
+ });
2323
+
2324
+ // node_modules/cssnano-utils/src/sameParent.js
2325
+ var require_sameParent = __commonJS({
2326
+ "node_modules/cssnano-utils/src/sameParent.js"(exports2, module2) {
2327
+ "use strict";
2328
+ function checkMatch(nodeA, nodeB) {
2329
+ if (nodeA.type === "atrule" && nodeB.type === "atrule") {
2330
+ return nodeA.params === nodeB.params && nodeA.name.toLowerCase() === nodeB.name.toLowerCase();
321
2331
  }
322
- content = content.replace(/\s+/g, " ");
323
- pattern = /calc\(([^;}]*)\)/g;
324
- content = content.replace(pattern, (_, f1) => {
325
- preservedTokens.push("calc(" + f1.replace(/(^\s*|\s*$)/g, "").replace(/\( /g, "(").replace(/ \)/g, ")") + ")");
326
- return ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___";
327
- });
328
- pattern = /\s*filter:\s*progid:DXImageTransform.Microsoft.Matrix\(([^\)]+)\);/g;
329
- content = content.replace(pattern, (_, f1) => {
330
- preservedTokens.push(f1);
331
- return "filter:progid:DXImageTransform.Microsoft.Matrix(" + ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___);";
332
- });
333
- pattern = /(^|\})(([^\{:])+:)+([^\{]*\{)/g;
334
- content = content.replace(pattern, (token) => token.replace(/:/g, "___PSEUDOCLASSCOLON___"));
335
- content = content.replace(/\s+([!{};:>+\(\)\],])/g, "$1");
336
- content = content.replace(/!important/g, " !important");
337
- content = content.replace(/___PSEUDOCLASSCOLON___/g, ":");
338
- pattern = /\s*(animation|animation-delay|animation-duration|transition|transition-delay|transition-duration):\s*([^;}]+)/gi;
339
- content = content.replace(pattern, (_, f1, f2) => {
340
- f2 = f2.replace(/(^|\D)0?\.?0(m?s)/gi, (_2, g1, g2) => {
341
- preservedTokens.push("0" + g2);
342
- return g1 + ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___";
343
- });
344
- return f1 + ":" + f2;
345
- });
346
- pattern = /\s*(flex|flex-basis):\s*([^;}]+)/gi;
347
- content = content.replace(pattern, (_, f1, f2) => {
348
- let f2b = f2.split(/\s+/);
349
- preservedTokens.push(f2b.pop());
350
- f2b.push(___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___");
351
- f2b = f2b.join(" ");
352
- return `${f1}:${f2b}`;
353
- });
354
- content = content.replace(/(hsla?)\(([^)]+)\)/g, (_, f1, f2) => {
355
- var f0 = [];
356
- f2.split(",").forEach((part) => {
357
- part = part.replace(/(^\s+|\s+$)/g, "");
358
- if (part === "0%") {
359
- preservedTokens.push("0%");
360
- f0.push(___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___");
361
- } else {
362
- f0.push(part);
363
- }
364
- });
365
- return f1 + "(" + f0.join(",") + ")";
366
- });
367
- content = keyframes(content, preservedTokens);
368
- content = content.replace(/:first-(line|letter)(\{|,)/gi, (_, f1, f2) => ":first-" + f1.toLowerCase() + " " + f2);
369
- if (options.cuteComments) {
370
- content = content.replace(/\s*\/\*/g, "___PRESERVED_NEWLINE___/*");
371
- content = content.replace(/\*\/\s*/g, "*/___PRESERVED_NEWLINE___");
372
- } else {
373
- content = content.replace(/\*\/\s*/g, "*/");
2332
+ return nodeA.type === nodeB.type;
2333
+ }
2334
+ function sameParent(nodeA, nodeB) {
2335
+ if (!nodeA.parent) {
2336
+ return !nodeB.parent;
374
2337
  }
375
- pattern = /^(.*)(@charset)( "[^"]*";)/gi;
376
- content = content.replace(pattern, (_, f1, f2, f3) => f2.toLowerCase() + f3 + f1);
377
- pattern = /^((\s*)(@charset)( [^;]+;\s*))+/gi;
378
- content = content.replace(pattern, (_, __, f2, f3, f4) => f2 + f3.toLowerCase() + f4);
379
- pattern = /@(font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframe|media|page|namespace)/gi;
380
- content = content.replace(pattern, (_, f1) => "@" + f1.toLowerCase());
381
- pattern = /:(active|after|before|checked|disabled|empty|enabled|first-(?:child|of-type)|focus|hover|last-(?:child|of-type)|link|only-(?:child|of-type)|root|:selection|target|visited)/gi;
382
- content = content.replace(pattern, (_, f1) => ":" + f1.toLowerCase());
383
- content = content.replace(/^(.*)(@charset \"[^\"]*\";)/g, "$2$1");
384
- content = content.replace(/^(\s*@charset [^;]+;\s*)+/g, "$1");
385
- pattern = /:(lang|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?any)\(/gi;
386
- content = content.replace(pattern, (_, f1) => ":" + f1.toLowerCase() + "(");
387
- pattern = /([:,\( ]\s*)(attr|color-stop|from|rgba|to|url|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?(?:calc|max|min|(?:repeating-)?(?:linear|radial)-gradient)|-webkit-gradient)/gi;
388
- content = content.replace(pattern, (_, f1, f2) => f1 + f2.toLowerCase());
389
- content = content.replace(/\band\(/gi, "and (");
390
- content = content.replace(/([!{}:;>+\(\[,])\s+/g, "$1");
391
- content = content.replace(/;+\}/g, "}");
392
- content = content.replace(/(^|[^.0-9\\])(?:0?\.)?0(?:ex|ch|r?em|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|g?rad|turn|m?s|k?Hz|dpi|dpcm|dppx|%)/gi, "$10");
393
- content = content.replace(/([0-9])\.0(ex|ch|r?em|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|g?rad|turn|m?s|k?Hz|dpi|dpcm|dppx|%| |;)/gi, "$1$2");
394
- content = content.replace(/:0 0 0 0(;|\})/g, ":0$1");
395
- content = content.replace(/:0 0 0(;|\})/g, ":0$1");
396
- content = content.replace(/:0 0(;|\})/g, ":0$1");
397
- pattern = /(background-position|transform-origin|webkit-transform-origin|moz-transform-origin|o-transform-origin|ms-transform-origin|box-shadow):0(;|\})/gi;
398
- content = content.replace(pattern, (_, f1, f2) => f1.toLowerCase() + ":0 0" + f2);
399
- content = content.replace(/(:|\s)0+\.(\d+)/g, "$1.$2");
400
- pattern = /rgb\s*\(\s*([0-9,\s]+)\s*\)/gi;
401
- content = content.replace(pattern, (_, f1) => {
402
- const rgbcolors = f1.split(",");
403
- let hexcolor = "#";
404
- for (let i = 0; i < rgbcolors.length; i += 1) {
405
- let val = parseInt(rgbcolors[i], 10);
406
- if (val < 16) {
407
- hexcolor += "0";
408
- }
409
- if (val > 255) {
410
- val = 255;
411
- }
412
- hexcolor += val.toString(16);
2338
+ if (!nodeB.parent) {
2339
+ return false;
2340
+ }
2341
+ if (!checkMatch(nodeA.parent, nodeB.parent)) {
2342
+ return false;
2343
+ }
2344
+ return sameParent(nodeA.parent, nodeB.parent);
2345
+ }
2346
+ module2.exports = sameParent;
2347
+ }
2348
+ });
2349
+
2350
+ // node_modules/cssnano-utils/src/index.js
2351
+ var require_src2 = __commonJS({
2352
+ "node_modules/cssnano-utils/src/index.js"(exports2, module2) {
2353
+ "use strict";
2354
+ var rawCache = require_rawCache();
2355
+ var getArguments = require_getArguments();
2356
+ var sameParent = require_sameParent();
2357
+ module2.exports = { rawCache, getArguments, sameParent };
2358
+ }
2359
+ });
2360
+
2361
+ // node_modules/cssnano-preset-default/src/index.js
2362
+ var require_src3 = __commonJS({
2363
+ "node_modules/cssnano-preset-default/src/index.js"(exports2, module2) {
2364
+ "use strict";
2365
+ var cssDeclarationSorter = require_main();
2366
+ var postcssDiscardComments = require("postcss-discard-comments");
2367
+ var postcssReduceInitial = require("postcss-reduce-initial");
2368
+ var postcssMinifyGradients = require("postcss-minify-gradients");
2369
+ var postcssSvgo = require("postcss-svgo");
2370
+ var postcssReduceTransforms = require("postcss-reduce-transforms");
2371
+ var postcssConvertValues = require("postcss-convert-values");
2372
+ var postcssCalc = require("postcss-calc");
2373
+ var postcssColormin = require("postcss-colormin");
2374
+ var postcssOrderedValues = require("postcss-ordered-values");
2375
+ var postcssMinifySelectors = require("postcss-minify-selectors");
2376
+ var postcssMinifyParams = require("postcss-minify-params");
2377
+ var postcssNormalizeCharset = require("postcss-normalize-charset");
2378
+ var postcssMinifyFontValues = require("postcss-minify-font-values");
2379
+ var postcssNormalizeUrl = require("postcss-normalize-url");
2380
+ var postcssMergeLonghand = require("postcss-merge-longhand");
2381
+ var postcssDiscardDuplicates = require("postcss-discard-duplicates");
2382
+ var postcssDiscardOverridden = require("postcss-discard-overridden");
2383
+ var postcssNormalizeRepeatStyle = require("postcss-normalize-repeat-style");
2384
+ var postcssMergeRules = require("postcss-merge-rules");
2385
+ var postcssDiscardEmpty = require("postcss-discard-empty");
2386
+ var postcssUniqueSelectors = require("postcss-unique-selectors");
2387
+ var postcssNormalizeString = require("postcss-normalize-string");
2388
+ var postcssNormalizePositions = require("postcss-normalize-positions");
2389
+ var postcssNormalizeWhitespace = require("postcss-normalize-whitespace");
2390
+ var postcssNormalizeUnicode = require("postcss-normalize-unicode");
2391
+ var postcssNormalizeDisplayValues = require("postcss-normalize-display-values");
2392
+ var postcssNormalizeTimingFunctions = require("postcss-normalize-timing-functions");
2393
+ var { rawCache } = require_src2();
2394
+ function configurePlugins(plugins, opts = {}) {
2395
+ const { overrideBrowserslist, stats, env, path } = opts;
2396
+ const sharedProps = {
2397
+ overrideBrowserslist,
2398
+ stats,
2399
+ env,
2400
+ path
2401
+ };
2402
+ const defaults = {
2403
+ colormin: {
2404
+ ...sharedProps
2405
+ },
2406
+ convertValues: {
2407
+ length: false,
2408
+ ...sharedProps
2409
+ },
2410
+ mergeRules: {
2411
+ ...sharedProps
2412
+ },
2413
+ minifyParams: {
2414
+ ...sharedProps
2415
+ },
2416
+ normalizeCharset: {
2417
+ add: false
2418
+ },
2419
+ normalizeUnicode: {
2420
+ ...sharedProps
2421
+ },
2422
+ reduceInitial: {
2423
+ ...sharedProps
2424
+ },
2425
+ cssDeclarationSorter: {
2426
+ keepOverrides: true
413
2427
  }
414
- return hexcolor;
2428
+ };
2429
+ return plugins.map(([plugin, opt]) => {
2430
+ var _a, _b;
2431
+ const defaultProps = (_a = defaults[opt]) != null ? _a : {};
2432
+ const presetProps = (_b = opts[opt]) != null ? _b : {};
2433
+ return [
2434
+ plugin,
2435
+ presetProps !== false ? { ...defaultProps, ...presetProps } : { exclude: true }
2436
+ ];
415
2437
  });
416
- content = compressHexColors(content);
417
- content = content.replace(/(:|\s)(#f00)(;|})/g, "$1red$3");
418
- content = content.replace(/(:|\s)(#000080)(;|})/g, "$1navy$3");
419
- content = content.replace(/(:|\s)(#808080)(;|})/g, "$1gray$3");
420
- content = content.replace(/(:|\s)(#808000)(;|})/g, "$1olive$3");
421
- content = content.replace(/(:|\s)(#800080)(;|})/g, "$1purple$3");
422
- content = content.replace(/(:|\s)(#c0c0c0)(;|})/g, "$1silver$3");
423
- content = content.replace(/(:|\s)(#008080)(;|})/g, "$1teal$3");
424
- content = content.replace(/(:|\s)(#ffa500)(;|})/g, "$1orange$3");
425
- content = content.replace(/(:|\s)(#800000)(;|})/g, "$1maroon$3");
426
- pattern = /(border|border-top|border-right|border-bottom|border-left|outline|background):none(;|\})/gi;
427
- content = content.replace(pattern, (_, f1, f2) => f1.toLowerCase() + ":0" + f2);
428
- content = content.replace(/progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/gi, "alpha(opacity=");
429
- content = content.replace(/\(([\-A-Za-z]+):([0-9]+)\/([0-9]+)\)/g, "($1:$2___QUERY_FRACTION___$3)");
430
- content = content.replace(/[^\};\{\/]+\{\}/g, "");
431
- content = content.replace(/___QUERY_FRACTION___/g, "/");
432
- if (options.maxLineLen > 0) {
433
- const lines = [];
434
- let line = [];
435
- for (let i = 0, len = content.length; i < len; i += 1) {
436
- let ch = content.charAt(i);
437
- line.push(ch);
438
- if (ch === "}" && line.length > options.maxLineLen) {
439
- lines.push(line.join(""));
440
- line = [];
441
- }
442
- }
443
- if (line.length) {
444
- lines.push(line.join(""));
445
- }
446
- content = lines.join("\n");
2438
+ }
2439
+ function defaultPreset(opts = {}) {
2440
+ return {
2441
+ plugins: configurePlugins(
2442
+ [
2443
+ [postcssDiscardComments, "discardComments"],
2444
+ [postcssMinifyGradients, "minifyGradients"],
2445
+ [postcssReduceInitial, "reduceInitial"],
2446
+ [postcssSvgo, "svgo"],
2447
+ [postcssNormalizeDisplayValues, "normalizeDisplayValues"],
2448
+ [postcssReduceTransforms, "reduceTransforms"],
2449
+ [postcssColormin, "colormin"],
2450
+ [postcssNormalizeTimingFunctions, "normalizeTimingFunctions"],
2451
+ [postcssCalc, "calc"],
2452
+ [postcssConvertValues, "convertValues"],
2453
+ [postcssOrderedValues, "orderedValues"],
2454
+ [postcssMinifySelectors, "minifySelectors"],
2455
+ [postcssMinifyParams, "minifyParams"],
2456
+ [postcssNormalizeCharset, "normalizeCharset"],
2457
+ [postcssDiscardOverridden, "discardOverridden"],
2458
+ [postcssNormalizeString, "normalizeString"],
2459
+ [postcssNormalizeUnicode, "normalizeUnicode"],
2460
+ [postcssMinifyFontValues, "minifyFontValues"],
2461
+ [postcssNormalizeUrl, "normalizeUrl"],
2462
+ [postcssNormalizeRepeatStyle, "normalizeRepeatStyle"],
2463
+ [postcssNormalizePositions, "normalizePositions"],
2464
+ [postcssNormalizeWhitespace, "normalizeWhitespace"],
2465
+ [postcssMergeLonghand, "mergeLonghand"],
2466
+ [postcssDiscardDuplicates, "discardDuplicates"],
2467
+ [postcssMergeRules, "mergeRules"],
2468
+ [postcssDiscardEmpty, "discardEmpty"],
2469
+ [postcssUniqueSelectors, "uniqueSelectors"],
2470
+ [cssDeclarationSorter, "cssDeclarationSorter"],
2471
+ [rawCache, "rawCache"]
2472
+ ],
2473
+ opts
2474
+ )
2475
+ };
2476
+ }
2477
+ module2.exports = defaultPreset;
2478
+ }
2479
+ });
2480
+
2481
+ // node_modules/cssnano/src/index.js
2482
+ var require_src4 = __commonJS({
2483
+ "node_modules/cssnano/src/index.js"(exports2, module2) {
2484
+ "use strict";
2485
+ var path = require("path");
2486
+ var postcss = require("postcss");
2487
+ var { lilconfigSync } = require_src();
2488
+ var cssnano2 = "cssnano";
2489
+ function isResolvable(moduleId) {
2490
+ try {
2491
+ require.resolve(moduleId);
2492
+ return true;
2493
+ } catch (e) {
2494
+ return false;
2495
+ }
2496
+ }
2497
+ function resolvePreset(preset) {
2498
+ let fn, options;
2499
+ if (Array.isArray(preset)) {
2500
+ fn = preset[0];
2501
+ options = preset[1];
2502
+ } else {
2503
+ fn = preset;
2504
+ options = {};
2505
+ }
2506
+ if (fn.plugins) {
2507
+ return fn.plugins;
2508
+ }
2509
+ if (fn === "default") {
2510
+ return require_src3()(options).plugins;
2511
+ }
2512
+ if (typeof fn === "function") {
2513
+ return fn(options).plugins;
2514
+ }
2515
+ if (isResolvable(fn)) {
2516
+ return require(fn)(options).plugins;
447
2517
  }
448
- content = content.replace(/;;+/g, ";");
449
- content = content.replace(/(^\s*|\s*$)/g, "");
450
- for (let i = preservedTokens.length - 1; i >= 0; i--) {
451
- content = content.replace(___PRESERVED_TOKEN_ + i + "___", preservedTokens[i], "g");
2518
+ const sugar = `cssnano-preset-${fn}`;
2519
+ if (isResolvable(sugar)) {
2520
+ return require(sugar)(options).plugins;
452
2521
  }
453
- content = content.replace(/___PRESERVED_NEWLINE___/g, "\n");
454
- return content;
2522
+ throw new Error(
2523
+ `Cannot load preset "${fn}". Please check your configuration for errors and try again.`
2524
+ );
455
2525
  }
456
- function processFiles(filenames = [], options = defaultOptions) {
457
- if (options.convertUrls) {
458
- options.target = resolve(process.cwd(), options.convertUrls).split(PATH_SEP);
2526
+ function resolveConfig(options) {
2527
+ if (options.preset) {
2528
+ return resolvePreset(options.preset);
459
2529
  }
460
- const uglies = [];
461
- filenames.forEach((filename) => {
462
- try {
463
- const content = readFileSync(filename, "utf8");
464
- if (content.length) {
465
- if (options.convertUrls) {
466
- options.source = resolve(process.cwd(), filename).split(PATH_SEP);
467
- options.source.pop();
2530
+ let searchPath = process.cwd();
2531
+ let configPath = void 0;
2532
+ if (options.configFile) {
2533
+ searchPath = void 0;
2534
+ configPath = path.resolve(process.cwd(), options.configFile);
2535
+ }
2536
+ const configExplorer = lilconfigSync(cssnano2, {
2537
+ searchPlaces: [
2538
+ "package.json",
2539
+ ".cssnanorc",
2540
+ ".cssnanorc.json",
2541
+ ".cssnanorc.js",
2542
+ "cssnano.config.js"
2543
+ ]
2544
+ });
2545
+ const config = configPath ? configExplorer.load(configPath) : configExplorer.search(searchPath);
2546
+ if (config === null) {
2547
+ return resolvePreset("default");
2548
+ }
2549
+ return resolvePreset(config.config.preset || config.config);
2550
+ }
2551
+ function cssnanoPlugin(options = {}) {
2552
+ if (Array.isArray(options.plugins)) {
2553
+ if (!options.preset || !options.preset.plugins) {
2554
+ options.preset = { plugins: [] };
2555
+ }
2556
+ options.plugins.forEach((plugin) => {
2557
+ if (Array.isArray(plugin)) {
2558
+ const [pluginDef, opts = {}] = plugin;
2559
+ if (typeof pluginDef === "string" && isResolvable(pluginDef)) {
2560
+ options.preset.plugins.push([require(pluginDef), opts]);
2561
+ } else {
2562
+ options.preset.plugins.push([pluginDef, opts]);
468
2563
  }
469
- uglies.push(processString2(content, options));
470
- }
471
- } catch (e) {
472
- if (options.debug) {
473
- console.error(`uglifycss: unable to process "${filename}"
474
- ${e.stack}`);
2564
+ } else if (typeof plugin === "string" && isResolvable(plugin)) {
2565
+ options.preset.plugins.push([require(plugin), {}]);
475
2566
  } else {
476
- console.error(`uglifycss: unable to process "${filename}"
477
- ${e}`);
2567
+ options.preset.plugins.push([plugin, {}]);
2568
+ }
2569
+ });
2570
+ }
2571
+ const plugins = [];
2572
+ const nanoPlugins = resolveConfig(options);
2573
+ for (const nanoPlugin of nanoPlugins) {
2574
+ if (Array.isArray(nanoPlugin)) {
2575
+ const [processor, opts] = nanoPlugin;
2576
+ if (typeof opts === "undefined" || typeof opts === "object" && !opts.exclude || typeof opts === "boolean" && opts === true) {
2577
+ plugins.push(processor(opts));
478
2578
  }
479
- process.exit(1);
2579
+ } else {
2580
+ plugins.push(nanoPlugin);
480
2581
  }
481
- });
482
- return uglies.join("");
2582
+ }
2583
+ return postcss(plugins);
483
2584
  }
484
- module2.exports = {
485
- defaultOptions,
486
- processString: processString2,
487
- processFiles
488
- };
489
- }
490
- });
491
-
492
- // node_modules/uglifycss/index.js
493
- var require_uglifycss = __commonJS({
494
- "node_modules/uglifycss/index.js"(exports, module2) {
495
- module2.exports = require_uglifycss_lib();
2585
+ cssnanoPlugin.postcss = true;
2586
+ module2.exports = cssnanoPlugin;
496
2587
  }
497
2588
  });
498
2589
 
@@ -502,39 +2593,29 @@ __export(lit_css_exports, {
502
2593
  transform: () => transform
503
2594
  });
504
2595
  module.exports = __toCommonJS(lit_css_exports);
505
-
506
- // node_modules/string-to-template-literal/dist/main.js
507
- var illegalChars = /* @__PURE__ */ new Map();
508
- illegalChars.set("\\", "\\\\");
509
- illegalChars.set("`", "\\`");
510
- illegalChars.set("$", "\\$");
511
- function convert(s) {
512
- if (!s) {
513
- return "``";
514
- }
515
- let res = "";
516
- for (let i = 0; i < s.length; i++) {
517
- const c = s.charAt(i);
518
- res += illegalChars.get(c) || c;
519
- }
520
- return `\`${res}\``;
2596
+ var import_cssnano = __toESM(require_src4(), 1);
2597
+ function stringToTemplateLiteral(x = "") {
2598
+ x = `${x}`;
2599
+ const escaped = x.replace(/\\|`|\$(?={)|(?<=<)\//g, (y) => `\\${y}`);
2600
+ return `\`${escaped}\``;
2601
+ }
2602
+ async function cssnanoify(css, options) {
2603
+ const cssnanoOptions = typeof options === "object" ? options : void 0;
2604
+ const result = await (0, import_cssnano.default)(cssnanoOptions).process(css);
2605
+ return result.css;
521
2606
  }
522
-
523
- // packages/lit-css/lit-css.ts
524
- var import_uglifycss = __toESM(require_uglifycss(), 1);
525
2607
  async function transform({
526
2608
  css: source,
527
2609
  filePath,
528
2610
  specifier = "lit",
529
2611
  tag = "css",
530
- uglify = false,
2612
+ cssnano: cssnano2 = false,
531
2613
  transform: transform2 = (x) => x
532
2614
  }) {
533
2615
  const css = await transform2(source, { filePath });
534
- const uglifyOptions = typeof uglify === "object" ? uglify : void 0;
535
- const cssContent = !uglify ? css : (0, import_uglifycss.processString)(css, uglifyOptions);
2616
+ const cssContent = cssnano2 ? await cssnanoify(css, cssnano2) : css;
536
2617
  return `import {${tag}} from '${specifier}';
537
- export const styles = ${tag}${convert(cssContent)};
2618
+ export const styles = ${tag}${stringToTemplateLiteral(cssContent)};
538
2619
  export default styles;
539
2620
  `;
540
2621
  }
@@ -542,4 +2623,21 @@ export default styles;
542
2623
  0 && (module.exports = {
543
2624
  transform
544
2625
  });
2626
+ /*! Bundled license information:
2627
+
2628
+ cssnano-preset-default/src/index.js:
2629
+ (**
2630
+ * @author Ben Briggs
2631
+ * @license MIT
2632
+ * @module cssnano:preset:default
2633
+ * @overview
2634
+ *
2635
+ * This default preset for cssnano only includes transforms that make no
2636
+ * assumptions about your CSS other than what is passed in. In previous
2637
+ * iterations of cssnano, assumptions were made about your CSS which caused
2638
+ * output to look different in certain use cases, but not others. These
2639
+ * transforms have been moved from the defaults to other presets, to make
2640
+ * this preset require only minimal configuration.
2641
+ *)
2642
+ */
545
2643
  //# sourceMappingURL=lit-css.cjs.map