import{atRuleRegexes as e}from"../../utils/regexes.mjs";import i from"../../utils/isAutoprefixable.mjs";import r from"../../utils/report.mjs";import t from"../../utils/ruleMessages.mjs";import o from"../../utils/validateOptions.mjs";const a="media-feature-name-no-vendor-prefix",m=t(a,{rejected:"Unexpected vendor-prefix"}),s=["-webkit-device-pixel-ratio","-webkit-min-device-pixel-ratio","-webkit-max-device-pixel-ratio","-o-device-pixel-ratio","-o-min-device-pixel-ratio","-o-max-device-pixel-ratio","-moz-device-pixel-ratio","min--moz-device-pixel-ratio","max--moz-device-pixel-ratio"],l=t=>(l,p)=>{o(p,a,{actual:t})&&l.walkAtRules(e.mediaName,e=>{const t=e.params;if(!i.mediaFeatureName(t))return;const o=e.toString().match(new RegExp(`${s.join("|")}`,"gi"));if(o)for(const i of o){const t=()=>{e.params=e.params.replace(/-moz-|-o-|-webkit-/i,"")};r({message:m.rejected,messageArgs:[],node:e,word:i,result:p,ruleName:a,fix:{apply:t,node:e}})}})};l.ruleName=a,l.messages=m,l.meta={url:"https://stylelint.io/user-guide/rules/media-feature-name-no-vendor-prefix",fixable:!0};export{l as default};