import e from"../../../../../_virtual/index13.mjs";import{__require as a}from"../../utils/namespace.mjs";import{__require as r}from"../../utils/optionsHaveIgnored.mjs";import{__require as s}from"../../utils/ruleUrl.mjs";var t,l;function o(){if(l)return t;l=1;const{utils:o}=e,i=a(),u=r(),n=s(),m=i("media-feature-value-dollar-variable"),d=o.ruleMessages(m,{rejected:"Unexpected dollar-variable as a media feature value",expected:"Expected a dollar-variable (e.g. $var) to be used as a media feature value"}),c={url:n(m)};function p(e,a){return(r,s)=>{if(!o.validateOptions(s,m,{actual:e,possible:["always","never"]},{actual:a,possible:{ignore:["keywords"]},optional:!0}))return;const t=/:\s*(\S.+?)(:?\s*)\)/,l=new RegExp(t.source,"g"),i=/^(\w+\.)?\$[\w-]+$/,n=/^#{\s*(\w+\.)?\$\w+\s*}$/,c=/^[a-z][a-z\d-]*$/;r.walkAtRules("media",r=>{const p=r.params.match(l);p&&p.length&&p.forEach(l=>{const p=l.match(t)[1];function f(e){o.report({ruleName:m,result:s,node:r,word:p,message:e})}c.test(p)&&u(a,"keywords")||("always"!==e||i.test(p)||n.test(p)?"never"===e&&p.includes("$")&&f(d.rejected):f(d.expected))})})}}return p.ruleName=m,p.messages=d,p.meta=c,t=p}export{o as __require};