@projectwallace/css-analyzer 6.0.0-beta.0 → 6.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analyze-css.js +1249 -1162
- package/dist/analyze-css.umd.cjs +7 -6
- package/package.json +2 -2
package/dist/analyze-css.umd.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
`)}})}const
|
|
3
|
-
`)}const
|
|
4
|
-
|
|
5
|
-
`+$n({source:e,line:r,column:i},2)}})}const _t=0,k=1,I=2,B=3,D=4,qe=5,hi=6,ne=7,re=8,O=9,L=10,P=11,T=12,ie=13,Dn=14,se=15,Q=16,Ze=17,et=18,Be=19,tt=20,be=21,R=22,nt=23,Tt=24,we=25,fi=0;function G(t){return t>=48&&t<=57}function je(t){return G(t)||t>=65&&t<=70||t>=97&&t<=102}function Ot(t){return t>=65&&t<=90}function pi(t){return t>=97&&t<=122}function di(t){return Ot(t)||pi(t)}function mi(t){return t>=128}function rt(t){return di(t)||mi(t)||t===95}function Mn(t){return rt(t)||G(t)||t===45}function gi(t){return t>=0&&t<=8||t===11||t>=14&&t<=31||t===127}function it(t){return t===10||t===13||t===12}function Ue(t){return it(t)||t===32||t===9}function pe(t,e){return!(t!==92||it(e)||e===fi)}function It(t,e,n){return t===45?rt(e)||e===45||pe(e,n):rt(t)?!0:t===92?pe(t,e):!1}function Nt(t,e,n){return t===43||t===45?G(e)?2:e===46&&G(n)?3:0:t===46?G(e)?2:0:G(t)?1:0}function zn(t){return t===65279||t===65534?1:0}const $t=new Array(128),ki=128,st=130,Fn=131,Pt=132,Rn=133;for(let t=0;t<$t.length;t++)$t[t]=Ue(t)&&st||G(t)&&Fn||rt(t)&&Pt||gi(t)&&Rn||t||ki;function Dt(t){return t<128?$t[t]:Pt}function Ie(t,e){return e<t.length?t.charCodeAt(e):0}function Mt(t,e,n){return n===13&&Ie(t,e+1)===10?2:1}function qn(t,e,n){let r=t.charCodeAt(e);return Ot(r)&&(r=r|32),r===n}function ot(t,e,n,r){if(n-e!==r.length||e<0||n>t.length)return!1;for(let i=e;i<n;i++){const o=r.charCodeAt(i-e);let a=t.charCodeAt(i);if(Ot(a)&&(a=a|32),a!==o)return!1}return!0}function yi(t,e){for(;e>=0&&Ue(t.charCodeAt(e));e--);return e+1}function at(t,e){for(;e<t.length&&Ue(t.charCodeAt(e));e++);return e}function zt(t,e){for(;e<t.length&&G(t.charCodeAt(e));e++);return e}function Ve(t,e){if(e+=2,je(Ie(t,e-1))){for(const r=Math.min(t.length,e+5);e<r&&je(Ie(t,e));e++);const n=Ie(t,e);Ue(n)&&(e+=Mt(t,e,n))}return e}function lt(t,e){for(;e<t.length;e++){const n=t.charCodeAt(e);if(!Mn(n)){if(pe(n,Ie(t,e+1))){e=Ve(t,e)-1;continue}break}}return e}function Bn(t,e){let n=t.charCodeAt(e);if((n===43||n===45)&&(n=t.charCodeAt(e+=1)),G(n)&&(e=zt(t,e+1),n=t.charCodeAt(e)),n===46&&G(t.charCodeAt(e+1))&&(e+=2,e=zt(t,e)),qn(t,e,101)){let r=0;n=t.charCodeAt(e+1),(n===45||n===43)&&(r=1,n=t.charCodeAt(e+2)),G(n)&&(e=zt(t,e+1+r+1))}return e}function Ft(t,e){for(;e<t.length;e++){const n=t.charCodeAt(e);if(n===41){e++;break}pe(n,Ie(t,e+1))&&(e=Ve(t,e))}return e}function Si(t){if(t.length===1&&!je(t.charCodeAt(0)))return t[0];let e=parseInt(t,16);return(e===0||e>=55296&&e<=57343||e>1114111)&&(e=65533),String.fromCodePoint(e)}const jn=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"],xi=16*1024;function ct(t=null,e){return t===null||t.length<e?new Uint32Array(Math.max(e+1024,xi)):t}const Un=10,Ci=12,Vn=13;function Gn(t){const e=t.source,n=e.length,r=e.length>0?zn(e.charCodeAt(0)):0,i=ct(t.lines,n),o=ct(t.columns,n);let a=t.startLine,f=t.startColumn;for(let c=r;c<n;c++){const s=e.charCodeAt(c);i[c]=a,o[c]=f++,(s===Un||s===Vn||s===Ci)&&(s===Vn&&c+1<n&&e.charCodeAt(c+1)===Un&&(c++,i[c]=a,o[c]=f),a++,f=1)}i[n]=a,o[n]=f,t.lines=i,t.columns=o,t.computed=!0}class bi{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,n=0,r=1,i=1){this.source=e,this.startOffset=n,this.startLine=r,this.startColumn=i,this.computed=!1}getLocation(e,n){return this.computed||Gn(this),{source:n,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,n,r){return this.computed||Gn(this),{source:r,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+n,line:this.lines[n],column:this.columns[n]}}}}const Y=16777215,ye=24,wi=new Map([[I,R],[be,R],[Be,tt],[nt,Tt]]);class vi{constructor(e,n){this.setSource(e,n)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",n=()=>{}){e=String(e||"");const r=e.length,i=ct(this.offsetAndType,e.length+1),o=ct(this.balance,e.length+1);let a=0,f=0,c=0,s=-1;for(this.offsetAndType=null,this.balance=null,n(e,(l,m,S)=>{switch(l){default:o[a]=r;break;case f:{let b=c&Y;for(c=o[b],f=c>>ye,o[a]=b,o[b++]=a;b<a;b++)o[b]===r&&(o[b]=a);break}case be:case I:case Be:case nt:o[a]=c,f=wi.get(l),c=f<<ye|a;break}i[a++]=l<<ye|S,s===-1&&(s=m)}),i[a]=_t<<ye|r,o[a]=r,o[r]=r;c!==0;){const l=c&Y;c=o[l],o[l]=r}this.source=e,this.firstCharOffset=s===-1?0:s,this.tokenCount=a,this.offsetAndType=i,this.balance=o,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>ye:_t}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&Y:this.source.length}lookupValue(e,n){return e+=this.tokenIndex,e<this.tokenCount?ot(this.source,this.offsetAndType[e-1]&Y,this.offsetAndType[e]&Y,n):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&Y:this.offsetAndType[this.tokenCount]&Y:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,n){return n?this.lookupType(n)===O&&this.source.charCodeAt(this.lookupOffset(n))===e:this.tokenType===O&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let n=this.tokenIndex+e;n<this.tokenCount?(this.tokenIndex=n,this.tokenStart=this.offsetAndType[n-1]&Y,n=this.offsetAndType[n],this.tokenType=n>>ye,this.tokenEnd=n&Y):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>ye,this.tokenEnd=e&Y):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=_t,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===ie||this.tokenType===we;)this.next()}skipUntilBalanced(e,n){let r=e,i,o;e:for(;r<this.tokenCount;r++){if(i=this.balance[r],i<e)break e;switch(o=r>0?this.offsetAndType[r-1]&Y:this.firstCharOffset,n(this.source.charCodeAt(o))){case 1:break e;case 2:r++;break e;default:this.balance[i]===r&&(r=i)}}this.skip(r-this.tokenIndex)}forEachToken(e){for(let n=0,r=this.firstCharOffset;n<this.tokenCount;n++){const i=r,o=this.offsetAndType[n],a=o&Y,f=o>>ye;r=a,e(f,i,a,n)}}dump(){const e=new Array(this.tokenCount);return this.forEachToken((n,r,i,o)=>{e[o]={idx:o,type:jn[n],chunk:this.source.substring(r,i),balance:this.balance[o]}}),e}}function Hn(t,e){function n(m){return m<f?t.charCodeAt(m):0}function r(){if(s=Bn(t,s),It(n(s),n(s+1),n(s+2))){l=T,s=lt(t,s);return}if(n(s)===37){l=P,s++;return}l=L}function i(){const m=s;if(s=lt(t,s),ot(t,m,s,"url")&&n(s)===40){if(s=at(t,s+1),n(s)===34||n(s)===39){l=I,s=m+4;return}a();return}if(n(s)===40){l=I,s++;return}l=k}function o(m){for(m||(m=n(s++)),l=qe;s<t.length;s++){const S=t.charCodeAt(s);switch(Dt(S)){case m:s++;return;case st:if(it(S)){s+=Mt(t,s,S),l=hi;return}break;case 92:if(s===t.length-1)break;const b=n(s+1);it(b)?s+=Mt(t,s+1,b):pe(S,b)&&(s=Ve(t,s)-1);break}}}function a(){for(l=ne,s=at(t,s);s<t.length;s++){const m=t.charCodeAt(s);switch(Dt(m)){case 41:s++;return;case st:if(s=at(t,s),n(s)===41||s>=t.length){s<t.length&&s++;return}s=Ft(t,s),l=re;return;case 34:case 39:case 40:case Rn:s=Ft(t,s),l=re;return;case 92:if(pe(m,n(s+1))){s=Ve(t,s)-1;break}s=Ft(t,s),l=re;return}}}t=String(t||"");const f=t.length;let c=zn(n(0)),s=c,l;for(;s<f;){const m=t.charCodeAt(s);switch(Dt(m)){case st:l=ie,s=at(t,s+1);break;case 34:o();break;case 35:Mn(n(s+1))||pe(n(s+1),n(s+2))?(l=D,s=lt(t,s+1)):(l=O,s++);break;case 39:o();break;case 40:l=be,s++;break;case 41:l=R,s++;break;case 43:Nt(m,n(s+1),n(s+2))?r():(l=O,s++);break;case 44:l=et,s++;break;case 45:Nt(m,n(s+1),n(s+2))?r():n(s+1)===45&&n(s+2)===62?(l=se,s=s+3):It(m,n(s+1),n(s+2))?i():(l=O,s++);break;case 46:Nt(m,n(s+1),n(s+2))?r():(l=O,s++);break;case 47:n(s+1)===42?(l=we,s=t.indexOf("*/",s+2),s=s===-1?t.length:s+2):(l=O,s++);break;case 58:l=Q,s++;break;case 59:l=Ze,s++;break;case 60:n(s+1)===33&&n(s+2)===45&&n(s+3)===45?(l=Dn,s=s+4):(l=O,s++);break;case 64:It(n(s+1),n(s+2),n(s+3))?(l=B,s=lt(t,s+1)):(l=O,s++);break;case 91:l=Be,s++;break;case 92:pe(m,n(s+1))?i():(l=O,s++);break;case 93:l=tt,s++;break;case 123:l=nt,s++;break;case 125:l=Tt,s++;break;case Fn:r();break;case Pt:i();break;default:l=O,s++}e(l,c,c=s)}}function Ai(t){const e=this.createList();let n=!1;const r={recognizer:t};for(;!this.eof;){switch(this.tokenType){case we:this.next();continue;case ie:n=!0,this.next();continue}let i=t.getNode.call(this,r);if(i===void 0)break;n&&(t.onWhiteSpace&&t.onWhiteSpace.call(this,i,e,r),n=!1),e.push(i)}return n&&t.onWhiteSpace&&t.onWhiteSpace.call(this,null,e,r),e}const Wn=()=>{},Li=33,Ei=35,Rt=59,Kn=123,Qn=0;function _i(t){return function(){return this[t]()}}function qt(t){const e=Object.create(null);for(const n in t){const r=t[n],i=r.parse||r;i&&(e[n]=i)}return e}function Ti(t){const e={context:Object.create(null),scope:Object.assign(Object.create(null),t.scope),atrule:qt(t.atrule),pseudo:qt(t.pseudo),node:qt(t.node)};for(const n in t.parseContext)switch(typeof t.parseContext[n]){case"function":e.context[n]=t.parseContext[n];break;case"string":e.context[n]=_i(t.parseContext[n]);break}return{config:e,...e,...e.node}}function Oi(t){let e="",n="<unknown>",r=!1,i=Wn,o=!1;const a=new bi,f=Object.assign(new vi,Ti(t||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Ai,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(s){return s===Kn?1:0},consumeUntilLeftCurlyBracketOrSemicolon(s){return s===Kn||s===Rt?1:0},consumeUntilExclamationMarkOrSemicolon(s){return s===Li||s===Rt?1:0},consumeUntilSemicolonIncluded(s){return s===Rt?2:0},createList(){return new V},createSingleNodeList(s){return new V().appendData(s)},getFirstListNode(s){return s&&s.first},getLastListNode(s){return s&&s.last},parseWithFallback(s,l){const m=this.tokenIndex;try{return s.call(this)}catch(S){if(o)throw S;const b=l.call(this,m);return o=!0,i(S,b),o=!1,b}},lookupNonWSType(s){let l;do if(l=this.lookupType(s++),l!==ie)return l;while(l!==Qn);return Qn},charCodeAt(s){return s>=0&&s<e.length?e.charCodeAt(s):0},substring(s,l){return e.substring(s,l)},substrToCursor(s){return this.source.substring(s,this.tokenStart)},cmpChar(s,l){return qn(e,s,l)},cmpStr(s,l,m){return ot(e,s,l,m)},consume(s){const l=this.tokenStart;return this.eat(s),this.substrToCursor(l)},consumeFunctionName(){const s=e.substring(this.tokenStart,this.tokenEnd-1);return this.eat(I),s},consumeNumber(s){const l=e.substring(this.tokenStart,Bn(e,this.tokenStart));return this.eat(s),l},eat(s){if(this.tokenType!==s){const l=jn[s].slice(0,-6).replace(/-/g," ").replace(/^./,b=>b.toUpperCase());let m=`${/[[\](){}]/.test(l)?`"${l}"`:l} is expected`,S=this.tokenStart;switch(s){case k:this.tokenType===I||this.tokenType===ne?(S=this.tokenEnd-1,m="Identifier is expected but function found"):m="Identifier is expected";break;case D:this.isDelim(Ei)&&(this.next(),S++,m="Name is expected");break;case P:this.tokenType===L&&(S=this.tokenEnd,m="Percent sign is expected");break}this.error(m,S)}this.next()},eatIdent(s){(this.tokenType!==k||this.lookupValue(0,s)===!1)&&this.error(`Identifier "${s}" is expected`),this.next()},eatDelim(s){this.isDelim(s)||this.error(`Delim "${String.fromCharCode(s)}" is expected`),this.next()},getLocation(s,l){return r?a.getLocationRange(s,l,n):null},getLocationFromList(s){if(r){const l=this.getFirstListNode(s),m=this.getLastListNode(s);return a.getLocationRange(l!==null?l.loc.start.offset-a.startOffset:this.tokenStart,m!==null?m.loc.end.offset-a.startOffset:this.tokenStart,n)}return null},error(s,l){const m=typeof l<"u"&&l<e.length?a.getLocation(l):this.eof?a.getLocation(yi(e,e.length-1)):a.getLocation(this.tokenStart);throw new Pn(s||"Unexpected input",e,m.offset,m.line,m.column)}});return Object.assign(function(s,l){e=s,l=l||{},f.setSource(e,Hn),a.setSource(e,l.offset,l.line,l.column),n=l.filename||"<unknown>",r=!!l.positions,i=typeof l.onParseError=="function"?l.onParseError:Wn,o=!1,f.parseAtrulePrelude="parseAtrulePrelude"in l?!!l.parseAtrulePrelude:!0,f.parseRulePrelude="parseRulePrelude"in l?!!l.parseRulePrelude:!0,f.parseValue="parseValue"in l?!!l.parseValue:!0,f.parseCustomProperty="parseCustomProperty"in l?!!l.parseCustomProperty:!1;const{context:m="default",onComment:S}=l;if(!(m in f.context))throw new Error("Unknown context `"+m+"`");typeof S=="function"&&f.forEachToken((X,j,le)=>{if(X===we){const Ee=f.getLocation(j,le),De=ot(e,le-2,le,"*/")?e.slice(j+2,le-2):e.slice(j+2,le);S(De,Ee)}});const b=f.context[m].call(f,l);return f.eof||f.error(),b},{SyntaxError:Pn,config:f.config})}const Ii=35,Ni=38,$i=42,Pi=43,Di=47,Yn=46,Mi=62,zi=124,Fi=126;function Ri(t,e){e.last!==null&&e.last.type!=="Combinator"&&t!==null&&t.type!=="Combinator"&&e.push({type:"Combinator",loc:null,name:" "})}function qi(){switch(this.tokenType){case Be:return this.AttributeSelector();case D:return this.IdSelector();case Q:return this.lookupType(1)===Q?this.PseudoElementSelector():this.PseudoClassSelector();case k:return this.TypeSelector();case L:case P:return this.Percentage();case T:this.charCodeAt(this.tokenStart)===Yn&&this.error("Identifier is expected",this.tokenStart+1);break;case O:{switch(this.charCodeAt(this.tokenStart)){case Pi:case Mi:case Fi:case Di:return this.Combinator();case Yn:return this.ClassSelector();case $i:case zi:return this.TypeSelector();case Ii:return this.IdSelector();case Ni:return this.NestingSelector()}break}}}const Bi={onWhiteSpace:Ri,getNode:qi},ve={parse(){return this.createSingleNodeList(this.SelectorList())}},Bt={parse(){return this.createSingleNodeList(this.Selector())}},Jn={parse(){return this.createSingleNodeList(this.Identifier())}},ut={parse(){return this.createSingleNodeList(this.Nth())}},ji={dir:Jn,has:ve,lang:Jn,matches:ve,is:ve,"-moz-any":ve,"-webkit-any":ve,where:ve,not:ve,"nth-child":ut,"nth-last-child":ut,"nth-last-of-type":ut,"nth-of-type":ut,slotted:Bt,host:Bt,"host-context":Bt},he=43,H=45,ht=110,Ae=!0,Ui=!1;function ft(t,e){let n=this.tokenStart+t;const r=this.charCodeAt(n);for((r===he||r===H)&&(e&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)G(this.charCodeAt(n))||this.error("Integer is expected",n)}function Ne(t){return ft.call(this,0,t)}function Se(t,e){if(!this.cmpChar(this.tokenStart+t,e)){let n="";switch(e){case ht:n="N is expected";break;case H:n="HyphenMinus is expected";break}this.error(n,this.tokenStart+t)}}function jt(){let t=0,e=0,n=this.tokenType;for(;n===ie||n===we;)n=this.lookupType(++t);if(n!==L)if(this.isDelim(he,t)||this.isDelim(H,t)){e=this.isDelim(he,t)?he:H;do n=this.lookupType(++t);while(n===ie||n===we);n!==L&&(this.skip(t),Ne.call(this,Ae))}else return null;return t>0&&this.skip(t),e===0&&(n=this.charCodeAt(this.tokenStart),n!==he&&n!==H&&this.error("Number sign is expected")),Ne.call(this,e!==0),e===H?"-"+this.consume(L):this.consume(L)}function Vi(){const t=this.tokenStart;let e=null,n=null;if(this.tokenType===L)Ne.call(this,Ui),n=this.consume(L);else if(this.tokenType===k&&this.cmpChar(this.tokenStart,H))switch(e="-1",Se.call(this,1,ht),this.tokenEnd-this.tokenStart){case 2:this.next(),n=jt.call(this);break;case 3:Se.call(this,2,H),this.next(),this.skipSC(),Ne.call(this,Ae),n="-"+this.consume(L);break;default:Se.call(this,2,H),ft.call(this,3,Ae),this.next(),n=this.substrToCursor(t+2)}else if(this.tokenType===k||this.isDelim(he)&&this.lookupType(1)===k){let r=0;switch(e="1",this.isDelim(he)&&(r=1,this.next()),Se.call(this,0,ht),this.tokenEnd-this.tokenStart){case 1:this.next(),n=jt.call(this);break;case 2:Se.call(this,1,H),this.next(),this.skipSC(),Ne.call(this,Ae),n="-"+this.consume(L);break;default:Se.call(this,1,H),ft.call(this,2,Ae),this.next(),n=this.substrToCursor(t+r+1)}}else if(this.tokenType===T){const r=this.charCodeAt(this.tokenStart),i=r===he||r===H;let o=this.tokenStart+i;for(;o<this.tokenEnd&&G(this.charCodeAt(o));o++);o===this.tokenStart+i&&this.error("Integer is expected",this.tokenStart+i),Se.call(this,o-this.tokenStart,ht),e=this.substring(t,o),o+1===this.tokenEnd?(this.next(),n=jt.call(this)):(Se.call(this,o-this.tokenStart+1,H),o+2===this.tokenEnd?(this.next(),this.skipSC(),Ne.call(this,Ae),n="-"+this.consume(L)):(ft.call(this,o-this.tokenStart+2,Ae),this.next(),n=this.substrToCursor(o+1)))}else this.error();return e!==null&&e.charCodeAt(0)===he&&(e=e.substr(1)),n!==null&&n.charCodeAt(0)===he&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(t,this.tokenStart),a:e,b:n}}function Gi(t){if(t.a){const e=t.a==="+1"&&"n"||t.a==="1"&&"n"||t.a==="-1"&&"-n"||t.a+"n";if(t.b){const n=t.b[0]==="-"||t.b[0]==="+"?t.b:"+"+t.b;this.tokenize(e+n)}else this.tokenize(e)}else this.tokenize(t.b)}const Hi=36,Xn=42,pt=61,Wi=94,Ut=124,Ki=126;function Qi(){this.eof&&this.error("Unexpected end of input");const t=this.tokenStart;let e=!1;return this.isDelim(Xn)?(e=!0,this.next()):this.isDelim(Ut)||this.eat(k),this.isDelim(Ut)?this.charCodeAt(this.tokenStart+1)!==pt?(this.next(),this.eat(k)):e&&this.error("Identifier is expected",this.tokenEnd):e&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}function Yi(){const t=this.tokenStart,e=this.charCodeAt(t);return e!==pt&&e!==Ki&&e!==Wi&&e!==Hi&&e!==Xn&&e!==Ut&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),e!==pt&&(this.isDelim(pt)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(t)}function Ji(){const t=this.tokenStart;let e,n=null,r=null,i=null;return this.eat(Be),this.skipSC(),e=Qi.call(this),this.skipSC(),this.tokenType!==tt&&(this.tokenType!==k&&(n=Yi.call(this),this.skipSC(),r=this.tokenType===qe?this.String():this.Identifier(),this.skipSC()),this.tokenType===k&&(i=this.consume(k),this.skipSC())),this.eat(tt),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:n,value:r,flags:i}}function Xi(t){this.token(O,"["),this.node(t.name),t.matcher!==null&&(this.tokenize(t.matcher),this.node(t.value)),t.flags!==null&&this.token(k,t.flags),this.token(O,"]")}const Zi=46;function es(){return this.eatDelim(Zi),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(k)}}function ts(t){this.token(O,"."),this.token(k,t.name)}const ns=43,Zn=47,rs=62,is=126;function ss(){const t=this.tokenStart;let e;switch(this.tokenType){case ie:e=" ";break;case O:switch(this.charCodeAt(this.tokenStart)){case rs:case ns:case is:this.next();break;case Zn:this.next(),this.eatIdent("deep"),this.eatDelim(Zn);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t);break}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function os(t){this.tokenize(t.name)}function as(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(k)}}function ls(t){this.token(k,t.name)}function cs(){const t=this.tokenStart;return this.eat(D),{type:"IdSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t+1)}}function us(t){this.token(O,"#"+t.name)}const hs=38;function fs(){const t=this.tokenStart;return this.eatDelim(hs),{type:"NestingSelector",loc:this.getLocation(t,this.tokenStart)}}function ps(){this.token(O,"&")}function ds(){this.skipSC();const t=this.tokenStart;let e=t,n=null,r;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?r=this.Identifier():r=this.AnPlusB(),e=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),e=this.tokenStart),{type:"Nth",loc:this.getLocation(t,e),nth:r,selector:n}}function ms(t){this.node(t.nth),t.selector!==null&&(this.token(k,"of"),this.node(t.selector))}function gs(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(P)}}function ks(t){this.token(P,t.value+"%")}function ys(){const t=this.tokenStart;let e=null,n,r;return this.eat(Q),this.tokenType===I?(n=this.consumeFunctionName(),r=n.toLowerCase(),hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),e=this.pseudo[r].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(this.tokenIndex,null,!1))),this.eat(R)):n=this.consume(k),{type:"PseudoClassSelector",loc:this.getLocation(t,this.tokenStart),name:n,children:e}}function Ss(t){this.token(Q,":"),t.children===null?this.token(k,t.name):(this.token(I,t.name+"("),this.children(t),this.token(R,")"))}function xs(){const t=this.tokenStart;let e=null,n,r;return this.eat(Q),this.eat(Q),this.tokenType===I?(n=this.consumeFunctionName(),r=n.toLowerCase(),hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),e=this.pseudo[r].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(this.tokenIndex,null,!1))),this.eat(R)):n=this.consume(k),{type:"PseudoElementSelector",loc:this.getLocation(t,this.tokenStart),name:n,children:e}}function Cs(t){this.token(Q,":"),this.token(Q,":"),t.children===null?this.token(k,t.name):(this.token(I,t.name+"("),this.children(t),this.token(R,")"))}function bs(){return this.tokenIndex>0&&this.lookupType(-1)===ie?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}function ws(t,e,n){const r=this.getTokenStart(t);let i;return this.skipUntilBalanced(t,e||this.consumeUntilBalanceEnd),n&&this.tokenStart>r?i=bs.call(this):i=this.tokenStart,{type:"Raw",loc:this.getLocation(r,i),value:this.substring(r,i)}}function vs(t){this.tokenize(t.value)}function As(){const t=this.readSequence(this.scope.Selector);return this.getFirstListNode(t)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(t),children:t}}function Ls(t){this.children(t)}function Es(){const t=this.createList();for(;!this.eof;){if(t.push(this.Selector()),this.tokenType===et){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(t),children:t}}function _s(t){this.children(t,()=>this.token(et,","))}const Vt=92,er=34,Ts=39;function Os(t){const e=t.length,n=t.charCodeAt(0),r=n===er||n===Ts?1:0,i=r===1&&e>1&&t.charCodeAt(e-1)===n?e-2:e-1;let o="";for(let a=r;a<=i;a++){let f=t.charCodeAt(a);if(f===Vt){if(a===i){a!==e-1&&(o=t.substr(a+1));break}if(f=t.charCodeAt(++a),pe(Vt,f)){const c=a-1,s=Ve(t,c);a=s-1,o+=Si(t.substring(c+1,s))}else f===13&&t.charCodeAt(a+1)===10&&a++}else o+=t[a]}return o}function Is(t,e){const n='"',r=er;let i="",o=!1;for(let a=0;a<t.length;a++){const f=t.charCodeAt(a);if(f===0){i+="�";continue}if(f<=31||f===127){i+="\\"+f.toString(16),o=!0;continue}f===r||f===Vt?(i+="\\"+t.charAt(a),o=!1):(o&&(je(f)||Ue(f))&&(i+=" "),i+=t.charAt(a),o=!1)}return n+i+n}function Ns(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Os(this.consume(qe))}}function $s(t){this.token(qe,Is(t.value))}const Ps=42,tr=124;function Gt(){this.tokenType!==k&&this.isDelim(Ps)===!1&&this.error("Identifier or asterisk is expected"),this.next()}function Ds(){const t=this.tokenStart;return this.isDelim(tr)?(this.next(),Gt.call(this)):(Gt.call(this),this.isDelim(tr)&&(this.next(),Gt.call(this))),{type:"TypeSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}function Ms(t){this.tokenize(t.name)}const nr=Oi({parseContext:{default:"SelectorList",selectorList:"SelectorList",selector:"Selector"},scope:{Selector:Bi},atrule:{},pseudo:ji,node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:Vi,AttributeSelector:Ji,ClassSelector:es,Combinator:ss,IdSelector:cs,Identifier:as,NestingSelector:fs,Nth:ds,Percentage:gs,PseudoClassSelector:ys,PseudoElementSelector:xs,Raw:ws,Selector:As,SelectorList:Es,String:Ns,TypeSelector:Ds},Symbol.toStringTag,{value:"Module"}))});var Ht={},Wt={},rr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Wt.encode=function(t){if(0<=t&&t<rr.length)return rr[t];throw new TypeError("Must be between 0 and 63: "+t)},Wt.decode=function(t){var e=65,n=90,r=97,i=122,o=48,a=57,f=43,c=47,s=26,l=52;return e<=t&&t<=n?t-e:r<=t&&t<=i?t-r+s:o<=t&&t<=a?t-o+l:t==f?62:t==c?63:-1};var ir=Wt,Kt=5,sr=1<<Kt,or=sr-1,ar=sr;function zs(t){return t<0?(-t<<1)+1:(t<<1)+0}function Fs(t){var e=(t&1)===1,n=t>>1;return e?-n:n}Ht.encode=function(e){var n="",r,i=zs(e);do r=i&or,i>>>=Kt,i>0&&(r|=ar),n+=ir.encode(r);while(i>0);return n},Ht.decode=function(e,n,r){var i=e.length,o=0,a=0,f,c;do{if(n>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=ir.decode(e.charCodeAt(n++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));f=!!(c&ar),c&=or,o=o+(c<<a),a+=Kt}while(f);r.value=Fs(o),r.rest=n};var dt={};(function(t){function e(u,h,g){if(h in u)return u[h];if(arguments.length===3)return g;throw new Error('"'+h+'" is a required argument.')}t.getArg=e;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(u){var h=u.match(n);return h?{scheme:h[1],auth:h[2],host:h[3],port:h[4],path:h[5]}:null}t.urlParse=i;function o(u){var h="";return u.scheme&&(h+=u.scheme+":"),h+="//",u.auth&&(h+=u.auth+"@"),u.host&&(h+=u.host),u.port&&(h+=":"+u.port),u.path&&(h+=u.path),h}t.urlGenerate=o;var a=32;function f(u){var h=[];return function(g){for(var p=0;p<h.length;p++)if(h[p].input===g){var ee=h[0];return h[0]=h[p],h[p]=ee,h[0].result}var U=u(g);return h.unshift({input:g,result:U}),h.length>a&&h.pop(),U}}var c=f(function(h){var g=h,p=i(h);if(p){if(!p.path)return h;g=p.path}for(var ee=t.isAbsolute(g),U=[],xe=0,z=0;;)if(xe=z,z=g.indexOf("/",xe),z===-1){U.push(g.slice(xe));break}else for(U.push(g.slice(xe,z));z<g.length&&g[z]==="/";)z++;for(var Ce,ke=0,z=U.length-1;z>=0;z--)Ce=U[z],Ce==="."?U.splice(z,1):Ce===".."?ke++:ke>0&&(Ce===""?(U.splice(z+1,ke),ke=0):(U.splice(z,2),ke--));return g=U.join("/"),g===""&&(g=ee?"/":"."),p?(p.path=g,o(p)):g});t.normalize=c;function s(u,h){u===""&&(u="."),h===""&&(h=".");var g=i(h),p=i(u);if(p&&(u=p.path||"/"),g&&!g.scheme)return p&&(g.scheme=p.scheme),o(g);if(g||h.match(r))return h;if(p&&!p.host&&!p.path)return p.host=h,o(p);var ee=h.charAt(0)==="/"?h:c(u.replace(/\/+$/,"")+"/"+h);return p?(p.path=ee,o(p)):ee}t.join=s,t.isAbsolute=function(u){return u.charAt(0)==="/"||n.test(u)};function l(u,h){u===""&&(u="."),u=u.replace(/\/$/,"");for(var g=0;h.indexOf(u+"/")!==0;){var p=u.lastIndexOf("/");if(p<0||(u=u.slice(0,p),u.match(/^([^\/]+:\/)?\/*$/)))return h;++g}return Array(g+1).join("../")+h.substr(u.length+1)}t.relative=l;var m=function(){var u=Object.create(null);return!("__proto__"in u)}();function S(u){return u}function b(u){return j(u)?"$"+u:u}t.toSetString=m?S:b;function X(u){return j(u)?u.slice(1):u}t.fromSetString=m?S:X;function j(u){if(!u)return!1;var h=u.length;if(h<9||u.charCodeAt(h-1)!==95||u.charCodeAt(h-2)!==95||u.charCodeAt(h-3)!==111||u.charCodeAt(h-4)!==116||u.charCodeAt(h-5)!==111||u.charCodeAt(h-6)!==114||u.charCodeAt(h-7)!==112||u.charCodeAt(h-8)!==95||u.charCodeAt(h-9)!==95)return!1;for(var g=h-10;g>=0;g--)if(u.charCodeAt(g)!==36)return!1;return!0}function le(u,h,g){var p=Z(u.source,h.source);return p!==0||(p=u.originalLine-h.originalLine,p!==0)||(p=u.originalColumn-h.originalColumn,p!==0||g)||(p=u.generatedColumn-h.generatedColumn,p!==0)||(p=u.generatedLine-h.generatedLine,p!==0)?p:Z(u.name,h.name)}t.compareByOriginalPositions=le;function Ee(u,h,g){var p;return p=u.originalLine-h.originalLine,p!==0||(p=u.originalColumn-h.originalColumn,p!==0||g)||(p=u.generatedColumn-h.generatedColumn,p!==0)||(p=u.generatedLine-h.generatedLine,p!==0)?p:Z(u.name,h.name)}t.compareByOriginalPositionsNoSource=Ee;function De(u,h,g){var p=u.generatedLine-h.generatedLine;return p!==0||(p=u.generatedColumn-h.generatedColumn,p!==0||g)||(p=Z(u.source,h.source),p!==0)||(p=u.originalLine-h.originalLine,p!==0)||(p=u.originalColumn-h.originalColumn,p!==0)?p:Z(u.name,h.name)}t.compareByGeneratedPositionsDeflated=De;function Ke(u,h,g){var p=u.generatedColumn-h.generatedColumn;return p!==0||g||(p=Z(u.source,h.source),p!==0)||(p=u.originalLine-h.originalLine,p!==0)||(p=u.originalColumn-h.originalColumn,p!==0)?p:Z(u.name,h.name)}t.compareByGeneratedPositionsDeflatedNoLine=Ke;function Z(u,h){return u===h?0:u===null?1:h===null?-1:u>h?1:-1}function St(u,h){var g=u.generatedLine-h.generatedLine;return g!==0||(g=u.generatedColumn-h.generatedColumn,g!==0)||(g=Z(u.source,h.source),g!==0)||(g=u.originalLine-h.originalLine,g!==0)||(g=u.originalColumn-h.originalColumn,g!==0)?g:Z(u.name,h.name)}t.compareByGeneratedPositionsInflated=St;function xt(u){return JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}t.parseSourceMapInput=xt;function Ct(u,h,g){if(h=h||"",u&&(u[u.length-1]!=="/"&&h[0]!=="/"&&(u+="/"),h=u+h),g){var p=i(g);if(!p)throw new Error("sourceMapURL could not be parsed");if(p.path){var ee=p.path.lastIndexOf("/");ee>=0&&(p.path=p.path.substring(0,ee+1))}h=s(o(p),h)}return c(h)}t.computeSourceURL=Ct})(dt);var lr={},Qt=dt,Yt=Object.prototype.hasOwnProperty,Le=typeof Map<"u";function de(){this._array=[],this._set=Le?new Map:Object.create(null)}de.fromArray=function(e,n){for(var r=new de,i=0,o=e.length;i<o;i++)r.add(e[i],n);return r},de.prototype.size=function(){return Le?this._set.size:Object.getOwnPropertyNames(this._set).length},de.prototype.add=function(e,n){var r=Le?e:Qt.toSetString(e),i=Le?this.has(e):Yt.call(this._set,r),o=this._array.length;(!i||n)&&this._array.push(e),i||(Le?this._set.set(e,o):this._set[r]=o)},de.prototype.has=function(e){if(Le)return this._set.has(e);var n=Qt.toSetString(e);return Yt.call(this._set,n)},de.prototype.indexOf=function(e){if(Le){var n=this._set.get(e);if(n>=0)return n}else{var r=Qt.toSetString(e);if(Yt.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},de.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},de.prototype.toArray=function(){return this._array.slice()},lr.ArraySet=de;var cr={},ur=dt;function Rs(t,e){var n=t.generatedLine,r=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return r>n||r==n&&o>=i||ur.compareByGeneratedPositionsInflated(t,e)<=0}function mt(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}mt.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},mt.prototype.add=function(e){Rs(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},mt.prototype.toArray=function(){return this._sorted||(this._array.sort(ur.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},cr.MappingList=mt;var Ge=Ht,$=dt,gt=lr.ArraySet,qs=cr.MappingList;function J(t){t||(t={}),this._file=$.getArg(t,"file",null),this._sourceRoot=$.getArg(t,"sourceRoot",null),this._skipValidation=$.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=$.getArg(t,"ignoreInvalidMapping",!1),this._sources=new gt,this._names=new gt,this._mappings=new qs,this._sourcesContents=null}J.prototype._version=3,J.fromSourceMap=function(e,n){var r=e.sourceRoot,i=new J(Object.assign(n||{},{file:e.file,sourceRoot:r}));return e.eachMapping(function(o){var a={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(a.source=o.source,r!=null&&(a.source=$.relative(r,a.source)),a.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(a.name=o.name)),i.addMapping(a)}),e.sources.forEach(function(o){var a=o;r!==null&&(a=$.relative(r,o)),i._sources.has(a)||i._sources.add(a);var f=e.sourceContentFor(o);f!=null&&i.setSourceContent(o,f)}),i},J.prototype.addMapping=function(e){var n=$.getArg(e,"generated"),r=$.getArg(e,"original",null),i=$.getArg(e,"source",null),o=$.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(n,r,i,o)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:o}))},J.prototype.setSourceContent=function(e,n){var r=e;this._sourceRoot!=null&&(r=$.relative(this._sourceRoot,r)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[$.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[$.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},J.prototype.applySourceMap=function(e,n,r){var i=n;if(n==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var o=this._sourceRoot;o!=null&&(i=$.relative(o,i));var a=new gt,f=new gt;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var s=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});s.source!=null&&(c.source=s.source,r!=null&&(c.source=$.join(r,c.source)),o!=null&&(c.source=$.relative(o,c.source)),c.originalLine=s.line,c.originalColumn=s.column,s.name!=null&&(c.name=s.name))}var l=c.source;l!=null&&!a.has(l)&&a.add(l);var m=c.name;m!=null&&!f.has(m)&&f.add(m)},this),this._sources=a,this._names=f,e.sources.forEach(function(c){var s=e.sourceContentFor(c);s!=null&&(r!=null&&(c=$.join(r,c)),o!=null&&(c=$.relative(o,c)),this.setSourceContent(c,s))},this)},J.prototype._validateMapping=function(e,n,r,i){if(n&&typeof n.line!="number"&&typeof n.column!="number"){var o="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(o),!1;throw new Error(o)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!n&&!r&&!i)){if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r)return;var o="Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(o),!1;throw new Error(o)}},J.prototype._serializeMappings=function(){for(var e=0,n=1,r=0,i=0,o=0,a=0,f="",c,s,l,m,S=this._mappings.toArray(),b=0,X=S.length;b<X;b++){if(s=S[b],c="",s.generatedLine!==n)for(e=0;s.generatedLine!==n;)c+=";",n++;else if(b>0){if(!$.compareByGeneratedPositionsInflated(s,S[b-1]))continue;c+=","}c+=Ge.encode(s.generatedColumn-e),e=s.generatedColumn,s.source!=null&&(m=this._sources.indexOf(s.source),c+=Ge.encode(m-a),a=m,c+=Ge.encode(s.originalLine-1-i),i=s.originalLine-1,c+=Ge.encode(s.originalColumn-r),r=s.originalColumn,s.name!=null&&(l=this._names.indexOf(s.name),c+=Ge.encode(l-o),o=l)),f+=c}return f},J.prototype._generateSourcesContent=function(e,n){return e.map(function(r){if(!this._sourcesContents)return null;n!=null&&(r=$.relative(n,r));var i=$.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)},J.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},J.prototype.toString=function(){return JSON.stringify(this.toJSON())};var Bs=J;const hr=new Set(["Atrule","Selector","Declaration"]);function js(t){const e=new Bs,n={line:1,column:0},r={line:0,column:0},i={line:1,column:0},o={generated:i};let a=1,f=0,c=!1;const s=t.node;t.node=function(S){if(S.loc&&S.loc.start&&hr.has(S.type)){const b=S.loc.start.line,X=S.loc.start.column-1;(r.line!==b||r.column!==X)&&(r.line=b,r.column=X,n.line=a,n.column=f,c&&(c=!1,(n.line!==i.line||n.column!==i.column)&&e.addMapping(o)),c=!0,e.addMapping({source:S.loc.source,original:r,generated:n}))}s.call(this,S),c&&hr.has(S.type)&&(i.line=a,i.column=f)};const l=t.emit;t.emit=function(S,b,X){for(let j=0;j<S.length;j++)S.charCodeAt(j)===10?(a++,f=0):f++;l(S,b,X)};const m=t.result;return t.result=function(){return c&&e.addMapping(o),{css:m(),map:e}},t}const Us=43,Vs=45,Jt=(t,e)=>{if(t===O&&(t=e),typeof t=="string"){const n=t.charCodeAt(0);return n>127?32768:n<<8}return t},fr=[[k,k],[k,I],[k,ne],[k,re],[k,"-"],[k,L],[k,P],[k,T],[k,se],[k,be],[B,k],[B,I],[B,ne],[B,re],[B,"-"],[B,L],[B,P],[B,T],[B,se],[D,k],[D,I],[D,ne],[D,re],[D,"-"],[D,L],[D,P],[D,T],[D,se],[T,k],[T,I],[T,ne],[T,re],[T,"-"],[T,L],[T,P],[T,T],[T,se],["#",k],["#",I],["#",ne],["#",re],["#","-"],["#",L],["#",P],["#",T],["#",se],["-",k],["-",I],["-",ne],["-",re],["-","-"],["-",L],["-",P],["-",T],["-",se],[L,k],[L,I],[L,ne],[L,re],[L,L],[L,P],[L,T],[L,"%"],[L,se],["@",k],["@",I],["@",ne],["@",re],["@","-"],["@",se],[".",L],[".",P],[".",T],["+",L],["+",P],["+",T],["/","*"]],Gs=fr.concat([[k,D],[T,D],[D,D],[B,be],[B,qe],[B,Q],[P,P],[P,T],[P,I],[P,"-"],[R,k],[R,I],[R,P],[R,T],[R,D],[R,"-"]]);function pr(t){const e=new Set(t.map(([n,r])=>Jt(n)<<16|Jt(r)));return function(n,r,i){const o=Jt(r,i),a=i.charCodeAt(0);return(a===Vs&&r!==k&&r!==I&&r!==se||a===Us?e.has(n<<16|a<<8):e.has(n<<16|o))&&this.emit(" ",ie,!0),o}}const Hs=pr(fr),dr=pr(Gs),mr=Object.freeze(Object.defineProperty({__proto__:null,safe:dr,spec:Hs},Symbol.toStringTag,{value:"Module"})),Ws=92;function Ks(t,e){if(typeof e=="function"){let n=null;t.children.forEach(r=>{n!==null&&e.call(this,n),this.node(r),n=r});return}t.children.forEach(this.node,this)}function Qs(t){Hn(t,(e,n,r)=>{this.token(e,t.slice(n,r))})}function Ys(t){const e=new Map;for(let n in t.node){const r=t.node[n];typeof(r.generate||r)=="function"&&e.set(n,r.generate||r)}return function(n,r){let i="",o=0,a={node(c){if(e.has(c.type))e.get(c.type).call(f,c);else throw new Error("Unknown node type: "+c.type)},tokenBefore:dr,token(c,s){o=this.tokenBefore(o,c,s),this.emit(s,c,!1),c===O&&s.charCodeAt(0)===Ws&&this.emit(`
|
|
6
|
-
`,ie,!0)},emit(c){i+=c},result(){return i}};r&&(typeof r.decorator=="function"&&(a=r.decorator(a)),r.sourceMap&&(a=js(a)),r.mode in mr&&(a.tokenBefore=mr[r.mode]));const f={node:c=>a.node(c),children:Ks,token:(c,s)=>a.token(c,s),tokenize:Qs};return a.node(n),a.result()}}function Js(t){this.token(B,"@"+t.name),t.prelude!==null&&this.node(t.prelude),t.block?this.node(t.block):this.token(Ze,";")}function Xs(t){this.children(t)}function Zs(t){this.token(nt,"{"),this.children(t,e=>{e.type==="Declaration"&&this.token(Ze,";")}),this.token(Tt,"}")}function eo(t){this.token(O,"["),this.children(t),this.token(O,"]")}function to(){this.token(se,"-->")}function no(){this.token(Dn,"<!--")}function ro(t){this.token(we,"/*"+t.value+"*/")}function io(t){this.token(k,t.property),this.token(Q,":"),this.node(t.value),t.important&&(this.token(O,"!"),this.token(k,t.important===!0?"important":t.important))}function so(t){this.children(t,e=>{e.type==="Declaration"&&this.token(Ze,";")})}function oo(t){this.token(T,t.value+t.unit)}function ao(t){this.token(I,t.name+"("),this.children(t),this.token(R,")")}function lo(t){this.token(D,"#"+t.value)}function co(t){this.token(be,"("),this.token(k,t.name),t.value!==null&&(this.token(Q,":"),this.node(t.value)),this.token(R,")")}function uo(t){this.children(t)}function ho(t){this.children(t,()=>this.token(et,","))}function fo(t){this.token(L,t.value)}function po(t){this.tokenize(t.value)}function mo(t){this.token(be,"("),this.children(t),this.token(R,")")}function go(t){this.token(L,t.left),this.token(O,"/"),this.token(L,t.right)}function ko(t){this.node(t.prelude),this.node(t.block)}function yo(t){this.children(t)}function So(t){this.tokenize(t.value)}const xo=32,Co=92,bo=34,wo=39,vo=40,Ao=41;function Lo(t){let e="",n=!1;for(let r=0;r<t.length;r++){const i=t.charCodeAt(r);if(i===0){e+="�";continue}if(i<=31||i===127){e+="\\"+i.toString(16),n=!0;continue}i===xo||i===Co||i===bo||i===wo||i===vo||i===Ao?(e+="\\"+t.charAt(r),n=!1):(n&&je(i)&&(e+=" "),e+=t.charAt(r),n=!1)}return"url("+e+")"}function Eo(t){this.token(ne,Lo(t.value))}function _o(t){this.children(t)}function To(t){this.token(ie,t.value)}const Oo=Ys({node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:Gi,Atrule:Js,AtrulePrelude:Xs,AttributeSelector:Xi,Block:Zs,Brackets:eo,CDC:to,CDO:no,ClassSelector:ts,Combinator:os,Comment:ro,Declaration:io,DeclarationList:so,Dimension:oo,Function:ao,Hash:lo,IdSelector:us,Identifier:ls,MediaFeature:co,MediaQuery:uo,MediaQueryList:ho,NestingSelector:ps,Nth:ms,Number:fo,Operator:po,Parentheses:mo,Percentage:ks,PseudoClassSelector:Ss,PseudoElementSelector:Cs,Ratio:go,Raw:vs,Rule:ko,Selector:Ls,SelectorList:_s,String:$s,StyleSheet:yo,TypeSelector:Ms,UnicodeRange:So,Url:Eo,Value:_o,WhiteSpace:To},Symbol.toStringTag,{value:"Module"}))}),He=(t,e)=>t.a===e.a?t.b===e.b?t.c-e.c:t.b-e.b:t.a-e.a,gr=(t,e)=>He(t,e)===0,kr=(t,e)=>He(t,e)>0,yr=(t,e)=>He(t,e)<0,Sr=(t,e="ASC")=>{const n=t.sort(He);return e==="DESC"?n.reverse():n},xr=(...t)=>Sr(t,"ASC"),Cr=(...t)=>Sr(t,"DESC"),Xt=(...t)=>Cr(...t)[0],Io=(...t)=>xr(...t)[0];class No{constructor(e,n=null){this.value=e,this.selector=n}get a(){return this.value.a}set a(e){throw new Error("Manipulating the port of the specificity directly is not allowed. Instead, directly set a new value")}get b(){return this.value.b}set b(e){throw new Error("Manipulating the port of the specificity directly is not allowed. Instead, directly set a new value")}get c(){return this.value.c}set c(e){throw new Error("Manipulating the port of the specificity directly is not allowed. Instead, directly set a new value")}selectorString(){return typeof this.selector=="string"||this.selector instanceof String?this.selector:this.selector instanceof Object&&this.selector.type==="Selector"?Oo(this.selector):""}toObject(){return this.value}toArray(){return[this.value.a,this.value.b,this.value.c]}toString(){return`(${this.value.a},${this.value.b},${this.value.c})`}toJSON(){return{selector:this.selectorString(),asObject:this.toObject(),asArray:this.toArray(),asString:this.toString()}}isEqualTo(e){return gr(this,e)}isGreaterThan(e){return kr(this,e)}isLessThan(e){return yr(this,e)}static calculate(e){return $e(e)}static compare(e,n){return He(e,n)}static equals(e,n){return gr(e,n)}static lessThan(e,n){return yr(e,n)}static greaterThan(e,n){return kr(e,n)}static min(...e){return Io(...e)}static max(...e){return Xt(...e)}static sortAsc(...e){return xr(...e)}static sortDesc(...e){return Cr(...e)}}const br=t=>{const e={a:0,b:0,c:0};return t.children.forEach(n=>{switch(n.type){case"IdSelector":e.a+=1;break;case"AttributeSelector":case"ClassSelector":e.b+=1;break;case"PseudoClassSelector":switch(n.name.toLowerCase()){case"where":break;case"is":case"matches":case"-webkit-any":case"-moz-any":case"any":case"not":case"has":if(n.children){const i=Xt(...$e(n.children.first));e.a+=i.a,e.b+=i.b,e.c+=i.c}break;case"nth-child":case"nth-last-child":if(e.b+=1,n.children.first.selector){const i=Xt(...$e(n.children.first.selector));e.a+=i.a,e.b+=i.b,e.c+=i.c}break;case"host-context":case"host":if(e.b+=1,n.children){const i={type:"Selector",children:[]};let o=!1;n.children.first.children.forEach(f=>{if(o)return!1;if(f.type==="Combinator")return o=!0,!1;i.children.push(f)});const a=$e(i)[0];e.a+=a.a,e.b+=a.b,e.c+=a.c}break;case"after":case"before":case"first-letter":case"first-line":e.c+=1;break;default:e.b+=1;break}break;case"PseudoElementSelector":switch(n.name){case"slotted":if(e.c+=1,n.children){const i={type:"Selector",children:[]};let o=!1;n.children.first.children.forEach(f=>{if(o)return!1;if(f.type==="Combinator")return o=!0,!1;i.children.push(f)});const a=$e(i)[0];e.a+=a.a,e.b+=a.b,e.c+=a.c}break;case"view-transition-group":case"view-transition-image-pair":case"view-transition-old":case"view-transition-new":if(n.children&&n.children.first.value==="*")break;e.c+=1;break;default:e.c+=1;break}break;case"TypeSelector":let r=n.name;r.includes("|")&&(r=r.split("|")[1]),r!=="*"&&(e.c+=1);break}}),new No(e,t)},$o=t=>{if(typeof t=="string"||t instanceof String)try{return nr(t,{context:"selectorList"})}catch(e){throw new TypeError(`Could not convert passed in source '${t}' to SelectorList: ${e.message}`)}if(t instanceof Object){if(t.type&&["Selector","SelectorList"].includes(t.type))return t;if(t.type&&t.type==="Raw")try{return nr(t.value,{context:"selectorList"})}catch(e){throw new TypeError(`Could not convert passed in source to SelectorList: ${e.message}`)}throw new TypeError("Passed in source is an Object but no AST / AST of the type Selector or SelectorList")}throw new TypeError("Passed in source is not a String nor an Object. I don't know what to do with it.")},$e=t=>{if(!t)return[];const e=$o(t);if(e.type==="Selector")return[br(t)];if(e.type==="SelectorList"){const n=[];return e.children.forEach(r=>{const i=br(r);n.push(i)}),n}};function Zt(t,e){return e>=65&&e<=90&&(e=e|32),t===e}function W(t,e){if(t===e)return!0;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(Zt(t.charCodeAt(r),e.charCodeAt(r))===!1)return!1;return!0}function me(t,e){if(t===e)return!0;let n=e.length,r=n-t.length;if(r<0)return!1;for(let i=n-1;i>=r;i--)if(Zt(t.charCodeAt(i-r),e.charCodeAt(i))===!1)return!1;return!0}function en(t,e){if(t===e)return!0;let n=t.length;if(e.length<n)return!1;for(let r=0;r<n;r++)if(Zt(t.charCodeAt(r),e.charCodeAt(r))===!1)return!1;return!0}const Po="Atrule",Do="MediaQuery",Mo="MediaFeature",zo="Rule",tn="Selector",wr="TypeSelector",We="PseudoClassSelector",vr="AttributeSelector",Ar="PseudoElementSelector",nn="Declaration",Fo="Value",fe="Identifier",Ro="Nth",qo="Combinator",Bo="Number",Lr="Dimension",Pe="Operator",jo="Hash",Uo="Url",rn="Function";function Er(t,e,n){let r=t.value.children.first;return W(e,t.property)&&r.type===fe&&W(n,r.name)}function _r(t){let e=!1;return ue(t,function(n){if(n.type===nn&&(Er(n,"-webkit-appearance","none")||Er(n,"-moz-appearance","meterbar")))return e=!0,this.break}),e}function Tr(t){let e=!1;return ue(t,function(n){let r=n.children,i=n.name,o=n.value;if(n.type===Do&&r.size===1&&r.first.type===fe){let a=r.first.name;if(en("\\0",a)||me("\\9 ",a))return e=!0,this.break}else if(n.type===Mo){if(o!==null&&o.unit==="\\0")return e=!0,this.break;if(W("-moz-images-in-menus",i)||W("min--moz-device-pixel-ratio",i)||W("-ms-high-contrast",i))return e=!0,this.break;if(W("min-resolution",i)&&W(".001",o.value)&&W("dpcm",o.unit))return e=!0,this.break;if(W("-webkit-min-device-pixel-ratio",i)){let a=o.value;if(W("0",a)||W("10000",a))return e=!0,this.break}}}),e}const Or=45;function ge(t){return t.charCodeAt(0)===Or&&t.charCodeAt(1)!==Or&&t.indexOf("-",2)!==-1}class oe{constructor(e){this.set=new Set(e)}has(e){return this.set.has(e.toLowerCase())}}function Ir(t,e){let n=[];return ue(t,{visit:tn,enter:function(r){n.push(e(r))}}),n}const Nr=new oe(["nth-child","where","not","is","has","nth-last-child","matches","-webkit-any","-moz-any"]);function sn(t){let e=!1;return ue(t,function(n){if(n.type===vr){let r=n.name.name;if(W("role",r)||en("aria-",r))return e=!0,this.break}else if(n.type===We&&Nr.has(n.name)){let r=Ir(n,sn);for(let i of r)if(i===!0){e=!0;break}return this.skip}}),e}function $r(t){let e=!1;return ue(t,function(n){let r=n.type;if((r===Ar||r===wr||r===We)&&ge(n.name))return e=!0,this.break}),e}function Vo(t){let e=[];return ue(t,function(n){n.type===We&&e.push(n.name)}),e.length===0?!1:e}function on(t){let e=0;return ue(t,function(n){let r=n.type;if(!(r===tn||r===Ro)){if(e++,(r===Ar||r===wr||r===We)&&ge(n.name)&&e++,r===vr)return n.value&&e++,this.skip;if(r===We&&Nr.has(n.name)){let i=Ir(n,on);if(i.length===0)return;for(let o of i)e+=o;return this.skip}}}),e}function Go(t,e){ue(t,function(n,r){if(n.type===qo){let i=n.loc,o=n.name;if(i===null){let a=r.prev.data.loc.end,f={offset:a.offset,line:a.line,column:a.column};e({name:o,loc:{start:f,end:{offset:f.offset+1,line:f.line,column:f.column+1}}})}else e({name:o,loc:i})}})}const Ho=new oe(["white","black","red","gray","silver","grey","green","orange","blue","dimgray","whitesmoke","lightgray","lightgrey","yellow","gold","pink","gainsboro","magenta","purple","darkgray","navy","darkred","teal","maroon","darkgrey","tomato","darkorange","brown","crimson","lightyellow","slategray","salmon","lightgreen","lightblue","orangered","aliceblue","dodgerblue","lime","darkblue","darkgoldenrod","skyblue","royalblue","darkgreen","ivory","olive","aqua","turquoise","cyan","khaki","beige","snow","ghostwhite","limegreen","coral","dimgrey","hotpink","midnightblue","firebrick","indigo","wheat","mediumblue","lightpink","plum","azure","violet","lavender","deepskyblue","darkslategrey","goldenrod","cornflowerblue","lightskyblue","indianred","yellowgreen","saddlebrown","palegreen","bisque","tan","antiquewhite","steelblue","forestgreen","fuchsia","mediumaquamarine","seagreen","sienna","deeppink","mediumseagreen","peru","greenyellow","lightgoldenrodyellow","orchid","cadetblue","navajowhite","lightsteelblue","slategrey","linen","lightseagreen","darkcyan","lightcoral","aquamarine","blueviolet","cornsilk","lightsalmon","chocolate","lightslategray","floralwhite","darkturquoise","darkslategray","rebeccapurple","burlywood","chartreuse","lightcyan","lemonchiffon","palevioletred","darkslateblue","mediumpurple","lawngreen","slateblue","darkseagreen","blanchedalmond","mistyrose","darkolivegreen","seashell","olivedrab","peachpuff","darkviolet","powderblue","darkmagenta","lightslategrey","honeydew","palegoldenrod","darkkhaki","oldlace","mintcream","sandybrown","mediumturquoise","papayawhip","paleturquoise","mediumvioletred","thistle","springgreen","moccasin","rosybrown","lavenderblush","mediumslateblue","darkorchid","mediumorchid","darksalmon","mediumspringgreen"]),Wo=new oe(["accentcolor","accentcolortext","activetext","buttonborder","buttonface","buttontext","canvas","canvastext","field","fieldtext","graytext","highlight","highlighttext","linktext","mark","marktext","selecteditem","selecteditemtext","visitedtext"]),Ko=new oe(["rgba","rgb","hsla","hsl","oklch","color","hwb","lch","lab","oklab"]),Qo=new oe(["transparent","currentcolor"]),kt=new oe(["auto","none","inherit","initial","unset","revert","revert-layer"]);function yt(t){let e=t.children,n=e.size;if(!e||n>1||n===0)return!1;let r=e.first;return r.type===fe&&kt.has(r.name)}const Yo=new oe(["caption","icon","menu","message-box","small-caption","status-bar"]),Jo=new oe(["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","smaller","larger"]),Xo=44,Pr=47;function an(t){let e=t.children.first;return e===null?!1:e.type===fe&&Yo.has(e.name)}function Zo(t,e,n){let r=Array.from({length:2}),i,o;t.children.forEach(function(f,c){let s=c.prev?c.prev.data:void 0,l=c.next?c.next.data:void 0;if(f.type===fe&&kt.has(f.name)&&n({type:"keyword",value:f.name}),l&&l.type===Pe&&l.value.charCodeAt(0)===Pr){i=e(f);return}if(s&&s.type===Pe&&s.value.charCodeAt(0)===Pr){o=e(f);return}if(l&&l.type===Pe&&l.value.charCodeAt(0)===Xo&&!r[0]){r[0]=f,!i&&s&&(i=e(s));return}if(f.type!==Bo){if(c.next===null){r[1]=f,!i&&!r[0]&&s&&(i=e(s));return}if(f.type===fe){let m=f.name;if(Jo.has(m)){i=m;return}}}});let a=r[0]||r[1]?e({loc:{start:{offset:(r[0]||r[1]).loc.start.offset},end:{offset:r[1].loc.end.offset}}}):null;return{font_size:i,line_height:o,font_family:a}}const ea=new oe(["linear","ease","ease-in","ease-out","ease-in-out","step-start","step-end"]),ta=new oe(["cubic-bezier","steps"]);function na(t,e){let n=!1;for(let r of t){let i=r.type,o=r.name;i===Pe?n=!1:i===Lr&&n===!1?(n=!0,e({type:"duration",value:r})):i===fe?ea.has(o)?e({type:"fn",value:r}):kt.has(o)&&e({type:"keyword",value:r}):i===rn&&ta.has(o)&&e({type:"fn",value:r})}}function ln(t){let e=t.children;if(!e)return!1;for(let n of e){let{type:r,name:i}=n;if(r===fe&&ge(i)||r===rn&&(ge(i)||ln(n)))return!0}return!1}class x{constructor(e=!1){this._items=new Map,this._total=0,e&&(this._nodes=[]),this._useLocations=e}p(e,n){let r=this._total;if(this._useLocations){let i=n.start,o=i.offset,a=r*4;this._nodes[a]=i.line,this._nodes[a+1]=i.column,this._nodes[a+2]=o,this._nodes[a+3]=n.end.offset-o}if(this._items.has(e)){this._items.get(e).push(r),this._total++;return}this._items.set(e,[r]),this._total++}size(){return this._total}c(){let e=new Map,n={},r=this._useLocations,i=this._items,o=this._nodes,a=i.size;i.forEach((s,l)=>{if(r){let m=s.map(function(S){let b=S*4;return{line:o[b],column:o[b+1],offset:o[b+2],length:o[b+3]}});e.set(l,m)}else n[l]=s.length});let f=this._total,c={total:f,totalUnique:a,unique:n,uniquenessRatio:f===0?0:a/f};return r&&(c.uniqueWithLocations=Object.fromEntries(e)),c}}class cn{constructor(e){this._list=new x(e),this._contexts=new Map,this._useLocations=e}push(e,n,r){this._list.p(e,r),this._contexts.has(n)||this._contexts.set(n,new x(this._useLocations)),this._contexts.get(n).p(e,r)}count(){let e=new Map;for(let[n,r]of this._contexts.entries())e.set(n,r.c());return Object.assign(this._list.c(),{itemsPerContext:Object.fromEntries(e)})}}function ra(t){let e=new Map,n=-1,r=0,i=0,o=t.length;for(let a=0;a<o;a++){let f=t[a],c=(e.get(f)||0)+1;e.set(f,c),c>n&&(n=c,r=0,i=0),c>=n&&(r++,i+=f)}return i/r}class ae{constructor(){this._items=[],this._sum=0}push(e){this._items.push(e),this._sum+=e}size(){return this._items.length}aggregate(){let e=this._items.length;if(e===0)return{min:0,max:0,mean:0,mode:0,range:0,sum:0};let n=this._items.slice().sort((f,c)=>f-c),r=n[0],i=n[e-1],o=ra(n),a=this._sum;return{min:r,max:i,mean:a/e,mode:o,range:i-r,sum:a}}toArray(){return this._items}}function Dr(t){if(un(t)||ge(t))return!1;let e=t.charCodeAt(0);return e===47||e===42||e===95||e===43||e===38||e===36||e===35}function un(t){return t.length<3?!1:t.charCodeAt(0)===45&&t.charCodeAt(1)===45}function K(t,e){return un(e)?!1:me(t,e)}function ia(t){return ge(t)?t.slice(t.indexOf("-",2)+1):t}function sa(t){let e=5,n=t.indexOf(";"),r=t.indexOf(",");return n===-1||r!==-1&&r<n?t.substring(e,r):t.substring(e,n)}function oa(t){let e=t.children;if(e){let n=e.last;return n&&n.type===fe&&me("\\9",n.name)}return!1}let aa=new oe(["border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-start-start-radius","border-start-end-radius","border-end-end-radius","border-end-start-radius"]);function q(t,e){return e===0?0:t/e}let la={useLocations:!1};function ca(t,e={}){let r=Object.assign({},la,e).useLocations===!0,i=Date.now();function o(d){return a(d).trim()}function a(d){let w=d.loc;return t.substring(w.start.offset,w.end.offset)}let f=0,c=0,s=0,l={total:0,unique:new Map},m=Date.now(),S=Re(t,{parseCustomProperty:!0,positions:!0,onComment:function(d){f++,c+=d.length}}),b=Date.now(),X=S.loc.end.line-S.loc.start.line+1,j=0,le=new ae,Ee=[],De=new x(r),Ke=new x(r),Z=new x(r),St=new x(r),xt=new x(r),Ct=new x(r),u=new x(r),h=new x(r),g=new x(r),p=new x(r),ee=new x(r),U=new x(r),xe=0,z=0,Ce=new ae,ke=new ae,fn=new ae,Mr=new x(r),zr=new x(r),Fr=new x(r),pn=new x(r),Rr=new Set,dn=new x(r),_e,Te,qr=new ae,Br=new ae,jr=new ae,Ur=new x(r),bt=new ae,Vr=new x(r),Gr=[],mn=new x(r),gn=new x(r),Hr=new x(r),Wr=new x(r),Kr=new Set,Qe=0,Qr=new ae,wt=0,kn=0,yn=new x(r),Ye=new x(r),Sn=new x(r),xn=new x(r),vt=new x(r),Je=new ae,Cn=new ae,Yr=new x(r),bn=new x(r),Jr=new x(r),Xr=new x(r),Zr=new x(r),wn=new x(r),vn=new x(r),An=new x(r),At=new x(r),Lt=new x(r),Me=new cn(r),ze=new x(r),Ln=new cn(r),ei=new x(r),Xe=new x(r),ti=new cn(r);ue(S,function(d){switch(d.type){case Po:{j++;let w=d.name;if(w==="font-face"){let _={};r&&De.p(d.loc.start.offset,d.loc),d.block.children.forEach(A=>{A.type===nn&&(_[A.property]=o(A.value))}),Ee.push(_),le.push(1);break}let y=1;if(d.prelude!==null){let _=d.prelude,A=_&&o(d.prelude),v=_.loc;if(w==="media")St.p(A,v),Tr(_)&&(xt.p(A,v),y++);else if(w==="supports")u.p(A,v),_r(_)&&(h.p(A,v),y++);else if(me("keyframes",w)){let C="@"+w+" "+A;ge(w)&&(p.p(C,v),y++),g.p(C,v)}else w==="import"?Z.p(A,v):w==="charset"?Ct.p(A,v):w==="container"?ee.p(A,v):w==="layer"?A.split(",").forEach(C=>Ke.p(C.trim(),v)):w==="property"&&U.p(A,v)}else w==="layer"&&(Ke.p("<anonymous>",d.loc),y++);le.push(y);break}case zo:{let w=d.prelude,y=d.block,_=w.children,A=y.children,v=_?_.size:0,C=A?A.size:0;Ce.push(v+C),Mr.p(v+C,d.loc),ke.push(v),zr.p(v,w.loc),fn.push(C),Fr.p(C,y.loc),xe++,C===0&&z++;break}case tn:{let w=o(d);if(this.atrule&&me("keyframes",this.atrule.name))return pn.p(w,d.loc),this.skip;sn(d)&&gn.p(w,d.loc);let y=Vo(d);if(y!==!1)for(let te of y)Hr.p(te,d.loc);let _=on(d);$r(d)&&dn.p(w,d.loc),Rr.add(w),bt.push(_),Vr.p(_,d.loc);let[{value:A}]=$e(d),v=A.a,C=A.b,E=A.c,N=[v,C,E];return Ur.p(v+","+C+","+E,d.loc),qr.push(v),Br.push(C),jr.push(E),_e===void 0&&(_e=N),Te===void 0&&(Te=N),Te!==void 0&&hn(Te,N)<0&&(Te=N),_e!==void 0&&hn(_e,N)>0&&(_e=N),Gr.push(N),v>0&&mn.p(w,d.loc),Go(d,function(ce){Wr.p(ce.name,ce.loc)}),this.skip}case Lr:{if(!this.declaration)break;let w=d.unit;return me("\\9",w)?Ln.push(w.substring(0,w.length-2),this.declaration.property,d.loc):Ln.push(w,this.declaration.property,d.loc),this.skip}case Uo:{if(en("data:",d.value)){let w=d.value,y=w.length,_=sa(w);l.total++,s+=y;let A={line:d.loc.start.line,column:d.loc.start.column,offset:d.loc.start.offset,length:d.loc.end.offset-d.loc.start.offset};if(l.unique.has(_)){let v=l.unique.get(_);v.count++,v.size+=y,l.unique.set(_,v),r&&v.uniqueWithLocations.push(A)}else{let v={count:1,size:y};r&&(v.uniqueWithLocations=[A]),l.unique.set(_,v)}}break}case Fo:{if(yt(d)){Cn.push(1),Xe.p(o(d),d.loc);break}let w=this.declaration,{property:y,important:_}=w,A=1;ln(d)&&(Yr.p(o(d),d.loc),A++),typeof _=="string"&&(bn.p(a(d)+"!"+_,d.loc),A++),oa(d)&&(bn.p(o(d),d.loc),A++);let v=d.children,C=d.loc;if(Cn.push(A),K("z-index",y))return Jr.p(o(d),C),this.skip;if(K("font",y)){if(an(d))return;let{font_size:E,line_height:N,font_family:te}=Zo(d,o,function(ce){ce.type==="keyword"&&Xe.p(ce.value,C)});te&&wn.p(te,C),E&&vn.p(E,C),N&&An.p(N,C);break}else if(K("font-size",y)){an(d)||vn.p(o(d),C);break}else if(K("font-family",y)){an(d)||wn.p(o(d),C);break}else if(K("line-height",y))An.p(o(d),C);else if(K("transition",y)||K("animation",y)){na(v,function(E){E.type==="fn"?At.p(o(E.value),C):E.type==="duration"?Lt.p(o(E.value),C):E.type==="keyword"&&Xe.p(o(E.value),C)});break}else if(K("animation-duration",y)||K("transition-duration",y)){v&&v.size>1?v.forEach(E=>{E.type!==Pe&&Lt.p(o(E),C)}):Lt.p(o(d),C);break}else if(K("transition-timing-function",y)||K("animation-timing-function",y)){v&&v.size>1?v.forEach(E=>{E.type!==Pe&&At.p(o(E),C)}):At.p(o(d),C);break}else if(aa.has(ia(y))){yt(d)||ti.push(o(d),y,C);break}else K("text-shadow",y)?yt(d)||Xr.p(o(d),C):K("box-shadow",y)&&(yt(d)||Zr.p(o(d),C));ue(d,function(E){let N=E.name;switch(E.type){case jo:{let te=E.value.length;return me("\\9",E.value)&&(te=te-2),Me.push("#"+E.value,y,C),ze.p("hex"+te,C),this.skip}case fe:{kt.has(N)&&Xe.p(N,C);let te=N.length;if(te>20||te<3)return this.skip;if(Qo.has(N)){let ce=o(E);Me.push(ce,y,C),ze.p(N.toLowerCase(),C);return}if(Ho.has(N)){let ce=o(E);Me.push(ce,y,C),ze.p("named",C);return}if(Wo.has(N)){let ce=o(E);Me.push(ce,y,C),ze.p("system",C);return}return this.skip}case rn:{if(W("var",N))return this.skip;if(Ko.has(N)){Me.push(o(E),y,E.loc),ze.p(N.toLowerCase(),E.loc);return}if(me("gradient",N)){ei.p(o(E),E.loc);return}}}});break}case nn:{if(this.atrulePrelude!==null)return this.skip;Qe++;let w=1;Kr.add(o(d)),d.important===!0&&(wt++,w++,this.atrule&&me("keyframes",this.atrule.name)&&(kn++,w++)),Qr.push(w);let{property:y,loc:{start:_}}=d,A={start:{line:_.line,column:_.column,offset:_.offset},end:{offset:_.offset+y.length}};Ye.p(y,A),ge(y)?(xn.p(y,A),Je.push(2)):Dr(y)?(Sn.p(y,A),Je.push(2)):un(y)?(vt.p(y,A),Je.push(d.important?3:2),d.important===!0&&yn.p(y,A)):Je.push(1);break}}});let ni=Kr.size,Fe=bt.size(),En=qr.aggregate(),_n=Br.aggregate(),Tn=jr.aggregate(),ri=Rr.size,M=Object.assign,ii=t.length,On=Ee.length,si=le.aggregate(),oi=bt.aggregate(),ai=Qr.aggregate(),li=Je.aggregate(),ci=Cn.aggregate();return{stylesheet:{sourceLinesOfCode:j+Fe+Qe+pn.size(),linesOfCode:X,size:ii,complexity:si.sum+oi.sum+ai.sum+li.sum+ci.sum,comments:{total:f,size:c},embeddedContent:{size:{total:s,ratio:q(s,ii)},types:{total:l.total,totalUnique:l.unique.size,uniquenessRatio:q(l.unique.size,l.total),unique:Object.fromEntries(l.unique)}}},atrules:{fontface:M({total:On,totalUnique:On,unique:Ee,uniquenessRatio:On===0?0:1},r?{uniqueWithLocations:De.c().uniqueWithLocations}:{}),import:Z.c(),media:M(St.c(),{browserhacks:xt.c()}),charset:Ct.c(),supports:M(u.c(),{browserhacks:h.c()}),keyframes:M(g.c(),{prefixed:M(p.c(),{ratio:q(p.size(),g.size())})}),container:ee.c(),layer:Ke.c(),property:U.c(),total:j,complexity:si},rules:{total:xe,empty:{total:z,ratio:q(z,xe)},sizes:M(Ce.aggregate(),{items:Ce.toArray()},Mr.c()),selectors:M(ke.aggregate(),{items:ke.toArray()},zr.c()),declarations:M(fn.aggregate(),{items:fn.toArray()},Fr.c())},selectors:{total:Fe,totalUnique:ri,uniquenessRatio:q(ri,Fe),specificity:M({min:Te===void 0?[0,0,0]:Te,max:_e===void 0?[0,0,0]:_e,sum:[En.sum,_n.sum,Tn.sum],mean:[En.mean,_n.mean,Tn.mean],mode:[En.mode,_n.mode,Tn.mode],items:Gr},Ur.c()),complexity:M(oi,Vr.c(),{items:bt.toArray()}),id:M(mn.c(),{ratio:q(mn.size(),Fe)}),pseudoClasses:Hr.c(),accessibility:M(gn.c(),{ratio:q(gn.size(),Fe)}),keyframes:pn.c(),prefixed:M(dn.c(),{ratio:q(dn.size(),Fe)}),combinators:Wr.c()},declarations:{total:Qe,totalUnique:ni,uniquenessRatio:q(ni,Qe),importants:{total:wt,ratio:q(wt,Qe),inKeyframes:{total:kn,ratio:q(kn,wt)}},complexity:ai},properties:M(Ye.c(),{prefixed:M(xn.c(),{ratio:q(xn.size(),Ye.size())}),custom:M(vt.c(),{ratio:q(vt.size(),Ye.size()),importants:M(yn.c(),{ratio:q(yn.size(),vt.size())})}),browserhacks:M(Sn.c(),{ratio:q(Sn.size(),Ye.size())}),complexity:li}),values:{colors:M(Me.count(),{formats:ze.c()}),gradients:ei.c(),fontFamilies:wn.c(),fontSizes:vn.c(),lineHeights:An.c(),zindexes:Jr.c(),textShadows:Xr.c(),boxShadows:Zr.c(),borderRadiuses:ti.count(),animations:{durations:Lt.c(),timingFunctions:At.c()},prefixes:Yr.c(),browserhacks:bn.c(),units:Ln.count(),complexity:ci,keywords:Xe.c()},__meta__:{parseTime:b-m,analyzeTime:Date.now()-b,total:Date.now()-i}}}function hn(t,e){return t[0]===e[0]?t[1]===e[1]?e[2]-t[2]:e[1]-t[1]:e[0]-t[0]}F.analyze=ca,F.compareSpecificity=hn,F.hasVendorPrefix=ge,F.isAccessibilitySelector=sn,F.isMediaBrowserhack=Tr,F.isPropertyHack=Dr,F.isSelectorPrefixed=$r,F.isSupportsBrowserhack=_r,F.isValuePrefixed=ln,F.selectorComplexity=on,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(q,je){typeof exports=="object"&&typeof module<"u"?je(exports,require("css-tree/parser"),require("css-tree/walker")):typeof define=="function"&&define.amd?define(["exports","css-tree/parser","css-tree/walker"],je):(q=typeof globalThis<"u"?globalThis:q||self,je(q.analyzeCss={},q.parse$i,q.walk))})(this,function(q,je,ue){"use strict";let Ie=null;class G{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return G.createItem(e)}allocateCursor(e,n){let r;return Ie!==null?(r=Ie,Ie=Ie.cursor,r.prev=e,r.next=n,r.cursor=this.cursor):r={prev:e,next:n,cursor:this.cursor},this.cursor=r,r}releaseCursor(){const{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=Ie,Ie=e}updateCursors(e,n,r,i){let{cursor:o}=this;for(;o!==null;)o.prev===e&&(o.prev=n),o.next===r&&(o.next=i),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let n=this.head;n!==null;n=n.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let n=null;this.head=null;for(let r of e){const i=G.createItem(r);n!==null?n.next=i:this.head=i,i.prev=n,n=i}return this.tail=n,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,n=this){const r=this.allocateCursor(null,this.head);for(;r.next!==null;){const i=r.next;r.next=i.next,e.call(n,i.data,i,this)}this.releaseCursor()}forEachRight(e,n=this){const r=this.allocateCursor(this.tail,null);for(;r.prev!==null;){const i=r.prev;r.prev=i.prev,e.call(n,i.data,i,this)}this.releaseCursor()}reduce(e,n,r=this){let i=this.allocateCursor(null,this.head),o=n,a;for(;i.next!==null;)a=i.next,i.next=a.next,o=e.call(r,o,a.data,a,this);return this.releaseCursor(),o}reduceRight(e,n,r=this){let i=this.allocateCursor(this.tail,null),o=n,a;for(;i.prev!==null;)a=i.prev,i.prev=a.prev,o=e.call(r,o,a.data,a,this);return this.releaseCursor(),o}some(e,n=this){for(let r=this.head;r!==null;r=r.next)if(e.call(n,r.data,r,this))return!0;return!1}map(e,n=this){const r=new G;for(let i=this.head;i!==null;i=i.next)r.appendData(e.call(n,i.data,i,this));return r}filter(e,n=this){const r=new G;for(let i=this.head;i!==null;i=i.next)e.call(n,i.data,i,this)&&r.appendData(i.data);return r}nextUntil(e,n,r=this){if(e===null)return;const i=this.allocateCursor(null,e);for(;i.next!==null;){const o=i.next;if(i.next=o.next,n.call(r,o.data,o,this))break}this.releaseCursor()}prevUntil(e,n,r=this){if(e===null)return;const i=this.allocateCursor(e,null);for(;i.prev!==null;){const o=i.prev;if(i.prev=o.prev,n.call(r,o.data,o,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){const e=new G;for(let n of this)e.appendData(n);return e}prepend(e){return this.updateCursors(null,e,this.head,e),this.head!==null?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(G.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(G.createItem(e))}insert(e,n=null){if(n!==null)if(this.updateCursors(n.prev,e,n,e),n.prev===null){if(this.head!==n)throw new Error("before doesn't belong to list");this.head=e,n.prev=e,e.next=n,this.updateCursors(null,e)}else n.prev.next=e,e.prev=n.prev,n.prev=e,e.next=n;else this.updateCursors(this.tail,e,null,e),this.tail!==null?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,n){return this.insert(G.createItem(e),n)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(G.createItem(e))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(e){this.prepend(G.createItem(e))}shift(){return this.head!==null?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,n){return e.head===null?this:(n!=null?(this.updateCursors(n.prev,e.tail,n,e.head),n.prev!==null?(n.prev.next=e.head,e.head.prev=n.prev):this.head=e.head,n.prev=e.tail,e.tail.next=n):(this.updateCursors(this.tail,e.tail,null,e.head),this.tail!==null?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null,this)}replace(e,n){"head"in n?this.insertList(n,e):this.insert(n,e),this.remove(e)}}function fi(t,e){const n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:t,message:e,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,`${t}: ${e}
|
|
2
|
+
`)}})}const _t=100,Dn=60,Pn=" ";function Mn({source:t,line:e,column:n,baseLine:r,baseColumn:i},o){function a(_,B){return s.slice(_,B).map((Y,xe)=>String(_+xe+1).padStart(y)+" |"+Y).join(`
|
|
3
|
+
`)}const f=`
|
|
4
|
+
`.repeat(Math.max(r-1,0)),c=" ".repeat(Math.max(i-1,0)),s=(f+c+t).split(/\r\n?|\n|\f/),l=Math.max(1,e-o)-1,m=Math.min(e+o,s.length+1),y=Math.max(4,String(m).length)+1;let C=0;n+=(Pn.length-1)*(s[e-1].substr(0,n-1).match(/\t/g)||[]).length,n>_t&&(C=n-Dn+3,n=Dn-2);for(let _=l;_<=m;_++)_>=0&&_<s.length&&(s[_]=s[_].replace(/\t/g,Pn),s[_]=(C>0&&s[_].length>C?"…":"")+s[_].substr(C,_t-2)+(s[_].length>C+_t-1?"…":""));return[a(l,e),new Array(n+y+2).join("-")+"^",a(e,m)].filter(Boolean).join(`
|
|
5
|
+
`).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function zn(t,e,n,r,i,o=1,a=1){return Object.assign(fi("SyntaxError",t),{source:e,offset:n,line:r,column:i,sourceFragment(c){return Mn({source:e,line:r,column:i,baseLine:o,baseColumn:a},isNaN(c)?0:c)},get formattedMessage(){return`Parse error: ${t}
|
|
6
|
+
`+Mn({source:e,line:r,column:i,baseLine:o,baseColumn:a},2)}})}const Ue=0,k=1,N=2,U=3,z=4,$e=5,pi=6,ie=7,se=8,$=9,E=10,M=11,I=12,H=13,Fn=14,oe=15,X=16,tt=17,Ne=18,nt=19,rt=20,Z=21,T=22,Tt=23,Ot=24,he=25,di=0;function W(t){return t>=48&&t<=57}function Ve(t){return W(t)||t>=65&&t<=70||t>=97&&t<=102}function It(t){return t>=65&&t<=90}function mi(t){return t>=97&&t<=122}function gi(t){return It(t)||mi(t)}function ki(t){return t>=128}function it(t){return gi(t)||ki(t)||t===95}function Rn(t){return it(t)||W(t)||t===45}function yi(t){return t>=0&&t<=8||t===11||t>=14&&t<=31||t===127}function st(t){return t===10||t===13||t===12}function Ge(t){return st(t)||t===32||t===9}function ge(t,e){return!(t!==92||st(e)||e===di)}function $t(t,e,n){return t===45?it(e)||e===45||ge(e,n):it(t)?!0:t===92?ge(t,e):!1}function Nt(t,e,n){return t===43||t===45?W(e)?2:e===46&&W(n)?3:0:t===46?W(e)?2:0:W(t)?1:0}function qn(t){return t===65279||t===65534?1:0}const Dt=new Array(128),Si=128,ot=130,Bn=131,Pt=132,jn=133;for(let t=0;t<Dt.length;t++)Dt[t]=Ge(t)&&ot||W(t)&&Bn||it(t)&&Pt||yi(t)&&jn||t||Si;function Mt(t){return t<128?Dt[t]:Pt}function De(t,e){return e<t.length?t.charCodeAt(e):0}function zt(t,e,n){return n===13&&De(t,e+1)===10?2:1}function Un(t,e,n){let r=t.charCodeAt(e);return It(r)&&(r=r|32),r===n}function at(t,e,n,r){if(n-e!==r.length||e<0||n>t.length)return!1;for(let i=e;i<n;i++){const o=r.charCodeAt(i-e);let a=t.charCodeAt(i);if(It(a)&&(a=a|32),a!==o)return!1}return!0}function xi(t,e){for(;e>=0&&Ge(t.charCodeAt(e));e--);return e+1}function lt(t,e){for(;e<t.length&&Ge(t.charCodeAt(e));e++);return e}function Ft(t,e){for(;e<t.length&&W(t.charCodeAt(e));e++);return e}function He(t,e){if(e+=2,Ve(De(t,e-1))){for(const r=Math.min(t.length,e+5);e<r&&Ve(De(t,e));e++);const n=De(t,e);Ge(n)&&(e+=zt(t,e,n))}return e}function ct(t,e){for(;e<t.length;e++){const n=t.charCodeAt(e);if(!Rn(n)){if(ge(n,De(t,e+1))){e=He(t,e)-1;continue}break}}return e}function Vn(t,e){let n=t.charCodeAt(e);if((n===43||n===45)&&(n=t.charCodeAt(e+=1)),W(n)&&(e=Ft(t,e+1),n=t.charCodeAt(e)),n===46&&W(t.charCodeAt(e+1))&&(e+=2,e=Ft(t,e)),Un(t,e,101)){let r=0;n=t.charCodeAt(e+1),(n===45||n===43)&&(r=1,n=t.charCodeAt(e+2)),W(n)&&(e=Ft(t,e+1+r+1))}return e}function Rt(t,e){for(;e<t.length;e++){const n=t.charCodeAt(e);if(n===41){e++;break}ge(n,De(t,e+1))&&(e=He(t,e))}return e}function Ci(t){if(t.length===1&&!Ve(t.charCodeAt(0)))return t[0];let e=parseInt(t,16);return(e===0||e>=55296&&e<=57343||e>1114111)&&(e=65533),String.fromCodePoint(e)}const Gn=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"],bi=16*1024;function ut(t=null,e){return t===null||t.length<e?new Uint32Array(Math.max(e+1024,bi)):t}const Hn=10,wi=12,Wn=13;function Kn(t){const e=t.source,n=e.length,r=e.length>0?qn(e.charCodeAt(0)):0,i=ut(t.lines,n),o=ut(t.columns,n);let a=t.startLine,f=t.startColumn;for(let c=r;c<n;c++){const s=e.charCodeAt(c);i[c]=a,o[c]=f++,(s===Hn||s===Wn||s===wi)&&(s===Wn&&c+1<n&&e.charCodeAt(c+1)===Hn&&(c++,i[c]=a,o[c]=f),a++,f=1)}i[n]=a,o[n]=f,t.lines=i,t.columns=o,t.computed=!0}class vi{constructor(e,n,r,i){this.setSource(e,n,r,i),this.lines=null,this.columns=null}setSource(e="",n=0,r=1,i=1){this.source=e,this.startOffset=n,this.startLine=r,this.startColumn=i,this.computed=!1}getLocation(e,n){return this.computed||Kn(this),{source:n,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,n,r){return this.computed||Kn(this),{source:r,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+n,line:this.lines[n],column:this.columns[n]}}}}const fe=16777215,pe=24,Ae=new Uint8Array(32);Ae[N]=T,Ae[Z]=T,Ae[nt]=rt,Ae[Tt]=Ot;function Qn(t){return Ae[t]!==0}class Ai{constructor(e,n){this.setSource(e,n)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",n=()=>{}){e=String(e||"");const r=e.length,i=ut(this.offsetAndType,e.length+1),o=ut(this.balance,e.length+1);let a=0,f=-1,c=0,s=e.length;this.offsetAndType=null,this.balance=null,o.fill(0),n(e,(l,m,y)=>{const C=a++;if(i[C]=l<<pe|y,f===-1&&(f=m),o[C]=s,l===c){const _=o[s];o[s]=C,s=_,c=Ae[i[_]>>pe]}else Qn(l)&&(s=C,c=Ae[l])}),i[a]=Ue<<pe|r,o[a]=a;for(let l=0;l<a;l++){const m=o[l];if(m<=l){const y=o[m];y!==l&&(o[l]=y)}else m>a&&(o[l]=a)}this.source=e,this.firstCharOffset=f===-1?0:f,this.tokenCount=a,this.offsetAndType=i,this.balance=o,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>pe:Ue}lookupTypeNonSC(e){for(let n=this.tokenIndex;n<this.tokenCount;n++){const r=this.offsetAndType[n]>>pe;if(r!==H&&r!==he&&e--===0)return r}return Ue}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&fe:this.source.length}lookupOffsetNonSC(e){for(let n=this.tokenIndex;n<this.tokenCount;n++){const r=this.offsetAndType[n]>>pe;if(r!==H&&r!==he&&e--===0)return n-this.tokenIndex}return Ue}lookupValue(e,n){return e+=this.tokenIndex,e<this.tokenCount?at(this.source,this.offsetAndType[e-1]&fe,this.offsetAndType[e]&fe,n):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&fe:this.offsetAndType[this.tokenCount]&fe:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,n){return n?this.lookupType(n)===$&&this.source.charCodeAt(this.lookupOffset(n))===e:this.tokenType===$&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let n=this.tokenIndex+e;n<this.tokenCount?(this.tokenIndex=n,this.tokenStart=this.offsetAndType[n-1]&fe,n=this.offsetAndType[n],this.tokenType=n>>pe,this.tokenEnd=n&fe):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>pe,this.tokenEnd=e&fe):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=Ue,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===H||this.tokenType===he;)this.next()}skipUntilBalanced(e,n){let r=e,i=0,o=0;e:for(;r<this.tokenCount;r++){if(i=this.balance[r],i<e)break e;switch(o=r>0?this.offsetAndType[r-1]&fe:this.firstCharOffset,n(this.source.charCodeAt(o))){case 1:break e;case 2:r++;break e;default:Qn(this.offsetAndType[r]>>pe)&&(r=i)}}this.skip(r-this.tokenIndex)}forEachToken(e){for(let n=0,r=this.firstCharOffset;n<this.tokenCount;n++){const i=r,o=this.offsetAndType[n],a=o&fe,f=o>>pe;r=a,e(f,i,a,n)}}dump(){const e=new Array(this.tokenCount);return this.forEachToken((n,r,i,o)=>{e[o]={idx:o,type:Gn[n],chunk:this.source.substring(r,i),balance:this.balance[o]}}),e}}function Jn(t,e){function n(m){return m<f?t.charCodeAt(m):0}function r(){if(s=Vn(t,s),$t(n(s),n(s+1),n(s+2))){l=I,s=ct(t,s);return}if(n(s)===37){l=M,s++;return}l=E}function i(){const m=s;if(s=ct(t,s),at(t,m,s,"url")&&n(s)===40){if(s=lt(t,s+1),n(s)===34||n(s)===39){l=N,s=m+4;return}a();return}if(n(s)===40){l=N,s++;return}l=k}function o(m){for(m||(m=n(s++)),l=$e;s<t.length;s++){const y=t.charCodeAt(s);switch(Mt(y)){case m:s++;return;case ot:if(st(y)){s+=zt(t,s,y),l=pi;return}break;case 92:if(s===t.length-1)break;const C=n(s+1);st(C)?s+=zt(t,s+1,C):ge(y,C)&&(s=He(t,s)-1);break}}}function a(){for(l=ie,s=lt(t,s);s<t.length;s++){const m=t.charCodeAt(s);switch(Mt(m)){case 41:s++;return;case ot:if(s=lt(t,s),n(s)===41||s>=t.length){s<t.length&&s++;return}s=Rt(t,s),l=se;return;case 34:case 39:case 40:case jn:s=Rt(t,s),l=se;return;case 92:if(ge(m,n(s+1))){s=He(t,s)-1;break}s=Rt(t,s),l=se;return}}}t=String(t||"");const f=t.length;let c=qn(n(0)),s=c,l;for(;s<f;){const m=t.charCodeAt(s);switch(Mt(m)){case ot:l=H,s=lt(t,s+1);break;case 34:o();break;case 35:Rn(n(s+1))||ge(n(s+1),n(s+2))?(l=z,s=ct(t,s+1)):(l=$,s++);break;case 39:o();break;case 40:l=Z,s++;break;case 41:l=T,s++;break;case 43:Nt(m,n(s+1),n(s+2))?r():(l=$,s++);break;case 44:l=Ne,s++;break;case 45:Nt(m,n(s+1),n(s+2))?r():n(s+1)===45&&n(s+2)===62?(l=oe,s=s+3):$t(m,n(s+1),n(s+2))?i():(l=$,s++);break;case 46:Nt(m,n(s+1),n(s+2))?r():(l=$,s++);break;case 47:n(s+1)===42?(l=he,s=t.indexOf("*/",s+2),s=s===-1?t.length:s+2):(l=$,s++);break;case 58:l=X,s++;break;case 59:l=tt,s++;break;case 60:n(s+1)===33&&n(s+2)===45&&n(s+3)===45?(l=Fn,s=s+4):(l=$,s++);break;case 64:$t(n(s+1),n(s+2),n(s+3))?(l=U,s=ct(t,s+1)):(l=$,s++);break;case 91:l=nt,s++;break;case 92:ge(m,n(s+1))?i():(l=$,s++);break;case 93:l=rt,s++;break;case 123:l=Tt,s++;break;case 125:l=Ot,s++;break;case Bn:r();break;case Pt:i();break;default:l=$,s++}e(l,c,c=s)}}function Li(t){const e=this.createList();let n=!1;const r={recognizer:t};for(;!this.eof;){switch(this.tokenType){case he:this.next();continue;case H:n=!0,this.next();continue}let i=t.getNode.call(this,r);if(i===void 0)break;n&&(t.onWhiteSpace&&t.onWhiteSpace.call(this,i,e,r),n=!1),e.push(i)}return n&&t.onWhiteSpace&&t.onWhiteSpace.call(this,null,e,r),e}const Yn=()=>{},Ei=33,_i=35,qt=59,Xn=123,Zn=0;function Ti(t){return function(){return this[t]()}}function Bt(t){const e=Object.create(null);for(const n of Object.keys(t)){const r=t[n],i=r.parse||r;i&&(e[n]=i)}return e}function Oi(t){const e={context:Object.create(null),features:Object.assign(Object.create(null),t.features),scope:Object.assign(Object.create(null),t.scope),atrule:Bt(t.atrule),pseudo:Bt(t.pseudo),node:Bt(t.node)};for(const[n,r]of Object.entries(t.parseContext))switch(typeof r){case"function":e.context[n]=r;break;case"string":e.context[n]=Ti(r);break}return{config:e,...e,...e.node}}function Ii(t){let e="",n="<unknown>",r=!1,i=Yn,o=!1;const a=new vi,f=Object.assign(new Ai,Oi(t||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Li,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(s){return s===Xn?1:0},consumeUntilLeftCurlyBracketOrSemicolon(s){return s===Xn||s===qt?1:0},consumeUntilExclamationMarkOrSemicolon(s){return s===Ei||s===qt?1:0},consumeUntilSemicolonIncluded(s){return s===qt?2:0},createList(){return new G},createSingleNodeList(s){return new G().appendData(s)},getFirstListNode(s){return s&&s.first},getLastListNode(s){return s&&s.last},parseWithFallback(s,l){const m=this.tokenIndex;try{return s.call(this)}catch(y){if(o)throw y;this.skip(m-this.tokenIndex);const C=l.call(this);return o=!0,i(y,C),o=!1,C}},lookupNonWSType(s){let l;do if(l=this.lookupType(s++),l!==H&&l!==he)return l;while(l!==Zn);return Zn},charCodeAt(s){return s>=0&&s<e.length?e.charCodeAt(s):0},substring(s,l){return e.substring(s,l)},substrToCursor(s){return this.source.substring(s,this.tokenStart)},cmpChar(s,l){return Un(e,s,l)},cmpStr(s,l,m){return at(e,s,l,m)},consume(s){const l=this.tokenStart;return this.eat(s),this.substrToCursor(l)},consumeFunctionName(){const s=e.substring(this.tokenStart,this.tokenEnd-1);return this.eat(N),s},consumeNumber(s){const l=e.substring(this.tokenStart,Vn(e,this.tokenStart));return this.eat(s),l},eat(s){if(this.tokenType!==s){const l=Gn[s].slice(0,-6).replace(/-/g," ").replace(/^./,C=>C.toUpperCase());let m=`${/[[\](){}]/.test(l)?`"${l}"`:l} is expected`,y=this.tokenStart;switch(s){case k:this.tokenType===N||this.tokenType===ie?(y=this.tokenEnd-1,m="Identifier is expected but function found"):m="Identifier is expected";break;case z:this.isDelim(_i)&&(this.next(),y++,m="Name is expected");break;case M:this.tokenType===E&&(y=this.tokenEnd,m="Percent sign is expected");break}this.error(m,y)}this.next()},eatIdent(s){(this.tokenType!==k||this.lookupValue(0,s)===!1)&&this.error(`Identifier "${s}" is expected`),this.next()},eatDelim(s){this.isDelim(s)||this.error(`Delim "${String.fromCharCode(s)}" is expected`),this.next()},getLocation(s,l){return r?a.getLocationRange(s,l,n):null},getLocationFromList(s){if(r){const l=this.getFirstListNode(s),m=this.getLastListNode(s);return a.getLocationRange(l!==null?l.loc.start.offset-a.startOffset:this.tokenStart,m!==null?m.loc.end.offset-a.startOffset:this.tokenStart,n)}return null},error(s,l){const m=typeof l<"u"&&l<e.length?a.getLocation(l):this.eof?a.getLocation(xi(e,e.length-1)):a.getLocation(this.tokenStart);throw new zn(s||"Unexpected input",e,m.offset,m.line,m.column,a.startLine,a.startColumn)}});return Object.assign(function(s,l){e=s,l=l||{},f.setSource(e,Jn),a.setSource(e,l.offset,l.line,l.column),n=l.filename||"<unknown>",r=!!l.positions,i=typeof l.onParseError=="function"?l.onParseError:Yn,o=!1,f.parseAtrulePrelude="parseAtrulePrelude"in l?!!l.parseAtrulePrelude:!0,f.parseRulePrelude="parseRulePrelude"in l?!!l.parseRulePrelude:!0,f.parseValue="parseValue"in l?!!l.parseValue:!0,f.parseCustomProperty="parseCustomProperty"in l?!!l.parseCustomProperty:!1;const{context:m="default",onComment:y}=l;if(!(m in f.context))throw new Error("Unknown context `"+m+"`");typeof y=="function"&&f.forEachToken((_,B,Y)=>{if(_===he){const xe=f.getLocation(B,Y),Fe=at(e,Y-2,Y,"*/")?e.slice(B+2,Y-2):e.slice(B+2,Y);y(Fe,xe)}});const C=f.context[m].call(f,l);return f.eof||f.error(),C},{SyntaxError:zn,config:f.config})}const $i=35,Ni=38,Di=42,Pi=43,Mi=47,er=46,zi=62,Fi=124,Ri=126;function qi(t,e){e.last!==null&&e.last.type!=="Combinator"&&t!==null&&t.type!=="Combinator"&&e.push({type:"Combinator",loc:null,name:" "})}function Bi(){switch(this.tokenType){case nt:return this.AttributeSelector();case z:return this.IdSelector();case X:return this.lookupType(1)===X?this.PseudoElementSelector():this.PseudoClassSelector();case k:return this.TypeSelector();case E:case M:return this.Percentage();case I:this.charCodeAt(this.tokenStart)===er&&this.error("Identifier is expected",this.tokenStart+1);break;case $:{switch(this.charCodeAt(this.tokenStart)){case Pi:case zi:case Ri:case Mi:return this.Combinator();case er:return this.ClassSelector();case Di:case Fi:return this.TypeSelector();case $i:return this.IdSelector();case Ni:return this.NestingSelector()}break}}}const ji={onWhiteSpace:qi,getNode:Bi};function Ui(){const t=this.createList();this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case k:t.push(this.Identifier());break;case $e:t.push(this.String());break;case Ne:t.push(this.Operator());break;case T:break e;default:this.error("Identifier, string or comma is expected")}this.skipSC()}return t}const Le={parse(){return this.createSingleNodeList(this.SelectorList())}},jt={parse(){return this.createSingleNodeList(this.Selector())}},Vi={parse(){return this.createSingleNodeList(this.Identifier())}},Gi={parse:Ui},ht={parse(){return this.createSingleNodeList(this.Nth())}},Hi={dir:Vi,has:Le,lang:Gi,matches:Le,is:Le,"-moz-any":Le,"-webkit-any":Le,where:Le,not:Le,"nth-child":ht,"nth-last-child":ht,"nth-last-of-type":ht,"nth-of-type":ht,slotted:jt,host:jt,"host-context":jt},de=43,K=45,ft=110,Ee=!0,Wi=!1;function pt(t,e){let n=this.tokenStart+t;const r=this.charCodeAt(n);for((r===de||r===K)&&(e&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)W(this.charCodeAt(n))||this.error("Integer is expected",n)}function Pe(t){return pt.call(this,0,t)}function be(t,e){if(!this.cmpChar(this.tokenStart+t,e)){let n="";switch(e){case ft:n="N is expected";break;case K:n="HyphenMinus is expected";break}this.error(n,this.tokenStart+t)}}function Ut(){let t=0,e=0,n=this.tokenType;for(;n===H||n===he;)n=this.lookupType(++t);if(n!==E)if(this.isDelim(de,t)||this.isDelim(K,t)){e=this.isDelim(de,t)?de:K;do n=this.lookupType(++t);while(n===H||n===he);n!==E&&(this.skip(t),Pe.call(this,Ee))}else return null;return t>0&&this.skip(t),e===0&&(n=this.charCodeAt(this.tokenStart),n!==de&&n!==K&&this.error("Number sign is expected")),Pe.call(this,e!==0),e===K?"-"+this.consume(E):this.consume(E)}function Ki(){const t=this.tokenStart;let e=null,n=null;if(this.tokenType===E)Pe.call(this,Wi),n=this.consume(E);else if(this.tokenType===k&&this.cmpChar(this.tokenStart,K))switch(e="-1",be.call(this,1,ft),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Ut.call(this);break;case 3:be.call(this,2,K),this.next(),this.skipSC(),Pe.call(this,Ee),n="-"+this.consume(E);break;default:be.call(this,2,K),pt.call(this,3,Ee),this.next(),n=this.substrToCursor(t+2)}else if(this.tokenType===k||this.isDelim(de)&&this.lookupType(1)===k){let r=0;switch(e="1",this.isDelim(de)&&(r=1,this.next()),be.call(this,0,ft),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Ut.call(this);break;case 2:be.call(this,1,K),this.next(),this.skipSC(),Pe.call(this,Ee),n="-"+this.consume(E);break;default:be.call(this,1,K),pt.call(this,2,Ee),this.next(),n=this.substrToCursor(t+r+1)}}else if(this.tokenType===I){const r=this.charCodeAt(this.tokenStart),i=r===de||r===K;let o=this.tokenStart+i;for(;o<this.tokenEnd&&W(this.charCodeAt(o));o++);o===this.tokenStart+i&&this.error("Integer is expected",this.tokenStart+i),be.call(this,o-this.tokenStart,ft),e=this.substring(t,o),o+1===this.tokenEnd?(this.next(),n=Ut.call(this)):(be.call(this,o-this.tokenStart+1,K),o+2===this.tokenEnd?(this.next(),this.skipSC(),Pe.call(this,Ee),n="-"+this.consume(E)):(pt.call(this,o-this.tokenStart+2,Ee),this.next(),n=this.substrToCursor(o+1)))}else this.error();return e!==null&&e.charCodeAt(0)===de&&(e=e.substr(1)),n!==null&&n.charCodeAt(0)===de&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(t,this.tokenStart),a:e,b:n}}function Qi(t){if(t.a){const e=t.a==="+1"&&"n"||t.a==="1"&&"n"||t.a==="-1"&&"-n"||t.a+"n";if(t.b){const n=t.b[0]==="-"||t.b[0]==="+"?t.b:"+"+t.b;this.tokenize(e+n)}else this.tokenize(e)}else this.tokenize(t.b)}const Ji=36,tr=42,dt=61,Yi=94,Vt=124,Xi=126;function Zi(){this.eof&&this.error("Unexpected end of input");const t=this.tokenStart;let e=!1;return this.isDelim(tr)?(e=!0,this.next()):this.isDelim(Vt)||this.eat(k),this.isDelim(Vt)?this.charCodeAt(this.tokenStart+1)!==dt?(this.next(),this.eat(k)):e&&this.error("Identifier is expected",this.tokenEnd):e&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}function es(){const t=this.tokenStart,e=this.charCodeAt(t);return e!==dt&&e!==Xi&&e!==Yi&&e!==Ji&&e!==tr&&e!==Vt&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),e!==dt&&(this.isDelim(dt)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(t)}function ts(){const t=this.tokenStart;let e,n=null,r=null,i=null;return this.eat(nt),this.skipSC(),e=Zi.call(this),this.skipSC(),this.tokenType!==rt&&(this.tokenType!==k&&(n=es.call(this),this.skipSC(),r=this.tokenType===$e?this.String():this.Identifier(),this.skipSC()),this.tokenType===k&&(i=this.consume(k),this.skipSC())),this.eat(rt),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:n,value:r,flags:i}}function ns(t){this.token($,"["),this.node(t.name),t.matcher!==null&&(this.tokenize(t.matcher),this.node(t.value)),t.flags!==null&&this.token(k,t.flags),this.token($,"]")}const rs=46;function is(){return this.eatDelim(rs),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(k)}}function ss(t){this.token($,"."),this.token(k,t.name)}const os=43,nr=47,as=62,ls=126;function cs(){const t=this.tokenStart;let e;switch(this.tokenType){case H:e=" ";break;case $:switch(this.charCodeAt(this.tokenStart)){case as:case os:case ls:this.next();break;case nr:this.next(),this.eatIdent("deep"),this.eatDelim(nr);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t);break}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function us(t){this.tokenize(t.name)}function hs(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(k)}}function fs(t){this.token(k,t.name)}function ps(){const t=this.tokenStart;return this.eat(z),{type:"IdSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t+1)}}function ds(t){this.token($,"#"+t.name)}const ms=38;function gs(){const t=this.tokenStart;return this.eatDelim(ms),{type:"NestingSelector",loc:this.getLocation(t,this.tokenStart)}}function ks(){this.token($,"&")}function ys(){this.skipSC();const t=this.tokenStart;let e=t,n=null,r;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?r=this.Identifier():r=this.AnPlusB(),e=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),e=this.tokenStart),{type:"Nth",loc:this.getLocation(t,e),nth:r,selector:n}}function Ss(t){this.node(t.nth),t.selector!==null&&(this.token(k,"of"),this.node(t.selector))}function xs(){const t=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t)}}function Cs(t){this.tokenize(t.value)}function bs(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(M)}}function ws(t){this.token(M,t.value+"%")}function vs(){const t=this.tokenStart;let e=null,n,r;return this.eat(X),this.tokenType===N?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==T?e=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),e=this.pseudo[r].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(null,!1))),this.eat(T)):n=this.consume(k),{type:"PseudoClassSelector",loc:this.getLocation(t,this.tokenStart),name:n,children:e}}function As(t){this.token(X,":"),t.children===null?this.token(k,t.name):(this.token(N,t.name+"("),this.children(t),this.token(T,")"))}function Ls(){const t=this.tokenStart;let e=null,n,r;return this.eat(X),this.eat(X),this.tokenType===N?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==T?e=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),e=this.pseudo[r].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(null,!1))),this.eat(T)):n=this.consume(k),{type:"PseudoElementSelector",loc:this.getLocation(t,this.tokenStart),name:n,children:e}}function Es(t){this.token(X,":"),this.token(X,":"),t.children===null?this.token(k,t.name):(this.token(N,t.name+"("),this.children(t),this.token(T,")"))}function _s(){return this.tokenIndex>0&&this.lookupType(-1)===H?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}function Ts(t,e){const n=this.getTokenStart(this.tokenIndex);let r;return this.skipUntilBalanced(this.tokenIndex,t||this.consumeUntilBalanceEnd),e&&this.tokenStart>n?r=_s.call(this):r=this.tokenStart,{type:"Raw",loc:this.getLocation(n,r),value:this.substring(n,r)}}function Os(t){this.tokenize(t.value)}function Is(){const t=this.readSequence(this.scope.Selector);return this.getFirstListNode(t)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(t),children:t}}function $s(t){this.children(t)}function Ns(){const t=this.createList();for(;!this.eof;){if(t.push(this.Selector()),this.tokenType===Ne){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(t),children:t}}function Ds(t){this.children(t,()=>this.token(Ne,","))}const Gt=92,rr=34,Ps=39;function Ms(t){const e=t.length,n=t.charCodeAt(0),r=n===rr||n===Ps?1:0,i=r===1&&e>1&&t.charCodeAt(e-1)===n?e-2:e-1;let o="";for(let a=r;a<=i;a++){let f=t.charCodeAt(a);if(f===Gt){if(a===i){a!==e-1&&(o=t.substr(a+1));break}if(f=t.charCodeAt(++a),ge(Gt,f)){const c=a-1,s=He(t,c);a=s-1,o+=Ci(t.substring(c+1,s))}else f===13&&t.charCodeAt(a+1)===10&&a++}else o+=t[a]}return o}function zs(t,e){const n='"',r=rr;let i="",o=!1;for(let a=0;a<t.length;a++){const f=t.charCodeAt(a);if(f===0){i+="�";continue}if(f<=31||f===127){i+="\\"+f.toString(16),o=!0;continue}f===r||f===Gt?(i+="\\"+t.charAt(a),o=!1):(o&&(Ve(f)||Ge(f))&&(i+=" "),i+=t.charAt(a),o=!1)}return n+i+n}function Fs(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Ms(this.consume($e))}}function Rs(t){this.token($e,zs(t.value))}const qs=42,ir=124;function Ht(){this.tokenType!==k&&this.isDelim(qs)===!1&&this.error("Identifier or asterisk is expected"),this.next()}function Bs(){const t=this.tokenStart;return this.isDelim(ir)?(this.next(),Ht.call(this)):(Ht.call(this),this.isDelim(ir)&&(this.next(),Ht.call(this))),{type:"TypeSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}function js(t){this.tokenize(t.name)}const sr=Ii({parseContext:{default:"SelectorList",selectorList:"SelectorList",selector:"Selector"},scope:{Selector:ji},atrule:{},pseudo:Hi,node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:Ki,AttributeSelector:ts,ClassSelector:is,Combinator:cs,IdSelector:ps,Identifier:hs,NestingSelector:gs,Nth:ys,Operator:xs,Percentage:bs,PseudoClassSelector:vs,PseudoElementSelector:Ls,Raw:Ts,Selector:Is,SelectorList:Ns,String:Fs,TypeSelector:Bs},Symbol.toStringTag,{value:"Module"}))});var Wt={},Kt={},or="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Kt.encode=function(t){if(0<=t&&t<or.length)return or[t];throw new TypeError("Must be between 0 and 63: "+t)},Kt.decode=function(t){var e=65,n=90,r=97,i=122,o=48,a=57,f=43,c=47,s=26,l=52;return e<=t&&t<=n?t-e:r<=t&&t<=i?t-r+s:o<=t&&t<=a?t-o+l:t==f?62:t==c?63:-1};var ar=Kt,Qt=5,lr=1<<Qt,cr=lr-1,ur=lr;function Us(t){return t<0?(-t<<1)+1:(t<<1)+0}function Vs(t){var e=(t&1)===1,n=t>>1;return e?-n:n}Wt.encode=function(e){var n="",r,i=Us(e);do r=i&cr,i>>>=Qt,i>0&&(r|=ur),n+=ar.encode(r);while(i>0);return n},Wt.decode=function(e,n,r){var i=e.length,o=0,a=0,f,c;do{if(n>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=ar.decode(e.charCodeAt(n++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));f=!!(c&ur),c&=cr,o=o+(c<<a),a+=Qt}while(f);r.value=Vs(o),r.rest=n};var mt={};(function(t){function e(u,h,g){if(h in u)return u[h];if(arguments.length===3)return g;throw new Error('"'+h+'" is a required argument.')}t.getArg=e;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(u){var h=u.match(n);return h?{scheme:h[1],auth:h[2],host:h[3],port:h[4],path:h[5]}:null}t.urlParse=i;function o(u){var h="";return u.scheme&&(h+=u.scheme+":"),h+="//",u.auth&&(h+=u.auth+"@"),u.host&&(h+=u.host),u.port&&(h+=":"+u.port),u.path&&(h+=u.path),h}t.urlGenerate=o;var a=32;function f(u){var h=[];return function(g){for(var p=0;p<h.length;p++)if(h[p].input===g){var ne=h[0];return h[0]=h[p],h[p]=ne,h[0].result}var V=u(g);return h.unshift({input:g,result:V}),h.length>a&&h.pop(),V}}var c=f(function(h){var g=h,p=i(h);if(p){if(!p.path)return h;g=p.path}for(var ne=t.isAbsolute(g),V=[],we=0,R=0;;)if(we=R,R=g.indexOf("/",we),R===-1){V.push(g.slice(we));break}else for(V.push(g.slice(we,R));R<g.length&&g[R]==="/";)R++;for(var ve,Ce=0,R=V.length-1;R>=0;R--)ve=V[R],ve==="."?V.splice(R,1):ve===".."?Ce++:Ce>0&&(ve===""?(V.splice(R+1,Ce),Ce=0):(V.splice(R,2),Ce--));return g=V.join("/"),g===""&&(g=ne?"/":"."),p?(p.path=g,o(p)):g});t.normalize=c;function s(u,h){u===""&&(u="."),h===""&&(h=".");var g=i(h),p=i(u);if(p&&(u=p.path||"/"),g&&!g.scheme)return p&&(g.scheme=p.scheme),o(g);if(g||h.match(r))return h;if(p&&!p.host&&!p.path)return p.host=h,o(p);var ne=h.charAt(0)==="/"?h:c(u.replace(/\/+$/,"")+"/"+h);return p?(p.path=ne,o(p)):ne}t.join=s,t.isAbsolute=function(u){return u.charAt(0)==="/"||n.test(u)};function l(u,h){u===""&&(u="."),u=u.replace(/\/$/,"");for(var g=0;h.indexOf(u+"/")!==0;){var p=u.lastIndexOf("/");if(p<0||(u=u.slice(0,p),u.match(/^([^\/]+:\/)?\/*$/)))return h;++g}return Array(g+1).join("../")+h.substr(u.length+1)}t.relative=l;var m=function(){var u=Object.create(null);return!("__proto__"in u)}();function y(u){return u}function C(u){return B(u)?"$"+u:u}t.toSetString=m?y:C;function _(u){return B(u)?u.slice(1):u}t.fromSetString=m?y:_;function B(u){if(!u)return!1;var h=u.length;if(h<9||u.charCodeAt(h-1)!==95||u.charCodeAt(h-2)!==95||u.charCodeAt(h-3)!==111||u.charCodeAt(h-4)!==116||u.charCodeAt(h-5)!==111||u.charCodeAt(h-6)!==114||u.charCodeAt(h-7)!==112||u.charCodeAt(h-8)!==95||u.charCodeAt(h-9)!==95)return!1;for(var g=h-10;g>=0;g--)if(u.charCodeAt(g)!==36)return!1;return!0}function Y(u,h,g){var p=te(u.source,h.source);return p!==0||(p=u.originalLine-h.originalLine,p!==0)||(p=u.originalColumn-h.originalColumn,p!==0||g)||(p=u.generatedColumn-h.generatedColumn,p!==0)||(p=u.generatedLine-h.generatedLine,p!==0)?p:te(u.name,h.name)}t.compareByOriginalPositions=Y;function xe(u,h,g){var p;return p=u.originalLine-h.originalLine,p!==0||(p=u.originalColumn-h.originalColumn,p!==0||g)||(p=u.generatedColumn-h.generatedColumn,p!==0)||(p=u.generatedLine-h.generatedLine,p!==0)?p:te(u.name,h.name)}t.compareByOriginalPositionsNoSource=xe;function Fe(u,h,g){var p=u.generatedLine-h.generatedLine;return p!==0||(p=u.generatedColumn-h.generatedColumn,p!==0||g)||(p=te(u.source,h.source),p!==0)||(p=u.originalLine-h.originalLine,p!==0)||(p=u.originalColumn-h.originalColumn,p!==0)?p:te(u.name,h.name)}t.compareByGeneratedPositionsDeflated=Fe;function Je(u,h,g){var p=u.generatedColumn-h.generatedColumn;return p!==0||g||(p=te(u.source,h.source),p!==0)||(p=u.originalLine-h.originalLine,p!==0)||(p=u.originalColumn-h.originalColumn,p!==0)?p:te(u.name,h.name)}t.compareByGeneratedPositionsDeflatedNoLine=Je;function te(u,h){return u===h?0:u===null?1:h===null?-1:u>h?1:-1}function xt(u,h){var g=u.generatedLine-h.generatedLine;return g!==0||(g=u.generatedColumn-h.generatedColumn,g!==0)||(g=te(u.source,h.source),g!==0)||(g=u.originalLine-h.originalLine,g!==0)||(g=u.originalColumn-h.originalColumn,g!==0)?g:te(u.name,h.name)}t.compareByGeneratedPositionsInflated=xt;function Ct(u){return JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}t.parseSourceMapInput=Ct;function bt(u,h,g){if(h=h||"",u&&(u[u.length-1]!=="/"&&h[0]!=="/"&&(u+="/"),h=u+h),g){var p=i(g);if(!p)throw new Error("sourceMapURL could not be parsed");if(p.path){var ne=p.path.lastIndexOf("/");ne>=0&&(p.path=p.path.substring(0,ne+1))}h=s(o(p),h)}return c(h)}t.computeSourceURL=bt})(mt);var hr={},Jt=mt,Yt=Object.prototype.hasOwnProperty,_e=typeof Map<"u";function ke(){this._array=[],this._set=_e?new Map:Object.create(null)}ke.fromArray=function(e,n){for(var r=new ke,i=0,o=e.length;i<o;i++)r.add(e[i],n);return r},ke.prototype.size=function(){return _e?this._set.size:Object.getOwnPropertyNames(this._set).length},ke.prototype.add=function(e,n){var r=_e?e:Jt.toSetString(e),i=_e?this.has(e):Yt.call(this._set,r),o=this._array.length;(!i||n)&&this._array.push(e),i||(_e?this._set.set(e,o):this._set[r]=o)},ke.prototype.has=function(e){if(_e)return this._set.has(e);var n=Jt.toSetString(e);return Yt.call(this._set,n)},ke.prototype.indexOf=function(e){if(_e){var n=this._set.get(e);if(n>=0)return n}else{var r=Jt.toSetString(e);if(Yt.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},ke.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},ke.prototype.toArray=function(){return this._array.slice()},hr.ArraySet=ke;var fr={},pr=mt;function Gs(t,e){var n=t.generatedLine,r=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return r>n||r==n&&o>=i||pr.compareByGeneratedPositionsInflated(t,e)<=0}function gt(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}gt.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},gt.prototype.add=function(e){Gs(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},gt.prototype.toArray=function(){return this._sorted||(this._array.sort(pr.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},fr.MappingList=gt;var We=Wt,P=mt,kt=hr.ArraySet,Hs=fr.MappingList;function ee(t){t||(t={}),this._file=P.getArg(t,"file",null),this._sourceRoot=P.getArg(t,"sourceRoot",null),this._skipValidation=P.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=P.getArg(t,"ignoreInvalidMapping",!1),this._sources=new kt,this._names=new kt,this._mappings=new Hs,this._sourcesContents=null}ee.prototype._version=3,ee.fromSourceMap=function(e,n){var r=e.sourceRoot,i=new ee(Object.assign(n||{},{file:e.file,sourceRoot:r}));return e.eachMapping(function(o){var a={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(a.source=o.source,r!=null&&(a.source=P.relative(r,a.source)),a.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(a.name=o.name)),i.addMapping(a)}),e.sources.forEach(function(o){var a=o;r!==null&&(a=P.relative(r,o)),i._sources.has(a)||i._sources.add(a);var f=e.sourceContentFor(o);f!=null&&i.setSourceContent(o,f)}),i},ee.prototype.addMapping=function(e){var n=P.getArg(e,"generated"),r=P.getArg(e,"original",null),i=P.getArg(e,"source",null),o=P.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(n,r,i,o)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:o}))},ee.prototype.setSourceContent=function(e,n){var r=e;this._sourceRoot!=null&&(r=P.relative(this._sourceRoot,r)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[P.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[P.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},ee.prototype.applySourceMap=function(e,n,r){var i=n;if(n==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var o=this._sourceRoot;o!=null&&(i=P.relative(o,i));var a=new kt,f=new kt;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var s=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});s.source!=null&&(c.source=s.source,r!=null&&(c.source=P.join(r,c.source)),o!=null&&(c.source=P.relative(o,c.source)),c.originalLine=s.line,c.originalColumn=s.column,s.name!=null&&(c.name=s.name))}var l=c.source;l!=null&&!a.has(l)&&a.add(l);var m=c.name;m!=null&&!f.has(m)&&f.add(m)},this),this._sources=a,this._names=f,e.sources.forEach(function(c){var s=e.sourceContentFor(c);s!=null&&(r!=null&&(c=P.join(r,c)),o!=null&&(c=P.relative(o,c)),this.setSourceContent(c,s))},this)},ee.prototype._validateMapping=function(e,n,r,i){if(n&&typeof n.line!="number"&&typeof n.column!="number"){var o="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(o),!1;throw new Error(o)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!n&&!r&&!i)){if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r)return;var o="Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(o),!1;throw new Error(o)}},ee.prototype._serializeMappings=function(){for(var e=0,n=1,r=0,i=0,o=0,a=0,f="",c,s,l,m,y=this._mappings.toArray(),C=0,_=y.length;C<_;C++){if(s=y[C],c="",s.generatedLine!==n)for(e=0;s.generatedLine!==n;)c+=";",n++;else if(C>0){if(!P.compareByGeneratedPositionsInflated(s,y[C-1]))continue;c+=","}c+=We.encode(s.generatedColumn-e),e=s.generatedColumn,s.source!=null&&(m=this._sources.indexOf(s.source),c+=We.encode(m-a),a=m,c+=We.encode(s.originalLine-1-i),i=s.originalLine-1,c+=We.encode(s.originalColumn-r),r=s.originalColumn,s.name!=null&&(l=this._names.indexOf(s.name),c+=We.encode(l-o),o=l)),f+=c}return f},ee.prototype._generateSourcesContent=function(e,n){return e.map(function(r){if(!this._sourcesContents)return null;n!=null&&(r=P.relative(n,r));var i=P.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)},ee.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},ee.prototype.toString=function(){return JSON.stringify(this.toJSON())};var Ws=ee;const dr=new Set(["Atrule","Selector","Declaration"]);function Ks(t){const e=new Ws,n={line:1,column:0},r={line:0,column:0},i={line:1,column:0},o={generated:i};let a=1,f=0,c=!1;const s=t.node;t.node=function(y){if(y.loc&&y.loc.start&&dr.has(y.type)){const C=y.loc.start.line,_=y.loc.start.column-1;(r.line!==C||r.column!==_)&&(r.line=C,r.column=_,n.line=a,n.column=f,c&&(c=!1,(n.line!==i.line||n.column!==i.column)&&e.addMapping(o)),c=!0,e.addMapping({source:y.loc.source,original:r,generated:n}))}s.call(this,y),c&&dr.has(y.type)&&(i.line=a,i.column=f)};const l=t.emit;t.emit=function(y,C,_){for(let B=0;B<y.length;B++)y.charCodeAt(B)===10?(a++,f=0):f++;l(y,C,_)};const m=t.result;return t.result=function(){return c&&e.addMapping(o),{css:m(),map:e}},t}const Qs=43,Js=45,Xt=(t,e)=>{if(t===$&&(t=e),typeof t=="string"){const n=t.charCodeAt(0);return n>127?32768:n<<8}return t},mr=[[k,k],[k,N],[k,ie],[k,se],[k,"-"],[k,E],[k,M],[k,I],[k,oe],[k,Z],[U,k],[U,N],[U,ie],[U,se],[U,"-"],[U,E],[U,M],[U,I],[U,oe],[z,k],[z,N],[z,ie],[z,se],[z,"-"],[z,E],[z,M],[z,I],[z,oe],[I,k],[I,N],[I,ie],[I,se],[I,"-"],[I,E],[I,M],[I,I],[I,oe],["#",k],["#",N],["#",ie],["#",se],["#","-"],["#",E],["#",M],["#",I],["#",oe],["-",k],["-",N],["-",ie],["-",se],["-","-"],["-",E],["-",M],["-",I],["-",oe],[E,k],[E,N],[E,ie],[E,se],[E,E],[E,M],[E,I],[E,"%"],[E,oe],["@",k],["@",N],["@",ie],["@",se],["@","-"],["@",oe],[".",E],[".",M],[".",I],["+",E],["+",M],["+",I],["/","*"]],Ys=mr.concat([[k,z],[I,z],[z,z],[U,Z],[U,$e],[U,X],[M,M],[M,I],[M,N],[M,"-"],[T,k],[T,N],[T,M],[T,I],[T,z],[T,"-"]]);function gr(t){const e=new Set(t.map(([n,r])=>Xt(n)<<16|Xt(r)));return function(n,r,i){const o=Xt(r,i),a=i.charCodeAt(0);return(a===Js&&r!==k&&r!==N&&r!==oe||a===Qs?e.has(n<<16|a<<8):e.has(n<<16|o))&&this.emit(" ",H,!0),o}}const Xs=gr(mr),kr=gr(Ys),yr=Object.freeze(Object.defineProperty({__proto__:null,safe:kr,spec:Xs},Symbol.toStringTag,{value:"Module"})),Zs=92;function eo(t,e){if(typeof e=="function"){let n=null;t.children.forEach(r=>{n!==null&&e.call(this,n),this.node(r),n=r});return}t.children.forEach(this.node,this)}function to(t){Jn(t,(e,n,r)=>{this.token(e,t.slice(n,r))})}function no(t){const e=new Map;for(let[n,r]of Object.entries(t.node))typeof(r.generate||r)=="function"&&e.set(n,r.generate||r);return function(n,r){let i="",o=0,a={node(c){if(e.has(c.type))e.get(c.type).call(f,c);else throw new Error("Unknown node type: "+c.type)},tokenBefore:kr,token(c,s){o=this.tokenBefore(o,c,s),this.emit(s,c,!1),c===$&&s.charCodeAt(0)===Zs&&this.emit(`
|
|
7
|
+
`,H,!0)},emit(c){i+=c},result(){return i}};r&&(typeof r.decorator=="function"&&(a=r.decorator(a)),r.sourceMap&&(a=Ks(a)),r.mode in yr&&(a.tokenBefore=yr[r.mode]));const f={node:c=>a.node(c),children:eo,token:(c,s)=>a.token(c,s),tokenize:to};return a.node(n),a.result()}}function ro(t){this.token(U,"@"+t.name),t.prelude!==null&&this.node(t.prelude),t.block?this.node(t.block):this.token(tt,";")}function io(t){this.children(t)}function so(t){this.token(Tt,"{"),this.children(t,e=>{e.type==="Declaration"&&this.token(tt,";")}),this.token(Ot,"}")}function oo(t){this.token($,"["),this.children(t),this.token($,"]")}function ao(){this.token(oe,"-->")}function lo(){this.token(Fn,"<!--")}function co(t){this.token(he,"/*"+t.value+"*/")}function uo(t){t.children.forEach(e=>{e.type==="Condition"?(this.token(Z,"("),this.node(e),this.token(T,")")):this.node(e)})}function ho(t){this.token(k,t.property),this.token(X,":"),this.node(t.value),t.important&&(this.token($,"!"),this.token(k,t.important===!0?"important":t.important))}function fo(t){this.children(t,e=>{e.type==="Declaration"&&this.token(tt,";")})}function po(t){this.token(I,t.value+t.unit)}function mo(t){this.token(Z,"("),this.token(k,t.name),t.value!==null&&(this.token(X,":"),this.node(t.value)),this.token(T,")")}function go(t){this.token(N,t.feature+"("),this.node(t.value),this.token(T,")")}function ko(t){this.token(Z,"("),this.node(t.left),this.tokenize(t.leftComparison),this.node(t.middle),t.right&&(this.tokenize(t.rightComparison),this.node(t.right)),this.token(T,")")}function yo(t){this.token(N,t.name+"("),this.children(t),this.token(T,")")}function So(t){t.function?this.token(N,t.function+"("):this.token(Z,"("),this.children(t),this.token(T,")")}function xo(t){this.token(z,"#"+t.value)}function Co(t){this.tokenize(t.name)}function bo(t){this.children(t,()=>this.token(Ne,","))}function wo(t){t.mediaType?(t.modifier&&this.token(k,t.modifier),this.token(k,t.mediaType),t.condition&&(this.token(k,"and"),this.node(t.condition))):t.condition&&this.node(t.condition)}function vo(t){this.children(t,()=>this.token(Ne,","))}function Ao(t){this.token(E,t.value)}function Lo(t){this.token(Z,"("),this.children(t),this.token(T,")")}function Eo(t){this.node(t.left),this.token($,"/"),t.right?this.node(t.right):this.node(E,1)}function _o(t){this.node(t.prelude),this.node(t.block)}function To(t){t.root&&(this.token(Z,"("),this.node(t.root),this.token(T,")")),t.limit&&(this.token(k,"to"),this.token(Z,"("),this.node(t.limit),this.token(T,")"))}function Oo(t){this.children(t)}function Io(t){this.token(Z,"("),this.node(t.declaration),this.token(T,")")}function $o(t){this.tokenize(t.value)}const No=32,Do=92,Po=34,Mo=39,zo=40,Fo=41;function Ro(t){let e="",n=!1;for(let r=0;r<t.length;r++){const i=t.charCodeAt(r);if(i===0){e+="�";continue}if(i<=31||i===127){e+="\\"+i.toString(16),n=!0;continue}i===No||i===Do||i===Po||i===Mo||i===zo||i===Fo?(e+="\\"+t.charAt(r),n=!1):(n&&Ve(i)&&(e+=" "),e+=t.charAt(r),n=!1)}return"url("+e+")"}function qo(t){this.token(ie,Ro(t.value))}function Bo(t){this.children(t)}function jo(t){this.token(H,t.value)}const Uo=no({node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:Qi,Atrule:ro,AtrulePrelude:io,AttributeSelector:ns,Block:so,Brackets:oo,CDC:ao,CDO:lo,ClassSelector:ss,Combinator:us,Comment:co,Condition:uo,Declaration:ho,DeclarationList:fo,Dimension:po,Feature:mo,FeatureFunction:go,FeatureRange:ko,Function:yo,GeneralEnclosed:So,Hash:xo,IdSelector:ds,Identifier:fs,Layer:Co,LayerList:bo,MediaQuery:wo,MediaQueryList:vo,NestingSelector:ks,Nth:Ss,Number:Ao,Operator:Cs,Parentheses:Lo,Percentage:ws,PseudoClassSelector:As,PseudoElementSelector:Es,Ratio:Eo,Raw:Os,Rule:_o,Scope:To,Selector:$s,SelectorList:Ds,String:Rs,StyleSheet:Oo,SupportsDeclaration:Io,TypeSelector:js,UnicodeRange:$o,Url:qo,Value:Bo,WhiteSpace:jo},Symbol.toStringTag,{value:"Module"}))}),Ke=(t,e)=>t.a===e.a?t.b===e.b?t.c-e.c:t.b-e.b:t.a-e.a,Sr=(t,e)=>Ke(t,e)===0,xr=(t,e)=>Ke(t,e)>0,Cr=(t,e)=>Ke(t,e)<0,br=(t,e="ASC")=>{const n=t.sort(Ke);return e==="DESC"?n.reverse():n},wr=(...t)=>br(t,"ASC"),vr=(...t)=>br(t,"DESC"),Zt=(...t)=>vr(...t)[0],Vo=(...t)=>wr(...t)[0];class en extends Error{constructor(){super("Manipulating a Specificity instance is not allowed. Instead, create a new Specificity()")}}class Go{constructor(e,n=null){this.value=e,this.selector=n}get a(){return this.value.a}set a(e){throw new en}get b(){return this.value.b}set b(e){throw new en}get c(){return this.value.c}set c(e){throw new en}selectorString(){return typeof this.selector=="string"||this.selector instanceof String?this.selector:this.selector instanceof Object&&this.selector.type==="Selector"?Uo(this.selector):""}toObject(){return this.value}toArray(){return[this.value.a,this.value.b,this.value.c]}toString(){return`(${this.value.a},${this.value.b},${this.value.c})`}toJSON(){return{selector:this.selectorString(),asObject:this.toObject(),asArray:this.toArray(),asString:this.toString()}}isEqualTo(e){return Sr(this,e)}isGreaterThan(e){return xr(this,e)}isLessThan(e){return Cr(this,e)}static calculate(e){return Me(e)}static calculateForAST(e){return tn(e)}static compare(e,n){return Ke(e,n)}static equals(e,n){return Sr(e,n)}static lessThan(e,n){return Cr(e,n)}static greaterThan(e,n){return xr(e,n)}static min(...e){return Vo(...e)}static max(...e){return Zt(...e)}static sortAsc(...e){return wr(...e)}static sortDesc(...e){return vr(...e)}}const tn=t=>{if(!t||t.type!=="Selector")throw new TypeError("Passed in source is not a Selector AST");let e=0,n=0,r=0;return t.children.forEach(i=>{switch(i.type){case"IdSelector":e+=1;break;case"AttributeSelector":case"ClassSelector":n+=1;break;case"PseudoClassSelector":switch(i.name.toLowerCase()){case"where":break;case"-webkit-any":case"any":i.children&&(n+=1);break;case"-moz-any":case"is":case"matches":case"not":case"has":if(i.children){const a=Zt(...Me(i.children.first));e+=a.a,n+=a.b,r+=a.c}break;case"nth-child":case"nth-last-child":if(n+=1,i.children&&i.children.first.selector){const a=Zt(...Me(i.children.first.selector));e+=a.a,n+=a.b,r+=a.c}break;case"host-context":case"host":if(n+=1,i.children){const a={type:"Selector",children:[]};let f=!1;i.children.first.children.forEach(s=>{if(f)return!1;if(s.type==="Combinator")return f=!0,!1;a.children.push(s)});const c=Me(a)[0];e+=c.a,n+=c.b,r+=c.c}break;case"after":case"before":case"first-letter":case"first-line":r+=1;break;default:n+=1;break}break;case"PseudoElementSelector":switch(i.name){case"slotted":if(r+=1,i.children){const a={type:"Selector",children:[]};let f=!1;i.children.first.children.forEach(s=>{if(f)return!1;if(s.type==="Combinator")return f=!0,!1;a.children.push(s)});const c=Me(a)[0];e+=c.a,n+=c.b,r+=c.c}break;case"view-transition-group":case"view-transition-image-pair":case"view-transition-old":case"view-transition-new":if(i.children&&i.children.first.value==="*")break;r+=1;break;default:r+=1;break}break;case"TypeSelector":let o=i.name;o.includes("|")&&(o=o.split("|")[1]),o!=="*"&&(r+=1);break}}),new Go({a:e,b:n,c:r},t)},Ho=t=>{if(typeof t=="string"||t instanceof String)try{return sr(t,{context:"selectorList"})}catch(e){throw new TypeError(`Could not convert passed in source '${t}' to SelectorList: ${e.message}`)}if(t instanceof Object){if(t.type&&["Selector","SelectorList"].includes(t.type))return t;if(t.type&&t.type==="Raw")try{return sr(t.value,{context:"selectorList"})}catch(e){throw new TypeError(`Could not convert passed in source to SelectorList: ${e.message}`)}throw new TypeError("Passed in source is an Object but no AST / AST of the type Selector or SelectorList")}throw new TypeError("Passed in source is not a String nor an Object. I don't know what to do with it.")},Me=t=>{if(!t)return[];const e=Ho(t);if(e.type==="Selector")return[tn(t)];if(e.type==="SelectorList"){const n=[];return e.children.forEach(r=>{const i=tn(r);n.push(i)}),n}};function nn(t,e){return e>=65&&e<=90&&(e=e|32),t===e}function Q(t,e){if(t===e)return!0;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(nn(t.charCodeAt(r),e.charCodeAt(r))===!1)return!1;return!0}function ye(t,e){if(t===e)return!0;let n=e.length,r=n-t.length;if(r<0)return!1;for(let i=n-1;i>=r;i--)if(nn(t.charCodeAt(i-r),e.charCodeAt(i))===!1)return!1;return!0}function rn(t,e){if(t===e)return!0;let n=t.length;if(e.length<n)return!1;for(let r=0;r<n;r++)if(nn(t.charCodeAt(r),e.charCodeAt(r))===!1)return!1;return!0}const Wo="Atrule",Ko="MediaQuery",Qo="MediaFeature",Jo="Rule",sn="Selector",Ar="TypeSelector",Qe="PseudoClassSelector",Lr="AttributeSelector",Er="PseudoElementSelector",on="Declaration",Yo="Value",me="Identifier",Xo="Nth",Zo="Combinator",ea="Number",_r="Dimension",ze="Operator",ta="Hash",na="Url",an="Function";function Tr(t,e,n){let r=t.value.children.first;return Q(e,t.property)&&r.type===me&&Q(n,r.name)}function Or(t){let e=!1;return ue(t,function(n){if(n.type===on&&(Tr(n,"-webkit-appearance","none")||Tr(n,"-moz-appearance","meterbar")))return e=!0,this.break}),e}function Ir(t){let e=!1;return ue(t,function(n){let r=n.children,i=n.name,o=n.value;if(n.type===Ko&&r.size===1&&r.first.type===me){let a=r.first.name;if(rn("\\0",a)||ye("\\9 ",a))return e=!0,this.break}else if(n.type===Qo){if(o&&o.unit&&o.unit==="\\0")return e=!0,this.break;if(Q("-moz-images-in-menus",i)||Q("min--moz-device-pixel-ratio",i)||Q("-ms-high-contrast",i))return e=!0,this.break;if(Q("min-resolution",i)&&o&&Q(".001",o.value)&&Q("dpcm",o.unit))return e=!0,this.break;if(Q("-webkit-min-device-pixel-ratio",i)&&o&&o.value&&(Q("0",o.value)||Q("10000",o.value)))return e=!0,this.break}}),e}const $r=45;function Se(t){return t.charCodeAt(0)===$r&&t.charCodeAt(1)!==$r&&t.indexOf("-",2)!==-1}class ae{constructor(e){this.set=new Set(e)}has(e){return this.set.has(e.toLowerCase())}}function Nr(t,e){let n=[];return ue(t,{visit:sn,enter:function(r){n.push(e(r))}}),n}const Dr=new ae(["nth-child","where","not","is","has","nth-last-child","matches","-webkit-any","-moz-any"]);function ln(t){let e=!1;return ue(t,function(n){if(n.type===Lr){let r=n.name.name;if(Q("role",r)||rn("aria-",r))return e=!0,this.break}else if(n.type===Qe&&Dr.has(n.name)){let r=Nr(n,ln);for(let i of r)if(i===!0){e=!0;break}return this.skip}}),e}function Pr(t){let e=!1;return ue(t,function(n){let r=n.type;if((r===Er||r===Ar||r===Qe)&&Se(n.name))return e=!0,this.break}),e}function ra(t){let e=[];return ue(t,function(n){n.type===Qe&&e.push(n.name)}),e.length===0?!1:e}function cn(t){let e=0;return ue(t,function(n){let r=n.type;if(!(r===sn||r===Xo)){if(e++,(r===Er||r===Ar||r===Qe)&&Se(n.name)&&e++,r===Lr)return n.value&&e++,this.skip;if(r===Qe&&Dr.has(n.name)){let i=Nr(n,cn);if(i.length===0)return;for(let o of i)e+=o;return this.skip}}}),e}function ia(t,e){ue(t,function(n,r){if(n.type===Zo){let i=n.loc,o=n.name;if(i===null){let a=r.prev.data.loc.end,f={offset:a.offset,line:a.line,column:a.column};e({name:o,loc:{start:f,end:{offset:f.offset+1,line:f.line,column:f.column+1}}})}else e({name:o,loc:i})}})}const sa=new ae(["white","black","red","gray","silver","grey","green","orange","blue","dimgray","whitesmoke","lightgray","lightgrey","yellow","gold","pink","gainsboro","magenta","purple","darkgray","navy","darkred","teal","maroon","darkgrey","tomato","darkorange","brown","crimson","lightyellow","slategray","salmon","lightgreen","lightblue","orangered","aliceblue","dodgerblue","lime","darkblue","darkgoldenrod","skyblue","royalblue","darkgreen","ivory","olive","aqua","turquoise","cyan","khaki","beige","snow","ghostwhite","limegreen","coral","dimgrey","hotpink","midnightblue","firebrick","indigo","wheat","mediumblue","lightpink","plum","azure","violet","lavender","deepskyblue","darkslategrey","goldenrod","cornflowerblue","lightskyblue","indianred","yellowgreen","saddlebrown","palegreen","bisque","tan","antiquewhite","steelblue","forestgreen","fuchsia","mediumaquamarine","seagreen","sienna","deeppink","mediumseagreen","peru","greenyellow","lightgoldenrodyellow","orchid","cadetblue","navajowhite","lightsteelblue","slategrey","linen","lightseagreen","darkcyan","lightcoral","aquamarine","blueviolet","cornsilk","lightsalmon","chocolate","lightslategray","floralwhite","darkturquoise","darkslategray","rebeccapurple","burlywood","chartreuse","lightcyan","lemonchiffon","palevioletred","darkslateblue","mediumpurple","lawngreen","slateblue","darkseagreen","blanchedalmond","mistyrose","darkolivegreen","seashell","olivedrab","peachpuff","darkviolet","powderblue","darkmagenta","lightslategrey","honeydew","palegoldenrod","darkkhaki","oldlace","mintcream","sandybrown","mediumturquoise","papayawhip","paleturquoise","mediumvioletred","thistle","springgreen","moccasin","rosybrown","lavenderblush","mediumslateblue","darkorchid","mediumorchid","darksalmon","mediumspringgreen"]),oa=new ae(["accentcolor","accentcolortext","activetext","buttonborder","buttonface","buttontext","canvas","canvastext","field","fieldtext","graytext","highlight","highlighttext","linktext","mark","marktext","selecteditem","selecteditemtext","visitedtext"]),aa=new ae(["rgba","rgb","hsla","hsl","oklch","color","hwb","lch","lab","oklab"]),la=new ae(["transparent","currentcolor"]),yt=new ae(["auto","none","inherit","initial","unset","revert","revert-layer"]);function St(t){let e=t.children,n=e.size;if(!e||n>1||n===0)return!1;let r=e.first;return r.type===me&&yt.has(r.name)}const ca=new ae(["caption","icon","menu","message-box","small-caption","status-bar"]),ua=new ae(["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","smaller","larger"]),ha=44,Mr=47;function un(t){let e=t.children.first;return e===null?!1:e.type===me&&ca.has(e.name)}function fa(t,e,n){let r=Array.from({length:2}),i,o;t.children.forEach(function(f,c){let s=c.prev?c.prev.data:void 0,l=c.next?c.next.data:void 0;if(f.type===me&&yt.has(f.name)&&n({type:"keyword",value:f.name}),l&&l.type===ze&&l.value.charCodeAt(0)===Mr){i=e(f);return}if(s&&s.type===ze&&s.value.charCodeAt(0)===Mr){o=e(f);return}if(l&&l.type===ze&&l.value.charCodeAt(0)===ha&&!r[0]){r[0]=f,!i&&s&&(i=e(s));return}if(f.type!==ea){if(c.next===null){r[1]=f,!i&&!r[0]&&s&&(i=e(s));return}if(f.type===me){let m=f.name;if(ua.has(m)){i=m;return}}}});let a=r[0]||r[1]?e({loc:{start:{offset:(r[0]||r[1]).loc.start.offset},end:{offset:r[1].loc.end.offset}}}):null;return{font_size:i,line_height:o,font_family:a}}const pa=new ae(["linear","ease","ease-in","ease-out","ease-in-out","step-start","step-end"]),da=new ae(["cubic-bezier","steps"]);function ma(t,e){let n=!1;for(let r of t){let i=r.type,o=r.name;i===ze?n=!1:i===_r&&n===!1?(n=!0,e({type:"duration",value:r})):i===me?pa.has(o)?e({type:"fn",value:r}):yt.has(o)&&e({type:"keyword",value:r}):i===an&&da.has(o)&&e({type:"fn",value:r})}}function hn(t){let e=t.children;if(!e)return!1;for(let n of e){let{type:r,name:i}=n;if(r===me&&Se(i)||r===an&&(Se(i)||hn(n)))return!0}return!1}class x{constructor(e=!1){this._items=new Map,this._total=0,e&&(this._nodes=[]),this._useLocations=e}p(e,n){let r=this._total;if(this._useLocations){let i=n.start,o=i.offset,a=r*4;this._nodes[a]=i.line,this._nodes[a+1]=i.column,this._nodes[a+2]=o,this._nodes[a+3]=n.end.offset-o}if(this._items.has(e)){this._items.get(e).push(r),this._total++;return}this._items.set(e,[r]),this._total++}size(){return this._total}c(){let e=new Map,n={},r=this._useLocations,i=this._items,o=this._nodes,a=i.size;i.forEach((s,l)=>{if(r){let m=s.map(function(y){let C=y*4;return{line:o[C],column:o[C+1],offset:o[C+2],length:o[C+3]}});e.set(l,m)}else n[l]=s.length});let f=this._total,c={total:f,totalUnique:a,unique:n,uniquenessRatio:f===0?0:a/f};return r&&(c.uniqueWithLocations=Object.fromEntries(e)),c}}class fn{constructor(e){this._list=new x(e),this._contexts=new Map,this._useLocations=e}push(e,n,r){this._list.p(e,r),this._contexts.has(n)||this._contexts.set(n,new x(this._useLocations)),this._contexts.get(n).p(e,r)}count(){let e=new Map;for(let[n,r]of this._contexts.entries())e.set(n,r.c());return Object.assign(this._list.c(),{itemsPerContext:Object.fromEntries(e)})}}function ga(t){let e=new Map,n=-1,r=0,i=0,o=t.length;for(let a=0;a<o;a++){let f=t[a],c=(e.get(f)||0)+1;e.set(f,c),c>n&&(n=c,r=0,i=0),c>=n&&(r++,i+=f)}return i/r}class le{constructor(){this._items=[],this._sum=0}push(e){this._items.push(e),this._sum+=e}size(){return this._items.length}aggregate(){let e=this._items.length;if(e===0)return{min:0,max:0,mean:0,mode:0,range:0,sum:0};let n=this._items.slice().sort((f,c)=>f-c),r=n[0],i=n[e-1],o=ga(n),a=this._sum;return{min:r,max:i,mean:a/e,mode:o,range:i-r,sum:a}}toArray(){return this._items}}function zr(t){if(pn(t)||Se(t))return!1;let e=t.charCodeAt(0);return e===47||e===42||e===95||e===43||e===38||e===36||e===35}function pn(t){return t.length<3?!1:t.charCodeAt(0)===45&&t.charCodeAt(1)===45}function J(t,e){return pn(e)?!1:ye(t,e)}function ka(t){return Se(t)?t.slice(t.indexOf("-",2)+1):t}function ya(t){let e=5,n=t.indexOf(";"),r=t.indexOf(",");return n===-1||r!==-1&&r<n?t.substring(e,r):t.substring(e,n)}function Sa(t){let e=t.children;if(e){let n=e.last;return n&&n.type===me&&ye("\\9",n.name)}return!1}let xa=new ae(["border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-start-start-radius","border-start-end-radius","border-end-end-radius","border-end-start-radius"]);function j(t,e){return e===0?0:t/e}let Ca={useLocations:!1};function ba(t,e={}){let r=Object.assign({},Ca,e).useLocations===!0,i=Date.now();function o(d){return a(d).trim()}function a(d){let w=d.loc;return t.substring(w.start.offset,w.end.offset)}let f=0,c=0,s=0,l={total:0,unique:new Map},m=Date.now(),y=je(t,{parseCustomProperty:!0,positions:!0,onComment:function(d){f++,c+=d.length}}),C=Date.now(),_=y.loc.end.line-y.loc.start.line+1,B=0,Y=new le,xe=[],Fe=new x(r),Je=new x(r),te=new x(r),xt=new x(r),Ct=new x(r),bt=new x(r),u=new x(r),h=new x(r),g=new x(r),p=new x(r),ne=new x(r),V=new x(r),we=0,R=0,ve=new le,Ce=new le,mn=new le,Fr=new x(r),Rr=new x(r),qr=new x(r),gn=new x(r),Br=new Set,kn=new x(r),Te,Oe,jr=new le,Ur=new le,Vr=new le,Gr=new x(r),wt=new le,Hr=new x(r),Wr=[],yn=new x(r),Sn=new x(r),Kr=new x(r),Qr=new x(r),Jr=new Set,Ye=0,Yr=new le,vt=0,xn=0,Cn=new x(r),Xe=new x(r),bn=new x(r),wn=new x(r),At=new x(r),Ze=new le,vn=new le,Xr=new x(r),An=new x(r),Zr=new x(r),ei=new x(r),ti=new x(r),Ln=new x(r),En=new x(r),_n=new x(r),Lt=new x(r),Et=new x(r),Re=new fn(r),qe=new x(r),Tn=new fn(r),ni=new x(r),et=new x(r),ri=new fn(r);ue(y,function(d){switch(d.type){case Wo:{B++;let w=d.name;if(w==="font-face"){let O={};r&&Fe.p(d.loc.start.offset,d.loc),d.block.children.forEach(A=>{A.type===on&&(O[A.property]=o(A.value))}),xe.push(O),Y.push(1);break}let S=1;if(d.prelude!==null){let O=d.prelude,A=O&&o(d.prelude),v=O.loc;if(w==="media")xt.p(A,v),Ir(O)&&(Ct.p(A,v),S++);else if(w==="supports")u.p(A,v),Or(O)&&(h.p(A,v),S++);else if(ye("keyframes",w)){let b="@"+w+" "+A;Se(w)&&(p.p(b,v),S++),g.p(b,v)}else w==="import"?te.p(A,v):w==="charset"?bt.p(A,v):w==="container"?ne.p(A,v):w==="layer"?A.split(",").forEach(b=>Je.p(b.trim(),v)):w==="property"&&V.p(A,v)}else w==="layer"&&(Je.p("<anonymous>",d.loc),S++);Y.push(S);break}case Jo:{let w=d.prelude,S=d.block,O=w.children,A=S.children,v=O?O.size:0,b=A?A.size:0;ve.push(v+b),Fr.p(v+b,d.loc),Ce.push(v),Rr.p(v,w.loc),mn.push(b),qr.p(b,S.loc),we++,b===0&&R++;break}case sn:{let w=o(d);if(this.atrule&&ye("keyframes",this.atrule.name))return gn.p(w,d.loc),this.skip;ln(d)&&Sn.p(w,d.loc);let S=ra(d);if(S!==!1)for(let re of S)Kr.p(re,d.loc);let O=cn(d);Pr(d)&&kn.p(w,d.loc),Br.add(w),wt.push(O),Hr.p(O,d.loc);let[{value:A}]=Me(d),v=A.a,b=A.b,L=A.c,D=[v,b,L];return Gr.p(v+","+b+","+L,d.loc),jr.push(v),Ur.push(b),Vr.push(L),Te===void 0&&(Te=D),Oe===void 0&&(Oe=D),Oe!==void 0&&dn(Oe,D)<0&&(Oe=D),Te!==void 0&&dn(Te,D)>0&&(Te=D),Wr.push(D),v>0&&yn.p(w,d.loc),ia(d,function(ce){Qr.p(ce.name,ce.loc)}),this.skip}case _r:{if(!this.declaration)break;let w=d.unit;return ye("\\9",w)?Tn.push(w.substring(0,w.length-2),this.declaration.property,d.loc):Tn.push(w,this.declaration.property,d.loc),this.skip}case na:{if(rn("data:",d.value)){let w=d.value,S=w.length,O=ya(w);l.total++,s+=S;let A={line:d.loc.start.line,column:d.loc.start.column,offset:d.loc.start.offset,length:d.loc.end.offset-d.loc.start.offset};if(l.unique.has(O)){let v=l.unique.get(O);v.count++,v.size+=S,l.unique.set(O,v),r&&v.uniqueWithLocations.push(A)}else{let v={count:1,size:S};r&&(v.uniqueWithLocations=[A]),l.unique.set(O,v)}}break}case Yo:{if(St(d)){vn.push(1),et.p(o(d),d.loc);break}let w=this.declaration,{property:S,important:O}=w,A=1;hn(d)&&(Xr.p(o(d),d.loc),A++),typeof O=="string"&&(An.p(a(d)+"!"+O,d.loc),A++),Sa(d)&&(An.p(o(d),d.loc),A++);let v=d.children,b=d.loc;if(vn.push(A),J("z-index",S))return Zr.p(o(d),b),this.skip;if(J("font",S)){if(un(d))return;let{font_size:L,line_height:D,font_family:re}=fa(d,o,function(ce){ce.type==="keyword"&&et.p(ce.value,b)});re&&Ln.p(re,b),L&&En.p(L,b),D&&_n.p(D,b);break}else if(J("font-size",S)){un(d)||En.p(o(d),b);break}else if(J("font-family",S)){un(d)||Ln.p(o(d),b);break}else if(J("line-height",S))_n.p(o(d),b);else if(J("transition",S)||J("animation",S)){ma(v,function(L){L.type==="fn"?Lt.p(o(L.value),b):L.type==="duration"?Et.p(o(L.value),b):L.type==="keyword"&&et.p(o(L.value),b)});break}else if(J("animation-duration",S)||J("transition-duration",S)){v&&v.size>1?v.forEach(L=>{L.type!==ze&&Et.p(o(L),b)}):Et.p(o(d),b);break}else if(J("transition-timing-function",S)||J("animation-timing-function",S)){v&&v.size>1?v.forEach(L=>{L.type!==ze&&Lt.p(o(L),b)}):Lt.p(o(d),b);break}else if(xa.has(ka(S))){St(d)||ri.push(o(d),S,b);break}else J("text-shadow",S)?St(d)||ei.p(o(d),b):J("box-shadow",S)&&(St(d)||ti.p(o(d),b));ue(d,function(L){let D=L.name;switch(L.type){case ta:{let re=L.value.length;return ye("\\9",L.value)&&(re=re-2),Re.push("#"+L.value,S,b),qe.p("hex"+re,b),this.skip}case me:{yt.has(D)&&et.p(D,b);let re=D.length;if(re>20||re<3)return this.skip;if(la.has(D)){let ce=o(L);Re.push(ce,S,b),qe.p(D.toLowerCase(),b);return}if(sa.has(D)){let ce=o(L);Re.push(ce,S,b),qe.p("named",b);return}if(oa.has(D)){let ce=o(L);Re.push(ce,S,b),qe.p("system",b);return}return this.skip}case an:{if(Q("var",D))return this.skip;if(aa.has(D)){Re.push(o(L),S,L.loc),qe.p(D.toLowerCase(),L.loc);return}if(ye("gradient",D)){ni.p(o(L),L.loc);return}}}});break}case on:{if(this.atrulePrelude!==null)return this.skip;Ye++;let w=1;Jr.add(o(d)),d.important===!0&&(vt++,w++,this.atrule&&ye("keyframes",this.atrule.name)&&(xn++,w++)),Yr.push(w);let{property:S,loc:{start:O}}=d,A={start:{line:O.line,column:O.column,offset:O.offset},end:{offset:O.offset+S.length}};Xe.p(S,A),Se(S)?(wn.p(S,A),Ze.push(2)):zr(S)?(bn.p(S,A),Ze.push(2)):pn(S)?(At.p(S,A),Ze.push(d.important?3:2),d.important===!0&&Cn.p(S,A)):Ze.push(1);break}}});let ii=Jr.size,Be=wt.size(),On=jr.aggregate(),In=Ur.aggregate(),$n=Vr.aggregate(),si=Br.size,F=Object.assign,oi=t.length,Nn=xe.length,ai=Y.aggregate(),li=wt.aggregate(),ci=Yr.aggregate(),ui=Ze.aggregate(),hi=vn.aggregate();return{stylesheet:{sourceLinesOfCode:B+Be+Ye+gn.size(),linesOfCode:_,size:oi,complexity:ai.sum+li.sum+ci.sum+ui.sum+hi.sum,comments:{total:f,size:c},embeddedContent:{size:{total:s,ratio:j(s,oi)},types:{total:l.total,totalUnique:l.unique.size,uniquenessRatio:j(l.unique.size,l.total),unique:Object.fromEntries(l.unique)}}},atrules:{fontface:F({total:Nn,totalUnique:Nn,unique:xe,uniquenessRatio:Nn===0?0:1},r?{uniqueWithLocations:Fe.c().uniqueWithLocations}:{}),import:te.c(),media:F(xt.c(),{browserhacks:Ct.c()}),charset:bt.c(),supports:F(u.c(),{browserhacks:h.c()}),keyframes:F(g.c(),{prefixed:F(p.c(),{ratio:j(p.size(),g.size())})}),container:ne.c(),layer:Je.c(),property:V.c(),total:B,complexity:ai},rules:{total:we,empty:{total:R,ratio:j(R,we)},sizes:F(ve.aggregate(),{items:ve.toArray()},Fr.c()),selectors:F(Ce.aggregate(),{items:Ce.toArray()},Rr.c()),declarations:F(mn.aggregate(),{items:mn.toArray()},qr.c())},selectors:{total:Be,totalUnique:si,uniquenessRatio:j(si,Be),specificity:F({min:Oe===void 0?[0,0,0]:Oe,max:Te===void 0?[0,0,0]:Te,sum:[On.sum,In.sum,$n.sum],mean:[On.mean,In.mean,$n.mean],mode:[On.mode,In.mode,$n.mode],items:Wr},Gr.c()),complexity:F(li,Hr.c(),{items:wt.toArray()}),id:F(yn.c(),{ratio:j(yn.size(),Be)}),pseudoClasses:Kr.c(),accessibility:F(Sn.c(),{ratio:j(Sn.size(),Be)}),keyframes:gn.c(),prefixed:F(kn.c(),{ratio:j(kn.size(),Be)}),combinators:Qr.c()},declarations:{total:Ye,totalUnique:ii,uniquenessRatio:j(ii,Ye),importants:{total:vt,ratio:j(vt,Ye),inKeyframes:{total:xn,ratio:j(xn,vt)}},complexity:ci},properties:F(Xe.c(),{prefixed:F(wn.c(),{ratio:j(wn.size(),Xe.size())}),custom:F(At.c(),{ratio:j(At.size(),Xe.size()),importants:F(Cn.c(),{ratio:j(Cn.size(),At.size())})}),browserhacks:F(bn.c(),{ratio:j(bn.size(),Xe.size())}),complexity:ui}),values:{colors:F(Re.count(),{formats:qe.c()}),gradients:ni.c(),fontFamilies:Ln.c(),fontSizes:En.c(),lineHeights:_n.c(),zindexes:Zr.c(),textShadows:ei.c(),boxShadows:ti.c(),borderRadiuses:ri.count(),animations:{durations:Et.c(),timingFunctions:Lt.c()},prefixes:Xr.c(),browserhacks:An.c(),units:Tn.count(),complexity:hi,keywords:et.c()},__meta__:{parseTime:C-m,analyzeTime:Date.now()-C,total:Date.now()-i}}}function dn(t,e){return t[0]===e[0]?t[1]===e[1]?e[2]-t[2]:e[1]-t[1]:e[0]-t[0]}q.analyze=ba,q.compareSpecificity=dn,q.hasVendorPrefix=Se,q.isAccessibilitySelector=ln,q.isMediaBrowserhack=Ir,q.isPropertyHack=zr,q.isSelectorPrefixed=Pr,q.isSupportsBrowserhack=Or,q.isValuePrefixed=hn,q.selectorComplexity=cn,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@projectwallace/css-analyzer",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.1",
|
|
4
4
|
"author": "Bart Veneman",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"code"
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@bramus/specificity": "^2.
|
|
51
|
+
"@bramus/specificity": "^2.4.1",
|
|
52
52
|
"css-tree": "^2.3.1"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|