import d from "../../../postcss@8.4.14/node_modules/postcss/lib/postcss.js";
let s = d, u = /\s*!important\s*$/i, h = {
  "box-flex": !0,
  "box-flex-group": !0,
  "column-count": !0,
  flex: !0,
  "flex-grow": !0,
  "flex-positive": !0,
  "flex-shrink": !0,
  "flex-negative": !0,
  "font-weight": !0,
  "line-clamp": !0,
  "line-height": !0,
  opacity: !0,
  order: !0,
  orphans: !0,
  "tab-size": !0,
  widows: !0,
  "z-index": !0,
  zoom: !0,
  "fill-opacity": !0,
  "stroke-dashoffset": !0,
  "stroke-opacity": !0,
  "stroke-width": !0
};
function a(o) {
  return o.replace(/([A-Z])/g, "-$1").replace(/^ms-/, "-ms-").toLowerCase();
}
function n(o, t, e) {
  e === !1 || e === null || (t = a(t), typeof e == "number" && (e === 0 || h[t] ? e = e.toString() : e += "px"), t === "css-float" && (t = "float"), u.test(e) ? (e = e.replace(u, ""), o.push(s.decl({ prop: t, value: e, important: !0 }))) : o.push(s.decl({ prop: t, value: e })));
}
function p(o, t, e) {
  let r = s.atRule({ name: t[1], params: t[3] || "" });
  typeof e == "object" && (r.nodes = [], l(e, r)), o.push(r);
}
function l(o, t) {
  let e, r, f;
  for (e in o)
    if (r = o[e], !(r === null || typeof r > "u"))
      if (e[0] === "@") {
        let i = e.match(/@(\S+)(\s+([\W\w]*)\s*)?/);
        if (Array.isArray(r))
          for (let c of r)
            p(t, i, c);
        else
          p(t, i, r);
      } else if (Array.isArray(r))
        for (let i of r)
          n(t, e, i);
      else
        typeof r == "object" ? (f = s.rule({ selector: e }), l(r, f), t.push(f)) : n(t, e, r);
}
var y = function(o) {
  let t = s.root();
  return l(o, t), t;
};
export {
  y as default
};
//# sourceMappingURL=parser.js.map
