"use strict";const g=require("../../../../../_virtual/index31.js");require("../../../postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/index.js");const b=require("../../../../../_virtual/index30.js");let d=b.dist.exports;function v(o,r){let s,a=d(p=>{s=p});try{a.processSync(o)}catch(p){throw o.includes(":")?r?r.error("Missed semicolon"):p:r?r.error(p.message):p}return s.at(0)}function w(o,r){let s=!1;return o.each(a=>{if(a.type==="nesting"){let p=r.clone();a.value!=="&"?a.replaceWith(v(a.value.replace("&",p.toString()))):a.replaceWith(p),s=!0}else a.nodes&&w(a,r)&&(s=!0)}),s}function k(o,r){let s=[];return o.selectors.forEach(a=>{let p=v(a,o);r.selectors.forEach(n=>{if(n.length){let t=v(n,r);w(t,p)||(t.prepend(d.combinator({value:" "})),t.prepend(p.clone())),s.push(t.toString())}})}),s}function m(o,r){return o&&o.type==="comment"?(r.after(o),o):r}function N(o){return function r(s,a,p){let n=[];if(a.each(t=>{t.type==="comment"||t.type==="decl"?n.push(t):t.type==="rule"&&p?t.selectors=k(s,t):t.type==="atrule"&&(t.nodes&&o[t.name]?r(s,t,!0):n.push(t))}),p&&n.length){let t=s.clone({nodes:[]});for(let u of n)t.append(u);a.prepend(t)}}}function y(o,r,s,a){let p=new a({selector:o,nodes:[]});for(let n of r)p.append(n);return s.after(p),p}function x(o,r){let s={};for(let a of o)s[a]=!0;if(r)for(let a of r){let p=a.replace(/^@/,"");s[p]=!0}return s}g.postcssNested.exports=(o={})=>{let r=x(["media","supports"],o.bubble),s=N(r),a=x(["document","font-face","keyframes","-webkit-keyframes","-moz-keyframes"],o.unwrap),p=o.preserveEmpty;return{postcssPlugin:"postcss-nested",Rule(n,{Rule:t}){let u=!1,f=n,i=!1,l=[];n.each(e=>{if(e.type==="rule")l.length&&(f=y(n.selector,l,f,t),l=[]),i=!0,u=!0,e.selectors=k(n,e),f=m(e.prev(),f),f.after(e),f=e;else if(e.type==="atrule")if(l.length&&(f=y(n.selector,l,f,t),l=[]),e.name==="at-root"){u=!0,s(n,e,!1);let c=e.nodes;e.params&&(c=new t({selector:e.params,nodes:c})),f.after(c),f=c,e.remove()}else r[e.name]?(i=!0,u=!0,s(n,e,!0),f=m(e.prev(),f),f.after(e),f=e):a[e.name]?(i=!0,u=!0,s(n,e,!1),f=m(e.prev(),f),f.after(e),f=e):i&&l.push(e);else e.type==="decl"&&i&&l.push(e)}),l.length&&(f=y(n.selector,l,f,t)),u&&p!==!0&&(n.raws.semicolon=!0,n.nodes.length===0&&n.remove())}}};g.postcssNested.exports.postcss=!0;module.exports=g.postcssNested.exports;
//# sourceMappingURL=index.js.map
