import { d as n } from "../../../../../../_virtual/index28.js";
import x from "../../../../postcss-value-parser@3.3.1/node_modules/postcss-value-parser/lib/index.js";
import "./parser.js";
import "./lib/reducer.js";
import "./lib/stringifier.js";
import { __exports as y } from "../../../../../../_virtual/parser.js";
import { __exports as A } from "../../../../../../_virtual/reducer.js";
import { s as C } from "../../../../../../_virtual/stringifier.js";
(function(f, t) {
  Object.defineProperty(t, "__esModule", {
    value: !0
  });
  var o = x, s = a(o), p = y, l = A, d = a(l), c = C.exports, v = a(c);
  function a(r) {
    return r && r.__esModule ? r : { default: r };
  }
  var _ = /((?:\-[a-z]+\-)?calc)/;
  t.default = function(r) {
    var u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 5;
    return (0, s.default)(r).walk(function(e) {
      if (!(e.type !== "function" || !_.test(e.value))) {
        var i = s.default.stringify(e.nodes);
        if (!(i.indexOf("constant") >= 0 || i.indexOf("env") >= 0)) {
          var m = p.parser.parse(i), g = (0, d.default)(m, u);
          e.type = "word", e.value = (0, v.default)(e.value, g, u);
        }
      }
    }, !0).toString();
  }, f.exports = t.default;
})(n, n.exports);
//# sourceMappingURL=index.js.map
