import{isTokenIdent as e,TokenType as t,isTokenDelim as n,stringify as r,ParseError as a,isTokenWhiteSpaceOrComment as s,tokenizer as o,isTokenWhitespace as l,isTokenComment as i}from"@csstools/css-tokenizer";import{parseCommaSeparatedListOfComponentValues as c,isTokenNode as m,isCommentNode as u,isWhitespaceNode as p}from"@csstools/css-parser-algorithms";class LayerName{parts;constructor(e){this.parts=e}tokens(){return[...this.parts]}slice(t,n){const r=[];for(let t=0;te(t)||n(t))),a,...r.parts.filter((t=>e(t)||n(t)))])}segments(){return this.parts.filter((t=>e(t))).map((e=>e[4].value))}name(){return this.parts.filter((t=>e(t)||n(t))).map((e=>e[1])).join("")}equal(e){const t=this.segments(),n=e.segments();if(t.length!==n.length)return!1;for(let e=0;e{const n=t.segments();e:for(let r=0;r=o&&(s=t,o=r)}-1===s?e.push(n):e.splice(s+1,0,n)}}))}function parseFromTokens(t,r){const o=c(t,{onParseError:r?.onParseError}),f=r?.onParseError??(()=>{}),h=["6.4.2. Layer Naming and Nesting","Layer name syntax"," = [ '.' ]*"],d=t[0][2],y=t[t.length-1][3],g=[];for(let t=0;te.tokens()));let w=!1,v=!1,L=null;for(let t=0;t