import{__module as t}from"../../../../_virtual/node2.mjs";import{__require as e}from"../util/index.mjs";var r;function s(){return r||(r=1,function(t,r){r.__esModule=!0,r.default=void 0;var s=e();function i(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var n=function t(e,r){if("object"!=typeof e||null===e)return e;var s=new e.constructor;for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];"parent"===i&&"object"===typeof n?r&&(s[i]=r):s[i]=n instanceof Array?n.map(function(e){return t(e,s)}):t(n,s)}return s},a=function(){function t(t){void 0===t&&(t={}),Object.assign(this,t),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}var e=t.prototype;return e.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},e.replaceWith=function(){if(this.parent){for(var t in arguments)this.parent.insertBefore(this,arguments[t]);this.remove()}return this},e.next=function(){return this.parent.at(this.parent.index(this)+1)},e.prev=function(){return this.parent.at(this.parent.index(this)-1)},e.clone=function(t){void 0===t&&(t={});var e=n(this);for(var r in t)e[r]=t[r];return e},e.appendToPropertyAndEscape=function(t,e,r){this.raws||(this.raws={});var s=this[t],i=this.raws[t];this[t]=s+e,i||r!==e?this.raws[t]=(i||s)+r:delete this.raws[t]},e.setPropertyAndEscape=function(t,e,r){this.raws||(this.raws={}),this[t]=e,this.raws[t]=r},e.setPropertyWithoutEscape=function(t,e){this[t]=e,this.raws&&delete this.raws[t]},e.isAtPosition=function(t,e){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>e)&&!(this.source.end.line===t&&this.source.end.column<e)))},e.stringifyProperty=function(t){return this.raws&&this.raws[t]||this[t]},e.valueToString=function(){return String(this.stringifyProperty("value"))},e.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},i(t,[{key:"rawSpaceBefore",get:function(){var t=this.raws&&this.raws.spaces&&this.raws.spaces.before;return void 0===t&&(t=this.spaces&&this.spaces.before),t||""},set:function(t){(0,s.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 void 0===t&&(t=this.spaces.after),t||""},set:function(t){(0,s.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=t}}]),t}();r.default=a,t.exports=r.default}(t,t.exports)),t.exports}export{s as __require};