import e from"../../../../../_virtual/index19.mjs";import r from"../../utils/hasPrefix.mjs";import t from"../../utils/isAutoprefixable.mjs";import s from"../../utils/isStandardSyntaxDeclaration.mjs";import i from"../../utils/isStandardSyntaxProperty.mjs";import o from"../../utils/optionsMatches.mjs";import a from"../../utils/report.mjs";import l from"../../utils/ruleMessages.mjs";import u from"../../utils/setDeclarationValue.mjs";import n from"../../utils/validateOptions.mjs";import m from"../../utils/vendor.mjs";import{isString as p,isRegExp as f}from"../../utils/validateTypes.mjs";const d="value-no-vendor-prefix",x=l(d,{rejected:e=>`Unexpected vendor-prefixed value "${e}"`}),c=(l,c)=>(v,j)=>{if(!n(j,d,{actual:l},{optional:!0,actual:c,possible:{ignoreValues:[p,f]}}))return;const g={raw:[],unprefixed:[]};[c?.ignoreValues??[]].flat().forEach(e=>{const r=f(e)||e.startsWith("/")&&e.match(/\/i?$/);g[r?"raw":"unprefixed"].push(e)}),v.walkDecls(l=>{const{value:n}=l;if(!r(n))return;if(!s(l)||!i(l.prop))return;if(o(g,"raw",n))return;if(o(g,"unprefixed",m.unprefixed(n)))return;const p=e(n);p.walk(e=>{if(!t.propertyValue(e.value))return;const r=l.prop.length+(l.raws.between||"").length+e.sourceIndex;a({message:x.rejected,messageArgs:[e.value],node:l,index:r,endIndex:r+e.value.length,result:j,ruleName:d,fix:{apply:()=>{e.value=t.unprefix(e.value),u(l,p.toString())},node:l}})})})};c.ruleName=d,c.messages=x,c.meta={url:"https://stylelint.io/user-guide/rules/value-no-vendor-prefix",fixable:!0};export{c as default};