import{tokenize as e,isTokenWhiteSpaceOrComment as s,isTokenEOF as a,isTokenString as t,isTokenComment as c,isTokenWhitespace as r}from"@csstools/css-tokenizer";const o=/^property$/i,n=/^syntax$/i,creator=i=>{const p=Object.assign({preserve:!1},i);return{postcssPlugin:"postcss-syntax-descriptor-syntax-production",Declaration(i){if(!n.test(i.prop))return;if(!i.parent||"atrule"!==i.parent.type)return;if(!o.test(i.parent.name))return;const f=i.prev();if(f&&"decl"===f.type&&n.test(f.prop))return;const l=i.value,u=e({css:i.value}),d=u.filter(e=>!(s(e)||a(e)));if(1===d.length&&t(d[0]))return;let m="";u.forEach(e=>{c(e)||(r(e)?m+=" ":m+=e[1])});let v='"';for(const e of m){const s=e.codePointAt(0);if(void 0!==s)switch(s){case 0:v+=String.fromCodePoint(65533);break;case 34:case 92:v+="\\"+String.fromCodePoint(s);break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 127:v+="\\"+s.toString(16)+" ";break;default:v+=String.fromCodePoint(s)}}v+='"',l!==v&&(i.cloneBefore({value:v}),p.preserve||i.remove())}}};creator.postcss=!0;export{creator as default,creator as"module.exports"};
