@shopify/cli 3.88.1 → 3.89.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/dist/acorn-45LE5Z2A.js +3016 -0
- package/dist/angular-Z5FPQPLR.js +2791 -0
- package/dist/babel-TRRZ6QQY.js +7173 -0
- package/dist/{chunk-SXCTF3GA.js → chunk-2CNWYFWQ.js} +5 -5
- package/dist/{chunk-OOFJXO66.js → chunk-2OJBOBH2.js} +3 -3
- package/dist/{chunk-R35DWLU3.js → chunk-2QVJ6J2X.js} +7 -6
- package/dist/{chunk-4JKPZ3VQ.js → chunk-36WMFQ3S.js} +3 -3
- package/dist/{chunk-ZICCE4RM.js → chunk-5PAHFSKT.js} +3 -3
- package/dist/{chunk-S2JA5KN5.js → chunk-6KFJWCTP.js} +2 -2
- package/dist/{chunk-O66HZU2K.js → chunk-6YASM3HI.js} +5 -5
- package/dist/{chunk-G35J5BJH.js → chunk-B5Q2Q4B3.js} +3 -3
- package/dist/{chunk-4B34L27W.js → chunk-CUCT627W.js} +8 -8
- package/dist/{chunk-FM5O5ML5.js → chunk-EAEHP4CZ.js} +4 -4
- package/dist/{chunk-SKMKK4HY.js → chunk-EQO4QA4E.js} +34 -13
- package/dist/{chunk-KV7DPDLS.js → chunk-EYUOBXKH.js} +3 -3
- package/dist/{chunk-OIOM46UG.js → chunk-GFYDB5LD.js} +3 -3
- package/dist/{chunk-HJSZAWSQ.js → chunk-GSUL4KBP.js} +2086 -2215
- package/dist/{chunk-GTQOY34I.js → chunk-GT7PA6E6.js} +2 -2
- package/dist/{chunk-J7IE6I2Z.js → chunk-JYBBGVIM.js} +3 -3
- package/dist/{chunk-G7LVOLJB.js → chunk-LJHVLE3R.js} +2 -2
- package/dist/{chunk-YRMUH267.js → chunk-NJR5IH3H.js} +4 -4
- package/dist/{chunk-EXVAVPLH.js → chunk-P3SM4EEQ.js} +3 -3
- package/dist/{chunk-2CKTOMXL.js → chunk-PYPPUTUV.js} +2 -2
- package/dist/{chunk-DOGBHIKU.js → chunk-R7OKLQB6.js} +4 -4
- package/dist/{chunk-MBL5HIUY.js → chunk-TLGBKEEX.js} +6 -6
- package/dist/{chunk-PLB4SUD2.js → chunk-TPPRDIBF.js} +4 -4
- package/dist/{chunk-L6RKBI62.js → chunk-TRR5QJRW.js} +4 -4
- package/dist/{chunk-KY3DY3JB.js → chunk-TWYT4DFD.js} +2 -2
- package/dist/{chunk-47RUNUR4.js → chunk-V2ZY6OP3.js} +6 -6
- package/dist/{chunk-VLBE545G.js → chunk-WC5EDB4Z.js} +4 -4
- package/dist/{chunk-YHMVT4MX.js → chunk-WF5BWNFE.js} +6 -6
- package/dist/{chunk-ARNI43Y7.js → chunk-WSX6K4TT.js} +3 -3
- package/dist/{chunk-HFXVR5DX.js → chunk-XLMH6DBR.js} +3 -3
- package/dist/{chunk-EBGZZ7WC.js → chunk-Y2BHJWKT.js} +2 -2
- package/dist/{chunk-WEFPJFSC.js → chunk-Y3HY6QD7.js} +5 -5
- package/dist/{chunk-2IQA6YOH.js → chunk-YETFHMCK.js} +7 -7
- package/dist/{chunk-A2XFK3DK.js → chunk-ZM543XCR.js} +3 -3
- package/dist/cli/commands/auth/login.js +10 -10
- package/dist/cli/commands/auth/login.test.js +11 -11
- package/dist/cli/commands/auth/logout.js +10 -10
- package/dist/cli/commands/auth/logout.test.js +11 -11
- package/dist/cli/commands/cache/clear.js +10 -10
- package/dist/cli/commands/debug/command-flags.js +10 -10
- package/dist/cli/commands/docs/generate.js +10 -10
- package/dist/cli/commands/docs/generate.test.js +10 -10
- package/dist/cli/commands/help.js +10 -10
- package/dist/cli/commands/kitchen-sink/async.js +11 -11
- package/dist/cli/commands/kitchen-sink/async.test.js +11 -11
- package/dist/cli/commands/kitchen-sink/index.js +13 -13
- package/dist/cli/commands/kitchen-sink/index.test.js +13 -13
- package/dist/cli/commands/kitchen-sink/prompts.js +11 -11
- package/dist/cli/commands/kitchen-sink/prompts.test.js +11 -11
- package/dist/cli/commands/kitchen-sink/static.js +11 -11
- package/dist/cli/commands/kitchen-sink/static.test.js +11 -11
- package/dist/cli/commands/notifications/generate.js +11 -11
- package/dist/cli/commands/notifications/list.js +11 -11
- package/dist/cli/commands/search.js +11 -11
- package/dist/cli/commands/upgrade.js +11 -11
- package/dist/cli/commands/version.js +11 -11
- package/dist/cli/commands/version.test.js +11 -11
- package/dist/cli/services/commands/notifications.js +8 -8
- package/dist/cli/services/commands/search.js +4 -4
- package/dist/cli/services/commands/search.test.js +4 -4
- package/dist/cli/services/commands/version.js +5 -5
- package/dist/cli/services/commands/version.test.js +6 -6
- package/dist/cli/services/kitchen-sink/async.js +4 -4
- package/dist/cli/services/kitchen-sink/prompts.js +4 -4
- package/dist/cli/services/kitchen-sink/static.js +4 -4
- package/dist/cli/services/upgrade.js +5 -5
- package/dist/cli/services/upgrade.test.js +6 -6
- package/dist/{custom-oclif-loader-32S55IZR.js → custom-oclif-loader-TLTSWHLS.js} +4 -4
- package/dist/{devtools-EVCDECOU.js → devtools-2SG3BFWJ.js} +4 -4
- package/dist/{devtools-LDCSRUXB.js → devtools-D47L6HIC.js} +7 -7
- package/dist/{error-handler-5ISTZ76A.js → error-handler-JWFNITM6.js} +8 -8
- package/dist/estree-PY6WKTNG.js +4490 -0
- package/dist/flow-YN54TSCB.js +27513 -0
- package/dist/glimmer-RMPUUUDS.js +2781 -0
- package/dist/graphql-PPLVYWBL.js +1225 -0
- package/dist/hooks/postrun.js +7 -7
- package/dist/hooks/prerun.js +8 -8
- package/dist/html-3U6QZZZ4.js +2768 -0
- package/dist/index.js +9195 -4199
- package/dist/{lib-G7Q5M6VX.js → lib-XGN4IWQ3.js} +3 -3
- package/dist/{local-WDXJW24L.js → local-4NMXX5NP.js} +4 -4
- package/dist/markdown-RHRQTUMC.js +3269 -0
- package/dist/meriyah-7MIMHTWQ.js +2645 -0
- package/dist/{node-package-manager-2LA6ZOEW.js → node-package-manager-SHRILTY3.js} +5 -5
- package/dist/postcss-MSOPGY7M.js +4796 -0
- package/dist/prettier-2ITB6I34.js +13861 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typescript-ZSZVUJZX.js +13034 -0
- package/dist/{ui-ROMDLTEP.js → ui-MKDRI4FX.js} +4 -4
- package/dist/{workerd-J7UDCFYZ.js → workerd-BHG6KDEK.js} +11 -11
- package/dist/yaml-6GALFXQY.js +4077 -0
- package/oclif.manifest.json +404 -19
- package/package.json +6 -6
|
@@ -0,0 +1,4796 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__esm,
|
|
3
|
+
init_cjs_shims
|
|
4
|
+
} from "./chunk-PKR7KJ6P.js";
|
|
5
|
+
|
|
6
|
+
// ../../node_modules/.pnpm/prettier@3.7.4/node_modules/prettier/plugins/postcss.mjs
|
|
7
|
+
function Nl(t) {
|
|
8
|
+
return this[t < 0 ? this.length + t : t];
|
|
9
|
+
}
|
|
10
|
+
function Il(t) {
|
|
11
|
+
if (typeof t == "string") return je;
|
|
12
|
+
if (Array.isArray(t)) return He;
|
|
13
|
+
if (!t) return;
|
|
14
|
+
let { type: e } = t;
|
|
15
|
+
if (Ot.has(e)) return e;
|
|
16
|
+
}
|
|
17
|
+
function Ll(t) {
|
|
18
|
+
let e = t === null ? "null" : typeof t;
|
|
19
|
+
if (e !== "string" && e !== "object") return `Unexpected doc '${e}',
|
|
20
|
+
Expected it to be 'string' or 'object'.`;
|
|
21
|
+
if (ue(t)) throw new Error("doc is valid.");
|
|
22
|
+
let s = Object.prototype.toString.call(t);
|
|
23
|
+
if (s !== "[object Object]") return `Unexpected doc '${s}'.`;
|
|
24
|
+
let r = ql([...Ot].map((n) => `'${n}'`));
|
|
25
|
+
return `Unexpected doc.type '${t.type}'.
|
|
26
|
+
Expected it to be ${r}.`;
|
|
27
|
+
}
|
|
28
|
+
function Dl(t, e) {
|
|
29
|
+
if (typeof t == "string") return e(t);
|
|
30
|
+
let s = /* @__PURE__ */ new Map();
|
|
31
|
+
return r(t);
|
|
32
|
+
function r(i) {
|
|
33
|
+
if (s.has(i)) return s.get(i);
|
|
34
|
+
let o = n(i);
|
|
35
|
+
return s.set(i, o), o;
|
|
36
|
+
}
|
|
37
|
+
function n(i) {
|
|
38
|
+
switch (ue(i)) {
|
|
39
|
+
case He:
|
|
40
|
+
return e(i.map(r));
|
|
41
|
+
case ae:
|
|
42
|
+
return e({ ...i, parts: i.parts.map(r) });
|
|
43
|
+
case me:
|
|
44
|
+
return e({ ...i, breakContents: r(i.breakContents), flatContents: r(i.flatContents) });
|
|
45
|
+
case oe: {
|
|
46
|
+
let { expandedStates: o, contents: u } = i;
|
|
47
|
+
return o ? (o = o.map(r), u = o[0]) : u = r(u), e({ ...i, contents: u, expandedStates: o });
|
|
48
|
+
}
|
|
49
|
+
case Ae:
|
|
50
|
+
case ie:
|
|
51
|
+
case kt:
|
|
52
|
+
case At:
|
|
53
|
+
case Oe:
|
|
54
|
+
return e({ ...i, contents: r(i.contents) });
|
|
55
|
+
case je:
|
|
56
|
+
case Et:
|
|
57
|
+
case St:
|
|
58
|
+
case Tt:
|
|
59
|
+
case X:
|
|
60
|
+
case Ce:
|
|
61
|
+
return e(i);
|
|
62
|
+
default:
|
|
63
|
+
throw new nn(i);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function Ml(t) {
|
|
68
|
+
return t.type === X && !t.hard ? t.soft ? "" : " " : t.type === me ? t.flatContents : t;
|
|
69
|
+
}
|
|
70
|
+
function on(t) {
|
|
71
|
+
return Dl(t, Ml);
|
|
72
|
+
}
|
|
73
|
+
function L(t) {
|
|
74
|
+
return $(t), { type: ie, contents: t };
|
|
75
|
+
}
|
|
76
|
+
function Bl(t, e) {
|
|
77
|
+
return un(t), $(e), { type: Ae, contents: e, n: t };
|
|
78
|
+
}
|
|
79
|
+
function le(t) {
|
|
80
|
+
return Bl(-1, t);
|
|
81
|
+
}
|
|
82
|
+
function Pe(t) {
|
|
83
|
+
return an(t), { type: ae, parts: t };
|
|
84
|
+
}
|
|
85
|
+
function D(t, e = {}) {
|
|
86
|
+
return $(t), ye(e.expandedStates, !0), { type: oe, id: e.id, contents: t, break: !!e.shouldBreak, expandedStates: e.expandedStates };
|
|
87
|
+
}
|
|
88
|
+
function Ct(t, e = "", s = {}) {
|
|
89
|
+
return $(t), e !== "" && $(e), { type: me, breakContents: t, flatContents: e, groupId: s.groupId };
|
|
90
|
+
}
|
|
91
|
+
function Y(t, e) {
|
|
92
|
+
$(t), ye(e);
|
|
93
|
+
let s = [];
|
|
94
|
+
for (let r = 0; r < e.length; r++) r !== 0 && s.push(t), s.push(e[r]);
|
|
95
|
+
return s;
|
|
96
|
+
}
|
|
97
|
+
function ln(t) {
|
|
98
|
+
return $(t), { type: Oe, contents: t };
|
|
99
|
+
}
|
|
100
|
+
function $l(t) {
|
|
101
|
+
return Array.isArray(t) && t.length > 0;
|
|
102
|
+
}
|
|
103
|
+
function Yl(t, e) {
|
|
104
|
+
let { preferred: s, alternate: r } = e === !0 || e === "'" ? Wl : Gl, { length: n } = t, i = 0, o = 0;
|
|
105
|
+
for (let u = 0; u < n; u++) {
|
|
106
|
+
let a = t.charCodeAt(u);
|
|
107
|
+
a === s.codePoint ? i++ : a === r.codePoint && o++;
|
|
108
|
+
}
|
|
109
|
+
return (i > o ? r : s).character;
|
|
110
|
+
}
|
|
111
|
+
function zl(t, e) {
|
|
112
|
+
let s = e === '"' ? "'" : '"', r = E(0, t, Vl, (n, i, o) => i ? i === s ? s : n : o === e ? "\\" + o : o);
|
|
113
|
+
return e + r + e;
|
|
114
|
+
}
|
|
115
|
+
function jl(t, e) {
|
|
116
|
+
K(/^(?<quote>["']).*\k<quote>$/su.test(t));
|
|
117
|
+
let s = t.slice(1, -1), r = e.parser === "json" || e.parser === "jsonc" || e.parser === "json5" && e.quoteProps === "preserve" && !e.singleQuote ? '"' : e.__isInHtmlAttribute ? "'" : pn(s, e.singleQuote);
|
|
118
|
+
return t.charAt(0) === r ? t : hn(s, r);
|
|
119
|
+
}
|
|
120
|
+
function Hl(t) {
|
|
121
|
+
return !!t?.[Pt];
|
|
122
|
+
}
|
|
123
|
+
function Kl(t) {
|
|
124
|
+
let e = t.slice(0, Ke);
|
|
125
|
+
if (e !== "---" && e !== "+++") return;
|
|
126
|
+
let s = t.indexOf(`
|
|
127
|
+
`, Ke);
|
|
128
|
+
if (s === -1) return;
|
|
129
|
+
let r = t.slice(Ke, s).trim(), n = t.indexOf(`
|
|
130
|
+
${e}`, s), i = r;
|
|
131
|
+
if (i || (i = e === "+++" ? "toml" : "yaml"), n === -1 && e === "---" && i === "yaml" && (n = t.indexOf(`
|
|
132
|
+
...`, s)), n === -1) return;
|
|
133
|
+
let o = n + 1 + Ke, u = t.charAt(o + 1);
|
|
134
|
+
if (!/\s?/u.test(u)) return;
|
|
135
|
+
let a = t.slice(0, o), l;
|
|
136
|
+
return { language: i, explicitLanguage: r || null, value: t.slice(s + 1, n), startDelimiter: e, endDelimiter: a.slice(-Ke), raw: a, start: { line: 1, column: 0, index: 0 }, end: { index: a.length, get line() {
|
|
137
|
+
return l ?? (l = a.split(`
|
|
138
|
+
`)), l.length;
|
|
139
|
+
}, get column() {
|
|
140
|
+
return l ?? (l = a.split(`
|
|
141
|
+
`)), G(0, l, -1).length;
|
|
142
|
+
} }, [Pt]: !0 };
|
|
143
|
+
}
|
|
144
|
+
function Ql(t) {
|
|
145
|
+
let e = Kl(t);
|
|
146
|
+
return e ? { frontMatter: e, get content() {
|
|
147
|
+
let { raw: s } = e;
|
|
148
|
+
return E(0, s, /[^\n]/gu, " ") + t.slice(s.length);
|
|
149
|
+
} } : { content: t };
|
|
150
|
+
}
|
|
151
|
+
function mn(t, e, s) {
|
|
152
|
+
if (t.type === "css-comment" && s.type === "css-root" && s.nodes.length > 0 && ((s.nodes[0] === t || Re(s.nodes[0]) && s.nodes[1] === t) && (delete e.text, /^\*\s*@(?:format|prettier)\s*$/u.test(t.text)) || s.type === "css-root" && G(0, s.nodes, -1) === t)) return null;
|
|
153
|
+
if (t.type === "value-root" && delete e.text, (t.type === "media-query" || t.type === "media-query-list" || t.type === "media-feature-expression") && delete e.value, t.type === "css-rule" && delete e.params, (t.type === "media-feature" || t.type === "media-keyword" || t.type === "media-type" || t.type === "media-unknown" || t.type === "media-url" || t.type === "media-value" || t.type === "selector-attribute" || t.type === "selector-string" || t.type === "selector-class" || t.type === "selector-combinator" || t.type === "value-string") && t.value && (e.value = Jl(t.value)), t.type === "selector-combinator" && (e.value = E(0, e.value, /\s+/gu, " ")), t.type === "media-feature" && (e.value = E(0, e.value, " ", "")), (t.type === "value-word" && (t.isColor && t.isHex || ["initial", "inherit", "unset", "revert"].includes(t.value.toLowerCase())) || t.type === "media-feature" || t.type === "selector-root-invalid" || t.type === "selector-pseudo") && (e.value = e.value.toLowerCase()), t.type === "css-decl" && (e.prop = t.prop.toLowerCase()), (t.type === "css-atrule" || t.type === "css-import") && (e.name = t.name.toLowerCase()), t.type === "value-number" && (e.unit = t.unit.toLowerCase()), t.type === "value-unknown" && (e.value = E(0, e.value, /;$/gu, "")), t.type === "selector-attribute" && (e.attribute = t.attribute.trim(), t.namespace && typeof t.namespace == "string" && (e.namespace = t.namespace.trim() || !0), t.value)) {
|
|
154
|
+
let { value: r } = e;
|
|
155
|
+
/\s[a-zA-Z]$/u.test(r) && (e.__prettier_attribute_selector_flag = G(0, r, -1), r = r.slice(0, -1)), r = r.trim(), r = r.replace(/^(?<quote>["'])(?<value>.*?)\k<quote>$/u, "$<value>"), e.value = r, delete e.quoted;
|
|
156
|
+
}
|
|
157
|
+
if ((t.type === "media-value" || t.type === "media-type" || t.type === "value-number" || t.type === "selector-root-invalid" || t.type === "selector-class" || t.type === "selector-combinator" || t.type === "selector-tag") && t.value && (e.value = E(0, e.value, /([\d+.e-]+)([a-z]*)/giu, (r, n, i) => {
|
|
158
|
+
let o = Number(n);
|
|
159
|
+
return Number.isNaN(o) ? r : o + i.toLowerCase();
|
|
160
|
+
})), t.type === "selector-tag") {
|
|
161
|
+
let r = e.value.toLowerCase();
|
|
162
|
+
["from", "to"].includes(r) && (e.value = r);
|
|
163
|
+
}
|
|
164
|
+
if (t.type === "css-atrule" && t.name.toLowerCase() === "supports" && delete e.value, t.type === "selector-unknown" && delete e.value, t.type === "value-comma_group") {
|
|
165
|
+
let r = t.groups.findIndex((n) => n.type === "value-number" && n.unit === "...");
|
|
166
|
+
r !== -1 && (e.groups[r].unit = "", e.groups.splice(r + 1, 0, { type: "value-word", value: "...", isColor: !1, isHex: !1 }));
|
|
167
|
+
}
|
|
168
|
+
if (t.type === "value-comma_group" && t.groups.some((r) => r.type === "value-atword" && (r.value.endsWith("[") || r.value.endsWith("]")) || r.type === "value-word" && (r.value.startsWith("]") || r.value.startsWith("[")))) return { type: "value-atword", value: t.groups.map((r) => r.value).join(""), group: { open: null, close: null, groups: [], type: "value-paren_group" } };
|
|
169
|
+
}
|
|
170
|
+
function Jl(t) {
|
|
171
|
+
return E(0, E(0, t, "'", '"'), /\\([^\da-f])/giu, "$1");
|
|
172
|
+
}
|
|
173
|
+
function gn() {
|
|
174
|
+
}
|
|
175
|
+
function Xe(t) {
|
|
176
|
+
if (Qe !== null && typeof Qe.property) {
|
|
177
|
+
let e = Qe;
|
|
178
|
+
return Qe = Xe.prototype = null, e;
|
|
179
|
+
}
|
|
180
|
+
return Qe = Xe.prototype = t ?? /* @__PURE__ */ Object.create(null), new Xe();
|
|
181
|
+
}
|
|
182
|
+
function Hr(t) {
|
|
183
|
+
return Xe(t);
|
|
184
|
+
}
|
|
185
|
+
function ec(t, e = "type") {
|
|
186
|
+
Hr(t);
|
|
187
|
+
function s(r) {
|
|
188
|
+
let n = r[e], i = t[n];
|
|
189
|
+
if (!Array.isArray(i)) throw Object.assign(new Error(`Missing visitor keys for '${n}'.`), { node: r });
|
|
190
|
+
return i;
|
|
191
|
+
}
|
|
192
|
+
return s;
|
|
193
|
+
}
|
|
194
|
+
function rc(t, e) {
|
|
195
|
+
let s = 0;
|
|
196
|
+
for (let r = 0; r < t.line - 1; ++r) s = e.indexOf(`
|
|
197
|
+
`, s) + 1;
|
|
198
|
+
return s + t.column;
|
|
199
|
+
}
|
|
200
|
+
function Rt(t) {
|
|
201
|
+
return (e, s, r) => {
|
|
202
|
+
let n = !!r?.backwards;
|
|
203
|
+
if (s === !1) return !1;
|
|
204
|
+
let { length: i } = e, o = s;
|
|
205
|
+
for (; o >= 0 && o < i; ) {
|
|
206
|
+
let u = e.charAt(o);
|
|
207
|
+
if (t instanceof RegExp) {
|
|
208
|
+
if (!t.test(u)) return o;
|
|
209
|
+
} else if (!t.includes(u)) return o;
|
|
210
|
+
n ? o-- : o++;
|
|
211
|
+
}
|
|
212
|
+
return o === -1 || o === i ? o : !1;
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
function En(t, e) {
|
|
216
|
+
let { value: s } = t;
|
|
217
|
+
return s === "-" || s === "--" || s.charAt(0) !== "-" ? e : e - (s.charAt(1) === "-" ? 2 : 1);
|
|
218
|
+
}
|
|
219
|
+
function Sn(t, e) {
|
|
220
|
+
if (typeof t.source?.start?.offset == "number") return t.source.start.offset;
|
|
221
|
+
if (typeof t.sourceIndex == "number") return t.type === "value-word" ? En(t, t.sourceIndex) : t.sourceIndex;
|
|
222
|
+
if (t.source?.start) return Kr(t.source.start, e);
|
|
223
|
+
throw Object.assign(new Error("Can not locate node."), { node: t });
|
|
224
|
+
}
|
|
225
|
+
function Qr(t, e) {
|
|
226
|
+
if (t.type === "css-comment" && t.inline) return qt(e, t.source.startOffset);
|
|
227
|
+
if (typeof t.source?.end?.offset == "number") return t.source.end.offset;
|
|
228
|
+
if (t.source) {
|
|
229
|
+
if (t.source.end) {
|
|
230
|
+
let s = Kr(t.source.end, e);
|
|
231
|
+
return t.type === "value-word" ? En(t, s) : s;
|
|
232
|
+
}
|
|
233
|
+
if (ce(t.nodes)) return Qr(G(0, t.nodes, -1), e);
|
|
234
|
+
}
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
function Xr(t, e) {
|
|
238
|
+
t.source && (t.source.startOffset = Sn(t, e), t.source.endOffset = Qr(t, e));
|
|
239
|
+
for (let s in t) {
|
|
240
|
+
let r = t[s];
|
|
241
|
+
s === "source" || !r || typeof r != "object" || (r.type === "value-root" || r.type === "value-unknown" ? kn(r, sc(t), r.text || r.value) : Xr(r, e));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function kn(t, e, s) {
|
|
245
|
+
t.source && (t.source.startOffset = Sn(t, s) + e, t.source.endOffset = Qr(t, s) + e);
|
|
246
|
+
for (let r in t) {
|
|
247
|
+
let n = t[r];
|
|
248
|
+
r === "source" || !n || typeof n != "object" || kn(n, e, s);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
function sc(t) {
|
|
252
|
+
let e = t.source.startOffset;
|
|
253
|
+
return typeof t.prop == "string" && (e += t.prop.length), t.type === "css-atrule" && typeof t.name == "string" && (e += 1 + t.name.length + t.raws.afterName.match(/^\s*:?\s*/u)[0].length), t.type !== "css-atrule" && typeof t.raws?.between == "string" && (e += t.raws.between.length), e;
|
|
254
|
+
}
|
|
255
|
+
function Tn(t) {
|
|
256
|
+
let e = "initial", s = "initial", r, n = !1, i = [];
|
|
257
|
+
for (let o = 0; o < t.length; o++) {
|
|
258
|
+
let u = t[o];
|
|
259
|
+
switch (e) {
|
|
260
|
+
case "initial":
|
|
261
|
+
if (u === "'") {
|
|
262
|
+
e = "single-quotes";
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
if (u === '"') {
|
|
266
|
+
e = "double-quotes";
|
|
267
|
+
continue;
|
|
268
|
+
}
|
|
269
|
+
if ((u === "u" || u === "U") && t.slice(o, o + 4).toLowerCase() === "url(") {
|
|
270
|
+
e = "url", o += 3;
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
if (u === "*" && t[o - 1] === "/") {
|
|
274
|
+
e = "comment-block";
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
if (u === "/" && t[o - 1] === "/") {
|
|
278
|
+
e = "comment-inline", r = o - 1;
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
continue;
|
|
282
|
+
case "single-quotes":
|
|
283
|
+
if (u === "'" && t[o - 1] !== "\\" && (e = s, s = "initial"), u === `
|
|
284
|
+
` || u === "\r") return t;
|
|
285
|
+
continue;
|
|
286
|
+
case "double-quotes":
|
|
287
|
+
if (u === '"' && t[o - 1] !== "\\" && (e = s, s = "initial"), u === `
|
|
288
|
+
` || u === "\r") return t;
|
|
289
|
+
continue;
|
|
290
|
+
case "url":
|
|
291
|
+
if (u === ")" && (e = "initial"), u === `
|
|
292
|
+
` || u === "\r") return t;
|
|
293
|
+
if (u === "'") {
|
|
294
|
+
e = "single-quotes", s = "url";
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
if (u === '"') {
|
|
298
|
+
e = "double-quotes", s = "url";
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
301
|
+
continue;
|
|
302
|
+
case "comment-block":
|
|
303
|
+
u === "/" && t[o - 1] === "*" && (e = "initial");
|
|
304
|
+
continue;
|
|
305
|
+
case "comment-inline":
|
|
306
|
+
(u === '"' || u === "'" || u === "*") && (n = !0), (u === `
|
|
307
|
+
` || u === "\r") && (n && i.push([r, o]), e = "initial", n = !1);
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
for (let [o, u] of i) t = t.slice(0, o) + E(0, t.slice(o, u), /["'*]/gu, " ") + t.slice(u);
|
|
312
|
+
return t;
|
|
313
|
+
}
|
|
314
|
+
function Rn(t) {
|
|
315
|
+
let e = t.match(Nn);
|
|
316
|
+
return e ? e[0].trimStart() : "";
|
|
317
|
+
}
|
|
318
|
+
function In(t) {
|
|
319
|
+
let s = t.match(Nn)?.[0];
|
|
320
|
+
return s == null ? t : t.slice(s.length);
|
|
321
|
+
}
|
|
322
|
+
function qn(t) {
|
|
323
|
+
t = E(0, t.replace(ic, "").replace(nc, ""), uc, "$1");
|
|
324
|
+
let s = "";
|
|
325
|
+
for (; s !== t; ) s = t, t = E(0, t, ac, `
|
|
326
|
+
$1 $2
|
|
327
|
+
`);
|
|
328
|
+
t = t.replace(An, "").trimEnd();
|
|
329
|
+
let r = /* @__PURE__ */ Object.create(null), n = E(0, t, On, "").replace(An, "").trimEnd(), i;
|
|
330
|
+
for (; i = On.exec(t); ) {
|
|
331
|
+
let o = E(0, i[2], oc, "");
|
|
332
|
+
if (typeof r[i[1]] == "string" || Array.isArray(r[i[1]])) {
|
|
333
|
+
let u = r[i[1]];
|
|
334
|
+
r[i[1]] = [...Pn, ...Array.isArray(u) ? u : [u], o];
|
|
335
|
+
} else r[i[1]] = o;
|
|
336
|
+
}
|
|
337
|
+
return { comments: n, pragmas: r };
|
|
338
|
+
}
|
|
339
|
+
function Ln({ comments: t = "", pragmas: e = {} }) {
|
|
340
|
+
let o = Object.keys(e), u = o.flatMap((l) => Cn(l, e[l])).map((l) => ` * ${l}
|
|
341
|
+
`).join("");
|
|
342
|
+
if (!t) {
|
|
343
|
+
if (o.length === 0) return "";
|
|
344
|
+
if (o.length === 1 && !Array.isArray(e[o[0]])) {
|
|
345
|
+
let l = e[o[0]];
|
|
346
|
+
return `/** ${Cn(o[0], l)[0]} */`;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
let a = t.split(`
|
|
350
|
+
`).map((l) => ` * ${l}`).join(`
|
|
351
|
+
`) + `
|
|
352
|
+
`;
|
|
353
|
+
return `/**
|
|
354
|
+
` + (t ? a : "") + (t && o.length > 0 ? ` *
|
|
355
|
+
` : "") + u + " */";
|
|
356
|
+
}
|
|
357
|
+
function Cn(t, e) {
|
|
358
|
+
return [...Pn, ...Array.isArray(e) ? e : [e]].map((s) => `@${t} ${s}`.trim());
|
|
359
|
+
}
|
|
360
|
+
function lc(t) {
|
|
361
|
+
if (!t.startsWith("#!")) return "";
|
|
362
|
+
let e = t.indexOf(`
|
|
363
|
+
`);
|
|
364
|
+
return e === -1 ? t : t.slice(0, e);
|
|
365
|
+
}
|
|
366
|
+
function Jr(t) {
|
|
367
|
+
let e = Un(t);
|
|
368
|
+
e && (t = t.slice(e.length + 1));
|
|
369
|
+
let s = Rn(t), { pragmas: r, comments: n } = qn(s);
|
|
370
|
+
return { shebang: e, text: t, pragmas: r, comments: n };
|
|
371
|
+
}
|
|
372
|
+
function Fn(t) {
|
|
373
|
+
let { pragmas: e } = Jr(t);
|
|
374
|
+
return Mn.some((s) => Object.prototype.hasOwnProperty.call(e, s));
|
|
375
|
+
}
|
|
376
|
+
function $n(t) {
|
|
377
|
+
let { pragmas: e } = Jr(t);
|
|
378
|
+
return Dn.some((s) => Object.prototype.hasOwnProperty.call(e, s));
|
|
379
|
+
}
|
|
380
|
+
function Wn(t) {
|
|
381
|
+
let { shebang: e, text: s, pragmas: r, comments: n } = Jr(t), i = In(s), o = Ln({ pragmas: { [Bn]: "", ...r }, comments: n.trimStart() });
|
|
382
|
+
return (e ? `${e}
|
|
383
|
+
` : "") + o + (i.startsWith(`
|
|
384
|
+
`) ? `
|
|
385
|
+
` : `
|
|
386
|
+
|
|
387
|
+
`) + i;
|
|
388
|
+
}
|
|
389
|
+
function zn(t) {
|
|
390
|
+
return t.findAncestor((e) => e.type === "css-decl")?.prop?.toLowerCase();
|
|
391
|
+
}
|
|
392
|
+
function jn(t) {
|
|
393
|
+
return fc.has(t.toLowerCase());
|
|
394
|
+
}
|
|
395
|
+
function Hn(t, e) {
|
|
396
|
+
return t.findAncestor((r) => r.type === "css-atrule")?.name?.toLowerCase().endsWith("keyframes") && ["from", "to"].includes(e.toLowerCase());
|
|
397
|
+
}
|
|
398
|
+
function Ie(t) {
|
|
399
|
+
return t.includes("$") || t.includes("@") || t.includes("#") || t.startsWith("%") || t.startsWith("--") || t.startsWith(":--") || t.includes("(") && t.includes(")") ? t : t.toLowerCase();
|
|
400
|
+
}
|
|
401
|
+
function qe(t, e) {
|
|
402
|
+
return t.findAncestor((r) => r.type === "value-func")?.value?.toLowerCase() === e;
|
|
403
|
+
}
|
|
404
|
+
function Kn(t) {
|
|
405
|
+
return t.hasAncestor((e) => {
|
|
406
|
+
if (e.type !== "css-rule") return !1;
|
|
407
|
+
let s = e.raws?.selector;
|
|
408
|
+
return s && (s.startsWith(":import") || s.startsWith(":export"));
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
function we(t, e) {
|
|
412
|
+
let s = Array.isArray(e) ? e : [e], r = t.findAncestor((n) => n.type === "css-atrule");
|
|
413
|
+
return r && s.includes(r.name.toLowerCase());
|
|
414
|
+
}
|
|
415
|
+
function Qn(t) {
|
|
416
|
+
let { node: e } = t;
|
|
417
|
+
return e.groups[0]?.value === "url" && e.groups.length === 2 && t.findAncestor((s) => s.type === "css-atrule")?.name === "import";
|
|
418
|
+
}
|
|
419
|
+
function Xn(t) {
|
|
420
|
+
return t.type === "value-func" && t.value.toLowerCase() === "url";
|
|
421
|
+
}
|
|
422
|
+
function Jn(t) {
|
|
423
|
+
return t.type === "value-func" && t.value.toLowerCase() === "var";
|
|
424
|
+
}
|
|
425
|
+
function Zn(t) {
|
|
426
|
+
let { selector: e } = t;
|
|
427
|
+
return e ? typeof e == "string" && /^@.+:.*$/u.test(e) || e.value && /^@.+:.*$/u.test(e.value) : !1;
|
|
428
|
+
}
|
|
429
|
+
function ei(t) {
|
|
430
|
+
return t.type === "value-word" && ["from", "through", "end"].includes(t.value);
|
|
431
|
+
}
|
|
432
|
+
function ti(t) {
|
|
433
|
+
return t.type === "value-word" && ["and", "or", "not"].includes(t.value);
|
|
434
|
+
}
|
|
435
|
+
function ri(t) {
|
|
436
|
+
return t.type === "value-word" && t.value === "in";
|
|
437
|
+
}
|
|
438
|
+
function Lt(t) {
|
|
439
|
+
return t.type === "value-operator" && t.value === "*";
|
|
440
|
+
}
|
|
441
|
+
function ve(t) {
|
|
442
|
+
return t?.type === "value-operator" && t.value === "/";
|
|
443
|
+
}
|
|
444
|
+
function J(t) {
|
|
445
|
+
return t.type === "value-operator" && t.value === "+";
|
|
446
|
+
}
|
|
447
|
+
function xe(t) {
|
|
448
|
+
return t.type === "value-operator" && t.value === "-";
|
|
449
|
+
}
|
|
450
|
+
function pc(t) {
|
|
451
|
+
return t.type === "value-operator" && t.value === "%";
|
|
452
|
+
}
|
|
453
|
+
function Dt(t) {
|
|
454
|
+
return Lt(t) || ve(t) || J(t) || xe(t) || pc(t);
|
|
455
|
+
}
|
|
456
|
+
function si(t) {
|
|
457
|
+
return t.type === "value-word" && ["==", "!="].includes(t.value);
|
|
458
|
+
}
|
|
459
|
+
function ni(t) {
|
|
460
|
+
return t.type === "value-word" && ["<", ">", "<=", ">="].includes(t.value);
|
|
461
|
+
}
|
|
462
|
+
function Je(t, e) {
|
|
463
|
+
return e.parser === "scss" && t.type === "css-atrule" && ["if", "else", "for", "each", "while"].includes(t.name);
|
|
464
|
+
}
|
|
465
|
+
function es(t) {
|
|
466
|
+
return t.raws?.params && /^\(\s*\)$/u.test(t.raws.params);
|
|
467
|
+
}
|
|
468
|
+
function Mt(t) {
|
|
469
|
+
return t.name.startsWith("prettier-placeholder");
|
|
470
|
+
}
|
|
471
|
+
function ii(t) {
|
|
472
|
+
return t.prop.startsWith("@prettier-placeholder");
|
|
473
|
+
}
|
|
474
|
+
function oi(t, e) {
|
|
475
|
+
return t.value === "$$" && t.type === "value-func" && e?.type === "value-word" && !e.raws.before;
|
|
476
|
+
}
|
|
477
|
+
function ai(t) {
|
|
478
|
+
return t.value?.type === "value-root" && t.value.group?.type === "value-value" && t.prop.toLowerCase() === "composes";
|
|
479
|
+
}
|
|
480
|
+
function ui(t) {
|
|
481
|
+
return t.value?.group?.group?.type === "value-paren_group" && t.value.group.group.open !== null && t.value.group.group.close !== null;
|
|
482
|
+
}
|
|
483
|
+
function Z(t) {
|
|
484
|
+
return t?.raws?.before === "";
|
|
485
|
+
}
|
|
486
|
+
function Bt(t) {
|
|
487
|
+
return t.type === "value-comma_group" && t.groups?.[1]?.type === "value-colon";
|
|
488
|
+
}
|
|
489
|
+
function Zr(t) {
|
|
490
|
+
return t.type === "value-paren_group" && t.groups?.[0] && Bt(t.groups[0]);
|
|
491
|
+
}
|
|
492
|
+
function ts(t, e) {
|
|
493
|
+
if (e.parser !== "scss") return !1;
|
|
494
|
+
let { node: s } = t;
|
|
495
|
+
if (s.groups.length === 0) return !1;
|
|
496
|
+
let r = t.grandparent;
|
|
497
|
+
return !Zr(s) && !(r && Zr(r)) ? !1 : !!(t.findAncestor((i) => i.type === "css-decl")?.prop?.startsWith("$") || Zr(r) || r.type === "value-func");
|
|
498
|
+
}
|
|
499
|
+
function Ze(t) {
|
|
500
|
+
return t.type === "value-comment" && t.inline;
|
|
501
|
+
}
|
|
502
|
+
function Ut(t) {
|
|
503
|
+
return t.type === "value-word" && t.value === "#";
|
|
504
|
+
}
|
|
505
|
+
function rs(t) {
|
|
506
|
+
return t.type === "value-word" && t.value === "{";
|
|
507
|
+
}
|
|
508
|
+
function Ft(t) {
|
|
509
|
+
return t.type === "value-word" && t.value === "}";
|
|
510
|
+
}
|
|
511
|
+
function et(t) {
|
|
512
|
+
return ["value-word", "value-atword"].includes(t.type);
|
|
513
|
+
}
|
|
514
|
+
function $t(t) {
|
|
515
|
+
return t?.type === "value-colon";
|
|
516
|
+
}
|
|
517
|
+
function li(t, e) {
|
|
518
|
+
if (!Bt(e)) return !1;
|
|
519
|
+
let { groups: s } = e, r = s.indexOf(t);
|
|
520
|
+
return r === -1 ? !1 : $t(s[r + 1]);
|
|
521
|
+
}
|
|
522
|
+
function ci(t) {
|
|
523
|
+
return t.value && ["not", "and", "or"].includes(t.value.toLowerCase());
|
|
524
|
+
}
|
|
525
|
+
function fi(t) {
|
|
526
|
+
return t.type !== "value-func" ? !1 : cc.has(t.value.toLowerCase());
|
|
527
|
+
}
|
|
528
|
+
function Le(t) {
|
|
529
|
+
return /\/\//u.test(t.split(/[\n\r]/u).pop());
|
|
530
|
+
}
|
|
531
|
+
function tt(t) {
|
|
532
|
+
return t?.type === "value-atword" && t.value.startsWith("prettier-placeholder-");
|
|
533
|
+
}
|
|
534
|
+
function pi(t, e) {
|
|
535
|
+
if (t.open?.value !== "(" || t.close?.value !== ")" || t.groups.some((s) => s.type !== "value-comma_group")) return !1;
|
|
536
|
+
if (e.type === "value-comma_group") {
|
|
537
|
+
let s = e.groups.indexOf(t) - 1, r = e.groups[s];
|
|
538
|
+
if (r?.type === "value-word" && r.value === "with") return !0;
|
|
539
|
+
}
|
|
540
|
+
return !1;
|
|
541
|
+
}
|
|
542
|
+
function rt(t) {
|
|
543
|
+
return t.type === "value-paren_group" && t.open?.value === "(" && t.close?.value === ")";
|
|
544
|
+
}
|
|
545
|
+
function hc(t, e, s) {
|
|
546
|
+
let { node: r } = t, n = t.parent, i = t.grandparent, o = zn(t), u = o && n.type === "value-value" && (o === "grid" || o.startsWith("grid-template")), a = t.findAncestor((p) => p.type === "css-atrule"), l = a && Je(a, e), f = r.groups.some((p) => Ze(p)), h = t.map(s, "groups"), c = [""], g = qe(t, "url"), b = !1, d = !1;
|
|
547
|
+
for (let p = 0; p < r.groups.length; ++p) {
|
|
548
|
+
let m = r.groups[p - 1], y = r.groups[p], v = r.groups[p + 1], O = r.groups[p + 2];
|
|
549
|
+
if (Ze(y) && !v) {
|
|
550
|
+
c.push([c.pop(), ln([" ", h[p]])]);
|
|
551
|
+
continue;
|
|
552
|
+
}
|
|
553
|
+
if (c.push([c.pop(), h[p]]), g) {
|
|
554
|
+
(v && J(v) || J(y)) && c.push([c.pop(), " "]);
|
|
555
|
+
continue;
|
|
556
|
+
}
|
|
557
|
+
if (we(t, "forward") && y.type === "value-word" && y.value && m !== void 0 && m.type === "value-word" && m.value === "as" && v.type === "value-operator" && v.value === "*" || we(t, "utility") && y.type === "value-word" && v && v.type === "value-operator" && v.value === "*" || !v || y.type === "value-word" && tt(v) && R(y) === P(v)) continue;
|
|
558
|
+
if (y.type === "value-string" && y.quoted) {
|
|
559
|
+
let k = y.value.lastIndexOf("#{"), N = y.value.lastIndexOf("}");
|
|
560
|
+
k !== -1 && N !== -1 ? b = k > N : k !== -1 ? b = !0 : N !== -1 && (b = !1);
|
|
561
|
+
}
|
|
562
|
+
if (b || $t(y) || $t(v) || y.type === "value-atword" && (y.value === "" || y.value.endsWith("[")) || v.type === "value-word" && v.value.startsWith("]") || y.value === "~" || e.parser === "less" && (v?.type === "value-word" && v.value === "[" || y.type === "value-word" && y.value === "[" && (v?.type === "value-atword" || v?.type === "value-word") || y.type === "value-word" && y.value === "][" && v?.type === "value-word") || y.type !== "value-string" && y.value && y.value.includes("\\") && v && v.type !== "value-comment" || m?.value && m.value.indexOf("\\") === m.value.length - 1 && y.type === "value-operator" && y.value === "/" || y.value === "\\" || oi(y, v) || Ut(y) || rs(y) || Ft(v) || rs(v) && Z(v) || Ft(y) && Z(v) || y.value === "--" && Ut(v)) continue;
|
|
563
|
+
let q = Dt(y), H = Dt(v);
|
|
564
|
+
if ((q && Ut(v) || H && Ft(y)) && Z(v) || !m && ve(y) || qe(t, "calc") && (J(y) || J(v) || xe(y) || xe(v)) && Z(v)) continue;
|
|
565
|
+
let ne = (J(y) || xe(y)) && p === 0 && (v.type === "value-number" || v.isHex) && i && fi(i) && !Z(v);
|
|
566
|
+
if (e.parser === "scss" && q && y.value === "-" && v.type === "value-func" && R(y) !== P(v)) {
|
|
567
|
+
c.push([c.pop(), " "]);
|
|
568
|
+
continue;
|
|
569
|
+
}
|
|
570
|
+
let W = O?.type === "value-func" || O && et(O) || y.type === "value-func" || et(y), A = v.type === "value-func" || et(v) || m?.type === "value-func" || m && et(m);
|
|
571
|
+
if (!(!(Lt(v) || Lt(y)) && !qe(t, "calc") && !ne && (ve(v) && !W || ve(y) && !A || J(v) && !W || J(y) && !A || xe(v) || xe(y)) && (Z(v) || q && (!m || m && Dt(m)))) && !((e.parser === "scss" || e.parser === "less") && q && y.value === "-" && rt(v) && R(y) === P(v.open) && v.open.value === "(")) {
|
|
572
|
+
if (Ze(y)) {
|
|
573
|
+
if (n.type === "value-paren_group") {
|
|
574
|
+
c.push(le(T), "");
|
|
575
|
+
continue;
|
|
576
|
+
}
|
|
577
|
+
c.push(T, "");
|
|
578
|
+
continue;
|
|
579
|
+
}
|
|
580
|
+
if (l && (si(v) || ni(v) || ti(v) || ri(y) || ei(y))) {
|
|
581
|
+
c.push([c.pop(), " "]);
|
|
582
|
+
continue;
|
|
583
|
+
}
|
|
584
|
+
if (a && a.name.toLowerCase() === "namespace") {
|
|
585
|
+
c.push([c.pop(), " "]);
|
|
586
|
+
continue;
|
|
587
|
+
}
|
|
588
|
+
if (u) {
|
|
589
|
+
y.source && v.source && y.source.start.line !== v.source.start.line ? (c.push(T, ""), d = !0) : c.push([c.pop(), " "]);
|
|
590
|
+
continue;
|
|
591
|
+
}
|
|
592
|
+
if (!(o && (o === "font" || o.startsWith("--")) && (ve(v) && Z(v) && hi(y) || ve(y) && Z(y) && hi(m)))) {
|
|
593
|
+
if (H) {
|
|
594
|
+
c.push([c.pop(), " "]);
|
|
595
|
+
continue;
|
|
596
|
+
}
|
|
597
|
+
if (v?.value !== "..." && !(tt(y) && tt(v) && R(y) === P(v))) {
|
|
598
|
+
if (tt(y) && rt(v) && R(y) === P(v.open)) {
|
|
599
|
+
c.push(M, "");
|
|
600
|
+
continue;
|
|
601
|
+
}
|
|
602
|
+
if (y.value === "with" && rt(v)) {
|
|
603
|
+
c = [[Pe(c), " "]];
|
|
604
|
+
continue;
|
|
605
|
+
}
|
|
606
|
+
if (!(y.value?.endsWith("#") && v.value === "{" && rt(v.group)) && !(Ze(v) && !O)) {
|
|
607
|
+
if (!a && y.type === "value-comment" && !y.inline && r.groups.slice(0, p).every((k) => k.type === "value-comment")) {
|
|
608
|
+
c.push(le(C), "");
|
|
609
|
+
continue;
|
|
610
|
+
}
|
|
611
|
+
c.push(C, "");
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
return f && c.push([c.pop(), Ne]), d && c.unshift("", T), l ? D(L(c)) : Qn(t) ? D(Pe(c)) : D(L(Pe(c)));
|
|
618
|
+
}
|
|
619
|
+
function hi(t) {
|
|
620
|
+
if (t?.type === "value-number") return !0;
|
|
621
|
+
if (t?.type !== "value-func") return !1;
|
|
622
|
+
let e = t.value.toLowerCase();
|
|
623
|
+
return e === "var" || e === "calc" || e === "min" || e === "max" || e === "clamp" || e.startsWith("--");
|
|
624
|
+
}
|
|
625
|
+
function dc(t) {
|
|
626
|
+
return t.length === 1 ? t : t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u, "$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u, "$1").replace(/^([+-])?\./u, "$10.").replace(/(\.\d+?)0+(?=e|$)/u, "$1").replace(/\.(?=e|$)/u, "");
|
|
627
|
+
}
|
|
628
|
+
function ss(t) {
|
|
629
|
+
let e = t.toLowerCase();
|
|
630
|
+
return Wt.has(e) ? Wt.get(e) : t;
|
|
631
|
+
}
|
|
632
|
+
function V(t, e) {
|
|
633
|
+
return E(0, t, yi, (s) => Nt(s, e));
|
|
634
|
+
}
|
|
635
|
+
function gi(t, e) {
|
|
636
|
+
let s = e.singleQuote ? "'" : '"', r = "", n = t.match(/^(?<value>.+?)\s+(?<flag>[a-zA-Z])$/u);
|
|
637
|
+
return n && ({ value: t, flag: r } = n.groups), (t.includes('"') || t.includes("'") ? t : s + t + s) + (r ? ` ${r}` : "");
|
|
638
|
+
}
|
|
639
|
+
function _e(t) {
|
|
640
|
+
return E(0, t, wc, (e, s, r, n, i) => !r && n && (i ?? (i = ""), i = i.toLowerCase(), !i || i === "n" || Wt.has(i)) ? ns(n) + (i ? ss(i) : "") : e);
|
|
641
|
+
}
|
|
642
|
+
function ns(t) {
|
|
643
|
+
return mi(t).replace(/\.0(?=$|e)/u, "");
|
|
644
|
+
}
|
|
645
|
+
function wi(t) {
|
|
646
|
+
return t.trailingComma === "es5" || t.trailingComma === "all";
|
|
647
|
+
}
|
|
648
|
+
function vc(t, e, s) {
|
|
649
|
+
let r = !!s?.backwards;
|
|
650
|
+
if (e === !1) return !1;
|
|
651
|
+
let n = t.charAt(e);
|
|
652
|
+
if (r) {
|
|
653
|
+
if (t.charAt(e - 1) === "\r" && n === `
|
|
654
|
+
`) return e - 2;
|
|
655
|
+
if (vi(n)) return e - 1;
|
|
656
|
+
} else {
|
|
657
|
+
if (n === "\r" && t.charAt(e + 1) === `
|
|
658
|
+
`) return e + 2;
|
|
659
|
+
if (vi(n)) return e + 1;
|
|
660
|
+
}
|
|
661
|
+
return e;
|
|
662
|
+
}
|
|
663
|
+
function xc(t, e, s = {}) {
|
|
664
|
+
let r = It(t, s.backwards ? e - 1 : e, s), n = Gt(t, r, s);
|
|
665
|
+
return r !== n;
|
|
666
|
+
}
|
|
667
|
+
function _c(t, e) {
|
|
668
|
+
if (e === !1) return !1;
|
|
669
|
+
if (t.charAt(e) === "/" && t.charAt(e + 1) === "*") {
|
|
670
|
+
for (let s = e + 2; s < t.length; ++s) if (t.charAt(s) === "*" && t.charAt(s + 1) === "/") return s + 2;
|
|
671
|
+
}
|
|
672
|
+
return e;
|
|
673
|
+
}
|
|
674
|
+
function bc(t, e) {
|
|
675
|
+
return e === !1 ? !1 : t.charAt(e) === "/" && t.charAt(e + 1) === "/" ? qt(t, e) : e;
|
|
676
|
+
}
|
|
677
|
+
function Ec(t, e) {
|
|
678
|
+
let s = null, r = e;
|
|
679
|
+
for (; r !== s; ) s = r, r = bn(t, r), r = xi(t, r), r = It(t, r);
|
|
680
|
+
return r = _i(t, r), r = Gt(t, r), r !== !1 && Yt(t, r);
|
|
681
|
+
}
|
|
682
|
+
function Sc({ node: t, parent: e }, s) {
|
|
683
|
+
return !!(t.source && s.originalText.slice(P(t), P(e.close)).trimEnd().endsWith(","));
|
|
684
|
+
}
|
|
685
|
+
function kc(t, e) {
|
|
686
|
+
return Jn(t.grandparent) && Sc(t, e) ? "," : t.node.type !== "value-comment" && !(t.node.type === "value-comma_group" && t.node.groups.every((s) => s.type === "value-comment")) && wi(e) && t.callParent(() => ts(t, e)) ? Ct(",") : "";
|
|
687
|
+
}
|
|
688
|
+
function bi(t, e, s) {
|
|
689
|
+
let { node: r, parent: n } = t, i = t.map(({ node: g }) => typeof g == "string" ? g : s(), "groups");
|
|
690
|
+
if (n && Xn(n) && (r.groups.length === 1 || r.groups.length > 0 && r.groups[0].type === "value-comma_group" && r.groups[0].groups.length > 0 && r.groups[0].groups[0].type === "value-word" && r.groups[0].groups[0].value.startsWith("data:"))) return [r.open ? s("open") : "", Y(",", i), r.close ? s("close") : ""];
|
|
691
|
+
if (!r.open) {
|
|
692
|
+
let g = is(t);
|
|
693
|
+
ye(i);
|
|
694
|
+
let b = Ac(Y(",", i), 2), d = Y(g ? T : C, b);
|
|
695
|
+
return L(g ? [T, d] : D([Tc(t) ? M : "", Pe(d)]));
|
|
696
|
+
}
|
|
697
|
+
let o = t.map(({ node: g, isLast: b, index: d }) => {
|
|
698
|
+
let p = i[d];
|
|
699
|
+
Bt(g) && g.type === "value-comma_group" && g.groups && g.groups[0].type !== "value-paren_group" && g.groups[2]?.type === "value-paren_group" && ue(p) === oe && ue(p.contents) === ie && ue(p.contents.contents) === ae && (p = D(le(p)));
|
|
700
|
+
let m = [p, b ? kc(t, e) : ","];
|
|
701
|
+
if (!b && g.type === "value-comma_group" && ce(g.groups)) {
|
|
702
|
+
let y = G(0, g.groups, -1);
|
|
703
|
+
!y.source && y.close && (y = y.close), y.source && Vt(e.originalText, R(y)) && m.push(T);
|
|
704
|
+
}
|
|
705
|
+
return m;
|
|
706
|
+
}, "groups"), u = li(r, n), a = pi(r, n), l = ts(t, e), f = a || l && !u, h = a || u, c = D([r.open ? s("open") : "", L([M, Y(C, o)]), M, r.close ? s("close") : ""], { shouldBreak: f });
|
|
707
|
+
return h ? le(c) : c;
|
|
708
|
+
}
|
|
709
|
+
function is(t) {
|
|
710
|
+
return t.match((e) => e.type === "value-paren_group" && !e.open && e.groups.some((s) => s.type === "value-comma_group"), (e, s) => s === "group" && e.type === "value-value", (e, s) => s === "group" && e.type === "value-root", (e, s) => s === "value" && (e.type === "css-decl" && !e.prop.startsWith("--") || e.type === "css-atrule" && e.variable));
|
|
711
|
+
}
|
|
712
|
+
function Tc(t) {
|
|
713
|
+
return t.match((e) => e.type === "value-paren_group" && !e.open, (e, s) => s === "group" && e.type === "value-value", (e, s) => s === "group" && e.type === "value-root", (e, s) => s === "value" && e.type === "css-decl");
|
|
714
|
+
}
|
|
715
|
+
function Ac(t, e) {
|
|
716
|
+
let s = [];
|
|
717
|
+
for (let r = 0; r < t.length; r += e) s.push(t.slice(r, r + e));
|
|
718
|
+
return s;
|
|
719
|
+
}
|
|
720
|
+
function Oc(t, e, s) {
|
|
721
|
+
let r = [];
|
|
722
|
+
return t.each(() => {
|
|
723
|
+
let { node: n, previous: i } = t;
|
|
724
|
+
if (i?.type === "css-comment" && i.text.trim() === "prettier-ignore" ? r.push(e.originalText.slice(P(n), R(n))) : r.push(s()), t.isLast) return;
|
|
725
|
+
let { next: o } = t;
|
|
726
|
+
o.type === "css-comment" && !Yt(e.originalText, P(o), { backwards: !0 }) && !Re(n) || o.type === "css-atrule" && o.name === "else" && n.type !== "css-comment" ? r.push(" ") : (r.push(e.__isHTMLStyleAttribute ? C : T), Vt(e.originalText, R(n)) && !Re(n) && r.push(T));
|
|
727
|
+
}, "nodes"), r;
|
|
728
|
+
}
|
|
729
|
+
function Cc(t, e, s) {
|
|
730
|
+
let { node: r } = t;
|
|
731
|
+
switch (r.type) {
|
|
732
|
+
case "css-root": {
|
|
733
|
+
let n = De(t, e, s), i = r.raws.after.trim();
|
|
734
|
+
return i.startsWith(";") && (i = i.slice(1).trim()), [r.frontMatter ? [s("frontMatter"), T, r.nodes.length > 0 ? T : ""] : "", n, i ? ` ${i}` : "", r.nodes.length > 0 ? T : ""];
|
|
735
|
+
}
|
|
736
|
+
case "css-comment": {
|
|
737
|
+
let n = r.inline || r.raws.inline, i = e.originalText.slice(P(r), R(r));
|
|
738
|
+
return n ? i.trimEnd() : i;
|
|
739
|
+
}
|
|
740
|
+
case "css-rule":
|
|
741
|
+
return [s("selector"), r.important ? " !important" : "", r.nodes ? [r.selector?.type === "selector-unknown" && Le(r.selector.value) ? C : r.selector ? " " : "", "{", r.nodes.length > 0 ? L([T, De(t, e, s)]) : "", T, "}", Zn(r) ? ";" : ""] : ";"];
|
|
742
|
+
case "css-decl": {
|
|
743
|
+
let n = t.parent, { between: i } = r.raws, o = i.trim(), u = o === ":", a = typeof r.value == "string" && /^ *$/u.test(r.value), l = typeof r.value == "string" ? r.value : s("value");
|
|
744
|
+
return l = ai(r) ? on(l) : l, !u && Le(o) && !t.call(() => is(t), "value", "group", "group") && (l = L([T, le(l)])), [E(0, r.raws.before, /[\s;]/gu, ""), n.type === "css-atrule" && n.variable || Kn(t) ? r.prop : Ie(r.prop), o.startsWith("//") ? " " : "", o, r.extend || a ? "" : " ", e.parser === "less" && r.extend && r.selector ? ["extend(", s("selector"), ")"] : "", l, r.raws.important ? r.raws.important.replace(/\s*!\s*important/iu, " !important") : r.important ? " !important" : "", r.raws.scssDefault ? r.raws.scssDefault.replace(/\s*!default/iu, " !default") : r.scssDefault ? " !default" : "", r.raws.scssGlobal ? r.raws.scssGlobal.replace(/\s*!global/iu, " !global") : r.scssGlobal ? " !global" : "", r.nodes ? [" {", L([M, De(t, e, s)]), M, "}"] : ii(r) && !n.raws.semicolon && e.originalText[R(r) - 1] !== ";" ? "" : e.__isHTMLStyleAttribute && t.isLast ? Ct(";") : ";"];
|
|
745
|
+
}
|
|
746
|
+
case "css-atrule": {
|
|
747
|
+
let n = t.parent, i = Mt(r) && !n.raws.semicolon && e.originalText[R(r) - 1] !== ";";
|
|
748
|
+
if (e.parser === "less") {
|
|
749
|
+
if (r.mixin) return [s("selector"), r.important ? " !important" : "", i ? "" : ";"];
|
|
750
|
+
if (r.function) return [r.name, typeof r.params == "string" ? r.params : s("params"), i ? "" : ";"];
|
|
751
|
+
if (r.variable) return ["@", r.name, ": ", r.value ? s("value") : "", r.raws.between.trim() ? r.raws.between.trim() + " " : "", r.nodes ? ["{", L([r.nodes.length > 0 ? M : "", De(t, e, s)]), M, "}"] : "", i ? "" : ";"];
|
|
752
|
+
}
|
|
753
|
+
let o = r.name === "import" && r.params?.type === "value-unknown" && r.params.value.endsWith(";");
|
|
754
|
+
return ["@", es(r) || r.name.endsWith(":") || Mt(r) ? r.name : Ie(r.name), r.params ? [es(r) ? "" : Mt(r) ? r.raws.afterName === "" ? "" : r.name.endsWith(":") ? " " : /^\s*\n\s*\n/u.test(r.raws.afterName) ? [T, T] : /^\s*\n/u.test(r.raws.afterName) ? T : " " : " ", typeof r.params == "string" ? r.params : s("params")] : "", r.selector ? L([" ", s("selector")]) : "", r.value ? D([" ", s("value"), Je(r, e) ? ui(r) ? " " : C : ""]) : r.name === "else" ? " " : "", r.nodes ? [Je(r, e) ? "" : r.selector && !r.selector.nodes && typeof r.selector.value == "string" && Le(r.selector.value) || !r.selector && typeof r.params == "string" && Le(r.params) ? C : " ", "{", L([r.nodes.length > 0 ? M : "", De(t, e, s)]), M, "}"] : i || o ? "" : ";"];
|
|
755
|
+
}
|
|
756
|
+
case "media-query-list": {
|
|
757
|
+
let n = [];
|
|
758
|
+
return t.each(({ node: i }) => {
|
|
759
|
+
i.type === "media-query" && i.value === "" || n.push(s());
|
|
760
|
+
}, "nodes"), D(L(Y(C, n)));
|
|
761
|
+
}
|
|
762
|
+
case "media-query":
|
|
763
|
+
return [Y(" ", t.map(s, "nodes")), t.isLast ? "" : ","];
|
|
764
|
+
case "media-type":
|
|
765
|
+
return _e(V(r.value, e));
|
|
766
|
+
case "media-feature-expression":
|
|
767
|
+
return r.nodes ? ["(", ...t.map(s, "nodes"), ")"] : r.value;
|
|
768
|
+
case "media-feature":
|
|
769
|
+
return Ie(V(E(0, r.value, / +/gu, " "), e));
|
|
770
|
+
case "media-colon":
|
|
771
|
+
return [r.value, " "];
|
|
772
|
+
case "media-value":
|
|
773
|
+
return _e(V(r.value, e));
|
|
774
|
+
case "media-keyword":
|
|
775
|
+
return V(r.value, e);
|
|
776
|
+
case "media-url":
|
|
777
|
+
return V(E(0, E(0, r.value, /^url\(\s+/giu, "url("), /\s+\)$/gu, ")"), e);
|
|
778
|
+
case "media-unknown":
|
|
779
|
+
return r.value;
|
|
780
|
+
case "selector-root":
|
|
781
|
+
return D([we(t, "custom-selector") ? [t.findAncestor((n) => n.type === "css-atrule").customSelector, C] : "", Y([",", we(t, ["extend", "custom-selector", "nest"]) ? C : T], t.map(s, "nodes"))]);
|
|
782
|
+
case "selector-selector": {
|
|
783
|
+
let n = r.nodes.length > 2;
|
|
784
|
+
return D((n ? L : (i) => i)(t.map(s, "nodes")));
|
|
785
|
+
}
|
|
786
|
+
case "selector-comment":
|
|
787
|
+
return r.value;
|
|
788
|
+
case "selector-string":
|
|
789
|
+
return V(r.value, e);
|
|
790
|
+
case "selector-tag":
|
|
791
|
+
return [r.namespace ? [r.namespace === !0 ? "" : r.namespace.trim(), "|"] : "", t.previous?.type === "selector-nesting" ? r.value : _e(Hn(t, r.value) ? r.value.toLowerCase() : r.value)];
|
|
792
|
+
case "selector-id":
|
|
793
|
+
return ["#", r.value];
|
|
794
|
+
case "selector-class":
|
|
795
|
+
return [".", _e(V(r.value, e))];
|
|
796
|
+
case "selector-attribute":
|
|
797
|
+
return ["[", r.namespace ? [r.namespace === !0 ? "" : r.namespace.trim(), "|"] : "", r.attribute.trim(), r.operator ?? "", r.value ? gi(V(r.value.trim(), e), e) : "", r.insensitive ? " i" : "", "]"];
|
|
798
|
+
case "selector-combinator": {
|
|
799
|
+
if (r.value === "+" || r.value === ">" || r.value === "~" || r.value === ">>>") {
|
|
800
|
+
let o = t.parent;
|
|
801
|
+
return [o.type === "selector-selector" && o.nodes[0] === r ? "" : C, r.value, t.isLast ? "" : " "];
|
|
802
|
+
}
|
|
803
|
+
let n = r.value.trim().startsWith("(") ? C : "", i = _e(V(r.value.trim(), e)) || C;
|
|
804
|
+
return [n, i];
|
|
805
|
+
}
|
|
806
|
+
case "selector-universal":
|
|
807
|
+
return [r.namespace ? [r.namespace === !0 ? "" : r.namespace.trim(), "|"] : "", r.value];
|
|
808
|
+
case "selector-pseudo":
|
|
809
|
+
return [Ie(r.value), ce(r.nodes) ? D(["(", L([M, Y([",", C], t.map(s, "nodes"))]), M, ")"]) : ""];
|
|
810
|
+
case "selector-nesting":
|
|
811
|
+
return r.value;
|
|
812
|
+
case "selector-unknown": {
|
|
813
|
+
if (t.findAncestor((u) => u.type === "css-rule")?.isSCSSNesterProperty) return _e(V(Ie(r.value), e));
|
|
814
|
+
let i = t.parent;
|
|
815
|
+
if (i.raws?.selector) {
|
|
816
|
+
let u = P(i), a = u + i.raws.selector.length;
|
|
817
|
+
return e.originalText.slice(u, a).trim();
|
|
818
|
+
}
|
|
819
|
+
let o = t.grandparent;
|
|
820
|
+
if (i.type === "value-paren_group" && o?.type === "value-func" && o.value === "selector") {
|
|
821
|
+
let u = R(i.open) + 1, a = P(i.close), l = e.originalText.slice(u, a).trim();
|
|
822
|
+
return Le(l) ? [Ne, l] : l;
|
|
823
|
+
}
|
|
824
|
+
return r.value;
|
|
825
|
+
}
|
|
826
|
+
case "value-value":
|
|
827
|
+
case "value-root":
|
|
828
|
+
return s("group");
|
|
829
|
+
case "value-comment":
|
|
830
|
+
return e.originalText.slice(P(r), R(r));
|
|
831
|
+
case "value-comma_group":
|
|
832
|
+
return di(t, e, s);
|
|
833
|
+
case "value-paren_group":
|
|
834
|
+
return bi(t, e, s);
|
|
835
|
+
case "value-func":
|
|
836
|
+
return [r.value, we(t, "supports") && ci(r) ? " " : "", s("group")];
|
|
837
|
+
case "value-paren":
|
|
838
|
+
return r.value;
|
|
839
|
+
case "value-number":
|
|
840
|
+
return [ns(r.value), ss(r.unit)];
|
|
841
|
+
case "value-operator":
|
|
842
|
+
return r.value;
|
|
843
|
+
case "value-word":
|
|
844
|
+
return r.isColor && r.isHex || jn(r.value) ? r.value.toLowerCase() : r.value;
|
|
845
|
+
case "value-colon": {
|
|
846
|
+
let { previous: n } = t;
|
|
847
|
+
return D([r.value, typeof n?.value == "string" && n.value.endsWith("\\") || qe(t, "url") ? "" : C]);
|
|
848
|
+
}
|
|
849
|
+
case "value-string":
|
|
850
|
+
return Nt(r.raws.quote + r.value + r.raws.quote, e);
|
|
851
|
+
case "value-atword":
|
|
852
|
+
return ["@", r.value];
|
|
853
|
+
case "value-unicode-range":
|
|
854
|
+
return r.value;
|
|
855
|
+
case "value-unknown":
|
|
856
|
+
return r.value;
|
|
857
|
+
case "front-matter":
|
|
858
|
+
case "value-comma":
|
|
859
|
+
default:
|
|
860
|
+
throw new dn(r, "PostCSS");
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
function gp(t, e) {
|
|
864
|
+
let s = new SyntaxError(t + " (" + e.loc.start.line + ":" + e.loc.start.column + ")");
|
|
865
|
+
return Object.assign(s, e);
|
|
866
|
+
}
|
|
867
|
+
function wp(t) {
|
|
868
|
+
return t !== null && typeof t == "object";
|
|
869
|
+
}
|
|
870
|
+
function te(t, e, s) {
|
|
871
|
+
if (Se(t)) {
|
|
872
|
+
delete t.parent;
|
|
873
|
+
for (let r in t) te(t[r], e, s), r === "type" && typeof t[r] == "string" && !t[r].startsWith(e) && (!s || !s.test(t[r])) && (t[r] = e + t[r]);
|
|
874
|
+
}
|
|
875
|
+
return t;
|
|
876
|
+
}
|
|
877
|
+
function Bs(t) {
|
|
878
|
+
if (Se(t)) {
|
|
879
|
+
delete t.parent;
|
|
880
|
+
for (let e in t) Bs(t[e]);
|
|
881
|
+
!Array.isArray(t) && t.value && !t.type && (t.type = "unknown");
|
|
882
|
+
}
|
|
883
|
+
return t;
|
|
884
|
+
}
|
|
885
|
+
function Pp(t) {
|
|
886
|
+
let e;
|
|
887
|
+
try {
|
|
888
|
+
e = Np(t);
|
|
889
|
+
} catch {
|
|
890
|
+
return { type: "selector-unknown", value: t };
|
|
891
|
+
}
|
|
892
|
+
return te(Bs(e), "media-");
|
|
893
|
+
}
|
|
894
|
+
function Vm(t) {
|
|
895
|
+
if (/\/[/*]/u.test(E(0, t, /"[^"]+"|'[^']+'/gu, ""))) return { type: "selector-unknown", value: t.trim() };
|
|
896
|
+
let e;
|
|
897
|
+
try {
|
|
898
|
+
new gu.default((s) => {
|
|
899
|
+
e = s;
|
|
900
|
+
}).process(t);
|
|
901
|
+
} catch {
|
|
902
|
+
return { type: "selector-unknown", value: t };
|
|
903
|
+
}
|
|
904
|
+
return te(e, "selector-");
|
|
905
|
+
}
|
|
906
|
+
function qy(t) {
|
|
907
|
+
return Gr(t).text.slice(t.group.open.sourceIndex + 1, t.group.close.sourceIndex).trim();
|
|
908
|
+
}
|
|
909
|
+
function Ly(t) {
|
|
910
|
+
if (ce(t)) {
|
|
911
|
+
for (let e = t.length - 1; e > 0; e--) if (t[e].type === "word" && t[e].value === "{" && t[e - 1].type === "word" && t[e - 1].value.endsWith("#")) return !0;
|
|
912
|
+
}
|
|
913
|
+
return !1;
|
|
914
|
+
}
|
|
915
|
+
function Dy(t) {
|
|
916
|
+
return t.some((e) => e.type === "string" || e.type === "func" && !e.value.endsWith("\\"));
|
|
917
|
+
}
|
|
918
|
+
function My(t, e) {
|
|
919
|
+
return !!(e.parser === "scss" && t?.type === "word" && t.value.startsWith("$"));
|
|
920
|
+
}
|
|
921
|
+
function By(t, e) {
|
|
922
|
+
let { nodes: s } = t, r = { open: null, close: null, groups: [], type: "paren_group" }, n = [r], i = r, o = { groups: [], type: "comma_group" }, u = [o];
|
|
923
|
+
for (let a = 0; a < s.length; ++a) {
|
|
924
|
+
let l = s[a];
|
|
925
|
+
if (e.parser === "scss" && l.type === "number" && l.unit === ".." && l.value.endsWith(".") && (l.value = l.value.slice(0, -1), l.unit = "..."), l.type === "func" && l.value === "selector" && (l.group.groups = [se(Gr(t).text.slice(l.group.open.sourceIndex + 1, l.group.close.sourceIndex))]), l.type === "func" && l.value === "url") {
|
|
926
|
+
let f = l.group?.groups ?? [], h = [];
|
|
927
|
+
for (let c = 0; c < f.length; c++) {
|
|
928
|
+
let g = f[c];
|
|
929
|
+
g.type === "comma_group" ? h = [...h, ...g.groups] : h.push(g);
|
|
930
|
+
}
|
|
931
|
+
(ol(h) || !al(h) && !ul(h[0], e)) && (l.group.groups = [il(l)]);
|
|
932
|
+
}
|
|
933
|
+
if (l.type === "paren" && l.value === "(") r = { open: l, close: null, groups: [], type: "paren_group" }, n.push(r), o = { groups: [], type: "comma_group" }, u.push(o);
|
|
934
|
+
else if (ll(l)) {
|
|
935
|
+
if (o.groups.length > 0 && r.groups.push(o), r.close = l, u.length === 1) throw new Error("Unbalanced parenthesis");
|
|
936
|
+
u.pop(), o = G(0, u, -1), o.groups.push(r), n.pop(), r = G(0, n, -1);
|
|
937
|
+
} else if (l.type === "comma") {
|
|
938
|
+
if (a === s.length - 3 && s[a + 1].type === "comment" && ll(s[a + 2])) continue;
|
|
939
|
+
r.groups.push(o), o = { groups: [], type: "comma_group" }, u[u.length - 1] = o;
|
|
940
|
+
} else o.groups.push(l);
|
|
941
|
+
}
|
|
942
|
+
return o.groups.length > 0 && r.groups.push(o), i;
|
|
943
|
+
}
|
|
944
|
+
function Yr(t) {
|
|
945
|
+
return t.type === "paren_group" && !t.open && !t.close && t.groups.length === 1 || t.type === "comma_group" && t.groups.length === 1 ? Yr(t.groups[0]) : t.type === "paren_group" || t.type === "comma_group" ? { ...t, groups: t.groups.map(Yr) } : t;
|
|
946
|
+
}
|
|
947
|
+
function fl(t, e) {
|
|
948
|
+
if (Se(t)) for (let s in t) s !== "parent" && (fl(t[s], e), s === "nodes" && (t.group = Yr(By(t, e)), delete t[s]));
|
|
949
|
+
return t;
|
|
950
|
+
}
|
|
951
|
+
function Uy(t, e) {
|
|
952
|
+
if (e.parser === "less" && t.startsWith("~`")) return { type: "value-unknown", value: t };
|
|
953
|
+
let s = null;
|
|
954
|
+
try {
|
|
955
|
+
s = new cl.default(t, { loose: !0 }).parse();
|
|
956
|
+
} catch {
|
|
957
|
+
return { type: "value-unknown", value: t };
|
|
958
|
+
}
|
|
959
|
+
s.text = t;
|
|
960
|
+
let r = fl(s, e);
|
|
961
|
+
return te(r, "value-", /^selector-/u);
|
|
962
|
+
}
|
|
963
|
+
function $y(t) {
|
|
964
|
+
return Fy.has(t);
|
|
965
|
+
}
|
|
966
|
+
function Wy(t, e) {
|
|
967
|
+
return e.parser !== "scss" || !t.selector ? !1 : t.selector.replace(/\/\*.*?\*\//u, "").replace(/\/\/.*\n/u, "").trim().endsWith(":");
|
|
968
|
+
}
|
|
969
|
+
function gl(t, e) {
|
|
970
|
+
if (Se(t)) {
|
|
971
|
+
delete t.parent;
|
|
972
|
+
for (let i in t) gl(t[i], e);
|
|
973
|
+
if (!t.type) return t;
|
|
974
|
+
if (t.raws ?? (t.raws = {}), t.type === "css-decl" && typeof t.prop == "string" && t.prop.startsWith("--") && typeof t.value == "string" && t.value.startsWith("{")) {
|
|
975
|
+
let i;
|
|
976
|
+
if (t.value.trimEnd().endsWith("}")) {
|
|
977
|
+
let o = e.originalText.slice(0, t.source.start.offset), u = "a".repeat(t.prop.length) + e.originalText.slice(t.source.start.offset + t.prop.length, t.source.end.offset), a = E(0, o, /[^\n]/gu, " ") + u, l;
|
|
978
|
+
e.parser === "scss" ? l = xl : e.parser === "less" ? l = vl : l = wl;
|
|
979
|
+
let f;
|
|
980
|
+
try {
|
|
981
|
+
f = l(a, { ...e });
|
|
982
|
+
} catch {
|
|
983
|
+
}
|
|
984
|
+
f?.nodes?.length === 1 && f.nodes[0].type === "css-rule" && (i = f.nodes[0].nodes);
|
|
985
|
+
}
|
|
986
|
+
return i ? t.value = { type: "css-rule", nodes: i } : t.value = { type: "value-unknown", value: t.raws.value.raw }, t;
|
|
987
|
+
}
|
|
988
|
+
let s = "";
|
|
989
|
+
typeof t.selector == "string" && (s = t.raws.selector ? t.raws.selector.scss ?? t.raws.selector.raw : t.selector, t.raws.between && t.raws.between.trim().length > 0 && (s += t.raws.between), t.raws.selector = s);
|
|
990
|
+
let r = "";
|
|
991
|
+
typeof t.value == "string" && (r = t.raws.value ? t.raws.value.scss ?? t.raws.value.raw : t.value, t.raws.value = r.trim());
|
|
992
|
+
let n = "";
|
|
993
|
+
if (typeof t.params == "string" && (n = t.raws.params ? t.raws.params.scss ?? t.raws.params.raw : t.params, t.raws.afterName && t.raws.afterName.trim().length > 0 && (n = t.raws.afterName + n), t.raws.between && t.raws.between.trim().length > 0 && (n = n + t.raws.between), n = n.trim(), t.raws.params = n), s.trim().length > 0) return s.startsWith("@") && s.endsWith(":") ? t : t.mixin ? (t.selector = de(s, e), t) : (hl(t, e) && (t.isSCSSNesterProperty = !0), t.selector = se(s), t);
|
|
994
|
+
if (r.trim().length > 0) {
|
|
995
|
+
let i = r.match(Gy);
|
|
996
|
+
i && (r = r.slice(0, i.index), t.scssDefault = !0, i[0].trim() !== "!default" && (t.raws.scssDefault = i[0]));
|
|
997
|
+
let o = r.match(Yy);
|
|
998
|
+
if (o && (r = r.slice(0, o.index), t.scssGlobal = !0, o[0].trim() !== "!global" && (t.raws.scssGlobal = o[0])), r.startsWith("progid:")) return { type: "value-unknown", value: r };
|
|
999
|
+
t.value = de(r, e);
|
|
1000
|
+
}
|
|
1001
|
+
if (e.parser === "less" && t.type === "css-decl" && r.startsWith("extend(") && (t.extend || (t.extend = t.raws.between === ":"), t.extend && !t.selector && (delete t.value, t.selector = se(r.slice(7, -1)))), t.type === "css-atrule") {
|
|
1002
|
+
if (e.parser === "less") {
|
|
1003
|
+
if (t.mixin) {
|
|
1004
|
+
let i = t.raws.identifier + t.name + t.raws.afterName + t.raws.params;
|
|
1005
|
+
return t.selector = se(i), delete t.params, t;
|
|
1006
|
+
}
|
|
1007
|
+
if (t.function) return t;
|
|
1008
|
+
}
|
|
1009
|
+
if (e.parser === "css" && t.name === "custom-selector") {
|
|
1010
|
+
let i = t.params.match(/:--\S+\s+/u)[0].trim();
|
|
1011
|
+
return t.customSelector = i, t.selector = se(t.params.slice(i.length).trim()), delete t.params, t;
|
|
1012
|
+
}
|
|
1013
|
+
if (e.parser === "less") {
|
|
1014
|
+
if (t.name.includes(":")) {
|
|
1015
|
+
t.variable = !0;
|
|
1016
|
+
let i = t.name.split(":");
|
|
1017
|
+
t.name = i[0];
|
|
1018
|
+
let o = i.slice(1).join(":");
|
|
1019
|
+
t.params && (o += t.params), t.value = de(o, e);
|
|
1020
|
+
}
|
|
1021
|
+
if (!["page", "nest", "keyframes"].includes(t.name) && t.params?.[0] === ":") {
|
|
1022
|
+
t.variable = !0;
|
|
1023
|
+
let i = t.params.slice(1);
|
|
1024
|
+
i && (t.value = de(i, e)), t.raws.afterName += ":";
|
|
1025
|
+
}
|
|
1026
|
+
if (t.variable) return delete t.params, t.value || delete t.value, t;
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
if (t.type === "css-atrule" && n.length > 0) {
|
|
1030
|
+
let { name: i } = t, o = t.name.toLowerCase();
|
|
1031
|
+
return i === "warn" || i === "error" ? (t.params = { type: "media-unknown", value: n }, t) : i === "extend" || i === "nest" ? (t.selector = se(n), delete t.params, t) : i === "at-root" ? (/^\(\s*(?:without|with)\s*:.+\)$/su.test(n) ? t.params = de(n, e) : (t.selector = se(n), delete t.params), t) : pl(o) ? (t.import = !0, delete t.filename, t.params = de(n, e), t) : ["namespace", "supports", "if", "else", "for", "each", "while", "debug", "mixin", "include", "function", "return", "define-mixin", "add-mixin"].includes(i) ? (n = n.replace(/(\$\S+?)(\s+)?\.{3}/u, "$1...$2"), n = n.replace(/^(?!if)([^"'\s(]+)(\s+)\(/u, "$1($2"), t.value = de(n, e), delete t.params, t) : ["media", "custom-media"].includes(o) ? n.includes("#{") ? { type: "media-unknown", value: n } : (t.params = Ea(n), t) : (t.params = n, t);
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
return t;
|
|
1035
|
+
}
|
|
1036
|
+
function Js(t, e, s) {
|
|
1037
|
+
let { frontMatter: r, content: n } = ge(e), i;
|
|
1038
|
+
try {
|
|
1039
|
+
i = t(n, { map: !1 });
|
|
1040
|
+
} catch (o) {
|
|
1041
|
+
let { name: u, reason: a, line: l, column: f } = o;
|
|
1042
|
+
throw typeof l != "number" ? o : ma(`${u}: ${a}`, { loc: { start: { line: l, column: f } }, cause: o });
|
|
1043
|
+
}
|
|
1044
|
+
return s.originalText = e, i = gl(te(i, "css-"), s), Xr(i, e), r && (i.frontMatter = { ...r, type: "front-matter", source: { startOffset: r.start.index, endOffset: r.end.index } }), i;
|
|
1045
|
+
}
|
|
1046
|
+
function wl(t, e = {}) {
|
|
1047
|
+
return Js(dl.default.default, t, e);
|
|
1048
|
+
}
|
|
1049
|
+
function vl(t, e = {}) {
|
|
1050
|
+
return Js((s) => ml.default.parse(Tn(s)), t, e);
|
|
1051
|
+
}
|
|
1052
|
+
function xl(t, e = {}) {
|
|
1053
|
+
return Js(yl.default, t, e);
|
|
1054
|
+
}
|
|
1055
|
+
var bl, Vr, El, Sl, kl, Tl, w, sn, Al, Te, Oi, as, zt, jt, it, Ht, ut, Me, ft, fe, Hi, Ki, hs, Ue, Qt, $e, ws, Xt, er, tr, ht, wo, xo, bo, So, Oo, Po, Io, qo, sr, Uo, bs, Es, nr, Ss, As, Qo, Jo, ir, aa, ca, pa, da, Rs, qs, xa, _a, Us, Fs, $s, ke, B, fr, Pa, Ia, Ye, Da, Ba, Fa, Wa, Ya, za, Ha, Qa, Ja, eu, ru, fu, du, yu, j, F, _u, Eu, Tu, Ou, Nu, Ru, Lu, Mu, Uu, $u, Gu, Vu, ju, Ku, Ju, el, nl, _l, bt, Ol, Cl, E, Pl, G, Rl, K, je, He, Et, ie, Ae, St, oe, ae, me, kt, Oe, Tt, X, At, Ce, Ot, ue, ql, zr, nn, $, ye, an, un, Ne, C, M, Ul, T, ce, cn, fn, Wl, Gl, pn, Vl, hn, Nt, jr, dn, Pt, Re, Ke, ge, Xl, yn, wn, Qe, Zl, vn, _, xn, tc, _n, Kr, Bw, It, bn, qt, P, R, nc, ic, Nn, oc, An, ac, On, uc, Pn, Dn, Mn, Bn, Un, Gn, Yn, Vn, cc, fc, di, mi, Wt, yi, mc, yc, gc, wc, vi, Gt, Yt, xi, _i, Vt, De, Nc, Ei, Si, ki, Pc, Ti, en, dl, ml, yl, ma, Se, ba, Np, Ea, gu, se, cl, Iy, Gr, il, ol, al, ul, ll, de, Fy, pl, hl, Gy, Yy, Zs, Vy, zy, jy, Hy, init_postcss = __esm({
|
|
1056
|
+
"../../node_modules/.pnpm/prettier@3.7.4/node_modules/prettier/plugins/postcss.mjs"() {
|
|
1057
|
+
init_cjs_shims();
|
|
1058
|
+
bl = Object.create, Vr = Object.defineProperty, El = Object.getOwnPropertyDescriptor, Sl = Object.getOwnPropertyNames, kl = Object.getPrototypeOf, Tl = Object.prototype.hasOwnProperty, w = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), sn = (t, e) => {
|
|
1059
|
+
for (var s in e) Vr(t, s, { get: e[s], enumerable: !0 });
|
|
1060
|
+
}, Al = (t, e, s, r) => {
|
|
1061
|
+
if (e && typeof e == "object" || typeof e == "function") for (let n of Sl(e)) !Tl.call(t, n) && n !== s && Vr(t, n, { get: () => e[n], enumerable: !(r = El(e, n)) || r.enumerable });
|
|
1062
|
+
return t;
|
|
1063
|
+
}, Te = (t, e, s) => (s = t != null ? bl(kl(t)) : {}, Al(e || !t || !t.__esModule ? Vr(s, "default", { value: t, enumerable: !0 }) : s, t)), Oi = w((ux, os) => {
|
|
1064
|
+
var x = String, Ai = function() {
|
|
1065
|
+
return { isColorSupported: !1, reset: x, bold: x, dim: x, italic: x, underline: x, inverse: x, hidden: x, strikethrough: x, black: x, red: x, green: x, yellow: x, blue: x, magenta: x, cyan: x, white: x, gray: x, bgBlack: x, bgRed: x, bgGreen: x, bgYellow: x, bgBlue: x, bgMagenta: x, bgCyan: x, bgWhite: x, blackBright: x, redBright: x, greenBright: x, yellowBright: x, blueBright: x, magentaBright: x, cyanBright: x, whiteBright: x, bgBlackBright: x, bgRedBright: x, bgGreenBright: x, bgYellowBright: x, bgBlueBright: x, bgMagentaBright: x, bgCyanBright: x, bgWhiteBright: x };
|
|
1066
|
+
};
|
|
1067
|
+
os.exports = Ai(), os.exports.createColors = Ai;
|
|
1068
|
+
}), as = w(() => {
|
|
1069
|
+
}), zt = w((fx, Pi) => {
|
|
1070
|
+
"use strict";
|
|
1071
|
+
var Ci = Oi(), Ni = as(), st = class t extends Error {
|
|
1072
|
+
constructor(e, s, r, n, i, o) {
|
|
1073
|
+
super(e), this.name = "CssSyntaxError", this.reason = e, i && (this.file = i), n && (this.source = n), o && (this.plugin = o), typeof s < "u" && typeof r < "u" && (typeof s == "number" ? (this.line = s, this.column = r) : (this.line = s.line, this.column = s.column, this.endLine = r.line, this.endColumn = r.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, t);
|
|
1074
|
+
}
|
|
1075
|
+
setMessage() {
|
|
1076
|
+
this.message = this.plugin ? this.plugin + ": " : "", this.message += this.file ? this.file : "<css input>", typeof this.line < "u" && (this.message += ":" + this.line + ":" + this.column), this.message += ": " + this.reason;
|
|
1077
|
+
}
|
|
1078
|
+
showSourceCode(e) {
|
|
1079
|
+
if (!this.source) return "";
|
|
1080
|
+
let s = this.source;
|
|
1081
|
+
e == null && (e = Ci.isColorSupported);
|
|
1082
|
+
let r = (f) => f, n = (f) => f, i = (f) => f;
|
|
1083
|
+
if (e) {
|
|
1084
|
+
let { bold: f, gray: h, red: c } = Ci.createColors(!0);
|
|
1085
|
+
n = (g) => f(c(g)), r = (g) => h(g), Ni && (i = (g) => Ni(g));
|
|
1086
|
+
}
|
|
1087
|
+
let o = s.split(/\r?\n/), u = Math.max(this.line - 3, 0), a = Math.min(this.line + 2, o.length), l = String(a).length;
|
|
1088
|
+
return o.slice(u, a).map((f, h) => {
|
|
1089
|
+
let c = u + 1 + h, g = " " + (" " + c).slice(-l) + " | ";
|
|
1090
|
+
if (c === this.line) {
|
|
1091
|
+
if (f.length > 160) {
|
|
1092
|
+
let d = 20, p = Math.max(0, this.column - d), m = Math.max(this.column + d, this.endColumn + d), y = f.slice(p, m), v = r(g.replace(/\d/g, " ")) + f.slice(0, Math.min(this.column - 1, d - 1)).replace(/[^\t]/g, " ");
|
|
1093
|
+
return n(">") + r(g) + i(y) + `
|
|
1094
|
+
` + v + n("^");
|
|
1095
|
+
}
|
|
1096
|
+
let b = r(g.replace(/\d/g, " ")) + f.slice(0, this.column - 1).replace(/[^\t]/g, " ");
|
|
1097
|
+
return n(">") + r(g) + i(f) + `
|
|
1098
|
+
` + b + n("^");
|
|
1099
|
+
}
|
|
1100
|
+
return " " + r(g) + i(f);
|
|
1101
|
+
}).join(`
|
|
1102
|
+
`);
|
|
1103
|
+
}
|
|
1104
|
+
toString() {
|
|
1105
|
+
let e = this.showSourceCode();
|
|
1106
|
+
return e && (e = `
|
|
1107
|
+
|
|
1108
|
+
` + e + `
|
|
1109
|
+
`), this.name + ": " + this.message + e;
|
|
1110
|
+
}
|
|
1111
|
+
};
|
|
1112
|
+
Pi.exports = st, st.default = st;
|
|
1113
|
+
}), jt = w((px, Ii) => {
|
|
1114
|
+
"use strict";
|
|
1115
|
+
var Ri = { after: `
|
|
1116
|
+
`, beforeClose: `
|
|
1117
|
+
`, beforeComment: `
|
|
1118
|
+
`, beforeDecl: `
|
|
1119
|
+
`, beforeOpen: " ", beforeRule: `
|
|
1120
|
+
`, colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: !1 };
|
|
1121
|
+
function Rc(t) {
|
|
1122
|
+
return t[0].toUpperCase() + t.slice(1);
|
|
1123
|
+
}
|
|
1124
|
+
var nt = class {
|
|
1125
|
+
constructor(e) {
|
|
1126
|
+
this.builder = e;
|
|
1127
|
+
}
|
|
1128
|
+
atrule(e, s) {
|
|
1129
|
+
let r = "@" + e.name, n = e.params ? this.rawValue(e, "params") : "";
|
|
1130
|
+
if (typeof e.raws.afterName < "u" ? r += e.raws.afterName : n && (r += " "), e.nodes) this.block(e, r + n);
|
|
1131
|
+
else {
|
|
1132
|
+
let i = (e.raws.between || "") + (s ? ";" : "");
|
|
1133
|
+
this.builder(r + n + i, e);
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
beforeAfter(e, s) {
|
|
1137
|
+
let r;
|
|
1138
|
+
e.type === "decl" ? r = this.raw(e, null, "beforeDecl") : e.type === "comment" ? r = this.raw(e, null, "beforeComment") : s === "before" ? r = this.raw(e, null, "beforeRule") : r = this.raw(e, null, "beforeClose");
|
|
1139
|
+
let n = e.parent, i = 0;
|
|
1140
|
+
for (; n && n.type !== "root"; ) i += 1, n = n.parent;
|
|
1141
|
+
if (r.includes(`
|
|
1142
|
+
`)) {
|
|
1143
|
+
let o = this.raw(e, null, "indent");
|
|
1144
|
+
if (o.length) for (let u = 0; u < i; u++) r += o;
|
|
1145
|
+
}
|
|
1146
|
+
return r;
|
|
1147
|
+
}
|
|
1148
|
+
block(e, s) {
|
|
1149
|
+
let r = this.raw(e, "between", "beforeOpen");
|
|
1150
|
+
this.builder(s + r + "{", e, "start");
|
|
1151
|
+
let n;
|
|
1152
|
+
e.nodes && e.nodes.length ? (this.body(e), n = this.raw(e, "after")) : n = this.raw(e, "after", "emptyBody"), n && this.builder(n), this.builder("}", e, "end");
|
|
1153
|
+
}
|
|
1154
|
+
body(e) {
|
|
1155
|
+
let s = e.nodes.length - 1;
|
|
1156
|
+
for (; s > 0 && e.nodes[s].type === "comment"; ) s -= 1;
|
|
1157
|
+
let r = this.raw(e, "semicolon");
|
|
1158
|
+
for (let n = 0; n < e.nodes.length; n++) {
|
|
1159
|
+
let i = e.nodes[n], o = this.raw(i, "before");
|
|
1160
|
+
o && this.builder(o), this.stringify(i, s !== n || r);
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
comment(e) {
|
|
1164
|
+
let s = this.raw(e, "left", "commentLeft"), r = this.raw(e, "right", "commentRight");
|
|
1165
|
+
this.builder("/*" + s + e.text + r + "*/", e);
|
|
1166
|
+
}
|
|
1167
|
+
decl(e, s) {
|
|
1168
|
+
let r = this.raw(e, "between", "colon"), n = e.prop + r + this.rawValue(e, "value");
|
|
1169
|
+
e.important && (n += e.raws.important || " !important"), s && (n += ";"), this.builder(n, e);
|
|
1170
|
+
}
|
|
1171
|
+
document(e) {
|
|
1172
|
+
this.body(e);
|
|
1173
|
+
}
|
|
1174
|
+
raw(e, s, r) {
|
|
1175
|
+
let n;
|
|
1176
|
+
if (r || (r = s), s && (n = e.raws[s], typeof n < "u")) return n;
|
|
1177
|
+
let i = e.parent;
|
|
1178
|
+
if (r === "before" && (!i || i.type === "root" && i.first === e || i && i.type === "document")) return "";
|
|
1179
|
+
if (!i) return Ri[r];
|
|
1180
|
+
let o = e.root();
|
|
1181
|
+
if (o.rawCache || (o.rawCache = {}), typeof o.rawCache[r] < "u") return o.rawCache[r];
|
|
1182
|
+
if (r === "before" || r === "after") return this.beforeAfter(e, r);
|
|
1183
|
+
{
|
|
1184
|
+
let u = "raw" + Rc(r);
|
|
1185
|
+
this[u] ? n = this[u](o, e) : o.walk((a) => {
|
|
1186
|
+
if (n = a.raws[s], typeof n < "u") return !1;
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
return typeof n > "u" && (n = Ri[r]), o.rawCache[r] = n, n;
|
|
1190
|
+
}
|
|
1191
|
+
rawBeforeClose(e) {
|
|
1192
|
+
let s;
|
|
1193
|
+
return e.walk((r) => {
|
|
1194
|
+
if (r.nodes && r.nodes.length > 0 && typeof r.raws.after < "u") return s = r.raws.after, s.includes(`
|
|
1195
|
+
`) && (s = s.replace(/[^\n]+$/, "")), !1;
|
|
1196
|
+
}), s && (s = s.replace(/\S/g, "")), s;
|
|
1197
|
+
}
|
|
1198
|
+
rawBeforeComment(e, s) {
|
|
1199
|
+
let r;
|
|
1200
|
+
return e.walkComments((n) => {
|
|
1201
|
+
if (typeof n.raws.before < "u") return r = n.raws.before, r.includes(`
|
|
1202
|
+
`) && (r = r.replace(/[^\n]+$/, "")), !1;
|
|
1203
|
+
}), typeof r > "u" ? r = this.raw(s, null, "beforeDecl") : r && (r = r.replace(/\S/g, "")), r;
|
|
1204
|
+
}
|
|
1205
|
+
rawBeforeDecl(e, s) {
|
|
1206
|
+
let r;
|
|
1207
|
+
return e.walkDecls((n) => {
|
|
1208
|
+
if (typeof n.raws.before < "u") return r = n.raws.before, r.includes(`
|
|
1209
|
+
`) && (r = r.replace(/[^\n]+$/, "")), !1;
|
|
1210
|
+
}), typeof r > "u" ? r = this.raw(s, null, "beforeRule") : r && (r = r.replace(/\S/g, "")), r;
|
|
1211
|
+
}
|
|
1212
|
+
rawBeforeOpen(e) {
|
|
1213
|
+
let s;
|
|
1214
|
+
return e.walk((r) => {
|
|
1215
|
+
if (r.type !== "decl" && (s = r.raws.between, typeof s < "u")) return !1;
|
|
1216
|
+
}), s;
|
|
1217
|
+
}
|
|
1218
|
+
rawBeforeRule(e) {
|
|
1219
|
+
let s;
|
|
1220
|
+
return e.walk((r) => {
|
|
1221
|
+
if (r.nodes && (r.parent !== e || e.first !== r) && typeof r.raws.before < "u") return s = r.raws.before, s.includes(`
|
|
1222
|
+
`) && (s = s.replace(/[^\n]+$/, "")), !1;
|
|
1223
|
+
}), s && (s = s.replace(/\S/g, "")), s;
|
|
1224
|
+
}
|
|
1225
|
+
rawColon(e) {
|
|
1226
|
+
let s;
|
|
1227
|
+
return e.walkDecls((r) => {
|
|
1228
|
+
if (typeof r.raws.between < "u") return s = r.raws.between.replace(/[^\s:]/g, ""), !1;
|
|
1229
|
+
}), s;
|
|
1230
|
+
}
|
|
1231
|
+
rawEmptyBody(e) {
|
|
1232
|
+
let s;
|
|
1233
|
+
return e.walk((r) => {
|
|
1234
|
+
if (r.nodes && r.nodes.length === 0 && (s = r.raws.after, typeof s < "u")) return !1;
|
|
1235
|
+
}), s;
|
|
1236
|
+
}
|
|
1237
|
+
rawIndent(e) {
|
|
1238
|
+
if (e.raws.indent) return e.raws.indent;
|
|
1239
|
+
let s;
|
|
1240
|
+
return e.walk((r) => {
|
|
1241
|
+
let n = r.parent;
|
|
1242
|
+
if (n && n !== e && n.parent && n.parent === e && typeof r.raws.before < "u") {
|
|
1243
|
+
let i = r.raws.before.split(`
|
|
1244
|
+
`);
|
|
1245
|
+
return s = i[i.length - 1], s = s.replace(/\S/g, ""), !1;
|
|
1246
|
+
}
|
|
1247
|
+
}), s;
|
|
1248
|
+
}
|
|
1249
|
+
rawSemicolon(e) {
|
|
1250
|
+
let s;
|
|
1251
|
+
return e.walk((r) => {
|
|
1252
|
+
if (r.nodes && r.nodes.length && r.last.type === "decl" && (s = r.raws.semicolon, typeof s < "u")) return !1;
|
|
1253
|
+
}), s;
|
|
1254
|
+
}
|
|
1255
|
+
rawValue(e, s) {
|
|
1256
|
+
let r = e[s], n = e.raws[s];
|
|
1257
|
+
return n && n.value === r ? n.raw : r;
|
|
1258
|
+
}
|
|
1259
|
+
root(e) {
|
|
1260
|
+
this.body(e), e.raws.after && this.builder(e.raws.after);
|
|
1261
|
+
}
|
|
1262
|
+
rule(e) {
|
|
1263
|
+
this.block(e, this.rawValue(e, "selector")), e.raws.ownSemicolon && this.builder(e.raws.ownSemicolon, e, "end");
|
|
1264
|
+
}
|
|
1265
|
+
stringify(e, s) {
|
|
1266
|
+
if (!this[e.type]) throw new Error("Unknown AST node type " + e.type + ". Maybe you need to change PostCSS stringifier.");
|
|
1267
|
+
this[e.type](e, s);
|
|
1268
|
+
}
|
|
1269
|
+
};
|
|
1270
|
+
Ii.exports = nt, nt.default = nt;
|
|
1271
|
+
}), it = w((hx, qi) => {
|
|
1272
|
+
"use strict";
|
|
1273
|
+
var Ic = jt();
|
|
1274
|
+
function us(t, e) {
|
|
1275
|
+
new Ic(e).stringify(t);
|
|
1276
|
+
}
|
|
1277
|
+
qi.exports = us, us.default = us;
|
|
1278
|
+
}), Ht = w((dx, ls) => {
|
|
1279
|
+
"use strict";
|
|
1280
|
+
ls.exports.isClean = Symbol("isClean"), ls.exports.my = Symbol("my");
|
|
1281
|
+
}), ut = w((mx, Li) => {
|
|
1282
|
+
"use strict";
|
|
1283
|
+
var qc = zt(), Lc = jt(), Dc = it(), { isClean: ot, my: Mc } = Ht();
|
|
1284
|
+
function cs(t, e) {
|
|
1285
|
+
let s = new t.constructor();
|
|
1286
|
+
for (let r in t) {
|
|
1287
|
+
if (!Object.prototype.hasOwnProperty.call(t, r) || r === "proxyCache") continue;
|
|
1288
|
+
let n = t[r], i = typeof n;
|
|
1289
|
+
r === "parent" && i === "object" ? e && (s[r] = e) : r === "source" ? s[r] = n : Array.isArray(n) ? s[r] = n.map((o) => cs(o, s)) : (i === "object" && n !== null && (n = cs(n)), s[r] = n);
|
|
1290
|
+
}
|
|
1291
|
+
return s;
|
|
1292
|
+
}
|
|
1293
|
+
function ee(t, e) {
|
|
1294
|
+
if (e && typeof e.offset < "u") return e.offset;
|
|
1295
|
+
let s = 1, r = 1, n = 0;
|
|
1296
|
+
for (let i = 0; i < t.length; i++) {
|
|
1297
|
+
if (r === e.line && s === e.column) {
|
|
1298
|
+
n = i;
|
|
1299
|
+
break;
|
|
1300
|
+
}
|
|
1301
|
+
t[i] === `
|
|
1302
|
+
` ? (s = 1, r += 1) : s += 1;
|
|
1303
|
+
}
|
|
1304
|
+
return n;
|
|
1305
|
+
}
|
|
1306
|
+
var at = class {
|
|
1307
|
+
get proxyOf() {
|
|
1308
|
+
return this;
|
|
1309
|
+
}
|
|
1310
|
+
constructor(e = {}) {
|
|
1311
|
+
this.raws = {}, this[ot] = !1, this[Mc] = !0;
|
|
1312
|
+
for (let s in e) if (s === "nodes") {
|
|
1313
|
+
this.nodes = [];
|
|
1314
|
+
for (let r of e[s]) typeof r.clone == "function" ? this.append(r.clone()) : this.append(r);
|
|
1315
|
+
} else this[s] = e[s];
|
|
1316
|
+
}
|
|
1317
|
+
addToError(e) {
|
|
1318
|
+
if (e.postcssNode = this, e.stack && this.source && /\n\s{4}at /.test(e.stack)) {
|
|
1319
|
+
let s = this.source;
|
|
1320
|
+
e.stack = e.stack.replace(/\n\s{4}at /, `$&${s.input.from}:${s.start.line}:${s.start.column}$&`);
|
|
1321
|
+
}
|
|
1322
|
+
return e;
|
|
1323
|
+
}
|
|
1324
|
+
after(e) {
|
|
1325
|
+
return this.parent.insertAfter(this, e), this;
|
|
1326
|
+
}
|
|
1327
|
+
assign(e = {}) {
|
|
1328
|
+
for (let s in e) this[s] = e[s];
|
|
1329
|
+
return this;
|
|
1330
|
+
}
|
|
1331
|
+
before(e) {
|
|
1332
|
+
return this.parent.insertBefore(this, e), this;
|
|
1333
|
+
}
|
|
1334
|
+
cleanRaws(e) {
|
|
1335
|
+
delete this.raws.before, delete this.raws.after, e || delete this.raws.between;
|
|
1336
|
+
}
|
|
1337
|
+
clone(e = {}) {
|
|
1338
|
+
let s = cs(this);
|
|
1339
|
+
for (let r in e) s[r] = e[r];
|
|
1340
|
+
return s;
|
|
1341
|
+
}
|
|
1342
|
+
cloneAfter(e = {}) {
|
|
1343
|
+
let s = this.clone(e);
|
|
1344
|
+
return this.parent.insertAfter(this, s), s;
|
|
1345
|
+
}
|
|
1346
|
+
cloneBefore(e = {}) {
|
|
1347
|
+
let s = this.clone(e);
|
|
1348
|
+
return this.parent.insertBefore(this, s), s;
|
|
1349
|
+
}
|
|
1350
|
+
error(e, s = {}) {
|
|
1351
|
+
if (this.source) {
|
|
1352
|
+
let { end: r, start: n } = this.rangeBy(s);
|
|
1353
|
+
return this.source.input.error(e, { column: n.column, line: n.line }, { column: r.column, line: r.line }, s);
|
|
1354
|
+
}
|
|
1355
|
+
return new qc(e);
|
|
1356
|
+
}
|
|
1357
|
+
getProxyProcessor() {
|
|
1358
|
+
return { get(e, s) {
|
|
1359
|
+
return s === "proxyOf" ? e : s === "root" ? () => e.root().toProxy() : e[s];
|
|
1360
|
+
}, set(e, s, r) {
|
|
1361
|
+
return e[s] === r || (e[s] = r, (s === "prop" || s === "value" || s === "name" || s === "params" || s === "important" || s === "text") && e.markDirty()), !0;
|
|
1362
|
+
} };
|
|
1363
|
+
}
|
|
1364
|
+
markClean() {
|
|
1365
|
+
this[ot] = !0;
|
|
1366
|
+
}
|
|
1367
|
+
markDirty() {
|
|
1368
|
+
if (this[ot]) {
|
|
1369
|
+
this[ot] = !1;
|
|
1370
|
+
let e = this;
|
|
1371
|
+
for (; e = e.parent; ) e[ot] = !1;
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
next() {
|
|
1375
|
+
if (!this.parent) return;
|
|
1376
|
+
let e = this.parent.index(this);
|
|
1377
|
+
return this.parent.nodes[e + 1];
|
|
1378
|
+
}
|
|
1379
|
+
positionBy(e = {}) {
|
|
1380
|
+
let s = this.source.start;
|
|
1381
|
+
if (e.index) s = this.positionInside(e.index);
|
|
1382
|
+
else if (e.word) {
|
|
1383
|
+
let r = "document" in this.source.input ? this.source.input.document : this.source.input.css, i = r.slice(ee(r, this.source.start), ee(r, this.source.end)).indexOf(e.word);
|
|
1384
|
+
i !== -1 && (s = this.positionInside(i));
|
|
1385
|
+
}
|
|
1386
|
+
return s;
|
|
1387
|
+
}
|
|
1388
|
+
positionInside(e) {
|
|
1389
|
+
let s = this.source.start.column, r = this.source.start.line, n = "document" in this.source.input ? this.source.input.document : this.source.input.css, i = ee(n, this.source.start), o = i + e;
|
|
1390
|
+
for (let u = i; u < o; u++) n[u] === `
|
|
1391
|
+
` ? (s = 1, r += 1) : s += 1;
|
|
1392
|
+
return { column: s, line: r, offset: o };
|
|
1393
|
+
}
|
|
1394
|
+
prev() {
|
|
1395
|
+
if (!this.parent) return;
|
|
1396
|
+
let e = this.parent.index(this);
|
|
1397
|
+
return this.parent.nodes[e - 1];
|
|
1398
|
+
}
|
|
1399
|
+
rangeBy(e = {}) {
|
|
1400
|
+
let s = "document" in this.source.input ? this.source.input.document : this.source.input.css, r = { column: this.source.start.column, line: this.source.start.line, offset: ee(s, this.source.start) }, n = this.source.end ? { column: this.source.end.column + 1, line: this.source.end.line, offset: typeof this.source.end.offset == "number" ? this.source.end.offset : ee(s, this.source.end) + 1 } : { column: r.column + 1, line: r.line, offset: r.offset + 1 };
|
|
1401
|
+
if (e.word) {
|
|
1402
|
+
let o = s.slice(ee(s, this.source.start), ee(s, this.source.end)).indexOf(e.word);
|
|
1403
|
+
o !== -1 && (r = this.positionInside(o), n = this.positionInside(o + e.word.length));
|
|
1404
|
+
} else e.start ? r = { column: e.start.column, line: e.start.line, offset: ee(s, e.start) } : e.index && (r = this.positionInside(e.index)), e.end ? n = { column: e.end.column, line: e.end.line, offset: ee(s, e.end) } : typeof e.endIndex == "number" ? n = this.positionInside(e.endIndex) : e.index && (n = this.positionInside(e.index + 1));
|
|
1405
|
+
return (n.line < r.line || n.line === r.line && n.column <= r.column) && (n = { column: r.column + 1, line: r.line, offset: r.offset + 1 }), { end: n, start: r };
|
|
1406
|
+
}
|
|
1407
|
+
raw(e, s) {
|
|
1408
|
+
return new Lc().raw(this, e, s);
|
|
1409
|
+
}
|
|
1410
|
+
remove() {
|
|
1411
|
+
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
1412
|
+
}
|
|
1413
|
+
replaceWith(...e) {
|
|
1414
|
+
if (this.parent) {
|
|
1415
|
+
let s = this, r = !1;
|
|
1416
|
+
for (let n of e) n === this ? r = !0 : r ? (this.parent.insertAfter(s, n), s = n) : this.parent.insertBefore(s, n);
|
|
1417
|
+
r || this.remove();
|
|
1418
|
+
}
|
|
1419
|
+
return this;
|
|
1420
|
+
}
|
|
1421
|
+
root() {
|
|
1422
|
+
let e = this;
|
|
1423
|
+
for (; e.parent && e.parent.type !== "document"; ) e = e.parent;
|
|
1424
|
+
return e;
|
|
1425
|
+
}
|
|
1426
|
+
toJSON(e, s) {
|
|
1427
|
+
let r = {}, n = s == null;
|
|
1428
|
+
s = s || /* @__PURE__ */ new Map();
|
|
1429
|
+
let i = 0;
|
|
1430
|
+
for (let o in this) {
|
|
1431
|
+
if (!Object.prototype.hasOwnProperty.call(this, o) || o === "parent" || o === "proxyCache") continue;
|
|
1432
|
+
let u = this[o];
|
|
1433
|
+
if (Array.isArray(u)) r[o] = u.map((a) => typeof a == "object" && a.toJSON ? a.toJSON(null, s) : a);
|
|
1434
|
+
else if (typeof u == "object" && u.toJSON) r[o] = u.toJSON(null, s);
|
|
1435
|
+
else if (o === "source") {
|
|
1436
|
+
if (u == null) continue;
|
|
1437
|
+
let a = s.get(u.input);
|
|
1438
|
+
a == null && (a = i, s.set(u.input, i), i++), r[o] = { end: u.end, inputId: a, start: u.start };
|
|
1439
|
+
} else r[o] = u;
|
|
1440
|
+
}
|
|
1441
|
+
return n && (r.inputs = [...s.keys()].map((o) => o.toJSON())), r;
|
|
1442
|
+
}
|
|
1443
|
+
toProxy() {
|
|
1444
|
+
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
1445
|
+
}
|
|
1446
|
+
toString(e = Dc) {
|
|
1447
|
+
e.stringify && (e = e.stringify);
|
|
1448
|
+
let s = "";
|
|
1449
|
+
return e(this, (r) => {
|
|
1450
|
+
s += r;
|
|
1451
|
+
}), s;
|
|
1452
|
+
}
|
|
1453
|
+
warn(e, s, r = {}) {
|
|
1454
|
+
let n = { node: this };
|
|
1455
|
+
for (let i in r) n[i] = r[i];
|
|
1456
|
+
return e.warn(s, n);
|
|
1457
|
+
}
|
|
1458
|
+
};
|
|
1459
|
+
Li.exports = at, at.default = at;
|
|
1460
|
+
}), Me = w((yx, Di) => {
|
|
1461
|
+
"use strict";
|
|
1462
|
+
var Bc = ut(), lt = class extends Bc {
|
|
1463
|
+
constructor(e) {
|
|
1464
|
+
super(e), this.type = "comment";
|
|
1465
|
+
}
|
|
1466
|
+
};
|
|
1467
|
+
Di.exports = lt, lt.default = lt;
|
|
1468
|
+
}), ft = w((gx, Mi) => {
|
|
1469
|
+
"use strict";
|
|
1470
|
+
var Uc = ut(), ct = class extends Uc {
|
|
1471
|
+
get variable() {
|
|
1472
|
+
return this.prop.startsWith("--") || this.prop[0] === "$";
|
|
1473
|
+
}
|
|
1474
|
+
constructor(e) {
|
|
1475
|
+
e && typeof e.value < "u" && typeof e.value != "string" && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
1476
|
+
}
|
|
1477
|
+
};
|
|
1478
|
+
Mi.exports = ct, ct.default = ct;
|
|
1479
|
+
}), fe = w((wx, zi) => {
|
|
1480
|
+
"use strict";
|
|
1481
|
+
var Bi = Me(), Ui = ft(), Fc = ut(), { isClean: Fi, my: $i } = Ht(), fs, Wi, Gi, ps;
|
|
1482
|
+
function Yi(t) {
|
|
1483
|
+
return t.map((e) => (e.nodes && (e.nodes = Yi(e.nodes)), delete e.source, e));
|
|
1484
|
+
}
|
|
1485
|
+
function Vi(t) {
|
|
1486
|
+
if (t[Fi] = !1, t.proxyOf.nodes) for (let e of t.proxyOf.nodes) Vi(e);
|
|
1487
|
+
}
|
|
1488
|
+
var z = class t extends Fc {
|
|
1489
|
+
get first() {
|
|
1490
|
+
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
1491
|
+
}
|
|
1492
|
+
get last() {
|
|
1493
|
+
if (this.proxyOf.nodes) return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
|
|
1494
|
+
}
|
|
1495
|
+
append(...e) {
|
|
1496
|
+
for (let s of e) {
|
|
1497
|
+
let r = this.normalize(s, this.last);
|
|
1498
|
+
for (let n of r) this.proxyOf.nodes.push(n);
|
|
1499
|
+
}
|
|
1500
|
+
return this.markDirty(), this;
|
|
1501
|
+
}
|
|
1502
|
+
cleanRaws(e) {
|
|
1503
|
+
if (super.cleanRaws(e), this.nodes) for (let s of this.nodes) s.cleanRaws(e);
|
|
1504
|
+
}
|
|
1505
|
+
each(e) {
|
|
1506
|
+
if (!this.proxyOf.nodes) return;
|
|
1507
|
+
let s = this.getIterator(), r, n;
|
|
1508
|
+
for (; this.indexes[s] < this.proxyOf.nodes.length && (r = this.indexes[s], n = e(this.proxyOf.nodes[r], r), n !== !1); ) this.indexes[s] += 1;
|
|
1509
|
+
return delete this.indexes[s], n;
|
|
1510
|
+
}
|
|
1511
|
+
every(e) {
|
|
1512
|
+
return this.nodes.every(e);
|
|
1513
|
+
}
|
|
1514
|
+
getIterator() {
|
|
1515
|
+
this.lastEach || (this.lastEach = 0), this.indexes || (this.indexes = {}), this.lastEach += 1;
|
|
1516
|
+
let e = this.lastEach;
|
|
1517
|
+
return this.indexes[e] = 0, e;
|
|
1518
|
+
}
|
|
1519
|
+
getProxyProcessor() {
|
|
1520
|
+
return { get(e, s) {
|
|
1521
|
+
return s === "proxyOf" ? e : e[s] ? s === "each" || typeof s == "string" && s.startsWith("walk") ? (...r) => e[s](...r.map((n) => typeof n == "function" ? (i, o) => n(i.toProxy(), o) : n)) : s === "every" || s === "some" ? (r) => e[s]((n, ...i) => r(n.toProxy(), ...i)) : s === "root" ? () => e.root().toProxy() : s === "nodes" ? e.nodes.map((r) => r.toProxy()) : s === "first" || s === "last" ? e[s].toProxy() : e[s] : e[s];
|
|
1522
|
+
}, set(e, s, r) {
|
|
1523
|
+
return e[s] === r || (e[s] = r, (s === "name" || s === "params" || s === "selector") && e.markDirty()), !0;
|
|
1524
|
+
} };
|
|
1525
|
+
}
|
|
1526
|
+
index(e) {
|
|
1527
|
+
return typeof e == "number" ? e : (e.proxyOf && (e = e.proxyOf), this.proxyOf.nodes.indexOf(e));
|
|
1528
|
+
}
|
|
1529
|
+
insertAfter(e, s) {
|
|
1530
|
+
let r = this.index(e), n = this.normalize(s, this.proxyOf.nodes[r]).reverse();
|
|
1531
|
+
r = this.index(e);
|
|
1532
|
+
for (let o of n) this.proxyOf.nodes.splice(r + 1, 0, o);
|
|
1533
|
+
let i;
|
|
1534
|
+
for (let o in this.indexes) i = this.indexes[o], r < i && (this.indexes[o] = i + n.length);
|
|
1535
|
+
return this.markDirty(), this;
|
|
1536
|
+
}
|
|
1537
|
+
insertBefore(e, s) {
|
|
1538
|
+
let r = this.index(e), n = r === 0 ? "prepend" : !1, i = this.normalize(s, this.proxyOf.nodes[r], n).reverse();
|
|
1539
|
+
r = this.index(e);
|
|
1540
|
+
for (let u of i) this.proxyOf.nodes.splice(r, 0, u);
|
|
1541
|
+
let o;
|
|
1542
|
+
for (let u in this.indexes) o = this.indexes[u], r <= o && (this.indexes[u] = o + i.length);
|
|
1543
|
+
return this.markDirty(), this;
|
|
1544
|
+
}
|
|
1545
|
+
normalize(e, s) {
|
|
1546
|
+
if (typeof e == "string") e = Yi(Wi(e).nodes);
|
|
1547
|
+
else if (typeof e > "u") e = [];
|
|
1548
|
+
else if (Array.isArray(e)) {
|
|
1549
|
+
e = e.slice(0);
|
|
1550
|
+
for (let n of e) n.parent && n.parent.removeChild(n, "ignore");
|
|
1551
|
+
} else if (e.type === "root" && this.type !== "document") {
|
|
1552
|
+
e = e.nodes.slice(0);
|
|
1553
|
+
for (let n of e) n.parent && n.parent.removeChild(n, "ignore");
|
|
1554
|
+
} else if (e.type) e = [e];
|
|
1555
|
+
else if (e.prop) {
|
|
1556
|
+
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
|
|
1557
|
+
typeof e.value != "string" && (e.value = String(e.value)), e = [new Ui(e)];
|
|
1558
|
+
} else if (e.selector || e.selectors) e = [new ps(e)];
|
|
1559
|
+
else if (e.name) e = [new fs(e)];
|
|
1560
|
+
else if (e.text) e = [new Bi(e)];
|
|
1561
|
+
else throw new Error("Unknown node type in node creation");
|
|
1562
|
+
return e.map((n) => (n[$i] || t.rebuild(n), n = n.proxyOf, n.parent && n.parent.removeChild(n), n[Fi] && Vi(n), n.raws || (n.raws = {}), typeof n.raws.before > "u" && s && typeof s.raws.before < "u" && (n.raws.before = s.raws.before.replace(/\S/g, "")), n.parent = this.proxyOf, n));
|
|
1563
|
+
}
|
|
1564
|
+
prepend(...e) {
|
|
1565
|
+
e = e.reverse();
|
|
1566
|
+
for (let s of e) {
|
|
1567
|
+
let r = this.normalize(s, this.first, "prepend").reverse();
|
|
1568
|
+
for (let n of r) this.proxyOf.nodes.unshift(n);
|
|
1569
|
+
for (let n in this.indexes) this.indexes[n] = this.indexes[n] + r.length;
|
|
1570
|
+
}
|
|
1571
|
+
return this.markDirty(), this;
|
|
1572
|
+
}
|
|
1573
|
+
push(e) {
|
|
1574
|
+
return e.parent = this, this.proxyOf.nodes.push(e), this;
|
|
1575
|
+
}
|
|
1576
|
+
removeAll() {
|
|
1577
|
+
for (let e of this.proxyOf.nodes) e.parent = void 0;
|
|
1578
|
+
return this.proxyOf.nodes = [], this.markDirty(), this;
|
|
1579
|
+
}
|
|
1580
|
+
removeChild(e) {
|
|
1581
|
+
e = this.index(e), this.proxyOf.nodes[e].parent = void 0, this.proxyOf.nodes.splice(e, 1);
|
|
1582
|
+
let s;
|
|
1583
|
+
for (let r in this.indexes) s = this.indexes[r], s >= e && (this.indexes[r] = s - 1);
|
|
1584
|
+
return this.markDirty(), this;
|
|
1585
|
+
}
|
|
1586
|
+
replaceValues(e, s, r) {
|
|
1587
|
+
return r || (r = s, s = {}), this.walkDecls((n) => {
|
|
1588
|
+
s.props && !s.props.includes(n.prop) || s.fast && !n.value.includes(s.fast) || (n.value = n.value.replace(e, r));
|
|
1589
|
+
}), this.markDirty(), this;
|
|
1590
|
+
}
|
|
1591
|
+
some(e) {
|
|
1592
|
+
return this.nodes.some(e);
|
|
1593
|
+
}
|
|
1594
|
+
walk(e) {
|
|
1595
|
+
return this.each((s, r) => {
|
|
1596
|
+
let n;
|
|
1597
|
+
try {
|
|
1598
|
+
n = e(s, r);
|
|
1599
|
+
} catch (i) {
|
|
1600
|
+
throw s.addToError(i);
|
|
1601
|
+
}
|
|
1602
|
+
return n !== !1 && s.walk && (n = s.walk(e)), n;
|
|
1603
|
+
});
|
|
1604
|
+
}
|
|
1605
|
+
walkAtRules(e, s) {
|
|
1606
|
+
return s ? e instanceof RegExp ? this.walk((r, n) => {
|
|
1607
|
+
if (r.type === "atrule" && e.test(r.name)) return s(r, n);
|
|
1608
|
+
}) : this.walk((r, n) => {
|
|
1609
|
+
if (r.type === "atrule" && r.name === e) return s(r, n);
|
|
1610
|
+
}) : (s = e, this.walk((r, n) => {
|
|
1611
|
+
if (r.type === "atrule") return s(r, n);
|
|
1612
|
+
}));
|
|
1613
|
+
}
|
|
1614
|
+
walkComments(e) {
|
|
1615
|
+
return this.walk((s, r) => {
|
|
1616
|
+
if (s.type === "comment") return e(s, r);
|
|
1617
|
+
});
|
|
1618
|
+
}
|
|
1619
|
+
walkDecls(e, s) {
|
|
1620
|
+
return s ? e instanceof RegExp ? this.walk((r, n) => {
|
|
1621
|
+
if (r.type === "decl" && e.test(r.prop)) return s(r, n);
|
|
1622
|
+
}) : this.walk((r, n) => {
|
|
1623
|
+
if (r.type === "decl" && r.prop === e) return s(r, n);
|
|
1624
|
+
}) : (s = e, this.walk((r, n) => {
|
|
1625
|
+
if (r.type === "decl") return s(r, n);
|
|
1626
|
+
}));
|
|
1627
|
+
}
|
|
1628
|
+
walkRules(e, s) {
|
|
1629
|
+
return s ? e instanceof RegExp ? this.walk((r, n) => {
|
|
1630
|
+
if (r.type === "rule" && e.test(r.selector)) return s(r, n);
|
|
1631
|
+
}) : this.walk((r, n) => {
|
|
1632
|
+
if (r.type === "rule" && r.selector === e) return s(r, n);
|
|
1633
|
+
}) : (s = e, this.walk((r, n) => {
|
|
1634
|
+
if (r.type === "rule") return s(r, n);
|
|
1635
|
+
}));
|
|
1636
|
+
}
|
|
1637
|
+
};
|
|
1638
|
+
z.registerParse = (t) => {
|
|
1639
|
+
Wi = t;
|
|
1640
|
+
}, z.registerRule = (t) => {
|
|
1641
|
+
ps = t;
|
|
1642
|
+
}, z.registerAtRule = (t) => {
|
|
1643
|
+
fs = t;
|
|
1644
|
+
}, z.registerRoot = (t) => {
|
|
1645
|
+
Gi = t;
|
|
1646
|
+
}, zi.exports = z, z.default = z, z.rebuild = (t) => {
|
|
1647
|
+
t.type === "atrule" ? Object.setPrototypeOf(t, fs.prototype) : t.type === "rule" ? Object.setPrototypeOf(t, ps.prototype) : t.type === "decl" ? Object.setPrototypeOf(t, Ui.prototype) : t.type === "comment" ? Object.setPrototypeOf(t, Bi.prototype) : t.type === "root" && Object.setPrototypeOf(t, Gi.prototype), t[$i] = !0, t.nodes && t.nodes.forEach((e) => {
|
|
1648
|
+
z.rebuild(e);
|
|
1649
|
+
});
|
|
1650
|
+
};
|
|
1651
|
+
}), Hi = w((vx, ji) => {
|
|
1652
|
+
var $c = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Wc = (t, e = 21) => (s = e) => {
|
|
1653
|
+
let r = "", n = s | 0;
|
|
1654
|
+
for (; n--; ) r += t[Math.random() * t.length | 0];
|
|
1655
|
+
return r;
|
|
1656
|
+
}, Gc = (t = 21) => {
|
|
1657
|
+
let e = "", s = t | 0;
|
|
1658
|
+
for (; s--; ) e += $c[Math.random() * 64 | 0];
|
|
1659
|
+
return e;
|
|
1660
|
+
};
|
|
1661
|
+
ji.exports = { nanoid: Gc, customAlphabet: Wc };
|
|
1662
|
+
}), Ki = w(() => {
|
|
1663
|
+
}), hs = w((bx, Qi) => {
|
|
1664
|
+
Qi.exports = class {
|
|
1665
|
+
};
|
|
1666
|
+
}), Ue = w((Sx, to) => {
|
|
1667
|
+
"use strict";
|
|
1668
|
+
var { nanoid: Yc } = Hi(), { isAbsolute: ys, resolve: gs } = {}, { SourceMapConsumer: Vc, SourceMapGenerator: zc } = Ki(), { fileURLToPath: Xi, pathToFileURL: Kt } = {}, Ji = zt(), jc = hs(), ds = as(), ms = Symbol("lineToIndexCache"), Hc = !!(Vc && zc), Zi = !!(gs && ys);
|
|
1669
|
+
function eo(t) {
|
|
1670
|
+
if (t[ms]) return t[ms];
|
|
1671
|
+
let e = t.css.split(`
|
|
1672
|
+
`), s = new Array(e.length), r = 0;
|
|
1673
|
+
for (let n = 0, i = e.length; n < i; n++) s[n] = r, r += e[n].length + 1;
|
|
1674
|
+
return t[ms] = s, s;
|
|
1675
|
+
}
|
|
1676
|
+
var Be = class {
|
|
1677
|
+
get from() {
|
|
1678
|
+
return this.file || this.id;
|
|
1679
|
+
}
|
|
1680
|
+
constructor(e, s = {}) {
|
|
1681
|
+
if (e === null || typeof e > "u" || typeof e == "object" && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
1682
|
+
if (this.css = e.toString(), this.css[0] === "\uFEFF" || this.css[0] === "\uFFFE" ? (this.hasBOM = !0, this.css = this.css.slice(1)) : this.hasBOM = !1, this.document = this.css, s.document && (this.document = s.document.toString()), s.from && (!Zi || /^\w+:\/\//.test(s.from) || ys(s.from) ? this.file = s.from : this.file = gs(s.from)), Zi && Hc) {
|
|
1683
|
+
let r = new jc(this.css, s);
|
|
1684
|
+
if (r.text) {
|
|
1685
|
+
this.map = r;
|
|
1686
|
+
let n = r.consumer().file;
|
|
1687
|
+
!this.file && n && (this.file = this.mapResolve(n));
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
this.file || (this.id = "<input css " + Yc(6) + ">"), this.map && (this.map.file = this.from);
|
|
1691
|
+
}
|
|
1692
|
+
error(e, s, r, n = {}) {
|
|
1693
|
+
let i, o, u, a, l;
|
|
1694
|
+
if (s && typeof s == "object") {
|
|
1695
|
+
let h = s, c = r;
|
|
1696
|
+
if (typeof h.offset == "number") {
|
|
1697
|
+
a = h.offset;
|
|
1698
|
+
let g = this.fromOffset(a);
|
|
1699
|
+
s = g.line, r = g.col;
|
|
1700
|
+
} else s = h.line, r = h.column, a = this.fromLineAndColumn(s, r);
|
|
1701
|
+
if (typeof c.offset == "number") {
|
|
1702
|
+
u = c.offset;
|
|
1703
|
+
let g = this.fromOffset(u);
|
|
1704
|
+
o = g.line, i = g.col;
|
|
1705
|
+
} else o = c.line, i = c.column, u = this.fromLineAndColumn(c.line, c.column);
|
|
1706
|
+
} else if (r) a = this.fromLineAndColumn(s, r);
|
|
1707
|
+
else {
|
|
1708
|
+
a = s;
|
|
1709
|
+
let h = this.fromOffset(a);
|
|
1710
|
+
s = h.line, r = h.col;
|
|
1711
|
+
}
|
|
1712
|
+
let f = this.origin(s, r, o, i);
|
|
1713
|
+
return f ? l = new Ji(e, f.endLine === void 0 ? f.line : { column: f.column, line: f.line }, f.endLine === void 0 ? f.column : { column: f.endColumn, line: f.endLine }, f.source, f.file, n.plugin) : l = new Ji(e, o === void 0 ? s : { column: r, line: s }, o === void 0 ? r : { column: i, line: o }, this.css, this.file, n.plugin), l.input = { column: r, endColumn: i, endLine: o, endOffset: u, line: s, offset: a, source: this.css }, this.file && (Kt && (l.input.url = Kt(this.file).toString()), l.input.file = this.file), l;
|
|
1714
|
+
}
|
|
1715
|
+
fromLineAndColumn(e, s) {
|
|
1716
|
+
return eo(this)[e - 1] + s - 1;
|
|
1717
|
+
}
|
|
1718
|
+
fromOffset(e) {
|
|
1719
|
+
let s = eo(this), r = s[s.length - 1], n = 0;
|
|
1720
|
+
if (e >= r) n = s.length - 1;
|
|
1721
|
+
else {
|
|
1722
|
+
let i = s.length - 2, o;
|
|
1723
|
+
for (; n < i; ) if (o = n + (i - n >> 1), e < s[o]) i = o - 1;
|
|
1724
|
+
else if (e >= s[o + 1]) n = o + 1;
|
|
1725
|
+
else {
|
|
1726
|
+
n = o;
|
|
1727
|
+
break;
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
return { col: e - s[n] + 1, line: n + 1 };
|
|
1731
|
+
}
|
|
1732
|
+
mapResolve(e) {
|
|
1733
|
+
return /^\w+:\/\//.test(e) ? e : gs(this.map.consumer().sourceRoot || this.map.root || ".", e);
|
|
1734
|
+
}
|
|
1735
|
+
origin(e, s, r, n) {
|
|
1736
|
+
if (!this.map) return !1;
|
|
1737
|
+
let i = this.map.consumer(), o = i.originalPositionFor({ column: s, line: e });
|
|
1738
|
+
if (!o.source) return !1;
|
|
1739
|
+
let u;
|
|
1740
|
+
typeof r == "number" && (u = i.originalPositionFor({ column: n, line: r }));
|
|
1741
|
+
let a;
|
|
1742
|
+
ys(o.source) ? a = Kt(o.source) : a = new URL(o.source, this.map.consumer().sourceRoot || Kt(this.map.mapFile));
|
|
1743
|
+
let l = { column: o.column, endColumn: u && u.column, endLine: u && u.line, line: o.line, url: a.toString() };
|
|
1744
|
+
if (a.protocol === "file:") if (Xi) l.file = Xi(a);
|
|
1745
|
+
else throw new Error("file: protocol is not available in this PostCSS build");
|
|
1746
|
+
let f = i.sourceContentFor(o.source);
|
|
1747
|
+
return f && (l.source = f), l;
|
|
1748
|
+
}
|
|
1749
|
+
toJSON() {
|
|
1750
|
+
let e = {};
|
|
1751
|
+
for (let s of ["hasBOM", "css", "file", "id"]) this[s] != null && (e[s] = this[s]);
|
|
1752
|
+
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
|
|
1753
|
+
}
|
|
1754
|
+
};
|
|
1755
|
+
to.exports = Be, Be.default = Be, ds && ds.registerInput && ds.registerInput(Be);
|
|
1756
|
+
}), Qt = w((kx, so) => {
|
|
1757
|
+
"use strict";
|
|
1758
|
+
var ro = fe(), Fe = class extends ro {
|
|
1759
|
+
constructor(e) {
|
|
1760
|
+
super(e), this.type = "atrule";
|
|
1761
|
+
}
|
|
1762
|
+
append(...e) {
|
|
1763
|
+
return this.proxyOf.nodes || (this.nodes = []), super.append(...e);
|
|
1764
|
+
}
|
|
1765
|
+
prepend(...e) {
|
|
1766
|
+
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
|
|
1767
|
+
}
|
|
1768
|
+
};
|
|
1769
|
+
so.exports = Fe, Fe.default = Fe, ro.registerAtRule(Fe);
|
|
1770
|
+
}), $e = w((Tx, ao) => {
|
|
1771
|
+
"use strict";
|
|
1772
|
+
var no = fe(), io, oo, pe = class extends no {
|
|
1773
|
+
constructor(e) {
|
|
1774
|
+
super(e), this.type = "root", this.nodes || (this.nodes = []);
|
|
1775
|
+
}
|
|
1776
|
+
normalize(e, s, r) {
|
|
1777
|
+
let n = super.normalize(e);
|
|
1778
|
+
if (s) {
|
|
1779
|
+
if (r === "prepend") this.nodes.length > 1 ? s.raws.before = this.nodes[1].raws.before : delete s.raws.before;
|
|
1780
|
+
else if (this.first !== s) for (let i of n) i.raws.before = s.raws.before;
|
|
1781
|
+
}
|
|
1782
|
+
return n;
|
|
1783
|
+
}
|
|
1784
|
+
removeChild(e, s) {
|
|
1785
|
+
let r = this.index(e);
|
|
1786
|
+
return !s && r === 0 && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[r].raws.before), super.removeChild(e);
|
|
1787
|
+
}
|
|
1788
|
+
toResult(e = {}) {
|
|
1789
|
+
return new io(new oo(), this, e).stringify();
|
|
1790
|
+
}
|
|
1791
|
+
};
|
|
1792
|
+
pe.registerLazyResult = (t) => {
|
|
1793
|
+
io = t;
|
|
1794
|
+
}, pe.registerProcessor = (t) => {
|
|
1795
|
+
oo = t;
|
|
1796
|
+
}, ao.exports = pe, pe.default = pe, no.registerRoot(pe);
|
|
1797
|
+
}), ws = w((Ax, uo) => {
|
|
1798
|
+
"use strict";
|
|
1799
|
+
var pt = { comma(t) {
|
|
1800
|
+
return pt.split(t, [","], !0);
|
|
1801
|
+
}, space(t) {
|
|
1802
|
+
let e = [" ", `
|
|
1803
|
+
`, " "];
|
|
1804
|
+
return pt.split(t, e);
|
|
1805
|
+
}, split(t, e, s) {
|
|
1806
|
+
let r = [], n = "", i = !1, o = 0, u = !1, a = "", l = !1;
|
|
1807
|
+
for (let f of t) l ? l = !1 : f === "\\" ? l = !0 : u ? f === a && (u = !1) : f === '"' || f === "'" ? (u = !0, a = f) : f === "(" ? o += 1 : f === ")" ? o > 0 && (o -= 1) : o === 0 && e.includes(f) && (i = !0), i ? (n !== "" && r.push(n.trim()), n = "", i = !1) : n += f;
|
|
1808
|
+
return (s || n !== "") && r.push(n.trim()), r;
|
|
1809
|
+
} };
|
|
1810
|
+
uo.exports = pt, pt.default = pt;
|
|
1811
|
+
}), Xt = w((Ox, co) => {
|
|
1812
|
+
"use strict";
|
|
1813
|
+
var lo = fe(), Kc = ws(), We = class extends lo {
|
|
1814
|
+
get selectors() {
|
|
1815
|
+
return Kc.comma(this.selector);
|
|
1816
|
+
}
|
|
1817
|
+
set selectors(e) {
|
|
1818
|
+
let s = this.selector ? this.selector.match(/,\s*/) : null, r = s ? s[0] : "," + this.raw("between", "beforeOpen");
|
|
1819
|
+
this.selector = e.join(r);
|
|
1820
|
+
}
|
|
1821
|
+
constructor(e) {
|
|
1822
|
+
super(e), this.type = "rule", this.nodes || (this.nodes = []);
|
|
1823
|
+
}
|
|
1824
|
+
};
|
|
1825
|
+
co.exports = We, We.default = We, lo.registerRule(We);
|
|
1826
|
+
}), er = w((Cx, po) => {
|
|
1827
|
+
"use strict";
|
|
1828
|
+
var Jt = /[\t\n\f\r "#'()/;[\\\]{}]/g, Zt = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, Qc = /.[\r\n"'(/\\]/, fo = /[\da-f]/i;
|
|
1829
|
+
po.exports = function(e, s = {}) {
|
|
1830
|
+
let r = e.css.valueOf(), n = s.ignoreErrors, i, o, u, a, l, f, h, c, g, b, d = r.length, p = 0, m = [], y = [];
|
|
1831
|
+
function v() {
|
|
1832
|
+
return p;
|
|
1833
|
+
}
|
|
1834
|
+
function O(W) {
|
|
1835
|
+
throw e.error("Unclosed " + W, p);
|
|
1836
|
+
}
|
|
1837
|
+
function q() {
|
|
1838
|
+
return y.length === 0 && p >= d;
|
|
1839
|
+
}
|
|
1840
|
+
function H(W) {
|
|
1841
|
+
if (y.length) return y.pop();
|
|
1842
|
+
if (p >= d) return;
|
|
1843
|
+
let A = W ? W.ignoreUnclosed : !1;
|
|
1844
|
+
switch (i = r.charCodeAt(p), i) {
|
|
1845
|
+
case 10:
|
|
1846
|
+
case 32:
|
|
1847
|
+
case 9:
|
|
1848
|
+
case 13:
|
|
1849
|
+
case 12: {
|
|
1850
|
+
a = p;
|
|
1851
|
+
do
|
|
1852
|
+
a += 1, i = r.charCodeAt(a);
|
|
1853
|
+
while (i === 32 || i === 10 || i === 9 || i === 13 || i === 12);
|
|
1854
|
+
f = ["space", r.slice(p, a)], p = a - 1;
|
|
1855
|
+
break;
|
|
1856
|
+
}
|
|
1857
|
+
case 91:
|
|
1858
|
+
case 93:
|
|
1859
|
+
case 123:
|
|
1860
|
+
case 125:
|
|
1861
|
+
case 58:
|
|
1862
|
+
case 59:
|
|
1863
|
+
case 41: {
|
|
1864
|
+
let k = String.fromCharCode(i);
|
|
1865
|
+
f = [k, k, p];
|
|
1866
|
+
break;
|
|
1867
|
+
}
|
|
1868
|
+
case 40: {
|
|
1869
|
+
if (b = m.length ? m.pop()[1] : "", g = r.charCodeAt(p + 1), b === "url" && g !== 39 && g !== 34 && g !== 32 && g !== 10 && g !== 9 && g !== 12 && g !== 13) {
|
|
1870
|
+
a = p;
|
|
1871
|
+
do {
|
|
1872
|
+
if (h = !1, a = r.indexOf(")", a + 1), a === -1) if (n || A) {
|
|
1873
|
+
a = p;
|
|
1874
|
+
break;
|
|
1875
|
+
} else O("bracket");
|
|
1876
|
+
for (c = a; r.charCodeAt(c - 1) === 92; ) c -= 1, h = !h;
|
|
1877
|
+
} while (h);
|
|
1878
|
+
f = ["brackets", r.slice(p, a + 1), p, a], p = a;
|
|
1879
|
+
} else a = r.indexOf(")", p + 1), o = r.slice(p, a + 1), a === -1 || Qc.test(o) ? f = ["(", "(", p] : (f = ["brackets", o, p, a], p = a);
|
|
1880
|
+
break;
|
|
1881
|
+
}
|
|
1882
|
+
case 39:
|
|
1883
|
+
case 34: {
|
|
1884
|
+
l = i === 39 ? "'" : '"', a = p;
|
|
1885
|
+
do {
|
|
1886
|
+
if (h = !1, a = r.indexOf(l, a + 1), a === -1) if (n || A) {
|
|
1887
|
+
a = p + 1;
|
|
1888
|
+
break;
|
|
1889
|
+
} else O("string");
|
|
1890
|
+
for (c = a; r.charCodeAt(c - 1) === 92; ) c -= 1, h = !h;
|
|
1891
|
+
} while (h);
|
|
1892
|
+
f = ["string", r.slice(p, a + 1), p, a], p = a;
|
|
1893
|
+
break;
|
|
1894
|
+
}
|
|
1895
|
+
case 64: {
|
|
1896
|
+
Jt.lastIndex = p + 1, Jt.test(r), Jt.lastIndex === 0 ? a = r.length - 1 : a = Jt.lastIndex - 2, f = ["at-word", r.slice(p, a + 1), p, a], p = a;
|
|
1897
|
+
break;
|
|
1898
|
+
}
|
|
1899
|
+
case 92: {
|
|
1900
|
+
for (a = p, u = !0; r.charCodeAt(a + 1) === 92; ) a += 1, u = !u;
|
|
1901
|
+
if (i = r.charCodeAt(a + 1), u && i !== 47 && i !== 32 && i !== 10 && i !== 9 && i !== 13 && i !== 12 && (a += 1, fo.test(r.charAt(a)))) {
|
|
1902
|
+
for (; fo.test(r.charAt(a + 1)); ) a += 1;
|
|
1903
|
+
r.charCodeAt(a + 1) === 32 && (a += 1);
|
|
1904
|
+
}
|
|
1905
|
+
f = ["word", r.slice(p, a + 1), p, a], p = a;
|
|
1906
|
+
break;
|
|
1907
|
+
}
|
|
1908
|
+
default: {
|
|
1909
|
+
i === 47 && r.charCodeAt(p + 1) === 42 ? (a = r.indexOf("*/", p + 2) + 1, a === 0 && (n || A ? a = r.length : O("comment")), f = ["comment", r.slice(p, a + 1), p, a], p = a) : (Zt.lastIndex = p + 1, Zt.test(r), Zt.lastIndex === 0 ? a = r.length - 1 : a = Zt.lastIndex - 2, f = ["word", r.slice(p, a + 1), p, a], m.push(f), p = a);
|
|
1910
|
+
break;
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
return p++, f;
|
|
1914
|
+
}
|
|
1915
|
+
function ne(W) {
|
|
1916
|
+
y.push(W);
|
|
1917
|
+
}
|
|
1918
|
+
return { back: ne, endOfFile: q, nextToken: H, position: v };
|
|
1919
|
+
};
|
|
1920
|
+
}), tr = w((Nx, yo) => {
|
|
1921
|
+
"use strict";
|
|
1922
|
+
var Xc = Qt(), Jc = Me(), Zc = ft(), ef = $e(), ho = Xt(), tf = er(), mo = { empty: !0, space: !0 };
|
|
1923
|
+
function rf(t) {
|
|
1924
|
+
for (let e = t.length - 1; e >= 0; e--) {
|
|
1925
|
+
let s = t[e], r = s[3] || s[2];
|
|
1926
|
+
if (r) return r;
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
var vs = class {
|
|
1930
|
+
constructor(e) {
|
|
1931
|
+
this.input = e, this.root = new ef(), this.current = this.root, this.spaces = "", this.semicolon = !1, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
1932
|
+
}
|
|
1933
|
+
atrule(e) {
|
|
1934
|
+
let s = new Xc();
|
|
1935
|
+
s.name = e[1].slice(1), s.name === "" && this.unnamedAtrule(s, e), this.init(s, e[2]);
|
|
1936
|
+
let r, n, i, o = !1, u = !1, a = [], l = [];
|
|
1937
|
+
for (; !this.tokenizer.endOfFile(); ) {
|
|
1938
|
+
if (e = this.tokenizer.nextToken(), r = e[0], r === "(" || r === "[" ? l.push(r === "(" ? ")" : "]") : r === "{" && l.length > 0 ? l.push("}") : r === l[l.length - 1] && l.pop(), l.length === 0) if (r === ";") {
|
|
1939
|
+
s.source.end = this.getPosition(e[2]), s.source.end.offset++, this.semicolon = !0;
|
|
1940
|
+
break;
|
|
1941
|
+
} else if (r === "{") {
|
|
1942
|
+
u = !0;
|
|
1943
|
+
break;
|
|
1944
|
+
} else if (r === "}") {
|
|
1945
|
+
if (a.length > 0) {
|
|
1946
|
+
for (i = a.length - 1, n = a[i]; n && n[0] === "space"; ) n = a[--i];
|
|
1947
|
+
n && (s.source.end = this.getPosition(n[3] || n[2]), s.source.end.offset++);
|
|
1948
|
+
}
|
|
1949
|
+
this.end(e);
|
|
1950
|
+
break;
|
|
1951
|
+
} else a.push(e);
|
|
1952
|
+
else a.push(e);
|
|
1953
|
+
if (this.tokenizer.endOfFile()) {
|
|
1954
|
+
o = !0;
|
|
1955
|
+
break;
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
s.raws.between = this.spacesAndCommentsFromEnd(a), a.length ? (s.raws.afterName = this.spacesAndCommentsFromStart(a), this.raw(s, "params", a), o && (e = a[a.length - 1], s.source.end = this.getPosition(e[3] || e[2]), s.source.end.offset++, this.spaces = s.raws.between, s.raws.between = "")) : (s.raws.afterName = "", s.params = ""), u && (s.nodes = [], this.current = s);
|
|
1959
|
+
}
|
|
1960
|
+
checkMissedSemicolon(e) {
|
|
1961
|
+
let s = this.colon(e);
|
|
1962
|
+
if (s === !1) return;
|
|
1963
|
+
let r = 0, n;
|
|
1964
|
+
for (let i = s - 1; i >= 0 && (n = e[i], !(n[0] !== "space" && (r += 1, r === 2))); i--) ;
|
|
1965
|
+
throw this.input.error("Missed semicolon", n[0] === "word" ? n[3] + 1 : n[2]);
|
|
1966
|
+
}
|
|
1967
|
+
colon(e) {
|
|
1968
|
+
let s = 0, r, n, i;
|
|
1969
|
+
for (let [o, u] of e.entries()) {
|
|
1970
|
+
if (n = u, i = n[0], i === "(" && (s += 1), i === ")" && (s -= 1), s === 0 && i === ":") if (!r) this.doubleColon(n);
|
|
1971
|
+
else {
|
|
1972
|
+
if (r[0] === "word" && r[1] === "progid") continue;
|
|
1973
|
+
return o;
|
|
1974
|
+
}
|
|
1975
|
+
r = n;
|
|
1976
|
+
}
|
|
1977
|
+
return !1;
|
|
1978
|
+
}
|
|
1979
|
+
comment(e) {
|
|
1980
|
+
let s = new Jc();
|
|
1981
|
+
this.init(s, e[2]), s.source.end = this.getPosition(e[3] || e[2]), s.source.end.offset++;
|
|
1982
|
+
let r = e[1].slice(2, -2);
|
|
1983
|
+
if (/^\s*$/.test(r)) s.text = "", s.raws.left = r, s.raws.right = "";
|
|
1984
|
+
else {
|
|
1985
|
+
let n = r.match(/^(\s*)([^]*\S)(\s*)$/);
|
|
1986
|
+
s.text = n[2], s.raws.left = n[1], s.raws.right = n[3];
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
createTokenizer() {
|
|
1990
|
+
this.tokenizer = tf(this.input);
|
|
1991
|
+
}
|
|
1992
|
+
decl(e, s) {
|
|
1993
|
+
let r = new Zc();
|
|
1994
|
+
this.init(r, e[0][2]);
|
|
1995
|
+
let n = e[e.length - 1];
|
|
1996
|
+
for (n[0] === ";" && (this.semicolon = !0, e.pop()), r.source.end = this.getPosition(n[3] || n[2] || rf(e)), r.source.end.offset++; e[0][0] !== "word"; ) e.length === 1 && this.unknownWord(e), r.raws.before += e.shift()[1];
|
|
1997
|
+
for (r.source.start = this.getPosition(e[0][2]), r.prop = ""; e.length; ) {
|
|
1998
|
+
let l = e[0][0];
|
|
1999
|
+
if (l === ":" || l === "space" || l === "comment") break;
|
|
2000
|
+
r.prop += e.shift()[1];
|
|
2001
|
+
}
|
|
2002
|
+
r.raws.between = "";
|
|
2003
|
+
let i;
|
|
2004
|
+
for (; e.length; ) if (i = e.shift(), i[0] === ":") {
|
|
2005
|
+
r.raws.between += i[1];
|
|
2006
|
+
break;
|
|
2007
|
+
} else i[0] === "word" && /\w/.test(i[1]) && this.unknownWord([i]), r.raws.between += i[1];
|
|
2008
|
+
(r.prop[0] === "_" || r.prop[0] === "*") && (r.raws.before += r.prop[0], r.prop = r.prop.slice(1));
|
|
2009
|
+
let o = [], u;
|
|
2010
|
+
for (; e.length && (u = e[0][0], !(u !== "space" && u !== "comment")); ) o.push(e.shift());
|
|
2011
|
+
this.precheckMissedSemicolon(e);
|
|
2012
|
+
for (let l = e.length - 1; l >= 0; l--) {
|
|
2013
|
+
if (i = e[l], i[1].toLowerCase() === "!important") {
|
|
2014
|
+
r.important = !0;
|
|
2015
|
+
let f = this.stringFrom(e, l);
|
|
2016
|
+
f = this.spacesFromEnd(e) + f, f !== " !important" && (r.raws.important = f);
|
|
2017
|
+
break;
|
|
2018
|
+
} else if (i[1].toLowerCase() === "important") {
|
|
2019
|
+
let f = e.slice(0), h = "";
|
|
2020
|
+
for (let c = l; c > 0; c--) {
|
|
2021
|
+
let g = f[c][0];
|
|
2022
|
+
if (h.trim().startsWith("!") && g !== "space") break;
|
|
2023
|
+
h = f.pop()[1] + h;
|
|
2024
|
+
}
|
|
2025
|
+
h.trim().startsWith("!") && (r.important = !0, r.raws.important = h, e = f);
|
|
2026
|
+
}
|
|
2027
|
+
if (i[0] !== "space" && i[0] !== "comment") break;
|
|
2028
|
+
}
|
|
2029
|
+
e.some((l) => l[0] !== "space" && l[0] !== "comment") && (r.raws.between += o.map((l) => l[1]).join(""), o = []), this.raw(r, "value", o.concat(e), s), r.value.includes(":") && !s && this.checkMissedSemicolon(e);
|
|
2030
|
+
}
|
|
2031
|
+
doubleColon(e) {
|
|
2032
|
+
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
|
|
2033
|
+
}
|
|
2034
|
+
emptyRule(e) {
|
|
2035
|
+
let s = new ho();
|
|
2036
|
+
this.init(s, e[2]), s.selector = "", s.raws.between = "", this.current = s;
|
|
2037
|
+
}
|
|
2038
|
+
end(e) {
|
|
2039
|
+
this.current.nodes && this.current.nodes.length && (this.current.raws.semicolon = this.semicolon), this.semicolon = !1, this.current.raws.after = (this.current.raws.after || "") + this.spaces, this.spaces = "", this.current.parent ? (this.current.source.end = this.getPosition(e[2]), this.current.source.end.offset++, this.current = this.current.parent) : this.unexpectedClose(e);
|
|
2040
|
+
}
|
|
2041
|
+
endFile() {
|
|
2042
|
+
this.current.parent && this.unclosedBlock(), this.current.nodes && this.current.nodes.length && (this.current.raws.semicolon = this.semicolon), this.current.raws.after = (this.current.raws.after || "") + this.spaces, this.root.source.end = this.getPosition(this.tokenizer.position());
|
|
2043
|
+
}
|
|
2044
|
+
freeSemicolon(e) {
|
|
2045
|
+
if (this.spaces += e[1], this.current.nodes) {
|
|
2046
|
+
let s = this.current.nodes[this.current.nodes.length - 1];
|
|
2047
|
+
s && s.type === "rule" && !s.raws.ownSemicolon && (s.raws.ownSemicolon = this.spaces, this.spaces = "", s.source.end = this.getPosition(e[2]), s.source.end.offset += s.raws.ownSemicolon.length);
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
getPosition(e) {
|
|
2051
|
+
let s = this.input.fromOffset(e);
|
|
2052
|
+
return { column: s.col, line: s.line, offset: e };
|
|
2053
|
+
}
|
|
2054
|
+
init(e, s) {
|
|
2055
|
+
this.current.push(e), e.source = { input: this.input, start: this.getPosition(s) }, e.raws.before = this.spaces, this.spaces = "", e.type !== "comment" && (this.semicolon = !1);
|
|
2056
|
+
}
|
|
2057
|
+
other(e) {
|
|
2058
|
+
let s = !1, r = null, n = !1, i = null, o = [], u = e[1].startsWith("--"), a = [], l = e;
|
|
2059
|
+
for (; l; ) {
|
|
2060
|
+
if (r = l[0], a.push(l), r === "(" || r === "[") i || (i = l), o.push(r === "(" ? ")" : "]");
|
|
2061
|
+
else if (u && n && r === "{") i || (i = l), o.push("}");
|
|
2062
|
+
else if (o.length === 0) if (r === ";") if (n) {
|
|
2063
|
+
this.decl(a, u);
|
|
2064
|
+
return;
|
|
2065
|
+
} else break;
|
|
2066
|
+
else if (r === "{") {
|
|
2067
|
+
this.rule(a);
|
|
2068
|
+
return;
|
|
2069
|
+
} else if (r === "}") {
|
|
2070
|
+
this.tokenizer.back(a.pop()), s = !0;
|
|
2071
|
+
break;
|
|
2072
|
+
} else r === ":" && (n = !0);
|
|
2073
|
+
else r === o[o.length - 1] && (o.pop(), o.length === 0 && (i = null));
|
|
2074
|
+
l = this.tokenizer.nextToken();
|
|
2075
|
+
}
|
|
2076
|
+
if (this.tokenizer.endOfFile() && (s = !0), o.length > 0 && this.unclosedBracket(i), s && n) {
|
|
2077
|
+
if (!u) for (; a.length && (l = a[a.length - 1][0], !(l !== "space" && l !== "comment")); ) this.tokenizer.back(a.pop());
|
|
2078
|
+
this.decl(a, u);
|
|
2079
|
+
} else this.unknownWord(a);
|
|
2080
|
+
}
|
|
2081
|
+
parse() {
|
|
2082
|
+
let e;
|
|
2083
|
+
for (; !this.tokenizer.endOfFile(); ) switch (e = this.tokenizer.nextToken(), e[0]) {
|
|
2084
|
+
case "space":
|
|
2085
|
+
this.spaces += e[1];
|
|
2086
|
+
break;
|
|
2087
|
+
case ";":
|
|
2088
|
+
this.freeSemicolon(e);
|
|
2089
|
+
break;
|
|
2090
|
+
case "}":
|
|
2091
|
+
this.end(e);
|
|
2092
|
+
break;
|
|
2093
|
+
case "comment":
|
|
2094
|
+
this.comment(e);
|
|
2095
|
+
break;
|
|
2096
|
+
case "at-word":
|
|
2097
|
+
this.atrule(e);
|
|
2098
|
+
break;
|
|
2099
|
+
case "{":
|
|
2100
|
+
this.emptyRule(e);
|
|
2101
|
+
break;
|
|
2102
|
+
default:
|
|
2103
|
+
this.other(e);
|
|
2104
|
+
break;
|
|
2105
|
+
}
|
|
2106
|
+
this.endFile();
|
|
2107
|
+
}
|
|
2108
|
+
precheckMissedSemicolon() {
|
|
2109
|
+
}
|
|
2110
|
+
raw(e, s, r, n) {
|
|
2111
|
+
let i, o, u = r.length, a = "", l = !0, f, h;
|
|
2112
|
+
for (let c = 0; c < u; c += 1) i = r[c], o = i[0], o === "space" && c === u - 1 && !n ? l = !1 : o === "comment" ? (h = r[c - 1] ? r[c - 1][0] : "empty", f = r[c + 1] ? r[c + 1][0] : "empty", !mo[h] && !mo[f] ? a.slice(-1) === "," ? l = !1 : a += i[1] : l = !1) : a += i[1];
|
|
2113
|
+
if (!l) {
|
|
2114
|
+
let c = r.reduce((g, b) => g + b[1], "");
|
|
2115
|
+
e.raws[s] = { raw: c, value: a };
|
|
2116
|
+
}
|
|
2117
|
+
e[s] = a;
|
|
2118
|
+
}
|
|
2119
|
+
rule(e) {
|
|
2120
|
+
e.pop();
|
|
2121
|
+
let s = new ho();
|
|
2122
|
+
this.init(s, e[0][2]), s.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(s, "selector", e), this.current = s;
|
|
2123
|
+
}
|
|
2124
|
+
spacesAndCommentsFromEnd(e) {
|
|
2125
|
+
let s, r = "";
|
|
2126
|
+
for (; e.length && (s = e[e.length - 1][0], !(s !== "space" && s !== "comment")); ) r = e.pop()[1] + r;
|
|
2127
|
+
return r;
|
|
2128
|
+
}
|
|
2129
|
+
spacesAndCommentsFromStart(e) {
|
|
2130
|
+
let s, r = "";
|
|
2131
|
+
for (; e.length && (s = e[0][0], !(s !== "space" && s !== "comment")); ) r += e.shift()[1];
|
|
2132
|
+
return r;
|
|
2133
|
+
}
|
|
2134
|
+
spacesFromEnd(e) {
|
|
2135
|
+
let s, r = "";
|
|
2136
|
+
for (; e.length && (s = e[e.length - 1][0], s === "space"); ) r = e.pop()[1] + r;
|
|
2137
|
+
return r;
|
|
2138
|
+
}
|
|
2139
|
+
stringFrom(e, s) {
|
|
2140
|
+
let r = "";
|
|
2141
|
+
for (let n = s; n < e.length; n++) r += e[n][1];
|
|
2142
|
+
return e.splice(s, e.length - s), r;
|
|
2143
|
+
}
|
|
2144
|
+
unclosedBlock() {
|
|
2145
|
+
let e = this.current.source.start;
|
|
2146
|
+
throw this.input.error("Unclosed block", e.line, e.column);
|
|
2147
|
+
}
|
|
2148
|
+
unclosedBracket(e) {
|
|
2149
|
+
throw this.input.error("Unclosed bracket", { offset: e[2] }, { offset: e[2] + 1 });
|
|
2150
|
+
}
|
|
2151
|
+
unexpectedClose(e) {
|
|
2152
|
+
throw this.input.error("Unexpected }", { offset: e[2] }, { offset: e[2] + 1 });
|
|
2153
|
+
}
|
|
2154
|
+
unknownWord(e) {
|
|
2155
|
+
throw this.input.error("Unknown word " + e[0][1], { offset: e[0][2] }, { offset: e[0][2] + e[0][1].length });
|
|
2156
|
+
}
|
|
2157
|
+
unnamedAtrule(e, s) {
|
|
2158
|
+
throw this.input.error("At-rule without name", { offset: s[2] }, { offset: s[2] + s[1].length });
|
|
2159
|
+
}
|
|
2160
|
+
};
|
|
2161
|
+
yo.exports = vs;
|
|
2162
|
+
}), ht = w((Px, go) => {
|
|
2163
|
+
"use strict";
|
|
2164
|
+
var sf = fe(), nf = Ue(), of = tr();
|
|
2165
|
+
function rr(t, e) {
|
|
2166
|
+
let s = new nf(t, e), r = new of(s);
|
|
2167
|
+
try {
|
|
2168
|
+
r.parse();
|
|
2169
|
+
} catch (n) {
|
|
2170
|
+
throw n;
|
|
2171
|
+
}
|
|
2172
|
+
return r.root;
|
|
2173
|
+
}
|
|
2174
|
+
go.exports = rr, rr.default = rr, sf.registerParse(rr);
|
|
2175
|
+
}), wo = w((Rx, xs) => {
|
|
2176
|
+
var af = er(), uf = Ue();
|
|
2177
|
+
xs.exports = { isInlineComment(t) {
|
|
2178
|
+
if (t[0] === "word" && t[1].slice(0, 2) === "//") {
|
|
2179
|
+
let e = t, s = [], r, n;
|
|
2180
|
+
for (; t; ) {
|
|
2181
|
+
if (/\r?\n/.test(t[1])) {
|
|
2182
|
+
if (/['"].*\r?\n/.test(t[1])) {
|
|
2183
|
+
s.push(t[1].substring(0, t[1].indexOf(`
|
|
2184
|
+
`))), n = t[1].substring(t[1].indexOf(`
|
|
2185
|
+
`));
|
|
2186
|
+
let o = this.input.css.valueOf().substring(this.tokenizer.position());
|
|
2187
|
+
n += o, r = t[3] + o.length - n.length;
|
|
2188
|
+
} else this.tokenizer.back(t);
|
|
2189
|
+
break;
|
|
2190
|
+
}
|
|
2191
|
+
s.push(t[1]), r = t[2], t = this.tokenizer.nextToken({ ignoreUnclosed: !0 });
|
|
2192
|
+
}
|
|
2193
|
+
let i = ["comment", s.join(""), e[2], r];
|
|
2194
|
+
return this.inlineComment(i), n && (this.input = new uf(n), this.tokenizer = af(this.input)), !0;
|
|
2195
|
+
} else if (t[1] === "/") {
|
|
2196
|
+
let e = this.tokenizer.nextToken({ ignoreUnclosed: !0 });
|
|
2197
|
+
if (e[0] === "comment" && /^\/\*/.test(e[1])) return e[0] = "word", e[1] = e[1].slice(1), t[1] = "//", this.tokenizer.back(e), xs.exports.isInlineComment.bind(this)(t);
|
|
2198
|
+
}
|
|
2199
|
+
return !1;
|
|
2200
|
+
} };
|
|
2201
|
+
}), xo = w((Ix, vo) => {
|
|
2202
|
+
vo.exports = { interpolation(t) {
|
|
2203
|
+
let e = [t, this.tokenizer.nextToken()], s = ["word", "}"];
|
|
2204
|
+
if (e[0][1].length > 1 || e[1][0] !== "{") return this.tokenizer.back(e[1]), !1;
|
|
2205
|
+
for (t = this.tokenizer.nextToken(); t && s.includes(t[0]); ) e.push(t), t = this.tokenizer.nextToken();
|
|
2206
|
+
let r = e.map((u) => u[1]), [n] = e, i = e.pop(), o = ["word", r.join(""), n[2], i[2]];
|
|
2207
|
+
return this.tokenizer.back(t), this.tokenizer.back(o), !0;
|
|
2208
|
+
} };
|
|
2209
|
+
}), bo = w((qx, _o) => {
|
|
2210
|
+
var lf = /^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/, cf = /\.[0-9]/, ff = (t) => {
|
|
2211
|
+
let [, e] = t, [s] = e;
|
|
2212
|
+
return (s === "." || s === "#") && lf.test(e) === !1 && cf.test(e) === !1;
|
|
2213
|
+
};
|
|
2214
|
+
_o.exports = { isMixinToken: ff };
|
|
2215
|
+
}), So = w((Lx, Eo) => {
|
|
2216
|
+
var pf = er(), hf = /^url\((.+)\)/;
|
|
2217
|
+
Eo.exports = (t) => {
|
|
2218
|
+
let { name: e, params: s = "" } = t;
|
|
2219
|
+
if (e === "import" && s.length) {
|
|
2220
|
+
t.import = !0;
|
|
2221
|
+
let r = pf({ css: s });
|
|
2222
|
+
for (t.filename = s.replace(hf, "$1"); !r.endOfFile(); ) {
|
|
2223
|
+
let [n, i] = r.nextToken();
|
|
2224
|
+
if (n === "word" && i === "url") return;
|
|
2225
|
+
if (n === "brackets") {
|
|
2226
|
+
t.options = i, t.filename = s.replace(i, "").trim();
|
|
2227
|
+
break;
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
};
|
|
2232
|
+
}), Oo = w((Dx, Ao) => {
|
|
2233
|
+
var ko = /:$/, To = /^:(\s+)?/;
|
|
2234
|
+
Ao.exports = (t) => {
|
|
2235
|
+
let { name: e, params: s = "" } = t;
|
|
2236
|
+
if (t.name.slice(-1) === ":") {
|
|
2237
|
+
if (ko.test(e)) {
|
|
2238
|
+
let [r] = e.match(ko);
|
|
2239
|
+
t.name = e.replace(r, ""), t.raws.afterName = r + (t.raws.afterName || ""), t.variable = !0, t.value = t.params;
|
|
2240
|
+
}
|
|
2241
|
+
if (To.test(s)) {
|
|
2242
|
+
let [r] = s.match(To);
|
|
2243
|
+
t.value = s.replace(r, ""), t.raws.afterName = (t.raws.afterName || "") + r, t.variable = !0;
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2246
|
+
};
|
|
2247
|
+
}), Po = w((Bx, No) => {
|
|
2248
|
+
var df = Me(), mf = tr(), { isInlineComment: yf } = wo(), { interpolation: Co } = xo(), { isMixinToken: gf } = bo(), wf = So(), vf = Oo(), xf = /(!\s*important)$/i;
|
|
2249
|
+
No.exports = class extends mf {
|
|
2250
|
+
constructor(...e) {
|
|
2251
|
+
super(...e), this.lastNode = null;
|
|
2252
|
+
}
|
|
2253
|
+
atrule(e) {
|
|
2254
|
+
Co.bind(this)(e) || (super.atrule(e), wf(this.lastNode), vf(this.lastNode));
|
|
2255
|
+
}
|
|
2256
|
+
decl(...e) {
|
|
2257
|
+
super.decl(...e), /extend\(.+\)/i.test(this.lastNode.value) && (this.lastNode.extend = !0);
|
|
2258
|
+
}
|
|
2259
|
+
each(e) {
|
|
2260
|
+
e[0][1] = ` ${e[0][1]}`;
|
|
2261
|
+
let s = e.findIndex((u) => u[0] === "("), r = e.reverse().find((u) => u[0] === ")"), n = e.reverse().indexOf(r), o = e.splice(s, n).map((u) => u[1]).join("");
|
|
2262
|
+
for (let u of e.reverse()) this.tokenizer.back(u);
|
|
2263
|
+
this.atrule(this.tokenizer.nextToken()), this.lastNode.function = !0, this.lastNode.params = o;
|
|
2264
|
+
}
|
|
2265
|
+
init(e, s, r) {
|
|
2266
|
+
super.init(e, s, r), this.lastNode = e;
|
|
2267
|
+
}
|
|
2268
|
+
inlineComment(e) {
|
|
2269
|
+
let s = new df(), r = e[1].slice(2);
|
|
2270
|
+
if (this.init(s, e[2]), s.source.end = this.getPosition(e[3] || e[2]), s.inline = !0, s.raws.begin = "//", /^\s*$/.test(r)) s.text = "", s.raws.left = r, s.raws.right = "";
|
|
2271
|
+
else {
|
|
2272
|
+
let n = r.match(/^(\s*)([^]*[^\s])(\s*)$/);
|
|
2273
|
+
[, s.raws.left, s.text, s.raws.right] = n;
|
|
2274
|
+
}
|
|
2275
|
+
}
|
|
2276
|
+
mixin(e) {
|
|
2277
|
+
let [s] = e, r = s[1].slice(0, 1), n = e.findIndex((l) => l[0] === "brackets"), i = e.findIndex((l) => l[0] === "("), o = "";
|
|
2278
|
+
if ((n < 0 || n > 3) && i > 0) {
|
|
2279
|
+
let l = e.reduce((v, O, q) => O[0] === ")" ? q : v), h = e.slice(i, l + i).map((v) => v[1]).join(""), [c] = e.slice(i), g = [c[2], c[3]], [b] = e.slice(l, l + 1), d = [b[2], b[3]], p = ["brackets", h].concat(g, d), m = e.slice(0, i), y = e.slice(l + 1);
|
|
2280
|
+
e = m, e.push(p), e = e.concat(y);
|
|
2281
|
+
}
|
|
2282
|
+
let u = [];
|
|
2283
|
+
for (let l of e) if ((l[1] === "!" || u.length) && u.push(l), l[1] === "important") break;
|
|
2284
|
+
if (u.length) {
|
|
2285
|
+
let [l] = u, f = e.indexOf(l), h = u[u.length - 1], c = [l[2], l[3]], g = [h[4], h[5]], d = ["word", u.map((p) => p[1]).join("")].concat(c, g);
|
|
2286
|
+
e.splice(f, u.length, d);
|
|
2287
|
+
}
|
|
2288
|
+
let a = e.findIndex((l) => xf.test(l[1]));
|
|
2289
|
+
a > 0 && ([, o] = e[a], e.splice(a, 1));
|
|
2290
|
+
for (let l of e.reverse()) this.tokenizer.back(l);
|
|
2291
|
+
this.atrule(this.tokenizer.nextToken()), this.lastNode.mixin = !0, this.lastNode.raws.identifier = r, o && (this.lastNode.important = !0, this.lastNode.raws.important = o);
|
|
2292
|
+
}
|
|
2293
|
+
other(e) {
|
|
2294
|
+
yf.bind(this)(e) || super.other(e);
|
|
2295
|
+
}
|
|
2296
|
+
rule(e) {
|
|
2297
|
+
let s = e[e.length - 1], r = e[e.length - 2];
|
|
2298
|
+
if (r[0] === "at-word" && s[0] === "{" && (this.tokenizer.back(s), Co.bind(this)(r))) {
|
|
2299
|
+
let i = this.tokenizer.nextToken();
|
|
2300
|
+
e = e.slice(0, e.length - 2).concat([i]);
|
|
2301
|
+
for (let o of e.reverse()) this.tokenizer.back(o);
|
|
2302
|
+
return;
|
|
2303
|
+
}
|
|
2304
|
+
super.rule(e), /:extend\(.+\)/i.test(this.lastNode.selector) && (this.lastNode.extend = !0);
|
|
2305
|
+
}
|
|
2306
|
+
unknownWord(e) {
|
|
2307
|
+
let [s] = e;
|
|
2308
|
+
if (e[0][1] === "each" && e[1][0] === "(") {
|
|
2309
|
+
this.each(e);
|
|
2310
|
+
return;
|
|
2311
|
+
}
|
|
2312
|
+
if (gf(s)) {
|
|
2313
|
+
this.mixin(e);
|
|
2314
|
+
return;
|
|
2315
|
+
}
|
|
2316
|
+
super.unknownWord(e);
|
|
2317
|
+
}
|
|
2318
|
+
};
|
|
2319
|
+
}), Io = w((Fx, Ro) => {
|
|
2320
|
+
var _f = jt();
|
|
2321
|
+
Ro.exports = class extends _f {
|
|
2322
|
+
atrule(e, s) {
|
|
2323
|
+
if (!e.mixin && !e.variable && !e.function) {
|
|
2324
|
+
super.atrule(e, s);
|
|
2325
|
+
return;
|
|
2326
|
+
}
|
|
2327
|
+
let n = `${e.function ? "" : e.raws.identifier || "@"}${e.name}`, i = e.params ? this.rawValue(e, "params") : "", o = e.raws.important || "";
|
|
2328
|
+
if (e.variable && (i = e.value), typeof e.raws.afterName < "u" ? n += e.raws.afterName : i && (n += " "), e.nodes) this.block(e, n + i + o);
|
|
2329
|
+
else {
|
|
2330
|
+
let u = (e.raws.between || "") + o + (s ? ";" : "");
|
|
2331
|
+
this.builder(n + i + u, e);
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
comment(e) {
|
|
2335
|
+
if (e.inline) {
|
|
2336
|
+
let s = this.raw(e, "left", "commentLeft"), r = this.raw(e, "right", "commentRight");
|
|
2337
|
+
this.builder(`//${s}${e.text}${r}`, e);
|
|
2338
|
+
} else super.comment(e);
|
|
2339
|
+
}
|
|
2340
|
+
};
|
|
2341
|
+
}), qo = w(($x, _s) => {
|
|
2342
|
+
var bf = Ue(), Ef = Po(), Sf = Io();
|
|
2343
|
+
_s.exports = { parse(t, e) {
|
|
2344
|
+
let s = new bf(t, e), r = new Ef(s);
|
|
2345
|
+
return r.parse(), r.root.walk((n) => {
|
|
2346
|
+
let i = s.css.lastIndexOf(n.source.input.css);
|
|
2347
|
+
if (i === 0) return;
|
|
2348
|
+
if (i + n.source.input.css.length !== s.css.length) throw new Error("Invalid state detected in postcss-less");
|
|
2349
|
+
let o = i + n.source.start.offset, u = s.fromOffset(i + n.source.start.offset);
|
|
2350
|
+
if (n.source.start = { offset: o, line: u.line, column: u.col }, n.source.end) {
|
|
2351
|
+
let a = i + n.source.end.offset, l = s.fromOffset(i + n.source.end.offset);
|
|
2352
|
+
n.source.end = { offset: a, line: l.line, column: l.col };
|
|
2353
|
+
}
|
|
2354
|
+
}), r.root;
|
|
2355
|
+
}, stringify(t, e) {
|
|
2356
|
+
new Sf(e).stringify(t);
|
|
2357
|
+
}, nodeToString(t) {
|
|
2358
|
+
let e = "";
|
|
2359
|
+
return _s.exports.stringify(t, (s) => {
|
|
2360
|
+
e += s;
|
|
2361
|
+
}), e;
|
|
2362
|
+
} };
|
|
2363
|
+
}), sr = w((Wx, Mo) => {
|
|
2364
|
+
"use strict";
|
|
2365
|
+
var kf = fe(), Lo, Do, be = class extends kf {
|
|
2366
|
+
constructor(e) {
|
|
2367
|
+
super({ type: "document", ...e }), this.nodes || (this.nodes = []);
|
|
2368
|
+
}
|
|
2369
|
+
toResult(e = {}) {
|
|
2370
|
+
return new Lo(new Do(), this, e).stringify();
|
|
2371
|
+
}
|
|
2372
|
+
};
|
|
2373
|
+
be.registerLazyResult = (t) => {
|
|
2374
|
+
Lo = t;
|
|
2375
|
+
}, be.registerProcessor = (t) => {
|
|
2376
|
+
Do = t;
|
|
2377
|
+
}, Mo.exports = be, be.default = be;
|
|
2378
|
+
}), Uo = w((Gx, Bo) => {
|
|
2379
|
+
"use strict";
|
|
2380
|
+
var Tf = Qt(), Af = Me(), Of = ft(), Cf = Ue(), Nf = hs(), Pf = $e(), Rf = Xt();
|
|
2381
|
+
function dt(t, e) {
|
|
2382
|
+
if (Array.isArray(t)) return t.map((n) => dt(n));
|
|
2383
|
+
let { inputs: s, ...r } = t;
|
|
2384
|
+
if (s) {
|
|
2385
|
+
e = [];
|
|
2386
|
+
for (let n of s) {
|
|
2387
|
+
let i = { ...n, __proto__: Cf.prototype };
|
|
2388
|
+
i.map && (i.map = { ...i.map, __proto__: Nf.prototype }), e.push(i);
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
if (r.nodes && (r.nodes = t.nodes.map((n) => dt(n, e))), r.source) {
|
|
2392
|
+
let { inputId: n, ...i } = r.source;
|
|
2393
|
+
r.source = i, n != null && (r.source.input = e[n]);
|
|
2394
|
+
}
|
|
2395
|
+
if (r.type === "root") return new Pf(r);
|
|
2396
|
+
if (r.type === "decl") return new Of(r);
|
|
2397
|
+
if (r.type === "rule") return new Rf(r);
|
|
2398
|
+
if (r.type === "comment") return new Af(r);
|
|
2399
|
+
if (r.type === "atrule") return new Tf(r);
|
|
2400
|
+
throw new Error("Unknown node type: " + t.type);
|
|
2401
|
+
}
|
|
2402
|
+
Bo.exports = dt, dt.default = dt;
|
|
2403
|
+
}), bs = w((Yx, Fo) => {
|
|
2404
|
+
Fo.exports = class {
|
|
2405
|
+
generate() {
|
|
2406
|
+
}
|
|
2407
|
+
};
|
|
2408
|
+
}), Es = w((zx, $o) => {
|
|
2409
|
+
"use strict";
|
|
2410
|
+
var mt = class {
|
|
2411
|
+
constructor(e, s = {}) {
|
|
2412
|
+
if (this.type = "warning", this.text = e, s.node && s.node.source) {
|
|
2413
|
+
let r = s.node.rangeBy(s);
|
|
2414
|
+
this.line = r.start.line, this.column = r.start.column, this.endLine = r.end.line, this.endColumn = r.end.column;
|
|
2415
|
+
}
|
|
2416
|
+
for (let r in s) this[r] = s[r];
|
|
2417
|
+
}
|
|
2418
|
+
toString() {
|
|
2419
|
+
return this.node ? this.node.error(this.text, { index: this.index, plugin: this.plugin, word: this.word }).message : this.plugin ? this.plugin + ": " + this.text : this.text;
|
|
2420
|
+
}
|
|
2421
|
+
};
|
|
2422
|
+
$o.exports = mt, mt.default = mt;
|
|
2423
|
+
}), nr = w((jx, Wo) => {
|
|
2424
|
+
"use strict";
|
|
2425
|
+
var If = Es(), yt = class {
|
|
2426
|
+
get content() {
|
|
2427
|
+
return this.css;
|
|
2428
|
+
}
|
|
2429
|
+
constructor(e, s, r) {
|
|
2430
|
+
this.processor = e, this.messages = [], this.root = s, this.opts = r, this.css = "", this.map = void 0;
|
|
2431
|
+
}
|
|
2432
|
+
toString() {
|
|
2433
|
+
return this.css;
|
|
2434
|
+
}
|
|
2435
|
+
warn(e, s = {}) {
|
|
2436
|
+
s.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (s.plugin = this.lastPlugin.postcssPlugin);
|
|
2437
|
+
let r = new If(e, s);
|
|
2438
|
+
return this.messages.push(r), r;
|
|
2439
|
+
}
|
|
2440
|
+
warnings() {
|
|
2441
|
+
return this.messages.filter((e) => e.type === "warning");
|
|
2442
|
+
}
|
|
2443
|
+
};
|
|
2444
|
+
Wo.exports = yt, yt.default = yt;
|
|
2445
|
+
}), Ss = w((Hx, Yo) => {
|
|
2446
|
+
"use strict";
|
|
2447
|
+
var Go = {};
|
|
2448
|
+
Yo.exports = function(e) {
|
|
2449
|
+
Go[e] || (Go[e] = !0, typeof console < "u" && console.warn && console.warn(e));
|
|
2450
|
+
};
|
|
2451
|
+
}), As = w((Qx, Ho) => {
|
|
2452
|
+
"use strict";
|
|
2453
|
+
var qf = fe(), Lf = sr(), Df = bs(), Mf = ht(), Vo = nr(), Bf = $e(), Uf = it(), { isClean: Q, my: Ff } = Ht(), Kx = Ss(), $f = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, Wf = { AtRule: !0, AtRuleExit: !0, Comment: !0, CommentExit: !0, Declaration: !0, DeclarationExit: !0, Document: !0, DocumentExit: !0, Once: !0, OnceExit: !0, postcssPlugin: !0, prepare: !0, Root: !0, RootExit: !0, Rule: !0, RuleExit: !0 }, Gf = { Once: !0, postcssPlugin: !0, prepare: !0 }, Ge = 0;
|
|
2454
|
+
function gt(t) {
|
|
2455
|
+
return typeof t == "object" && typeof t.then == "function";
|
|
2456
|
+
}
|
|
2457
|
+
function jo(t) {
|
|
2458
|
+
let e = !1, s = $f[t.type];
|
|
2459
|
+
return t.type === "decl" ? e = t.prop.toLowerCase() : t.type === "atrule" && (e = t.name.toLowerCase()), e && t.append ? [s, s + "-" + e, Ge, s + "Exit", s + "Exit-" + e] : e ? [s, s + "-" + e, s + "Exit", s + "Exit-" + e] : t.append ? [s, Ge, s + "Exit"] : [s, s + "Exit"];
|
|
2460
|
+
}
|
|
2461
|
+
function zo(t) {
|
|
2462
|
+
let e;
|
|
2463
|
+
return t.type === "document" ? e = ["Document", Ge, "DocumentExit"] : t.type === "root" ? e = ["Root", Ge, "RootExit"] : e = jo(t), { eventIndex: 0, events: e, iterator: 0, node: t, visitorIndex: 0, visitors: [] };
|
|
2464
|
+
}
|
|
2465
|
+
function ks(t) {
|
|
2466
|
+
return t[Q] = !1, t.nodes && t.nodes.forEach((e) => ks(e)), t;
|
|
2467
|
+
}
|
|
2468
|
+
var Ts = {}, he = class t {
|
|
2469
|
+
get content() {
|
|
2470
|
+
return this.stringify().content;
|
|
2471
|
+
}
|
|
2472
|
+
get css() {
|
|
2473
|
+
return this.stringify().css;
|
|
2474
|
+
}
|
|
2475
|
+
get map() {
|
|
2476
|
+
return this.stringify().map;
|
|
2477
|
+
}
|
|
2478
|
+
get messages() {
|
|
2479
|
+
return this.sync().messages;
|
|
2480
|
+
}
|
|
2481
|
+
get opts() {
|
|
2482
|
+
return this.result.opts;
|
|
2483
|
+
}
|
|
2484
|
+
get processor() {
|
|
2485
|
+
return this.result.processor;
|
|
2486
|
+
}
|
|
2487
|
+
get root() {
|
|
2488
|
+
return this.sync().root;
|
|
2489
|
+
}
|
|
2490
|
+
get [Symbol.toStringTag]() {
|
|
2491
|
+
return "LazyResult";
|
|
2492
|
+
}
|
|
2493
|
+
constructor(e, s, r) {
|
|
2494
|
+
this.stringified = !1, this.processed = !1;
|
|
2495
|
+
let n;
|
|
2496
|
+
if (typeof s == "object" && s !== null && (s.type === "root" || s.type === "document")) n = ks(s);
|
|
2497
|
+
else if (s instanceof t || s instanceof Vo) n = ks(s.root), s.map && (typeof r.map > "u" && (r.map = {}), r.map.inline || (r.map.inline = !1), r.map.prev = s.map);
|
|
2498
|
+
else {
|
|
2499
|
+
let i = Mf;
|
|
2500
|
+
r.syntax && (i = r.syntax.parse), r.parser && (i = r.parser), i.parse && (i = i.parse);
|
|
2501
|
+
try {
|
|
2502
|
+
n = i(s, r);
|
|
2503
|
+
} catch (o) {
|
|
2504
|
+
this.processed = !0, this.error = o;
|
|
2505
|
+
}
|
|
2506
|
+
n && !n[Ff] && qf.rebuild(n);
|
|
2507
|
+
}
|
|
2508
|
+
this.result = new Vo(e, n, r), this.helpers = { ...Ts, postcss: Ts, result: this.result }, this.plugins = this.processor.plugins.map((i) => typeof i == "object" && i.prepare ? { ...i, ...i.prepare(this.result) } : i);
|
|
2509
|
+
}
|
|
2510
|
+
async() {
|
|
2511
|
+
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
2512
|
+
}
|
|
2513
|
+
catch(e) {
|
|
2514
|
+
return this.async().catch(e);
|
|
2515
|
+
}
|
|
2516
|
+
finally(e) {
|
|
2517
|
+
return this.async().then(e, e);
|
|
2518
|
+
}
|
|
2519
|
+
getAsyncError() {
|
|
2520
|
+
throw new Error("Use process(css).then(cb) to work with async plugins");
|
|
2521
|
+
}
|
|
2522
|
+
handleError(e, s) {
|
|
2523
|
+
let r = this.result.lastPlugin;
|
|
2524
|
+
try {
|
|
2525
|
+
s && s.addToError(e), this.error = e, e.name === "CssSyntaxError" && !e.plugin ? (e.plugin = r.postcssPlugin, e.setMessage()) : r.postcssVersion;
|
|
2526
|
+
} catch (n) {
|
|
2527
|
+
console && console.error && console.error(n);
|
|
2528
|
+
}
|
|
2529
|
+
return e;
|
|
2530
|
+
}
|
|
2531
|
+
prepareVisitors() {
|
|
2532
|
+
this.listeners = {};
|
|
2533
|
+
let e = (s, r, n) => {
|
|
2534
|
+
this.listeners[r] || (this.listeners[r] = []), this.listeners[r].push([s, n]);
|
|
2535
|
+
};
|
|
2536
|
+
for (let s of this.plugins) if (typeof s == "object") for (let r in s) {
|
|
2537
|
+
if (!Wf[r] && /^[A-Z]/.test(r)) throw new Error(`Unknown event ${r} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
2538
|
+
if (!Gf[r]) if (typeof s[r] == "object") for (let n in s[r]) n === "*" ? e(s, r, s[r][n]) : e(s, r + "-" + n.toLowerCase(), s[r][n]);
|
|
2539
|
+
else typeof s[r] == "function" && e(s, r, s[r]);
|
|
2540
|
+
}
|
|
2541
|
+
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
2542
|
+
}
|
|
2543
|
+
async runAsync() {
|
|
2544
|
+
this.plugin = 0;
|
|
2545
|
+
for (let e = 0; e < this.plugins.length; e++) {
|
|
2546
|
+
let s = this.plugins[e], r = this.runOnRoot(s);
|
|
2547
|
+
if (gt(r)) try {
|
|
2548
|
+
await r;
|
|
2549
|
+
} catch (n) {
|
|
2550
|
+
throw this.handleError(n);
|
|
2551
|
+
}
|
|
2552
|
+
}
|
|
2553
|
+
if (this.prepareVisitors(), this.hasListener) {
|
|
2554
|
+
let e = this.result.root;
|
|
2555
|
+
for (; !e[Q]; ) {
|
|
2556
|
+
e[Q] = !0;
|
|
2557
|
+
let s = [zo(e)];
|
|
2558
|
+
for (; s.length > 0; ) {
|
|
2559
|
+
let r = this.visitTick(s);
|
|
2560
|
+
if (gt(r)) try {
|
|
2561
|
+
await r;
|
|
2562
|
+
} catch (n) {
|
|
2563
|
+
let i = s[s.length - 1].node;
|
|
2564
|
+
throw this.handleError(n, i);
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
if (this.listeners.OnceExit) for (let [s, r] of this.listeners.OnceExit) {
|
|
2569
|
+
this.result.lastPlugin = s;
|
|
2570
|
+
try {
|
|
2571
|
+
if (e.type === "document") {
|
|
2572
|
+
let n = e.nodes.map((i) => r(i, this.helpers));
|
|
2573
|
+
await Promise.all(n);
|
|
2574
|
+
} else await r(e, this.helpers);
|
|
2575
|
+
} catch (n) {
|
|
2576
|
+
throw this.handleError(n);
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2580
|
+
return this.processed = !0, this.stringify();
|
|
2581
|
+
}
|
|
2582
|
+
runOnRoot(e) {
|
|
2583
|
+
this.result.lastPlugin = e;
|
|
2584
|
+
try {
|
|
2585
|
+
if (typeof e == "object" && e.Once) {
|
|
2586
|
+
if (this.result.root.type === "document") {
|
|
2587
|
+
let s = this.result.root.nodes.map((r) => e.Once(r, this.helpers));
|
|
2588
|
+
return gt(s[0]) ? Promise.all(s) : s;
|
|
2589
|
+
}
|
|
2590
|
+
return e.Once(this.result.root, this.helpers);
|
|
2591
|
+
} else if (typeof e == "function") return e(this.result.root, this.result);
|
|
2592
|
+
} catch (s) {
|
|
2593
|
+
throw this.handleError(s);
|
|
2594
|
+
}
|
|
2595
|
+
}
|
|
2596
|
+
stringify() {
|
|
2597
|
+
if (this.error) throw this.error;
|
|
2598
|
+
if (this.stringified) return this.result;
|
|
2599
|
+
this.stringified = !0, this.sync();
|
|
2600
|
+
let e = this.result.opts, s = Uf;
|
|
2601
|
+
e.syntax && (s = e.syntax.stringify), e.stringifier && (s = e.stringifier), s.stringify && (s = s.stringify);
|
|
2602
|
+
let n = new Df(s, this.result.root, this.result.opts).generate();
|
|
2603
|
+
return this.result.css = n[0], this.result.map = n[1], this.result;
|
|
2604
|
+
}
|
|
2605
|
+
sync() {
|
|
2606
|
+
if (this.error) throw this.error;
|
|
2607
|
+
if (this.processed) return this.result;
|
|
2608
|
+
if (this.processed = !0, this.processing) throw this.getAsyncError();
|
|
2609
|
+
for (let e of this.plugins) {
|
|
2610
|
+
let s = this.runOnRoot(e);
|
|
2611
|
+
if (gt(s)) throw this.getAsyncError();
|
|
2612
|
+
}
|
|
2613
|
+
if (this.prepareVisitors(), this.hasListener) {
|
|
2614
|
+
let e = this.result.root;
|
|
2615
|
+
for (; !e[Q]; ) e[Q] = !0, this.walkSync(e);
|
|
2616
|
+
if (this.listeners.OnceExit) if (e.type === "document") for (let s of e.nodes) this.visitSync(this.listeners.OnceExit, s);
|
|
2617
|
+
else this.visitSync(this.listeners.OnceExit, e);
|
|
2618
|
+
}
|
|
2619
|
+
return this.result;
|
|
2620
|
+
}
|
|
2621
|
+
then(e, s) {
|
|
2622
|
+
return this.async().then(e, s);
|
|
2623
|
+
}
|
|
2624
|
+
toString() {
|
|
2625
|
+
return this.css;
|
|
2626
|
+
}
|
|
2627
|
+
visitSync(e, s) {
|
|
2628
|
+
for (let [r, n] of e) {
|
|
2629
|
+
this.result.lastPlugin = r;
|
|
2630
|
+
let i;
|
|
2631
|
+
try {
|
|
2632
|
+
i = n(s, this.helpers);
|
|
2633
|
+
} catch (o) {
|
|
2634
|
+
throw this.handleError(o, s.proxyOf);
|
|
2635
|
+
}
|
|
2636
|
+
if (s.type !== "root" && s.type !== "document" && !s.parent) return !0;
|
|
2637
|
+
if (gt(i)) throw this.getAsyncError();
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
visitTick(e) {
|
|
2641
|
+
let s = e[e.length - 1], { node: r, visitors: n } = s;
|
|
2642
|
+
if (r.type !== "root" && r.type !== "document" && !r.parent) {
|
|
2643
|
+
e.pop();
|
|
2644
|
+
return;
|
|
2645
|
+
}
|
|
2646
|
+
if (n.length > 0 && s.visitorIndex < n.length) {
|
|
2647
|
+
let [o, u] = n[s.visitorIndex];
|
|
2648
|
+
s.visitorIndex += 1, s.visitorIndex === n.length && (s.visitors = [], s.visitorIndex = 0), this.result.lastPlugin = o;
|
|
2649
|
+
try {
|
|
2650
|
+
return u(r.toProxy(), this.helpers);
|
|
2651
|
+
} catch (a) {
|
|
2652
|
+
throw this.handleError(a, r);
|
|
2653
|
+
}
|
|
2654
|
+
}
|
|
2655
|
+
if (s.iterator !== 0) {
|
|
2656
|
+
let o = s.iterator, u;
|
|
2657
|
+
for (; u = r.nodes[r.indexes[o]]; ) if (r.indexes[o] += 1, !u[Q]) {
|
|
2658
|
+
u[Q] = !0, e.push(zo(u));
|
|
2659
|
+
return;
|
|
2660
|
+
}
|
|
2661
|
+
s.iterator = 0, delete r.indexes[o];
|
|
2662
|
+
}
|
|
2663
|
+
let i = s.events;
|
|
2664
|
+
for (; s.eventIndex < i.length; ) {
|
|
2665
|
+
let o = i[s.eventIndex];
|
|
2666
|
+
if (s.eventIndex += 1, o === Ge) {
|
|
2667
|
+
r.nodes && r.nodes.length && (r[Q] = !0, s.iterator = r.getIterator());
|
|
2668
|
+
return;
|
|
2669
|
+
} else if (this.listeners[o]) {
|
|
2670
|
+
s.visitors = this.listeners[o];
|
|
2671
|
+
return;
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
e.pop();
|
|
2675
|
+
}
|
|
2676
|
+
walkSync(e) {
|
|
2677
|
+
e[Q] = !0;
|
|
2678
|
+
let s = jo(e);
|
|
2679
|
+
for (let r of s) if (r === Ge) e.nodes && e.each((n) => {
|
|
2680
|
+
n[Q] || this.walkSync(n);
|
|
2681
|
+
});
|
|
2682
|
+
else {
|
|
2683
|
+
let n = this.listeners[r];
|
|
2684
|
+
if (n && this.visitSync(n, e.toProxy())) return;
|
|
2685
|
+
}
|
|
2686
|
+
}
|
|
2687
|
+
warnings() {
|
|
2688
|
+
return this.sync().warnings();
|
|
2689
|
+
}
|
|
2690
|
+
};
|
|
2691
|
+
he.registerPostcss = (t) => {
|
|
2692
|
+
Ts = t;
|
|
2693
|
+
}, Ho.exports = he, he.default = he, Bf.registerLazyResult(he), Lf.registerLazyResult(he);
|
|
2694
|
+
}), Qo = w((Jx, Ko) => {
|
|
2695
|
+
"use strict";
|
|
2696
|
+
var Yf = bs(), Vf = ht(), zf = nr(), jf = it(), Xx = Ss(), wt = class {
|
|
2697
|
+
get content() {
|
|
2698
|
+
return this.result.css;
|
|
2699
|
+
}
|
|
2700
|
+
get css() {
|
|
2701
|
+
return this.result.css;
|
|
2702
|
+
}
|
|
2703
|
+
get map() {
|
|
2704
|
+
return this.result.map;
|
|
2705
|
+
}
|
|
2706
|
+
get messages() {
|
|
2707
|
+
return [];
|
|
2708
|
+
}
|
|
2709
|
+
get opts() {
|
|
2710
|
+
return this.result.opts;
|
|
2711
|
+
}
|
|
2712
|
+
get processor() {
|
|
2713
|
+
return this.result.processor;
|
|
2714
|
+
}
|
|
2715
|
+
get root() {
|
|
2716
|
+
if (this._root) return this._root;
|
|
2717
|
+
let e, s = Vf;
|
|
2718
|
+
try {
|
|
2719
|
+
e = s(this._css, this._opts);
|
|
2720
|
+
} catch (r) {
|
|
2721
|
+
this.error = r;
|
|
2722
|
+
}
|
|
2723
|
+
if (this.error) throw this.error;
|
|
2724
|
+
return this._root = e, e;
|
|
2725
|
+
}
|
|
2726
|
+
get [Symbol.toStringTag]() {
|
|
2727
|
+
return "NoWorkResult";
|
|
2728
|
+
}
|
|
2729
|
+
constructor(e, s, r) {
|
|
2730
|
+
s = s.toString(), this.stringified = !1, this._processor = e, this._css = s, this._opts = r, this._map = void 0;
|
|
2731
|
+
let n, i = jf;
|
|
2732
|
+
this.result = new zf(this._processor, n, this._opts), this.result.css = s;
|
|
2733
|
+
let o = this;
|
|
2734
|
+
Object.defineProperty(this.result, "root", { get() {
|
|
2735
|
+
return o.root;
|
|
2736
|
+
} });
|
|
2737
|
+
let u = new Yf(i, n, this._opts, s);
|
|
2738
|
+
if (u.isMap()) {
|
|
2739
|
+
let [a, l] = u.generate();
|
|
2740
|
+
a && (this.result.css = a), l && (this.result.map = l);
|
|
2741
|
+
} else u.clearAnnotation(), this.result.css = u.css;
|
|
2742
|
+
}
|
|
2743
|
+
async() {
|
|
2744
|
+
return this.error ? Promise.reject(this.error) : Promise.resolve(this.result);
|
|
2745
|
+
}
|
|
2746
|
+
catch(e) {
|
|
2747
|
+
return this.async().catch(e);
|
|
2748
|
+
}
|
|
2749
|
+
finally(e) {
|
|
2750
|
+
return this.async().then(e, e);
|
|
2751
|
+
}
|
|
2752
|
+
sync() {
|
|
2753
|
+
if (this.error) throw this.error;
|
|
2754
|
+
return this.result;
|
|
2755
|
+
}
|
|
2756
|
+
then(e, s) {
|
|
2757
|
+
return this.async().then(e, s);
|
|
2758
|
+
}
|
|
2759
|
+
toString() {
|
|
2760
|
+
return this._css;
|
|
2761
|
+
}
|
|
2762
|
+
warnings() {
|
|
2763
|
+
return [];
|
|
2764
|
+
}
|
|
2765
|
+
};
|
|
2766
|
+
Ko.exports = wt, wt.default = wt;
|
|
2767
|
+
}), Jo = w((Zx, Xo) => {
|
|
2768
|
+
"use strict";
|
|
2769
|
+
var Hf = sr(), Kf = As(), Qf = Qo(), Xf = $e(), Ee = class {
|
|
2770
|
+
constructor(e = []) {
|
|
2771
|
+
this.version = "8.5.6", this.plugins = this.normalize(e);
|
|
2772
|
+
}
|
|
2773
|
+
normalize(e) {
|
|
2774
|
+
let s = [];
|
|
2775
|
+
for (let r of e) if (r.postcss === !0 ? r = r() : r.postcss && (r = r.postcss), typeof r == "object" && Array.isArray(r.plugins)) s = s.concat(r.plugins);
|
|
2776
|
+
else if (typeof r == "object" && r.postcssPlugin) s.push(r);
|
|
2777
|
+
else if (typeof r == "function") s.push(r);
|
|
2778
|
+
else if (!(typeof r == "object" && (r.parse || r.stringify))) throw new Error(r + " is not a PostCSS plugin");
|
|
2779
|
+
return s;
|
|
2780
|
+
}
|
|
2781
|
+
process(e, s = {}) {
|
|
2782
|
+
return !this.plugins.length && !s.parser && !s.stringifier && !s.syntax ? new Qf(this, e, s) : new Kf(this, e, s);
|
|
2783
|
+
}
|
|
2784
|
+
use(e) {
|
|
2785
|
+
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
2786
|
+
}
|
|
2787
|
+
};
|
|
2788
|
+
Xo.exports = Ee, Ee.default = Ee, Xf.registerProcessor(Ee), Hf.registerProcessor(Ee);
|
|
2789
|
+
}), ir = w((e_, ia) => {
|
|
2790
|
+
"use strict";
|
|
2791
|
+
var Zo = Qt(), ea = Me(), Jf = fe(), Zf = zt(), ta = ft(), ra = sr(), ep = Uo(), tp = Ue(), rp = As(), sp = ws(), np = ut(), ip = ht(), Os = Jo(), op = nr(), sa = $e(), na = Xt(), ap = it(), up = Es();
|
|
2792
|
+
function S(...t) {
|
|
2793
|
+
return t.length === 1 && Array.isArray(t[0]) && (t = t[0]), new Os(t);
|
|
2794
|
+
}
|
|
2795
|
+
S.plugin = function(e, s) {
|
|
2796
|
+
let r = !1;
|
|
2797
|
+
function n(...o) {
|
|
2798
|
+
console && console.warn && !r && (r = !0, console.warn(e + `: postcss.plugin was deprecated. Migration guide:
|
|
2799
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`));
|
|
2800
|
+
let u = s(...o);
|
|
2801
|
+
return u.postcssPlugin = e, u.postcssVersion = new Os().version, u;
|
|
2802
|
+
}
|
|
2803
|
+
let i;
|
|
2804
|
+
return Object.defineProperty(n, "postcss", { get() {
|
|
2805
|
+
return i || (i = n()), i;
|
|
2806
|
+
} }), n.process = function(o, u, a) {
|
|
2807
|
+
return S([n(a)]).process(o, u);
|
|
2808
|
+
}, n;
|
|
2809
|
+
}, S.stringify = ap, S.parse = ip, S.fromJSON = ep, S.list = sp, S.comment = (t) => new ea(t), S.atRule = (t) => new Zo(t), S.decl = (t) => new ta(t), S.rule = (t) => new na(t), S.root = (t) => new sa(t), S.document = (t) => new ra(t), S.CssSyntaxError = Zf, S.Declaration = ta, S.Container = Jf, S.Processor = Os, S.Document = ra, S.Comment = ea, S.Warning = up, S.AtRule = Zo, S.Result = op, S.Input = tp, S.Rule = na, S.Root = sa, S.Node = np, rp.registerPostcss(S), ia.exports = S, S.default = S;
|
|
2810
|
+
}), aa = w((t_, oa) => {
|
|
2811
|
+
var { Container: lp } = ir(), Cs = class extends lp {
|
|
2812
|
+
constructor(e) {
|
|
2813
|
+
super(e), this.type = "decl", this.isNested = !0, this.nodes || (this.nodes = []);
|
|
2814
|
+
}
|
|
2815
|
+
};
|
|
2816
|
+
oa.exports = Cs;
|
|
2817
|
+
}), ca = w((r_, la) => {
|
|
2818
|
+
"use strict";
|
|
2819
|
+
var or = /[\t\n\f\r "#'()/;[\\\]{}]/g, ar = /[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, cp = /.[\r\n"'(/\\]/, ua = /[\da-f]/i, ur = /[\n\f\r]/g;
|
|
2820
|
+
la.exports = function(e, s = {}) {
|
|
2821
|
+
let r = e.css.valueOf(), n = s.ignoreErrors, i, o, u, a, l, f, h, c, g, b = r.length, d = 0, p = [], m = [], y;
|
|
2822
|
+
function v() {
|
|
2823
|
+
return d;
|
|
2824
|
+
}
|
|
2825
|
+
function O(A) {
|
|
2826
|
+
throw e.error("Unclosed " + A, d);
|
|
2827
|
+
}
|
|
2828
|
+
function q() {
|
|
2829
|
+
return m.length === 0 && d >= b;
|
|
2830
|
+
}
|
|
2831
|
+
function H() {
|
|
2832
|
+
let A = 1, k = !1, N = !1;
|
|
2833
|
+
for (; A > 0; ) o += 1, r.length <= o && O("interpolation"), i = r.charCodeAt(o), c = r.charCodeAt(o + 1), k ? !N && i === k ? (k = !1, N = !1) : i === 92 ? N = !N : N && (N = !1) : i === 39 || i === 34 ? k = i : i === 125 ? A -= 1 : i === 35 && c === 123 && (A += 1);
|
|
2834
|
+
}
|
|
2835
|
+
function ne(A) {
|
|
2836
|
+
if (m.length) return m.pop();
|
|
2837
|
+
if (d >= b) return;
|
|
2838
|
+
let k = A ? A.ignoreUnclosed : !1;
|
|
2839
|
+
switch (i = r.charCodeAt(d), i) {
|
|
2840
|
+
case 10:
|
|
2841
|
+
case 32:
|
|
2842
|
+
case 9:
|
|
2843
|
+
case 13:
|
|
2844
|
+
case 12: {
|
|
2845
|
+
o = d;
|
|
2846
|
+
do
|
|
2847
|
+
o += 1, i = r.charCodeAt(o);
|
|
2848
|
+
while (i === 32 || i === 10 || i === 9 || i === 13 || i === 12);
|
|
2849
|
+
g = ["space", r.slice(d, o)], d = o - 1;
|
|
2850
|
+
break;
|
|
2851
|
+
}
|
|
2852
|
+
case 91:
|
|
2853
|
+
case 93:
|
|
2854
|
+
case 123:
|
|
2855
|
+
case 125:
|
|
2856
|
+
case 58:
|
|
2857
|
+
case 59:
|
|
2858
|
+
case 41: {
|
|
2859
|
+
let N = String.fromCharCode(i);
|
|
2860
|
+
g = [N, N, d];
|
|
2861
|
+
break;
|
|
2862
|
+
}
|
|
2863
|
+
case 44: {
|
|
2864
|
+
g = ["word", ",", d, d + 1];
|
|
2865
|
+
break;
|
|
2866
|
+
}
|
|
2867
|
+
case 40: {
|
|
2868
|
+
if (h = p.length ? p.pop()[1] : "", c = r.charCodeAt(d + 1), h === "url" && c !== 39 && c !== 34) {
|
|
2869
|
+
for (y = 1, f = !1, o = d + 1; o <= r.length - 1; ) {
|
|
2870
|
+
if (c = r.charCodeAt(o), c === 92) f = !f;
|
|
2871
|
+
else if (c === 40) y += 1;
|
|
2872
|
+
else if (c === 41 && (y -= 1, y === 0)) break;
|
|
2873
|
+
o += 1;
|
|
2874
|
+
}
|
|
2875
|
+
a = r.slice(d, o + 1), g = ["brackets", a, d, o], d = o;
|
|
2876
|
+
} else o = r.indexOf(")", d + 1), a = r.slice(d, o + 1), o === -1 || cp.test(a) ? g = ["(", "(", d] : (g = ["brackets", a, d, o], d = o);
|
|
2877
|
+
break;
|
|
2878
|
+
}
|
|
2879
|
+
case 39:
|
|
2880
|
+
case 34: {
|
|
2881
|
+
for (u = i, o = d, f = !1; o < b && (o++, o === b && O("string"), i = r.charCodeAt(o), c = r.charCodeAt(o + 1), !(!f && i === u)); ) i === 92 ? f = !f : f ? f = !1 : i === 35 && c === 123 && H();
|
|
2882
|
+
g = ["string", r.slice(d, o + 1), d, o], d = o;
|
|
2883
|
+
break;
|
|
2884
|
+
}
|
|
2885
|
+
case 64: {
|
|
2886
|
+
or.lastIndex = d + 1, or.test(r), or.lastIndex === 0 ? o = r.length - 1 : o = or.lastIndex - 2, g = ["at-word", r.slice(d, o + 1), d, o], d = o;
|
|
2887
|
+
break;
|
|
2888
|
+
}
|
|
2889
|
+
case 92: {
|
|
2890
|
+
for (o = d, l = !0; r.charCodeAt(o + 1) === 92; ) o += 1, l = !l;
|
|
2891
|
+
if (i = r.charCodeAt(o + 1), l && i !== 47 && i !== 32 && i !== 10 && i !== 9 && i !== 13 && i !== 12 && (o += 1, ua.test(r.charAt(o)))) {
|
|
2892
|
+
for (; ua.test(r.charAt(o + 1)); ) o += 1;
|
|
2893
|
+
r.charCodeAt(o + 1) === 32 && (o += 1);
|
|
2894
|
+
}
|
|
2895
|
+
g = ["word", r.slice(d, o + 1), d, o], d = o;
|
|
2896
|
+
break;
|
|
2897
|
+
}
|
|
2898
|
+
default:
|
|
2899
|
+
c = r.charCodeAt(d + 1), i === 35 && c === 123 ? (o = d, H(), a = r.slice(d, o + 1), g = ["word", a, d, o], d = o) : i === 47 && c === 42 ? (o = r.indexOf("*/", d + 2) + 1, o === 0 && (n || k ? o = r.length : O("comment")), g = ["comment", r.slice(d, o + 1), d, o], d = o) : i === 47 && c === 47 ? (ur.lastIndex = d + 1, ur.test(r), ur.lastIndex === 0 ? o = r.length - 1 : o = ur.lastIndex - 2, a = r.slice(d, o + 1), g = ["comment", a, d, o, "inline"], d = o) : (ar.lastIndex = d + 1, ar.test(r), ar.lastIndex === 0 ? o = r.length - 1 : o = ar.lastIndex - 2, g = ["word", r.slice(d, o + 1), d, o], p.push(g), d = o);
|
|
2900
|
+
break;
|
|
2901
|
+
}
|
|
2902
|
+
return d++, g;
|
|
2903
|
+
}
|
|
2904
|
+
function W(A) {
|
|
2905
|
+
m.push(A);
|
|
2906
|
+
}
|
|
2907
|
+
return { back: W, endOfFile: q, nextToken: ne, position: v };
|
|
2908
|
+
};
|
|
2909
|
+
}), pa = w((s_, fa) => {
|
|
2910
|
+
var { Comment: fp } = ir(), pp = tr(), hp = aa(), dp = ca(), Ns = class extends pp {
|
|
2911
|
+
atrule(e) {
|
|
2912
|
+
let s = e[1], r = e;
|
|
2913
|
+
for (; !this.tokenizer.endOfFile(); ) {
|
|
2914
|
+
let n = this.tokenizer.nextToken();
|
|
2915
|
+
if (n[0] === "word" && n[2] === r[3] + 1) s += n[1], r = n;
|
|
2916
|
+
else {
|
|
2917
|
+
this.tokenizer.back(n);
|
|
2918
|
+
break;
|
|
2919
|
+
}
|
|
2920
|
+
}
|
|
2921
|
+
super.atrule(["at-word", s, e[2], r[3]]);
|
|
2922
|
+
}
|
|
2923
|
+
comment(e) {
|
|
2924
|
+
if (e[4] === "inline") {
|
|
2925
|
+
let s = new fp();
|
|
2926
|
+
this.init(s, e[2]), s.raws.inline = !0;
|
|
2927
|
+
let r = this.input.fromOffset(e[3]);
|
|
2928
|
+
s.source.end = { column: r.col, line: r.line, offset: e[3] + 1 };
|
|
2929
|
+
let n = e[1].slice(2);
|
|
2930
|
+
if (/^\s*$/.test(n)) s.text = "", s.raws.left = n, s.raws.right = "";
|
|
2931
|
+
else {
|
|
2932
|
+
let i = n.match(/^(\s*)([^]*\S)(\s*)$/), o = i[2].replace(/(\*\/|\/\*)/g, "*//*");
|
|
2933
|
+
s.text = o, s.raws.left = i[1], s.raws.right = i[3], s.raws.text = i[2];
|
|
2934
|
+
}
|
|
2935
|
+
} else super.comment(e);
|
|
2936
|
+
}
|
|
2937
|
+
createTokenizer() {
|
|
2938
|
+
this.tokenizer = dp(this.input);
|
|
2939
|
+
}
|
|
2940
|
+
raw(e, s, r, n) {
|
|
2941
|
+
if (super.raw(e, s, r, n), e.raws[s]) {
|
|
2942
|
+
let i = e.raws[s].raw;
|
|
2943
|
+
e.raws[s].raw = r.reduce((o, u) => {
|
|
2944
|
+
if (u[0] === "comment" && u[4] === "inline") {
|
|
2945
|
+
let a = u[1].slice(2).replace(/(\*\/|\/\*)/g, "*//*");
|
|
2946
|
+
return o + "/*" + a + "*/";
|
|
2947
|
+
} else return o + u[1];
|
|
2948
|
+
}, ""), i !== e.raws[s].raw && (e.raws[s].scss = i);
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2951
|
+
rule(e) {
|
|
2952
|
+
let s = !1, r = 0, n = "";
|
|
2953
|
+
for (let i of e) if (s) i[0] !== "comment" && i[0] !== "{" && (n += i[1]);
|
|
2954
|
+
else {
|
|
2955
|
+
if (i[0] === "space" && i[1].includes(`
|
|
2956
|
+
`)) break;
|
|
2957
|
+
i[0] === "(" ? r += 1 : i[0] === ")" ? r -= 1 : r === 0 && i[0] === ":" && (s = !0);
|
|
2958
|
+
}
|
|
2959
|
+
if (!s || n.trim() === "" || /^[#:A-Za-z-]/.test(n)) super.rule(e);
|
|
2960
|
+
else {
|
|
2961
|
+
e.pop();
|
|
2962
|
+
let i = new hp();
|
|
2963
|
+
this.init(i, e[0][2]);
|
|
2964
|
+
let o;
|
|
2965
|
+
for (let a = e.length - 1; a >= 0; a--) if (e[a][0] !== "space") {
|
|
2966
|
+
o = e[a];
|
|
2967
|
+
break;
|
|
2968
|
+
}
|
|
2969
|
+
if (o[3]) {
|
|
2970
|
+
let a = this.input.fromOffset(o[3]);
|
|
2971
|
+
i.source.end = { column: a.col, line: a.line, offset: o[3] + 1 };
|
|
2972
|
+
} else {
|
|
2973
|
+
let a = this.input.fromOffset(o[2]);
|
|
2974
|
+
i.source.end = { column: a.col, line: a.line, offset: o[2] + 1 };
|
|
2975
|
+
}
|
|
2976
|
+
for (; e[0][0] !== "word"; ) i.raws.before += e.shift()[1];
|
|
2977
|
+
if (e[0][2]) {
|
|
2978
|
+
let a = this.input.fromOffset(e[0][2]);
|
|
2979
|
+
i.source.start = { column: a.col, line: a.line, offset: e[0][2] };
|
|
2980
|
+
}
|
|
2981
|
+
for (i.prop = ""; e.length; ) {
|
|
2982
|
+
let a = e[0][0];
|
|
2983
|
+
if (a === ":" || a === "space" || a === "comment") break;
|
|
2984
|
+
i.prop += e.shift()[1];
|
|
2985
|
+
}
|
|
2986
|
+
i.raws.between = "";
|
|
2987
|
+
let u;
|
|
2988
|
+
for (; e.length; ) if (u = e.shift(), u[0] === ":") {
|
|
2989
|
+
i.raws.between += u[1];
|
|
2990
|
+
break;
|
|
2991
|
+
} else i.raws.between += u[1];
|
|
2992
|
+
(i.prop[0] === "_" || i.prop[0] === "*") && (i.raws.before += i.prop[0], i.prop = i.prop.slice(1)), i.raws.between += this.spacesAndCommentsFromStart(e), this.precheckMissedSemicolon(e);
|
|
2993
|
+
for (let a = e.length - 1; a > 0; a--) {
|
|
2994
|
+
if (u = e[a], u[1] === "!important") {
|
|
2995
|
+
i.important = !0;
|
|
2996
|
+
let l = this.stringFrom(e, a);
|
|
2997
|
+
l = this.spacesFromEnd(e) + l, l !== " !important" && (i.raws.important = l);
|
|
2998
|
+
break;
|
|
2999
|
+
} else if (u[1] === "important") {
|
|
3000
|
+
let l = e.slice(0), f = "";
|
|
3001
|
+
for (let h = a; h > 0; h--) {
|
|
3002
|
+
let c = l[h][0];
|
|
3003
|
+
if (f.trim().indexOf("!") === 0 && c !== "space") break;
|
|
3004
|
+
f = l.pop()[1] + f;
|
|
3005
|
+
}
|
|
3006
|
+
f.trim().indexOf("!") === 0 && (i.important = !0, i.raws.important = f, e = l);
|
|
3007
|
+
}
|
|
3008
|
+
if (u[0] !== "space" && u[0] !== "comment") break;
|
|
3009
|
+
}
|
|
3010
|
+
this.raw(i, "value", e), i.value.includes(":") && this.checkMissedSemicolon(e), this.current = i;
|
|
3011
|
+
}
|
|
3012
|
+
}
|
|
3013
|
+
};
|
|
3014
|
+
fa.exports = Ns;
|
|
3015
|
+
}), da = w((n_, ha) => {
|
|
3016
|
+
var { Input: mp } = ir(), yp = pa();
|
|
3017
|
+
ha.exports = function(e, s) {
|
|
3018
|
+
let r = new mp(e, s), n = new yp(r);
|
|
3019
|
+
return n.parse(), n.root;
|
|
3020
|
+
};
|
|
3021
|
+
}), Rs = w((Ps) => {
|
|
3022
|
+
"use strict";
|
|
3023
|
+
Object.defineProperty(Ps, "__esModule", { value: !0 });
|
|
3024
|
+
function vp(t) {
|
|
3025
|
+
this.after = t.after, this.before = t.before, this.type = t.type, this.value = t.value, this.sourceIndex = t.sourceIndex;
|
|
3026
|
+
}
|
|
3027
|
+
Ps.default = vp;
|
|
3028
|
+
}), qs = w((Is) => {
|
|
3029
|
+
"use strict";
|
|
3030
|
+
Object.defineProperty(Is, "__esModule", { value: !0 });
|
|
3031
|
+
var xp = Rs(), ya = _p(xp);
|
|
3032
|
+
function _p(t) {
|
|
3033
|
+
return t && t.__esModule ? t : { default: t };
|
|
3034
|
+
}
|
|
3035
|
+
function vt(t) {
|
|
3036
|
+
var e = this;
|
|
3037
|
+
this.constructor(t), this.nodes = t.nodes, this.after === void 0 && (this.after = this.nodes.length > 0 ? this.nodes[this.nodes.length - 1].after : ""), this.before === void 0 && (this.before = this.nodes.length > 0 ? this.nodes[0].before : ""), this.sourceIndex === void 0 && (this.sourceIndex = this.before.length), this.nodes.forEach(function(s) {
|
|
3038
|
+
s.parent = e;
|
|
3039
|
+
});
|
|
3040
|
+
}
|
|
3041
|
+
vt.prototype = Object.create(ya.default.prototype), vt.constructor = ya.default, vt.prototype.walk = function(e, s) {
|
|
3042
|
+
for (var r = typeof e == "string" || e instanceof RegExp, n = r ? s : e, i = typeof e == "string" ? new RegExp(e) : e, o = 0; o < this.nodes.length; o++) {
|
|
3043
|
+
var u = this.nodes[o], a = r ? i.test(u.type) : !0;
|
|
3044
|
+
if (a && n && n(u, o, this.nodes) === !1 || u.nodes && u.walk(e, s) === !1) return !1;
|
|
3045
|
+
}
|
|
3046
|
+
return !0;
|
|
3047
|
+
}, vt.prototype.each = function() {
|
|
3048
|
+
for (var e = arguments.length <= 0 || arguments[0] === void 0 ? function() {
|
|
3049
|
+
} : arguments[0], s = 0; s < this.nodes.length; s++) {
|
|
3050
|
+
var r = this.nodes[s];
|
|
3051
|
+
if (e(r, s, this.nodes) === !1) return !1;
|
|
3052
|
+
}
|
|
3053
|
+
return !0;
|
|
3054
|
+
}, Is.default = vt;
|
|
3055
|
+
}), xa = w((xt) => {
|
|
3056
|
+
"use strict";
|
|
3057
|
+
Object.defineProperty(xt, "__esModule", { value: !0 }), xt.parseMediaFeature = va, xt.parseMediaQuery = Ds, xt.parseMediaList = Sp;
|
|
3058
|
+
var bp = Rs(), ga = wa(bp), Ep = qs(), Ls = wa(Ep);
|
|
3059
|
+
function wa(t) {
|
|
3060
|
+
return t && t.__esModule ? t : { default: t };
|
|
3061
|
+
}
|
|
3062
|
+
function va(t) {
|
|
3063
|
+
var e = arguments.length <= 1 || arguments[1] === void 0 ? 0 : arguments[1], s = [{ mode: "normal", character: null }], r = [], n = 0, i = "", o = null, u = null, a = e, l = t;
|
|
3064
|
+
t[0] === "(" && t[t.length - 1] === ")" && (l = t.substring(1, t.length - 1), a++);
|
|
3065
|
+
for (var f = 0; f < l.length; f++) {
|
|
3066
|
+
var h = l[f];
|
|
3067
|
+
if ((h === "'" || h === '"') && (s[n].isCalculationEnabled === !0 ? (s.push({ mode: "string", isCalculationEnabled: !1, character: h }), n++) : s[n].mode === "string" && s[n].character === h && l[f - 1] !== "\\" && (s.pop(), n--)), h === "{" ? (s.push({ mode: "interpolation", isCalculationEnabled: !0 }), n++) : h === "}" && (s.pop(), n--), s[n].mode === "normal" && h === ":") {
|
|
3068
|
+
var c = l.substring(f + 1);
|
|
3069
|
+
u = { type: "value", before: /^(\s*)/.exec(c)[1], after: /(\s*)$/.exec(c)[1], value: c.trim() }, u.sourceIndex = u.before.length + f + 1 + a, o = { type: "colon", sourceIndex: f + a, after: u.before, value: ":" };
|
|
3070
|
+
break;
|
|
3071
|
+
}
|
|
3072
|
+
i += h;
|
|
3073
|
+
}
|
|
3074
|
+
return i = { type: "media-feature", before: /^(\s*)/.exec(i)[1], after: /(\s*)$/.exec(i)[1], value: i.trim() }, i.sourceIndex = i.before.length + a, r.push(i), o !== null && (o.before = i.after, r.push(o)), u !== null && r.push(u), r;
|
|
3075
|
+
}
|
|
3076
|
+
function Ds(t) {
|
|
3077
|
+
var e = arguments.length <= 1 || arguments[1] === void 0 ? 0 : arguments[1], s = [], r = 0, n = !1, i = void 0;
|
|
3078
|
+
function o() {
|
|
3079
|
+
return { before: "", after: "", value: "" };
|
|
3080
|
+
}
|
|
3081
|
+
i = o();
|
|
3082
|
+
for (var u = 0; u < t.length; u++) {
|
|
3083
|
+
var a = t[u];
|
|
3084
|
+
n ? (i.value += a, (a === "{" || a === "(") && r++, (a === ")" || a === "}") && r--) : a.search(/\s/) !== -1 ? i.before += a : (a === "(" && (i.type = "media-feature-expression", r++), i.value = a, i.sourceIndex = e + u, n = !0), n && r === 0 && (a === ")" || u === t.length - 1 || t[u + 1].search(/\s/) !== -1) && (["not", "only", "and"].indexOf(i.value) !== -1 && (i.type = "keyword"), i.type === "media-feature-expression" && (i.nodes = va(i.value, i.sourceIndex)), s.push(Array.isArray(i.nodes) ? new Ls.default(i) : new ga.default(i)), i = o(), n = !1);
|
|
3085
|
+
}
|
|
3086
|
+
for (var l = 0; l < s.length; l++) if (i = s[l], l > 0 && (s[l - 1].after = i.before), i.type === void 0) {
|
|
3087
|
+
if (l > 0) {
|
|
3088
|
+
if (s[l - 1].type === "media-feature-expression") {
|
|
3089
|
+
i.type = "keyword";
|
|
3090
|
+
continue;
|
|
3091
|
+
}
|
|
3092
|
+
if (s[l - 1].value === "not" || s[l - 1].value === "only") {
|
|
3093
|
+
i.type = "media-type";
|
|
3094
|
+
continue;
|
|
3095
|
+
}
|
|
3096
|
+
if (s[l - 1].value === "and") {
|
|
3097
|
+
i.type = "media-feature-expression";
|
|
3098
|
+
continue;
|
|
3099
|
+
}
|
|
3100
|
+
s[l - 1].type === "media-type" && (s[l + 1] ? i.type = s[l + 1].type === "media-feature-expression" ? "keyword" : "media-feature-expression" : i.type = "media-feature-expression");
|
|
3101
|
+
}
|
|
3102
|
+
if (l === 0) {
|
|
3103
|
+
if (!s[l + 1]) {
|
|
3104
|
+
i.type = "media-type";
|
|
3105
|
+
continue;
|
|
3106
|
+
}
|
|
3107
|
+
if (s[l + 1] && (s[l + 1].type === "media-feature-expression" || s[l + 1].type === "keyword")) {
|
|
3108
|
+
i.type = "media-type";
|
|
3109
|
+
continue;
|
|
3110
|
+
}
|
|
3111
|
+
if (s[l + 2]) {
|
|
3112
|
+
if (s[l + 2].type === "media-feature-expression") {
|
|
3113
|
+
i.type = "media-type", s[l + 1].type = "keyword";
|
|
3114
|
+
continue;
|
|
3115
|
+
}
|
|
3116
|
+
if (s[l + 2].type === "keyword") {
|
|
3117
|
+
i.type = "keyword", s[l + 1].type = "media-type";
|
|
3118
|
+
continue;
|
|
3119
|
+
}
|
|
3120
|
+
}
|
|
3121
|
+
if (s[l + 3] && s[l + 3].type === "media-feature-expression") {
|
|
3122
|
+
i.type = "keyword", s[l + 1].type = "media-type", s[l + 2].type = "keyword";
|
|
3123
|
+
continue;
|
|
3124
|
+
}
|
|
3125
|
+
}
|
|
3126
|
+
}
|
|
3127
|
+
return s;
|
|
3128
|
+
}
|
|
3129
|
+
function Sp(t) {
|
|
3130
|
+
var e = [], s = 0, r = 0, n = /^(\s*)url\s*\(/.exec(t);
|
|
3131
|
+
if (n !== null) {
|
|
3132
|
+
for (var i = n[0].length, o = 1; o > 0; ) {
|
|
3133
|
+
var u = t[i];
|
|
3134
|
+
u === "(" && o++, u === ")" && o--, i++;
|
|
3135
|
+
}
|
|
3136
|
+
e.unshift(new ga.default({ type: "url", value: t.substring(0, i).trim(), sourceIndex: n[1].length, before: n[1], after: /^(\s*)/.exec(t.substring(i))[1] })), s = i;
|
|
3137
|
+
}
|
|
3138
|
+
for (var a = s; a < t.length; a++) {
|
|
3139
|
+
var l = t[a];
|
|
3140
|
+
if (l === "(" && r++, l === ")" && r--, r === 0 && l === ",") {
|
|
3141
|
+
var f = t.substring(s, a), h = /^(\s*)/.exec(f)[1];
|
|
3142
|
+
e.push(new Ls.default({ type: "media-query", value: f.trim(), sourceIndex: s + h.length, nodes: Ds(f, s), before: h, after: /(\s*)$/.exec(f)[1] })), s = a + 1;
|
|
3143
|
+
}
|
|
3144
|
+
}
|
|
3145
|
+
var c = t.substring(s), g = /^(\s*)/.exec(c)[1];
|
|
3146
|
+
return e.push(new Ls.default({ type: "media-query", value: c.trim(), sourceIndex: s + g.length, nodes: Ds(c, s), before: g, after: /(\s*)$/.exec(c)[1] })), e;
|
|
3147
|
+
}
|
|
3148
|
+
}), _a = w((Ms) => {
|
|
3149
|
+
"use strict";
|
|
3150
|
+
Object.defineProperty(Ms, "__esModule", { value: !0 }), Ms.default = Cp;
|
|
3151
|
+
var kp = qs(), Tp = Op(kp), Ap = xa();
|
|
3152
|
+
function Op(t) {
|
|
3153
|
+
return t && t.__esModule ? t : { default: t };
|
|
3154
|
+
}
|
|
3155
|
+
function Cp(t) {
|
|
3156
|
+
return new Tp.default({ nodes: (0, Ap.parseMediaList)(t), type: "media-query-list", value: t.trim() });
|
|
3157
|
+
}
|
|
3158
|
+
}), Us = w((m_, Sa) => {
|
|
3159
|
+
Sa.exports = function(e, s) {
|
|
3160
|
+
if (s = typeof s == "number" ? s : 1 / 0, !s) return Array.isArray(e) ? e.map(function(n) {
|
|
3161
|
+
return n;
|
|
3162
|
+
}) : e;
|
|
3163
|
+
return r(e, 1);
|
|
3164
|
+
function r(n, i) {
|
|
3165
|
+
return n.reduce(function(o, u) {
|
|
3166
|
+
return Array.isArray(u) && i < s ? o.concat(r(u, i + 1)) : o.concat(u);
|
|
3167
|
+
}, []);
|
|
3168
|
+
}
|
|
3169
|
+
};
|
|
3170
|
+
}), Fs = w((y_, ka) => {
|
|
3171
|
+
ka.exports = function(t, e) {
|
|
3172
|
+
for (var s = -1, r = []; (s = t.indexOf(e, s + 1)) !== -1; ) r.push(s);
|
|
3173
|
+
return r;
|
|
3174
|
+
};
|
|
3175
|
+
}), $s = w((g_, Ta) => {
|
|
3176
|
+
"use strict";
|
|
3177
|
+
function Rp(t, e) {
|
|
3178
|
+
for (var s = 1, r = t.length, n = t[0], i = t[0], o = 1; o < r; ++o) if (i = n, n = t[o], e(n, i)) {
|
|
3179
|
+
if (o === s) {
|
|
3180
|
+
s++;
|
|
3181
|
+
continue;
|
|
3182
|
+
}
|
|
3183
|
+
t[s++] = n;
|
|
3184
|
+
}
|
|
3185
|
+
return t.length = s, t;
|
|
3186
|
+
}
|
|
3187
|
+
function Ip(t) {
|
|
3188
|
+
for (var e = 1, s = t.length, r = t[0], n = t[0], i = 1; i < s; ++i, n = r) if (n = r, r = t[i], r !== n) {
|
|
3189
|
+
if (i === e) {
|
|
3190
|
+
e++;
|
|
3191
|
+
continue;
|
|
3192
|
+
}
|
|
3193
|
+
t[e++] = r;
|
|
3194
|
+
}
|
|
3195
|
+
return t.length = e, t;
|
|
3196
|
+
}
|
|
3197
|
+
function qp(t, e, s) {
|
|
3198
|
+
return t.length === 0 ? t : e ? (s || t.sort(e), Rp(t, e)) : (s || t.sort(), Ip(t));
|
|
3199
|
+
}
|
|
3200
|
+
Ta.exports = qp;
|
|
3201
|
+
}), ke = w((lr, Oa) => {
|
|
3202
|
+
"use strict";
|
|
3203
|
+
lr.__esModule = !0;
|
|
3204
|
+
var Aa = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
3205
|
+
return typeof t;
|
|
3206
|
+
} : function(t) {
|
|
3207
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
3208
|
+
};
|
|
3209
|
+
function Lp(t, e) {
|
|
3210
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3211
|
+
}
|
|
3212
|
+
var Dp = function t(e, s) {
|
|
3213
|
+
if ((typeof e > "u" ? "undefined" : Aa(e)) !== "object") return e;
|
|
3214
|
+
var r = new e.constructor();
|
|
3215
|
+
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
3216
|
+
var i = e[n], o = typeof i > "u" ? "undefined" : Aa(i);
|
|
3217
|
+
n === "parent" && o === "object" ? s && (r[n] = s) : i instanceof Array ? r[n] = i.map(function(u) {
|
|
3218
|
+
return t(u, r);
|
|
3219
|
+
}) : r[n] = t(i, r);
|
|
3220
|
+
}
|
|
3221
|
+
return r;
|
|
3222
|
+
}, Mp = (function() {
|
|
3223
|
+
function t() {
|
|
3224
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
3225
|
+
Lp(this, t);
|
|
3226
|
+
for (var s in e) this[s] = e[s];
|
|
3227
|
+
var r = e.spaces;
|
|
3228
|
+
r = r === void 0 ? {} : r;
|
|
3229
|
+
var n = r.before, i = n === void 0 ? "" : n, o = r.after, u = o === void 0 ? "" : o;
|
|
3230
|
+
this.spaces = { before: i, after: u };
|
|
3231
|
+
}
|
|
3232
|
+
return t.prototype.remove = function() {
|
|
3233
|
+
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
3234
|
+
}, t.prototype.replaceWith = function() {
|
|
3235
|
+
if (this.parent) {
|
|
3236
|
+
for (var s in arguments) this.parent.insertBefore(this, arguments[s]);
|
|
3237
|
+
this.remove();
|
|
3238
|
+
}
|
|
3239
|
+
return this;
|
|
3240
|
+
}, t.prototype.next = function() {
|
|
3241
|
+
return this.parent.at(this.parent.index(this) + 1);
|
|
3242
|
+
}, t.prototype.prev = function() {
|
|
3243
|
+
return this.parent.at(this.parent.index(this) - 1);
|
|
3244
|
+
}, t.prototype.clone = function() {
|
|
3245
|
+
var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = Dp(this);
|
|
3246
|
+
for (var n in s) r[n] = s[n];
|
|
3247
|
+
return r;
|
|
3248
|
+
}, t.prototype.toString = function() {
|
|
3249
|
+
return [this.spaces.before, String(this.value), this.spaces.after].join("");
|
|
3250
|
+
}, t;
|
|
3251
|
+
})();
|
|
3252
|
+
lr.default = Mp, Oa.exports = lr.default;
|
|
3253
|
+
}), B = w((U) => {
|
|
3254
|
+
"use strict";
|
|
3255
|
+
U.__esModule = !0;
|
|
3256
|
+
var w_ = U.TAG = "tag", v_ = U.STRING = "string", x_ = U.SELECTOR = "selector", __ = U.ROOT = "root", b_ = U.PSEUDO = "pseudo", E_ = U.NESTING = "nesting", S_ = U.ID = "id", k_ = U.COMMENT = "comment", T_ = U.COMBINATOR = "combinator", A_ = U.CLASS = "class", O_ = U.ATTRIBUTE = "attribute", C_ = U.UNIVERSAL = "universal";
|
|
3257
|
+
}), fr = w((cr, Ca) => {
|
|
3258
|
+
"use strict";
|
|
3259
|
+
cr.__esModule = !0;
|
|
3260
|
+
var Bp = /* @__PURE__ */ (function() {
|
|
3261
|
+
function t(e, s) {
|
|
3262
|
+
for (var r = 0; r < s.length; r++) {
|
|
3263
|
+
var n = s[r];
|
|
3264
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
|
|
3265
|
+
}
|
|
3266
|
+
}
|
|
3267
|
+
return function(e, s, r) {
|
|
3268
|
+
return s && t(e.prototype, s), r && t(e, r), e;
|
|
3269
|
+
};
|
|
3270
|
+
})(), Up = ke(), Fp = Gp(Up), $p = B(), re = Wp($p);
|
|
3271
|
+
function Wp(t) {
|
|
3272
|
+
if (t && t.__esModule) return t;
|
|
3273
|
+
var e = {};
|
|
3274
|
+
if (t != null) for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]);
|
|
3275
|
+
return e.default = t, e;
|
|
3276
|
+
}
|
|
3277
|
+
function Gp(t) {
|
|
3278
|
+
return t && t.__esModule ? t : { default: t };
|
|
3279
|
+
}
|
|
3280
|
+
function Yp(t, e) {
|
|
3281
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3282
|
+
}
|
|
3283
|
+
function Vp(t, e) {
|
|
3284
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3285
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3286
|
+
}
|
|
3287
|
+
function zp(t, e) {
|
|
3288
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3289
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3290
|
+
}
|
|
3291
|
+
var jp = (function(t) {
|
|
3292
|
+
zp(e, t);
|
|
3293
|
+
function e(s) {
|
|
3294
|
+
Yp(this, e);
|
|
3295
|
+
var r = Vp(this, t.call(this, s));
|
|
3296
|
+
return r.nodes || (r.nodes = []), r;
|
|
3297
|
+
}
|
|
3298
|
+
return e.prototype.append = function(r) {
|
|
3299
|
+
return r.parent = this, this.nodes.push(r), this;
|
|
3300
|
+
}, e.prototype.prepend = function(r) {
|
|
3301
|
+
return r.parent = this, this.nodes.unshift(r), this;
|
|
3302
|
+
}, e.prototype.at = function(r) {
|
|
3303
|
+
return this.nodes[r];
|
|
3304
|
+
}, e.prototype.index = function(r) {
|
|
3305
|
+
return typeof r == "number" ? r : this.nodes.indexOf(r);
|
|
3306
|
+
}, e.prototype.removeChild = function(r) {
|
|
3307
|
+
r = this.index(r), this.at(r).parent = void 0, this.nodes.splice(r, 1);
|
|
3308
|
+
var n = void 0;
|
|
3309
|
+
for (var i in this.indexes) n = this.indexes[i], n >= r && (this.indexes[i] = n - 1);
|
|
3310
|
+
return this;
|
|
3311
|
+
}, e.prototype.removeAll = function() {
|
|
3312
|
+
for (var i = this.nodes, r = Array.isArray(i), n = 0, i = r ? i : i[Symbol.iterator](); ; ) {
|
|
3313
|
+
var o;
|
|
3314
|
+
if (r) {
|
|
3315
|
+
if (n >= i.length) break;
|
|
3316
|
+
o = i[n++];
|
|
3317
|
+
} else {
|
|
3318
|
+
if (n = i.next(), n.done) break;
|
|
3319
|
+
o = n.value;
|
|
3320
|
+
}
|
|
3321
|
+
var u = o;
|
|
3322
|
+
u.parent = void 0;
|
|
3323
|
+
}
|
|
3324
|
+
return this.nodes = [], this;
|
|
3325
|
+
}, e.prototype.empty = function() {
|
|
3326
|
+
return this.removeAll();
|
|
3327
|
+
}, e.prototype.insertAfter = function(r, n) {
|
|
3328
|
+
var i = this.index(r);
|
|
3329
|
+
this.nodes.splice(i + 1, 0, n);
|
|
3330
|
+
var o = void 0;
|
|
3331
|
+
for (var u in this.indexes) o = this.indexes[u], i <= o && (this.indexes[u] = o + this.nodes.length);
|
|
3332
|
+
return this;
|
|
3333
|
+
}, e.prototype.insertBefore = function(r, n) {
|
|
3334
|
+
var i = this.index(r);
|
|
3335
|
+
this.nodes.splice(i, 0, n);
|
|
3336
|
+
var o = void 0;
|
|
3337
|
+
for (var u in this.indexes) o = this.indexes[u], i <= o && (this.indexes[u] = o + this.nodes.length);
|
|
3338
|
+
return this;
|
|
3339
|
+
}, e.prototype.each = function(r) {
|
|
3340
|
+
this.lastEach || (this.lastEach = 0), this.indexes || (this.indexes = {}), this.lastEach++;
|
|
3341
|
+
var n = this.lastEach;
|
|
3342
|
+
if (this.indexes[n] = 0, !!this.length) {
|
|
3343
|
+
for (var i = void 0, o = void 0; this.indexes[n] < this.length && (i = this.indexes[n], o = r(this.at(i), i), o !== !1); ) this.indexes[n] += 1;
|
|
3344
|
+
if (delete this.indexes[n], o === !1) return !1;
|
|
3345
|
+
}
|
|
3346
|
+
}, e.prototype.walk = function(r) {
|
|
3347
|
+
return this.each(function(n, i) {
|
|
3348
|
+
var o = r(n, i);
|
|
3349
|
+
if (o !== !1 && n.length && (o = n.walk(r)), o === !1) return !1;
|
|
3350
|
+
});
|
|
3351
|
+
}, e.prototype.walkAttributes = function(r) {
|
|
3352
|
+
var n = this;
|
|
3353
|
+
return this.walk(function(i) {
|
|
3354
|
+
if (i.type === re.ATTRIBUTE) return r.call(n, i);
|
|
3355
|
+
});
|
|
3356
|
+
}, e.prototype.walkClasses = function(r) {
|
|
3357
|
+
var n = this;
|
|
3358
|
+
return this.walk(function(i) {
|
|
3359
|
+
if (i.type === re.CLASS) return r.call(n, i);
|
|
3360
|
+
});
|
|
3361
|
+
}, e.prototype.walkCombinators = function(r) {
|
|
3362
|
+
var n = this;
|
|
3363
|
+
return this.walk(function(i) {
|
|
3364
|
+
if (i.type === re.COMBINATOR) return r.call(n, i);
|
|
3365
|
+
});
|
|
3366
|
+
}, e.prototype.walkComments = function(r) {
|
|
3367
|
+
var n = this;
|
|
3368
|
+
return this.walk(function(i) {
|
|
3369
|
+
if (i.type === re.COMMENT) return r.call(n, i);
|
|
3370
|
+
});
|
|
3371
|
+
}, e.prototype.walkIds = function(r) {
|
|
3372
|
+
var n = this;
|
|
3373
|
+
return this.walk(function(i) {
|
|
3374
|
+
if (i.type === re.ID) return r.call(n, i);
|
|
3375
|
+
});
|
|
3376
|
+
}, e.prototype.walkNesting = function(r) {
|
|
3377
|
+
var n = this;
|
|
3378
|
+
return this.walk(function(i) {
|
|
3379
|
+
if (i.type === re.NESTING) return r.call(n, i);
|
|
3380
|
+
});
|
|
3381
|
+
}, e.prototype.walkPseudos = function(r) {
|
|
3382
|
+
var n = this;
|
|
3383
|
+
return this.walk(function(i) {
|
|
3384
|
+
if (i.type === re.PSEUDO) return r.call(n, i);
|
|
3385
|
+
});
|
|
3386
|
+
}, e.prototype.walkTags = function(r) {
|
|
3387
|
+
var n = this;
|
|
3388
|
+
return this.walk(function(i) {
|
|
3389
|
+
if (i.type === re.TAG) return r.call(n, i);
|
|
3390
|
+
});
|
|
3391
|
+
}, e.prototype.walkUniversals = function(r) {
|
|
3392
|
+
var n = this;
|
|
3393
|
+
return this.walk(function(i) {
|
|
3394
|
+
if (i.type === re.UNIVERSAL) return r.call(n, i);
|
|
3395
|
+
});
|
|
3396
|
+
}, e.prototype.split = function(r) {
|
|
3397
|
+
var n = this, i = [];
|
|
3398
|
+
return this.reduce(function(o, u, a) {
|
|
3399
|
+
var l = r.call(n, u);
|
|
3400
|
+
return i.push(u), l ? (o.push(i), i = []) : a === n.length - 1 && o.push(i), o;
|
|
3401
|
+
}, []);
|
|
3402
|
+
}, e.prototype.map = function(r) {
|
|
3403
|
+
return this.nodes.map(r);
|
|
3404
|
+
}, e.prototype.reduce = function(r, n) {
|
|
3405
|
+
return this.nodes.reduce(r, n);
|
|
3406
|
+
}, e.prototype.every = function(r) {
|
|
3407
|
+
return this.nodes.every(r);
|
|
3408
|
+
}, e.prototype.some = function(r) {
|
|
3409
|
+
return this.nodes.some(r);
|
|
3410
|
+
}, e.prototype.filter = function(r) {
|
|
3411
|
+
return this.nodes.filter(r);
|
|
3412
|
+
}, e.prototype.sort = function(r) {
|
|
3413
|
+
return this.nodes.sort(r);
|
|
3414
|
+
}, e.prototype.toString = function() {
|
|
3415
|
+
return this.map(String).join("");
|
|
3416
|
+
}, Bp(e, [{ key: "first", get: function() {
|
|
3417
|
+
return this.at(0);
|
|
3418
|
+
} }, { key: "last", get: function() {
|
|
3419
|
+
return this.at(this.length - 1);
|
|
3420
|
+
} }, { key: "length", get: function() {
|
|
3421
|
+
return this.nodes.length;
|
|
3422
|
+
} }]), e;
|
|
3423
|
+
})(Fp.default);
|
|
3424
|
+
cr.default = jp, Ca.exports = cr.default;
|
|
3425
|
+
}), Pa = w((pr, Na) => {
|
|
3426
|
+
"use strict";
|
|
3427
|
+
pr.__esModule = !0;
|
|
3428
|
+
var Hp = fr(), Kp = Xp(Hp), Qp = B();
|
|
3429
|
+
function Xp(t) {
|
|
3430
|
+
return t && t.__esModule ? t : { default: t };
|
|
3431
|
+
}
|
|
3432
|
+
function Jp(t, e) {
|
|
3433
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3434
|
+
}
|
|
3435
|
+
function Zp(t, e) {
|
|
3436
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3437
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3438
|
+
}
|
|
3439
|
+
function eh(t, e) {
|
|
3440
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3441
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3442
|
+
}
|
|
3443
|
+
var th = (function(t) {
|
|
3444
|
+
eh(e, t);
|
|
3445
|
+
function e(s) {
|
|
3446
|
+
Jp(this, e);
|
|
3447
|
+
var r = Zp(this, t.call(this, s));
|
|
3448
|
+
return r.type = Qp.ROOT, r;
|
|
3449
|
+
}
|
|
3450
|
+
return e.prototype.toString = function() {
|
|
3451
|
+
var r = this.reduce(function(n, i) {
|
|
3452
|
+
var o = String(i);
|
|
3453
|
+
return o ? n + o + "," : "";
|
|
3454
|
+
}, "").slice(0, -1);
|
|
3455
|
+
return this.trailingComma ? r + "," : r;
|
|
3456
|
+
}, e;
|
|
3457
|
+
})(Kp.default);
|
|
3458
|
+
pr.default = th, Na.exports = pr.default;
|
|
3459
|
+
}), Ia = w((hr, Ra) => {
|
|
3460
|
+
"use strict";
|
|
3461
|
+
hr.__esModule = !0;
|
|
3462
|
+
var rh = fr(), sh = ih(rh), nh = B();
|
|
3463
|
+
function ih(t) {
|
|
3464
|
+
return t && t.__esModule ? t : { default: t };
|
|
3465
|
+
}
|
|
3466
|
+
function oh(t, e) {
|
|
3467
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3468
|
+
}
|
|
3469
|
+
function ah(t, e) {
|
|
3470
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3471
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3472
|
+
}
|
|
3473
|
+
function uh(t, e) {
|
|
3474
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3475
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3476
|
+
}
|
|
3477
|
+
var lh = (function(t) {
|
|
3478
|
+
uh(e, t);
|
|
3479
|
+
function e(s) {
|
|
3480
|
+
oh(this, e);
|
|
3481
|
+
var r = ah(this, t.call(this, s));
|
|
3482
|
+
return r.type = nh.SELECTOR, r;
|
|
3483
|
+
}
|
|
3484
|
+
return e;
|
|
3485
|
+
})(sh.default);
|
|
3486
|
+
hr.default = lh, Ra.exports = hr.default;
|
|
3487
|
+
}), Ye = w((dr, qa) => {
|
|
3488
|
+
"use strict";
|
|
3489
|
+
dr.__esModule = !0;
|
|
3490
|
+
var ch = /* @__PURE__ */ (function() {
|
|
3491
|
+
function t(e, s) {
|
|
3492
|
+
for (var r = 0; r < s.length; r++) {
|
|
3493
|
+
var n = s[r];
|
|
3494
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
|
|
3495
|
+
}
|
|
3496
|
+
}
|
|
3497
|
+
return function(e, s, r) {
|
|
3498
|
+
return s && t(e.prototype, s), r && t(e, r), e;
|
|
3499
|
+
};
|
|
3500
|
+
})(), fh = ke(), ph = hh(fh);
|
|
3501
|
+
function hh(t) {
|
|
3502
|
+
return t && t.__esModule ? t : { default: t };
|
|
3503
|
+
}
|
|
3504
|
+
function dh(t, e) {
|
|
3505
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3506
|
+
}
|
|
3507
|
+
function mh(t, e) {
|
|
3508
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3509
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3510
|
+
}
|
|
3511
|
+
function yh(t, e) {
|
|
3512
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3513
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3514
|
+
}
|
|
3515
|
+
var gh = (function(t) {
|
|
3516
|
+
yh(e, t);
|
|
3517
|
+
function e() {
|
|
3518
|
+
return dh(this, e), mh(this, t.apply(this, arguments));
|
|
3519
|
+
}
|
|
3520
|
+
return e.prototype.toString = function() {
|
|
3521
|
+
return [this.spaces.before, this.ns, String(this.value), this.spaces.after].join("");
|
|
3522
|
+
}, ch(e, [{ key: "ns", get: function() {
|
|
3523
|
+
var r = this.namespace;
|
|
3524
|
+
return r ? (typeof r == "string" ? r : "") + "|" : "";
|
|
3525
|
+
} }]), e;
|
|
3526
|
+
})(ph.default);
|
|
3527
|
+
dr.default = gh, qa.exports = dr.default;
|
|
3528
|
+
}), Da = w((mr, La) => {
|
|
3529
|
+
"use strict";
|
|
3530
|
+
mr.__esModule = !0;
|
|
3531
|
+
var wh = Ye(), vh = _h(wh), xh = B();
|
|
3532
|
+
function _h(t) {
|
|
3533
|
+
return t && t.__esModule ? t : { default: t };
|
|
3534
|
+
}
|
|
3535
|
+
function bh(t, e) {
|
|
3536
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3537
|
+
}
|
|
3538
|
+
function Eh(t, e) {
|
|
3539
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3540
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3541
|
+
}
|
|
3542
|
+
function Sh(t, e) {
|
|
3543
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3544
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3545
|
+
}
|
|
3546
|
+
var kh = (function(t) {
|
|
3547
|
+
Sh(e, t);
|
|
3548
|
+
function e(s) {
|
|
3549
|
+
bh(this, e);
|
|
3550
|
+
var r = Eh(this, t.call(this, s));
|
|
3551
|
+
return r.type = xh.CLASS, r;
|
|
3552
|
+
}
|
|
3553
|
+
return e.prototype.toString = function() {
|
|
3554
|
+
return [this.spaces.before, this.ns, "." + this.value, this.spaces.after].join("");
|
|
3555
|
+
}, e;
|
|
3556
|
+
})(vh.default);
|
|
3557
|
+
mr.default = kh, La.exports = mr.default;
|
|
3558
|
+
}), Ba = w((yr, Ma) => {
|
|
3559
|
+
"use strict";
|
|
3560
|
+
yr.__esModule = !0;
|
|
3561
|
+
var Th = ke(), Ah = Ch(Th), Oh = B();
|
|
3562
|
+
function Ch(t) {
|
|
3563
|
+
return t && t.__esModule ? t : { default: t };
|
|
3564
|
+
}
|
|
3565
|
+
function Nh(t, e) {
|
|
3566
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3567
|
+
}
|
|
3568
|
+
function Ph(t, e) {
|
|
3569
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3570
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3571
|
+
}
|
|
3572
|
+
function Rh(t, e) {
|
|
3573
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3574
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3575
|
+
}
|
|
3576
|
+
var Ih = (function(t) {
|
|
3577
|
+
Rh(e, t);
|
|
3578
|
+
function e(s) {
|
|
3579
|
+
Nh(this, e);
|
|
3580
|
+
var r = Ph(this, t.call(this, s));
|
|
3581
|
+
return r.type = Oh.COMMENT, r;
|
|
3582
|
+
}
|
|
3583
|
+
return e;
|
|
3584
|
+
})(Ah.default);
|
|
3585
|
+
yr.default = Ih, Ma.exports = yr.default;
|
|
3586
|
+
}), Fa = w((gr, Ua) => {
|
|
3587
|
+
"use strict";
|
|
3588
|
+
gr.__esModule = !0;
|
|
3589
|
+
var qh = Ye(), Lh = Mh(qh), Dh = B();
|
|
3590
|
+
function Mh(t) {
|
|
3591
|
+
return t && t.__esModule ? t : { default: t };
|
|
3592
|
+
}
|
|
3593
|
+
function Bh(t, e) {
|
|
3594
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3595
|
+
}
|
|
3596
|
+
function Uh(t, e) {
|
|
3597
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3598
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3599
|
+
}
|
|
3600
|
+
function Fh(t, e) {
|
|
3601
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3602
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3603
|
+
}
|
|
3604
|
+
var $h = (function(t) {
|
|
3605
|
+
Fh(e, t);
|
|
3606
|
+
function e(s) {
|
|
3607
|
+
Bh(this, e);
|
|
3608
|
+
var r = Uh(this, t.call(this, s));
|
|
3609
|
+
return r.type = Dh.ID, r;
|
|
3610
|
+
}
|
|
3611
|
+
return e.prototype.toString = function() {
|
|
3612
|
+
return [this.spaces.before, this.ns, "#" + this.value, this.spaces.after].join("");
|
|
3613
|
+
}, e;
|
|
3614
|
+
})(Lh.default);
|
|
3615
|
+
gr.default = $h, Ua.exports = gr.default;
|
|
3616
|
+
}), Wa = w((wr, $a) => {
|
|
3617
|
+
"use strict";
|
|
3618
|
+
wr.__esModule = !0;
|
|
3619
|
+
var Wh = Ye(), Gh = Vh(Wh), Yh = B();
|
|
3620
|
+
function Vh(t) {
|
|
3621
|
+
return t && t.__esModule ? t : { default: t };
|
|
3622
|
+
}
|
|
3623
|
+
function zh(t, e) {
|
|
3624
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3625
|
+
}
|
|
3626
|
+
function jh(t, e) {
|
|
3627
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3628
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3629
|
+
}
|
|
3630
|
+
function Hh(t, e) {
|
|
3631
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3632
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3633
|
+
}
|
|
3634
|
+
var Kh = (function(t) {
|
|
3635
|
+
Hh(e, t);
|
|
3636
|
+
function e(s) {
|
|
3637
|
+
zh(this, e);
|
|
3638
|
+
var r = jh(this, t.call(this, s));
|
|
3639
|
+
return r.type = Yh.TAG, r;
|
|
3640
|
+
}
|
|
3641
|
+
return e;
|
|
3642
|
+
})(Gh.default);
|
|
3643
|
+
wr.default = Kh, $a.exports = wr.default;
|
|
3644
|
+
}), Ya = w((vr, Ga) => {
|
|
3645
|
+
"use strict";
|
|
3646
|
+
vr.__esModule = !0;
|
|
3647
|
+
var Qh = ke(), Xh = Zh(Qh), Jh = B();
|
|
3648
|
+
function Zh(t) {
|
|
3649
|
+
return t && t.__esModule ? t : { default: t };
|
|
3650
|
+
}
|
|
3651
|
+
function ed(t, e) {
|
|
3652
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3653
|
+
}
|
|
3654
|
+
function td(t, e) {
|
|
3655
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3656
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3657
|
+
}
|
|
3658
|
+
function rd(t, e) {
|
|
3659
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3660
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3661
|
+
}
|
|
3662
|
+
var sd = (function(t) {
|
|
3663
|
+
rd(e, t);
|
|
3664
|
+
function e(s) {
|
|
3665
|
+
ed(this, e);
|
|
3666
|
+
var r = td(this, t.call(this, s));
|
|
3667
|
+
return r.type = Jh.STRING, r;
|
|
3668
|
+
}
|
|
3669
|
+
return e;
|
|
3670
|
+
})(Xh.default);
|
|
3671
|
+
vr.default = sd, Ga.exports = vr.default;
|
|
3672
|
+
}), za = w((xr, Va) => {
|
|
3673
|
+
"use strict";
|
|
3674
|
+
xr.__esModule = !0;
|
|
3675
|
+
var nd = fr(), id = ad(nd), od = B();
|
|
3676
|
+
function ad(t) {
|
|
3677
|
+
return t && t.__esModule ? t : { default: t };
|
|
3678
|
+
}
|
|
3679
|
+
function ud(t, e) {
|
|
3680
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3681
|
+
}
|
|
3682
|
+
function ld(t, e) {
|
|
3683
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3684
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3685
|
+
}
|
|
3686
|
+
function cd(t, e) {
|
|
3687
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3688
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3689
|
+
}
|
|
3690
|
+
var fd = (function(t) {
|
|
3691
|
+
cd(e, t);
|
|
3692
|
+
function e(s) {
|
|
3693
|
+
ud(this, e);
|
|
3694
|
+
var r = ld(this, t.call(this, s));
|
|
3695
|
+
return r.type = od.PSEUDO, r;
|
|
3696
|
+
}
|
|
3697
|
+
return e.prototype.toString = function() {
|
|
3698
|
+
var r = this.length ? "(" + this.map(String).join(",") + ")" : "";
|
|
3699
|
+
return [this.spaces.before, String(this.value), r, this.spaces.after].join("");
|
|
3700
|
+
}, e;
|
|
3701
|
+
})(id.default);
|
|
3702
|
+
xr.default = fd, Va.exports = xr.default;
|
|
3703
|
+
}), Ha = w((_r, ja) => {
|
|
3704
|
+
"use strict";
|
|
3705
|
+
_r.__esModule = !0;
|
|
3706
|
+
var pd = Ye(), hd = md(pd), dd = B();
|
|
3707
|
+
function md(t) {
|
|
3708
|
+
return t && t.__esModule ? t : { default: t };
|
|
3709
|
+
}
|
|
3710
|
+
function yd(t, e) {
|
|
3711
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3712
|
+
}
|
|
3713
|
+
function gd(t, e) {
|
|
3714
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3715
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3716
|
+
}
|
|
3717
|
+
function wd(t, e) {
|
|
3718
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3719
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3720
|
+
}
|
|
3721
|
+
var vd = (function(t) {
|
|
3722
|
+
wd(e, t);
|
|
3723
|
+
function e(s) {
|
|
3724
|
+
yd(this, e);
|
|
3725
|
+
var r = gd(this, t.call(this, s));
|
|
3726
|
+
return r.type = dd.ATTRIBUTE, r.raws = {}, r;
|
|
3727
|
+
}
|
|
3728
|
+
return e.prototype.toString = function() {
|
|
3729
|
+
var r = [this.spaces.before, "[", this.ns, this.attribute];
|
|
3730
|
+
return this.operator && r.push(this.operator), this.value && r.push(this.value), this.raws.insensitive ? r.push(this.raws.insensitive) : this.insensitive && r.push(" i"), r.push("]"), r.concat(this.spaces.after).join("");
|
|
3731
|
+
}, e;
|
|
3732
|
+
})(hd.default);
|
|
3733
|
+
_r.default = vd, ja.exports = _r.default;
|
|
3734
|
+
}), Qa = w((br, Ka) => {
|
|
3735
|
+
"use strict";
|
|
3736
|
+
br.__esModule = !0;
|
|
3737
|
+
var xd = Ye(), _d = Ed(xd), bd = B();
|
|
3738
|
+
function Ed(t) {
|
|
3739
|
+
return t && t.__esModule ? t : { default: t };
|
|
3740
|
+
}
|
|
3741
|
+
function Sd(t, e) {
|
|
3742
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3743
|
+
}
|
|
3744
|
+
function kd(t, e) {
|
|
3745
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3746
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3747
|
+
}
|
|
3748
|
+
function Td(t, e) {
|
|
3749
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3750
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3751
|
+
}
|
|
3752
|
+
var Ad = (function(t) {
|
|
3753
|
+
Td(e, t);
|
|
3754
|
+
function e(s) {
|
|
3755
|
+
Sd(this, e);
|
|
3756
|
+
var r = kd(this, t.call(this, s));
|
|
3757
|
+
return r.type = bd.UNIVERSAL, r.value = "*", r;
|
|
3758
|
+
}
|
|
3759
|
+
return e;
|
|
3760
|
+
})(_d.default);
|
|
3761
|
+
br.default = Ad, Ka.exports = br.default;
|
|
3762
|
+
}), Ja = w((Er, Xa) => {
|
|
3763
|
+
"use strict";
|
|
3764
|
+
Er.__esModule = !0;
|
|
3765
|
+
var Od = ke(), Cd = Pd(Od), Nd = B();
|
|
3766
|
+
function Pd(t) {
|
|
3767
|
+
return t && t.__esModule ? t : { default: t };
|
|
3768
|
+
}
|
|
3769
|
+
function Rd(t, e) {
|
|
3770
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3771
|
+
}
|
|
3772
|
+
function Id(t, e) {
|
|
3773
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3774
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3775
|
+
}
|
|
3776
|
+
function qd(t, e) {
|
|
3777
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3778
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3779
|
+
}
|
|
3780
|
+
var Ld = (function(t) {
|
|
3781
|
+
qd(e, t);
|
|
3782
|
+
function e(s) {
|
|
3783
|
+
Rd(this, e);
|
|
3784
|
+
var r = Id(this, t.call(this, s));
|
|
3785
|
+
return r.type = Nd.COMBINATOR, r;
|
|
3786
|
+
}
|
|
3787
|
+
return e;
|
|
3788
|
+
})(Cd.default);
|
|
3789
|
+
Er.default = Ld, Xa.exports = Er.default;
|
|
3790
|
+
}), eu = w((Sr, Za) => {
|
|
3791
|
+
"use strict";
|
|
3792
|
+
Sr.__esModule = !0;
|
|
3793
|
+
var Dd = ke(), Md = Ud(Dd), Bd = B();
|
|
3794
|
+
function Ud(t) {
|
|
3795
|
+
return t && t.__esModule ? t : { default: t };
|
|
3796
|
+
}
|
|
3797
|
+
function Fd(t, e) {
|
|
3798
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3799
|
+
}
|
|
3800
|
+
function $d(t, e) {
|
|
3801
|
+
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3802
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
3803
|
+
}
|
|
3804
|
+
function Wd(t, e) {
|
|
3805
|
+
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
3806
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
3807
|
+
}
|
|
3808
|
+
var Gd = (function(t) {
|
|
3809
|
+
Wd(e, t);
|
|
3810
|
+
function e(s) {
|
|
3811
|
+
Fd(this, e);
|
|
3812
|
+
var r = $d(this, t.call(this, s));
|
|
3813
|
+
return r.type = Bd.NESTING, r.value = "&", r;
|
|
3814
|
+
}
|
|
3815
|
+
return e;
|
|
3816
|
+
})(Md.default);
|
|
3817
|
+
Sr.default = Gd, Za.exports = Sr.default;
|
|
3818
|
+
}), ru = w((kr, tu) => {
|
|
3819
|
+
"use strict";
|
|
3820
|
+
kr.__esModule = !0, kr.default = Yd;
|
|
3821
|
+
function Yd(t) {
|
|
3822
|
+
return t.sort(function(e, s) {
|
|
3823
|
+
return e - s;
|
|
3824
|
+
});
|
|
3825
|
+
}
|
|
3826
|
+
tu.exports = kr.default;
|
|
3827
|
+
}), fu = w((Or, cu) => {
|
|
3828
|
+
"use strict";
|
|
3829
|
+
Or.__esModule = !0, Or.default = tm;
|
|
3830
|
+
var su = 39, Vd = 34, Ws = 92, nu = 47, _t = 10, Gs = 32, Ys = 12, Vs = 9, zs = 13, iu = 43, ou = 62, au = 126, uu = 124, zd = 44, jd = 40, Hd = 41, Kd = 91, Qd = 93, Xd = 59, lu = 42, Jd = 58, Zd = 38, em = 64, Tr = /[ \n\t\r\{\(\)'"\\;/]/g, Ar = /[ \n\t\r\(\)\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g;
|
|
3831
|
+
function tm(t) {
|
|
3832
|
+
for (var e = [], s = t.css.valueOf(), r = void 0, n = void 0, i = void 0, o = void 0, u = void 0, a = void 0, l = void 0, f = void 0, h = void 0, c = void 0, g = void 0, b = s.length, d = -1, p = 1, m = 0, y = function(O, q) {
|
|
3833
|
+
if (t.safe) s += q, n = s.length - 1;
|
|
3834
|
+
else throw t.error("Unclosed " + O, p, m - d, m);
|
|
3835
|
+
}; m < b; ) {
|
|
3836
|
+
switch (r = s.charCodeAt(m), r === _t && (d = m, p += 1), r) {
|
|
3837
|
+
case _t:
|
|
3838
|
+
case Gs:
|
|
3839
|
+
case Vs:
|
|
3840
|
+
case zs:
|
|
3841
|
+
case Ys:
|
|
3842
|
+
n = m;
|
|
3843
|
+
do
|
|
3844
|
+
n += 1, r = s.charCodeAt(n), r === _t && (d = n, p += 1);
|
|
3845
|
+
while (r === Gs || r === _t || r === Vs || r === zs || r === Ys);
|
|
3846
|
+
e.push(["space", s.slice(m, n), p, m - d, m]), m = n - 1;
|
|
3847
|
+
break;
|
|
3848
|
+
case iu:
|
|
3849
|
+
case ou:
|
|
3850
|
+
case au:
|
|
3851
|
+
case uu:
|
|
3852
|
+
n = m;
|
|
3853
|
+
do
|
|
3854
|
+
n += 1, r = s.charCodeAt(n);
|
|
3855
|
+
while (r === iu || r === ou || r === au || r === uu);
|
|
3856
|
+
e.push(["combinator", s.slice(m, n), p, m - d, m]), m = n - 1;
|
|
3857
|
+
break;
|
|
3858
|
+
case lu:
|
|
3859
|
+
e.push(["*", "*", p, m - d, m]);
|
|
3860
|
+
break;
|
|
3861
|
+
case Zd:
|
|
3862
|
+
e.push(["&", "&", p, m - d, m]);
|
|
3863
|
+
break;
|
|
3864
|
+
case zd:
|
|
3865
|
+
e.push([",", ",", p, m - d, m]);
|
|
3866
|
+
break;
|
|
3867
|
+
case Kd:
|
|
3868
|
+
e.push(["[", "[", p, m - d, m]);
|
|
3869
|
+
break;
|
|
3870
|
+
case Qd:
|
|
3871
|
+
e.push(["]", "]", p, m - d, m]);
|
|
3872
|
+
break;
|
|
3873
|
+
case Jd:
|
|
3874
|
+
e.push([":", ":", p, m - d, m]);
|
|
3875
|
+
break;
|
|
3876
|
+
case Xd:
|
|
3877
|
+
e.push([";", ";", p, m - d, m]);
|
|
3878
|
+
break;
|
|
3879
|
+
case jd:
|
|
3880
|
+
e.push(["(", "(", p, m - d, m]);
|
|
3881
|
+
break;
|
|
3882
|
+
case Hd:
|
|
3883
|
+
e.push([")", ")", p, m - d, m]);
|
|
3884
|
+
break;
|
|
3885
|
+
case su:
|
|
3886
|
+
case Vd:
|
|
3887
|
+
i = r === su ? "'" : '"', n = m;
|
|
3888
|
+
do
|
|
3889
|
+
for (c = !1, n = s.indexOf(i, n + 1), n === -1 && y("quote", i), g = n; s.charCodeAt(g - 1) === Ws; ) g -= 1, c = !c;
|
|
3890
|
+
while (c);
|
|
3891
|
+
e.push(["string", s.slice(m, n + 1), p, m - d, p, n - d, m]), m = n;
|
|
3892
|
+
break;
|
|
3893
|
+
case em:
|
|
3894
|
+
Tr.lastIndex = m + 1, Tr.test(s), Tr.lastIndex === 0 ? n = s.length - 1 : n = Tr.lastIndex - 2, e.push(["at-word", s.slice(m, n + 1), p, m - d, p, n - d, m]), m = n;
|
|
3895
|
+
break;
|
|
3896
|
+
case Ws:
|
|
3897
|
+
for (n = m, l = !0; s.charCodeAt(n + 1) === Ws; ) n += 1, l = !l;
|
|
3898
|
+
r = s.charCodeAt(n + 1), l && r !== nu && r !== Gs && r !== _t && r !== Vs && r !== zs && r !== Ys && (n += 1), e.push(["word", s.slice(m, n + 1), p, m - d, p, n - d, m]), m = n;
|
|
3899
|
+
break;
|
|
3900
|
+
default:
|
|
3901
|
+
r === nu && s.charCodeAt(m + 1) === lu ? (n = s.indexOf("*/", m + 2) + 1, n === 0 && y("comment", "*/"), a = s.slice(m, n + 1), o = a.split(`
|
|
3902
|
+
`), u = o.length - 1, u > 0 ? (f = p + u, h = n - o[u].length) : (f = p, h = d), e.push(["comment", a, p, m - d, f, n - h, m]), d = h, p = f, m = n) : (Ar.lastIndex = m + 1, Ar.test(s), Ar.lastIndex === 0 ? n = s.length - 1 : n = Ar.lastIndex - 2, e.push(["word", s.slice(m, n + 1), p, m - d, p, n - d, m]), m = n);
|
|
3903
|
+
break;
|
|
3904
|
+
}
|
|
3905
|
+
m++;
|
|
3906
|
+
}
|
|
3907
|
+
return e;
|
|
3908
|
+
}
|
|
3909
|
+
cu.exports = Or.default;
|
|
3910
|
+
}), du = w((Cr, hu) => {
|
|
3911
|
+
"use strict";
|
|
3912
|
+
Cr.__esModule = !0;
|
|
3913
|
+
var rm = /* @__PURE__ */ (function() {
|
|
3914
|
+
function t(e, s) {
|
|
3915
|
+
for (var r = 0; r < s.length; r++) {
|
|
3916
|
+
var n = s[r];
|
|
3917
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3920
|
+
return function(e, s, r) {
|
|
3921
|
+
return s && t(e.prototype, s), r && t(e, r), e;
|
|
3922
|
+
};
|
|
3923
|
+
})(), sm = Us(), nm = I(sm), im = Fs(), js = I(im), om = $s(), am = I(om), um = Pa(), lm = I(um), cm = Ia(), Hs = I(cm), fm = Da(), pm = I(fm), hm = Ba(), dm = I(hm), mm = Fa(), ym = I(mm), gm = Wa(), wm = I(gm), vm = Ya(), xm = I(vm), _m = za(), bm = I(_m), Em = Ha(), Sm = I(Em), km = Qa(), Tm = I(km), Am = Ja(), Om = I(Am), Cm = eu(), Nm = I(Cm), Pm = ru(), Rm = I(Pm), Im = fu(), pu = I(Im), qm = B(), Lm = Dm(qm);
|
|
3924
|
+
function Dm(t) {
|
|
3925
|
+
if (t && t.__esModule) return t;
|
|
3926
|
+
var e = {};
|
|
3927
|
+
if (t != null) for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]);
|
|
3928
|
+
return e.default = t, e;
|
|
3929
|
+
}
|
|
3930
|
+
function I(t) {
|
|
3931
|
+
return t && t.__esModule ? t : { default: t };
|
|
3932
|
+
}
|
|
3933
|
+
function Mm(t, e) {
|
|
3934
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3935
|
+
}
|
|
3936
|
+
var Bm = (function() {
|
|
3937
|
+
function t(e) {
|
|
3938
|
+
Mm(this, t), this.input = e, this.lossy = e.options.lossless === !1, this.position = 0, this.root = new lm.default();
|
|
3939
|
+
var s = new Hs.default();
|
|
3940
|
+
return this.root.append(s), this.current = s, this.lossy ? this.tokens = (0, pu.default)({ safe: e.safe, css: e.css.trim() }) : this.tokens = (0, pu.default)(e), this.loop();
|
|
3941
|
+
}
|
|
3942
|
+
return t.prototype.attribute = function() {
|
|
3943
|
+
var s = "", r = void 0, n = this.currToken;
|
|
3944
|
+
for (this.position++; this.position < this.tokens.length && this.currToken[0] !== "]"; ) s += this.tokens[this.position][1], this.position++;
|
|
3945
|
+
this.position === this.tokens.length && !~s.indexOf("]") && this.error("Expected a closing square bracket.");
|
|
3946
|
+
var i = s.split(/((?:[*~^$|]?=))([^]*)/), o = i[0].split(/(\|)/g), u = { operator: i[1], value: i[2], source: { start: { line: n[2], column: n[3] }, end: { line: this.currToken[2], column: this.currToken[3] } }, sourceIndex: n[4] };
|
|
3947
|
+
if (o.length > 1 ? (o[0] === "" && (o[0] = !0), u.attribute = this.parseValue(o[2]), u.namespace = this.parseNamespace(o[0])) : u.attribute = this.parseValue(i[0]), r = new Sm.default(u), i[2]) {
|
|
3948
|
+
var a = i[2].split(/(\s+i\s*?)$/), l = a[0].trim();
|
|
3949
|
+
r.value = this.lossy ? l : a[0], a[1] && (r.insensitive = !0, this.lossy || (r.raws.insensitive = a[1])), r.quoted = l[0] === "'" || l[0] === '"', r.raws.unquoted = r.quoted ? l.slice(1, -1) : l;
|
|
3950
|
+
}
|
|
3951
|
+
this.newNode(r), this.position++;
|
|
3952
|
+
}, t.prototype.combinator = function() {
|
|
3953
|
+
if (this.currToken[1] === "|") return this.namespace();
|
|
3954
|
+
for (var s = new Om.default({ value: "", source: { start: { line: this.currToken[2], column: this.currToken[3] }, end: { line: this.currToken[2], column: this.currToken[3] } }, sourceIndex: this.currToken[4] }); this.position < this.tokens.length && this.currToken && (this.currToken[0] === "space" || this.currToken[0] === "combinator"); ) this.nextToken && this.nextToken[0] === "combinator" ? (s.spaces.before = this.parseSpace(this.currToken[1]), s.source.start.line = this.nextToken[2], s.source.start.column = this.nextToken[3], s.source.end.column = this.nextToken[3], s.source.end.line = this.nextToken[2], s.sourceIndex = this.nextToken[4]) : this.prevToken && this.prevToken[0] === "combinator" ? s.spaces.after = this.parseSpace(this.currToken[1]) : this.currToken[0] === "combinator" ? s.value = this.currToken[1] : this.currToken[0] === "space" && (s.value = this.parseSpace(this.currToken[1], " ")), this.position++;
|
|
3955
|
+
return this.newNode(s);
|
|
3956
|
+
}, t.prototype.comma = function() {
|
|
3957
|
+
if (this.position === this.tokens.length - 1) {
|
|
3958
|
+
this.root.trailingComma = !0, this.position++;
|
|
3959
|
+
return;
|
|
3960
|
+
}
|
|
3961
|
+
var s = new Hs.default();
|
|
3962
|
+
this.current.parent.append(s), this.current = s, this.position++;
|
|
3963
|
+
}, t.prototype.comment = function() {
|
|
3964
|
+
var s = new dm.default({ value: this.currToken[1], source: { start: { line: this.currToken[2], column: this.currToken[3] }, end: { line: this.currToken[4], column: this.currToken[5] } }, sourceIndex: this.currToken[6] });
|
|
3965
|
+
this.newNode(s), this.position++;
|
|
3966
|
+
}, t.prototype.error = function(s) {
|
|
3967
|
+
throw new this.input.error(s);
|
|
3968
|
+
}, t.prototype.missingBackslash = function() {
|
|
3969
|
+
return this.error("Expected a backslash preceding the semicolon.");
|
|
3970
|
+
}, t.prototype.missingParenthesis = function() {
|
|
3971
|
+
return this.error("Expected opening parenthesis.");
|
|
3972
|
+
}, t.prototype.missingSquareBracket = function() {
|
|
3973
|
+
return this.error("Expected opening square bracket.");
|
|
3974
|
+
}, t.prototype.namespace = function() {
|
|
3975
|
+
var s = this.prevToken && this.prevToken[1] || !0;
|
|
3976
|
+
if (this.nextToken[0] === "word") return this.position++, this.word(s);
|
|
3977
|
+
if (this.nextToken[0] === "*") return this.position++, this.universal(s);
|
|
3978
|
+
}, t.prototype.nesting = function() {
|
|
3979
|
+
this.newNode(new Nm.default({ value: this.currToken[1], source: { start: { line: this.currToken[2], column: this.currToken[3] }, end: { line: this.currToken[2], column: this.currToken[3] } }, sourceIndex: this.currToken[4] })), this.position++;
|
|
3980
|
+
}, t.prototype.parentheses = function() {
|
|
3981
|
+
var s = this.current.last;
|
|
3982
|
+
if (s && s.type === Lm.PSEUDO) {
|
|
3983
|
+
var r = new Hs.default(), n = this.current;
|
|
3984
|
+
s.append(r), this.current = r;
|
|
3985
|
+
var i = 1;
|
|
3986
|
+
for (this.position++; this.position < this.tokens.length && i; ) this.currToken[0] === "(" && i++, this.currToken[0] === ")" && i--, i ? this.parse() : (r.parent.source.end.line = this.currToken[2], r.parent.source.end.column = this.currToken[3], this.position++);
|
|
3987
|
+
i && this.error("Expected closing parenthesis."), this.current = n;
|
|
3988
|
+
} else {
|
|
3989
|
+
var o = 1;
|
|
3990
|
+
for (this.position++, s.value += "("; this.position < this.tokens.length && o; ) this.currToken[0] === "(" && o++, this.currToken[0] === ")" && o--, s.value += this.parseParenthesisToken(this.currToken), this.position++;
|
|
3991
|
+
o && this.error("Expected closing parenthesis.");
|
|
3992
|
+
}
|
|
3993
|
+
}, t.prototype.pseudo = function() {
|
|
3994
|
+
for (var s = this, r = "", n = this.currToken; this.currToken && this.currToken[0] === ":"; ) r += this.currToken[1], this.position++;
|
|
3995
|
+
if (!this.currToken) return this.error("Expected pseudo-class or pseudo-element");
|
|
3996
|
+
if (this.currToken[0] === "word") {
|
|
3997
|
+
var i = void 0;
|
|
3998
|
+
this.splitWord(!1, function(o, u) {
|
|
3999
|
+
r += o, i = new bm.default({ value: r, source: { start: { line: n[2], column: n[3] }, end: { line: s.currToken[4], column: s.currToken[5] } }, sourceIndex: n[4] }), s.newNode(i), u > 1 && s.nextToken && s.nextToken[0] === "(" && s.error("Misplaced parenthesis.");
|
|
4000
|
+
});
|
|
4001
|
+
} else this.error('Unexpected "' + this.currToken[0] + '" found.');
|
|
4002
|
+
}, t.prototype.space = function() {
|
|
4003
|
+
var s = this.currToken;
|
|
4004
|
+
this.position === 0 || this.prevToken[0] === "," || this.prevToken[0] === "(" ? (this.spaces = this.parseSpace(s[1]), this.position++) : this.position === this.tokens.length - 1 || this.nextToken[0] === "," || this.nextToken[0] === ")" ? (this.current.last.spaces.after = this.parseSpace(s[1]), this.position++) : this.combinator();
|
|
4005
|
+
}, t.prototype.string = function() {
|
|
4006
|
+
var s = this.currToken;
|
|
4007
|
+
this.newNode(new xm.default({ value: this.currToken[1], source: { start: { line: s[2], column: s[3] }, end: { line: s[4], column: s[5] } }, sourceIndex: s[6] })), this.position++;
|
|
4008
|
+
}, t.prototype.universal = function(s) {
|
|
4009
|
+
var r = this.nextToken;
|
|
4010
|
+
if (r && r[1] === "|") return this.position++, this.namespace();
|
|
4011
|
+
this.newNode(new Tm.default({ value: this.currToken[1], source: { start: { line: this.currToken[2], column: this.currToken[3] }, end: { line: this.currToken[2], column: this.currToken[3] } }, sourceIndex: this.currToken[4] }), s), this.position++;
|
|
4012
|
+
}, t.prototype.splitWord = function(s, r) {
|
|
4013
|
+
for (var n = this, i = this.nextToken, o = this.currToken[1]; i && i[0] === "word"; ) {
|
|
4014
|
+
this.position++;
|
|
4015
|
+
var u = this.currToken[1];
|
|
4016
|
+
if (o += u, u.lastIndexOf("\\") === u.length - 1) {
|
|
4017
|
+
var a = this.nextToken;
|
|
4018
|
+
a && a[0] === "space" && (o += this.parseSpace(a[1], " "), this.position++);
|
|
4019
|
+
}
|
|
4020
|
+
i = this.nextToken;
|
|
4021
|
+
}
|
|
4022
|
+
var l = (0, js.default)(o, "."), f = (0, js.default)(o, "#"), h = (0, js.default)(o, "#{");
|
|
4023
|
+
h.length && (f = f.filter(function(g) {
|
|
4024
|
+
return !~h.indexOf(g);
|
|
4025
|
+
}));
|
|
4026
|
+
var c = (0, Rm.default)((0, am.default)((0, nm.default)([[0], l, f])));
|
|
4027
|
+
c.forEach(function(g, b) {
|
|
4028
|
+
var d = c[b + 1] || o.length, p = o.slice(g, d);
|
|
4029
|
+
if (b === 0 && r) return r.call(n, p, c.length);
|
|
4030
|
+
var m = void 0;
|
|
4031
|
+
~l.indexOf(g) ? m = new pm.default({ value: p.slice(1), source: { start: { line: n.currToken[2], column: n.currToken[3] + g }, end: { line: n.currToken[4], column: n.currToken[3] + (d - 1) } }, sourceIndex: n.currToken[6] + c[b] }) : ~f.indexOf(g) ? m = new ym.default({ value: p.slice(1), source: { start: { line: n.currToken[2], column: n.currToken[3] + g }, end: { line: n.currToken[4], column: n.currToken[3] + (d - 1) } }, sourceIndex: n.currToken[6] + c[b] }) : m = new wm.default({ value: p, source: { start: { line: n.currToken[2], column: n.currToken[3] + g }, end: { line: n.currToken[4], column: n.currToken[3] + (d - 1) } }, sourceIndex: n.currToken[6] + c[b] }), n.newNode(m, s);
|
|
4032
|
+
}), this.position++;
|
|
4033
|
+
}, t.prototype.word = function(s) {
|
|
4034
|
+
var r = this.nextToken;
|
|
4035
|
+
return r && r[1] === "|" ? (this.position++, this.namespace()) : this.splitWord(s);
|
|
4036
|
+
}, t.prototype.loop = function() {
|
|
4037
|
+
for (; this.position < this.tokens.length; ) this.parse(!0);
|
|
4038
|
+
return this.root;
|
|
4039
|
+
}, t.prototype.parse = function(s) {
|
|
4040
|
+
switch (this.currToken[0]) {
|
|
4041
|
+
case "space":
|
|
4042
|
+
this.space();
|
|
4043
|
+
break;
|
|
4044
|
+
case "comment":
|
|
4045
|
+
this.comment();
|
|
4046
|
+
break;
|
|
4047
|
+
case "(":
|
|
4048
|
+
this.parentheses();
|
|
4049
|
+
break;
|
|
4050
|
+
case ")":
|
|
4051
|
+
s && this.missingParenthesis();
|
|
4052
|
+
break;
|
|
4053
|
+
case "[":
|
|
4054
|
+
this.attribute();
|
|
4055
|
+
break;
|
|
4056
|
+
case "]":
|
|
4057
|
+
this.missingSquareBracket();
|
|
4058
|
+
break;
|
|
4059
|
+
case "at-word":
|
|
4060
|
+
case "word":
|
|
4061
|
+
this.word();
|
|
4062
|
+
break;
|
|
4063
|
+
case ":":
|
|
4064
|
+
this.pseudo();
|
|
4065
|
+
break;
|
|
4066
|
+
case ";":
|
|
4067
|
+
this.missingBackslash();
|
|
4068
|
+
break;
|
|
4069
|
+
case ",":
|
|
4070
|
+
this.comma();
|
|
4071
|
+
break;
|
|
4072
|
+
case "*":
|
|
4073
|
+
this.universal();
|
|
4074
|
+
break;
|
|
4075
|
+
case "&":
|
|
4076
|
+
this.nesting();
|
|
4077
|
+
break;
|
|
4078
|
+
case "combinator":
|
|
4079
|
+
this.combinator();
|
|
4080
|
+
break;
|
|
4081
|
+
case "string":
|
|
4082
|
+
this.string();
|
|
4083
|
+
break;
|
|
4084
|
+
}
|
|
4085
|
+
}, t.prototype.parseNamespace = function(s) {
|
|
4086
|
+
if (this.lossy && typeof s == "string") {
|
|
4087
|
+
var r = s.trim();
|
|
4088
|
+
return r.length ? r : !0;
|
|
4089
|
+
}
|
|
4090
|
+
return s;
|
|
4091
|
+
}, t.prototype.parseSpace = function(s, r) {
|
|
4092
|
+
return this.lossy ? r || "" : s;
|
|
4093
|
+
}, t.prototype.parseValue = function(s) {
|
|
4094
|
+
return this.lossy && s && typeof s == "string" ? s.trim() : s;
|
|
4095
|
+
}, t.prototype.parseParenthesisToken = function(s) {
|
|
4096
|
+
return this.lossy ? s[0] === "space" ? this.parseSpace(s[1], " ") : this.parseValue(s[1]) : s[1];
|
|
4097
|
+
}, t.prototype.newNode = function(s, r) {
|
|
4098
|
+
return r && (s.namespace = this.parseNamespace(r)), this.spaces && (s.spaces.before = this.spaces, this.spaces = ""), this.current.append(s);
|
|
4099
|
+
}, rm(t, [{ key: "currToken", get: function() {
|
|
4100
|
+
return this.tokens[this.position];
|
|
4101
|
+
} }, { key: "nextToken", get: function() {
|
|
4102
|
+
return this.tokens[this.position + 1];
|
|
4103
|
+
} }, { key: "prevToken", get: function() {
|
|
4104
|
+
return this.tokens[this.position - 1];
|
|
4105
|
+
} }]), t;
|
|
4106
|
+
})();
|
|
4107
|
+
Cr.default = Bm, hu.exports = Cr.default;
|
|
4108
|
+
}), yu = w((Nr, mu) => {
|
|
4109
|
+
"use strict";
|
|
4110
|
+
Nr.__esModule = !0;
|
|
4111
|
+
var Um = /* @__PURE__ */ (function() {
|
|
4112
|
+
function t(e, s) {
|
|
4113
|
+
for (var r = 0; r < s.length; r++) {
|
|
4114
|
+
var n = s[r];
|
|
4115
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
|
|
4116
|
+
}
|
|
4117
|
+
}
|
|
4118
|
+
return function(e, s, r) {
|
|
4119
|
+
return s && t(e.prototype, s), r && t(e, r), e;
|
|
4120
|
+
};
|
|
4121
|
+
})(), Fm = du(), $m = Wm(Fm);
|
|
4122
|
+
function Wm(t) {
|
|
4123
|
+
return t && t.__esModule ? t : { default: t };
|
|
4124
|
+
}
|
|
4125
|
+
function Gm(t, e) {
|
|
4126
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
4127
|
+
}
|
|
4128
|
+
var Ym = (function() {
|
|
4129
|
+
function t(e) {
|
|
4130
|
+
return Gm(this, t), this.func = e || function() {
|
|
4131
|
+
}, this;
|
|
4132
|
+
}
|
|
4133
|
+
return t.prototype.process = function(s) {
|
|
4134
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = new $m.default({ css: s, error: function(o) {
|
|
4135
|
+
throw new Error(o);
|
|
4136
|
+
}, options: r });
|
|
4137
|
+
return this.res = n, this.func(n), this;
|
|
4138
|
+
}, Um(t, [{ key: "result", get: function() {
|
|
4139
|
+
return String(this.res);
|
|
4140
|
+
} }]), t;
|
|
4141
|
+
})();
|
|
4142
|
+
Nr.default = Ym, mu.exports = Nr.default;
|
|
4143
|
+
}), j = w((L_, wu) => {
|
|
4144
|
+
"use strict";
|
|
4145
|
+
var Ks = function(t, e) {
|
|
4146
|
+
let s = new t.constructor();
|
|
4147
|
+
for (let r in t) {
|
|
4148
|
+
if (!t.hasOwnProperty(r)) continue;
|
|
4149
|
+
let n = t[r], i = typeof n;
|
|
4150
|
+
r === "parent" && i === "object" ? e && (s[r] = e) : r === "source" ? s[r] = n : n instanceof Array ? s[r] = n.map((o) => Ks(o, s)) : r !== "before" && r !== "after" && r !== "between" && r !== "semicolon" && (i === "object" && n !== null && (n = Ks(n)), s[r] = n);
|
|
4151
|
+
}
|
|
4152
|
+
return s;
|
|
4153
|
+
};
|
|
4154
|
+
wu.exports = class {
|
|
4155
|
+
constructor(e) {
|
|
4156
|
+
e = e || {}, this.raws = { before: "", after: "" };
|
|
4157
|
+
for (let s in e) this[s] = e[s];
|
|
4158
|
+
}
|
|
4159
|
+
remove() {
|
|
4160
|
+
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
4161
|
+
}
|
|
4162
|
+
toString() {
|
|
4163
|
+
return [this.raws.before, String(this.value), this.raws.after].join("");
|
|
4164
|
+
}
|
|
4165
|
+
clone(e) {
|
|
4166
|
+
e = e || {};
|
|
4167
|
+
let s = Ks(this);
|
|
4168
|
+
for (let r in e) s[r] = e[r];
|
|
4169
|
+
return s;
|
|
4170
|
+
}
|
|
4171
|
+
cloneBefore(e) {
|
|
4172
|
+
e = e || {};
|
|
4173
|
+
let s = this.clone(e);
|
|
4174
|
+
return this.parent.insertBefore(this, s), s;
|
|
4175
|
+
}
|
|
4176
|
+
cloneAfter(e) {
|
|
4177
|
+
e = e || {};
|
|
4178
|
+
let s = this.clone(e);
|
|
4179
|
+
return this.parent.insertAfter(this, s), s;
|
|
4180
|
+
}
|
|
4181
|
+
replaceWith() {
|
|
4182
|
+
let e = Array.prototype.slice.call(arguments);
|
|
4183
|
+
if (this.parent) {
|
|
4184
|
+
for (let s of e) this.parent.insertBefore(this, s);
|
|
4185
|
+
this.remove();
|
|
4186
|
+
}
|
|
4187
|
+
return this;
|
|
4188
|
+
}
|
|
4189
|
+
moveTo(e) {
|
|
4190
|
+
return this.cleanRaws(this.root() === e.root()), this.remove(), e.append(this), this;
|
|
4191
|
+
}
|
|
4192
|
+
moveBefore(e) {
|
|
4193
|
+
return this.cleanRaws(this.root() === e.root()), this.remove(), e.parent.insertBefore(e, this), this;
|
|
4194
|
+
}
|
|
4195
|
+
moveAfter(e) {
|
|
4196
|
+
return this.cleanRaws(this.root() === e.root()), this.remove(), e.parent.insertAfter(e, this), this;
|
|
4197
|
+
}
|
|
4198
|
+
next() {
|
|
4199
|
+
let e = this.parent.index(this);
|
|
4200
|
+
return this.parent.nodes[e + 1];
|
|
4201
|
+
}
|
|
4202
|
+
prev() {
|
|
4203
|
+
let e = this.parent.index(this);
|
|
4204
|
+
return this.parent.nodes[e - 1];
|
|
4205
|
+
}
|
|
4206
|
+
toJSON() {
|
|
4207
|
+
let e = {};
|
|
4208
|
+
for (let s in this) {
|
|
4209
|
+
if (!this.hasOwnProperty(s) || s === "parent") continue;
|
|
4210
|
+
let r = this[s];
|
|
4211
|
+
r instanceof Array ? e[s] = r.map((n) => typeof n == "object" && n.toJSON ? n.toJSON() : n) : typeof r == "object" && r.toJSON ? e[s] = r.toJSON() : e[s] = r;
|
|
4212
|
+
}
|
|
4213
|
+
return e;
|
|
4214
|
+
}
|
|
4215
|
+
root() {
|
|
4216
|
+
let e = this;
|
|
4217
|
+
for (; e.parent; ) e = e.parent;
|
|
4218
|
+
return e;
|
|
4219
|
+
}
|
|
4220
|
+
cleanRaws(e) {
|
|
4221
|
+
delete this.raws.before, delete this.raws.after, e || delete this.raws.between;
|
|
4222
|
+
}
|
|
4223
|
+
positionInside(e) {
|
|
4224
|
+
let s = this.toString(), r = this.source.start.column, n = this.source.start.line;
|
|
4225
|
+
for (let i = 0; i < e; i++) s[i] === `
|
|
4226
|
+
` ? (r = 1, n += 1) : r += 1;
|
|
4227
|
+
return { line: n, column: r };
|
|
4228
|
+
}
|
|
4229
|
+
positionBy(e) {
|
|
4230
|
+
let s = this.source.start;
|
|
4231
|
+
if (Object(e).index) s = this.positionInside(e.index);
|
|
4232
|
+
else if (Object(e).word) {
|
|
4233
|
+
let r = this.toString().indexOf(e.word);
|
|
4234
|
+
r !== -1 && (s = this.positionInside(r));
|
|
4235
|
+
}
|
|
4236
|
+
return s;
|
|
4237
|
+
}
|
|
4238
|
+
};
|
|
4239
|
+
}), F = w((D_, vu) => {
|
|
4240
|
+
"use strict";
|
|
4241
|
+
var zm = j(), Ve = class extends zm {
|
|
4242
|
+
constructor(e) {
|
|
4243
|
+
super(e), this.nodes || (this.nodes = []);
|
|
4244
|
+
}
|
|
4245
|
+
push(e) {
|
|
4246
|
+
return e.parent = this, this.nodes.push(e), this;
|
|
4247
|
+
}
|
|
4248
|
+
each(e) {
|
|
4249
|
+
this.lastEach || (this.lastEach = 0), this.indexes || (this.indexes = {}), this.lastEach += 1;
|
|
4250
|
+
let s = this.lastEach, r, n;
|
|
4251
|
+
if (this.indexes[s] = 0, !!this.nodes) {
|
|
4252
|
+
for (; this.indexes[s] < this.nodes.length && (r = this.indexes[s], n = e(this.nodes[r], r), n !== !1); ) this.indexes[s] += 1;
|
|
4253
|
+
return delete this.indexes[s], n;
|
|
4254
|
+
}
|
|
4255
|
+
}
|
|
4256
|
+
walk(e) {
|
|
4257
|
+
return this.each((s, r) => {
|
|
4258
|
+
let n = e(s, r);
|
|
4259
|
+
return n !== !1 && s.walk && (n = s.walk(e)), n;
|
|
4260
|
+
});
|
|
4261
|
+
}
|
|
4262
|
+
walkType(e, s) {
|
|
4263
|
+
if (!e || !s) throw new Error("Parameters {type} and {callback} are required.");
|
|
4264
|
+
let r = typeof e == "function";
|
|
4265
|
+
return this.walk((n, i) => {
|
|
4266
|
+
if (r && n instanceof e || !r && n.type === e) return s.call(this, n, i);
|
|
4267
|
+
});
|
|
4268
|
+
}
|
|
4269
|
+
append(e) {
|
|
4270
|
+
return e.parent = this, this.nodes.push(e), this;
|
|
4271
|
+
}
|
|
4272
|
+
prepend(e) {
|
|
4273
|
+
return e.parent = this, this.nodes.unshift(e), this;
|
|
4274
|
+
}
|
|
4275
|
+
cleanRaws(e) {
|
|
4276
|
+
if (super.cleanRaws(e), this.nodes) for (let s of this.nodes) s.cleanRaws(e);
|
|
4277
|
+
}
|
|
4278
|
+
insertAfter(e, s) {
|
|
4279
|
+
let r = this.index(e), n;
|
|
4280
|
+
this.nodes.splice(r + 1, 0, s);
|
|
4281
|
+
for (let i in this.indexes) n = this.indexes[i], r <= n && (this.indexes[i] = n + this.nodes.length);
|
|
4282
|
+
return this;
|
|
4283
|
+
}
|
|
4284
|
+
insertBefore(e, s) {
|
|
4285
|
+
let r = this.index(e), n;
|
|
4286
|
+
this.nodes.splice(r, 0, s);
|
|
4287
|
+
for (let i in this.indexes) n = this.indexes[i], r <= n && (this.indexes[i] = n + this.nodes.length);
|
|
4288
|
+
return this;
|
|
4289
|
+
}
|
|
4290
|
+
removeChild(e) {
|
|
4291
|
+
e = this.index(e), this.nodes[e].parent = void 0, this.nodes.splice(e, 1);
|
|
4292
|
+
let s;
|
|
4293
|
+
for (let r in this.indexes) s = this.indexes[r], s >= e && (this.indexes[r] = s - 1);
|
|
4294
|
+
return this;
|
|
4295
|
+
}
|
|
4296
|
+
removeAll() {
|
|
4297
|
+
for (let e of this.nodes) e.parent = void 0;
|
|
4298
|
+
return this.nodes = [], this;
|
|
4299
|
+
}
|
|
4300
|
+
every(e) {
|
|
4301
|
+
return this.nodes.every(e);
|
|
4302
|
+
}
|
|
4303
|
+
some(e) {
|
|
4304
|
+
return this.nodes.some(e);
|
|
4305
|
+
}
|
|
4306
|
+
index(e) {
|
|
4307
|
+
return typeof e == "number" ? e : this.nodes.indexOf(e);
|
|
4308
|
+
}
|
|
4309
|
+
get first() {
|
|
4310
|
+
if (this.nodes) return this.nodes[0];
|
|
4311
|
+
}
|
|
4312
|
+
get last() {
|
|
4313
|
+
if (this.nodes) return this.nodes[this.nodes.length - 1];
|
|
4314
|
+
}
|
|
4315
|
+
toString() {
|
|
4316
|
+
let e = this.nodes.map(String).join("");
|
|
4317
|
+
return this.value && (e = this.value + e), this.raws.before && (e = this.raws.before + e), this.raws.after && (e += this.raws.after), e;
|
|
4318
|
+
}
|
|
4319
|
+
};
|
|
4320
|
+
Ve.registerWalker = (t) => {
|
|
4321
|
+
let e = "walk" + t.name;
|
|
4322
|
+
e.lastIndexOf("s") !== e.length - 1 && (e += "s"), !Ve.prototype[e] && (Ve.prototype[e] = function(s) {
|
|
4323
|
+
return this.walkType(t, s);
|
|
4324
|
+
});
|
|
4325
|
+
}, vu.exports = Ve;
|
|
4326
|
+
}), _u = w((B_, xu) => {
|
|
4327
|
+
"use strict";
|
|
4328
|
+
var jm = F();
|
|
4329
|
+
xu.exports = class extends jm {
|
|
4330
|
+
constructor(e) {
|
|
4331
|
+
super(e), this.type = "root";
|
|
4332
|
+
}
|
|
4333
|
+
};
|
|
4334
|
+
}), Eu = w((F_, bu) => {
|
|
4335
|
+
"use strict";
|
|
4336
|
+
var Hm = F();
|
|
4337
|
+
bu.exports = class extends Hm {
|
|
4338
|
+
constructor(e) {
|
|
4339
|
+
super(e), this.type = "value", this.unbalanced = 0;
|
|
4340
|
+
}
|
|
4341
|
+
};
|
|
4342
|
+
}), Tu = w(($_, ku) => {
|
|
4343
|
+
"use strict";
|
|
4344
|
+
var Su = F(), Pr = class extends Su {
|
|
4345
|
+
constructor(e) {
|
|
4346
|
+
super(e), this.type = "atword";
|
|
4347
|
+
}
|
|
4348
|
+
toString() {
|
|
4349
|
+
let e = this.quoted ? this.raws.quote : "";
|
|
4350
|
+
return [this.raws.before, "@", String.prototype.toString.call(this.value), this.raws.after].join("");
|
|
4351
|
+
}
|
|
4352
|
+
};
|
|
4353
|
+
Su.registerWalker(Pr), ku.exports = Pr;
|
|
4354
|
+
}), Ou = w((W_, Au) => {
|
|
4355
|
+
"use strict";
|
|
4356
|
+
var Km = F(), Qm = j(), Rr = class extends Qm {
|
|
4357
|
+
constructor(e) {
|
|
4358
|
+
super(e), this.type = "colon";
|
|
4359
|
+
}
|
|
4360
|
+
};
|
|
4361
|
+
Km.registerWalker(Rr), Au.exports = Rr;
|
|
4362
|
+
}), Nu = w((G_, Cu) => {
|
|
4363
|
+
"use strict";
|
|
4364
|
+
var Xm = F(), Jm = j(), Ir = class extends Jm {
|
|
4365
|
+
constructor(e) {
|
|
4366
|
+
super(e), this.type = "comma";
|
|
4367
|
+
}
|
|
4368
|
+
};
|
|
4369
|
+
Xm.registerWalker(Ir), Cu.exports = Ir;
|
|
4370
|
+
}), Ru = w((Y_, Pu) => {
|
|
4371
|
+
"use strict";
|
|
4372
|
+
var Zm = F(), ey = j(), qr = class extends ey {
|
|
4373
|
+
constructor(e) {
|
|
4374
|
+
super(e), this.type = "comment", this.inline = Object(e).inline || !1;
|
|
4375
|
+
}
|
|
4376
|
+
toString() {
|
|
4377
|
+
return [this.raws.before, this.inline ? "//" : "/*", String(this.value), this.inline ? "" : "*/", this.raws.after].join("");
|
|
4378
|
+
}
|
|
4379
|
+
};
|
|
4380
|
+
Zm.registerWalker(qr), Pu.exports = qr;
|
|
4381
|
+
}), Lu = w((V_, qu) => {
|
|
4382
|
+
"use strict";
|
|
4383
|
+
var Iu = F(), Lr = class extends Iu {
|
|
4384
|
+
constructor(e) {
|
|
4385
|
+
super(e), this.type = "func", this.unbalanced = -1;
|
|
4386
|
+
}
|
|
4387
|
+
};
|
|
4388
|
+
Iu.registerWalker(Lr), qu.exports = Lr;
|
|
4389
|
+
}), Mu = w((z_, Du) => {
|
|
4390
|
+
"use strict";
|
|
4391
|
+
var ty = F(), ry = j(), Dr = class extends ry {
|
|
4392
|
+
constructor(e) {
|
|
4393
|
+
super(e), this.type = "number", this.unit = Object(e).unit || "";
|
|
4394
|
+
}
|
|
4395
|
+
toString() {
|
|
4396
|
+
return [this.raws.before, String(this.value), this.unit, this.raws.after].join("");
|
|
4397
|
+
}
|
|
4398
|
+
};
|
|
4399
|
+
ty.registerWalker(Dr), Du.exports = Dr;
|
|
4400
|
+
}), Uu = w((j_, Bu) => {
|
|
4401
|
+
"use strict";
|
|
4402
|
+
var sy = F(), ny = j(), Mr = class extends ny {
|
|
4403
|
+
constructor(e) {
|
|
4404
|
+
super(e), this.type = "operator";
|
|
4405
|
+
}
|
|
4406
|
+
};
|
|
4407
|
+
sy.registerWalker(Mr), Bu.exports = Mr;
|
|
4408
|
+
}), $u = w((H_, Fu) => {
|
|
4409
|
+
"use strict";
|
|
4410
|
+
var iy = F(), oy = j(), Br = class extends oy {
|
|
4411
|
+
constructor(e) {
|
|
4412
|
+
super(e), this.type = "paren", this.parenType = "";
|
|
4413
|
+
}
|
|
4414
|
+
};
|
|
4415
|
+
iy.registerWalker(Br), Fu.exports = Br;
|
|
4416
|
+
}), Gu = w((K_, Wu) => {
|
|
4417
|
+
"use strict";
|
|
4418
|
+
var ay = F(), uy = j(), Ur = class extends uy {
|
|
4419
|
+
constructor(e) {
|
|
4420
|
+
super(e), this.type = "string";
|
|
4421
|
+
}
|
|
4422
|
+
toString() {
|
|
4423
|
+
let e = this.quoted ? this.raws.quote : "";
|
|
4424
|
+
return [this.raws.before, e, this.value + "", e, this.raws.after].join("");
|
|
4425
|
+
}
|
|
4426
|
+
};
|
|
4427
|
+
ay.registerWalker(Ur), Wu.exports = Ur;
|
|
4428
|
+
}), Vu = w((Q_, Yu) => {
|
|
4429
|
+
"use strict";
|
|
4430
|
+
var ly = F(), cy = j(), Fr = class extends cy {
|
|
4431
|
+
constructor(e) {
|
|
4432
|
+
super(e), this.type = "word";
|
|
4433
|
+
}
|
|
4434
|
+
};
|
|
4435
|
+
ly.registerWalker(Fr), Yu.exports = Fr;
|
|
4436
|
+
}), ju = w((X_, zu) => {
|
|
4437
|
+
"use strict";
|
|
4438
|
+
var fy = F(), py = j(), $r = class extends py {
|
|
4439
|
+
constructor(e) {
|
|
4440
|
+
super(e), this.type = "unicode-range";
|
|
4441
|
+
}
|
|
4442
|
+
};
|
|
4443
|
+
fy.registerWalker($r), zu.exports = $r;
|
|
4444
|
+
}), Ku = w((J_, Hu) => {
|
|
4445
|
+
"use strict";
|
|
4446
|
+
var Qs = class extends Error {
|
|
4447
|
+
constructor(e) {
|
|
4448
|
+
super(e), this.name = this.constructor.name, this.message = e || "An error ocurred while tokzenizing.", typeof Error.captureStackTrace == "function" ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error(e).stack;
|
|
4449
|
+
}
|
|
4450
|
+
};
|
|
4451
|
+
Hu.exports = Qs;
|
|
4452
|
+
}), Ju = w((Z_, Xu) => {
|
|
4453
|
+
"use strict";
|
|
4454
|
+
var Wr = /[ \n\t\r\{\(\)'"\\;,/]/g, hy = /[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g, ze = /[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g, dy = /^[a-z0-9]/i, my = /^[a-f0-9?\-]/i, Qu = Ku();
|
|
4455
|
+
Xu.exports = function(e, s) {
|
|
4456
|
+
s = s || {};
|
|
4457
|
+
let r = [], n = e.valueOf(), i = n.length, o = -1, u = 1, a = 0, l = 0, f = null, h, c, g, b, d, p, m, y, v, O, q, H;
|
|
4458
|
+
function ne(A) {
|
|
4459
|
+
let k = `Unclosed ${A} at line: ${u}, column: ${a - o}, token: ${a}`;
|
|
4460
|
+
throw new Qu(k);
|
|
4461
|
+
}
|
|
4462
|
+
function W() {
|
|
4463
|
+
let A = `Syntax error at line: ${u}, column: ${a - o}, token: ${a}`;
|
|
4464
|
+
throw new Qu(A);
|
|
4465
|
+
}
|
|
4466
|
+
for (; a < i; ) {
|
|
4467
|
+
switch (h = n.charCodeAt(a), h === 10 && (o = a, u += 1), h) {
|
|
4468
|
+
case 10:
|
|
4469
|
+
case 32:
|
|
4470
|
+
case 9:
|
|
4471
|
+
case 13:
|
|
4472
|
+
case 12:
|
|
4473
|
+
c = a;
|
|
4474
|
+
do
|
|
4475
|
+
c += 1, h = n.charCodeAt(c), h === 10 && (o = c, u += 1);
|
|
4476
|
+
while (h === 32 || h === 10 || h === 9 || h === 13 || h === 12);
|
|
4477
|
+
r.push(["space", n.slice(a, c), u, a - o, u, c - o, a]), a = c - 1;
|
|
4478
|
+
break;
|
|
4479
|
+
case 58:
|
|
4480
|
+
c = a + 1, r.push(["colon", n.slice(a, c), u, a - o, u, c - o, a]), a = c - 1;
|
|
4481
|
+
break;
|
|
4482
|
+
case 44:
|
|
4483
|
+
c = a + 1, r.push(["comma", n.slice(a, c), u, a - o, u, c - o, a]), a = c - 1;
|
|
4484
|
+
break;
|
|
4485
|
+
case 123:
|
|
4486
|
+
r.push(["{", "{", u, a - o, u, c - o, a]);
|
|
4487
|
+
break;
|
|
4488
|
+
case 125:
|
|
4489
|
+
r.push(["}", "}", u, a - o, u, c - o, a]);
|
|
4490
|
+
break;
|
|
4491
|
+
case 40:
|
|
4492
|
+
l++, f = !f && l === 1 && r.length > 0 && r[r.length - 1][0] === "word" && r[r.length - 1][1] === "url", r.push(["(", "(", u, a - o, u, c - o, a]);
|
|
4493
|
+
break;
|
|
4494
|
+
case 41:
|
|
4495
|
+
l--, f = f && l > 0, r.push([")", ")", u, a - o, u, c - o, a]);
|
|
4496
|
+
break;
|
|
4497
|
+
case 39:
|
|
4498
|
+
case 34:
|
|
4499
|
+
g = h === 39 ? "'" : '"', c = a;
|
|
4500
|
+
do
|
|
4501
|
+
for (O = !1, c = n.indexOf(g, c + 1), c === -1 && ne("quote", g), q = c; n.charCodeAt(q - 1) === 92; ) q -= 1, O = !O;
|
|
4502
|
+
while (O);
|
|
4503
|
+
r.push(["string", n.slice(a, c + 1), u, a - o, u, c - o, a]), a = c;
|
|
4504
|
+
break;
|
|
4505
|
+
case 64:
|
|
4506
|
+
Wr.lastIndex = a + 1, Wr.test(n), Wr.lastIndex === 0 ? c = n.length - 1 : c = Wr.lastIndex - 2, r.push(["atword", n.slice(a, c + 1), u, a - o, u, c - o, a]), a = c;
|
|
4507
|
+
break;
|
|
4508
|
+
case 92:
|
|
4509
|
+
c = a, h = n.charCodeAt(c + 1), m && h !== 47 && h !== 32 && h !== 10 && h !== 9 && h !== 13 && h !== 12 && (c += 1), r.push(["word", n.slice(a, c + 1), u, a - o, u, c - o, a]), a = c;
|
|
4510
|
+
break;
|
|
4511
|
+
case 43:
|
|
4512
|
+
case 45:
|
|
4513
|
+
case 42:
|
|
4514
|
+
c = a + 1, H = n.slice(a + 1, c + 1);
|
|
4515
|
+
let A = n.slice(a - 1, a);
|
|
4516
|
+
if (h === 45 && H.charCodeAt(0) === 45) {
|
|
4517
|
+
c++, r.push(["word", n.slice(a, c), u, a - o, u, c - o, a]), a = c - 1;
|
|
4518
|
+
break;
|
|
4519
|
+
}
|
|
4520
|
+
r.push(["operator", n.slice(a, c), u, a - o, u, c - o, a]), a = c - 1;
|
|
4521
|
+
break;
|
|
4522
|
+
default:
|
|
4523
|
+
if (h === 47 && (n.charCodeAt(a + 1) === 42 || s.loose && !f && n.charCodeAt(a + 1) === 47)) {
|
|
4524
|
+
if (n.charCodeAt(a + 1) === 42) c = n.indexOf("*/", a + 2) + 1, c === 0 && ne("comment", "*/");
|
|
4525
|
+
else {
|
|
4526
|
+
let N = n.indexOf(`
|
|
4527
|
+
`, a + 2);
|
|
4528
|
+
c = N !== -1 ? N - 1 : i;
|
|
4529
|
+
}
|
|
4530
|
+
p = n.slice(a, c + 1), b = p.split(`
|
|
4531
|
+
`), d = b.length - 1, d > 0 ? (y = u + d, v = c - b[d].length) : (y = u, v = o), r.push(["comment", p, u, a - o, y, c - v, a]), o = v, u = y, a = c;
|
|
4532
|
+
} else if (h === 35 && !dy.test(n.slice(a + 1, a + 2))) c = a + 1, r.push(["#", n.slice(a, c), u, a - o, u, c - o, a]), a = c - 1;
|
|
4533
|
+
else if ((h === 117 || h === 85) && n.charCodeAt(a + 1) === 43) {
|
|
4534
|
+
c = a + 2;
|
|
4535
|
+
do
|
|
4536
|
+
c += 1, h = n.charCodeAt(c);
|
|
4537
|
+
while (c < i && my.test(n.slice(c, c + 1)));
|
|
4538
|
+
r.push(["unicoderange", n.slice(a, c), u, a - o, u, c - o, a]), a = c - 1;
|
|
4539
|
+
} else if (h === 47) c = a + 1, r.push(["operator", n.slice(a, c), u, a - o, u, c - o, a]), a = c - 1;
|
|
4540
|
+
else {
|
|
4541
|
+
let k = hy;
|
|
4542
|
+
if (h >= 48 && h <= 57 && (k = ze), k.lastIndex = a + 1, k.test(n), k.lastIndex === 0 ? c = n.length - 1 : c = k.lastIndex - 2, k === ze || h === 46) {
|
|
4543
|
+
let N = n.charCodeAt(c), tn = n.charCodeAt(c + 1), rn = n.charCodeAt(c + 2);
|
|
4544
|
+
(N === 101 || N === 69) && (tn === 45 || tn === 43) && rn >= 48 && rn <= 57 && (ze.lastIndex = c + 2, ze.test(n), ze.lastIndex === 0 ? c = n.length - 1 : c = ze.lastIndex - 2);
|
|
4545
|
+
}
|
|
4546
|
+
r.push(["word", n.slice(a, c + 1), u, a - o, u, c - o, a]), a = c;
|
|
4547
|
+
}
|
|
4548
|
+
break;
|
|
4549
|
+
}
|
|
4550
|
+
a++;
|
|
4551
|
+
}
|
|
4552
|
+
return r;
|
|
4553
|
+
};
|
|
4554
|
+
}), el = w((eb, Zu) => {
|
|
4555
|
+
"use strict";
|
|
4556
|
+
var Xs = class extends Error {
|
|
4557
|
+
constructor(e) {
|
|
4558
|
+
super(e), this.name = this.constructor.name, this.message = e || "An error ocurred while parsing.", typeof Error.captureStackTrace == "function" ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error(e).stack;
|
|
4559
|
+
}
|
|
4560
|
+
};
|
|
4561
|
+
Zu.exports = Xs;
|
|
4562
|
+
}), nl = w((rb, sl) => {
|
|
4563
|
+
"use strict";
|
|
4564
|
+
var yy = _u(), gy = Eu(), wy = Tu(), vy = Ou(), xy = Nu(), _y = Ru(), by = Lu(), Ey = Mu(), Sy = Uu(), tl = $u(), ky = Gu(), rl = Vu(), Ty = ju(), Ay = Ju(), Oy = Us(), Cy = Fs(), Ny = $s(), Py = el();
|
|
4565
|
+
function Ry(t) {
|
|
4566
|
+
return t.sort((e, s) => e - s);
|
|
4567
|
+
}
|
|
4568
|
+
sl.exports = class {
|
|
4569
|
+
constructor(e, s) {
|
|
4570
|
+
let r = { loose: !1 };
|
|
4571
|
+
this.cache = [], this.input = e, this.options = Object.assign({}, r, s), this.position = 0, this.unbalanced = 0, this.root = new yy();
|
|
4572
|
+
let n = new gy();
|
|
4573
|
+
this.root.append(n), this.current = n, this.tokens = Ay(e, this.options);
|
|
4574
|
+
}
|
|
4575
|
+
parse() {
|
|
4576
|
+
return this.loop();
|
|
4577
|
+
}
|
|
4578
|
+
colon() {
|
|
4579
|
+
let e = this.currToken;
|
|
4580
|
+
this.newNode(new vy({ value: e[1], source: { start: { line: e[2], column: e[3] }, end: { line: e[4], column: e[5] } }, sourceIndex: e[6] })), this.position++;
|
|
4581
|
+
}
|
|
4582
|
+
comma() {
|
|
4583
|
+
let e = this.currToken;
|
|
4584
|
+
this.newNode(new xy({ value: e[1], source: { start: { line: e[2], column: e[3] }, end: { line: e[4], column: e[5] } }, sourceIndex: e[6] })), this.position++;
|
|
4585
|
+
}
|
|
4586
|
+
comment() {
|
|
4587
|
+
let e = !1, s = this.currToken[1].replace(/\/\*|\*\//g, ""), r;
|
|
4588
|
+
this.options.loose && s.startsWith("//") && (s = s.substring(2), e = !0), r = new _y({ value: s, inline: e, source: { start: { line: this.currToken[2], column: this.currToken[3] }, end: { line: this.currToken[4], column: this.currToken[5] } }, sourceIndex: this.currToken[6] }), this.newNode(r), this.position++;
|
|
4589
|
+
}
|
|
4590
|
+
error(e, s) {
|
|
4591
|
+
throw new Py(e + ` at line: ${s[2]}, column ${s[3]}`);
|
|
4592
|
+
}
|
|
4593
|
+
loop() {
|
|
4594
|
+
for (; this.position < this.tokens.length; ) this.parseTokens();
|
|
4595
|
+
return !this.current.last && this.spaces ? this.current.raws.before += this.spaces : this.spaces && (this.current.last.raws.after += this.spaces), this.spaces = "", this.root;
|
|
4596
|
+
}
|
|
4597
|
+
operator() {
|
|
4598
|
+
let e = this.currToken[1], s;
|
|
4599
|
+
if (e === "+" || e === "-") {
|
|
4600
|
+
if (this.options.loose || this.position > 0 && (this.current.type === "func" && this.current.value === "calc" ? this.prevToken[0] !== "space" && this.prevToken[0] !== "(" ? this.error("Syntax Error", this.currToken) : this.nextToken[0] !== "space" && this.nextToken[0] !== "word" ? this.error("Syntax Error", this.currToken) : this.nextToken[0] === "word" && this.current.last.type !== "operator" && this.current.last.value !== "(" && this.error("Syntax Error", this.currToken) : (this.nextToken[0] === "space" || this.nextToken[0] === "operator" || this.prevToken[0] === "operator") && this.error("Syntax Error", this.currToken)), this.options.loose) {
|
|
4601
|
+
if ((!this.current.nodes.length || this.current.last && this.current.last.type === "operator") && this.nextToken[0] === "word") return this.word();
|
|
4602
|
+
} else if (this.nextToken[0] === "word") return this.word();
|
|
4603
|
+
}
|
|
4604
|
+
return s = new Sy({ value: this.currToken[1], source: { start: { line: this.currToken[2], column: this.currToken[3] }, end: { line: this.currToken[2], column: this.currToken[3] } }, sourceIndex: this.currToken[4] }), this.position++, this.newNode(s);
|
|
4605
|
+
}
|
|
4606
|
+
parseTokens() {
|
|
4607
|
+
switch (this.currToken[0]) {
|
|
4608
|
+
case "space":
|
|
4609
|
+
this.space();
|
|
4610
|
+
break;
|
|
4611
|
+
case "colon":
|
|
4612
|
+
this.colon();
|
|
4613
|
+
break;
|
|
4614
|
+
case "comma":
|
|
4615
|
+
this.comma();
|
|
4616
|
+
break;
|
|
4617
|
+
case "comment":
|
|
4618
|
+
this.comment();
|
|
4619
|
+
break;
|
|
4620
|
+
case "(":
|
|
4621
|
+
this.parenOpen();
|
|
4622
|
+
break;
|
|
4623
|
+
case ")":
|
|
4624
|
+
this.parenClose();
|
|
4625
|
+
break;
|
|
4626
|
+
case "atword":
|
|
4627
|
+
case "word":
|
|
4628
|
+
this.word();
|
|
4629
|
+
break;
|
|
4630
|
+
case "operator":
|
|
4631
|
+
this.operator();
|
|
4632
|
+
break;
|
|
4633
|
+
case "string":
|
|
4634
|
+
this.string();
|
|
4635
|
+
break;
|
|
4636
|
+
case "unicoderange":
|
|
4637
|
+
this.unicodeRange();
|
|
4638
|
+
break;
|
|
4639
|
+
default:
|
|
4640
|
+
this.word();
|
|
4641
|
+
break;
|
|
4642
|
+
}
|
|
4643
|
+
}
|
|
4644
|
+
parenOpen() {
|
|
4645
|
+
let e = 1, s = this.position + 1, r = this.currToken, n;
|
|
4646
|
+
for (; s < this.tokens.length && e; ) {
|
|
4647
|
+
let i = this.tokens[s];
|
|
4648
|
+
i[0] === "(" && e++, i[0] === ")" && e--, s++;
|
|
4649
|
+
}
|
|
4650
|
+
if (e && this.error("Expected closing parenthesis", r), n = this.current.last, n && n.type === "func" && n.unbalanced < 0 && (n.unbalanced = 0, this.current = n), this.current.unbalanced++, this.newNode(new tl({ value: r[1], source: { start: { line: r[2], column: r[3] }, end: { line: r[4], column: r[5] } }, sourceIndex: r[6] })), this.position++, this.current.type === "func" && this.current.unbalanced && this.current.value === "url" && this.currToken[0] !== "string" && this.currToken[0] !== ")" && !this.options.loose) {
|
|
4651
|
+
let i = this.nextToken, o = this.currToken[1], u = { line: this.currToken[2], column: this.currToken[3] };
|
|
4652
|
+
for (; i && i[0] !== ")" && this.current.unbalanced; ) this.position++, o += this.currToken[1], i = this.nextToken;
|
|
4653
|
+
this.position !== this.tokens.length - 1 && (this.position++, this.newNode(new rl({ value: o, source: { start: u, end: { line: this.currToken[4], column: this.currToken[5] } }, sourceIndex: this.currToken[6] })));
|
|
4654
|
+
}
|
|
4655
|
+
}
|
|
4656
|
+
parenClose() {
|
|
4657
|
+
let e = this.currToken;
|
|
4658
|
+
this.newNode(new tl({ value: e[1], source: { start: { line: e[2], column: e[3] }, end: { line: e[4], column: e[5] } }, sourceIndex: e[6] })), this.position++, !(this.position >= this.tokens.length - 1 && !this.current.unbalanced) && (this.current.unbalanced--, this.current.unbalanced < 0 && this.error("Expected opening parenthesis", e), !this.current.unbalanced && this.cache.length && (this.current = this.cache.pop()));
|
|
4659
|
+
}
|
|
4660
|
+
space() {
|
|
4661
|
+
let e = this.currToken;
|
|
4662
|
+
this.position === this.tokens.length - 1 || this.nextToken[0] === "," || this.nextToken[0] === ")" ? (this.current.last.raws.after += e[1], this.position++) : (this.spaces = e[1], this.position++);
|
|
4663
|
+
}
|
|
4664
|
+
unicodeRange() {
|
|
4665
|
+
let e = this.currToken;
|
|
4666
|
+
this.newNode(new Ty({ value: e[1], source: { start: { line: e[2], column: e[3] }, end: { line: e[4], column: e[5] } }, sourceIndex: e[6] })), this.position++;
|
|
4667
|
+
}
|
|
4668
|
+
splitWord() {
|
|
4669
|
+
let e = this.nextToken, s = this.currToken[1], r = /^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/, n = /^(?!\#([a-z0-9]+))[\#\{\}]/gi, i, o;
|
|
4670
|
+
if (!n.test(s)) for (; e && e[0] === "word"; ) {
|
|
4671
|
+
this.position++;
|
|
4672
|
+
let u = this.currToken[1];
|
|
4673
|
+
s += u, e = this.nextToken;
|
|
4674
|
+
}
|
|
4675
|
+
i = Cy(s, "@"), o = Ry(Ny(Oy([[0], i]))), o.forEach((u, a) => {
|
|
4676
|
+
let l = o[a + 1] || s.length, f = s.slice(u, l), h;
|
|
4677
|
+
if (~i.indexOf(u)) h = new wy({ value: f.slice(1), source: { start: { line: this.currToken[2], column: this.currToken[3] + u }, end: { line: this.currToken[4], column: this.currToken[3] + (l - 1) } }, sourceIndex: this.currToken[6] + o[a] });
|
|
4678
|
+
else if (r.test(this.currToken[1])) {
|
|
4679
|
+
let c = f.replace(r, "");
|
|
4680
|
+
h = new Ey({ value: f.replace(c, ""), source: { start: { line: this.currToken[2], column: this.currToken[3] + u }, end: { line: this.currToken[4], column: this.currToken[3] + (l - 1) } }, sourceIndex: this.currToken[6] + o[a], unit: c });
|
|
4681
|
+
} else h = new (e && e[0] === "(" ? by : rl)({ value: f, source: { start: { line: this.currToken[2], column: this.currToken[3] + u }, end: { line: this.currToken[4], column: this.currToken[3] + (l - 1) } }, sourceIndex: this.currToken[6] + o[a] }), h.type === "word" ? (h.isHex = /^#(.+)/.test(f), h.isColor = /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(f)) : this.cache.push(this.current);
|
|
4682
|
+
this.newNode(h);
|
|
4683
|
+
}), this.position++;
|
|
4684
|
+
}
|
|
4685
|
+
string() {
|
|
4686
|
+
let e = this.currToken, s = this.currToken[1], r = /^(\"|\')/, n = r.test(s), i = "", o;
|
|
4687
|
+
n && (i = s.match(r)[0], s = s.slice(1, s.length - 1)), o = new ky({ value: s, source: { start: { line: e[2], column: e[3] }, end: { line: e[4], column: e[5] } }, sourceIndex: e[6], quoted: n }), o.raws.quote = i, this.newNode(o), this.position++;
|
|
4688
|
+
}
|
|
4689
|
+
word() {
|
|
4690
|
+
return this.splitWord();
|
|
4691
|
+
}
|
|
4692
|
+
newNode(e) {
|
|
4693
|
+
return this.spaces && (e.raws.before += this.spaces, this.spaces = ""), this.current.append(e);
|
|
4694
|
+
}
|
|
4695
|
+
get currToken() {
|
|
4696
|
+
return this.tokens[this.position];
|
|
4697
|
+
}
|
|
4698
|
+
get nextToken() {
|
|
4699
|
+
return this.tokens[this.position + 1];
|
|
4700
|
+
}
|
|
4701
|
+
get prevToken() {
|
|
4702
|
+
return this.tokens[this.position - 1];
|
|
4703
|
+
}
|
|
4704
|
+
};
|
|
4705
|
+
}), _l = {};
|
|
4706
|
+
sn(_l, { languages: () => Si, options: () => Ti, parsers: () => en, printers: () => Hy });
|
|
4707
|
+
bt = (t, e) => (s, r, ...n) => s | 1 && r == null ? void 0 : (e.call(r) ?? r[t]).apply(r, n), Ol = String.prototype.replaceAll ?? function(t, e) {
|
|
4708
|
+
return t.global ? this.replace(t, e) : this.split(t).join(e);
|
|
4709
|
+
}, Cl = bt("replaceAll", function() {
|
|
4710
|
+
if (typeof this == "string") return Ol;
|
|
4711
|
+
}), E = Cl;
|
|
4712
|
+
Pl = bt("at", function() {
|
|
4713
|
+
if (Array.isArray(this) || typeof this == "string") return Nl;
|
|
4714
|
+
}), G = Pl, Rl = () => {
|
|
4715
|
+
}, K = Rl, je = "string", He = "array", Et = "cursor", ie = "indent", Ae = "align", St = "trim", oe = "group", ae = "fill", me = "if-break", kt = "indent-if-break", Oe = "line-suffix", Tt = "line-suffix-boundary", X = "line", At = "label", Ce = "break-parent", Ot = /* @__PURE__ */ new Set([Et, ie, Ae, St, oe, ae, me, kt, Oe, Tt, X, At, Ce]);
|
|
4716
|
+
ue = Il, ql = (t) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(t);
|
|
4717
|
+
zr = class extends Error {
|
|
4718
|
+
name = "InvalidDocError";
|
|
4719
|
+
constructor(e) {
|
|
4720
|
+
super(Ll(e)), this.doc = e;
|
|
4721
|
+
}
|
|
4722
|
+
}, nn = zr;
|
|
4723
|
+
$ = K, ye = K, an = K, un = K;
|
|
4724
|
+
Ne = { type: Ce };
|
|
4725
|
+
C = { type: X }, M = { type: X, soft: !0 }, Ul = { type: X, hard: !0 }, T = [Ul, Ne];
|
|
4726
|
+
ce = $l, cn = Object.freeze({ character: "'", codePoint: 39 }), fn = Object.freeze({ character: '"', codePoint: 34 }), Wl = Object.freeze({ preferred: cn, alternate: fn }), Gl = Object.freeze({ preferred: fn, alternate: cn });
|
|
4727
|
+
pn = Yl, Vl = /\\(["'\\])|(["'])/gu;
|
|
4728
|
+
hn = zl;
|
|
4729
|
+
Nt = jl, jr = class extends Error {
|
|
4730
|
+
name = "UnexpectedNodeError";
|
|
4731
|
+
constructor(e, s, r = "type") {
|
|
4732
|
+
super(`Unexpected ${s} node ${r}: ${JSON.stringify(e[r])}.`), this.node = e;
|
|
4733
|
+
}
|
|
4734
|
+
}, dn = jr, Pt = Symbol.for("PRETTIER_IS_FRONT_MATTER");
|
|
4735
|
+
Re = Hl, Ke = 3;
|
|
4736
|
+
ge = Ql, Xl = /* @__PURE__ */ new Set(["raw", "raws", "sourceIndex", "source", "before", "after", "trailingComma", "spaces"]);
|
|
4737
|
+
mn.ignoredProperties = Xl;
|
|
4738
|
+
yn = mn;
|
|
4739
|
+
gn.getVisitorKeys = (t) => t.type === "css-root" ? ["frontMatter"] : [];
|
|
4740
|
+
wn = gn, Qe = null;
|
|
4741
|
+
Zl = 10;
|
|
4742
|
+
for (let t = 0; t <= Zl; t++) Xe();
|
|
4743
|
+
vn = ec, _ = [[], ["nodes"], ["group"]], xn = { "css-root": ["frontMatter", "nodes"], "css-comment": _[0], "css-rule": ["selector", "nodes"], "css-decl": ["value", "selector", "nodes"], "css-atrule": ["selector", "params", "value", "nodes"], "media-query-list": _[1], "media-query": _[1], "media-type": _[0], "media-feature-expression": _[1], "media-feature": _[0], "media-colon": _[0], "media-value": _[0], "media-keyword": _[0], "media-url": _[0], "media-unknown": _[0], "selector-root": _[1], "selector-selector": _[1], "selector-comment": _[0], "selector-string": _[0], "selector-tag": _[0], "selector-id": _[0], "selector-class": _[0], "selector-attribute": _[0], "selector-combinator": _[1], "selector-universal": _[0], "selector-pseudo": _[1], "selector-nesting": _[0], "selector-unknown": _[0], "value-value": _[2], "value-root": _[2], "value-comment": _[0], "value-comma_group": ["groups"], "value-paren_group": ["open", "groups", "close"], "value-func": _[2], "value-paren": _[0], "value-number": _[0], "value-operator": _[0], "value-word": _[0], "value-colon": _[0], "value-comma": _[0], "value-string": _[0], "value-atword": _[0], "value-unicode-range": _[0], "value-unknown": _[0] }, tc = vn(xn), _n = tc;
|
|
4744
|
+
Kr = rc;
|
|
4745
|
+
Bw = Rt(/\s/u), It = Rt(" "), bn = Rt(",; "), qt = Rt(/[^\n\r]/u);
|
|
4746
|
+
P = (t) => t.source?.startOffset, R = (t) => t.source?.endOffset, nc = /\*\/$/, ic = /^\/\*\*?/, Nn = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/, oc = /(^|\s+)\/\/([^\n\r]*)/g, An = /^(\r?\n)+/, ac = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g, On = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g, uc = /(\r?\n|^) *\* ?/g, Pn = [];
|
|
4747
|
+
Dn = ["noformat", "noprettier"], Mn = ["format", "prettier"], Bn = "format";
|
|
4748
|
+
Un = lc;
|
|
4749
|
+
Gn = (t) => Fn(ge(t).content), Yn = (t) => $n(ge(t).content), Vn = (t) => {
|
|
4750
|
+
let { frontMatter: e, content: s } = ge(t);
|
|
4751
|
+
return (e ? e.raw + `
|
|
4752
|
+
|
|
4753
|
+
` : "") + Wn(s);
|
|
4754
|
+
}, cc = /* @__PURE__ */ new Set(["red", "green", "blue", "alpha", "a", "rgb", "hue", "h", "saturation", "s", "lightness", "l", "whiteness", "w", "blackness", "b", "tint", "shade", "blend", "blenda", "contrast", "hsl", "hsla", "hwb", "hwba"]);
|
|
4755
|
+
fc = /* @__PURE__ */ new Set(["initial", "inherit", "unset", "revert"]);
|
|
4756
|
+
di = hc;
|
|
4757
|
+
mi = dc, Wt = /* @__PURE__ */ new Map([["em", "em"], ["rem", "rem"], ["ex", "ex"], ["rex", "rex"], ["cap", "cap"], ["rcap", "rcap"], ["ch", "ch"], ["rch", "rch"], ["ic", "ic"], ["ric", "ric"], ["lh", "lh"], ["rlh", "rlh"], ["vw", "vw"], ["svw", "svw"], ["lvw", "lvw"], ["dvw", "dvw"], ["vh", "vh"], ["svh", "svh"], ["lvh", "lvh"], ["dvh", "dvh"], ["vi", "vi"], ["svi", "svi"], ["lvi", "lvi"], ["dvi", "dvi"], ["vb", "vb"], ["svb", "svb"], ["lvb", "lvb"], ["dvb", "dvb"], ["vmin", "vmin"], ["svmin", "svmin"], ["lvmin", "lvmin"], ["dvmin", "dvmin"], ["vmax", "vmax"], ["svmax", "svmax"], ["lvmax", "lvmax"], ["dvmax", "dvmax"], ["cm", "cm"], ["mm", "mm"], ["q", "Q"], ["in", "in"], ["pt", "pt"], ["pc", "pc"], ["px", "px"], ["deg", "deg"], ["grad", "grad"], ["rad", "rad"], ["turn", "turn"], ["s", "s"], ["ms", "ms"], ["hz", "Hz"], ["khz", "kHz"], ["dpi", "dpi"], ["dpcm", "dpcm"], ["dppx", "dppx"], ["x", "x"], ["cqw", "cqw"], ["cqh", "cqh"], ["cqi", "cqi"], ["cqb", "cqb"], ["cqmin", "cqmin"], ["cqmax", "cqmax"], ["fr", "fr"]]);
|
|
4758
|
+
yi = /(["'])(?:(?!\1)[^\\]|\\.)*\1/gsu, mc = /(?:\d*\.\d+|\d+\.?)(?:e[+-]?\d+)?/giu, yc = /[a-z]+/giu, gc = /[$@]?[_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/giu, wc = new RegExp(yi.source + `|(${gc.source})?(${mc.source})(${yc.source})?`, "giu");
|
|
4759
|
+
vi = (t) => t === `
|
|
4760
|
+
` || t === "\r" || t === "\u2028" || t === "\u2029";
|
|
4761
|
+
Gt = vc;
|
|
4762
|
+
Yt = xc;
|
|
4763
|
+
xi = _c;
|
|
4764
|
+
_i = bc;
|
|
4765
|
+
Vt = Ec;
|
|
4766
|
+
De = Oc;
|
|
4767
|
+
Nc = { features: { experimental_frontMatterSupport: { massageAstNode: !0, embed: !0, print: !0 } }, print: Cc, embed: wn, insertPragma: Vn, massageAstNode: yn, getVisitorKeys: _n }, Ei = Nc, Si = [{ name: "CSS", type: "markup", aceMode: "css", extensions: [".css", ".wxss"], tmScope: "source.css", codemirrorMode: "css", codemirrorMimeType: "text/css", parsers: ["css"], vscodeLanguageIds: ["css"], linguistLanguageId: 50 }, { name: "PostCSS", type: "markup", aceMode: "text", extensions: [".pcss", ".postcss"], tmScope: "source.postcss", group: "CSS", parsers: ["css"], vscodeLanguageIds: ["postcss"], linguistLanguageId: 262764437 }, { name: "Less", type: "markup", aceMode: "less", extensions: [".less"], tmScope: "source.css.less", aliases: ["less-css"], codemirrorMode: "css", codemirrorMimeType: "text/x-less", parsers: ["less"], vscodeLanguageIds: ["less"], linguistLanguageId: 198 }, { name: "SCSS", type: "markup", aceMode: "scss", extensions: [".scss"], tmScope: "source.css.scss", codemirrorMode: "css", codemirrorMimeType: "text/x-scss", parsers: ["scss"], vscodeLanguageIds: ["scss"], linguistLanguageId: 329 }], ki = { bracketSpacing: { category: "Common", type: "boolean", default: !0, description: "Print spaces between brackets.", oppositeDescription: "Do not print spaces between brackets." }, objectWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap object literals.", choices: [{ value: "preserve", description: "Keep as multi-line, if there is a newline between the opening brace and first property." }, { value: "collapse", description: "Fit to a single line when possible." }] }, singleQuote: { category: "Common", type: "boolean", default: !1, description: "Use single quotes instead of double quotes." }, proseWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap prose.", choices: [{ value: "always", description: "Wrap prose if it exceeds the print width." }, { value: "never", description: "Do not wrap prose." }, { value: "preserve", description: "Wrap prose as-is." }] }, bracketSameLine: { category: "Common", type: "boolean", default: !1, description: "Put > of opening tags on the last line instead of on a new line." }, singleAttributePerLine: { category: "Common", type: "boolean", default: !1, description: "Enforce single attribute per line in HTML, Vue and JSX." } }, Pc = { singleQuote: ki.singleQuote }, Ti = Pc, en = {};
|
|
4768
|
+
sn(en, { css: () => Vy, less: () => zy, scss: () => jy });
|
|
4769
|
+
dl = Te(ht(), 1), ml = Te(qo(), 1), yl = Te(da(), 1);
|
|
4770
|
+
ma = gp;
|
|
4771
|
+
Se = wp, ba = Te(_a(), 1);
|
|
4772
|
+
Np = ba.default.default;
|
|
4773
|
+
Ea = Pp, gu = Te(yu(), 1);
|
|
4774
|
+
se = Vm, cl = Te(nl(), 1), Iy = (t) => {
|
|
4775
|
+
for (; t.parent; ) t = t.parent;
|
|
4776
|
+
return t;
|
|
4777
|
+
}, Gr = Iy;
|
|
4778
|
+
il = qy;
|
|
4779
|
+
ol = Ly;
|
|
4780
|
+
al = Dy;
|
|
4781
|
+
ul = My, ll = (t) => t.type === "paren" && t.value === ")";
|
|
4782
|
+
de = Uy, Fy = /* @__PURE__ */ new Set(["import", "use", "forward"]);
|
|
4783
|
+
pl = $y;
|
|
4784
|
+
hl = Wy, Gy = /(\s*)(!default).*$/u, Yy = /(\s*)(!global).*$/u;
|
|
4785
|
+
Zs = { astFormat: "postcss", hasPragma: Gn, hasIgnorePragma: Yn, locStart: P, locEnd: R }, Vy = { ...Zs, parse: wl }, zy = { ...Zs, parse: vl }, jy = { ...Zs, parse: xl }, Hy = { postcss: Ei };
|
|
4786
|
+
}
|
|
4787
|
+
});
|
|
4788
|
+
init_postcss();
|
|
4789
|
+
export {
|
|
4790
|
+
_l as default,
|
|
4791
|
+
Si as languages,
|
|
4792
|
+
Ti as options,
|
|
4793
|
+
en as parsers,
|
|
4794
|
+
Hy as printers
|
|
4795
|
+
};
|
|
4796
|
+
//# sourceMappingURL=postcss-MSOPGY7M.js.map
|