csso
Version:
CSS minifier with structural optimisations
11 lines • 199 kB
JavaScript
var zl=Object.create;var Sr=Object.defineProperty;var Fl=Object.getOwnPropertyDescriptor;var Bl=Object.getOwnPropertyNames;var _l=Object.getPrototypeOf,Ul=Object.prototype.hasOwnProperty;var Ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),y=(e,t)=>{for(var r in t)Sr(e,r,{get:t[r],enumerable:!0})},jl=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Bl(t))!Ul.call(e,o)&&o!==r&&Sr(e,o,{get:()=>t[o],enumerable:!(n=Fl(t,o))||n.enumerable});return e};var ql=(e,t,r)=>(r=e!=null?zl(_l(e)):{},jl(t||!e||!e.__esModule?Sr(r,"default",{value:e,enumerable:!0}):r,e));var Zi=Ue(Dr=>{var Xi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Dr.encode=function(e){if(0<=e&&e<Xi.length)return Xi[e];throw new TypeError("Must be between 0 and 63: "+e)};Dr.decode=function(e){var t=65,r=90,n=97,o=122,i=48,a=57,l=43,c=47,s=26,u=52;return t<=e&&e<=r?e-t:n<=e&&e<=o?e-n+s:i<=e&&e<=a?e-i+u:e==l?62:e==c?63:-1}});var na=Ue(Mr=>{var Ji=Zi(),Nr=5,ea=1<<Nr,ta=ea-1,ra=ea;function tc(e){return e<0?(-e<<1)+1:(e<<1)+0}function rc(e){var t=(e&1)===1,r=e>>1;return t?-r:r}Mr.encode=function(t){var r="",n,o=tc(t);do n=o&ta,o>>>=Nr,o>0&&(n|=ra),r+=Ji.encode(n);while(o>0);return r};Mr.decode=function(t,r,n){var o=t.length,i=0,a=0,l,c;do{if(r>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(c=Ji.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));l=!!(c&ra),c&=ta,i=i+(c<<a),a+=Nr}while(l);n.value=rc(i),n.rest=r}});var Gt=Ue(X=>{function nc(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}X.getArg=nc;var oa=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,oc=/^data:.+\,.+$/;function dt(e){var t=e.match(oa);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}X.urlParse=dt;function Ve(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}X.urlGenerate=Ve;var ic=32;function ac(e){var t=[];return function(r){for(var n=0;n<t.length;n++)if(t[n].input===r){var o=t[0];return t[0]=t[n],t[n]=o,t[0].result}var i=e(r);return t.unshift({input:r,result:i}),t.length>ic&&t.pop(),i}}var Rr=ac(function(t){var r=t,n=dt(t);if(n){if(!n.path)return t;r=n.path}for(var o=X.isAbsolute(r),i=[],a=0,l=0;;)if(a=l,l=r.indexOf("/",a),l===-1){i.push(r.slice(a));break}else for(i.push(r.slice(a,l));l<r.length&&r[l]==="/";)l++;for(var c,s=0,l=i.length-1;l>=0;l--)c=i[l],c==="."?i.splice(l,1):c===".."?s++:s>0&&(c===""?(i.splice(l+1,s),s=0):(i.splice(l,2),s--));return r=i.join("/"),r===""&&(r=o?"/":"."),n?(n.path=r,Ve(n)):r});X.normalize=Rr;function ia(e,t){e===""&&(e="."),t===""&&(t=".");var r=dt(t),n=dt(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Ve(r);if(r||t.match(oc))return t;if(n&&!n.host&&!n.path)return n.host=t,Ve(n);var o=t.charAt(0)==="/"?t:Rr(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,Ve(n)):o}X.join=ia;X.isAbsolute=function(e){return e.charAt(0)==="/"||oa.test(e)};function sc(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}X.relative=sc;var aa=function(){var e=Object.create(null);return!("__proto__"in e)}();function sa(e){return e}function lc(e){return la(e)?"$"+e:e}X.toSetString=aa?sa:lc;function cc(e){return la(e)?e.slice(1):e}X.fromSetString=aa?sa:cc;function la(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function uc(e,t,r){var n=we(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:we(e.name,t.name)}X.compareByOriginalPositions=uc;function pc(e,t,r){var n;return n=e.originalLine-t.originalLine,n!==0||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:we(e.name,t.name)}X.compareByOriginalPositionsNoSource=pc;function hc(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=we(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:we(e.name,t.name)}X.compareByGeneratedPositionsDeflated=hc;function fc(e,t,r){var n=e.generatedColumn-t.generatedColumn;return n!==0||r||(n=we(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:we(e.name,t.name)}X.compareByGeneratedPositionsDeflatedNoLine=fc;function we(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function mc(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=we(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:we(e.name,t.name)}X.compareByGeneratedPositionsInflated=mc;function dc(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}X.parseSourceMapInput=dc;function gc(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=dt(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}t=ia(Ve(n),t)}return Rr(t)}X.computeSourceURL=gc});var ua=Ue(ca=>{var zr=Gt(),Fr=Object.prototype.hasOwnProperty,ze=typeof Map<"u";function ve(){this._array=[],this._set=ze?new Map:Object.create(null)}ve.fromArray=function(t,r){for(var n=new ve,o=0,i=t.length;o<i;o++)n.add(t[o],r);return n};ve.prototype.size=function(){return ze?this._set.size:Object.getOwnPropertyNames(this._set).length};ve.prototype.add=function(t,r){var n=ze?t:zr.toSetString(t),o=ze?this.has(t):Fr.call(this._set,n),i=this._array.length;(!o||r)&&this._array.push(t),o||(ze?this._set.set(t,i):this._set[n]=i)};ve.prototype.has=function(t){if(ze)return this._set.has(t);var r=zr.toSetString(t);return Fr.call(this._set,r)};ve.prototype.indexOf=function(t){if(ze){var r=this._set.get(t);if(r>=0)return r}else{var n=zr.toSetString(t);if(Fr.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};ve.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};ve.prototype.toArray=function(){return this._array.slice()};ca.ArraySet=ve});var fa=Ue(ha=>{var pa=Gt();function bc(e,t){var r=e.generatedLine,n=t.generatedLine,o=e.generatedColumn,i=t.generatedColumn;return n>r||n==r&&i>=o||pa.compareByGeneratedPositionsInflated(e,t)<=0}function Kt(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Kt.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};Kt.prototype.add=function(t){bc(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};Kt.prototype.toArray=function(){return this._sorted||(this._array.sort(pa.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};ha.MappingList=Kt});var da=Ue(ma=>{var gt=na(),Y=Gt(),Qt=ua().ArraySet,yc=fa().MappingList;function se(e){e||(e={}),this._file=Y.getArg(e,"file",null),this._sourceRoot=Y.getArg(e,"sourceRoot",null),this._skipValidation=Y.getArg(e,"skipValidation",!1),this._sources=new Qt,this._names=new Qt,this._mappings=new yc,this._sourcesContents=null}se.prototype._version=3;se.fromSourceMap=function(t){var r=t.sourceRoot,n=new se({file:t.file,sourceRoot:r});return t.eachMapping(function(o){var i={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(i.source=o.source,r!=null&&(i.source=Y.relative(r,i.source)),i.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(i.name=o.name)),n.addMapping(i)}),t.sources.forEach(function(o){var i=o;r!==null&&(i=Y.relative(r,o)),n._sources.has(i)||n._sources.add(i);var a=t.sourceContentFor(o);a!=null&&n.setSourceContent(o,a)}),n};se.prototype.addMapping=function(t){var r=Y.getArg(t,"generated"),n=Y.getArg(t,"original",null),o=Y.getArg(t,"source",null),i=Y.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,o,i),o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:i})};se.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=Y.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Y.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Y.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};se.prototype.applySourceMap=function(t,r,n){var o=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=t.file}var i=this._sourceRoot;i!=null&&(o=Y.relative(i,o));var a=new Qt,l=new Qt;this._mappings.unsortedForEach(function(c){if(c.source===o&&c.originalLine!=null){var s=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});s.source!=null&&(c.source=s.source,n!=null&&(c.source=Y.join(n,c.source)),i!=null&&(c.source=Y.relative(i,c.source)),c.originalLine=s.line,c.originalColumn=s.column,s.name!=null&&(c.name=s.name))}var u=c.source;u!=null&&!a.has(u)&&a.add(u);var p=c.name;p!=null&&!l.has(p)&&l.add(p)},this),this._sources=a,this._names=l,t.sources.forEach(function(c){var s=t.sourceContentFor(c);s!=null&&(n!=null&&(c=Y.join(n,c)),i!=null&&(c=Y.relative(i,c)),this.setSourceContent(c,s))},this)};se.prototype._validateMapping=function(t,r,n,o){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("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(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!o)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:o}))}};se.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,o=0,i=0,a=0,l="",c,s,u,p,h=this._mappings.toArray(),m=0,b=h.length;m<b;m++){if(s=h[m],c="",s.generatedLine!==r)for(t=0;s.generatedLine!==r;)c+=";",r++;else if(m>0){if(!Y.compareByGeneratedPositionsInflated(s,h[m-1]))continue;c+=","}c+=gt.encode(s.generatedColumn-t),t=s.generatedColumn,s.source!=null&&(p=this._sources.indexOf(s.source),c+=gt.encode(p-a),a=p,c+=gt.encode(s.originalLine-1-o),o=s.originalLine-1,c+=gt.encode(s.originalColumn-n),n=s.originalColumn,s.name!=null&&(u=this._names.indexOf(s.name),c+=gt.encode(u-i),i=u)),l+=c}return l};se.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Y.relative(r,n));var o=Y.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};se.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};se.prototype.toString=function(){return JSON.stringify(this.toJSON())};ma.SourceMapGenerator=se});var Hl="5.0.4";var Fi={};y(Fi,{compress:()=>zi,find:()=>ld,findAll:()=>ud,findLast:()=>cd,fromPlainObject:()=>pd,generate:()=>ad,lexer:()=>nd,parse:()=>id,specificity:()=>kr,toPlainObject:()=>hd,tokenize:()=>od,walk:()=>sd});var Ee={};y(Ee,{AtKeyword:()=>M,BadString:()=>Ne,BadUrl:()=>K,CDC:()=>W,CDO:()=>pe,Colon:()=>R,Comma:()=>Q,Comment:()=>I,Delim:()=>g,Dimension:()=>k,EOF:()=>st,Function:()=>x,Hash:()=>A,Ident:()=>f,LeftCurlyBracket:()=>_,LeftParenthesis:()=>P,LeftSquareBracket:()=>H,Number:()=>d,Percentage:()=>L,RightCurlyBracket:()=>G,RightParenthesis:()=>S,RightSquareBracket:()=>$,Semicolon:()=>q,String:()=>V,Url:()=>U,WhiteSpace:()=>v});var st=0,f=1,x=2,M=3,A=4,V=5,Ne=6,U=7,K=8,g=9,d=10,L=11,k=12,v=13,pe=14,W=15,R=16,q=17,Q=18,H=19,$=20,P=21,S=22,_=23,G=24,I=25;function j(e){return e>=48&&e<=57}function oe(e){return j(e)||e>=65&&e<=70||e>=97&&e<=102}function _t(e){return e>=65&&e<=90}function Wl(e){return e>=97&&e<=122}function Yl(e){return _t(e)||Wl(e)}function Vl(e){return e>=128}function Bt(e){return Yl(e)||Vl(e)||e===95}function lt(e){return Bt(e)||j(e)||e===45}function Gl(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function ct(e){return e===10||e===13||e===12}function he(e){return ct(e)||e===32||e===9}function re(e,t){return!(e!==92||ct(t)||t===0)}function je(e,t,r){return e===45?Bt(t)||t===45||re(t,r):Bt(e)?!0:e===92?re(e,t):!1}function Ut(e,t,r){return e===43||e===45?j(t)?2:t===46&&j(r)?3:0:e===46?j(t)?2:0:j(e)?1:0}function jt(e){return e===65279||e===65534?1:0}var Cr=new Array(128),Kl=128,ut=130,Ar=131,qt=132,Er=133;for(let e=0;e<Cr.length;e++)Cr[e]=he(e)&&ut||j(e)&&Ar||Bt(e)&&qt||Gl(e)&&Er||e||Kl;function Ht(e){return e<128?Cr[e]:qt}function qe(e,t){return t<e.length?e.charCodeAt(t):0}function Wt(e,t,r){return r===13&&qe(e,t+1)===10?2:1}function xe(e,t,r){let n=e.charCodeAt(t);return _t(n)&&(n=n|32),n===r}function ke(e,t,r,n){if(r-t!==n.length||t<0||r>e.length)return!1;for(let o=t;o<r;o++){let i=n.charCodeAt(o-t),a=e.charCodeAt(o);if(_t(a)&&(a=a|32),a!==i)return!1}return!0}function _i(e,t){for(;t>=0&&he(e.charCodeAt(t));t--);return t+1}function pt(e,t){for(;t<e.length&&he(e.charCodeAt(t));t++);return t}function Tr(e,t){for(;t<e.length&&j(e.charCodeAt(t));t++);return t}function fe(e,t){if(t+=2,oe(qe(e,t-1))){for(let n=Math.min(e.length,t+5);t<n&&oe(qe(e,t));t++);let r=qe(e,t);he(r)&&(t+=Wt(e,t,r))}return t}function ht(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(!lt(r)){if(re(r,qe(e,t+1))){t=fe(e,t)-1;continue}break}}return t}function Me(e,t){let r=e.charCodeAt(t);if((r===43||r===45)&&(r=e.charCodeAt(t+=1)),j(r)&&(t=Tr(e,t+1),r=e.charCodeAt(t)),r===46&&j(e.charCodeAt(t+1))&&(t+=2,t=Tr(e,t)),xe(e,t,101)){let n=0;r=e.charCodeAt(t+1),(r===45||r===43)&&(n=1,r=e.charCodeAt(t+2)),j(r)&&(t=Tr(e,t+1+n+1))}return t}function Yt(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(r===41){t++;break}re(r,qe(e,t+1))&&(t=fe(e,t))}return t}function ft(e){if(e.length===1&&!oe(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var He=["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"];function We(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}var Ui=10,Ql=12,ji=13;function qi(e){let t=e.source,r=t.length,n=t.length>0?jt(t.charCodeAt(0)):0,o=We(e.lines,r),i=We(e.columns,r),a=e.startLine,l=e.startColumn;for(let c=n;c<r;c++){let s=t.charCodeAt(c);o[c]=a,i[c]=l++,(s===Ui||s===ji||s===Ql)&&(s===ji&&c+1<r&&t.charCodeAt(c+1)===Ui&&(c++,o[c]=a,i[c]=l),a++,l=1)}o[r]=a,i[r]=l,e.lines=o,e.columns=i,e.computed=!0}var Vt=class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(t,r=0,n=1,o=1){this.source=t,this.startOffset=r,this.startLine=n,this.startColumn=o,this.computed=!1}getLocation(t,r){return this.computed||qi(this),{source:r,offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}getLocationRange(t,r,n){return this.computed||qi(this),{source:n,start:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]},end:{offset:this.startOffset+r,line:this.lines[r],column:this.columns[r]}}}};var ae=16777215,Te=24,$l=new Map([[2,22],[21,22],[19,20],[23,24]]),mt=class{constructor(t,r){this.setSource(t,r)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(t="",r=()=>{}){t=String(t||"");let n=t.length,o=We(this.offsetAndType,t.length+1),i=We(this.balance,t.length+1),a=0,l=0,c=0,s=-1;for(this.offsetAndType=null,this.balance=null,r(t,(u,p,h)=>{switch(u){default:i[a]=n;break;case l:{let m=c&ae;for(c=i[m],l=c>>Te,i[a]=m,i[m++]=a;m<a;m++)i[m]===n&&(i[m]=a);break}case 21:case 2:case 19:case 23:i[a]=c,l=$l.get(u),c=l<<Te|a;break}o[a++]=u<<Te|h,s===-1&&(s=p)}),o[a]=0<<Te|n,i[a]=n,i[n]=n;c!==0;){let u=c&ae;c=i[u],i[u]=n}this.source=t,this.firstCharOffset=s===-1?0:s,this.tokenCount=a,this.offsetAndType=o,this.balance=i,this.reset(),this.next()}lookupType(t){return t+=this.tokenIndex,t<this.tokenCount?this.offsetAndType[t]>>Te:0}lookupOffset(t){return t+=this.tokenIndex,t<this.tokenCount?this.offsetAndType[t-1]&ae:this.source.length}lookupValue(t,r){return t+=this.tokenIndex,t<this.tokenCount?ke(this.source,this.offsetAndType[t-1]&ae,this.offsetAndType[t]&ae,r):!1}getTokenStart(t){return t===this.tokenIndex?this.tokenStart:t>0?t<this.tokenCount?this.offsetAndType[t-1]&ae:this.offsetAndType[this.tokenCount]&ae:this.firstCharOffset}substrToCursor(t){return this.source.substring(t,this.tokenStart)}isBalanceEdge(t){return this.balance[this.tokenIndex]<t}isDelim(t,r){return r?this.lookupType(r)===9&&this.source.charCodeAt(this.lookupOffset(r))===t:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===t}skip(t){let r=this.tokenIndex+t;r<this.tokenCount?(this.tokenIndex=r,this.tokenStart=this.offsetAndType[r-1]&ae,r=this.offsetAndType[r],this.tokenType=r>>Te,this.tokenEnd=r&ae):(this.tokenIndex=this.tokenCount,this.next())}next(){let t=this.tokenIndex+1;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.tokenEnd,t=this.offsetAndType[t],this.tokenType=t>>Te,this.tokenEnd=t&ae):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(t,r){let n=t,o,i;e:for(;n<this.tokenCount;n++){if(o=this.balance[n],o<t)break e;switch(i=n>0?this.offsetAndType[n-1]&ae:this.firstCharOffset,r(this.source.charCodeAt(i))){case 1:break e;case 2:n++;break e;default:this.balance[o]===n&&(n=o)}}this.skip(n-this.tokenIndex)}forEachToken(t){for(let r=0,n=this.firstCharOffset;r<this.tokenCount;r++){let o=n,i=this.offsetAndType[r],a=i&ae,l=i>>Te;n=a,t(l,o,a,r)}}dump(){let t=new Array(this.tokenCount);return this.forEachToken((r,n,o,i)=>{t[i]={idx:i,type:He[r],chunk:this.source.substring(n,o),balance:this.balance[i]}}),t}};function Le(e,t){function r(p){return p<l?e.charCodeAt(p):0}function n(){if(s=Me(e,s),je(r(s),r(s+1),r(s+2))){u=12,s=ht(e,s);return}if(r(s)===37){u=11,s++;return}u=10}function o(){let p=s;if(s=ht(e,s),ke(e,p,s,"url")&&r(s)===40){if(s=pt(e,s+1),r(s)===34||r(s)===39){u=2,s=p+4;return}a();return}if(r(s)===40){u=2,s++;return}u=1}function i(p){for(p||(p=r(s++)),u=5;s<e.length;s++){let h=e.charCodeAt(s);switch(Ht(h)){case p:s++;return;case ut:if(ct(h)){s+=Wt(e,s,h),u=6;return}break;case 92:if(s===e.length-1)break;let m=r(s+1);ct(m)?s+=Wt(e,s+1,m):re(h,m)&&(s=fe(e,s)-1);break}}}function a(){for(u=7,s=pt(e,s);s<e.length;s++){let p=e.charCodeAt(s);switch(Ht(p)){case 41:s++;return;case ut:if(s=pt(e,s),r(s)===41||s>=e.length){s<e.length&&s++;return}s=Yt(e,s),u=8;return;case 34:case 39:case 40:case Er:s=Yt(e,s),u=8;return;case 92:if(re(p,r(s+1))){s=fe(e,s)-1;break}s=Yt(e,s),u=8;return}}}e=String(e||"");let l=e.length,c=jt(r(0)),s=c,u;for(;s<l;){let p=e.charCodeAt(s);switch(Ht(p)){case ut:u=13,s=pt(e,s+1);break;case 34:i();break;case 35:lt(r(s+1))||re(r(s+1),r(s+2))?(u=4,s=ht(e,s+1)):(u=9,s++);break;case 39:i();break;case 40:u=21,s++;break;case 41:u=22,s++;break;case 43:Ut(p,r(s+1),r(s+2))?n():(u=9,s++);break;case 44:u=18,s++;break;case 45:Ut(p,r(s+1),r(s+2))?n():r(s+1)===45&&r(s+2)===62?(u=15,s=s+3):je(p,r(s+1),r(s+2))?o():(u=9,s++);break;case 46:Ut(p,r(s+1),r(s+2))?n():(u=9,s++);break;case 47:r(s+1)===42?(u=25,s=e.indexOf("*/",s+2),s=s===-1?e.length:s+2):(u=9,s++);break;case 58:u=16,s++;break;case 59:u=17,s++;break;case 60:r(s+1)===33&&r(s+2)===45&&r(s+3)===45?(u=14,s=s+4):(u=9,s++);break;case 64:je(r(s+1),r(s+2),r(s+3))?(u=3,s=ht(e,s+1)):(u=9,s++);break;case 91:u=19,s++;break;case 92:re(p,r(s+1))?o():(u=9,s++);break;case 93:u=20,s++;break;case 123:u=23,s++;break;case 125:u=24,s++;break;case Ar:n();break;case qt:o();break;default:u=9,s++}t(u,c,c=s)}}var Ye=null,w=class{static createItem(t){return{prev:null,next:null,data:t}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(t){return w.createItem(t)}allocateCursor(t,r){let n;return Ye!==null?(n=Ye,Ye=Ye.cursor,n.prev=t,n.next=r,n.cursor=this.cursor):n={prev:t,next:r,cursor:this.cursor},this.cursor=n,n}releaseCursor(){let{cursor:t}=this;this.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=Ye,Ye=t}updateCursors(t,r,n,o){let{cursor:i}=this;for(;i!==null;)i.prev===t&&(i.prev=r),i.next===n&&(i.next=o),i=i.cursor}*[Symbol.iterator](){for(let t=this.head;t!==null;t=t.next)yield t.data}get size(){let t=0;for(let r=this.head;r!==null;r=r.next)t++;return t}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(t){let r=null;this.head=null;for(let n of t){let o=w.createItem(n);r!==null?r.next=o:this.head=o,o.prev=r,r=o}return this.tail=r,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(t,r=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let o=n.next;n.next=o.next,t.call(r,o.data,o,this)}this.releaseCursor()}forEachRight(t,r=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let o=n.prev;n.prev=o.prev,t.call(r,o.data,o,this)}this.releaseCursor()}reduce(t,r,n=this){let o=this.allocateCursor(null,this.head),i=r,a;for(;o.next!==null;)a=o.next,o.next=a.next,i=t.call(n,i,a.data,a,this);return this.releaseCursor(),i}reduceRight(t,r,n=this){let o=this.allocateCursor(this.tail,null),i=r,a;for(;o.prev!==null;)a=o.prev,o.prev=a.prev,i=t.call(n,i,a.data,a,this);return this.releaseCursor(),i}some(t,r=this){for(let n=this.head;n!==null;n=n.next)if(t.call(r,n.data,n,this))return!0;return!1}map(t,r=this){let n=new w;for(let o=this.head;o!==null;o=o.next)n.appendData(t.call(r,o.data,o,this));return n}filter(t,r=this){let n=new w;for(let o=this.head;o!==null;o=o.next)t.call(r,o.data,o,this)&&n.appendData(o.data);return n}nextUntil(t,r,n=this){if(t===null)return;let o=this.allocateCursor(null,t);for(;o.next!==null;){let i=o.next;if(o.next=i.next,r.call(n,i.data,i,this))break}this.releaseCursor()}prevUntil(t,r,n=this){if(t===null)return;let o=this.allocateCursor(t,null);for(;o.prev!==null;){let i=o.prev;if(o.prev=i.prev,r.call(n,i.data,i,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let t=new w;for(let r of this)t.appendData(r);return t}prepend(t){return this.updateCursors(null,t,this.head,t),this.head!==null?(this.head.prev=t,t.next=this.head):this.tail=t,this.head=t,this}prependData(t){return this.prepend(w.createItem(t))}append(t){return this.insert(t)}appendData(t){return this.insert(w.createItem(t))}insert(t,r=null){if(r!==null)if(this.updateCursors(r.prev,t,r,t),r.prev===null){if(this.head!==r)throw new Error("before doesn't belong to list");this.head=t,r.prev=t,t.next=r,this.updateCursors(null,t)}else r.prev.next=t,t.prev=r.prev,r.prev=t,t.next=r;else this.updateCursors(this.tail,t,null,t),this.tail!==null?(this.tail.next=t,t.prev=this.tail):this.head=t,this.tail=t;return this}insertData(t,r){return this.insert(w.createItem(t),r)}remove(t){if(this.updateCursors(t,t.prev,t,t.next),t.prev!==null)t.prev.next=t.next;else{if(this.head!==t)throw new Error("item doesn't belong to list");this.head=t.next}if(t.next!==null)t.next.prev=t.prev;else{if(this.tail!==t)throw new Error("item doesn't belong to list");this.tail=t.prev}return t.prev=null,t.next=null,t}push(t){this.insert(w.createItem(t))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(t){this.prepend(w.createItem(t))}shift(){return this.head!==null?this.remove(this.head):null}prependList(t){return this.insertList(t,this.head)}appendList(t){return this.insertList(t)}insertList(t,r){return t.head===null?this:(r!=null?(this.updateCursors(r.prev,t.tail,r,t.head),r.prev!==null?(r.prev.next=t.head,t.head.prev=r.prev):this.head=t.head,r.prev=t.tail,t.tail.next=r):(this.updateCursors(this.tail,t.tail,null,t.head),this.tail!==null?(this.tail.next=t.head,t.head.prev=this.tail):this.head=t.head,this.tail=t.tail),t.head=null,t.tail=null,this)}replace(t,r){"head"in r?this.insertList(r,t):this.insert(r,t),this.remove(t)}};function Re(e,t){let r=Object.create(SyntaxError.prototype),n=new Error;return Object.assign(r,{name:e,message:t,get stack(){return(n.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}
`)}})}var Lr=100,Hi=60,Wi=" ";function Yi({source:e,line:t,column:r},n){function o(u,p){return i.slice(u,p).map((h,m)=>String(u+m+1).padStart(c)+" |"+h).join(`
`)}let i=e.split(/\r\n?|\n|\f/),a=Math.max(1,t-n)-1,l=Math.min(t+n,i.length+1),c=Math.max(4,String(l).length)+1,s=0;r+=(Wi.length-1)*(i[t-1].substr(0,r-1).match(/\t/g)||[]).length,r>Lr&&(s=r-Hi+3,r=Hi-2);for(let u=a;u<=l;u++)u>=0&&u<i.length&&(i[u]=i[u].replace(/\t/g,Wi),i[u]=(s>0&&i[u].length>s?"\u2026":"")+i[u].substr(s,Lr-2)+(i[u].length>s+Lr-1?"\u2026":""));return[o(a,t),new Array(r+c+2).join("-")+"^",o(t,l)].filter(Boolean).join(`
`)}function Pr(e,t,r,n,o){return Object.assign(Re("SyntaxError",e),{source:t,offset:r,line:n,column:o,sourceFragment(a){return Yi({source:t,line:n,column:o},isNaN(a)?0:a)},get formattedMessage(){return`Parse error: ${e}
`+Yi({source:t,line:n,column:o},2)}})}function Vi(e){let t=this.createList(),r=!1,n={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:r=!0,this.next();continue}let o=e.getNode.call(this,n);if(o===void 0)break;r&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,n),r=!1),t.push(o)}return r&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}var Gi=()=>{},Xl=33,Zl=35,Ir=59,Ki=123,Qi=0;function Jl(e){return function(){return this[e]()}}function Or(e){let t=Object.create(null);for(let r in e){let n=e[r],o=n.parse||n;o&&(t[r]=o)}return t}function ec(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Or(e.atrule),pseudo:Or(e.pseudo),node:Or(e.node)};for(let r in e.parseContext)switch(typeof e.parseContext[r]){case"function":t.context[r]=e.parseContext[r];break;case"string":t.context[r]=Jl(e.parseContext[r]);break}return{config:t,...t,...t.node}}function $i(e){let t="",r="<unknown>",n=!1,o=Gi,i=!1,a=new Vt,l=Object.assign(new mt,ec(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Vi,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(s){return s===Ki?1:0},consumeUntilLeftCurlyBracketOrSemicolon(s){return s===Ki||s===Ir?1:0},consumeUntilExclamationMarkOrSemicolon(s){return s===Xl||s===Ir?1:0},consumeUntilSemicolonIncluded(s){return s===Ir?2:0},createList(){return new w},createSingleNodeList(s){return new w().appendData(s)},getFirstListNode(s){return s&&s.first},getLastListNode(s){return s&&s.last},parseWithFallback(s,u){let p=this.tokenIndex;try{return s.call(this)}catch(h){if(i)throw h;let m=u.call(this,p);return i=!0,o(h,m),i=!1,m}},lookupNonWSType(s){let u;do if(u=this.lookupType(s++),u!==13)return u;while(u!==Qi);return Qi},charCodeAt(s){return s>=0&&s<t.length?t.charCodeAt(s):0},substring(s,u){return t.substring(s,u)},substrToCursor(s){return this.source.substring(s,this.tokenStart)},cmpChar(s,u){return xe(t,s,u)},cmpStr(s,u,p){return ke(t,s,u,p)},consume(s){let u=this.tokenStart;return this.eat(s),this.substrToCursor(u)},consumeFunctionName(){let s=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),s},consumeNumber(s){let u=t.substring(this.tokenStart,Me(t,this.tokenStart));return this.eat(s),u},eat(s){if(this.tokenType!==s){let u=He[s].slice(0,-6).replace(/-/g," ").replace(/^./,m=>m.toUpperCase()),p=`${/[[\](){}]/.test(u)?`"${u}"`:u} is expected`,h=this.tokenStart;switch(s){case 1:this.tokenType===2||this.tokenType===7?(h=this.tokenEnd-1,p="Identifier is expected but function found"):p="Identifier is expected";break;case 4:this.isDelim(Zl)&&(this.next(),h++,p="Name is expected");break;case 11:this.tokenType===10&&(h=this.tokenEnd,p="Percent sign is expected");break}this.error(p,h)}this.next()},eatIdent(s){(this.tokenType!==1||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,u){return n?a.getLocationRange(s,u,r):null},getLocationFromList(s){if(n){let u=this.getFirstListNode(s),p=this.getLastListNode(s);return a.getLocationRange(u!==null?u.loc.start.offset-a.startOffset:this.tokenStart,p!==null?p.loc.end.offset-a.startOffset:this.tokenStart,r)}return null},error(s,u){let p=typeof u<"u"&&u<t.length?a.getLocation(u):this.eof?a.getLocation(_i(t,t.length-1)):a.getLocation(this.tokenStart);throw new Pr(s||"Unexpected input",t,p.offset,p.line,p.column)}});return Object.assign(function(s,u){t=s,u=u||{},l.setSource(t,Le),a.setSource(t,u.offset,u.line,u.column),r=u.filename||"<unknown>",n=Boolean(u.positions),o=typeof u.onParseError=="function"?u.onParseError:Gi,i=!1,l.parseAtrulePrelude="parseAtrulePrelude"in u?Boolean(u.parseAtrulePrelude):!0,l.parseRulePrelude="parseRulePrelude"in u?Boolean(u.parseRulePrelude):!0,l.parseValue="parseValue"in u?Boolean(u.parseValue):!0,l.parseCustomProperty="parseCustomProperty"in u?Boolean(u.parseCustomProperty):!1;let{context:p="default",onComment:h}=u;if(!(p in l.context))throw new Error("Unknown context `"+p+"`");typeof h=="function"&&l.forEachToken((b,T,N)=>{if(b===25){let C=l.getLocation(T,N),D=ke(t,N-2,N,"*/")?t.slice(T+2,N-2):t.slice(T+2,N);h(D,C)}});let m=l.context[p].call(l,u);return l.eof||l.error(),m},{SyntaxError:Pr,config:l.config})}var ba=ql(da(),1),ga=new Set(["Atrule","Selector","Declaration"]);function ya(e){let t=new ba.SourceMapGenerator,r={line:1,column:0},n={line:0,column:0},o={line:1,column:0},i={generated:o},a=1,l=0,c=!1,s=e.node;e.node=function(h){if(h.loc&&h.loc.start&&ga.has(h.type)){let m=h.loc.start.line,b=h.loc.start.column-1;(n.line!==m||n.column!==b)&&(n.line=m,n.column=b,r.line=a,r.column=l,c&&(c=!1,(r.line!==o.line||r.column!==o.column)&&t.addMapping(i)),c=!0,t.addMapping({source:h.loc.source,original:n,generated:r}))}s.call(this,h),c&&ga.has(h.type)&&(o.line=a,o.column=l)};let u=e.emit;e.emit=function(h,m,b){for(let T=0;T<h.length;T++)h.charCodeAt(T)===10?(a++,l=0):l++;u(h,m,b)};let p=e.result;return e.result=function(){return c&&t.addMapping(i),{css:p(),map:t}},e}var $t={};y($t,{safe:()=>_r,spec:()=>vc});var xc=43,kc=45,Br=(e,t)=>{if(e===9&&(e=t),typeof e=="string"){let r=e.charCodeAt(0);return r>127?32768:r<<8}return e},xa=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],wc=xa.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function ka(e){let t=new Set(e.map(([r,n])=>Br(r)<<16|Br(n)));return function(r,n,o){let i=Br(n,o),a=o.charCodeAt(0);return(a===kc&&n!==1&&n!==2&&n!==15||a===xc?t.has(r<<16|a<<8):t.has(r<<16|i))&&this.emit(" ",13,!0),i}}var vc=ka(xa),_r=ka(wc);var Sc=92;function Cc(e,t){if(typeof t=="function"){let r=null;e.children.forEach(n=>{r!==null&&t.call(this,r),this.node(n),r=n});return}e.children.forEach(this.node,this)}function Ac(e){Le(e,(t,r,n)=>{this.token(t,e.slice(r,n))})}function wa(e){let t=new Map;for(let r in e.node){let n=e.node[r];typeof(n.generate||n)=="function"&&t.set(r,n.generate||n)}return function(r,n){let o="",i=0,a={node(c){if(t.has(c.type))t.get(c.type).call(l,c);else throw new Error("Unknown node type: "+c.type)},tokenBefore:_r,token(c,s){i=this.tokenBefore(i,c,s),this.emit(s,c,!1),c===9&&s.charCodeAt(0)===Sc&&this.emit(`
`,13,!0)},emit(c){o+=c},result(){return o}};n&&(typeof n.decorator=="function"&&(a=n.decorator(a)),n.sourceMap&&(a=ya(a)),n.mode in $t&&(a.tokenBefore=$t[n.mode]));let l={node:c=>a.node(c),children:Cc,token:(c,s)=>a.token(c,s),tokenize:Ac};return a.node(r),a.result()}}function va(e){return{fromPlainObject(t){return e(t,{enter(r){r.children&&!(r.children instanceof w)&&(r.children=new w().fromArray(r.children))}}),t},toPlainObject(t){return e(t,{leave(r){r.children&&r.children instanceof w&&(r.children=r.children.toArray())}}),t}}}var{hasOwnProperty:Ur}=Object.prototype,bt=function(){};function Sa(e){return typeof e=="function"?e:bt}function Ca(e,t){return function(r,n,o){r.type===t&&e.call(this,r,n,o)}}function Ec(e,t){let r=t.structure,n=[];for(let o in r){if(Ur.call(r,o)===!1)continue;let i=r[o],a={name:o,type:!1,nullable:!1};Array.isArray(i)||(i=[i]);for(let l of i)l===null?a.nullable=!0:typeof l=="string"?a.type="node":Array.isArray(l)&&(a.type="list");a.type&&n.push(a)}return n.length?{context:t.walkContext,fields:n}:null}function Tc(e){let t={};for(let r in e.node)if(Ur.call(e.node,r)){let n=e.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=Ec(r,n)}return t}function Aa(e,t){let r=e.fields.slice(),n=e.context,o=typeof n=="string";return t&&r.reverse(),function(i,a,l,c){let s;o&&(s=a[n],a[n]=i);for(let u of r){let p=i[u.name];if(!u.nullable||p){if(u.type==="list"){if(t?p.reduceRight(c,!1):p.reduce(c,!1))return!0}else if(l(p))return!0}}o&&(a[n]=s)}}function Ea({StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Rule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Declaration:{StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}}}function Ta(e){let t=Tc(e),r={},n={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let s in t)Ur.call(t,s)&&t[s]!==null&&(r[s]=Aa(t[s],!1),n[s]=Aa(t[s],!0));let a=Ea(r),l=Ea(n),c=function(s,u){function p(C,D,Ae){let B=h.call(N,C,D,Ae);return B===o?!0:B===i?!1:!!(b.hasOwnProperty(C.type)&&b[C.type](C,N,p,T)||m.call(N,C,D,Ae)===o)}let h=bt,m=bt,b=r,T=(C,D,Ae,B)=>C||p(D,Ae,B),N={break:o,skip:i,root:s,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof u=="function")h=u;else if(u&&(h=Sa(u.enter),m=Sa(u.leave),u.reverse&&(b=n),u.visit)){if(a.hasOwnProperty(u.visit))b=u.reverse?l[u.visit]:a[u.visit];else if(!t.hasOwnProperty(u.visit))throw new Error("Bad value `"+u.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");h=Ca(h,u.visit),m=Ca(m,u.visit)}if(h===bt&&m===bt)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");p(s)};return c.break=o,c.skip=i,c.find=function(s,u){let p=null;return c(s,function(h,m,b){if(u.call(this,h,m,b))return p=h,o}),p},c.findLast=function(s,u){let p=null;return c(s,{reverse:!0,enter(h,m,b){if(u.call(this,h,m,b))return p=h,o}}),p},c.findAll=function(s,u){let p=[];return c(s,function(h,m,b){u.call(this,h,m,b)&&p.push(h)}),p},c}function Lc(e){return e}function Pc(e){let{min:t,max:r,comma:n}=e;return t===0&&r===0?n?"#?":"*":t===0&&r===1?"?":t===1&&r===0?n?"#":"+":t===1&&r===1?"":(n?"#":"")+(t===r?"{"+t+"}":"{"+t+","+(r!==0?r:"")+"}")}function Ic(e){switch(e.type){case"Range":return" ["+(e.min===null?"-\u221E":e.min)+","+(e.max===null?"\u221E":e.max)+"]";default:throw new Error("Unknown node type `"+e.type+"`")}}function Oc(e,t,r,n){let o=e.combinator===" "||n?e.combinator:" "+e.combinator+" ",i=e.terms.map(a=>jr(a,t,r,n)).join(o);return e.explicit||r?(n||i[0]===","?"[":"[ ")+i+(n?"]":" ]"):i}function jr(e,t,r,n){let o;switch(e.type){case"Group":o=Oc(e,t,r,n)+(e.disallowEmpty?"!":"");break;case"Multiplier":return jr(e.term,t,r,n)+t(Pc(e),e);case"Type":o="<"+e.name+(e.opts?t(Ic(e.opts),e.opts):"")+">";break;case"Property":o="<'"+e.name+"'>";break;case"Keyword":o=e.name;break;case"AtKeyword":o="@"+e.name;break;case"Function":o=e.name+"(";break;case"String":case"Token":o=e.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(o,e)}function Ge(e,t){let r=Lc,n=!1,o=!1;return typeof t=="function"?r=t:t&&(n=Boolean(t.forceBraces),o=Boolean(t.compact),typeof t.decorate=="function"&&(r=t.decorate)),jr(e,r,n,o)}var La={offset:0,line:1,column:1};function Dc(e,t){let r=e.tokens,n=e.longestMatch,o=n<r.length&&r[n].node||null,i=o!==t?o:null,a=0,l=0,c=0,s="",u,p;for(let h=0;h<r.length;h++){let m=r[h].value;h===n&&(l=m.length,a=s.length),i!==null&&r[h].node===i&&(h<=n?c++:c=0),s+=m}return n===r.length||c>1?(u=Xt(i||t,"end")||yt(La,s),p=yt(u)):(u=Xt(i,"start")||yt(Xt(t,"start")||La,s.slice(0,a)),p=Xt(i,"end")||yt(u,s.substr(a,l))),{css:s,mismatchOffset:a,mismatchLength:l,start:u,end:p}}function Xt(e,t){let r=e&&e.loc&&e.loc[t];return r?"line"in r?yt(r):r:null}function yt({offset:e,line:t,column:r},n){let o={offset:e,line:t,column:r};if(n){let i=n.split(/\n|\r\n?|\f/);o.offset+=n.length,o.line+=i.length-1,o.column=i.length===1?o.column+n.length:i.pop().length+1}return o}var Ke=function(e,t){let r=Re("SyntaxReferenceError",e+(t?" `"+t+"`":""));return r.reference=t,r},Pa=function(e,t,r,n){let o=Re("SyntaxMatchError",e),{css:i,mismatchOffset:a,mismatchLength:l,start:c,end:s}=Dc(n,r);return o.rawMessage=e,o.syntax=t?Ge(t):"<generic>",o.css=i,o.mismatchOffset=a,o.mismatchLength=l,o.message=e+`
syntax: `+o.syntax+`
value: `+(i||"<empty string>")+`
--------`+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,c),o.loc={source:r&&r.loc&&r.loc.source||"<unknown>",start:c,end:s},o};var Zt=new Map,Qe=new Map,Jt=45,Z=Nc,me=Mc;function er(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Jt&&e.charCodeAt(t+1)===Jt}function Ia(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===Jt&&e.charCodeAt(t+1)!==Jt){let r=e.indexOf("-",t+2);if(r!==-1)return e.substring(t,r+1)}return""}function Nc(e){if(Zt.has(e))return Zt.get(e);let t=e.toLowerCase(),r=Zt.get(t);if(r===void 0){let n=er(t,0),o=n?"":Ia(t,0);r=Object.freeze({basename:t.substr(o.length),name:t,prefix:o,vendor:o,custom:n})}return Zt.set(e,r),r}function Mc(e){if(Qe.has(e))return Qe.get(e);let t=e,r=e[0];r==="/"?r=e[1]==="/"?"//":"/":r!=="_"&&r!=="*"&&r!=="$"&&r!=="#"&&r!=="+"&&r!=="&"&&(r="");let n=er(t,r.length);if(!n&&(t=t.toLowerCase(),Qe.has(t))){let l=Qe.get(t);return Qe.set(e,l),l}let o=n?"":Ia(t,r.length),i=t.substr(0,r.length+o.length),a=Object.freeze({basename:t.substr(i.length),name:t.substr(r.length),hack:r,vendor:o,prefix:i,custom:n});return Qe.set(e,a),a}var tr=["initial","inherit","unset","revert","revert-layer"];var kt=43,de=45,qr=110,$e=!0,zc=!1;function Wr(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function xt(e,t,r){for(;e!==null&&(e.type===13||e.type===25);)e=r(++t);return t}function Pe(e,t,r,n){if(!e)return 0;let o=e.value.charCodeAt(t);if(o===kt||o===de){if(r)return 0;t++}for(;t<e.value.length;t++)if(!j(e.value.charCodeAt(t)))return 0;return n+1}function Hr(e,t,r){let n=!1,o=xt(e,t,r);if(e=r(o),e===null)return t;if(e.type!==10)if(Wr(e,kt)||Wr(e,de)){if(n=!0,o=xt(r(++o),o,r),e=r(o),e===null||e.type!==10)return 0}else return t;if(!n){let i=e.value.charCodeAt(0);if(i!==kt&&i!==de)return 0}return Pe(e,n?0:1,n,o)}function Yr(e,t){let r=0;if(!e)return 0;if(e.type===10)return Pe(e,0,zc,r);if(e.type===1&&e.value.charCodeAt(0)===de){if(!xe(e.value,1,qr))return 0;switch(e.value.length){case 2:return Hr(t(++r),r,t);case 3:return e.value.charCodeAt(2)!==de?0:(r=xt(t(++r),r,t),e=t(r),Pe(e,0,$e,r));default:return e.value.charCodeAt(2)!==de?0:Pe(e,3,$e,r)}}else if(e.type===1||Wr(e,kt)&&t(r+1).type===1){if(e.type!==1&&(e=t(++r)),e===null||!xe(e.value,0,qr))return 0;switch(e.value.length){case 1:return Hr(t(++r),r,t);case 2:return e.value.charCodeAt(1)!==de?0:(r=xt(t(++r),r,t),e=t(r),Pe(e,0,$e,r));default:return e.value.charCodeAt(1)!==de?0:Pe(e,2,$e,r)}}else if(e.type===12){let n=e.value.charCodeAt(0),o=n===kt||n===de?1:0,i=o;for(;i<e.value.length&&j(e.value.charCodeAt(i));i++);return i===o||!xe(e.value,i,qr)?0:i+1===e.value.length?Hr(t(++r),r,t):e.value.charCodeAt(i+1)!==de?0:i+2===e.value.length?(r=xt(t(++r),r,t),e=t(r),Pe(e,0,$e,r)):Pe(e,i+2,$e,r)}return 0}var Fc=43,Oa=45,Da=63,Bc=117;function Vr(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function _c(e,t){return e.value.charCodeAt(0)===t}function wt(e,t,r){let n=0;for(let o=t;o<e.value.length;o++){let i=e.value.charCodeAt(o);if(i===Oa&&r&&n!==0)return wt(e,t+n+1,!1),6;if(!oe(i)||++n>6)return 0}return n}function rr(e,t,r){if(!e)return 0;for(;Vr(r(t),Da);){if(++e>6)return 0;t++}return t}function Gr(e,t){let r=0;if(e===null||e.type!==1||!xe(e.value,0,Bc)||(e=t(++r),e===null))return 0;if(Vr(e,Fc))return e=t(++r),e===null?0:e.type===1?rr(wt(e,0,!0),++r,t):Vr(e,Da)?rr(1,++r,t):0;if(e.type===10){let n=wt(e,1,!0);return n===0?0:(e=t(++r),e===null?r:e.type===12||e.type===10?!_c(e,Oa)||!wt(e,1,!1)?0:r+1:rr(n,r,t))}return e.type===12?rr(wt(e,1,!0),++r,t):0}var Uc=["calc(","-moz-calc(","-webkit-calc("],Kr=new Map([[2,22],[21,22],[19,20],[23,24]]),jc=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],qc=["deg","grad","rad","turn"],Hc=["s","ms"],Wc=["hz","khz"],Yc=["dpi","dpcm","dppx","x"],Vc=["fr"],Gc=["db"],Kc=["st"];function ue(e,t){return t<e.length?e.charCodeAt(t):0}function Ma(e,t){return ke(e,0,e.length,t)}function Ra(e,t){for(let r=0;r<t.length;r++)if(Ma(e,t[r]))return!0;return!1}function za(e,t){return t!==e.length-2?!1:ue(e,t)===92&&j(ue(e,t+1))}function nr(e,t,r){if(e&&e.type==="Range"){let n=Number(r!==void 0&&r!==t.length?t.substr(0,r):t);if(isNaN(n)||e.min!==null&&n<e.min&&typeof e.min!="string"||e.max!==null&&n>e.max&&typeof e.max!="string")return!0}return!1}function Qc(e,t){let r=0,n=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==r)break e;if(r=n.pop(),n.length===0){o++;break e}break;case 2:case 21:case 19:case 23:n.push(r),r=Kr.get(e.type);break}o++}while(e=t(o));return o}function le(e){return function(t,r,n){return t===null?0:t.type===2&&Ra(t.value,Uc)?Qc(t,r):e(t,r,n)}}function z(e){return function(t){return t===null||t.type!==e?0:1}}function $c(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return Ra(t,tr)||Ma(t,"default")?0:1}function Xc(e){return e===null||e.type!==1||ue(e.value,0)!==45||ue(e.value,1)!==45?0:1}function Zc(e){if(e===null||e.type!==4)return 0;let t=e.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let r=1;r<t;r++)if(!oe(ue(e.value,r)))return 0;return 1}function Jc(e){return e===null||e.type!==4||!je(ue(e.value,1),ue(e.value,2),ue(e.value,3))?0:1}function eu(e,t){if(!e)return 0;let r=0,n=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==r)break e;r=n.pop();break;case 17:if(r===0)break e;break;case 9:if(r===0&&e.value==="!")break e;break;case 2:case 21:case 19:case 23:n.push(r),r=Kr.get(e.type);break}o++}while(e=t(o));return o}function tu(e,t){if(!e)return 0;let r=0,n=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==r)break e;r=n.pop();break;case 2:case 21:case 19:case 23:n.push(r),r=Kr.get(e.type);break}o++}while(e=t(o));return o}function Se(e){return e&&(e=new Set(e)),function(t,r,n){if(t===null||t.type!==12)return 0;let o=Me(t.value,0);if(e!==null){let i=t.value.indexOf("\\",o),a=i===-1||!za(t.value,i)?t.value.substr(o):t.value.substring(o,i);if(e.has(a.toLowerCase())===!1)return 0}return nr(n,t.value,o)?0:1}}function ru(e,t,r){return e===null||e.type!==11||nr(r,e.value,e.value.length-1)?0:1}function Na(e){return typeof e!="function"&&(e=function(){return 0}),function(t,r,n){return t!==null&&t.type===10&&Number(t.value)===0?1:e(t,r,n)}}function nu(e,t,r){if(e===null)return 0;let n=Me(e.value,0);return!(n===e.value.length)&&!za(e.value,n)||nr(r,e.value,n)?0:1}function ou(e,t,r){if(e===null||e.type!==10)return 0;let n=ue(e.value,0)===43||ue(e.value,0)===45?1:0;for(;n<e.value.length;n++)if(!j(ue(e.value,n)))return 0;return nr(r,e.value,n)?0:1}var Qr={"ident-token":z(1),"function-token":z(2),"at-keyword-token":z(3),"hash-token":z(4),"string-token":z(5),"bad-string-token":z(6),"url-token":z(7),"bad-url-token":z(8),"delim-token":z(9),"number-token":z(10),"percentage-token":z(11),"dimension-token":z(12),"whitespace-token":z(13),"CDO-token":z(14),"CDC-token":z(15),"colon-token":z(16),"semicolon-token":z(17),"comma-token":z(18),"[-token":z(19),"]-token":z(20),"(-token":z(21),")-token":z(22),"{-token":z(23),"}-token":z(24),string:z(5),ident:z(1),"custom-ident":$c,"custom-property-name":Xc,"hex-color":Zc,"id-selector":Jc,"an-plus-b":Yr,urange:Gr,"declaration-value":eu,"any-value":tu,dimension:le(Se(null)),angle:le(Se(qc)),decibel:le(Se(Gc)),frequency:le(Se(Wc)),flex:le(Se(Vc)),length:le(Na(Se(jc))),resolution:le(Se(Yc)),semitones:le(Se(Kc)),time:le(Se(Hc)),percentage:le(ru),zero:Na(),number:le(nu),integer:le(ou)};function $r(e,t,r){return Object.assign(Re("SyntaxError",e),{input:t,offset:r,rawMessage:e,message:e+`
`+t+`
--`+new Array((r||t.length)+1).join("-")+"^"})}var iu=9,au=10,su=12,lu=13,cu=32,or=class{constructor(t){this.str=t,this.pos=0}charCodeAt(t){return t<this.str.length?this.str.charCodeAt(t):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(t){return this.charCodeAt(this.findWsEnd(t))}findWsEnd(t){for(;t<this.str.length;t++){let r=this.str.charCodeAt(t);if(r!==lu&&r!==au&&r!==su&&r!==cu&&r!==iu)break}return t}substringToPos(t){return this.str.substring(this.pos,this.pos=t)}eat(t){this.charCode()!==t&&this.error("Expect `"+String.fromCharCode(t)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(t){throw new $r(t,this.str,this.pos)}};var uu=9,pu=10,hu=12,fu=13,mu=32,Wa=33,Jr=35,Fa=38,ir=39,Ya=40,du=41,Va=42,en=43,tn=44,Ba=45,rn=60,Ga=62,Zr=63,gu=64,cr=91,nn=93,ar=123,_a=124,Ua=125,ja=8734,vt=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),qa={" ":1,"&&":2,"||":3,"|":4};function sr(e){return e.substringToPos(e.findWsEnd(e.pos))}function Xe(e){let t=e.pos;for(;t<e.str.length;t++){let r=e.str.charCodeAt(t);if(r>=128||vt[r]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function lr(e){let t=e.pos;for(;t<e.str.length;t++){let r=e.str.charCodeAt(t);if(r<48||r>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function bu(e){let t=e.str.indexOf("'",e.pos+1);return t===-1&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function Ha(e){let t=null,r=null;return e.eat(ar),t=lr(e),e.charCode()===tn?(e.pos++,e.charCode()!==Ua&&(r=lr(e))):r=t,e.eat(Ua),{min:Number(t),max:r?Number(r):0}}function yu(e){let t=null,r=!1;switch(e.charCode()){case Va:e.pos++,t={min:0,max:0};break;case en:e.pos++,t={min:1,max:0};break;case Zr:e.pos++,t={min:0,max:1};break;case Jr:e.pos++,r=!0,e.charCode()===ar?t=Ha(e):e.charCode()===Zr?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case ar:t=Ha(e);break;default:return null}return{type:"Multiplier",comma:r,min:t.min,max:t.max,term:null}}function Ze(e,t){let r=yu(e);return r!==null?(r.term=t,e.charCode()===Jr&&e.charCodeAt(e.pos-1)===en?Ze(e,r):r):t}function Xr(e){let t=e.peek();return t===""?null:{type:"Token",value:t}}function xu(e){let t;return e.eat(rn),e.eat(ir),t=Xe(e),e.eat(ir),e.eat(Ga),Ze(e,{type:"Property",name:t})}function ku(e){let t=null,r=null,n=1;return e.eat(cr),e.charCode()===Ba&&(e.peek(),n=-1),n==-1&&e.charCode()===ja?e.peek():(t=n*Number(lr(e)),vt[e.charCode()]!==0&&(t+=Xe(e))),sr(e),e.eat(tn),sr(e),e.charCode()===ja?e.peek():(n=1,e.charCode()===Ba&&(e.peek(),n=-1),r=n*Number(lr(e)),vt[e.charCode()]!==0&&(r+=Xe(e))),e.eat(nn),{type:"Range",min:t,max:r}}function wu(e){let t,r=null;return e.eat(rn),t=Xe(e),e.charCode()===Ya&&e.nextCharCode()===du&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===cr&&(sr(e),r=ku(e)),e.eat(Ga),Ze(e,{type:"Type",name:t,opts:r})}function vu(e){let t=Xe(e);return e.charCode()===Ya?(e.pos++,{type:"Function",name:t}):Ze(e,{type:"Keyword",name:t})}function Su(e,t){function r(o,i){return{type:"Group",terms:o,combinator:i,disallowEmpty:!1,explicit:!1}}let n;for(t=Object.keys(t).sort((o,i)=>qa[o]-qa[i]);t.length>0;){n=t.shift();let o=0,i=0;for(;o<e.length;o++){let a=e[o];a.type==="Combinator"&&(a.value===n?(i===-1&&(i=o-1),e.splice(o,1),o--):(i!==-1&&o-i>1&&(e.splice(i,o-i,r(e.slice(i,o),n)),o=i+1),i=-1))}i!==-1&&t.length&&e.splice(i,o-i,r(e.slice(i,o),n))}return n}function Ka(e){let t=[],r={},n,o=null,i=e.pos;for