import{__require as e}from"../../../../postcss-resolve-nested-selector/index.mjs";import r from"../../../../../_virtual/index13.mjs";import{__require as s}from"../../utils/validateTypes.mjs";import{__require as t}from"../../utils/hasInterpolatingAmpersand.mjs";import{__require as i}from"../../utils/isStandardRule.mjs";import{__require as a}from"../../utils/isStandardSelector.mjs";import{__require as o}from"../../utils/parseSelector.mjs";import{__require as u}from"../../utils/namespace.mjs";import{__require as m}from"../../utils/ruleUrl.mjs";var l,n;function p(){if(n)return l;n=1;const p=e(),{utils:c}=r,{isRegExp:_,isString:f}=s(),d=t(),g=i(),j=a(),q=o(),x=u(),v=m(),S=x("percent-placeholder-pattern"),h=c.ruleMessages(S,{expected:(e,r)=>`Expected "${e}" to match pattern "${r}"`}),w={url:v(S)};function E(e){return(r,s)=>{if(!c.validateOptions(s,S,{actual:e,possible:[_,f]}))return;const t=f(e)?new RegExp(e):e;r.walkRules(r=>{const{selector:i}=r;function a(i){q(i,s,r,i=>function(r,i){r.walkTags(r=>{const{value:a}=r;if("%"!==a[0])return;const o=a.slice(1);t.test(o)||c.report({result:s,ruleName:S,message:h.expected,messageArgs:[o,e],node:i,word:a})})}(i,r))}g(r)&&j(i)&&(d(i)?p(i,r).forEach(a):a(i))})}}return E.ruleName=S,E.messages=h,E.meta=w,l=E}export{p as __require};