import { n as c } from "../../../../../../../_virtual/node.js";
import "../util/index.js";
import { __exports as v } from "../../../../../../../_virtual/index41.js";
(function(p, a) {
  a.__esModule = !0, a.default = void 0;
  var u = v;
  function h(i, r) {
    for (var e = 0; e < r.length; e++) {
      var t = r[e];
      t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(i, t.key, t);
    }
  }
  function l(i, r, e) {
    return r && h(i.prototype, r), e && h(i, e), i;
  }
  var w = function i(r, e) {
    if (typeof r != "object" || r === null)
      return r;
    var t = new r.constructor();
    for (var s in r)
      if (!!r.hasOwnProperty(s)) {
        var n = r[s], f = typeof n;
        s === "parent" && f === "object" ? e && (t[s] = e) : n instanceof Array ? t[s] = n.map(function(o) {
          return i(o, t);
        }) : t[s] = i(n, t);
      }
    return t;
  }, d = /* @__PURE__ */ function() {
    function i(e) {
      e === void 0 && (e = {}), Object.assign(this, e), this.spaces = this.spaces || {}, this.spaces.before = this.spaces.before || "", this.spaces.after = this.spaces.after || "";
    }
    var r = i.prototype;
    return r.remove = function() {
      return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
    }, r.replaceWith = function() {
      if (this.parent) {
        for (var t in arguments)
          this.parent.insertBefore(this, arguments[t]);
        this.remove();
      }
      return this;
    }, r.next = function() {
      return this.parent.at(this.parent.index(this) + 1);
    }, r.prev = function() {
      return this.parent.at(this.parent.index(this) - 1);
    }, r.clone = function(t) {
      t === void 0 && (t = {});
      var s = w(this);
      for (var n in t)
        s[n] = t[n];
      return s;
    }, r.appendToPropertyAndEscape = function(t, s, n) {
      this.raws || (this.raws = {});
      var f = this[t], o = this.raws[t];
      this[t] = f + s, o || n !== s ? this.raws[t] = (o || f) + n : delete this.raws[t];
    }, r.setPropertyAndEscape = function(t, s, n) {
      this.raws || (this.raws = {}), this[t] = s, this.raws[t] = n;
    }, r.setPropertyWithoutEscape = function(t, s) {
      this[t] = s, this.raws && delete this.raws[t];
    }, r.isAtPosition = function(t, s) {
      if (this.source && this.source.start && this.source.end)
        return !(this.source.start.line > t || this.source.end.line < t || this.source.start.line === t && this.source.start.column > s || this.source.end.line === t && this.source.end.column < s);
    }, r.stringifyProperty = function(t) {
      return this.raws && this.raws[t] || this[t];
    }, r.valueToString = function() {
      return String(this.stringifyProperty("value"));
    }, r.toString = function() {
      return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join("");
    }, l(i, [{
      key: "rawSpaceBefore",
      get: function() {
        var t = this.raws && this.raws.spaces && this.raws.spaces.before;
        return t === void 0 && (t = this.spaces && this.spaces.before), t || "";
      },
      set: function(t) {
        (0, u.ensureObject)(this, "raws", "spaces"), this.raws.spaces.before = t;
      }
    }, {
      key: "rawSpaceAfter",
      get: function() {
        var t = this.raws && this.raws.spaces && this.raws.spaces.after;
        return t === void 0 && (t = this.spaces.after), t || "";
      },
      set: function(t) {
        (0, u.ensureObject)(this, "raws", "spaces"), this.raws.spaces.after = t;
      }
    }]), i;
  }();
  a.default = d, p.exports = a.default;
})(c, c.exports);
//# sourceMappingURL=node.js.map
