import e from"../../../../../_virtual/index19.mjs";import{assertNumber as t}from"../../utils/validateTypes.mjs";import s from"../../utils/isNonNegativeInteger.mjs";import r from"../../utils/matchesStringOrRegExp.mjs";import o from"../../utils/report.mjs";import i from"../../utils/ruleMessages.mjs";import m from"../../utils/validateObjectWithProps.mjs";import a from"../../utils/validateOptions.mjs";import l from"../../utils/vendor.mjs";const p="declaration-property-max-values",u=i(p,{expected:(e,t)=>`Expected "${e}" to have no more than ${t} ${1===t?"value":"values"}`}),n=e=>"word"===e.type||"function"===e.type||"string"===e.type,d=i=>(d,f)=>{a(f,p,{actual:i,possible:[m(s)]})&&d.walkDecls(s=>{const{prop:m,value:a}=s,d=e(a).nodes.filter(n).length,c=l.unprefixed(m),g=Object.keys(i).find(e=>r(c,e));if(!g)return;const v=i[g];t(v),d<=v||o({message:u.expected,messageArgs:[m,v],node:s,result:f,ruleName:p})})};d.ruleName=p,d.messages=u,d.meta={url:"https://stylelint.io/user-guide/rules/declaration-property-max-values"};export{d as default};