@projectwallace/css-analyzer 6.0.0-beta.2 → 6.0.0

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.
@@ -1,7 +1,7 @@
1
- (function(R,Be){typeof exports=="object"&&typeof module<"u"?Be(exports,require("css-tree/parser"),require("css-tree/walker")):typeof define=="function"&&define.amd?define(["exports","css-tree/parser","css-tree/walker"],Be):(R=typeof globalThis<"u"?globalThis:R||self,Be(R.analyzeCss={},R.parse$i,R.walk))})(this,function(R,Be,ce){"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 Tt=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,Se)=>String(_+Se+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>Tt&&(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,Tt-2)+(s[_].length>C+Tt-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 je=0,k=1,N=2,U=3,M=4,$e=5,pi=6,ie=7,se=8,$=9,L=10,P=11,I=12,H=13,Fn=14,oe=15,X=16,tt=17,Ne=18,nt=19,rt=20,Z=21,T=22,Ot=23,It=24,ue=25,di=0;function W(t){return t>=48&&t<=57}function Ue(t){return W(t)||t>=65&&t<=70||t>=97&&t<=102}function $t(t){return t>=65&&t<=90}function mi(t){return t>=97&&t<=122}function gi(t){return $t(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 Ve(t){return st(t)||t===32||t===9}function me(t,e){return!(t!==92||st(e)||e===di)}function Nt(t,e,n){return t===45?it(e)||e===45||me(e,n):it(t)?!0:t===92?me(t,e):!1}function Dt(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 Pt=new Array(128),Si=128,ot=130,Bn=131,Mt=132,jn=133;for(let t=0;t<Pt.length;t++)Pt[t]=Ve(t)&&ot||W(t)&&Bn||it(t)&&Mt||yi(t)&&jn||t||Si;function zt(t){return t<128?Pt[t]:Mt}function De(t,e){return e<t.length?t.charCodeAt(e):0}function Ft(t,e,n){return n===13&&De(t,e+1)===10?2:1}function Un(t,e,n){let r=t.charCodeAt(e);return $t(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($t(a)&&(a=a|32),a!==o)return!1}return!0}function xi(t,e){for(;e>=0&&Ve(t.charCodeAt(e));e--);return e+1}function lt(t,e){for(;e<t.length&&Ve(t.charCodeAt(e));e++);return e}function Rt(t,e){for(;e<t.length&&W(t.charCodeAt(e));e++);return e}function Ge(t,e){if(e+=2,Ue(De(t,e-1))){for(const r=Math.min(t.length,e+5);e<r&&Ue(De(t,e));e++);const n=De(t,e);Ve(n)&&(e+=Ft(t,e,n))}return e}function ct(t,e){for(;e<t.length;e++){const n=t.charCodeAt(e);if(!Rn(n)){if(me(n,De(t,e+1))){e=Ge(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=Rt(t,e+1),n=t.charCodeAt(e)),n===46&&W(t.charCodeAt(e+1))&&(e+=2,e=Rt(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=Rt(t,e+1+r+1))}return e}function qt(t,e){for(;e<t.length;e++){const n=t.charCodeAt(e);if(n===41){e++;break}me(n,De(t,e+1))&&(e=Ge(t,e))}return e}function Ci(t){if(t.length===1&&!Ue(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 he=16777215,fe=24,Ae=new Uint8Array(32);Ae[N]=T,Ae[Z]=T,Ae[nt]=rt,Ae[Ot]=It;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<<fe|y,f===-1&&(f=m),o[C]=s,l===c){const _=o[s];o[s]=C,s=_,c=Ae[i[_]>>fe]}else Qn(l)&&(s=C,c=Ae[l])}),i[a]=je<<fe|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]>>fe:je}lookupTypeNonSC(e){for(let n=this.tokenIndex;n<this.tokenCount;n++){const r=this.offsetAndType[n]>>fe;if(r!==H&&r!==ue&&e--===0)return r}return je}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&he:this.source.length}lookupOffsetNonSC(e){for(let n=this.tokenIndex;n<this.tokenCount;n++){const r=this.offsetAndType[n]>>fe;if(r!==H&&r!==ue&&e--===0)return n-this.tokenIndex}return je}lookupValue(e,n){return e+=this.tokenIndex,e<this.tokenCount?at(this.source,this.offsetAndType[e-1]&he,this.offsetAndType[e]&he,n):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&he:this.offsetAndType[this.tokenCount]&he: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]&he,n=this.offsetAndType[n],this.tokenType=n>>fe,this.tokenEnd=n&he):(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>>fe,this.tokenEnd=e&he):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=je,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===H||this.tokenType===ue;)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]&he:this.firstCharOffset,n(this.source.charCodeAt(o))){case 1:break e;case 2:r++;break e;default:Qn(this.offsetAndType[r]>>fe)&&(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&he,f=o>>fe;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),Nt(n(s),n(s+1),n(s+2))){l=I,s=ct(t,s);return}if(n(s)===37){l=P,s++;return}l=L}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(zt(y)){case m:s++;return;case ot:if(st(y)){s+=Ft(t,s,y),l=pi;return}break;case 92:if(s===t.length-1)break;const C=n(s+1);st(C)?s+=Ft(t,s+1,C):me(y,C)&&(s=Ge(t,s)-1);break}}}function a(){for(l=ie,s=lt(t,s);s<t.length;s++){const m=t.charCodeAt(s);switch(zt(m)){case 41:s++;return;case ot:if(s=lt(t,s),n(s)===41||s>=t.length){s<t.length&&s++;return}s=qt(t,s),l=se;return;case 34:case 39:case 40:case jn:s=qt(t,s),l=se;return;case 92:if(me(m,n(s+1))){s=Ge(t,s)-1;break}s=qt(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(zt(m)){case ot:l=H,s=lt(t,s+1);break;case 34:o();break;case 35:Rn(n(s+1))||me(n(s+1),n(s+2))?(l=M,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:Dt(m,n(s+1),n(s+2))?r():(l=$,s++);break;case 44:l=Ne,s++;break;case 45:Dt(m,n(s+1),n(s+2))?r():n(s+1)===45&&n(s+2)===62?(l=oe,s=s+3):Nt(m,n(s+1),n(s+2))?i():(l=$,s++);break;case 46:Dt(m,n(s+1),n(s+2))?r():(l=$,s++);break;case 47:n(s+1)===42?(l=ue,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:Nt(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:me(m,n(s+1))?i():(l=$,s++);break;case 93:l=rt,s++;break;case 123:l=Ot,s++;break;case 125:l=It,s++;break;case Bn:r();break;case Mt: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 ue: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,Bt=59,Xn=123,Zn=0;function Ti(t){return function(){return this[t]()}}function jt(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:jt(t.atrule),pseudo:jt(t.pseudo),node:jt(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===Bt?1:0},consumeUntilExclamationMarkOrSemicolon(s){return s===Ei||s===Bt?1:0},consumeUntilSemicolonIncluded(s){return s===Bt?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!==ue)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 M:this.isDelim(_i)&&(this.next(),y++,m="Name is expected");break;case P:this.tokenType===L&&(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(_===ue){const Se=f.getLocation(B,Y),ze=at(e,Y-2,Y,"*/")?e.slice(B+2,Y-2):e.slice(B+2,Y);y(ze,Se)}});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 M:return this.IdSelector();case X:return this.lookupType(1)===X?this.PseudoElementSelector():this.PseudoClassSelector();case k:return this.TypeSelector();case L:case P: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())}},Ut={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:Ut,host:Ut,"host-context":Ut},pe=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===pe||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 Ce(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 Vt(){let t=0,e=0,n=this.tokenType;for(;n===H||n===ue;)n=this.lookupType(++t);if(n!==L)if(this.isDelim(pe,t)||this.isDelim(K,t)){e=this.isDelim(pe,t)?pe:K;do n=this.lookupType(++t);while(n===H||n===ue);n!==L&&(this.skip(t),Pe.call(this,Ee))}else return null;return t>0&&this.skip(t),e===0&&(n=this.charCodeAt(this.tokenStart),n!==pe&&n!==K&&this.error("Number sign is expected")),Pe.call(this,e!==0),e===K?"-"+this.consume(L):this.consume(L)}function Ki(){const t=this.tokenStart;let e=null,n=null;if(this.tokenType===L)Pe.call(this,Wi),n=this.consume(L);else if(this.tokenType===k&&this.cmpChar(this.tokenStart,K))switch(e="-1",Ce.call(this,1,ft),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Vt.call(this);break;case 3:Ce.call(this,2,K),this.next(),this.skipSC(),Pe.call(this,Ee),n="-"+this.consume(L);break;default:Ce.call(this,2,K),pt.call(this,3,Ee),this.next(),n=this.substrToCursor(t+2)}else if(this.tokenType===k||this.isDelim(pe)&&this.lookupType(1)===k){let r=0;switch(e="1",this.isDelim(pe)&&(r=1,this.next()),Ce.call(this,0,ft),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Vt.call(this);break;case 2:Ce.call(this,1,K),this.next(),this.skipSC(),Pe.call(this,Ee),n="-"+this.consume(L);break;default:Ce.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===pe||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),Ce.call(this,o-this.tokenStart,ft),e=this.substring(t,o),o+1===this.tokenEnd?(this.next(),n=Vt.call(this)):(Ce.call(this,o-this.tokenStart+1,K),o+2===this.tokenEnd?(this.next(),this.skipSC(),Pe.call(this,Ee),n="-"+this.consume(L)):(pt.call(this,o-this.tokenStart+2,Ee),this.next(),n=this.substrToCursor(o+1)))}else this.error();return e!==null&&e.charCodeAt(0)===pe&&(e=e.substr(1)),n!==null&&n.charCodeAt(0)===pe&&(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,Gt=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(Gt)||this.eat(k),this.isDelim(Gt)?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!==Gt&&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(M),{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(P)}}function ws(t){this.token(P,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 Ht=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===Ht){if(a===i){a!==e-1&&(o=t.substr(a+1));break}if(f=t.charCodeAt(++a),me(Ht,f)){const c=a-1,s=Ge(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===Ht?(i+="\\"+t.charAt(a),o=!1):(o&&(Ue(f)||Ve(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 Wt(){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(),Wt.call(this)):(Wt.call(this),this.isDelim(ir)&&(this.next(),Wt.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 Kt={},Qt={},or="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Qt.encode=function(t){if(0<=t&&t<or.length)return or[t];throw new TypeError("Must be between 0 and 63: "+t)},Qt.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=Qt,Jt=5,lr=1<<Jt,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}Kt.encode=function(e){var n="",r,i=Us(e);do r=i&cr,i>>>=Jt,i>0&&(r|=ur),n+=ar.encode(r);while(i>0);return n},Kt.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+=Jt}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=[],be=0,F=0;;)if(be=F,F=g.indexOf("/",be),F===-1){V.push(g.slice(be));break}else for(V.push(g.slice(be,F));F<g.length&&g[F]==="/";)F++;for(var we,xe=0,F=V.length-1;F>=0;F--)we=V[F],we==="."?V.splice(F,1):we===".."?xe++:xe>0&&(we===""?(V.splice(F+1,xe),xe=0):(V.splice(F,2),xe--));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 Se(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=Se;function ze(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=ze;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 Ct(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=Ct;function bt(u){return JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}t.parseSourceMapInput=bt;function wt(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=wt})(mt);var hr={},Yt=mt,Xt=Object.prototype.hasOwnProperty,_e=typeof Map<"u";function ge(){this._array=[],this._set=_e?new Map:Object.create(null)}ge.fromArray=function(e,n){for(var r=new ge,i=0,o=e.length;i<o;i++)r.add(e[i],n);return r},ge.prototype.size=function(){return _e?this._set.size:Object.getOwnPropertyNames(this._set).length},ge.prototype.add=function(e,n){var r=_e?e:Yt.toSetString(e),i=_e?this.has(e):Xt.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)},ge.prototype.has=function(e){if(_e)return this._set.has(e);var n=Yt.toSetString(e);return Xt.call(this._set,n)},ge.prototype.indexOf=function(e){if(_e){var n=this._set.get(e);if(n>=0)return n}else{var r=Yt.toSetString(e);if(Xt.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},ge.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},ge.prototype.toArray=function(){return this._array.slice()},hr.ArraySet=ge;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 He=Kt,D=mt,kt=hr.ArraySet,Hs=fr.MappingList;function ee(t){t||(t={}),this._file=D.getArg(t,"file",null),this._sourceRoot=D.getArg(t,"sourceRoot",null),this._skipValidation=D.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=D.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=D.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=D.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=D.getArg(e,"generated"),r=D.getArg(e,"original",null),i=D.getArg(e,"source",null),o=D.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=D.relative(this._sourceRoot,r)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[D.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[D.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=D.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=D.join(r,c.source)),o!=null&&(c.source=D.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=D.join(r,c)),o!=null&&(c=D.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(!D.compareByGeneratedPositionsInflated(s,y[C-1]))continue;c+=","}c+=He.encode(s.generatedColumn-e),e=s.generatedColumn,s.source!=null&&(m=this._sources.indexOf(s.source),c+=He.encode(m-a),a=m,c+=He.encode(s.originalLine-1-i),i=s.originalLine-1,c+=He.encode(s.originalColumn-r),r=s.originalColumn,s.name!=null&&(l=this._names.indexOf(s.name),c+=He.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=D.relative(n,r));var i=D.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,Zt=(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,L],[k,P],[k,I],[k,oe],[k,Z],[U,k],[U,N],[U,ie],[U,se],[U,"-"],[U,L],[U,P],[U,I],[U,oe],[M,k],[M,N],[M,ie],[M,se],[M,"-"],[M,L],[M,P],[M,I],[M,oe],[I,k],[I,N],[I,ie],[I,se],[I,"-"],[I,L],[I,P],[I,I],[I,oe],["#",k],["#",N],["#",ie],["#",se],["#","-"],["#",L],["#",P],["#",I],["#",oe],["-",k],["-",N],["-",ie],["-",se],["-","-"],["-",L],["-",P],["-",I],["-",oe],[L,k],[L,N],[L,ie],[L,se],[L,L],[L,P],[L,I],[L,"%"],[L,oe],["@",k],["@",N],["@",ie],["@",se],["@","-"],["@",oe],[".",L],[".",P],[".",I],["+",L],["+",P],["+",I],["/","*"]],Ys=mr.concat([[k,M],[I,M],[M,M],[U,Z],[U,$e],[U,X],[P,P],[P,I],[P,N],[P,"-"],[T,k],[T,N],[T,P],[T,I],[T,M],[T,"-"]]);function gr(t){const e=new Set(t.map(([n,r])=>Zt(n)<<16|Zt(r)));return function(n,r,i){const o=Zt(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(Ot,"{"),this.children(t,e=>{e.type==="Declaration"&&this.token(tt,";")}),this.token(It,"}")}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(ue,"/*"+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(M,"#"+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(L,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(L,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&&Ue(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"}))}),We=(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)=>We(t,e)===0,xr=(t,e)=>We(t,e)>0,Cr=(t,e)=>We(t,e)<0,br=(t,e="ASC")=>{const n=t.sort(We);return e==="DESC"?n.reverse():n},wr=(...t)=>br(t,"ASC"),vr=(...t)=>br(t,"DESC"),en=(...t)=>vr(...t)[0],Vo=(...t)=>wr(...t)[0];class tn 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 tn}get b(){return this.value.b}set b(e){throw new tn}get c(){return this.value.c}set c(e){throw new tn}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 Ke(e)}static calculateForAST(e){return yt(e)}static compare(e,n){return We(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 en(...e)}static sortAsc(...e){return wr(...e)}static sortDesc(...e){return vr(...e)}}const yt=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=en(...Ke(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=en(...Ke(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=Ke(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=Ke(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.")},Ke=t=>{if(!t)return[];const e=Ho(t);if(e.type==="Selector")return[yt(t)];if(e.type==="SelectorList"){const n=[];return e.children.forEach(r=>{const i=yt(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 ke(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",de="Identifier",Xo="Nth",Zo="Combinator",ea="Number",_r="Dimension",Me="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===de&&Q(n,r.name)}function Or(t){let e=!1;return ce(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 ce(t,function(n){let r=n.children,i=n.name,o=n.value;if(n.type===Ko&&r.size===1&&r.first.type===de){let a=r.first.name;if(rn("\\0",a)||ke("\\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 ye(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 ce(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 ce(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 ce(t,function(n){let r=n.type;if((r===Er||r===Ar||r===Qe)&&ye(n.name))return e=!0,this.break}),e}function ra(t){let e=[];return ce(t,function(n){n.type===Qe&&e.push(n.name)}),e.length===0?!1:e}function cn(t){let e=0;return ce(t,function(n){let r=n.type;if(!(r===sn||r===Xo)){if(e++,(r===Er||r===Ar||r===Qe)&&ye(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){ce(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"]),St=new ae(["auto","none","inherit","initial","unset","revert","revert-layer"]);function xt(t){let e=t.children,n=e.size;if(!e||n>1||n===0)return!1;let r=e.first;return r.type===de&&St.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===de&&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===de&&St.has(f.name)&&n({type:"keyword",value:f.name}),l&&l.type===Me&&l.value.charCodeAt(0)===Mr){i=e(f);return}if(s&&s.type===Me&&s.value.charCodeAt(0)===Mr){o=e(f);return}if(l&&l.type===Me&&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===de){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===Me?n=!1:i===_r&&n===!1?(n=!0,e({type:"duration",value:r})):i===de?pa.has(o)?e({type:"fn",value:r}):St.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===de&&ye(i)||r===an&&(ye(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)||ye(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:ke(t,e)}function ka(t){return ye(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===de&&ke("\\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 v=d.loc;return t.substring(v.start.offset,v.end.offset)}let f=0,c=0,s=0,l={total:0,unique:new Map},m=Date.now(),y=Be(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,Se=[],ze=new x(r),Je=new x(r),te=new x(r),Ct=new x(r),bt=new x(r),wt=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),be=0,F=0,we=new le,xe=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),vt=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,At=0,xn=0,Cn=new x(r),Xe=new x(r),bn=new x(r),wn=new x(r),Lt=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),Et=new x(r),_t=new x(r),Fe=new fn(r),Re=new x(r),Tn=new fn(r),ni=new x(r),et=new x(r),ri=new fn(r);ce(y,function(d){switch(d.type){case Wo:{B++;let v=d.name;if(v==="font-face"){let O={};r&&ze.p(d.loc.start.offset,d.loc),d.block.children.forEach(b=>{b.type===on&&(O[b.property]=o(b.value))}),Se.push(O),Y.push(1);break}let S=1;if(d.prelude!==null){let O=d.prelude,b=O&&o(d.prelude),A=O.loc;if(v==="media")Ct.p(b,A),Ir(O)&&(bt.p(b,A),S++);else if(v==="supports")u.p(b,A),Or(O)&&(h.p(b,A),S++);else if(ke("keyframes",v)){let w="@"+v+" "+b;ye(v)&&(p.p(w,A),S++),g.p(w,A)}else v==="import"?te.p(b,A):v==="charset"?wt.p(b,A):v==="container"?ne.p(b,A):v==="layer"?b.split(",").forEach(w=>Je.p(w.trim(),A)):v==="property"&&V.p(b,A)}else v==="layer"&&(Je.p("<anonymous>",d.loc),S++);Y.push(S);break}case Jo:{let v=d.prelude,S=d.block,O=v.children,b=S.children,A=O?O.size:0,w=b?b.size:0;we.push(A+w),Fr.p(A+w,d.loc),xe.push(A),Rr.p(A,v.loc),mn.push(w),qr.p(w,S.loc),be++,w===0&&F++;break}case sn:{let v=o(d);if(this.atrule&&ke("keyframes",this.atrule.name))return gn.p(v,d.loc),this.skip;ln(d)&&Sn.p(v,d.loc);let S=ra(d);if(S!==!1)for(let q of S)Kr.p(q,d.loc);let O=cn(d);Pr(d)&&kn.p(v,d.loc),Br.add(v),vt.push(O),Hr.p(O,d.loc);let b=yt(d).toArray(),[A,w,E]=b;return Gr.p(b.toString(),d.loc),jr.push(A),Ur.push(w),Vr.push(E),Te===void 0&&(Te=b),Oe===void 0&&(Oe=b),Oe!==void 0&&dn(Oe,b)<0&&(Oe=b),Te!==void 0&&dn(Te,b)>0&&(Te=b),Wr.push(b),A>0&&yn.p(v,d.loc),ia(d,function(re){Qr.p(re.name,re.loc)}),this.skip}case _r:{if(!this.declaration)break;let v=d.unit;return ke("\\9",v)?Tn.push(v.substring(0,v.length-2),this.declaration.property,d.loc):Tn.push(v,this.declaration.property,d.loc),this.skip}case na:{if(rn("data:",d.value)){let v=d.value,S=v.length,O=ya(v);l.total++,s+=S;let b={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 A=l.unique.get(O);A.count++,A.size+=S,l.unique.set(O,A),r&&A.uniqueWithLocations.push(b)}else{let A={count:1,size:S};r&&(A.uniqueWithLocations=[b]),l.unique.set(O,A)}}break}case Yo:{if(xt(d)){vn.push(1),et.p(o(d),d.loc);break}let v=this.declaration,{property:S,important:O}=v,b=1;hn(d)&&(Xr.p(o(d),d.loc),b++),typeof O=="string"&&(An.p(a(d)+"!"+O,d.loc),b++),Sa(d)&&(An.p(o(d),d.loc),b++);let A=d.children,w=d.loc;if(vn.push(b),J("z-index",S))return Zr.p(o(d),w),this.skip;if(J("font",S)){if(un(d))return;let{font_size:E,line_height:q,font_family:re}=fa(d,o,function(ve){ve.type==="keyword"&&et.p(ve.value,w)});re&&Ln.p(re,w),E&&En.p(E,w),q&&_n.p(q,w);break}else if(J("font-size",S)){un(d)||En.p(o(d),w);break}else if(J("font-family",S)){un(d)||Ln.p(o(d),w);break}else if(J("line-height",S))_n.p(o(d),w);else if(J("transition",S)||J("animation",S)){ma(A,function(E){E.type==="fn"?Et.p(o(E.value),w):E.type==="duration"?_t.p(o(E.value),w):E.type==="keyword"&&et.p(o(E.value),w)});break}else if(J("animation-duration",S)||J("transition-duration",S)){A&&A.size>1?A.forEach(E=>{E.type!==Me&&_t.p(o(E),w)}):_t.p(o(d),w);break}else if(J("transition-timing-function",S)||J("animation-timing-function",S)){A&&A.size>1?A.forEach(E=>{E.type!==Me&&Et.p(o(E),w)}):Et.p(o(d),w);break}else if(xa.has(ka(S))){xt(d)||ri.push(o(d),S,w);break}else J("text-shadow",S)?xt(d)||ei.p(o(d),w):J("box-shadow",S)&&(xt(d)||ti.p(o(d),w));ce(d,function(E){let q=E.name;switch(E.type){case ta:{let re=E.value.length;return ke("\\9",E.value)&&(re=re-2),Fe.push("#"+E.value,S,w),Re.p("hex"+re,w),this.skip}case de:{St.has(q)&&et.p(q,w);let re=q.length;if(re>20||re<3)return this.skip;if(la.has(q)){let ve=o(E);Fe.push(ve,S,w),Re.p(q.toLowerCase(),w);return}if(sa.has(q)){let ve=o(E);Fe.push(ve,S,w),Re.p("named",w);return}if(oa.has(q)){let ve=o(E);Fe.push(ve,S,w),Re.p("system",w);return}return this.skip}case an:{if(Q("var",q))return this.skip;if(aa.has(q)){Fe.push(o(E),S,E.loc),Re.p(q.toLowerCase(),E.loc);return}if(ke("gradient",q)){ni.p(o(E),E.loc);return}}}});break}case on:{if(this.atrulePrelude!==null)return this.skip;Ye++;let v=1;Jr.add(o(d)),d.important===!0&&(At++,v++,this.atrule&&ke("keyframes",this.atrule.name)&&(xn++,v++)),Yr.push(v);let{property:S,loc:{start:O}}=d,b={start:{line:O.line,column:O.column,offset:O.offset},end:{offset:O.offset+S.length}};Xe.p(S,b),ye(S)?(wn.p(S,b),Ze.push(2)):zr(S)?(bn.p(S,b),Ze.push(2)):pn(S)?(Lt.p(S,b),Ze.push(d.important?3:2),d.important===!0&&Cn.p(S,b)):Ze.push(1);break}}});let ii=Jr.size,qe=vt.size(),On=jr.aggregate(),In=Ur.aggregate(),$n=Vr.aggregate(),si=Br.size,z=Object.assign,oi=t.length,Nn=Se.length,ai=Y.aggregate(),li=vt.aggregate(),ci=Yr.aggregate(),ui=Ze.aggregate(),hi=vn.aggregate();return{stylesheet:{sourceLinesOfCode:B+qe+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:z({total:Nn,totalUnique:Nn,unique:Se,uniquenessRatio:Nn===0?0:1},r?{uniqueWithLocations:ze.c().uniqueWithLocations}:{}),import:te.c(),media:z(Ct.c(),{browserhacks:bt.c()}),charset:wt.c(),supports:z(u.c(),{browserhacks:h.c()}),keyframes:z(g.c(),{prefixed:z(p.c(),{ratio:j(p.size(),g.size())})}),container:ne.c(),layer:Je.c(),property:V.c(),total:B,complexity:ai},rules:{total:be,empty:{total:F,ratio:j(F,be)},sizes:z(we.aggregate(),{items:we.toArray()},Fr.c()),selectors:z(xe.aggregate(),{items:xe.toArray()},Rr.c()),declarations:z(mn.aggregate(),{items:mn.toArray()},qr.c())},selectors:{total:qe,totalUnique:si,uniquenessRatio:j(si,qe),specificity:z({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:z(li,Hr.c(),{items:vt.toArray()}),id:z(yn.c(),{ratio:j(yn.size(),qe)}),pseudoClasses:Kr.c(),accessibility:z(Sn.c(),{ratio:j(Sn.size(),qe)}),keyframes:gn.c(),prefixed:z(kn.c(),{ratio:j(kn.size(),qe)}),combinators:Qr.c()},declarations:{total:Ye,totalUnique:ii,uniquenessRatio:j(ii,Ye),importants:{total:At,ratio:j(At,Ye),inKeyframes:{total:xn,ratio:j(xn,At)}},complexity:ci},properties:z(Xe.c(),{prefixed:z(wn.c(),{ratio:j(wn.size(),Xe.size())}),custom:z(Lt.c(),{ratio:j(Lt.size(),Xe.size()),importants:z(Cn.c(),{ratio:j(Cn.size(),Lt.size())})}),browserhacks:z(bn.c(),{ratio:j(bn.size(),Xe.size())}),complexity:ui}),values:{colors:z(Fe.count(),{formats:Re.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:_t.c(),timingFunctions:Et.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]}R.analyze=ba,R.compareSpecificity=dn,R.hasVendorPrefix=ye,R.isAccessibilitySelector=ln,R.isMediaBrowserhack=Ir,R.isPropertyHack=zr,R.isSelectorPrefixed=Pr,R.isSupportsBrowserhack=Or,R.isValuePrefixed=hn,R.selectorComplexity=cn,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
1
+ (function(q,Fe){typeof exports=="object"&&typeof module<"u"?Fe(exports,require("css-tree/parser"),require("css-tree/walker")):typeof define=="function"&&define.amd?define(["exports","css-tree/parser","css-tree/walker"],Fe):(q=typeof globalThis<"u"?globalThis:q||self,Fe(q.analyzeCss={},q.parse$i,q.walk))})(this,function(q,Fe,ce){"use strict";let Te=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 Te!==null?(r=Te,Te=Te.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=Te,Te=e}updateCursors(e,n,r,s){let{cursor:o}=this;for(;o!==null;)o.prev===e&&(o.prev=n),o.next===r&&(o.next=s),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 s=G.createItem(r);n!==null?n.next=s:this.head=s,s.prev=n,n=s}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 s=r.next;r.next=s.next,e.call(n,s.data,s,this)}this.releaseCursor()}forEachRight(e,n=this){const r=this.allocateCursor(this.tail,null);for(;r.prev!==null;){const s=r.prev;r.prev=s.prev,e.call(n,s.data,s,this)}this.releaseCursor()}reduce(e,n,r=this){let s=this.allocateCursor(null,this.head),o=n,a;for(;s.next!==null;)a=s.next,s.next=a.next,o=e.call(r,o,a.data,a,this);return this.releaseCursor(),o}reduceRight(e,n,r=this){let s=this.allocateCursor(this.tail,null),o=n,a;for(;s.prev!==null;)a=s.prev,s.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 s=this.head;s!==null;s=s.next)r.appendData(e.call(n,s.data,s,this));return r}filter(e,n=this){const r=new G;for(let s=this.head;s!==null;s=s.next)e.call(n,s.data,s,this)&&r.appendData(s.data);return r}nextUntil(e,n,r=this){if(e===null)return;const s=this.allocateCursor(null,e);for(;s.next!==null;){const o=s.next;if(s.next=o.next,n.call(r,o.data,o,this))break}this.releaseCursor()}prevUntil(e,n,r=this){if(e===null)return;const s=this.allocateCursor(e,null);for(;s.prev!==null;){const o=s.prev;if(s.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 ii(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 vt=100,_n=60,Tn=" ";function On({source:t,line:e,column:n,baseLine:r,baseColumn:s},o){function a(S,T){return i.slice(S,T).map((P,Y)=>String(S+Y+1).padStart(y)+" |"+P).join(`
3
+ `)}const c=`
4
+ `.repeat(Math.max(r-1,0)),u=" ".repeat(Math.max(s-1,0)),i=(c+u+t).split(/\r\n?|\n|\f/),l=Math.max(1,e-o)-1,d=Math.min(e+o,i.length+1),y=Math.max(4,String(d).length)+1;let g=0;n+=(Tn.length-1)*(i[e-1].substr(0,n-1).match(/\t/g)||[]).length,n>vt&&(g=n-_n+3,n=_n-2);for(let S=l;S<=d;S++)S>=0&&S<i.length&&(i[S]=i[S].replace(/\t/g,Tn),i[S]=(g>0&&i[S].length>g?"…":"")+i[S].substr(g,vt-2)+(i[S].length>g+vt-1?"…":""));return[a(l,e),new Array(n+y+2).join("-")+"^",a(e,d)].filter(Boolean).join(`
5
+ `).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function In(t,e,n,r,s,o=1,a=1){return Object.assign(ii("SyntaxError",t),{source:e,offset:n,line:r,column:s,sourceFragment(u){return On({source:e,line:r,column:s,baseLine:o,baseColumn:a},isNaN(u)?0:u)},get formattedMessage(){return`Parse error: ${t}
6
+ `+On({source:e,line:r,column:s,baseLine:o,baseColumn:a},2)}})}const Re=0,x=1,D=2,U=3,z=4,Oe=5,si=6,ie=7,se=8,$=9,E=10,M=11,N=12,H=13,Nn=14,oe=15,X=16,Je=17,Ie=18,Ye=19,Xe=20,Z=21,O=22,wt=23,At=24,ue=25,oi=0;function W(t){return t>=48&&t<=57}function qe(t){return W(t)||t>=65&&t<=70||t>=97&&t<=102}function Lt(t){return t>=65&&t<=90}function ai(t){return t>=97&&t<=122}function li(t){return Lt(t)||ai(t)}function ci(t){return t>=128}function Ze(t){return li(t)||ci(t)||t===95}function $n(t){return Ze(t)||W(t)||t===45}function ui(t){return t>=0&&t<=8||t===11||t>=14&&t<=31||t===127}function et(t){return t===10||t===13||t===12}function Be(t){return et(t)||t===32||t===9}function me(t,e){return!(t!==92||et(e)||e===oi)}function Et(t,e,n){return t===45?Ze(e)||e===45||me(e,n):Ze(t)?!0:t===92?me(t,e):!1}function _t(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 Dn(t){return t===65279||t===65534?1:0}const Tt=new Array(128),hi=128,tt=130,Pn=131,Ot=132,Mn=133;for(let t=0;t<Tt.length;t++)Tt[t]=Be(t)&&tt||W(t)&&Pn||Ze(t)&&Ot||ui(t)&&Mn||t||hi;function It(t){return t<128?Tt[t]:Ot}function Ne(t,e){return e<t.length?t.charCodeAt(e):0}function Nt(t,e,n){return n===13&&Ne(t,e+1)===10?2:1}function zn(t,e,n){let r=t.charCodeAt(e);return Lt(r)&&(r=r|32),r===n}function nt(t,e,n,r){if(n-e!==r.length||e<0||n>t.length)return!1;for(let s=e;s<n;s++){const o=r.charCodeAt(s-e);let a=t.charCodeAt(s);if(Lt(a)&&(a=a|32),a!==o)return!1}return!0}function fi(t,e){for(;e>=0&&Be(t.charCodeAt(e));e--);return e+1}function rt(t,e){for(;e<t.length&&Be(t.charCodeAt(e));e++);return e}function $t(t,e){for(;e<t.length&&W(t.charCodeAt(e));e++);return e}function je(t,e){if(e+=2,qe(Ne(t,e-1))){for(const r=Math.min(t.length,e+5);e<r&&qe(Ne(t,e));e++);const n=Ne(t,e);Be(n)&&(e+=Nt(t,e,n))}return e}function it(t,e){for(;e<t.length;e++){const n=t.charCodeAt(e);if(!$n(n)){if(me(n,Ne(t,e+1))){e=je(t,e)-1;continue}break}}return e}function Fn(t,e){let n=t.charCodeAt(e);if((n===43||n===45)&&(n=t.charCodeAt(e+=1)),W(n)&&(e=$t(t,e+1),n=t.charCodeAt(e)),n===46&&W(t.charCodeAt(e+1))&&(e+=2,e=$t(t,e)),zn(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=$t(t,e+1+r+1))}return e}function Dt(t,e){for(;e<t.length;e++){const n=t.charCodeAt(e);if(n===41){e++;break}me(n,Ne(t,e+1))&&(e=je(t,e))}return e}function pi(t){if(t.length===1&&!qe(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 Rn=["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"],di=16*1024;function st(t=null,e){return t===null||t.length<e?new Uint32Array(Math.max(e+1024,di)):t}const qn=10,mi=12,Bn=13;function jn(t){const e=t.source,n=e.length,r=e.length>0?Dn(e.charCodeAt(0)):0,s=st(t.lines,n),o=st(t.columns,n);let a=t.startLine,c=t.startColumn;for(let u=r;u<n;u++){const i=e.charCodeAt(u);s[u]=a,o[u]=c++,(i===qn||i===Bn||i===mi)&&(i===Bn&&u+1<n&&e.charCodeAt(u+1)===qn&&(u++,s[u]=a,o[u]=c),a++,c=1)}s[n]=a,o[n]=c,t.lines=s,t.columns=o,t.computed=!0}class gi{constructor(e,n,r,s){this.setSource(e,n,r,s),this.lines=null,this.columns=null}setSource(e="",n=0,r=1,s=1){this.source=e,this.startOffset=n,this.startLine=r,this.startColumn=s,this.computed=!1}getLocation(e,n){return this.computed||jn(this),{source:n,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,n,r){return this.computed||jn(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 he=16777215,fe=24,ve=new Uint8Array(32);ve[D]=O,ve[Z]=O,ve[Ye]=Xe,ve[wt]=At;function Un(t){return ve[t]!==0}class ki{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,s=st(this.offsetAndType,e.length+1),o=st(this.balance,e.length+1);let a=0,c=-1,u=0,i=e.length;this.offsetAndType=null,this.balance=null,o.fill(0),n(e,(l,d,y)=>{const g=a++;if(s[g]=l<<fe|y,c===-1&&(c=d),o[g]=i,l===u){const S=o[i];o[i]=g,i=S,u=ve[s[S]>>fe]}else Un(l)&&(i=g,u=ve[l])}),s[a]=Re<<fe|r,o[a]=a;for(let l=0;l<a;l++){const d=o[l];if(d<=l){const y=o[d];y!==l&&(o[l]=y)}else d>a&&(o[l]=a)}this.source=e,this.firstCharOffset=c===-1?0:c,this.tokenCount=a,this.offsetAndType=s,this.balance=o,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>fe:Re}lookupTypeNonSC(e){for(let n=this.tokenIndex;n<this.tokenCount;n++){const r=this.offsetAndType[n]>>fe;if(r!==H&&r!==ue&&e--===0)return r}return Re}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&he:this.source.length}lookupOffsetNonSC(e){for(let n=this.tokenIndex;n<this.tokenCount;n++){const r=this.offsetAndType[n]>>fe;if(r!==H&&r!==ue&&e--===0)return n-this.tokenIndex}return Re}lookupValue(e,n){return e+=this.tokenIndex,e<this.tokenCount?nt(this.source,this.offsetAndType[e-1]&he,this.offsetAndType[e]&he,n):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&he:this.offsetAndType[this.tokenCount]&he: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]&he,n=this.offsetAndType[n],this.tokenType=n>>fe,this.tokenEnd=n&he):(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>>fe,this.tokenEnd=e&he):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=Re,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===H||this.tokenType===ue;)this.next()}skipUntilBalanced(e,n){let r=e,s=0,o=0;e:for(;r<this.tokenCount;r++){if(s=this.balance[r],s<e)break e;switch(o=r>0?this.offsetAndType[r-1]&he:this.firstCharOffset,n(this.source.charCodeAt(o))){case 1:break e;case 2:r++;break e;default:Un(this.offsetAndType[r]>>fe)&&(r=s)}}this.skip(r-this.tokenIndex)}forEachToken(e){for(let n=0,r=this.firstCharOffset;n<this.tokenCount;n++){const s=r,o=this.offsetAndType[n],a=o&he,c=o>>fe;r=a,e(c,s,a,n)}}dump(){const e=new Array(this.tokenCount);return this.forEachToken((n,r,s,o)=>{e[o]={idx:o,type:Rn[n],chunk:this.source.substring(r,s),balance:this.balance[o]}}),e}}function Vn(t,e){function n(d){return d<c?t.charCodeAt(d):0}function r(){if(i=Fn(t,i),Et(n(i),n(i+1),n(i+2))){l=N,i=it(t,i);return}if(n(i)===37){l=M,i++;return}l=E}function s(){const d=i;if(i=it(t,i),nt(t,d,i,"url")&&n(i)===40){if(i=rt(t,i+1),n(i)===34||n(i)===39){l=D,i=d+4;return}a();return}if(n(i)===40){l=D,i++;return}l=x}function o(d){for(d||(d=n(i++)),l=Oe;i<t.length;i++){const y=t.charCodeAt(i);switch(It(y)){case d:i++;return;case tt:if(et(y)){i+=Nt(t,i,y),l=si;return}break;case 92:if(i===t.length-1)break;const g=n(i+1);et(g)?i+=Nt(t,i+1,g):me(y,g)&&(i=je(t,i)-1);break}}}function a(){for(l=ie,i=rt(t,i);i<t.length;i++){const d=t.charCodeAt(i);switch(It(d)){case 41:i++;return;case tt:if(i=rt(t,i),n(i)===41||i>=t.length){i<t.length&&i++;return}i=Dt(t,i),l=se;return;case 34:case 39:case 40:case Mn:i=Dt(t,i),l=se;return;case 92:if(me(d,n(i+1))){i=je(t,i)-1;break}i=Dt(t,i),l=se;return}}}t=String(t||"");const c=t.length;let u=Dn(n(0)),i=u,l;for(;i<c;){const d=t.charCodeAt(i);switch(It(d)){case tt:l=H,i=rt(t,i+1);break;case 34:o();break;case 35:$n(n(i+1))||me(n(i+1),n(i+2))?(l=z,i=it(t,i+1)):(l=$,i++);break;case 39:o();break;case 40:l=Z,i++;break;case 41:l=O,i++;break;case 43:_t(d,n(i+1),n(i+2))?r():(l=$,i++);break;case 44:l=Ie,i++;break;case 45:_t(d,n(i+1),n(i+2))?r():n(i+1)===45&&n(i+2)===62?(l=oe,i=i+3):Et(d,n(i+1),n(i+2))?s():(l=$,i++);break;case 46:_t(d,n(i+1),n(i+2))?r():(l=$,i++);break;case 47:n(i+1)===42?(l=ue,i=t.indexOf("*/",i+2),i=i===-1?t.length:i+2):(l=$,i++);break;case 58:l=X,i++;break;case 59:l=Je,i++;break;case 60:n(i+1)===33&&n(i+2)===45&&n(i+3)===45?(l=Nn,i=i+4):(l=$,i++);break;case 64:Et(n(i+1),n(i+2),n(i+3))?(l=U,i=it(t,i+1)):(l=$,i++);break;case 91:l=Ye,i++;break;case 92:me(d,n(i+1))?s():(l=$,i++);break;case 93:l=Xe,i++;break;case 123:l=wt,i++;break;case 125:l=At,i++;break;case Pn:r();break;case Ot:s();break;default:l=$,i++}e(l,u,u=i)}}function yi(t){const e=this.createList();let n=!1;const r={recognizer:t};for(;!this.eof;){switch(this.tokenType){case ue:this.next();continue;case H:n=!0,this.next();continue}let s=t.getNode.call(this,r);if(s===void 0)break;n&&(t.onWhiteSpace&&t.onWhiteSpace.call(this,s,e,r),n=!1),e.push(s)}return n&&t.onWhiteSpace&&t.onWhiteSpace.call(this,null,e,r),e}const Gn=()=>{},Si=33,xi=35,Pt=59,Hn=123,Wn=0;function Ci(t){return function(){return this[t]()}}function Mt(t){const e=Object.create(null);for(const n of Object.keys(t)){const r=t[n],s=r.parse||r;s&&(e[n]=s)}return e}function bi(t){const e={context:Object.create(null),features:Object.assign(Object.create(null),t.features),scope:Object.assign(Object.create(null),t.scope),atrule:Mt(t.atrule),pseudo:Mt(t.pseudo),node:Mt(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]=Ci(r);break}return{config:e,...e,...e.node}}function vi(t){let e="",n="<unknown>",r=!1,s=Gn,o=!1;const a=new gi,c=Object.assign(new ki,bi(t||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:yi,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(i){return i===Hn?1:0},consumeUntilLeftCurlyBracketOrSemicolon(i){return i===Hn||i===Pt?1:0},consumeUntilExclamationMarkOrSemicolon(i){return i===Si||i===Pt?1:0},consumeUntilSemicolonIncluded(i){return i===Pt?2:0},createList(){return new G},createSingleNodeList(i){return new G().appendData(i)},getFirstListNode(i){return i&&i.first},getLastListNode(i){return i&&i.last},parseWithFallback(i,l){const d=this.tokenIndex;try{return i.call(this)}catch(y){if(o)throw y;this.skip(d-this.tokenIndex);const g=l.call(this);return o=!0,s(y,g),o=!1,g}},lookupNonWSType(i){let l;do if(l=this.lookupType(i++),l!==H&&l!==ue)return l;while(l!==Wn);return Wn},charCodeAt(i){return i>=0&&i<e.length?e.charCodeAt(i):0},substring(i,l){return e.substring(i,l)},substrToCursor(i){return this.source.substring(i,this.tokenStart)},cmpChar(i,l){return zn(e,i,l)},cmpStr(i,l,d){return nt(e,i,l,d)},consume(i){const l=this.tokenStart;return this.eat(i),this.substrToCursor(l)},consumeFunctionName(){const i=e.substring(this.tokenStart,this.tokenEnd-1);return this.eat(D),i},consumeNumber(i){const l=e.substring(this.tokenStart,Fn(e,this.tokenStart));return this.eat(i),l},eat(i){if(this.tokenType!==i){const l=Rn[i].slice(0,-6).replace(/-/g," ").replace(/^./,g=>g.toUpperCase());let d=`${/[[\](){}]/.test(l)?`"${l}"`:l} is expected`,y=this.tokenStart;switch(i){case x:this.tokenType===D||this.tokenType===ie?(y=this.tokenEnd-1,d="Identifier is expected but function found"):d="Identifier is expected";break;case z:this.isDelim(xi)&&(this.next(),y++,d="Name is expected");break;case M:this.tokenType===E&&(y=this.tokenEnd,d="Percent sign is expected");break}this.error(d,y)}this.next()},eatIdent(i){(this.tokenType!==x||this.lookupValue(0,i)===!1)&&this.error(`Identifier "${i}" is expected`),this.next()},eatDelim(i){this.isDelim(i)||this.error(`Delim "${String.fromCharCode(i)}" is expected`),this.next()},getLocation(i,l){return r?a.getLocationRange(i,l,n):null},getLocationFromList(i){if(r){const l=this.getFirstListNode(i),d=this.getLastListNode(i);return a.getLocationRange(l!==null?l.loc.start.offset-a.startOffset:this.tokenStart,d!==null?d.loc.end.offset-a.startOffset:this.tokenStart,n)}return null},error(i,l){const d=typeof l<"u"&&l<e.length?a.getLocation(l):this.eof?a.getLocation(fi(e,e.length-1)):a.getLocation(this.tokenStart);throw new In(i||"Unexpected input",e,d.offset,d.line,d.column,a.startLine,a.startColumn)}});return Object.assign(function(i,l){e=i,l=l||{},c.setSource(e,Vn),a.setSource(e,l.offset,l.line,l.column),n=l.filename||"<unknown>",r=!!l.positions,s=typeof l.onParseError=="function"?l.onParseError:Gn,o=!1,c.parseAtrulePrelude="parseAtrulePrelude"in l?!!l.parseAtrulePrelude:!0,c.parseRulePrelude="parseRulePrelude"in l?!!l.parseRulePrelude:!0,c.parseValue="parseValue"in l?!!l.parseValue:!0,c.parseCustomProperty="parseCustomProperty"in l?!!l.parseCustomProperty:!1;const{context:d="default",onComment:y}=l;if(!(d in c.context))throw new Error("Unknown context `"+d+"`");typeof y=="function"&&c.forEachToken((S,T,P)=>{if(S===ue){const Y=c.getLocation(T,P),ee=nt(e,P-2,P,"*/")?e.slice(T+2,P-2):e.slice(T+2,P);y(ee,Y)}});const g=c.context[d].call(c,l);return c.eof||c.error(),g},{SyntaxError:In,config:c.config})}const wi=35,Ai=38,Li=42,Ei=43,_i=47,Kn=46,Ti=62,Oi=124,Ii=126;function Ni(t,e){e.last!==null&&e.last.type!=="Combinator"&&t!==null&&t.type!=="Combinator"&&e.push({type:"Combinator",loc:null,name:" "})}function $i(){switch(this.tokenType){case Ye:return this.AttributeSelector();case z:return this.IdSelector();case X:return this.lookupType(1)===X?this.PseudoElementSelector():this.PseudoClassSelector();case x:return this.TypeSelector();case E:case M:return this.Percentage();case N:this.charCodeAt(this.tokenStart)===Kn&&this.error("Identifier is expected",this.tokenStart+1);break;case $:{switch(this.charCodeAt(this.tokenStart)){case Ei:case Ti:case Ii:case _i:return this.Combinator();case Kn:return this.ClassSelector();case Li:case Oi:return this.TypeSelector();case wi:return this.IdSelector();case Ai:return this.NestingSelector()}break}}}const Di={onWhiteSpace:Ni,getNode:$i};function Pi(){const t=this.createList();this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case x:t.push(this.Identifier());break;case Oe:t.push(this.String());break;case Ie:t.push(this.Operator());break;case O:break e;default:this.error("Identifier, string or comma is expected")}this.skipSC()}return t}const we={parse(){return this.createSingleNodeList(this.SelectorList())}},zt={parse(){return this.createSingleNodeList(this.Selector())}},Mi={parse(){return this.createSingleNodeList(this.Identifier())}},zi={parse:Pi},ot={parse(){return this.createSingleNodeList(this.Nth())}},Fi={dir:Mi,has:we,lang:zi,matches:we,is:we,"-moz-any":we,"-webkit-any":we,where:we,not:we,"nth-child":ot,"nth-last-child":ot,"nth-last-of-type":ot,"nth-of-type":ot,slotted:zt,host:zt,"host-context":zt},pe=43,K=45,at=110,Ae=!0,Ri=!1;function lt(t,e){let n=this.tokenStart+t;const r=this.charCodeAt(n);for((r===pe||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 $e(t){return lt.call(this,0,t)}function Se(t,e){if(!this.cmpChar(this.tokenStart+t,e)){let n="";switch(e){case at:n="N is expected";break;case K:n="HyphenMinus is expected";break}this.error(n,this.tokenStart+t)}}function Ft(){let t=0,e=0,n=this.tokenType;for(;n===H||n===ue;)n=this.lookupType(++t);if(n!==E)if(this.isDelim(pe,t)||this.isDelim(K,t)){e=this.isDelim(pe,t)?pe:K;do n=this.lookupType(++t);while(n===H||n===ue);n!==E&&(this.skip(t),$e.call(this,Ae))}else return null;return t>0&&this.skip(t),e===0&&(n=this.charCodeAt(this.tokenStart),n!==pe&&n!==K&&this.error("Number sign is expected")),$e.call(this,e!==0),e===K?"-"+this.consume(E):this.consume(E)}function qi(){const t=this.tokenStart;let e=null,n=null;if(this.tokenType===E)$e.call(this,Ri),n=this.consume(E);else if(this.tokenType===x&&this.cmpChar(this.tokenStart,K))switch(e="-1",Se.call(this,1,at),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Ft.call(this);break;case 3:Se.call(this,2,K),this.next(),this.skipSC(),$e.call(this,Ae),n="-"+this.consume(E);break;default:Se.call(this,2,K),lt.call(this,3,Ae),this.next(),n=this.substrToCursor(t+2)}else if(this.tokenType===x||this.isDelim(pe)&&this.lookupType(1)===x){let r=0;switch(e="1",this.isDelim(pe)&&(r=1,this.next()),Se.call(this,0,at),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Ft.call(this);break;case 2:Se.call(this,1,K),this.next(),this.skipSC(),$e.call(this,Ae),n="-"+this.consume(E);break;default:Se.call(this,1,K),lt.call(this,2,Ae),this.next(),n=this.substrToCursor(t+r+1)}}else if(this.tokenType===N){const r=this.charCodeAt(this.tokenStart),s=r===pe||r===K;let o=this.tokenStart+s;for(;o<this.tokenEnd&&W(this.charCodeAt(o));o++);o===this.tokenStart+s&&this.error("Integer is expected",this.tokenStart+s),Se.call(this,o-this.tokenStart,at),e=this.substring(t,o),o+1===this.tokenEnd?(this.next(),n=Ft.call(this)):(Se.call(this,o-this.tokenStart+1,K),o+2===this.tokenEnd?(this.next(),this.skipSC(),$e.call(this,Ae),n="-"+this.consume(E)):(lt.call(this,o-this.tokenStart+2,Ae),this.next(),n=this.substrToCursor(o+1)))}else this.error();return e!==null&&e.charCodeAt(0)===pe&&(e=e.substr(1)),n!==null&&n.charCodeAt(0)===pe&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(t,this.tokenStart),a:e,b:n}}function Bi(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,Qn=42,ct=61,Ui=94,Rt=124,Vi=126;function Gi(){this.eof&&this.error("Unexpected end of input");const t=this.tokenStart;let e=!1;return this.isDelim(Qn)?(e=!0,this.next()):this.isDelim(Rt)||this.eat(x),this.isDelim(Rt)?this.charCodeAt(this.tokenStart+1)!==ct?(this.next(),this.eat(x)):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 Hi(){const t=this.tokenStart,e=this.charCodeAt(t);return e!==ct&&e!==Vi&&e!==Ui&&e!==ji&&e!==Qn&&e!==Rt&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),e!==ct&&(this.isDelim(ct)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(t)}function Wi(){const t=this.tokenStart;let e,n=null,r=null,s=null;return this.eat(Ye),this.skipSC(),e=Gi.call(this),this.skipSC(),this.tokenType!==Xe&&(this.tokenType!==x&&(n=Hi.call(this),this.skipSC(),r=this.tokenType===Oe?this.String():this.Identifier(),this.skipSC()),this.tokenType===x&&(s=this.consume(x),this.skipSC())),this.eat(Xe),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:n,value:r,flags:s}}function Ki(t){this.token($,"["),this.node(t.name),t.matcher!==null&&(this.tokenize(t.matcher),this.node(t.value)),t.flags!==null&&this.token(x,t.flags),this.token($,"]")}const Qi=46;function Ji(){return this.eatDelim(Qi),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(x)}}function Yi(t){this.token($,"."),this.token(x,t.name)}const Xi=43,Jn=47,Zi=62,es=126;function ts(){const t=this.tokenStart;let e;switch(this.tokenType){case H:e=" ";break;case $:switch(this.charCodeAt(this.tokenStart)){case Zi:case Xi:case es:this.next();break;case Jn:this.next(),this.eatIdent("deep"),this.eatDelim(Jn);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t);break}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function ns(t){this.tokenize(t.name)}function rs(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(x)}}function is(t){this.token(x,t.name)}function ss(){const t=this.tokenStart;return this.eat(z),{type:"IdSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t+1)}}function os(t){this.token($,"#"+t.name)}const as=38;function ls(){const t=this.tokenStart;return this.eatDelim(as),{type:"NestingSelector",loc:this.getLocation(t,this.tokenStart)}}function cs(){this.token($,"&")}function us(){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 hs(t){this.node(t.nth),t.selector!==null&&(this.token(x,"of"),this.node(t.selector))}function fs(){const t=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t)}}function ps(t){this.tokenize(t.value)}function ds(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(M)}}function ms(t){this.token(M,t.value+"%")}function gs(){const t=this.tokenStart;let e=null,n,r;return this.eat(X),this.tokenType===D?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==O?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(O)):n=this.consume(x),{type:"PseudoClassSelector",loc:this.getLocation(t,this.tokenStart),name:n,children:e}}function ks(t){this.token(X,":"),t.children===null?this.token(x,t.name):(this.token(D,t.name+"("),this.children(t),this.token(O,")"))}function ys(){const t=this.tokenStart;let e=null,n,r;return this.eat(X),this.eat(X),this.tokenType===D?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==O?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(O)):n=this.consume(x),{type:"PseudoElementSelector",loc:this.getLocation(t,this.tokenStart),name:n,children:e}}function Ss(t){this.token(X,":"),this.token(X,":"),t.children===null?this.token(x,t.name):(this.token(D,t.name+"("),this.children(t),this.token(O,")"))}function xs(){return this.tokenIndex>0&&this.lookupType(-1)===H?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}function Cs(t,e){const n=this.getTokenStart(this.tokenIndex);let r;return this.skipUntilBalanced(this.tokenIndex,t||this.consumeUntilBalanceEnd),e&&this.tokenStart>n?r=xs.call(this):r=this.tokenStart,{type:"Raw",loc:this.getLocation(n,r),value:this.substring(n,r)}}function bs(t){this.tokenize(t.value)}function vs(){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 ws(t){this.children(t)}function As(){const t=this.createList();for(;!this.eof;){if(t.push(this.Selector()),this.tokenType===Ie){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(t),children:t}}function Ls(t){this.children(t,()=>this.token(Ie,","))}const qt=92,Yn=34,Es=39;function _s(t){const e=t.length,n=t.charCodeAt(0),r=n===Yn||n===Es?1:0,s=r===1&&e>1&&t.charCodeAt(e-1)===n?e-2:e-1;let o="";for(let a=r;a<=s;a++){let c=t.charCodeAt(a);if(c===qt){if(a===s){a!==e-1&&(o=t.substr(a+1));break}if(c=t.charCodeAt(++a),me(qt,c)){const u=a-1,i=je(t,u);a=i-1,o+=pi(t.substring(u+1,i))}else c===13&&t.charCodeAt(a+1)===10&&a++}else o+=t[a]}return o}function Ts(t,e){const n='"',r=Yn;let s="",o=!1;for(let a=0;a<t.length;a++){const c=t.charCodeAt(a);if(c===0){s+="�";continue}if(c<=31||c===127){s+="\\"+c.toString(16),o=!0;continue}c===r||c===qt?(s+="\\"+t.charAt(a),o=!1):(o&&(qe(c)||Be(c))&&(s+=" "),s+=t.charAt(a),o=!1)}return n+s+n}function Os(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:_s(this.consume(Oe))}}function Is(t){this.token(Oe,Ts(t.value))}const Ns=42,Xn=124;function Bt(){this.tokenType!==x&&this.isDelim(Ns)===!1&&this.error("Identifier or asterisk is expected"),this.next()}function $s(){const t=this.tokenStart;return this.isDelim(Xn)?(this.next(),Bt.call(this)):(Bt.call(this),this.isDelim(Xn)&&(this.next(),Bt.call(this))),{type:"TypeSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}function Ds(t){this.tokenize(t.name)}const Zn=vi({parseContext:{default:"SelectorList",selectorList:"SelectorList",selector:"Selector"},scope:{Selector:Di},atrule:{},pseudo:Fi,node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:qi,AttributeSelector:Wi,ClassSelector:Ji,Combinator:ts,IdSelector:ss,Identifier:rs,NestingSelector:ls,Nth:us,Operator:fs,Percentage:ds,PseudoClassSelector:gs,PseudoElementSelector:ys,Raw:Cs,Selector:vs,SelectorList:As,String:Os,TypeSelector:$s},Symbol.toStringTag,{value:"Module"}))});var jt={},ut={},ht={},er;function Ps(){if(er)return ht;er=1;var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return ht.encode=function(e){if(0<=e&&e<t.length)return t[e];throw new TypeError("Must be between 0 and 63: "+e)},ht.decode=function(e){var n=65,r=90,s=97,o=122,a=48,c=57,u=43,i=47,l=26,d=52;return n<=e&&e<=r?e-n:s<=e&&e<=o?e-s+l:a<=e&&e<=c?e-a+d:e==u?62:e==i?63:-1},ht}var tr;function Ms(){if(tr)return ut;tr=1;var t=Ps(),e=5,n=1<<e,r=n-1,s=n;function o(c){return c<0?(-c<<1)+1:(c<<1)+0}function a(c){var u=(c&1)===1,i=c>>1;return u?-i:i}return ut.encode=function(u){var i="",l,d=o(u);do l=d&r,d>>>=e,d>0&&(l|=s),i+=t.encode(l);while(d>0);return i},ut.decode=function(u,i,l){var d=u.length,y=0,g=0,S,T;do{if(i>=d)throw new Error("Expected more digits in base 64 VLQ value.");if(T=t.decode(u.charCodeAt(i++)),T===-1)throw new Error("Invalid base64 digit: "+u.charAt(i-1));S=!!(T&s),T&=r,y=y+(T<<g),g+=e}while(S);l.value=a(y),l.rest=i},ut}var Ut={},nr;function Vt(){return nr||(nr=1,function(t){function e(h,f,k){if(f in h)return h[f];if(arguments.length===3)return k;throw new Error('"'+f+'" is a required argument.')}t.getArg=e;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function s(h){var f=h.match(n);return f?{scheme:f[1],auth:f[2],host:f[3],port:f[4],path:f[5]}:null}t.urlParse=s;function o(h){var f="";return h.scheme&&(f+=h.scheme+":"),f+="//",h.auth&&(f+=h.auth+"@"),h.host&&(f+=h.host),h.port&&(f+=":"+h.port),h.path&&(f+=h.path),f}t.urlGenerate=o;var a=32;function c(h){var f=[];return function(k){for(var p=0;p<f.length;p++)if(f[p].input===k){var ne=f[0];return f[0]=f[p],f[p]=ne,f[0].result}var V=h(k);return f.unshift({input:k,result:V}),f.length>a&&f.pop(),V}}var u=c(function(f){var k=f,p=s(f);if(p){if(!p.path)return f;k=p.path}for(var ne=t.isAbsolute(k),V=[],xe=0,R=0;;)if(xe=R,R=k.indexOf("/",xe),R===-1){V.push(k.slice(xe));break}else for(V.push(k.slice(xe,R));R<k.length&&k[R]==="/";)R++;for(var Ce,ye=0,R=V.length-1;R>=0;R--)Ce=V[R],Ce==="."?V.splice(R,1):Ce===".."?ye++:ye>0&&(Ce===""?(V.splice(R+1,ye),ye=0):(V.splice(R,2),ye--));return k=V.join("/"),k===""&&(k=ne?"/":"."),p?(p.path=k,o(p)):k});t.normalize=u;function i(h,f){h===""&&(h="."),f===""&&(f=".");var k=s(f),p=s(h);if(p&&(h=p.path||"/"),k&&!k.scheme)return p&&(k.scheme=p.scheme),o(k);if(k||f.match(r))return f;if(p&&!p.host&&!p.path)return p.host=f,o(p);var ne=f.charAt(0)==="/"?f:u(h.replace(/\/+$/,"")+"/"+f);return p?(p.path=ne,o(p)):ne}t.join=i,t.isAbsolute=function(h){return h.charAt(0)==="/"||n.test(h)};function l(h,f){h===""&&(h="."),h=h.replace(/\/$/,"");for(var k=0;f.indexOf(h+"/")!==0;){var p=h.lastIndexOf("/");if(p<0||(h=h.slice(0,p),h.match(/^([^\/]+:\/)?\/*$/)))return f;++k}return Array(k+1).join("../")+f.substr(h.length+1)}t.relative=l;var d=function(){var h=Object.create(null);return!("__proto__"in h)}();function y(h){return h}function g(h){return T(h)?"$"+h:h}t.toSetString=d?y:g;function S(h){return T(h)?h.slice(1):h}t.fromSetString=d?y:S;function T(h){if(!h)return!1;var f=h.length;if(f<9||h.charCodeAt(f-1)!==95||h.charCodeAt(f-2)!==95||h.charCodeAt(f-3)!==111||h.charCodeAt(f-4)!==116||h.charCodeAt(f-5)!==111||h.charCodeAt(f-6)!==114||h.charCodeAt(f-7)!==112||h.charCodeAt(f-8)!==95||h.charCodeAt(f-9)!==95)return!1;for(var k=f-10;k>=0;k--)if(h.charCodeAt(k)!==36)return!1;return!0}function P(h,f,k){var p=te(h.source,f.source);return p!==0||(p=h.originalLine-f.originalLine,p!==0)||(p=h.originalColumn-f.originalColumn,p!==0||k)||(p=h.generatedColumn-f.generatedColumn,p!==0)||(p=h.generatedLine-f.generatedLine,p!==0)?p:te(h.name,f.name)}t.compareByOriginalPositions=P;function Y(h,f,k){var p;return p=h.originalLine-f.originalLine,p!==0||(p=h.originalColumn-f.originalColumn,p!==0||k)||(p=h.generatedColumn-f.generatedColumn,p!==0)||(p=h.generatedLine-f.generatedLine,p!==0)?p:te(h.name,f.name)}t.compareByOriginalPositionsNoSource=Y;function ee(h,f,k){var p=h.generatedLine-f.generatedLine;return p!==0||(p=h.generatedColumn-f.generatedColumn,p!==0||k)||(p=te(h.source,f.source),p!==0)||(p=h.originalLine-f.originalLine,p!==0)||(p=h.originalColumn-f.originalColumn,p!==0)?p:te(h.name,f.name)}t.compareByGeneratedPositionsDeflated=ee;function Le(h,f,k){var p=h.generatedColumn-f.generatedColumn;return p!==0||k||(p=te(h.source,f.source),p!==0)||(p=h.originalLine-f.originalLine,p!==0)||(p=h.originalColumn-f.originalColumn,p!==0)?p:te(h.name,f.name)}t.compareByGeneratedPositionsDeflatedNoLine=Le;function te(h,f){return h===f?0:h===null?1:f===null?-1:h>f?1:-1}function mt(h,f){var k=h.generatedLine-f.generatedLine;return k!==0||(k=h.generatedColumn-f.generatedColumn,k!==0)||(k=te(h.source,f.source),k!==0)||(k=h.originalLine-f.originalLine,k!==0)||(k=h.originalColumn-f.originalColumn,k!==0)?k:te(h.name,f.name)}t.compareByGeneratedPositionsInflated=mt;function gt(h){return JSON.parse(h.replace(/^\)]}'[^\n]*\n/,""))}t.parseSourceMapInput=gt;function kt(h,f,k){if(f=f||"",h&&(h[h.length-1]!=="/"&&f[0]!=="/"&&(h+="/"),f=h+f),k){var p=s(k);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))}f=i(o(p),f)}return u(f)}t.computeSourceURL=kt}(Ut)),Ut}var Gt={},rr;function zs(){if(rr)return Gt;rr=1;var t=Vt(),e=Object.prototype.hasOwnProperty,n=typeof Map<"u";function r(){this._array=[],this._set=n?new Map:Object.create(null)}return r.fromArray=function(o,a){for(var c=new r,u=0,i=o.length;u<i;u++)c.add(o[u],a);return c},r.prototype.size=function(){return n?this._set.size:Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(o,a){var c=n?o:t.toSetString(o),u=n?this.has(o):e.call(this._set,c),i=this._array.length;(!u||a)&&this._array.push(o),u||(n?this._set.set(o,i):this._set[c]=i)},r.prototype.has=function(o){if(n)return this._set.has(o);var a=t.toSetString(o);return e.call(this._set,a)},r.prototype.indexOf=function(o){if(n){var a=this._set.get(o);if(a>=0)return a}else{var c=t.toSetString(o);if(e.call(this._set,c))return this._set[c]}throw new Error('"'+o+'" is not in the set.')},r.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error("No element indexed by "+o)},r.prototype.toArray=function(){return this._array.slice()},Gt.ArraySet=r,Gt}var Ht={},ir;function Fs(){if(ir)return Ht;ir=1;var t=Vt();function e(r,s){var o=r.generatedLine,a=s.generatedLine,c=r.generatedColumn,u=s.generatedColumn;return a>o||a==o&&u>=c||t.compareByGeneratedPositionsInflated(r,s)<=0}function n(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return n.prototype.unsortedForEach=function(s,o){this._array.forEach(s,o)},n.prototype.add=function(s){e(this._last,s)?(this._last=s,this._array.push(s)):(this._sorted=!1,this._array.push(s))},n.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},Ht.MappingList=n,Ht}var sr;function Rs(){if(sr)return jt;sr=1;var t=Ms(),e=Vt(),n=zs().ArraySet,r=Fs().MappingList;function s(o){o||(o={}),this._file=e.getArg(o,"file",null),this._sourceRoot=e.getArg(o,"sourceRoot",null),this._skipValidation=e.getArg(o,"skipValidation",!1),this._ignoreInvalidMapping=e.getArg(o,"ignoreInvalidMapping",!1),this._sources=new n,this._names=new n,this._mappings=new r,this._sourcesContents=null}return s.prototype._version=3,s.fromSourceMap=function(a,c){var u=a.sourceRoot,i=new s(Object.assign(c||{},{file:a.file,sourceRoot:u}));return a.eachMapping(function(l){var d={generated:{line:l.generatedLine,column:l.generatedColumn}};l.source!=null&&(d.source=l.source,u!=null&&(d.source=e.relative(u,d.source)),d.original={line:l.originalLine,column:l.originalColumn},l.name!=null&&(d.name=l.name)),i.addMapping(d)}),a.sources.forEach(function(l){var d=l;u!==null&&(d=e.relative(u,l)),i._sources.has(d)||i._sources.add(d);var y=a.sourceContentFor(l);y!=null&&i.setSourceContent(l,y)}),i},s.prototype.addMapping=function(a){var c=e.getArg(a,"generated"),u=e.getArg(a,"original",null),i=e.getArg(a,"source",null),l=e.getArg(a,"name",null);!this._skipValidation&&this._validateMapping(c,u,i,l)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),l!=null&&(l=String(l),this._names.has(l)||this._names.add(l)),this._mappings.add({generatedLine:c.line,generatedColumn:c.column,originalLine:u!=null&&u.line,originalColumn:u!=null&&u.column,source:i,name:l}))},s.prototype.setSourceContent=function(a,c){var u=a;this._sourceRoot!=null&&(u=e.relative(this._sourceRoot,u)),c!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[e.toSetString(u)]=c):this._sourcesContents&&(delete this._sourcesContents[e.toSetString(u)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(a,c,u){var i=c;if(c==null){if(a.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=a.file}var l=this._sourceRoot;l!=null&&(i=e.relative(l,i));var d=new n,y=new n;this._mappings.unsortedForEach(function(g){if(g.source===i&&g.originalLine!=null){var S=a.originalPositionFor({line:g.originalLine,column:g.originalColumn});S.source!=null&&(g.source=S.source,u!=null&&(g.source=e.join(u,g.source)),l!=null&&(g.source=e.relative(l,g.source)),g.originalLine=S.line,g.originalColumn=S.column,S.name!=null&&(g.name=S.name))}var T=g.source;T!=null&&!d.has(T)&&d.add(T);var P=g.name;P!=null&&!y.has(P)&&y.add(P)},this),this._sources=d,this._names=y,a.sources.forEach(function(g){var S=a.sourceContentFor(g);S!=null&&(u!=null&&(g=e.join(u,g)),l!=null&&(g=e.relative(l,g)),this.setSourceContent(g,S))},this)},s.prototype._validateMapping=function(a,c,u,i){if(c&&typeof c.line!="number"&&typeof c.column!="number"){var l="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(l),!1;throw new Error(l)}if(!(a&&"line"in a&&"column"in a&&a.line>0&&a.column>=0&&!c&&!u&&!i)){if(a&&"line"in a&&"column"in a&&c&&"line"in c&&"column"in c&&a.line>0&&a.column>=0&&c.line>0&&c.column>=0&&u)return;var l="Invalid mapping: "+JSON.stringify({generated:a,source:u,original:c,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(l),!1;throw new Error(l)}},s.prototype._serializeMappings=function(){for(var a=0,c=1,u=0,i=0,l=0,d=0,y="",g,S,T,P,Y=this._mappings.toArray(),ee=0,Le=Y.length;ee<Le;ee++){if(S=Y[ee],g="",S.generatedLine!==c)for(a=0;S.generatedLine!==c;)g+=";",c++;else if(ee>0){if(!e.compareByGeneratedPositionsInflated(S,Y[ee-1]))continue;g+=","}g+=t.encode(S.generatedColumn-a),a=S.generatedColumn,S.source!=null&&(P=this._sources.indexOf(S.source),g+=t.encode(P-d),d=P,g+=t.encode(S.originalLine-1-i),i=S.originalLine-1,g+=t.encode(S.originalColumn-u),u=S.originalColumn,S.name!=null&&(T=this._names.indexOf(S.name),g+=t.encode(T-l),l=T)),y+=g}return y},s.prototype._generateSourcesContent=function(a,c){return a.map(function(u){if(!this._sourcesContents)return null;c!=null&&(u=e.relative(c,u));var i=e.toSetString(u);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)},s.prototype.toJSON=function(){var a={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(a.file=this._file),this._sourceRoot!=null&&(a.sourceRoot=this._sourceRoot),this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot)),a},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},jt.SourceMapGenerator=s,jt}var qs=Rs();const or=new Set(["Atrule","Selector","Declaration"]);function Bs(t){const e=new qs.SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},s={line:1,column:0},o={generated:s};let a=1,c=0,u=!1;const i=t.node;t.node=function(y){if(y.loc&&y.loc.start&&or.has(y.type)){const g=y.loc.start.line,S=y.loc.start.column-1;(r.line!==g||r.column!==S)&&(r.line=g,r.column=S,n.line=a,n.column=c,u&&(u=!1,(n.line!==s.line||n.column!==s.column)&&e.addMapping(o)),u=!0,e.addMapping({source:y.loc.source,original:r,generated:n}))}i.call(this,y),u&&or.has(y.type)&&(s.line=a,s.column=c)};const l=t.emit;t.emit=function(y,g,S){for(let T=0;T<y.length;T++)y.charCodeAt(T)===10?(a++,c=0):c++;l(y,g,S)};const d=t.result;return t.result=function(){return u&&e.addMapping(o),{css:d(),map:e}},t}const js=43,Us=45,Wt=(t,e)=>{if(t===$&&(t=e),typeof t=="string"){const n=t.charCodeAt(0);return n>127?32768:n<<8}return t},ar=[[x,x],[x,D],[x,ie],[x,se],[x,"-"],[x,E],[x,M],[x,N],[x,oe],[x,Z],[U,x],[U,D],[U,ie],[U,se],[U,"-"],[U,E],[U,M],[U,N],[U,oe],[z,x],[z,D],[z,ie],[z,se],[z,"-"],[z,E],[z,M],[z,N],[z,oe],[N,x],[N,D],[N,ie],[N,se],[N,"-"],[N,E],[N,M],[N,N],[N,oe],["#",x],["#",D],["#",ie],["#",se],["#","-"],["#",E],["#",M],["#",N],["#",oe],["-",x],["-",D],["-",ie],["-",se],["-","-"],["-",E],["-",M],["-",N],["-",oe],[E,x],[E,D],[E,ie],[E,se],[E,E],[E,M],[E,N],[E,"%"],[E,oe],["@",x],["@",D],["@",ie],["@",se],["@","-"],["@",oe],[".",E],[".",M],[".",N],["+",E],["+",M],["+",N],["/","*"]],Vs=ar.concat([[x,z],[N,z],[z,z],[U,Z],[U,Oe],[U,X],[M,M],[M,N],[M,D],[M,"-"],[O,x],[O,D],[O,M],[O,N],[O,z],[O,"-"]]);function lr(t){const e=new Set(t.map(([n,r])=>Wt(n)<<16|Wt(r)));return function(n,r,s){const o=Wt(r,s),a=s.charCodeAt(0);return(a===Us&&r!==x&&r!==D&&r!==oe||a===js?e.has(n<<16|a<<8):e.has(n<<16|o))&&this.emit(" ",H,!0),o}}const Gs=lr(ar),cr=lr(Vs),ur=Object.freeze(Object.defineProperty({__proto__:null,safe:cr,spec:Gs},Symbol.toStringTag,{value:"Module"})),Hs=92;function Ws(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 Ks(t){Vn(t,(e,n,r)=>{this.token(e,t.slice(n,r))})}function Qs(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 s="",o=0,a={node(u){if(e.has(u.type))e.get(u.type).call(c,u);else throw new Error("Unknown node type: "+u.type)},tokenBefore:cr,token(u,i){o=this.tokenBefore(o,u,i),this.emit(i,u,!1),u===$&&i.charCodeAt(0)===Hs&&this.emit(`
7
+ `,H,!0)},emit(u){s+=u},result(){return s}};r&&(typeof r.decorator=="function"&&(a=r.decorator(a)),r.sourceMap&&(a=Bs(a)),r.mode in ur&&(a.tokenBefore=ur[r.mode]));const c={node:u=>a.node(u),children:Ws,token:(u,i)=>a.token(u,i),tokenize:Ks};return a.node(n),a.result()}}function Js(t){this.token(U,"@"+t.name),t.prelude!==null&&this.node(t.prelude),t.block?this.node(t.block):this.token(Je,";")}function Ys(t){this.children(t)}function Xs(t){this.token(wt,"{"),this.children(t,e=>{e.type==="Declaration"&&this.token(Je,";")}),this.token(At,"}")}function Zs(t){this.token($,"["),this.children(t),this.token($,"]")}function eo(){this.token(oe,"-->")}function to(){this.token(Nn,"<!--")}function no(t){this.token(ue,"/*"+t.value+"*/")}function ro(t){t.children.forEach(e=>{e.type==="Condition"?(this.token(Z,"("),this.node(e),this.token(O,")")):this.node(e)})}function io(t){this.token(x,t.property),this.token(X,":"),this.node(t.value),t.important&&(this.token($,"!"),this.token(x,t.important===!0?"important":t.important))}function so(t){this.children(t,e=>{e.type==="Declaration"&&this.token(Je,";")})}function oo(t){this.token(N,t.value+t.unit)}function ao(t){this.token(Z,"("),this.token(x,t.name),t.value!==null&&(this.token(X,":"),this.node(t.value)),this.token(O,")")}function lo(t){this.token(D,t.feature+"("),this.node(t.value),this.token(O,")")}function co(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(O,")")}function uo(t){this.token(D,t.name+"("),this.children(t),this.token(O,")")}function ho(t){t.function?this.token(D,t.function+"("):this.token(Z,"("),this.children(t),this.token(O,")")}function fo(t){this.token(z,"#"+t.value)}function po(t){this.tokenize(t.name)}function mo(t){this.children(t,()=>this.token(Ie,","))}function go(t){t.mediaType?(t.modifier&&this.token(x,t.modifier),this.token(x,t.mediaType),t.condition&&(this.token(x,"and"),this.node(t.condition))):t.condition&&this.node(t.condition)}function ko(t){this.children(t,()=>this.token(Ie,","))}function yo(t){this.token(E,t.value)}function So(t){this.token(Z,"("),this.children(t),this.token(O,")")}function xo(t){this.node(t.left),this.token($,"/"),t.right?this.node(t.right):this.node(E,1)}function Co(t){this.node(t.prelude),this.node(t.block)}function bo(t){t.root&&(this.token(Z,"("),this.node(t.root),this.token(O,")")),t.limit&&(this.token(x,"to"),this.token(Z,"("),this.node(t.limit),this.token(O,")"))}function vo(t){this.children(t)}function wo(t){this.token(Z,"("),this.node(t.declaration),this.token(O,")")}function Ao(t){this.tokenize(t.value)}const Lo=32,Eo=92,_o=34,To=39,Oo=40,Io=41;function No(t){let e="",n=!1;for(let r=0;r<t.length;r++){const s=t.charCodeAt(r);if(s===0){e+="�";continue}if(s<=31||s===127){e+="\\"+s.toString(16),n=!0;continue}s===Lo||s===Eo||s===_o||s===To||s===Oo||s===Io?(e+="\\"+t.charAt(r),n=!1):(n&&qe(s)&&(e+=" "),e+=t.charAt(r),n=!1)}return"url("+e+")"}function $o(t){this.token(ie,No(t.value))}function Do(t){this.children(t)}function Po(t){this.token(H,t.value)}const Mo=Qs({node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:Bi,Atrule:Js,AtrulePrelude:Ys,AttributeSelector:Ki,Block:Xs,Brackets:Zs,CDC:eo,CDO:to,ClassSelector:Yi,Combinator:ns,Comment:no,Condition:ro,Declaration:io,DeclarationList:so,Dimension:oo,Feature:ao,FeatureFunction:lo,FeatureRange:co,Function:uo,GeneralEnclosed:ho,Hash:fo,IdSelector:os,Identifier:is,Layer:po,LayerList:mo,MediaQuery:go,MediaQueryList:ko,NestingSelector:cs,Nth:hs,Number:yo,Operator:ps,Parentheses:So,Percentage:ms,PseudoClassSelector:ks,PseudoElementSelector:Ss,Ratio:xo,Raw:bs,Rule:Co,Scope:bo,Selector:ws,SelectorList:Ls,String:Is,StyleSheet:vo,SupportsDeclaration:wo,TypeSelector:Ds,UnicodeRange:Ao,Url:$o,Value:Do,WhiteSpace:Po},Symbol.toStringTag,{value:"Module"}))}),Ue=(t,e)=>t.a===e.a?t.b===e.b?t.c-e.c:t.b-e.b:t.a-e.a,hr=(t,e)=>Ue(t,e)===0,fr=(t,e)=>Ue(t,e)>0,pr=(t,e)=>Ue(t,e)<0,dr=(t,e="ASC")=>{const n=t.sort(Ue);return e==="DESC"?n.reverse():n},mr=(...t)=>dr(t,"ASC"),gr=(...t)=>dr(t,"DESC"),Kt=(...t)=>gr(...t)[0],zo=(...t)=>mr(...t)[0];class Qt extends Error{constructor(){super("Manipulating a Specificity instance is not allowed. Instead, create a new Specificity()")}}class Fo{constructor(e,n=null){this.value=e,this.selector=n}get a(){return this.value.a}set a(e){throw new Qt}get b(){return this.value.b}set b(e){throw new Qt}get c(){return this.value.c}set c(e){throw new Qt}selectorString(){return typeof this.selector=="string"||this.selector instanceof String?this.selector:this.selector instanceof Object&&this.selector.type==="Selector"?Mo(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 hr(this,e)}isGreaterThan(e){return fr(this,e)}isLessThan(e){return pr(this,e)}static calculate(e){return Ve(e)}static calculateForAST(e){return ft(e)}static compare(e,n){return Ue(e,n)}static equals(e,n){return hr(e,n)}static lessThan(e,n){return pr(e,n)}static greaterThan(e,n){return fr(e,n)}static min(...e){return zo(...e)}static max(...e){return Kt(...e)}static sortAsc(...e){return mr(...e)}static sortDesc(...e){return gr(...e)}}const ft=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(s=>{switch(s.type){case"IdSelector":e+=1;break;case"AttributeSelector":case"ClassSelector":n+=1;break;case"PseudoClassSelector":switch(s.name.toLowerCase()){case"where":break;case"-webkit-any":case"any":s.children&&(n+=1);break;case"-moz-any":case"is":case"matches":case"not":case"has":if(s.children){const a=Kt(...Ve(s.children.first));e+=a.a,n+=a.b,r+=a.c}break;case"nth-child":case"nth-last-child":if(n+=1,s.children&&s.children.first.selector){const a=Kt(...Ve(s.children.first.selector));e+=a.a,n+=a.b,r+=a.c}break;case"host-context":case"host":if(n+=1,s.children){const a={type:"Selector",children:[]};let c=!1;s.children.first.children.forEach(i=>{if(c)return!1;if(i.type==="Combinator")return c=!0,!1;a.children.push(i)});const u=Ve(a)[0];e+=u.a,n+=u.b,r+=u.c}break;case"after":case"before":case"first-letter":case"first-line":r+=1;break;default:n+=1;break}break;case"PseudoElementSelector":switch(s.name){case"slotted":if(r+=1,s.children){const a={type:"Selector",children:[]};let c=!1;s.children.first.children.forEach(i=>{if(c)return!1;if(i.type==="Combinator")return c=!0,!1;a.children.push(i)});const u=Ve(a)[0];e+=u.a,n+=u.b,r+=u.c}break;case"view-transition-group":case"view-transition-image-pair":case"view-transition-old":case"view-transition-new":if(s.children&&s.children.first.value==="*")break;r+=1;break;default:r+=1;break}break;case"TypeSelector":let o=s.name;o.includes("|")&&(o=o.split("|")[1]),o!=="*"&&(r+=1);break}}),new Fo({a:e,b:n,c:r},t)},Ro=t=>{if(typeof t=="string"||t instanceof String)try{return Zn(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 Zn(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.")},Ve=t=>{if(!t)return[];const e=Ro(t);if(e.type==="Selector")return[ft(t)];if(e.type==="SelectorList"){const n=[];return e.children.forEach(r=>{const s=ft(r);n.push(s)}),n}};function Jt(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(Jt(t.charCodeAt(r),e.charCodeAt(r))===!1)return!1;return!0}function ge(t,e){if(t===e)return!0;let n=e.length,r=n-t.length;if(r<0)return!1;for(let s=n-1;s>=r;s--)if(Jt(t.charCodeAt(s-r),e.charCodeAt(s))===!1)return!1;return!0}function Yt(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(Jt(t.charCodeAt(r),e.charCodeAt(r))===!1)return!1;return!0}const qo="Atrule",Bo="MediaQuery",jo="MediaFeature",Uo="Rule",Xt="Selector",kr="TypeSelector",Ge="PseudoClassSelector",yr="AttributeSelector",Sr="PseudoElementSelector",Zt="Declaration",Vo="Value",de="Identifier",Go="Nth",Ho="Combinator",Wo="Number",xr="Dimension",De="Operator",Ko="Hash",Qo="Url",en="Function";function Cr(t,e,n){let r=t.value.children.first;return Q(e,t.property)&&r.type===de&&Q(n,r.name)}function br(t){let e=!1;return ce(t,function(n){if(n.type===Zt&&(Cr(n,"-webkit-appearance","none")||Cr(n,"-moz-appearance","meterbar")))return e=!0,this.break}),e}function vr(t){let e=!1;return ce(t,function(n){let r=n.children,s=n.name,o=n.value;if(n.type===Bo&&r.size===1&&r.first.type===de){let a=r.first.name;if(Yt("\\0",a)||ge("\\9 ",a))return e=!0,this.break}else if(n.type===jo){if(o&&o.unit&&o.unit==="\\0")return e=!0,this.break;if(Q("-moz-images-in-menus",s)||Q("min--moz-device-pixel-ratio",s)||Q("-ms-high-contrast",s))return e=!0,this.break;if(Q("min-resolution",s)&&o&&Q(".001",o.value)&&Q("dpcm",o.unit))return e=!0,this.break;if(Q("-webkit-min-device-pixel-ratio",s)&&o&&o.value&&(Q("0",o.value)||Q("10000",o.value)))return e=!0,this.break}}),e}const wr=45;function ke(t){return t.charCodeAt(0)===wr&&t.charCodeAt(1)!==wr&&t.indexOf("-",2)!==-1}class ae{constructor(e){this.set=new Set(e)}has(e){return this.set.has(e.toLowerCase())}}function Ar(t,e){let n=[];return ce(t,{visit:Xt,enter:function(r){n.push(e(r))}}),n}const Lr=new ae(["nth-child","where","not","is","has","nth-last-child","matches","-webkit-any","-moz-any"]);function tn(t){let e=!1;return ce(t,function(n){if(n.type===yr){let r=n.name.name;if(Q("role",r)||Yt("aria-",r))return e=!0,this.break}else if(n.type===Ge&&Lr.has(n.name)){let r=Ar(n,tn);for(let s of r)if(s===!0){e=!0;break}return this.skip}}),e}function Er(t){let e=!1;return ce(t,function(n){let r=n.type;if((r===Sr||r===kr||r===Ge)&&ke(n.name))return e=!0,this.break}),e}function Jo(t){let e=[];return ce(t,function(n){n.type===Ge&&e.push(n.name)}),e.length===0?!1:e}function nn(t){let e=0;return ce(t,function(n){let r=n.type;if(!(r===Xt||r===Go)){if(e++,(r===Sr||r===kr||r===Ge)&&ke(n.name)&&e++,r===yr)return n.value&&e++,this.skip;if(r===Ge&&Lr.has(n.name)){let s=Ar(n,nn);if(s.length===0)return;for(let o of s)e+=o;return this.skip}}}),e}function Yo(t,e){ce(t,function(n,r){if(n.type===Ho){let s=n.loc,o=n.name;if(s===null){let a=r.prev.data.loc.end,c={offset:a.offset,line:a.line,column:a.column};e({name:o,loc:{start:c,end:{offset:c.offset+1,line:c.line,column:c.column+1}}})}else e({name:o,loc:s})}})}const Xo=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"]),Zo=new ae(["accentcolor","accentcolortext","activetext","buttonborder","buttonface","buttontext","canvas","canvastext","field","fieldtext","graytext","highlight","highlighttext","linktext","mark","marktext","selecteditem","selecteditemtext","visitedtext"]),ea=new ae(["rgba","rgb","hsla","hsl","oklch","color","hwb","lch","lab","oklab"]),ta=new ae(["transparent","currentcolor"]),pt=new ae(["auto","none","inherit","initial","unset","revert","revert-layer"]);function dt(t){let e=t.children,n=e.size;if(!e||n>1||n===0)return!1;let r=e.first;return r.type===de&&pt.has(r.name)}const na=new ae(["caption","icon","menu","message-box","small-caption","status-bar"]),ra=new ae(["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","smaller","larger"]),ia=44,_r=47;function rn(t){let e=t.children.first;return e===null?!1:e.type===de&&na.has(e.name)}function sa(t,e,n){let r=Array.from({length:2}),s,o;t.children.forEach(function(c,u){let i=u.prev?u.prev.data:void 0,l=u.next?u.next.data:void 0;if(c.type===de&&pt.has(c.name)&&n({type:"keyword",value:c.name}),l&&l.type===De&&l.value.charCodeAt(0)===_r){s=e(c);return}if(i&&i.type===De&&i.value.charCodeAt(0)===_r){o=e(c);return}if(l&&l.type===De&&l.value.charCodeAt(0)===ia&&!r[0]){r[0]=c,!s&&i&&(s=e(i));return}if(c.type!==Wo){if(u.next===null){r[1]=c,!s&&!r[0]&&i&&(s=e(i));return}if(c.type===de){let d=c.name;if(ra.has(d)){s=d;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:s,line_height:o,font_family:a}}const oa=new ae(["linear","ease","ease-in","ease-out","ease-in-out","step-start","step-end"]),aa=new ae(["cubic-bezier","steps"]);function la(t,e){let n=!1;for(let r of t){let s=r.type,o=r.name;s===De?n=!1:s===xr&&n===!1?(n=!0,e({type:"duration",value:r})):s===de?oa.has(o)?e({type:"fn",value:r}):pt.has(o)&&e({type:"keyword",value:r}):s===en&&aa.has(o)&&e({type:"fn",value:r})}}function sn(t){let e=t.children;if(!e)return!1;for(let n of e){let{type:r,name:s}=n;if(r===de&&ke(s)||r===en&&(ke(s)||sn(n)))return!0}return!1}class b{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 s=n.start,o=s.offset,a=r*4;this._nodes[a]=s.line,this._nodes[a+1]=s.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,s=this._items,o=this._nodes,a=s.size;s.forEach((i,l)=>{if(r){let d=i.map(function(y){let g=y*4;return{line:o[g],column:o[g+1],offset:o[g+2],length:o[g+3]}});e.set(l,d)}else n[l]=i.length});let c=this._total,u={total:c,totalUnique:a,unique:n,uniquenessRatio:c===0?0:a/c};return r&&(u.uniqueWithLocations=Object.fromEntries(e)),u}}class on{constructor(e){this._list=new b(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 b(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 ca(t){let e=new Map,n=-1,r=0,s=0,o=t.length;for(let a=0;a<o;a++){let c=t[a],u=(e.get(c)||0)+1;e.set(c,u),u>n&&(n=u,r=0,s=0),u>=n&&(r++,s+=c)}return s/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((c,u)=>c-u),r=n[0],s=n[e-1],o=ca(n),a=this._sum;return{min:r,max:s,mean:a/e,mode:o,range:s-r,sum:a}}toArray(){return this._items}}function Tr(t){if(an(t)||ke(t))return!1;let e=t.charCodeAt(0);return e===47||e===42||e===95||e===43||e===38||e===36||e===35}function an(t){return t.length<3?!1:t.charCodeAt(0)===45&&t.charCodeAt(1)===45}function J(t,e){return an(e)?!1:ge(t,e)}function ua(t){return ke(t)?t.slice(t.indexOf("-",2)+1):t}function ha(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 fa(t){let e=t.children;if(e){let n=e.last;return n&&n.type===de&&ge("\\9",n.name)}return!1}let pa=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 da={useLocations:!1};function ma(t,e={}){let r=Object.assign({},da,e).useLocations===!0,s=Date.now();function o(m){return a(m).trim()}function a(m){let A=m.loc;return t.substring(A.start.offset,A.end.offset)}let c=0,u=0,i=0,l={total:0,unique:new Map},d=Date.now(),y=Fe(t,{parseCustomProperty:!0,positions:!0,onComment:function(m){c++,u+=m.length}}),g=Date.now(),S=y.loc.end.line-y.loc.start.line+1,T=0,P=new le,Y=[],ee=new b(r),Le=new b(r),te=new b(r),mt=new b(r),gt=new b(r),kt=new b(r),h=new b(r),f=new b(r),k=new b(r),p=new b(r),ne=new b(r),V=new b(r),xe=0,R=0,Ce=new le,ye=new le,cn=new le,Or=new b(r),Ir=new b(r),Nr=new b(r),un=new b(r),$r=new Set,hn=new b(r),Ee,_e,Dr=new le,Pr=new le,Mr=new le,zr=new b(r),yt=new le,Fr=new b(r),Rr=[],fn=new b(r),pn=new b(r),qr=new b(r),Br=new b(r),jr=new Set,He=0,Ur=new le,St=0,dn=0,mn=new b(r),We=new b(r),gn=new b(r),kn=new b(r),xt=new b(r),Ke=new le,yn=new le,Vr=new b(r),Sn=new b(r),Gr=new b(r),Hr=new b(r),Wr=new b(r),xn=new b(r),Cn=new b(r),bn=new b(r),Ct=new b(r),bt=new b(r),Pe=new on(r),Me=new b(r),vn=new on(r),Kr=new b(r),Qe=new b(r),Qr=new on(r);ce(y,function(m){switch(m.type){case qo:{T++;let A=m.name;if(A==="font-face"){let I={};r&&ee.p(m.loc.start.offset,m.loc),m.block.children.forEach(v=>{v.type===Zt&&(I[v.property]=o(v.value))}),Y.push(I),P.push(1);break}let C=1;if(m.prelude!==null){let I=m.prelude,v=I&&o(m.prelude),L=I.loc;if(A==="media")mt.p(v,L),vr(I)&&(gt.p(v,L),C++);else if(A==="supports")h.p(v,L),br(I)&&(f.p(v,L),C++);else if(ge("keyframes",A)){let w="@"+A+" "+v;ke(A)&&(p.p(w,L),C++),k.p(w,L)}else A==="import"?te.p(v,L):A==="charset"?kt.p(v,L):A==="container"?ne.p(v,L):A==="layer"?v.split(",").forEach(w=>Le.p(w.trim(),L)):A==="property"&&V.p(v,L)}else A==="layer"&&(Le.p("<anonymous>",m.loc),C++);P.push(C);break}case Uo:{let A=m.prelude,C=m.block,I=A.children,v=C.children,L=I?I.size:0,w=v?v.size:0;Ce.push(L+w),Or.p(L+w,m.loc),ye.push(L),Ir.p(L,A.loc),cn.push(w),Nr.p(w,C.loc),xe++,w===0&&R++;break}case Xt:{let A=o(m);if(this.atrule&&ge("keyframes",this.atrule.name))return un.p(A,m.loc),this.skip;tn(m)&&pn.p(A,m.loc);let C=Jo(m);if(C!==!1)for(let B of C)qr.p(B,m.loc);let I=nn(m);Er(m)&&hn.p(A,m.loc),$r.add(A),yt.push(I),Fr.p(I,m.loc);let v=ft(m).toArray(),[L,w,_]=v;return zr.p(v.toString(),m.loc),Dr.push(L),Pr.push(w),Mr.push(_),Ee===void 0&&(Ee=v),_e===void 0&&(_e=v),_e!==void 0&&ln(_e,v)<0&&(_e=v),Ee!==void 0&&ln(Ee,v)>0&&(Ee=v),Rr.push(v),L>0&&fn.p(A,m.loc),Yo(m,function(re){Br.p(re.name,re.loc)}),this.skip}case xr:{if(!this.declaration)break;let A=m.unit;return ge("\\9",A)?vn.push(A.substring(0,A.length-2),this.declaration.property,m.loc):vn.push(A,this.declaration.property,m.loc),this.skip}case Qo:{if(Yt("data:",m.value)){let A=m.value,C=A.length,I=ha(A);l.total++,i+=C;let v={line:m.loc.start.line,column:m.loc.start.column,offset:m.loc.start.offset,length:m.loc.end.offset-m.loc.start.offset};if(l.unique.has(I)){let L=l.unique.get(I);L.count++,L.size+=C,l.unique.set(I,L),r&&L.uniqueWithLocations.push(v)}else{let L={count:1,size:C};r&&(L.uniqueWithLocations=[v]),l.unique.set(I,L)}}break}case Vo:{if(dt(m)){yn.push(1),Qe.p(o(m),m.loc);break}let A=this.declaration,{property:C,important:I}=A,v=1;sn(m)&&(Vr.p(o(m),m.loc),v++),typeof I=="string"&&(Sn.p(a(m)+"!"+I,m.loc),v++),fa(m)&&(Sn.p(o(m),m.loc),v++);let L=m.children,w=m.loc;if(yn.push(v),J("z-index",C))return Gr.p(o(m),w),this.skip;if(J("font",C)){if(rn(m))return;let{font_size:_,line_height:B,font_family:re}=sa(m,o,function(be){be.type==="keyword"&&Qe.p(be.value,w)});re&&xn.p(re,w),_&&Cn.p(_,w),B&&bn.p(B,w);break}else if(J("font-size",C)){rn(m)||Cn.p(o(m),w);break}else if(J("font-family",C)){rn(m)||xn.p(o(m),w);break}else if(J("line-height",C))bn.p(o(m),w);else if(J("transition",C)||J("animation",C)){la(L,function(_){_.type==="fn"?Ct.p(o(_.value),w):_.type==="duration"?bt.p(o(_.value),w):_.type==="keyword"&&Qe.p(o(_.value),w)});break}else if(J("animation-duration",C)||J("transition-duration",C)){L&&L.size>1?L.forEach(_=>{_.type!==De&&bt.p(o(_),w)}):bt.p(o(m),w);break}else if(J("transition-timing-function",C)||J("animation-timing-function",C)){L&&L.size>1?L.forEach(_=>{_.type!==De&&Ct.p(o(_),w)}):Ct.p(o(m),w);break}else if(pa.has(ua(C))){dt(m)||Qr.push(o(m),C,w);break}else J("text-shadow",C)?dt(m)||Hr.p(o(m),w):J("box-shadow",C)&&(dt(m)||Wr.p(o(m),w));ce(m,function(_){let B=_.name;switch(_.type){case Ko:{let re=_.value.length;return ge("\\9",_.value)&&(re=re-2),Pe.push("#"+_.value,C,w),Me.p("hex"+re,w),this.skip}case de:{pt.has(B)&&Qe.p(B,w);let re=B.length;if(re>20||re<3)return this.skip;if(ta.has(B)){let be=o(_);Pe.push(be,C,w),Me.p(B.toLowerCase(),w);return}if(Xo.has(B)){let be=o(_);Pe.push(be,C,w),Me.p("named",w);return}if(Zo.has(B)){let be=o(_);Pe.push(be,C,w),Me.p("system",w);return}return this.skip}case en:{if(Q("var",B))return this.skip;if(ea.has(B)){Pe.push(o(_),C,_.loc),Me.p(B.toLowerCase(),_.loc);return}if(ge("gradient",B)){Kr.p(o(_),_.loc);return}}}});break}case Zt:{if(this.atrulePrelude!==null)return this.skip;He++;let A=1;jr.add(o(m)),m.important===!0&&(St++,A++,this.atrule&&ge("keyframes",this.atrule.name)&&(dn++,A++)),Ur.push(A);let{property:C,loc:{start:I}}=m,v={start:{line:I.line,column:I.column,offset:I.offset},end:{offset:I.offset+C.length}};We.p(C,v),ke(C)?(kn.p(C,v),Ke.push(2)):Tr(C)?(gn.p(C,v),Ke.push(2)):an(C)?(xt.p(C,v),Ke.push(m.important?3:2),m.important===!0&&mn.p(C,v)):Ke.push(1);break}}});let Jr=jr.size,ze=yt.size(),wn=Dr.aggregate(),An=Pr.aggregate(),Ln=Mr.aggregate(),Yr=$r.size,F=Object.assign,Xr=t.length,En=Y.length,Zr=P.aggregate(),ei=yt.aggregate(),ti=Ur.aggregate(),ni=Ke.aggregate(),ri=yn.aggregate();return{stylesheet:{sourceLinesOfCode:T+ze+He+un.size(),linesOfCode:S,size:Xr,complexity:Zr.sum+ei.sum+ti.sum+ni.sum+ri.sum,comments:{total:c,size:u},embeddedContent:{size:{total:i,ratio:j(i,Xr)},types:{total:l.total,totalUnique:l.unique.size,uniquenessRatio:j(l.unique.size,l.total),unique:Object.fromEntries(l.unique)}}},atrules:{fontface:F({total:En,totalUnique:En,unique:Y,uniquenessRatio:En===0?0:1},r?{uniqueWithLocations:ee.c().uniqueWithLocations}:{}),import:te.c(),media:F(mt.c(),{browserhacks:gt.c()}),charset:kt.c(),supports:F(h.c(),{browserhacks:f.c()}),keyframes:F(k.c(),{prefixed:F(p.c(),{ratio:j(p.size(),k.size())})}),container:ne.c(),layer:Le.c(),property:V.c(),total:T,complexity:Zr},rules:{total:xe,empty:{total:R,ratio:j(R,xe)},sizes:F(Ce.aggregate(),{items:Ce.toArray()},Or.c()),selectors:F(ye.aggregate(),{items:ye.toArray()},Ir.c()),declarations:F(cn.aggregate(),{items:cn.toArray()},Nr.c())},selectors:{total:ze,totalUnique:Yr,uniquenessRatio:j(Yr,ze),specificity:F({min:_e===void 0?[0,0,0]:_e,max:Ee===void 0?[0,0,0]:Ee,sum:[wn.sum,An.sum,Ln.sum],mean:[wn.mean,An.mean,Ln.mean],mode:[wn.mode,An.mode,Ln.mode],items:Rr},zr.c()),complexity:F(ei,Fr.c(),{items:yt.toArray()}),id:F(fn.c(),{ratio:j(fn.size(),ze)}),pseudoClasses:qr.c(),accessibility:F(pn.c(),{ratio:j(pn.size(),ze)}),keyframes:un.c(),prefixed:F(hn.c(),{ratio:j(hn.size(),ze)}),combinators:Br.c()},declarations:{total:He,totalUnique:Jr,uniquenessRatio:j(Jr,He),importants:{total:St,ratio:j(St,He),inKeyframes:{total:dn,ratio:j(dn,St)}},complexity:ti},properties:F(We.c(),{prefixed:F(kn.c(),{ratio:j(kn.size(),We.size())}),custom:F(xt.c(),{ratio:j(xt.size(),We.size()),importants:F(mn.c(),{ratio:j(mn.size(),xt.size())})}),browserhacks:F(gn.c(),{ratio:j(gn.size(),We.size())}),complexity:ni}),values:{colors:F(Pe.count(),{formats:Me.c()}),gradients:Kr.c(),fontFamilies:xn.c(),fontSizes:Cn.c(),lineHeights:bn.c(),zindexes:Gr.c(),textShadows:Hr.c(),boxShadows:Wr.c(),borderRadiuses:Qr.count(),animations:{durations:bt.c(),timingFunctions:Ct.c()},prefixes:Vr.c(),browserhacks:Sn.c(),units:vn.count(),complexity:ri,keywords:Qe.c()},__meta__:{parseTime:g-d,analyzeTime:Date.now()-g,total:Date.now()-s}}}function ln(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=ma,q.compareSpecificity=ln,q.hasVendorPrefix=ke,q.isAccessibilitySelector=tn,q.isMediaBrowserhack=vr,q.isPropertyHack=Tr,q.isSelectorPrefixed=Er,q.isSupportsBrowserhack=br,q.isValuePrefixed=sn,q.selectorComplexity=nn,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.2",
3
+ "version": "6.0.0",
4
4
  "author": "Bart Veneman",
5
5
  "repository": {
6
6
  "type": "git",
@@ -52,11 +52,11 @@
52
52
  "css-tree": "^2.3.1"
53
53
  },
54
54
  "devDependencies": {
55
- "@codecov/vite-plugin": "^1.2.0",
56
- "c8": "^9.1.0",
55
+ "@codecov/vite-plugin": "^1.9.0",
56
+ "c8": "^10.1.3",
57
57
  "uvu": "^0.5.6",
58
- "vite": "^5.4.14",
59
- "vite-plugin-dts": "^4.2.1"
58
+ "vite": "^6.1.1",
59
+ "vite-plugin-dts": "^4.5.0"
60
60
  },
61
61
  "mangle": {
62
62
  "regex": "^_[^_]"