sigma-ui
Version:
CLI for SIGMA-UI components.
1,277 lines (1,274 loc) • 208 kB
JavaScript
import "./chunk-PZ5AY32C.js";
// ../../node_modules/.pnpm/prettier@3.5.0/node_modules/prettier/plugins/postcss.mjs
var hl = Object.create;
var $r = Object.defineProperty;
var dl = Object.getOwnPropertyDescriptor;
var ml = Object.getOwnPropertyNames;
var yl = Object.getPrototypeOf;
var gl = Object.prototype.hasOwnProperty;
var g = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
var en = (t, e) => {
for (var s in e) $r(t, s, { get: e[s], enumerable: true });
};
var wl = (t, e, s, r) => {
if (e && typeof e == "object" || typeof e == "function") for (let n of ml(e)) !gl.call(t, n) && n !== s && $r(t, n, { get: () => e[n], enumerable: !(r = dl(e, n)) || r.enumerable });
return t;
};
var xe = (t, e, s) => (s = t != null ? hl(yl(t)) : {}, wl(e || !t || !t.__esModule ? $r(s, "default", { value: t, enumerable: true }) : s, t));
var bi = g((xv, ss) => {
var _ = String, xi = function() {
return { isColorSupported: false, reset: _, bold: _, dim: _, italic: _, underline: _, inverse: _, hidden: _, strikethrough: _, black: _, red: _, green: _, yellow: _, blue: _, magenta: _, cyan: _, white: _, gray: _, bgBlack: _, bgRed: _, bgGreen: _, bgYellow: _, bgBlue: _, bgMagenta: _, bgCyan: _, bgWhite: _, blackBright: _, redBright: _, greenBright: _, yellowBright: _, blueBright: _, magentaBright: _, cyanBright: _, whiteBright: _, bgBlackBright: _, bgRedBright: _, bgGreenBright: _, bgYellowBright: _, bgBlueBright: _, bgMagentaBright: _, bgCyanBright: _, bgWhiteBright: _ };
};
ss.exports = xi();
ss.exports.createColors = xi;
});
var ns = g(() => {
});
var Wt = g((Ev, ki) => {
"use strict";
var _i = bi(), Ei = ns(), ot = class t extends Error {
constructor(e, s, r, n, i, o) {
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);
}
setMessage() {
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;
}
showSourceCode(e) {
if (!this.source) return "";
let s = this.source;
e == null && (e = _i.isColorSupported);
let r = (f) => f, n = (f) => f, i = (f) => f;
if (e) {
let { bold: f, gray: p, red: l } = _i.createColors(true);
n = (y) => f(l(y)), r = (y) => p(y), Ei && (i = (y) => Ei(y));
}
let o = s.split(/\r?\n/), u = Math.max(this.line - 3, 0), a = Math.min(this.line + 2, o.length), c = String(a).length;
return o.slice(u, a).map((f, p) => {
let l = u + 1 + p, y = " " + (" " + l).slice(-c) + " | ";
if (l === this.line) {
if (f.length > 160) {
let h = 20, d = Math.max(0, this.column - h), m = Math.max(this.column + h, this.endColumn + h), b = f.slice(d, m), w = r(y.replace(/\d/g, " ")) + f.slice(0, Math.min(this.column - 1, h - 1)).replace(/[^\t]/g, " ");
return n(">") + r(y) + i(b) + `
` + w + n("^");
}
let x = r(y.replace(/\d/g, " ")) + f.slice(0, this.column - 1).replace(/[^\t]/g, " ");
return n(">") + r(y) + i(f) + `
` + x + n("^");
}
return " " + r(y) + i(f);
}).join(`
`);
}
toString() {
let e = this.showSourceCode();
return e && (e = `
` + e + `
`), this.name + ": " + this.message + e;
}
};
ki.exports = ot;
ot.default = ot;
});
var Yt = g((kv, Ti) => {
"use strict";
var Si = { after: `
`, beforeClose: `
`, beforeComment: `
`, beforeDecl: `
`, beforeOpen: " ", beforeRule: `
`, colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
function wc(t) {
return t[0].toUpperCase() + t.slice(1);
}
var at = class {
constructor(e) {
this.builder = e;
}
atrule(e, s) {
let r = "@" + e.name, n = e.params ? this.rawValue(e, "params") : "";
if (typeof e.raws.afterName < "u" ? r += e.raws.afterName : n && (r += " "), e.nodes) this.block(e, r + n);
else {
let i = (e.raws.between || "") + (s ? ";" : "");
this.builder(r + n + i, e);
}
}
beforeAfter(e, s) {
let r;
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");
let n = e.parent, i = 0;
for (; n && n.type !== "root"; ) i += 1, n = n.parent;
if (r.includes(`
`)) {
let o = this.raw(e, null, "indent");
if (o.length) for (let u = 0; u < i; u++) r += o;
}
return r;
}
block(e, s) {
let r = this.raw(e, "between", "beforeOpen");
this.builder(s + r + "{", e, "start");
let n;
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");
}
body(e) {
let s = e.nodes.length - 1;
for (; s > 0 && e.nodes[s].type === "comment"; ) s -= 1;
let r = this.raw(e, "semicolon");
for (let n = 0; n < e.nodes.length; n++) {
let i = e.nodes[n], o = this.raw(i, "before");
o && this.builder(o), this.stringify(i, s !== n || r);
}
}
comment(e) {
let s = this.raw(e, "left", "commentLeft"), r = this.raw(e, "right", "commentRight");
this.builder("/*" + s + e.text + r + "*/", e);
}
decl(e, s) {
let r = this.raw(e, "between", "colon"), n = e.prop + r + this.rawValue(e, "value");
e.important && (n += e.raws.important || " !important"), s && (n += ";"), this.builder(n, e);
}
document(e) {
this.body(e);
}
raw(e, s, r) {
let n;
if (r || (r = s), s && (n = e.raws[s], typeof n < "u")) return n;
let i = e.parent;
if (r === "before" && (!i || i.type === "root" && i.first === e || i && i.type === "document")) return "";
if (!i) return Si[r];
let o = e.root();
if (o.rawCache || (o.rawCache = {}), typeof o.rawCache[r] < "u") return o.rawCache[r];
if (r === "before" || r === "after") return this.beforeAfter(e, r);
{
let u = "raw" + wc(r);
this[u] ? n = this[u](o, e) : o.walk((a) => {
if (n = a.raws[s], typeof n < "u") return false;
});
}
return typeof n > "u" && (n = Si[r]), o.rawCache[r] = n, n;
}
rawBeforeClose(e) {
let s;
return e.walk((r) => {
if (r.nodes && r.nodes.length > 0 && typeof r.raws.after < "u") return s = r.raws.after, s.includes(`
`) && (s = s.replace(/[^\n]+$/, "")), false;
}), s && (s = s.replace(/\S/g, "")), s;
}
rawBeforeComment(e, s) {
let r;
return e.walkComments((n) => {
if (typeof n.raws.before < "u") return r = n.raws.before, r.includes(`
`) && (r = r.replace(/[^\n]+$/, "")), false;
}), typeof r > "u" ? r = this.raw(s, null, "beforeDecl") : r && (r = r.replace(/\S/g, "")), r;
}
rawBeforeDecl(e, s) {
let r;
return e.walkDecls((n) => {
if (typeof n.raws.before < "u") return r = n.raws.before, r.includes(`
`) && (r = r.replace(/[^\n]+$/, "")), false;
}), typeof r > "u" ? r = this.raw(s, null, "beforeRule") : r && (r = r.replace(/\S/g, "")), r;
}
rawBeforeOpen(e) {
let s;
return e.walk((r) => {
if (r.type !== "decl" && (s = r.raws.between, typeof s < "u")) return false;
}), s;
}
rawBeforeRule(e) {
let s;
return e.walk((r) => {
if (r.nodes && (r.parent !== e || e.first !== r) && typeof r.raws.before < "u") return s = r.raws.before, s.includes(`
`) && (s = s.replace(/[^\n]+$/, "")), false;
}), s && (s = s.replace(/\S/g, "")), s;
}
rawColon(e) {
let s;
return e.walkDecls((r) => {
if (typeof r.raws.between < "u") return s = r.raws.between.replace(/[^\s:]/g, ""), false;
}), s;
}
rawEmptyBody(e) {
let s;
return e.walk((r) => {
if (r.nodes && r.nodes.length === 0 && (s = r.raws.after, typeof s < "u")) return false;
}), s;
}
rawIndent(e) {
if (e.raws.indent) return e.raws.indent;
let s;
return e.walk((r) => {
let n = r.parent;
if (n && n !== e && n.parent && n.parent === e && typeof r.raws.before < "u") {
let i = r.raws.before.split(`
`);
return s = i[i.length - 1], s = s.replace(/\S/g, ""), false;
}
}), s;
}
rawSemicolon(e) {
let s;
return e.walk((r) => {
if (r.nodes && r.nodes.length && r.last.type === "decl" && (s = r.raws.semicolon, typeof s < "u")) return false;
}), s;
}
rawValue(e, s) {
let r = e[s], n = e.raws[s];
return n && n.value === r ? n.raw : r;
}
root(e) {
this.body(e), e.raws.after && this.builder(e.raws.after);
}
rule(e) {
this.block(e, this.rawValue(e, "selector")), e.raws.ownSemicolon && this.builder(e.raws.ownSemicolon, e, "end");
}
stringify(e, s) {
if (!this[e.type]) throw new Error("Unknown AST node type " + e.type + ". Maybe you need to change PostCSS stringifier.");
this[e.type](e, s);
}
};
Ti.exports = at;
at.default = at;
});
var ut = g((Sv, Ci) => {
"use strict";
var vc = Yt();
function is(t, e) {
new vc(e).stringify(t);
}
Ci.exports = is;
is.default = is;
});
var Vt = g((Tv, os) => {
"use strict";
os.exports.isClean = Symbol("isClean");
os.exports.my = Symbol("my");
});
var pt = g((Cv, Oi) => {
"use strict";
var xc = Wt(), bc = Yt(), _c = ut(), { isClean: lt, my: Ec } = Vt();
function as(t, e) {
let s = new t.constructor();
for (let r in t) {
if (!Object.prototype.hasOwnProperty.call(t, r) || r === "proxyCache") continue;
let n = t[r], i = typeof n;
r === "parent" && i === "object" ? e && (s[r] = e) : r === "source" ? s[r] = n : Array.isArray(n) ? s[r] = n.map((o) => as(o, s)) : (i === "object" && n !== null && (n = as(n)), s[r] = n);
}
return s;
}
function ct(t, e) {
if (e && typeof e.offset < "u") return e.offset;
let s = 1, r = 1, n = 0;
for (let i = 0; i < t.length; i++) {
if (r === e.line && s === e.column) {
n = i;
break;
}
t[i] === `
` ? (s = 1, r += 1) : s += 1;
}
return n;
}
var ft = class {
constructor(e = {}) {
this.raws = {}, this[lt] = false, this[Ec] = true;
for (let s in e) if (s === "nodes") {
this.nodes = [];
for (let r of e[s]) typeof r.clone == "function" ? this.append(r.clone()) : this.append(r);
} else this[s] = e[s];
}
addToError(e) {
if (e.postcssNode = this, e.stack && this.source && /\n\s{4}at /.test(e.stack)) {
let s = this.source;
e.stack = e.stack.replace(/\n\s{4}at /, `$&${s.input.from}:${s.start.line}:${s.start.column}$&`);
}
return e;
}
after(e) {
return this.parent.insertAfter(this, e), this;
}
assign(e = {}) {
for (let s in e) this[s] = e[s];
return this;
}
before(e) {
return this.parent.insertBefore(this, e), this;
}
cleanRaws(e) {
delete this.raws.before, delete this.raws.after, e || delete this.raws.between;
}
clone(e = {}) {
let s = as(this);
for (let r in e) s[r] = e[r];
return s;
}
cloneAfter(e = {}) {
let s = this.clone(e);
return this.parent.insertAfter(this, s), s;
}
cloneBefore(e = {}) {
let s = this.clone(e);
return this.parent.insertBefore(this, s), s;
}
error(e, s = {}) {
if (this.source) {
let { end: r, start: n } = this.rangeBy(s);
return this.source.input.error(e, { column: n.column, line: n.line }, { column: r.column, line: r.line }, s);
}
return new xc(e);
}
getProxyProcessor() {
return { get(e, s) {
return s === "proxyOf" ? e : s === "root" ? () => e.root().toProxy() : e[s];
}, set(e, s, r) {
return e[s] === r || (e[s] = r, (s === "prop" || s === "value" || s === "name" || s === "params" || s === "important" || s === "text") && e.markDirty()), true;
} };
}
markClean() {
this[lt] = true;
}
markDirty() {
if (this[lt]) {
this[lt] = false;
let e = this;
for (; e = e.parent; ) e[lt] = false;
}
}
next() {
if (!this.parent) return;
let e = this.parent.index(this);
return this.parent.nodes[e + 1];
}
positionBy(e) {
let s = this.source.start;
if (e.index) s = this.positionInside(e.index);
else if (e.word) {
let r = "document" in this.source.input ? this.source.input.document : this.source.input.css, i = r.slice(ct(r, this.source.start), ct(r, this.source.end)).indexOf(e.word);
i !== -1 && (s = this.positionInside(i));
}
return s;
}
positionInside(e) {
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 = ct(n, this.source.start), o = i + e;
for (let u = i; u < o; u++) n[u] === `
` ? (s = 1, r += 1) : s += 1;
return { column: s, line: r };
}
prev() {
if (!this.parent) return;
let e = this.parent.index(this);
return this.parent.nodes[e - 1];
}
rangeBy(e) {
let s = { column: this.source.start.column, line: this.source.start.line }, r = this.source.end ? { column: this.source.end.column + 1, line: this.source.end.line } : { column: s.column + 1, line: s.line };
if (e.word) {
let n = "document" in this.source.input ? this.source.input.document : this.source.input.css, o = n.slice(ct(n, this.source.start), ct(n, this.source.end)).indexOf(e.word);
o !== -1 && (s = this.positionInside(o), r = this.positionInside(o + e.word.length));
} else e.start ? s = { column: e.start.column, line: e.start.line } : e.index && (s = this.positionInside(e.index)), e.end ? r = { column: e.end.column, line: e.end.line } : typeof e.endIndex == "number" ? r = this.positionInside(e.endIndex) : e.index && (r = this.positionInside(e.index + 1));
return (r.line < s.line || r.line === s.line && r.column <= s.column) && (r = { column: s.column + 1, line: s.line }), { end: r, start: s };
}
raw(e, s) {
return new bc().raw(this, e, s);
}
remove() {
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
}
replaceWith(...e) {
if (this.parent) {
let s = this, r = false;
for (let n of e) n === this ? r = true : r ? (this.parent.insertAfter(s, n), s = n) : this.parent.insertBefore(s, n);
r || this.remove();
}
return this;
}
root() {
let e = this;
for (; e.parent && e.parent.type !== "document"; ) e = e.parent;
return e;
}
toJSON(e, s) {
let r = {}, n = s == null;
s = s || /* @__PURE__ */ new Map();
let i = 0;
for (let o in this) {
if (!Object.prototype.hasOwnProperty.call(this, o) || o === "parent" || o === "proxyCache") continue;
let u = this[o];
if (Array.isArray(u)) r[o] = u.map((a) => typeof a == "object" && a.toJSON ? a.toJSON(null, s) : a);
else if (typeof u == "object" && u.toJSON) r[o] = u.toJSON(null, s);
else if (o === "source") {
let a = s.get(u.input);
a == null && (a = i, s.set(u.input, i), i++), r[o] = { end: u.end, inputId: a, start: u.start };
} else r[o] = u;
}
return n && (r.inputs = [...s.keys()].map((o) => o.toJSON())), r;
}
toProxy() {
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
}
toString(e = _c) {
e.stringify && (e = e.stringify);
let s = "";
return e(this, (r) => {
s += r;
}), s;
}
warn(e, s, r) {
let n = { node: this };
for (let i in r) n[i] = r[i];
return e.warn(s, n);
}
get proxyOf() {
return this;
}
};
Oi.exports = ft;
ft.default = ft;
});
var Re = g((Ov, Ai) => {
"use strict";
var kc = pt(), ht = class extends kc {
constructor(e) {
super(e), this.type = "comment";
}
};
Ai.exports = ht;
ht.default = ht;
});
var mt = g((Av, Ni) => {
"use strict";
var Sc = pt(), dt = class extends Sc {
constructor(e) {
e && typeof e.value < "u" && typeof e.value != "string" && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
}
get variable() {
return this.prop.startsWith("--") || this.prop[0] === "$";
}
};
Ni.exports = dt;
dt.default = dt;
});
var le = g((Nv, Ui) => {
"use strict";
var Pi = Re(), Ri = mt(), Tc = pt(), { isClean: Ii, my: qi } = Vt(), us, Li, Di, ls;
function Bi(t) {
return t.map((e) => (e.nodes && (e.nodes = Bi(e.nodes)), delete e.source, e));
}
function Mi(t) {
if (t[Ii] = false, t.proxyOf.nodes) for (let e of t.proxyOf.nodes) Mi(e);
}
var z = class t extends Tc {
append(...e) {
for (let s of e) {
let r = this.normalize(s, this.last);
for (let n of r) this.proxyOf.nodes.push(n);
}
return this.markDirty(), this;
}
cleanRaws(e) {
if (super.cleanRaws(e), this.nodes) for (let s of this.nodes) s.cleanRaws(e);
}
each(e) {
if (!this.proxyOf.nodes) return;
let s = this.getIterator(), r, n;
for (; this.indexes[s] < this.proxyOf.nodes.length && (r = this.indexes[s], n = e(this.proxyOf.nodes[r], r), n !== false); ) this.indexes[s] += 1;
return delete this.indexes[s], n;
}
every(e) {
return this.nodes.every(e);
}
getIterator() {
this.lastEach || (this.lastEach = 0), this.indexes || (this.indexes = {}), this.lastEach += 1;
let e = this.lastEach;
return this.indexes[e] = 0, e;
}
getProxyProcessor() {
return { get(e, s) {
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];
}, set(e, s, r) {
return e[s] === r || (e[s] = r, (s === "name" || s === "params" || s === "selector") && e.markDirty()), true;
} };
}
index(e) {
return typeof e == "number" ? e : (e.proxyOf && (e = e.proxyOf), this.proxyOf.nodes.indexOf(e));
}
insertAfter(e, s) {
let r = this.index(e), n = this.normalize(s, this.proxyOf.nodes[r]).reverse();
r = this.index(e);
for (let o of n) this.proxyOf.nodes.splice(r + 1, 0, o);
let i;
for (let o in this.indexes) i = this.indexes[o], r < i && (this.indexes[o] = i + n.length);
return this.markDirty(), this;
}
insertBefore(e, s) {
let r = this.index(e), n = r === 0 ? "prepend" : false, i = this.normalize(s, this.proxyOf.nodes[r], n).reverse();
r = this.index(e);
for (let u of i) this.proxyOf.nodes.splice(r, 0, u);
let o;
for (let u in this.indexes) o = this.indexes[u], r <= o && (this.indexes[u] = o + i.length);
return this.markDirty(), this;
}
normalize(e, s) {
if (typeof e == "string") e = Bi(Li(e).nodes);
else if (typeof e > "u") e = [];
else if (Array.isArray(e)) {
e = e.slice(0);
for (let n of e) n.parent && n.parent.removeChild(n, "ignore");
} else if (e.type === "root" && this.type !== "document") {
e = e.nodes.slice(0);
for (let n of e) n.parent && n.parent.removeChild(n, "ignore");
} else if (e.type) e = [e];
else if (e.prop) {
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
typeof e.value != "string" && (e.value = String(e.value)), e = [new Ri(e)];
} else if (e.selector || e.selectors) e = [new ls(e)];
else if (e.name) e = [new us(e)];
else if (e.text) e = [new Pi(e)];
else throw new Error("Unknown node type in node creation");
return e.map((n) => (n[qi] || t.rebuild(n), n = n.proxyOf, n.parent && n.parent.removeChild(n), n[Ii] && Mi(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));
}
prepend(...e) {
e = e.reverse();
for (let s of e) {
let r = this.normalize(s, this.first, "prepend").reverse();
for (let n of r) this.proxyOf.nodes.unshift(n);
for (let n in this.indexes) this.indexes[n] = this.indexes[n] + r.length;
}
return this.markDirty(), this;
}
push(e) {
return e.parent = this, this.proxyOf.nodes.push(e), this;
}
removeAll() {
for (let e of this.proxyOf.nodes) e.parent = void 0;
return this.proxyOf.nodes = [], this.markDirty(), this;
}
removeChild(e) {
e = this.index(e), this.proxyOf.nodes[e].parent = void 0, this.proxyOf.nodes.splice(e, 1);
let s;
for (let r in this.indexes) s = this.indexes[r], s >= e && (this.indexes[r] = s - 1);
return this.markDirty(), this;
}
replaceValues(e, s, r) {
return r || (r = s, s = {}), this.walkDecls((n) => {
s.props && !s.props.includes(n.prop) || s.fast && !n.value.includes(s.fast) || (n.value = n.value.replace(e, r));
}), this.markDirty(), this;
}
some(e) {
return this.nodes.some(e);
}
walk(e) {
return this.each((s, r) => {
let n;
try {
n = e(s, r);
} catch (i) {
throw s.addToError(i);
}
return n !== false && s.walk && (n = s.walk(e)), n;
});
}
walkAtRules(e, s) {
return s ? e instanceof RegExp ? this.walk((r, n) => {
if (r.type === "atrule" && e.test(r.name)) return s(r, n);
}) : this.walk((r, n) => {
if (r.type === "atrule" && r.name === e) return s(r, n);
}) : (s = e, this.walk((r, n) => {
if (r.type === "atrule") return s(r, n);
}));
}
walkComments(e) {
return this.walk((s, r) => {
if (s.type === "comment") return e(s, r);
});
}
walkDecls(e, s) {
return s ? e instanceof RegExp ? this.walk((r, n) => {
if (r.type === "decl" && e.test(r.prop)) return s(r, n);
}) : this.walk((r, n) => {
if (r.type === "decl" && r.prop === e) return s(r, n);
}) : (s = e, this.walk((r, n) => {
if (r.type === "decl") return s(r, n);
}));
}
walkRules(e, s) {
return s ? e instanceof RegExp ? this.walk((r, n) => {
if (r.type === "rule" && e.test(r.selector)) return s(r, n);
}) : this.walk((r, n) => {
if (r.type === "rule" && r.selector === e) return s(r, n);
}) : (s = e, this.walk((r, n) => {
if (r.type === "rule") return s(r, n);
}));
}
get first() {
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
}
get last() {
if (this.proxyOf.nodes) return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
}
};
z.registerParse = (t) => {
Li = t;
};
z.registerRule = (t) => {
ls = t;
};
z.registerAtRule = (t) => {
us = t;
};
z.registerRoot = (t) => {
Di = t;
};
Ui.exports = z;
z.default = z;
z.rebuild = (t) => {
t.type === "atrule" ? Object.setPrototypeOf(t, us.prototype) : t.type === "rule" ? Object.setPrototypeOf(t, ls.prototype) : t.type === "decl" ? Object.setPrototypeOf(t, Ri.prototype) : t.type === "comment" ? Object.setPrototypeOf(t, Pi.prototype) : t.type === "root" && Object.setPrototypeOf(t, Di.prototype), t[qi] = true, t.nodes && t.nodes.forEach((e) => {
z.rebuild(e);
});
};
});
var $i = g((Pv, Fi) => {
var Cc = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Oc = (t, e = 21) => (s = e) => {
let r = "", n = s | 0;
for (; n--; ) r += t[Math.random() * t.length | 0];
return r;
}, Ac = (t = 21) => {
let e = "", s = t | 0;
for (; s--; ) e += Cc[Math.random() * 64 | 0];
return e;
};
Fi.exports = { nanoid: Ac, customAlphabet: Oc };
});
var Wi = g(() => {
});
var cs = g((qv, Yi) => {
Yi.exports = class {
};
});
var qe = g((Dv, ji) => {
"use strict";
var { nanoid: Nc } = $i(), { isAbsolute: hs, resolve: ds } = {}, { SourceMapConsumer: Pc, SourceMapGenerator: Rc } = Wi(), { fileURLToPath: Vi, pathToFileURL: zt } = {}, zi = Wt(), Ic = cs(), fs = ns(), ps = Symbol("fromOffsetCache"), qc = !!(Pc && Rc), Gi = !!(ds && hs), Ie = class {
constructor(e, s = {}) {
if (e === null || typeof e > "u" || typeof e == "object" && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
if (this.css = e.toString(), this.css[0] === "\uFEFF" || this.css[0] === "\uFFFE" ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, s.document && (this.document = s.document.toString()), s.from && (!Gi || /^\w+:\/\//.test(s.from) || hs(s.from) ? this.file = s.from : this.file = ds(s.from)), Gi && qc) {
let r = new Ic(this.css, s);
if (r.text) {
this.map = r;
let n = r.consumer().file;
!this.file && n && (this.file = this.mapResolve(n));
}
}
this.file || (this.id = "<input css " + Nc(6) + ">"), this.map && (this.map.file = this.from);
}
error(e, s, r, n = {}) {
let i, o, u;
if (s && typeof s == "object") {
let c = s, f = r;
if (typeof c.offset == "number") {
let p = this.fromOffset(c.offset);
s = p.line, r = p.col;
} else s = c.line, r = c.column;
if (typeof f.offset == "number") {
let p = this.fromOffset(f.offset);
o = p.line, i = p.col;
} else o = f.line, i = f.column;
} else if (!r) {
let c = this.fromOffset(s);
s = c.line, r = c.col;
}
let a = this.origin(s, r, o, i);
return a ? u = new zi(e, a.endLine === void 0 ? a.line : { column: a.column, line: a.line }, a.endLine === void 0 ? a.column : { column: a.endColumn, line: a.endLine }, a.source, a.file, n.plugin) : u = new zi(e, o === void 0 ? s : { column: r, line: s }, o === void 0 ? r : { column: i, line: o }, this.css, this.file, n.plugin), u.input = { column: r, endColumn: i, endLine: o, line: s, source: this.css }, this.file && (zt && (u.input.url = zt(this.file).toString()), u.input.file = this.file), u;
}
fromOffset(e) {
let s, r;
if (this[ps]) r = this[ps];
else {
let i = this.css.split(`
`);
r = new Array(i.length);
let o = 0;
for (let u = 0, a = i.length; u < a; u++) r[u] = o, o += i[u].length + 1;
this[ps] = r;
}
s = r[r.length - 1];
let n = 0;
if (e >= s) n = r.length - 1;
else {
let i = r.length - 2, o;
for (; n < i; ) if (o = n + (i - n >> 1), e < r[o]) i = o - 1;
else if (e >= r[o + 1]) n = o + 1;
else {
n = o;
break;
}
}
return { col: e - r[n] + 1, line: n + 1 };
}
mapResolve(e) {
return /^\w+:\/\//.test(e) ? e : ds(this.map.consumer().sourceRoot || this.map.root || ".", e);
}
origin(e, s, r, n) {
if (!this.map) return false;
let i = this.map.consumer(), o = i.originalPositionFor({ column: s, line: e });
if (!o.source) return false;
let u;
typeof r == "number" && (u = i.originalPositionFor({ column: n, line: r }));
let a;
hs(o.source) ? a = zt(o.source) : a = new URL(o.source, this.map.consumer().sourceRoot || zt(this.map.mapFile));
let c = { column: o.column, endColumn: u && u.column, endLine: u && u.line, line: o.line, url: a.toString() };
if (a.protocol === "file:") if (Vi) c.file = Vi(a);
else throw new Error("file: protocol is not available in this PostCSS build");
let f = i.sourceContentFor(o.source);
return f && (c.source = f), c;
}
toJSON() {
let e = {};
for (let s of ["hasBOM", "css", "file", "id"]) this[s] != null && (e[s] = this[s]);
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
}
get from() {
return this.file || this.id;
}
};
ji.exports = Ie;
Ie.default = Ie;
fs && fs.registerInput && fs.registerInput(Ie);
});
var Gt = g((Bv, Ki) => {
"use strict";
var Hi = le(), Le = class extends Hi {
constructor(e) {
super(e), this.type = "atrule";
}
append(...e) {
return this.proxyOf.nodes || (this.nodes = []), super.append(...e);
}
prepend(...e) {
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
}
};
Ki.exports = Le;
Le.default = Le;
Hi.registerAtRule(Le);
});
var De = g((Mv, Zi) => {
"use strict";
var Qi = le(), Ji, Xi, ce = class extends Qi {
constructor(e) {
super(e), this.type = "root", this.nodes || (this.nodes = []);
}
normalize(e, s, r) {
let n = super.normalize(e);
if (s) {
if (r === "prepend") this.nodes.length > 1 ? s.raws.before = this.nodes[1].raws.before : delete s.raws.before;
else if (this.first !== s) for (let i of n) i.raws.before = s.raws.before;
}
return n;
}
removeChild(e, s) {
let r = this.index(e);
return !s && r === 0 && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[r].raws.before), super.removeChild(e);
}
toResult(e = {}) {
return new Ji(new Xi(), this, e).stringify();
}
};
ce.registerLazyResult = (t) => {
Ji = t;
};
ce.registerProcessor = (t) => {
Xi = t;
};
Zi.exports = ce;
ce.default = ce;
Qi.registerRoot(ce);
});
var ms = g((Uv, eo) => {
"use strict";
var yt = { comma(t) {
return yt.split(t, [","], true);
}, space(t) {
let e = [" ", `
`, " "];
return yt.split(t, e);
}, split(t, e, s) {
let r = [], n = "", i = false, o = 0, u = false, a = "", c = false;
for (let f of t) c ? c = false : f === "\\" ? c = true : u ? f === a && (u = false) : f === '"' || f === "'" ? (u = true, a = f) : f === "(" ? o += 1 : f === ")" ? o > 0 && (o -= 1) : o === 0 && e.includes(f) && (i = true), i ? (n !== "" && r.push(n.trim()), n = "", i = false) : n += f;
return (s || n !== "") && r.push(n.trim()), r;
} };
eo.exports = yt;
yt.default = yt;
});
var jt = g((Fv, ro) => {
"use strict";
var to = le(), Lc = ms(), Be = class extends to {
constructor(e) {
super(e), this.type = "rule", this.nodes || (this.nodes = []);
}
get selectors() {
return Lc.comma(this.selector);
}
set selectors(e) {
let s = this.selector ? this.selector.match(/,\s*/) : null, r = s ? s[0] : "," + this.raw("between", "beforeOpen");
this.selector = e.join(r);
}
};
ro.exports = Be;
Be.default = Be;
to.registerRule(Be);
});
var Qt = g(($v, no) => {
"use strict";
var Ht = /[\t\n\f\r "#'()/;[\\\]{}]/g, Kt = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, Dc = /.[\r\n"'(/\\]/, so = /[\da-f]/i;
no.exports = function(e, s = {}) {
let r = e.css.valueOf(), n = s.ignoreErrors, i, o, u, a, c, f, p, l, y, x, h = r.length, d = 0, m = [], b = [];
function w() {
return d;
}
function v(W) {
throw e.error("Unclosed " + W, d);
}
function N() {
return b.length === 0 && d >= h;
}
function F(W) {
if (b.length) return b.pop();
if (d >= h) return;
let T = W ? W.ignoreUnclosed : false;
switch (i = r.charCodeAt(d), i) {
case 10:
case 32:
case 9:
case 13:
case 12: {
a = d;
do
a += 1, i = r.charCodeAt(a);
while (i === 32 || i === 10 || i === 9 || i === 13 || i === 12);
f = ["space", r.slice(d, a)], d = a - 1;
break;
}
case 91:
case 93:
case 123:
case 125:
case 58:
case 59:
case 41: {
let C = String.fromCharCode(i);
f = [C, C, d];
break;
}
case 40: {
if (x = m.length ? m.pop()[1] : "", y = r.charCodeAt(d + 1), x === "url" && y !== 39 && y !== 34 && y !== 32 && y !== 10 && y !== 9 && y !== 12 && y !== 13) {
a = d;
do {
if (p = false, a = r.indexOf(")", a + 1), a === -1) if (n || T) {
a = d;
break;
} else v("bracket");
for (l = a; r.charCodeAt(l - 1) === 92; ) l -= 1, p = !p;
} while (p);
f = ["brackets", r.slice(d, a + 1), d, a], d = a;
} else a = r.indexOf(")", d + 1), o = r.slice(d, a + 1), a === -1 || Dc.test(o) ? f = ["(", "(", d] : (f = ["brackets", o, d, a], d = a);
break;
}
case 39:
case 34: {
c = i === 39 ? "'" : '"', a = d;
do {
if (p = false, a = r.indexOf(c, a + 1), a === -1) if (n || T) {
a = d + 1;
break;
} else v("string");
for (l = a; r.charCodeAt(l - 1) === 92; ) l -= 1, p = !p;
} while (p);
f = ["string", r.slice(d, a + 1), d, a], d = a;
break;
}
case 64: {
Ht.lastIndex = d + 1, Ht.test(r), Ht.lastIndex === 0 ? a = r.length - 1 : a = Ht.lastIndex - 2, f = ["at-word", r.slice(d, a + 1), d, a], d = a;
break;
}
case 92: {
for (a = d, u = true; r.charCodeAt(a + 1) === 92; ) a += 1, u = !u;
if (i = r.charCodeAt(a + 1), u && i !== 47 && i !== 32 && i !== 10 && i !== 9 && i !== 13 && i !== 12 && (a += 1, so.test(r.charAt(a)))) {
for (; so.test(r.charAt(a + 1)); ) a += 1;
r.charCodeAt(a + 1) === 32 && (a += 1);
}
f = ["word", r.slice(d, a + 1), d, a], d = a;
break;
}
default: {
i === 47 && r.charCodeAt(d + 1) === 42 ? (a = r.indexOf("*/", d + 2) + 1, a === 0 && (n || T ? a = r.length : v("comment")), f = ["comment", r.slice(d, a + 1), d, a], d = a) : (Kt.lastIndex = d + 1, Kt.test(r), Kt.lastIndex === 0 ? a = r.length - 1 : a = Kt.lastIndex - 2, f = ["word", r.slice(d, a + 1), d, a], m.push(f), d = a);
break;
}
}
return d++, f;
}
function Q(W) {
b.push(W);
}
return { back: Q, endOfFile: N, nextToken: F, position: w };
};
});
var Jt = g((Wv, ao) => {
"use strict";
var Bc = Gt(), Mc = Re(), Uc = mt(), Fc = De(), io = jt(), $c = Qt(), oo = { empty: true, space: true };
function Wc(t) {
for (let e = t.length - 1; e >= 0; e--) {
let s = t[e], r = s[3] || s[2];
if (r) return r;
}
}
var ys = class {
constructor(e) {
this.input = e, this.root = new Fc(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
}
atrule(e) {
let s = new Bc();
s.name = e[1].slice(1), s.name === "" && this.unnamedAtrule(s, e), this.init(s, e[2]);
let r, n, i, o = false, u = false, a = [], c = [];
for (; !this.tokenizer.endOfFile(); ) {
if (e = this.tokenizer.nextToken(), r = e[0], r === "(" || r === "[" ? c.push(r === "(" ? ")" : "]") : r === "{" && c.length > 0 ? c.push("}") : r === c[c.length - 1] && c.pop(), c.length === 0) if (r === ";") {
s.source.end = this.getPosition(e[2]), s.source.end.offset++, this.semicolon = true;
break;
} else if (r === "{") {
u = true;
break;
} else if (r === "}") {
if (a.length > 0) {
for (i = a.length - 1, n = a[i]; n && n[0] === "space"; ) n = a[--i];
n && (s.source.end = this.getPosition(n[3] || n[2]), s.source.end.offset++);
}
this.end(e);
break;
} else a.push(e);
else a.push(e);
if (this.tokenizer.endOfFile()) {
o = true;
break;
}
}
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);
}
checkMissedSemicolon(e) {
let s = this.colon(e);
if (s === false) return;
let r = 0, n;
for (let i = s - 1; i >= 0 && (n = e[i], !(n[0] !== "space" && (r += 1, r === 2))); i--) ;
throw this.input.error("Missed semicolon", n[0] === "word" ? n[3] + 1 : n[2]);
}
colon(e) {
let s = 0, r, n, i;
for (let [o, u] of e.entries()) {
if (n = u, i = n[0], i === "(" && (s += 1), i === ")" && (s -= 1), s === 0 && i === ":") if (!r) this.doubleColon(n);
else {
if (r[0] === "word" && r[1] === "progid") continue;
return o;
}
r = n;
}
return false;
}
comment(e) {
let s = new Mc();
this.init(s, e[2]), s.source.end = this.getPosition(e[3] || e[2]), s.source.end.offset++;
let r = e[1].slice(2, -2);
if (/^\s*$/.test(r)) s.text = "", s.raws.left = r, s.raws.right = "";
else {
let n = r.match(/^(\s*)([^]*\S)(\s*)$/);
s.text = n[2], s.raws.left = n[1], s.raws.right = n[3];
}
}
createTokenizer() {
this.tokenizer = $c(this.input);
}
decl(e, s) {
let r = new Uc();
this.init(r, e[0][2]);
let n = e[e.length - 1];
for (n[0] === ";" && (this.semicolon = true, e.pop()), r.source.end = this.getPosition(n[3] || n[2] || Wc(e)), r.source.end.offset++; e[0][0] !== "word"; ) e.length === 1 && this.unknownWord(e), r.raws.before += e.shift()[1];
for (r.source.start = this.getPosition(e[0][2]), r.prop = ""; e.length; ) {
let c = e[0][0];
if (c === ":" || c === "space" || c === "comment") break;
r.prop += e.shift()[1];
}
r.raws.between = "";
let i;
for (; e.length; ) if (i = e.shift(), i[0] === ":") {
r.raws.between += i[1];
break;
} else i[0] === "word" && /\w/.test(i[1]) && this.unknownWord([i]), r.raws.between += i[1];
(r.prop[0] === "_" || r.prop[0] === "*") && (r.raws.before += r.prop[0], r.prop = r.prop.slice(1));
let o = [], u;
for (; e.length && (u = e[0][0], !(u !== "space" && u !== "comment")); ) o.push(e.shift());
this.precheckMissedSemicolon(e);
for (let c = e.length - 1; c >= 0; c--) {
if (i = e[c], i[1].toLowerCase() === "!important") {
r.important = true;
let f = this.stringFrom(e, c);
f = this.spacesFromEnd(e) + f, f !== " !important" && (r.raws.important = f);
break;
} else if (i[1].toLowerCase() === "important") {
let f = e.slice(0), p = "";
for (let l = c; l > 0; l--) {
let y = f[l][0];
if (p.trim().startsWith("!") && y !== "space") break;
p = f.pop()[1] + p;
}
p.trim().startsWith("!") && (r.important = true, r.raws.important = p, e = f);
}
if (i[0] !== "space" && i[0] !== "comment") break;
}
e.some((c) => c[0] !== "space" && c[0] !== "comment") && (r.raws.between += o.map((c) => c[1]).join(""), o = []), this.raw(r, "value", o.concat(e), s), r.value.includes(":") && !s && this.checkMissedSemicolon(e);
}
doubleColon(e) {
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
}
emptyRule(e) {
let s = new io();
this.init(s, e[2]), s.selector = "", s.raws.between = "", this.current = s;
}
end(e) {
this.current.nodes && this.current.nodes.length && (this.current.raws.semicolon = this.semicolon), this.semicolon = false, 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);
}
endFile() {
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());
}
freeSemicolon(e) {
if (this.spaces += e[1], this.current.nodes) {
let s = this.current.nodes[this.current.nodes.length - 1];
s && s.type === "rule" && !s.raws.ownSemicolon && (s.raws.ownSemicolon = this.spaces, this.spaces = "");
}
}
getPosition(e) {
let s = this.input.fromOffset(e);
return { column: s.col, line: s.line, offset: e };
}
init(e, s) {
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 = false);
}
other(e) {
let s = false, r = null, n = false, i = null, o = [], u = e[1].startsWith("--"), a = [], c = e;
for (; c; ) {
if (r = c[0], a.push(c), r === "(" || r === "[") i || (i = c), o.push(r === "(" ? ")" : "]");
else if (u && n && r === "{") i || (i = c), o.push("}");
else if (o.length === 0) if (r === ";") if (n) {
this.decl(a, u);
return;
} else break;
else if (r === "{") {
this.rule(a);
return;
} else if (r === "}") {
this.tokenizer.back(a.pop()), s = true;
break;
} else r === ":" && (n = true);
else r === o[o.length - 1] && (o.pop(), o.length === 0 && (i = null));
c = this.tokenizer.nextToken();
}
if (this.tokenizer.endOfFile() && (s = true), o.length > 0 && this.unclosedBracket(i), s && n) {
if (!u) for (; a.length && (c = a[a.length - 1][0], !(c !== "space" && c !== "comment")); ) this.tokenizer.back(a.pop());
this.decl(a, u);
} else this.unknownWord(a);
}
parse() {
let e;
for (; !this.tokenizer.endOfFile(); ) switch (e = this.tokenizer.nextToken(), e[0]) {
case "space":
this.spaces += e[1];
break;
case ";":
this.freeSemicolon(e);
break;
case "}":
this.end(e);
break;
case "comment":
this.comment(e);
break;
case "at-word":
this.atrule(e);
break;
case "{":
this.emptyRule(e);
break;
default:
this.other(e);
break;
}
this.endFile();
}
precheckMissedSemicolon() {
}
raw(e, s, r, n) {
let i, o, u = r.length, a = "", c = true, f, p;
for (let l = 0; l < u; l += 1) i = r[l], o = i[0], o === "space" && l === u - 1 && !n ? c = false : o === "comment" ? (p = r[l - 1] ? r[l - 1][0] : "empty", f = r[l + 1] ? r[l + 1][0] : "empty", !oo[p] && !oo[f] ? a.slice(-1) === "," ? c = false : a += i[1] : c = false) : a += i[1];
if (!c) {
let l = r.reduce((y, x) => y + x[1], "");
e.raws[s] = { raw: l, value: a };
}
e[s] = a;
}
rule(e) {
e.pop();
let s = new io();
this.init(s, e[0][2]), s.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(s, "selector", e), this.current = s;
}
spacesAndCommentsFromEnd(e) {
let s, r = "";
for (; e.length && (s = e[e.length - 1][0], !(s !== "space" && s !== "comment")); ) r = e.pop()[1] + r;
return r;
}
spacesAndCommentsFromStart(e) {
let s, r = "";
for (; e.length && (s = e[0][0], !(s !== "space" && s !== "comment")); ) r += e.shift()[1];
return r;
}
spacesFromEnd(e) {
let s, r = "";
for (; e.length && (s = e[e.length - 1][0], s === "space"); ) r = e.pop()[1] + r;
return r;
}
stringFrom(e, s) {
let r = "";
for (let n = s; n < e.length; n++) r += e[n][1];
return e.splice(s, e.length - s), r;
}
unclosedBlock() {
let e = this.current.source.start;
throw this.input.error("Unclosed block", e.line, e.column);
}
unclosedBracket(e) {
throw this.input.error("Unclosed bracket", { offset: e[2] }, { offset: e[2] + 1 });
}
unexpectedClose(e) {
throw this.input.error("Unexpected }", { offset: e[2] }, { offset: e[2] + 1 });
}
unknownWord(e) {
throw this.input.error("Unknown word", { offset: e[0][2] }, { offset: e[0][2] + e[0][1].length });
}
unnamedAtrule(e, s) {
throw this.input.error("At-rule without name", { offset: s[2] }, { offset: s[2] + s[1].length });
}
};
ao.exports = ys;
});
var gt = g((Yv, uo) => {
"use strict";
var Yc = le(), Vc = qe(), zc = Jt();
function Xt(t, e) {
let s = new Vc(t, e), r = new zc(s);
try {
r.parse();
} catch (n) {
throw n;
}
return r.root;
}
uo.exports = Xt;
Xt.default = Xt;
Yc.registerParse(Xt);
});
var lo = g((Vv, gs) => {
var Gc = Qt(), jc = qe();
gs.exports = { isInlineComment(t) {
if (t[0] === "word" && t[1].slice(0, 2) === "//") {
let e = t, s = [], r, n;
for (; t; ) {
if (/\r?\n/.test(t[1])) {
if (/['"].*\r?\n/.test(t[1])) {
s.push(t[1].substring(0, t[1].indexOf(`
`))), n = t[1].substring(t[1].indexOf(`
`));
let o = this.input.css.valueOf().substring(this.tokenizer.position());
n += o, r = t[3] + o.length - n.length;
} else this.tokenizer.back(t);
break;
}
s.push(t[1]), r = t[2], t = this.tokenizer.nextToken({ ignoreUnclosed: true });
}
let i = ["comment", s.join(""), e[2], r];
return this.inlineComment(i), n && (this.input = new jc(n), this.tokenizer = Gc(this.input)), true;
} else if (t[1] === "/") {
let e = this.tokenizer.nextToken({ ignoreUnclosed: true });
if (e[0] === "comment" && /^\/\*/.test(e[1])) return e[0] = "word", e[1] = e[1].slice(1), t[1] = "//", this.tokenizer.back(e), gs.exports.isInlineComment.bind(this)(t);
}
return false;
} };
});
var fo = g((zv, co) => {
co.exports = { interpolation(t) {
let e = [t, this.tokenizer.nextToken()], s = ["word", "}"];
if (e[0][1].length > 1 || e[1][0] !== "{") return this.tokenizer.back(e[1]), false;
for (t = this.tokenizer.nextToken(); t && s.includes(t[0]); ) e.push(t), t = this.tokenizer.nextToken();
let r = e.map((u) => u[1]), [n] = e, i = e.pop(), o = ["word", r.join(""), n[2], i[2]];
return this.tokenizer.back(t), this.tokenizer.back(o), true;
} };
});
var ho = g((Gv, po) => {
var Hc = /^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/, Kc = /\.[0-9]/, Qc = (t) => {
let [, e] = t, [s] = e;
return (s === "." || s === "#") && Hc.test(e) === false && Kc.test(e) === false;
};
po.exports = { isMixinToken: Qc };
});
var yo = g((jv, mo) => {
var Jc = Qt(), Xc = /^url\((.+)\)/;
mo.exports = (t) => {
let { name: e, params: s = "" } = t;
if (e === "import" && s.length) {
t.import = true;
let r = Jc({ css: s });
for (t.filename = s.replace(Xc, "$1"); !r.endOfFile(); ) {
let [n, i] = r.nextToken();
if (n === "word" && i === "url") return;
if (n === "brackets") {
t.options = i, t.filename = s.replace(i, "").trim();
break;
}
}
}
};
});
var xo = g((Hv, vo) => {
var go = /:$/, wo = /^:(\s+)?/;
vo.exports = (t) => {
let { name: e, params: s = "" } = t;
if (t.name.slice(-1) === ":") {
if (go.test(e)) {
let [r] = e.match(go);
t.name = e.replace(r, ""), t.raws.afterName = r + (t.raws.afterName || ""), t.variable = true, t.value = t.params;
}
if (wo.test(s)) {
let [r] = s.match(wo);
t.value = s.replace(r, ""), t.raws.afterName = (t.raws.afterName || "") + r, t.variable = true;
}
}
};
});
var Eo = g((Qv, _o) => {
var Zc = Re(), ef = Jt(), { isInlineComment: tf } = lo(), { interpolation: bo } = fo(), { isMixinToken: rf } = ho(), sf = yo(), nf = xo(), of = /(!\s*important)$/i;
_o.exports = class extends ef {
constructor(...e) {
super(...e), this.lastNode = null;
}
atrule(e) {
bo.bind(this)(e) || (super.atrule(e), sf(this.lastNode), nf(this.lastNode));
}
decl(...e) {
super.decl(...e), /extend\(.+\)/i.test(this.lastNode.value) && (this.lastNode.extend = true);
}
each(e) {
e[0][1] = ` ${e[0][1]}`;
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("");
for (let u of e.reverse()) this.tokenizer.back(u);
this.atrule(this.tokenizer.nextToken()), this.lastNode.function = true, this.lastNode.params = o;
}
init(e, s, r) {
super.init(e, s, r), this.lastNode = e;
}
inlineComment(e) {
let s = new Zc(), r = e[1].slice(2);
if (this.init(s, e[2]), s.source.end = this.getPosition(e[3] || e[2]), s.inline = true, s.raws.begin = "//", /^\s*$/.test(r)) s.text = "", s.raws.left = r, s.raws.right = "";
else {
let n = r.match(/^(\s*)([^]*[^\s])(\s*)$/);