@jasonshimmy/custom-elements-runtime 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements-runtime.cjs.js +1 -1
- package/dist/custom-elements-runtime.es.js +2 -2
- package/dist/custom-elements-runtime.transitions.cjs.js +1 -1
- package/dist/custom-elements-runtime.transitions.es.js +1 -1
- package/dist/prose.css +1 -0
- package/dist/style.css +1 -1
- package/dist/transitions-BdcSG3zN.cjs +237 -0
- package/dist/transitions-BdcSG3zN.cjs.map +1 -0
- package/dist/{transitions-CbxTVf1F.js → transitions-Cctsmip5.js} +530 -376
- package/dist/transitions-Cctsmip5.js.map +1 -0
- package/dist/variables.css +1 -1
- package/package.json +3 -2
- package/dist/transitions-BO7bCYYx.cjs +0 -119
- package/dist/transitions-BO7bCYYx.cjs.map +0 -1
- package/dist/transitions-CbxTVf1F.js.map +0 -1
|
@@ -1,21 +1,140 @@
|
|
|
1
|
-
import { anchorBlock as
|
|
2
|
-
|
|
1
|
+
import { anchorBlock as ve } from "./custom-elements-runtime.directives.es.js";
|
|
2
|
+
const we = `/*
|
|
3
|
+
* Custom Elements Variables CSS
|
|
4
|
+
* CSS variables for colors and fonts
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:root,
|
|
8
|
+
:host {
|
|
9
|
+
/* Font families (match runtime defaults in src/lib/runtime/style.ts) */
|
|
10
|
+
--cer-font-sans:
|
|
11
|
+
ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
|
|
12
|
+
'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
|
|
13
|
+
--cer-font-serif: ui-serif, Georgia, 'Times New Roman', Times, serif;
|
|
14
|
+
--cer-font-mono:
|
|
15
|
+
ui-monospace, 'SFMono-Regular', Menlo, Monaco, 'Roboto Mono', 'Courier New',
|
|
16
|
+
monospace;
|
|
17
|
+
|
|
18
|
+
/* Default outline style */
|
|
19
|
+
--cer-outline-style: solid;
|
|
20
|
+
|
|
21
|
+
/* Colors */
|
|
22
|
+
--cer-color-transparent: transparent;
|
|
23
|
+
--cer-color-current: currentColor;
|
|
24
|
+
--cer-color-black: #000000;
|
|
25
|
+
--cer-color-white: #ffffff;
|
|
26
|
+
--cer-color-inherit: inherit;
|
|
27
|
+
|
|
28
|
+
/* neutral */
|
|
29
|
+
--cer-color-neutral-50: #fafafa;
|
|
30
|
+
--cer-color-neutral-100: #f4f4f5;
|
|
31
|
+
--cer-color-neutral-200: #e4e4e7;
|
|
32
|
+
--cer-color-neutral-300: #d4d4d8;
|
|
33
|
+
--cer-color-neutral-400: #9f9fa9;
|
|
34
|
+
--cer-color-neutral-500: #71717b;
|
|
35
|
+
--cer-color-neutral-600: #52525c;
|
|
36
|
+
--cer-color-neutral-700: #3f3f46;
|
|
37
|
+
--cer-color-neutral-800: #27272a;
|
|
38
|
+
--cer-color-neutral-900: #18181b;
|
|
39
|
+
--cer-color-neutral-950: #09090b;
|
|
40
|
+
|
|
41
|
+
/* primary */
|
|
42
|
+
--cer-color-primary-50: #eff6ff;
|
|
43
|
+
--cer-color-primary-100: #dbeafe;
|
|
44
|
+
--cer-color-primary-200: #bfdbfe;
|
|
45
|
+
--cer-color-primary-300: #93c5fd;
|
|
46
|
+
--cer-color-primary-400: #60a5fa;
|
|
47
|
+
--cer-color-primary-500: #3b82f6;
|
|
48
|
+
--cer-color-primary-600: #2563eb;
|
|
49
|
+
--cer-color-primary-700: #1d4ed8;
|
|
50
|
+
--cer-color-primary-800: #1e40af;
|
|
51
|
+
--cer-color-primary-900: #1e3a8a;
|
|
52
|
+
--cer-color-primary-950: #172554;
|
|
53
|
+
|
|
54
|
+
/* secondary */
|
|
55
|
+
--cer-color-secondary-50: #eef2ff;
|
|
56
|
+
--cer-color-secondary-100: #e0e7ff;
|
|
57
|
+
--cer-color-secondary-200: #c7d2fe;
|
|
58
|
+
--cer-color-secondary-300: #a5b4fc;
|
|
59
|
+
--cer-color-secondary-400: #818cf8;
|
|
60
|
+
--cer-color-secondary-500: #6366f1;
|
|
61
|
+
--cer-color-secondary-600: #4f46e5;
|
|
62
|
+
--cer-color-secondary-700: #4338ca;
|
|
63
|
+
--cer-color-secondary-800: #3730a3;
|
|
64
|
+
--cer-color-secondary-900: #312e81;
|
|
65
|
+
--cer-color-secondary-950: #1e1b4b;
|
|
66
|
+
|
|
67
|
+
/* success */
|
|
68
|
+
--cer-color-success-50: #f0fdf4;
|
|
69
|
+
--cer-color-success-100: #dcfce7;
|
|
70
|
+
--cer-color-success-200: #bbf7d0;
|
|
71
|
+
--cer-color-success-300: #86efac;
|
|
72
|
+
--cer-color-success-400: #4ade80;
|
|
73
|
+
--cer-color-success-500: #22c55e;
|
|
74
|
+
--cer-color-success-600: #16a34a;
|
|
75
|
+
--cer-color-success-700: #15803d;
|
|
76
|
+
--cer-color-success-800: #166534;
|
|
77
|
+
--cer-color-success-900: #14532d;
|
|
78
|
+
--cer-color-success-950: #052e16;
|
|
79
|
+
|
|
80
|
+
/* info */
|
|
81
|
+
--cer-color-info-50: #f0f9ff;
|
|
82
|
+
--cer-color-info-100: #e0f2fe;
|
|
83
|
+
--cer-color-info-200: #bae6fd;
|
|
84
|
+
--cer-color-info-300: #7dd3fc;
|
|
85
|
+
--cer-color-info-400: #38bdf8;
|
|
86
|
+
--cer-color-info-500: #0ea5e9;
|
|
87
|
+
--cer-color-info-600: #0284c7;
|
|
88
|
+
--cer-color-info-700: #0369a1;
|
|
89
|
+
--cer-color-info-800: #075985;
|
|
90
|
+
--cer-color-info-900: #0c4a6e;
|
|
91
|
+
--cer-color-info-950: #082f49;
|
|
92
|
+
|
|
93
|
+
/* warning */
|
|
94
|
+
--cer-color-warning-50: #fffbeb;
|
|
95
|
+
--cer-color-warning-100: #fef3c7;
|
|
96
|
+
--cer-color-warning-200: #fde68a;
|
|
97
|
+
--cer-color-warning-300: #fcd34d;
|
|
98
|
+
--cer-color-warning-400: #fbbf24;
|
|
99
|
+
--cer-color-warning-500: #f59e0b;
|
|
100
|
+
--cer-color-warning-600: #d97706;
|
|
101
|
+
--cer-color-warning-700: #b45309;
|
|
102
|
+
--cer-color-warning-800: #92400e;
|
|
103
|
+
--cer-color-warning-900: #78350f;
|
|
104
|
+
--cer-color-warning-950: #451a03;
|
|
105
|
+
|
|
106
|
+
/* error */
|
|
107
|
+
--cer-color-error-50: #fef2f2;
|
|
108
|
+
--cer-color-error-100: #fee2e2;
|
|
109
|
+
--cer-color-error-200: #fecaca;
|
|
110
|
+
--cer-color-error-300: #fca5a5;
|
|
111
|
+
--cer-color-error-400: #f87171;
|
|
112
|
+
--cer-color-error-500: #ef4444;
|
|
113
|
+
--cer-color-error-600: #dc2626;
|
|
114
|
+
--cer-color-error-700: #b91c1c;
|
|
115
|
+
--cer-color-error-800: #991b1b;
|
|
116
|
+
--cer-color-error-900: #7f1d1d;
|
|
117
|
+
--cer-color-error-950: #450a0a;
|
|
118
|
+
}
|
|
119
|
+
`;
|
|
120
|
+
function $e(e, ...r) {
|
|
3
121
|
let o = "";
|
|
4
|
-
for (let
|
|
5
|
-
o += e[
|
|
122
|
+
for (let n = 0; n < e.length; n++)
|
|
123
|
+
o += e[n], n < r.length && (o += r[n]);
|
|
6
124
|
return o;
|
|
7
125
|
}
|
|
8
|
-
function
|
|
126
|
+
function ye(e) {
|
|
9
127
|
return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
|
|
10
128
|
}
|
|
11
|
-
let
|
|
12
|
-
function
|
|
13
|
-
return
|
|
129
|
+
let X = null;
|
|
130
|
+
function Ie() {
|
|
131
|
+
return X || (X = new CSSStyleSheet(), X.replaceSync(ye(ke))), X;
|
|
14
132
|
}
|
|
15
133
|
function De(e) {
|
|
16
134
|
return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
|
|
17
135
|
}
|
|
18
|
-
const
|
|
136
|
+
const ke = $e`
|
|
137
|
+
${we}
|
|
19
138
|
:host,
|
|
20
139
|
*,
|
|
21
140
|
::before,
|
|
@@ -132,7 +251,7 @@ const we = xe`
|
|
|
132
251
|
[hidden] {
|
|
133
252
|
display: none;
|
|
134
253
|
}
|
|
135
|
-
`,
|
|
254
|
+
`, je = {
|
|
136
255
|
// Existing semantic colors
|
|
137
256
|
neutral: {
|
|
138
257
|
50: "#fafafa",
|
|
@@ -230,17 +349,17 @@ const we = xe`
|
|
|
230
349
|
black: { DEFAULT: "#000000" },
|
|
231
350
|
transparent: { DEFAULT: "transparent" },
|
|
232
351
|
current: { DEFAULT: "currentColor" }
|
|
233
|
-
},
|
|
234
|
-
Object.entries(
|
|
352
|
+
}, be = Object.fromEntries(
|
|
353
|
+
Object.entries(je).map(([e, r]) => [
|
|
235
354
|
e,
|
|
236
355
|
Object.fromEntries(
|
|
237
|
-
Object.entries(r).map(([o,
|
|
356
|
+
Object.entries(r).map(([o, n]) => [
|
|
238
357
|
o,
|
|
239
|
-
`var(--cer-color-${e}${o === "DEFAULT" ? "" : `-${o}`}, ${
|
|
358
|
+
`var(--cer-color-${e}${o === "DEFAULT" ? "" : `-${o}`}, ${n})`
|
|
240
359
|
])
|
|
241
360
|
)
|
|
242
361
|
])
|
|
243
|
-
),
|
|
362
|
+
), I = "0.25rem", Se = {
|
|
244
363
|
"3xs": 64,
|
|
245
364
|
"2xs": 72,
|
|
246
365
|
xs: 80,
|
|
@@ -285,7 +404,7 @@ const we = xe`
|
|
|
285
404
|
gap: ["gap"],
|
|
286
405
|
"gap-x": ["column-gap"],
|
|
287
406
|
"gap-y": ["row-gap"]
|
|
288
|
-
},
|
|
407
|
+
}, Te = () => {
|
|
289
408
|
const e = {};
|
|
290
409
|
e["@container"] = "container-type:inline-size;", [
|
|
291
410
|
"block",
|
|
@@ -409,8 +528,8 @@ const we = xe`
|
|
|
409
528
|
["text-7xl", "4.5rem", "1"],
|
|
410
529
|
["text-8xl", "6rem", "1"],
|
|
411
530
|
["text-9xl", "8rem", "1"]
|
|
412
|
-
].forEach(([t, a,
|
|
413
|
-
e[t] = `font-size:${a};line-height:var(--cer-line-height,${
|
|
531
|
+
].forEach(([t, a, d]) => {
|
|
532
|
+
e[t] = `font-size:${a};line-height:var(--cer-line-height,${d});`;
|
|
414
533
|
}), [
|
|
415
534
|
["tracking-tighter", "-0.05em"],
|
|
416
535
|
["tracking-tight", "-0.025em"],
|
|
@@ -438,8 +557,8 @@ const we = xe`
|
|
|
438
557
|
].forEach(([t, a]) => {
|
|
439
558
|
e[t] = `line-height:${a};--cer-line-height:${a};line-height:var(--cer-line-height,${a});`;
|
|
440
559
|
});
|
|
441
|
-
const
|
|
442
|
-
for (const t of
|
|
560
|
+
const s = [0, 1, 2, 4, 6, 8];
|
|
561
|
+
for (const t of s) {
|
|
443
562
|
const a = `${t}px`;
|
|
444
563
|
e[`outline-${t}`] = `outline-style:var(--cer-outline-style);outline-width:${a};`, e[`outline-offset-${t}`] = `outline-offset:${a};`, e[`border-${t}`] = `border-width:${a};`, e[`border-t-${t}`] = `border-top-width:${a};`, e[`border-r-${t}`] = `border-right-width:${a};`, e[`border-b-${t}`] = `border-bottom-width:${a};`, e[`border-l-${t}`] = `border-left-width:${a};`, e[`border-x-${t}`] = `border-left-width:${a};border-right-width:${a};`, e[`border-y-${t}`] = `border-top-width:${a};border-bottom-width:${a};`;
|
|
445
564
|
}
|
|
@@ -480,8 +599,8 @@ const we = xe`
|
|
|
480
599
|
full: 9999
|
|
481
600
|
};
|
|
482
601
|
for (const [t, a] of Object.entries(u)) {
|
|
483
|
-
const
|
|
484
|
-
e[`rounded-${t}`] = `border-radius:${
|
|
602
|
+
const d = a === 9999 ? "9999px" : `${a / 16}rem`;
|
|
603
|
+
e[`rounded-${t}`] = `border-radius:${d};`, e[`rounded-t-${t}`] = `border-top-left-radius:${d};border-top-right-radius:${d};`, e[`rounded-r-${t}`] = `border-top-right-radius:${d};border-bottom-right-radius:${d};`, e[`rounded-b-${t}`] = `border-bottom-left-radius:${d};border-bottom-right-radius:${d};`, e[`rounded-l-${t}`] = `border-top-left-radius:${d};border-bottom-left-radius:${d};`, e[`rounded-tl-${t}`] = `border-top-left-radius:${d};`, e[`rounded-tr-${t}`] = `border-top-right-radius:${d};`, e[`rounded-br-${t}`] = `border-bottom-right-radius:${d};`, e[`rounded-bl-${t}`] = `border-bottom-left-radius:${d};`;
|
|
485
604
|
}
|
|
486
605
|
Object.assign(e, {
|
|
487
606
|
"shadow-none": "--cer-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--cer-shadow-color, #0000);",
|
|
@@ -509,7 +628,7 @@ const we = xe`
|
|
|
509
628
|
"overflow-y-visible": "overflow-y:visible;",
|
|
510
629
|
"overflow-y-scroll": "overflow-y:scroll;"
|
|
511
630
|
});
|
|
512
|
-
const
|
|
631
|
+
const m = [
|
|
513
632
|
"auto",
|
|
514
633
|
"default",
|
|
515
634
|
"pointer",
|
|
@@ -521,7 +640,7 @@ const we = xe`
|
|
|
521
640
|
"grab",
|
|
522
641
|
"grabbing"
|
|
523
642
|
];
|
|
524
|
-
for (const t of
|
|
643
|
+
for (const t of m) e[`cursor-${t}`] = `cursor:${t};`;
|
|
525
644
|
for (const t of [0, 10, 20, 30, 40, 50]) e[`z-${t}`] = `z-index:${t};`;
|
|
526
645
|
Object.assign(e, {
|
|
527
646
|
"sr-only": "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;",
|
|
@@ -557,8 +676,8 @@ const we = xe`
|
|
|
557
676
|
"mx-auto": "margin-inline:auto;",
|
|
558
677
|
"my-auto": "margin-block:auto;"
|
|
559
678
|
});
|
|
560
|
-
for (const [t, a] of Object.entries(
|
|
561
|
-
e[`max-w-${t}`] = `max-width:calc(${
|
|
679
|
+
for (const [t, a] of Object.entries(Se))
|
|
680
|
+
e[`max-w-${t}`] = `max-width:calc(${I} * ${a});`, e[`min-w-${t}`] = `min-width:calc(${I} * ${a});`, e[`w-${t}`] = `width:calc(${I} * ${a});`, e[`max-h-${t}`] = `max-height:calc(${I} * ${a});`, e[`min-h-${t}`] = `min-height:calc(${I} * ${a});`, e[`h-${t}`] = `height:calc(${I} * ${a});`;
|
|
562
681
|
Object.assign(e, {
|
|
563
682
|
transition: "transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;",
|
|
564
683
|
"transition-none": "transition-property:none;",
|
|
@@ -675,33 +794,33 @@ const we = xe`
|
|
|
675
794
|
"bg-conic-at-l": "background-image:conic-gradient(from 0deg at left, var(--cer-gradient-stops));",
|
|
676
795
|
"bg-conic-at-tl": "background-image:conic-gradient(from 0deg at top left, var(--cer-gradient-stops));"
|
|
677
796
|
}), e;
|
|
678
|
-
}, re =
|
|
679
|
-
function
|
|
797
|
+
}, re = Te();
|
|
798
|
+
function M(e, r) {
|
|
680
799
|
let o = 0;
|
|
681
|
-
for (let
|
|
682
|
-
const
|
|
683
|
-
if (
|
|
684
|
-
else if ((
|
|
685
|
-
else if (o === 0 && (
|
|
686
|
-
return e.slice(0,
|
|
800
|
+
for (let n = 0; n < e.length; n++) {
|
|
801
|
+
const c = e[n];
|
|
802
|
+
if (c === "[" || c === "(") o++;
|
|
803
|
+
else if ((c === "]" || c === ")") && o > 0) o--;
|
|
804
|
+
else if (o === 0 && (c === ">" || c === "+" || c === "~" || c === " "))
|
|
805
|
+
return e.slice(0, n) + r + e.slice(n);
|
|
687
806
|
}
|
|
688
807
|
return e + r;
|
|
689
808
|
}
|
|
690
|
-
const
|
|
809
|
+
const Ae = {
|
|
691
810
|
before: (e, r) => `${e}::before{${r}}`,
|
|
692
811
|
after: (e, r) => `${e}::after{${r}}`,
|
|
693
|
-
hover: (e, r) => `${
|
|
694
|
-
focus: (e, r) => `${
|
|
695
|
-
active: (e, r) => `${
|
|
696
|
-
disabled: (e, r) => `${
|
|
697
|
-
visited: (e, r) => `${
|
|
698
|
-
checked: (e, r) => `${
|
|
699
|
-
first: (e, r) => `${
|
|
700
|
-
last: (e, r) => `${
|
|
701
|
-
odd: (e, r) => `${
|
|
702
|
-
even: (e, r) => `${
|
|
703
|
-
"focus-within": (e, r) => `${
|
|
704
|
-
"focus-visible": (e, r) => `${
|
|
812
|
+
hover: (e, r) => `${M(e, ":hover")}{${r}}`,
|
|
813
|
+
focus: (e, r) => `${M(e, ":focus")}{${r}}`,
|
|
814
|
+
active: (e, r) => `${M(e, ":active")}{${r}}`,
|
|
815
|
+
disabled: (e, r) => `${M(e, ":disabled")}{${r}}`,
|
|
816
|
+
visited: (e, r) => `${M(e, ":visited")}{${r}}`,
|
|
817
|
+
checked: (e, r) => `${M(e, ":checked")}{${r}}`,
|
|
818
|
+
first: (e, r) => `${M(e, ":first-child")}{${r}}`,
|
|
819
|
+
last: (e, r) => `${M(e, ":last-child")}{${r}}`,
|
|
820
|
+
odd: (e, r) => `${M(e, ":nth-child(odd)")}{${r}}`,
|
|
821
|
+
even: (e, r) => `${M(e, ":nth-child(even)")}{${r}}`,
|
|
822
|
+
"focus-within": (e, r) => `${M(e, ":focus-within")}{${r}}`,
|
|
823
|
+
"focus-visible": (e, r) => `${M(e, ":focus-visible")}{${r}}`,
|
|
705
824
|
"group-hover": (e, r) => `.group:hover ${e}{${r}}`,
|
|
706
825
|
"group-focus": (e, r) => `.group:focus ${e}{${r}}`,
|
|
707
826
|
"group-active": (e, r) => `.group:active ${e}{${r}}`,
|
|
@@ -729,7 +848,7 @@ const je = {
|
|
|
729
848
|
"5xl": "(min-width:64rem)",
|
|
730
849
|
"6xl": "(min-width:72rem)",
|
|
731
850
|
"7xl": "(min-width:80rem)"
|
|
732
|
-
},
|
|
851
|
+
}, ne = ["sm", "md", "lg", "xl", "2xl"], ie = [
|
|
733
852
|
"xs",
|
|
734
853
|
"sm",
|
|
735
854
|
"md",
|
|
@@ -743,45 +862,47 @@ const je = {
|
|
|
743
862
|
"7xl"
|
|
744
863
|
];
|
|
745
864
|
function ae(e) {
|
|
746
|
-
const r = e.startsWith("-"), o = r ? e.slice(1) : e,
|
|
747
|
-
if (
|
|
748
|
-
const
|
|
749
|
-
if (!te[
|
|
750
|
-
if (
|
|
751
|
-
const [t, a] =
|
|
865
|
+
const r = e.startsWith("-"), o = r ? e.slice(1) : e, n = o.lastIndexOf("-");
|
|
866
|
+
if (n === -1) return null;
|
|
867
|
+
const c = o.slice(0, n), s = o.slice(n + 1);
|
|
868
|
+
if (!te[c]) return null;
|
|
869
|
+
if (s.includes("/")) {
|
|
870
|
+
const [t, a] = s.split("/").map((y) => parseFloat(y));
|
|
752
871
|
if (Number.isNaN(t) || Number.isNaN(a) || a === 0)
|
|
753
872
|
return null;
|
|
754
|
-
const
|
|
755
|
-
return te[
|
|
873
|
+
const d = t / a * 100;
|
|
874
|
+
return te[c].map((y) => `${y}:${d}%;`).join("");
|
|
756
875
|
}
|
|
757
|
-
const u = parseFloat(
|
|
876
|
+
const u = parseFloat(s);
|
|
758
877
|
if (Number.isNaN(u)) return null;
|
|
759
|
-
const
|
|
760
|
-
return te[
|
|
878
|
+
const m = r ? "-" : "";
|
|
879
|
+
return te[c].map((t) => `${t}:calc(${m}${I} * ${u});`).join("");
|
|
761
880
|
}
|
|
762
|
-
function
|
|
763
|
-
const r = e.startsWith("-"),
|
|
764
|
-
if (!
|
|
765
|
-
const [,
|
|
766
|
-
if (
|
|
881
|
+
function ce(e) {
|
|
882
|
+
const r = e.startsWith("-"), n = (r ? e.slice(1) : e).match(/^space-(x|y)-(.+)$/);
|
|
883
|
+
if (!n) return null;
|
|
884
|
+
const [, c, s] = n, u = c === "x";
|
|
885
|
+
if (s === "reverse")
|
|
767
886
|
return u ? "--cer-space-x-reverse:1;" : "--cer-space-y-reverse:1;";
|
|
768
|
-
if (
|
|
769
|
-
const [
|
|
770
|
-
if (Number.isNaN(
|
|
887
|
+
if (s.includes("/")) {
|
|
888
|
+
const [d, y] = s.split("/").map((C) => parseFloat(C));
|
|
889
|
+
if (Number.isNaN(d) || Number.isNaN(y) || y === 0)
|
|
771
890
|
return null;
|
|
772
|
-
const
|
|
773
|
-
return u ? `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${
|
|
891
|
+
const v = d / y * 100, A = r ? "-" : "";
|
|
892
|
+
return u ? `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${A}${v}% * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${A}${v}% * var(--cer-space-x-reverse));}` : `--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${A}${v}% * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${A}${v}% * var(--cer-space-y-reverse));}`;
|
|
774
893
|
}
|
|
775
|
-
const
|
|
776
|
-
if (Number.isNaN(
|
|
777
|
-
const a = `calc(${r ? "-" : ""}${
|
|
894
|
+
const m = parseFloat(s);
|
|
895
|
+
if (Number.isNaN(m)) return null;
|
|
896
|
+
const a = `calc(${r ? "-" : ""}${I} * ${m})`;
|
|
778
897
|
return u ? `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${a} * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${a} * var(--cer-space-x-reverse));}` : `--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${a} * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${a} * var(--cer-space-y-reverse));}`;
|
|
779
898
|
}
|
|
780
|
-
function
|
|
781
|
-
|
|
899
|
+
function q(e) {
|
|
900
|
+
let r = e.replace("#", "");
|
|
901
|
+
r.length === 3 && (r = r.split("").map((n) => n + n).join(""));
|
|
902
|
+
const o = parseInt(r, 16);
|
|
782
903
|
return `${o >> 16 & 255} ${o >> 8 & 255} ${o & 255}`;
|
|
783
904
|
}
|
|
784
|
-
const
|
|
905
|
+
const Ce = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Fe = {
|
|
785
906
|
bg: "background-color",
|
|
786
907
|
decoration: "text-decoration-color",
|
|
787
908
|
text: "color",
|
|
@@ -792,56 +913,89 @@ const Te = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)
|
|
|
792
913
|
fill: "fill",
|
|
793
914
|
stroke: "stroke"
|
|
794
915
|
};
|
|
795
|
-
function
|
|
796
|
-
const r =
|
|
916
|
+
function Oe(e) {
|
|
917
|
+
const r = Ce.exec(e);
|
|
797
918
|
if (!r) return null;
|
|
798
|
-
const [, o,
|
|
799
|
-
if (!
|
|
800
|
-
if (o === "shadow") return `--cer-shadow-color:${
|
|
801
|
-
const u =
|
|
802
|
-
return u ? `${u}:${
|
|
919
|
+
const [, o, n, c = "DEFAULT"] = r, s = be[n]?.[c];
|
|
920
|
+
if (!s) return null;
|
|
921
|
+
if (o === "shadow") return `--cer-shadow-color:${s};`;
|
|
922
|
+
const u = Fe[o];
|
|
923
|
+
return u ? `${u}:${s};` : null;
|
|
803
924
|
}
|
|
804
|
-
function
|
|
925
|
+
function Ee(e) {
|
|
805
926
|
const r = e.indexOf("/");
|
|
806
927
|
if (r === -1) return { base: e };
|
|
807
|
-
const o = e.slice(0, r),
|
|
808
|
-
return isNaN(
|
|
928
|
+
const o = e.slice(0, r), n = e.slice(r + 1), c = parseInt(n, 10);
|
|
929
|
+
return isNaN(c) || c < 0 || c > 100 ? { base: o } : { base: o, opacity: c / 100 };
|
|
809
930
|
}
|
|
810
|
-
function
|
|
811
|
-
const { base: r, opacity: o } =
|
|
812
|
-
if (
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
931
|
+
function se(e) {
|
|
932
|
+
const { base: r, opacity: o } = Ee(e), n = Oe(r);
|
|
933
|
+
if (n) {
|
|
934
|
+
if (o !== void 0) {
|
|
935
|
+
if (n.includes("var(")) {
|
|
936
|
+
const u = /var\([^)]*\)/.exec(n);
|
|
937
|
+
if (u) {
|
|
938
|
+
const m = u[0], t = o * 100, a = `color-mix(in srgb, ${m} ${t}%, rgba(0 0 0 / 0) ${100 - t}%)`, d = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(m), y = /^([a-z-]+):/.exec(n), v = y ? y[1] : "background-color";
|
|
939
|
+
if (d) {
|
|
940
|
+
const C = `rgb(${q(d[0])} / ${o})`, f = m.replace(
|
|
941
|
+
/#([0-9a-f]{6}|[0-9a-f]{3})/i,
|
|
942
|
+
C
|
|
943
|
+
);
|
|
944
|
+
return `${v}:${f};__CE_COLOR_MIX_SPLIT__${v}:${a};`;
|
|
945
|
+
}
|
|
946
|
+
return `${v}:${a};`;
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
const s = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(n);
|
|
950
|
+
if (s) {
|
|
951
|
+
const u = q(s[0]);
|
|
952
|
+
return n.replace(
|
|
953
|
+
/#([0-9a-f]{6}|[0-9a-f]{3})/i,
|
|
954
|
+
`rgb(${u} / ${o})`
|
|
955
|
+
);
|
|
956
|
+
}
|
|
817
957
|
}
|
|
958
|
+
return n;
|
|
818
959
|
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
960
|
+
const c = Z(r);
|
|
961
|
+
if (c && o !== void 0) {
|
|
962
|
+
if (c.includes("var(")) {
|
|
963
|
+
const u = /var\([^)]*\)/.exec(c);
|
|
964
|
+
if (u) {
|
|
965
|
+
const m = u[0], t = o * 100, a = `color-mix(in srgb, ${m} ${t}%, rgba(0 0 0 / 0) ${100 - t}%)`, d = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(m), y = /^([a-z-]+):/.exec(c), v = y ? y[1] : null;
|
|
966
|
+
if (d && v) {
|
|
967
|
+
const C = `rgb(${q(d[0])} / ${o})`, f = m.replace(
|
|
968
|
+
/#([0-9a-f]{6}|[0-9a-f]{3})/i,
|
|
969
|
+
C
|
|
970
|
+
);
|
|
971
|
+
return `${v}:${f};__CE_COLOR_MIX_SPLIT__${v}:${a};`;
|
|
972
|
+
}
|
|
973
|
+
return c.replace(m, a);
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
const s = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(c);
|
|
977
|
+
if (s) {
|
|
978
|
+
const u = q(s[0]);
|
|
979
|
+
return c.replace(
|
|
980
|
+
/#([0-9a-f]{6}|[0-9a-f]{3})/i,
|
|
827
981
|
`rgb(${u} / ${o})`
|
|
828
982
|
);
|
|
829
983
|
}
|
|
830
984
|
}
|
|
831
|
-
return
|
|
985
|
+
return c;
|
|
832
986
|
}
|
|
833
|
-
function
|
|
987
|
+
function le(e) {
|
|
834
988
|
const r = /^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
|
|
835
989
|
if (!r) return null;
|
|
836
|
-
const [, o,
|
|
837
|
-
if (!
|
|
990
|
+
const [, o, n, c = "DEFAULT"] = r, s = be[n]?.[c];
|
|
991
|
+
if (!s) return null;
|
|
838
992
|
switch (o) {
|
|
839
993
|
case "from":
|
|
840
|
-
return `--cer-gradient-from:${
|
|
994
|
+
return `--cer-gradient-from:${s} var(--cer-gradient-from-position);--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), var(--cer-gradient-to);`;
|
|
841
995
|
case "to":
|
|
842
|
-
return `--cer-gradient-to:${
|
|
996
|
+
return `--cer-gradient-to:${s} var(--cer-gradient-to-position);`;
|
|
843
997
|
case "via":
|
|
844
|
-
return `--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), ${
|
|
998
|
+
return `--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), ${s} var(--cer-gradient-via-position), var(--cer-gradient-to);`;
|
|
845
999
|
default:
|
|
846
1000
|
return null;
|
|
847
1001
|
}
|
|
@@ -852,17 +1006,17 @@ function de(e) {
|
|
|
852
1006
|
const o = parseInt(r[1], 10);
|
|
853
1007
|
return o < 0 || o > 100 ? null : `opacity:${o / 100};`;
|
|
854
1008
|
}
|
|
855
|
-
function
|
|
1009
|
+
function Z(e) {
|
|
856
1010
|
if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
|
|
857
|
-
const u = e.slice(1, -1).trim(),
|
|
858
|
-
if (
|
|
859
|
-
const t = u.slice(0,
|
|
860
|
-
let a = u.slice(
|
|
1011
|
+
const u = e.slice(1, -1).trim(), m = u.indexOf(":");
|
|
1012
|
+
if (m === -1) return null;
|
|
1013
|
+
const t = u.slice(0, m).trim();
|
|
1014
|
+
let a = u.slice(m + 1).trim();
|
|
861
1015
|
return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(t) ? (a = a.replace(/_/g, " "), a = a.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), a = a.replace(/^'([^']*)'$/g, '"$1"'), `${t}:${a};`) : null;
|
|
862
1016
|
}
|
|
863
1017
|
const r = e.indexOf("-[");
|
|
864
1018
|
if (r <= 0 || !e.endsWith("]")) return null;
|
|
865
|
-
const o = e.slice(0, r),
|
|
1019
|
+
const o = e.slice(0, r), n = e.slice(r + 2, -1).replace(/_/g, " "), c = {
|
|
866
1020
|
bg: "background-color",
|
|
867
1021
|
shadow: "box-shadow",
|
|
868
1022
|
p: "padding",
|
|
@@ -903,15 +1057,15 @@ function Q(e) {
|
|
|
903
1057
|
opacity: "opacity"
|
|
904
1058
|
};
|
|
905
1059
|
if (o === "text")
|
|
906
|
-
return /^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(
|
|
907
|
-
if (o === "rotate") return `transform:rotate(${
|
|
908
|
-
if (o === "scale") return `transform:scale(${
|
|
909
|
-
if (o === "translate-x") return `transform:translateX(${
|
|
910
|
-
if (o === "translate-y") return `transform:translateY(${
|
|
911
|
-
const
|
|
912
|
-
return
|
|
1060
|
+
return /^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(n) ? `font-size:${n};` : `color:${n};`;
|
|
1061
|
+
if (o === "rotate") return `transform:rotate(${n});`;
|
|
1062
|
+
if (o === "scale") return `transform:scale(${n});`;
|
|
1063
|
+
if (o === "translate-x") return `transform:translateX(${n});`;
|
|
1064
|
+
if (o === "translate-y") return `transform:translateY(${n});`;
|
|
1065
|
+
const s = c[o] ?? o.replace(/_/g, "-");
|
|
1066
|
+
return s && n ? `${s}:${n};` : null;
|
|
913
1067
|
}
|
|
914
|
-
function
|
|
1068
|
+
function _e(e) {
|
|
915
1069
|
if (e.startsWith("[") && e.endsWith("]")) {
|
|
916
1070
|
const o = e.slice(1, -1);
|
|
917
1071
|
return o.includes("&") ? o : e;
|
|
@@ -926,41 +1080,41 @@ function Ce(e) {
|
|
|
926
1080
|
function pe(e) {
|
|
927
1081
|
return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
|
|
928
1082
|
}
|
|
929
|
-
function
|
|
1083
|
+
function ze(e) {
|
|
930
1084
|
const r = /class\s*=\s*(['"])([\s\S]*?)\1/g, o = [];
|
|
931
|
-
let
|
|
932
|
-
for (;
|
|
933
|
-
const
|
|
934
|
-
|
|
1085
|
+
let n;
|
|
1086
|
+
for (; n = r.exec(e); ) {
|
|
1087
|
+
const c = n[2].split(/\s+/).filter(Boolean);
|
|
1088
|
+
c.length && o.push(...c);
|
|
935
1089
|
}
|
|
936
1090
|
return o;
|
|
937
1091
|
}
|
|
938
|
-
const
|
|
939
|
-
function
|
|
940
|
-
const r = Date.now(), o =
|
|
941
|
-
if (o && r - o.timestamp <
|
|
1092
|
+
const H = /* @__PURE__ */ new Map(), Re = 16, me = 1e3;
|
|
1093
|
+
function Le(e) {
|
|
1094
|
+
const r = Date.now(), o = H.get(e);
|
|
1095
|
+
if (o && r - o.timestamp < Re)
|
|
942
1096
|
return o.css;
|
|
943
|
-
const
|
|
944
|
-
if (!
|
|
945
|
-
const
|
|
946
|
-
const
|
|
947
|
-
if (
|
|
948
|
-
const
|
|
949
|
-
return u[
|
|
1097
|
+
const n = ze(e);
|
|
1098
|
+
if (!n.length) return "";
|
|
1099
|
+
const c = new Set(n), s = [[], [], [], []], u = {}, m = (f, p = !1) => {
|
|
1100
|
+
const g = p ? `dark|${f}` : f;
|
|
1101
|
+
if (g in u) return u[g];
|
|
1102
|
+
const b = y(f, p);
|
|
1103
|
+
return u[g] = b, b;
|
|
950
1104
|
}, t = (f) => {
|
|
951
|
-
const p = f.some((
|
|
952
|
-
(
|
|
953
|
-
),
|
|
954
|
-
return f.length ? !p && !
|
|
1105
|
+
const p = f.some((k) => ne.includes(k)), g = f.some(
|
|
1106
|
+
(k) => k.startsWith("@") && (ie.includes(k.slice(1)) || k.match(/^@\[.+\]$/))
|
|
1107
|
+
), b = f.includes("dark");
|
|
1108
|
+
return f.length ? !p && !b && !g ? 1 : b && (p || g) ? 3 : 2 : 0;
|
|
955
1109
|
}, a = (f) => {
|
|
956
1110
|
const p = [];
|
|
957
|
-
let
|
|
958
|
-
for (let
|
|
959
|
-
const
|
|
960
|
-
|
|
1111
|
+
let g = "", b = 0;
|
|
1112
|
+
for (let k = 0; k < f.length; k++) {
|
|
1113
|
+
const x = f[k];
|
|
1114
|
+
x === "[" || x === "(" ? b++ : (x === "]" || x === ")") && b--, x === ":" && b === 0 ? (p.push(g), g = "") : g += x;
|
|
961
1115
|
}
|
|
962
|
-
return
|
|
963
|
-
},
|
|
1116
|
+
return g && p.push(g), p;
|
|
1117
|
+
}, d = {
|
|
964
1118
|
hover: ":hover",
|
|
965
1119
|
focus: ":focus",
|
|
966
1120
|
active: ":active",
|
|
@@ -973,144 +1127,144 @@ function ze(e) {
|
|
|
973
1127
|
even: ":nth-child(even)",
|
|
974
1128
|
"focus-within": ":focus-within",
|
|
975
1129
|
"focus-visible": ":focus-visible"
|
|
976
|
-
},
|
|
977
|
-
const
|
|
978
|
-
let
|
|
979
|
-
for (const
|
|
980
|
-
let
|
|
981
|
-
if (
|
|
982
|
-
|
|
1130
|
+
}, y = (f, p = !1) => {
|
|
1131
|
+
const g = a(f);
|
|
1132
|
+
let b = "", k = !1;
|
|
1133
|
+
for (const i of g) {
|
|
1134
|
+
let $ = i;
|
|
1135
|
+
if ($.startsWith("!") && (k = !0, $ = $.slice(1)), re[$] || ae($) || ce($) || de($) || se($) || le($) || Z($)) {
|
|
1136
|
+
b = i;
|
|
983
1137
|
break;
|
|
984
1138
|
}
|
|
985
1139
|
}
|
|
986
|
-
if (!
|
|
987
|
-
const
|
|
988
|
-
if (!
|
|
989
|
-
const
|
|
990
|
-
let h =
|
|
991
|
-
p && (h = h.filter((
|
|
992
|
-
const
|
|
993
|
-
let
|
|
994
|
-
const
|
|
995
|
-
for (const
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
`.peer:${
|
|
999
|
-
),
|
|
1000
|
-
h = h.filter((
|
|
1001
|
-
const
|
|
1002
|
-
let
|
|
1003
|
-
for (const
|
|
1004
|
-
if (
|
|
1140
|
+
if (!b) return null;
|
|
1141
|
+
const x = b.replace(/^!/, ""), O = re[x] ?? ae(x) ?? ce(x) ?? de(x) ?? se(x) ?? le(x) ?? Z(x);
|
|
1142
|
+
if (!O) return null;
|
|
1143
|
+
const T = g.indexOf(b);
|
|
1144
|
+
let h = T >= 0 ? g.slice(0, T) : [];
|
|
1145
|
+
p && (h = h.filter((i) => i !== "dark"));
|
|
1146
|
+
const R = `.${pe(f)}`, _ = k ? O.replace(/;/g, " !important;") : O, w = "__SUBJECT__";
|
|
1147
|
+
let l = w;
|
|
1148
|
+
const P = [];
|
|
1149
|
+
for (const i of h)
|
|
1150
|
+
i.startsWith("group-") ? (l = `.group:${i.slice(6)} ${l}`, P.push(i)) : i.startsWith("peer-") && (l = l.replace(
|
|
1151
|
+
w,
|
|
1152
|
+
`.peer:${i.slice(5)}~${w}`
|
|
1153
|
+
), P.push(i));
|
|
1154
|
+
h = h.filter((i) => !P.includes(i));
|
|
1155
|
+
const W = [], U = [];
|
|
1156
|
+
let S = null;
|
|
1157
|
+
for (const i of h) {
|
|
1158
|
+
if (i === "dark" || ne.includes(i) || i.startsWith("@") && (ie.includes(i.slice(1)) || i.match(/^@\[.+\]$/)))
|
|
1005
1159
|
continue;
|
|
1006
|
-
const
|
|
1007
|
-
if (
|
|
1008
|
-
|
|
1160
|
+
const $ = _e(i);
|
|
1161
|
+
if ($) {
|
|
1162
|
+
S = $;
|
|
1009
1163
|
continue;
|
|
1010
1164
|
}
|
|
1011
|
-
const F =
|
|
1165
|
+
const F = d[i];
|
|
1012
1166
|
if (F) {
|
|
1013
|
-
|
|
1167
|
+
S ? U.push(F) : W.push(F);
|
|
1014
1168
|
continue;
|
|
1015
1169
|
}
|
|
1016
|
-
const
|
|
1017
|
-
typeof
|
|
1170
|
+
const E = Ae[i];
|
|
1171
|
+
typeof E == "function" && (l = E(l, _).split("{")[0]);
|
|
1018
1172
|
}
|
|
1019
|
-
const
|
|
1020
|
-
function
|
|
1021
|
-
if (
|
|
1022
|
-
let F = 0,
|
|
1023
|
-
if (
|
|
1024
|
-
let
|
|
1025
|
-
for (;
|
|
1026
|
-
for (;
|
|
1027
|
-
const
|
|
1028
|
-
if (
|
|
1029
|
-
return
|
|
1173
|
+
const D = W.join(""), L = U.join("");
|
|
1174
|
+
function Q(i, $) {
|
|
1175
|
+
if (!$) return i;
|
|
1176
|
+
let F = 0, E = 0;
|
|
1177
|
+
if (i.length && (i[0] === ">" || i[0] === "+" || i[0] === "~" || i[0] === " ")) {
|
|
1178
|
+
let j = 1;
|
|
1179
|
+
for (; j < i.length && i[j] === " "; ) j++;
|
|
1180
|
+
for (; j < i.length; j++) {
|
|
1181
|
+
const z = i[j];
|
|
1182
|
+
if (z === "[" ? F++ : z === "]" && F > 0 ? F-- : z === "(" ? E++ : z === ")" && E > 0 && E--, F === 0 && E === 0 && (i[j] === ">" || i[j] === "+" || i[j] === "~" || i[j] === " "))
|
|
1183
|
+
return i.slice(0, j) + $ + i.slice(j);
|
|
1030
1184
|
}
|
|
1031
|
-
return
|
|
1185
|
+
return i + $;
|
|
1032
1186
|
}
|
|
1033
|
-
for (let
|
|
1034
|
-
const
|
|
1035
|
-
if (
|
|
1036
|
-
return
|
|
1187
|
+
for (let j = 0; j < i.length; j++) {
|
|
1188
|
+
const z = i[j];
|
|
1189
|
+
if (z === "[" ? F++ : z === "]" && F > 0 ? F-- : z === "(" ? E++ : z === ")" && E > 0 && E--, F === 0 && E === 0 && (z === ">" || z === "+" || z === "~" || z === " "))
|
|
1190
|
+
return i.slice(0, j) + $ + i.slice(j);
|
|
1037
1191
|
}
|
|
1038
|
-
return
|
|
1192
|
+
return i + $;
|
|
1039
1193
|
}
|
|
1040
|
-
if (
|
|
1041
|
-
if (
|
|
1042
|
-
const
|
|
1043
|
-
if (
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1194
|
+
if (S)
|
|
1195
|
+
if (S.includes("&")) {
|
|
1196
|
+
const i = S.indexOf("&"), $ = S.slice(0, i), F = S.slice(i + 1), E = w + D;
|
|
1197
|
+
if (W.length === 0)
|
|
1198
|
+
l = l.replace(
|
|
1199
|
+
w,
|
|
1200
|
+
$ + E + L + F
|
|
1047
1201
|
);
|
|
1048
1202
|
else {
|
|
1049
|
-
const
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1203
|
+
const j = Q(F, L);
|
|
1204
|
+
l = l.replace(
|
|
1205
|
+
w,
|
|
1206
|
+
$ + E + j
|
|
1053
1207
|
);
|
|
1054
1208
|
}
|
|
1055
1209
|
} else
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
`${
|
|
1059
|
-
),
|
|
1210
|
+
l = l.replace(
|
|
1211
|
+
w,
|
|
1212
|
+
`${S}${w + D}`
|
|
1213
|
+
), L && (l = l.replace(w, `${w}${L}`));
|
|
1060
1214
|
else
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1215
|
+
l = l.replace(
|
|
1216
|
+
w,
|
|
1217
|
+
w + D + L
|
|
1064
1218
|
);
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
(n) => ie.includes(n)
|
|
1219
|
+
l = l.replace(new RegExp(w, "g"), R);
|
|
1220
|
+
const fe = "__CE_COLOR_MIX_SPLIT__", he = _.includes(fe) ? _.split(fe).map((i) => `${l}{${i}}`) : [`${l}{${_}}`], Y = h.filter(
|
|
1221
|
+
(i) => ne.includes(i)
|
|
1069
1222
|
), ee = h.filter(
|
|
1070
|
-
(
|
|
1071
|
-
), G = Y.length ? Y[Y.length - 1] : null,
|
|
1072
|
-
let
|
|
1073
|
-
if (
|
|
1074
|
-
if (
|
|
1075
|
-
const
|
|
1076
|
-
if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(
|
|
1223
|
+
(i) => i.startsWith("@") && (ie.includes(i.slice(1)) || i.match(/^@\[.+\]$/))
|
|
1224
|
+
), G = Y.length ? Y[Y.length - 1] : null, V = ee.length ? ee[ee.length - 1] : null, ue = h.includes("dark");
|
|
1225
|
+
let N = "", B = "";
|
|
1226
|
+
if (ue && G ? N = `@media (prefers-color-scheme: dark) and ${oe[G]}` : ue ? N = "@media (prefers-color-scheme: dark)" : G && (N = `@media ${oe[G]}`), V)
|
|
1227
|
+
if (V.startsWith("@[") && V.endsWith("]")) {
|
|
1228
|
+
const i = V.slice(2, -1);
|
|
1229
|
+
if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(i))
|
|
1077
1230
|
return null;
|
|
1078
|
-
|
|
1231
|
+
B = `@container (min-width:${i})`;
|
|
1079
1232
|
} else {
|
|
1080
|
-
const
|
|
1081
|
-
|
|
1233
|
+
const i = V.slice(1);
|
|
1234
|
+
B = `@container ${ge[i] || `(min-width:${i})`}`;
|
|
1082
1235
|
}
|
|
1083
|
-
|
|
1236
|
+
const xe = (i) => N && B ? `${N}${B}{${i}}` : N ? `${N}{${i}}` : B ? `${B}{${i}}` : i;
|
|
1237
|
+
return he.map(xe).join("");
|
|
1084
1238
|
};
|
|
1085
|
-
for (const f of
|
|
1086
|
-
const p = a(f),
|
|
1087
|
-
(
|
|
1239
|
+
for (const f of c) {
|
|
1240
|
+
const p = a(f), g = p.find(
|
|
1241
|
+
(T) => re[T.replace(/^!/, "")] || ae(T.replace(/^!/, "")) || ce(T.replace(/^!/, "")) || de(T.replace(/^!/, "")) || se(T.replace(/^!/, "")) || le(T.replace(/^!/, "")) || Z(T.replace(/^!/, ""))
|
|
1088
1242
|
);
|
|
1089
|
-
if (!
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1243
|
+
if (!g) continue;
|
|
1244
|
+
const b = p.indexOf(g), k = b >= 0 ? p.slice(0, b) : [], x = t(k), O = m(f);
|
|
1245
|
+
O && s[x].push(O);
|
|
1092
1246
|
}
|
|
1093
|
-
const
|
|
1094
|
-
for (const f of
|
|
1095
|
-
if (
|
|
1096
|
-
if (
|
|
1097
|
-
const
|
|
1098
|
-
|
|
1247
|
+
const v = /^(from|via|to)-[a-z]+-?\d{2,3}?$/;
|
|
1248
|
+
for (const f of c)
|
|
1249
|
+
if (v.test(f)) {
|
|
1250
|
+
if (s.flat().join("").includes(`.${pe(f)}`)) continue;
|
|
1251
|
+
const g = m(f);
|
|
1252
|
+
g && s[0].push(g);
|
|
1099
1253
|
}
|
|
1100
|
-
const
|
|
1101
|
-
const
|
|
1102
|
-
const
|
|
1254
|
+
const A = (f) => f.sort((p, g) => {
|
|
1255
|
+
const b = (R) => {
|
|
1256
|
+
const _ = {
|
|
1103
1257
|
sm: 640,
|
|
1104
1258
|
md: 768,
|
|
1105
1259
|
lg: 1024,
|
|
1106
1260
|
xl: 1280,
|
|
1107
1261
|
"2xl": 1536
|
|
1108
1262
|
};
|
|
1109
|
-
for (const [
|
|
1110
|
-
if (
|
|
1263
|
+
for (const [w, l] of Object.entries(_))
|
|
1264
|
+
if (R.includes(`@media ${oe[w]}`)) return l;
|
|
1111
1265
|
return -1;
|
|
1112
|
-
},
|
|
1113
|
-
const
|
|
1266
|
+
}, k = (R) => {
|
|
1267
|
+
const _ = {
|
|
1114
1268
|
xs: 320,
|
|
1115
1269
|
// 20rem
|
|
1116
1270
|
sm: 384,
|
|
@@ -1134,27 +1288,27 @@ function ze(e) {
|
|
|
1134
1288
|
"7xl": 1280
|
|
1135
1289
|
// 80rem
|
|
1136
1290
|
};
|
|
1137
|
-
for (const [
|
|
1138
|
-
if (
|
|
1139
|
-
if (
|
|
1140
|
-
const
|
|
1141
|
-
if (
|
|
1142
|
-
const
|
|
1143
|
-
return
|
|
1291
|
+
for (const [w, l] of Object.entries(_))
|
|
1292
|
+
if (R.includes(`@container ${ge[w]}`)) return l;
|
|
1293
|
+
if (R.includes("@container (min-width:")) {
|
|
1294
|
+
const w = /@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(R);
|
|
1295
|
+
if (w) {
|
|
1296
|
+
const l = parseFloat(w[1]), P = w[2];
|
|
1297
|
+
return P === "rem" || P === "em" ? l * 16 : l;
|
|
1144
1298
|
}
|
|
1145
1299
|
}
|
|
1146
1300
|
return -1;
|
|
1147
|
-
},
|
|
1148
|
-
return
|
|
1301
|
+
}, x = b(p), O = b(g), T = k(p), h = k(g);
|
|
1302
|
+
return x >= 0 && O >= 0 && x !== O ? x - O : T >= 0 && h >= 0 && T !== h ? T - h : 0;
|
|
1149
1303
|
});
|
|
1150
|
-
|
|
1151
|
-
const
|
|
1152
|
-
return
|
|
1304
|
+
s[2] = A(s[2]), s[3] = A(s[3]);
|
|
1305
|
+
const C = s.flat().join("");
|
|
1306
|
+
return H.size >= me && Array.from(H.keys()).slice(
|
|
1153
1307
|
0,
|
|
1154
1308
|
Math.floor(me / 2)
|
|
1155
|
-
).forEach((p) =>
|
|
1309
|
+
).forEach((p) => H.delete(p)), H.set(e, { css: C, timestamp: r }), C;
|
|
1156
1310
|
}
|
|
1157
|
-
const
|
|
1311
|
+
const K = {
|
|
1158
1312
|
/** Simple fade in/out */
|
|
1159
1313
|
fade: {
|
|
1160
1314
|
enterFrom: "opacity-0",
|
|
@@ -1246,181 +1400,181 @@ const q = {
|
|
|
1246
1400
|
leaveTo: "rotate-[90deg] opacity-0"
|
|
1247
1401
|
}
|
|
1248
1402
|
};
|
|
1249
|
-
function
|
|
1403
|
+
function Ne(e, r) {
|
|
1250
1404
|
const {
|
|
1251
1405
|
preset: o,
|
|
1252
|
-
show:
|
|
1253
|
-
mode:
|
|
1254
|
-
duration:
|
|
1406
|
+
show: n,
|
|
1407
|
+
mode: c = "default",
|
|
1408
|
+
duration: s,
|
|
1255
1409
|
appear: u = !1,
|
|
1256
|
-
css:
|
|
1410
|
+
css: m = !0,
|
|
1257
1411
|
name: t,
|
|
1258
1412
|
enterFrom: a,
|
|
1259
|
-
enterActive:
|
|
1260
|
-
enterTo:
|
|
1261
|
-
leaveFrom:
|
|
1262
|
-
leaveActive:
|
|
1263
|
-
leaveTo:
|
|
1413
|
+
enterActive: d,
|
|
1414
|
+
enterTo: y,
|
|
1415
|
+
leaveFrom: v,
|
|
1416
|
+
leaveActive: A,
|
|
1417
|
+
leaveTo: C,
|
|
1264
1418
|
onBeforeEnter: f,
|
|
1265
1419
|
onEnter: p,
|
|
1266
|
-
onAfterEnter:
|
|
1267
|
-
onEnterCancelled:
|
|
1268
|
-
onBeforeLeave:
|
|
1269
|
-
onLeave:
|
|
1270
|
-
onAfterLeave:
|
|
1271
|
-
onLeaveCancelled:
|
|
1420
|
+
onAfterEnter: g,
|
|
1421
|
+
onEnterCancelled: b,
|
|
1422
|
+
onBeforeLeave: k,
|
|
1423
|
+
onLeave: x,
|
|
1424
|
+
onAfterLeave: O,
|
|
1425
|
+
onLeaveCancelled: T
|
|
1272
1426
|
} = e;
|
|
1273
1427
|
let h;
|
|
1274
|
-
o &&
|
|
1428
|
+
o && K[o] ? (h = { ...K[o] }, a && (h.enterFrom = a), d && (h.enterActive = d), y && (h.enterTo = y), v && (h.leaveFrom = v), A && (h.leaveActive = A), C && (h.leaveTo = C)) : h = {
|
|
1275
1429
|
enterFrom: a,
|
|
1276
|
-
enterActive:
|
|
1277
|
-
enterTo:
|
|
1278
|
-
leaveFrom:
|
|
1279
|
-
leaveActive:
|
|
1280
|
-
leaveTo:
|
|
1430
|
+
enterActive: d,
|
|
1431
|
+
enterTo: y,
|
|
1432
|
+
leaveFrom: v,
|
|
1433
|
+
leaveActive: A,
|
|
1434
|
+
leaveTo: C
|
|
1281
1435
|
};
|
|
1282
|
-
const
|
|
1283
|
-
return
|
|
1284
|
-
name:
|
|
1436
|
+
const R = t || (o ? `transition-${o}` : "transition"), _ = ve(n ? r : [], R);
|
|
1437
|
+
return _._transition = {
|
|
1438
|
+
name: R,
|
|
1285
1439
|
classes: h,
|
|
1286
|
-
mode:
|
|
1287
|
-
duration:
|
|
1440
|
+
mode: c,
|
|
1441
|
+
duration: s,
|
|
1288
1442
|
appear: u,
|
|
1289
|
-
css:
|
|
1290
|
-
state:
|
|
1443
|
+
css: m,
|
|
1444
|
+
state: n ? "visible" : "hidden",
|
|
1291
1445
|
hooks: {
|
|
1292
1446
|
onBeforeEnter: f,
|
|
1293
1447
|
onEnter: p,
|
|
1294
|
-
onAfterEnter:
|
|
1295
|
-
onEnterCancelled:
|
|
1296
|
-
onBeforeLeave:
|
|
1297
|
-
onLeave:
|
|
1298
|
-
onAfterLeave:
|
|
1299
|
-
onLeaveCancelled:
|
|
1448
|
+
onAfterEnter: g,
|
|
1449
|
+
onEnterCancelled: b,
|
|
1450
|
+
onBeforeLeave: k,
|
|
1451
|
+
onLeave: x,
|
|
1452
|
+
onAfterLeave: O,
|
|
1453
|
+
onLeaveCancelled: T
|
|
1300
1454
|
}
|
|
1301
|
-
},
|
|
1455
|
+
}, _;
|
|
1302
1456
|
}
|
|
1303
1457
|
function Be(e, r) {
|
|
1304
1458
|
const {
|
|
1305
1459
|
tag: o = "div",
|
|
1306
|
-
moveClass:
|
|
1307
|
-
preset:
|
|
1308
|
-
show:
|
|
1460
|
+
moveClass: n = "transition-transform duration-300",
|
|
1461
|
+
preset: c,
|
|
1462
|
+
show: s = !0,
|
|
1309
1463
|
mode: u = "default",
|
|
1310
|
-
duration:
|
|
1464
|
+
duration: m,
|
|
1311
1465
|
appear: t = !1,
|
|
1312
1466
|
css: a = !0,
|
|
1313
|
-
name:
|
|
1314
|
-
class:
|
|
1315
|
-
style:
|
|
1316
|
-
enterFrom:
|
|
1317
|
-
enterActive:
|
|
1467
|
+
name: d,
|
|
1468
|
+
class: y,
|
|
1469
|
+
style: v,
|
|
1470
|
+
enterFrom: A,
|
|
1471
|
+
enterActive: C,
|
|
1318
1472
|
enterTo: f,
|
|
1319
1473
|
leaveFrom: p,
|
|
1320
|
-
leaveActive:
|
|
1321
|
-
leaveTo:
|
|
1322
|
-
onBeforeEnter:
|
|
1323
|
-
onEnter:
|
|
1324
|
-
onAfterEnter:
|
|
1325
|
-
onEnterCancelled:
|
|
1474
|
+
leaveActive: g,
|
|
1475
|
+
leaveTo: b,
|
|
1476
|
+
onBeforeEnter: k,
|
|
1477
|
+
onEnter: x,
|
|
1478
|
+
onAfterEnter: O,
|
|
1479
|
+
onEnterCancelled: T,
|
|
1326
1480
|
onBeforeLeave: h,
|
|
1327
|
-
onLeave:
|
|
1328
|
-
onAfterLeave:
|
|
1329
|
-
onLeaveCancelled:
|
|
1481
|
+
onLeave: R,
|
|
1482
|
+
onAfterLeave: _,
|
|
1483
|
+
onLeaveCancelled: w
|
|
1330
1484
|
} = e;
|
|
1331
|
-
let
|
|
1332
|
-
|
|
1333
|
-
enterFrom:
|
|
1334
|
-
enterActive:
|
|
1485
|
+
let l;
|
|
1486
|
+
c && K[c] ? (l = { ...K[c] }, A && (l.enterFrom = A), C && (l.enterActive = C), f && (l.enterTo = f), p && (l.leaveFrom = p), g && (l.leaveActive = g), b && (l.leaveTo = b)) : l = {
|
|
1487
|
+
enterFrom: A,
|
|
1488
|
+
enterActive: C,
|
|
1335
1489
|
enterTo: f,
|
|
1336
1490
|
leaveFrom: p,
|
|
1337
|
-
leaveActive:
|
|
1338
|
-
leaveTo:
|
|
1491
|
+
leaveActive: g,
|
|
1492
|
+
leaveTo: b
|
|
1339
1493
|
};
|
|
1340
|
-
const
|
|
1341
|
-
for (const
|
|
1342
|
-
if (
|
|
1343
|
-
const
|
|
1344
|
-
for (const
|
|
1345
|
-
if (
|
|
1346
|
-
const
|
|
1347
|
-
...
|
|
1348
|
-
key:
|
|
1494
|
+
const P = d || (c ? `transition-group-${c}` : "transition-group"), W = [];
|
|
1495
|
+
for (const S of s ? r : [])
|
|
1496
|
+
if (S && typeof S == "object" && S.tag === "#anchor") {
|
|
1497
|
+
const D = Array.isArray(S.children) ? S.children : [];
|
|
1498
|
+
for (const L of D)
|
|
1499
|
+
if (L && typeof L == "object") {
|
|
1500
|
+
const Q = {
|
|
1501
|
+
...L,
|
|
1502
|
+
key: S.key || L.key,
|
|
1349
1503
|
props: {
|
|
1350
|
-
...
|
|
1351
|
-
_anchorKey:
|
|
1504
|
+
...L.props,
|
|
1505
|
+
_anchorKey: S.key
|
|
1352
1506
|
// Preserve original anchor key
|
|
1353
1507
|
}
|
|
1354
1508
|
};
|
|
1355
|
-
|
|
1509
|
+
W.push(Q);
|
|
1356
1510
|
} else
|
|
1357
|
-
|
|
1511
|
+
W.push(L);
|
|
1358
1512
|
} else
|
|
1359
|
-
|
|
1360
|
-
const
|
|
1361
|
-
if (
|
|
1362
|
-
return typeof
|
|
1513
|
+
W.push(S);
|
|
1514
|
+
const U = (() => {
|
|
1515
|
+
if (v)
|
|
1516
|
+
return typeof v == "string" ? v : Object.entries(v).map(([S, D]) => `${S}: ${D}`).join("; ");
|
|
1363
1517
|
})();
|
|
1364
1518
|
return {
|
|
1365
1519
|
tag: o,
|
|
1366
|
-
children:
|
|
1367
|
-
key:
|
|
1520
|
+
children: W,
|
|
1521
|
+
key: P,
|
|
1368
1522
|
props: {
|
|
1369
1523
|
attrs: {
|
|
1370
|
-
...
|
|
1371
|
-
...
|
|
1524
|
+
...y ? { class: y } : {},
|
|
1525
|
+
...U ? { style: U } : {}
|
|
1372
1526
|
},
|
|
1373
1527
|
_transitionGroup: {
|
|
1374
|
-
name:
|
|
1375
|
-
classes:
|
|
1376
|
-
moveClass:
|
|
1528
|
+
name: P,
|
|
1529
|
+
classes: l,
|
|
1530
|
+
moveClass: n,
|
|
1377
1531
|
mode: u,
|
|
1378
|
-
duration:
|
|
1532
|
+
duration: m,
|
|
1379
1533
|
appear: t,
|
|
1380
1534
|
css: a,
|
|
1381
1535
|
hooks: {
|
|
1382
|
-
onBeforeEnter:
|
|
1383
|
-
onEnter:
|
|
1384
|
-
onAfterEnter:
|
|
1385
|
-
onEnterCancelled:
|
|
1536
|
+
onBeforeEnter: k,
|
|
1537
|
+
onEnter: x,
|
|
1538
|
+
onAfterEnter: O,
|
|
1539
|
+
onEnterCancelled: T,
|
|
1386
1540
|
onBeforeLeave: h,
|
|
1387
|
-
onLeave:
|
|
1388
|
-
onAfterLeave:
|
|
1389
|
-
onLeaveCancelled:
|
|
1541
|
+
onLeave: R,
|
|
1542
|
+
onAfterLeave: _,
|
|
1543
|
+
onLeaveCancelled: w
|
|
1390
1544
|
}
|
|
1391
1545
|
}
|
|
1392
1546
|
}
|
|
1393
1547
|
};
|
|
1394
1548
|
}
|
|
1395
|
-
function
|
|
1549
|
+
function Ue(e) {
|
|
1396
1550
|
return { ...e };
|
|
1397
1551
|
}
|
|
1398
|
-
let
|
|
1399
|
-
function
|
|
1400
|
-
if (!
|
|
1552
|
+
let J = null;
|
|
1553
|
+
function Me() {
|
|
1554
|
+
if (!J) {
|
|
1401
1555
|
const e = [];
|
|
1402
|
-
Object.values(
|
|
1403
|
-
|
|
1556
|
+
Object.values(K).forEach((n) => {
|
|
1557
|
+
n.enterFrom && e.push(n.enterFrom), n.enterActive && e.push(n.enterActive), n.enterTo && e.push(n.enterTo), n.leaveFrom && e.push(n.leaveFrom), n.leaveActive && e.push(n.leaveActive), n.leaveTo && e.push(n.leaveTo);
|
|
1404
1558
|
});
|
|
1405
|
-
const r = `<div class="${e.join(" ")}"></div>`, o =
|
|
1406
|
-
|
|
1559
|
+
const r = `<div class="${e.join(" ")}"></div>`, o = Le(r);
|
|
1560
|
+
J = new CSSStyleSheet(), J.replaceSync(o);
|
|
1407
1561
|
}
|
|
1408
|
-
return
|
|
1562
|
+
return J;
|
|
1409
1563
|
}
|
|
1410
|
-
function
|
|
1411
|
-
|
|
1564
|
+
function Pe() {
|
|
1565
|
+
Me();
|
|
1412
1566
|
}
|
|
1413
|
-
|
|
1567
|
+
Pe();
|
|
1414
1568
|
export {
|
|
1415
|
-
|
|
1416
|
-
|
|
1569
|
+
Ne as T,
|
|
1570
|
+
Me as a,
|
|
1417
1571
|
Be as b,
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1572
|
+
$e as c,
|
|
1573
|
+
Ue as d,
|
|
1574
|
+
Ie as g,
|
|
1575
|
+
Le as j,
|
|
1576
|
+
ye as m,
|
|
1423
1577
|
De as s,
|
|
1424
|
-
|
|
1578
|
+
K as t
|
|
1425
1579
|
};
|
|
1426
|
-
//# sourceMappingURL=transitions-
|
|
1580
|
+
//# sourceMappingURL=transitions-Cctsmip5.js.map
|