import e from"../../../../../_virtual/index13.mjs";import{__require as t}from"../../utils/namespace.mjs";import{__require as r}from"../../utils/ruleUrl.mjs";var s,a;function n(){if(a)return s;a=1;const{utils:n}=e,i=t(),l=r(),o=i("no-unused-private-members"),u=n.ruleMessages(o,{expected:e=>`Expected usage of private member "${e}" within the stylesheet`}),c={url:l(o)};function p(e){return[...e.matchAll(/(?:\s*([\w\-$]+)\s*)?\(/g)].flat()}function m(e){return e.match(/([$%]*[-_]+[\w\d-_]+)/g)}function f(e){return e.replaceAll("_","-")}function d(e){return(t,r)=>{if(!n.validateOptions(r,o,{actual:e}))return;const s={selectors:new Map,variables:new Map,functions:new Map,mixins:new Map};let a=!1;if(t.walkAtRules("import",()=>a=!0),!a){t.walk(e=>{if("rule"===e.type&&(e.selector.includes("%-")||e.selector.includes("%_"))){e.selector.split(/:|\./g).filter(e=>e.startsWith("%-")|e.includes("%_")).forEach(t=>{s.selectors.has(t)||s.selectors.set(f(t),e)})}"decl"===e.type&&(e.prop.startsWith("$-")||e.prop.startsWith("$_"))&&!function(e){let t=e.parent;for(;t;){if("atrule"===t.type&&"mixin"===t.name)return!0;t=t.parent}return!1}(e)&&s.variables.set(f(e.prop),e);if("atrule"===e.type&&"function"===e.name&&(e.params.startsWith("-")||e.params.startsWith("_"))){const t=p(e.params);if(t.length<2)return;s.functions.set(f(t[1]),e)}if("atrule"===e.type&&"mixin"===e.name&&(e.params.startsWith("-")||e.params.startsWith("_"))){const t=p(e.params);s.mixins.set(f(t.length<2?e.params:t[1]),e)}}),t.walk(e=>{if("atrule"===e.type||"rule"===e.type){const t=m("rule"===e.type?e.selector:e.params);t&&t.forEach(t=>{t=f(t),s.mixins.get(t)!==e&&s.mixins.delete(t),s.selectors.get(t)!==e&&"atrule"===e.type&&s.selectors.delete(t),s.variables.get(t)!==e&&s.variables.delete(t),s.functions.get(t)!==e&&s.functions.delete(t)})}}),t.walkDecls(e=>{const t=m(e.value);t&&t.forEach(t=>{t=f(t),s.variables.get(t)!==e&&s.variables.delete(t),s.functions.get(t)!==e&&s.functions.delete(t)})});for(const e in s)for(const[t,a]of s[e].entries())n.report({message:u.expected("decl"===a.type?a.prop:t),node:a,result:r,ruleName:o})}}}return d.ruleName=o,d.messages=u,d.meta=c,s=d}export{n as __require};