9 lines
54 KiB
JavaScript
9 lines
54 KiB
JavaScript
var Zn=Object.create;var Et=Object.defineProperty;var ti=Object.getOwnPropertyDescriptor;var ei=Object.getOwnPropertyNames;var ri=Object.getPrototypeOf,ni=Object.prototype.hasOwnProperty;var rt=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},vt=(e,t)=>{for(var r in t)Et(e,r,{get:t[r],enumerable:!0})},Be=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ei(t))!ni.call(e,i)&&i!==r&&Et(e,i,{get:()=>t[i],enumerable:!(n=ti(t,i))||n.enumerable});return e};var ii=(e,t,r)=>(r=e!=null?Zn(ri(e)):{},Be(t||!e||!e.__esModule?Et(r,"default",{value:e,enumerable:!0}):r,e)),si=e=>Be(Et({},"__esModule",{value:!0}),e);var je=rt(he=>{var He="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");he.encode=function(e){if(0<=e&&e<He.length)return He[e];throw new TypeError("Must be between 0 and 63: "+e)};he.decode=function(e){var t=65,r=90,n=97,i=122,o=48,c=57,l=43,u=47,s=26,a=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+s:o<=e&&e<=c?e-o+a:e==l?62:e==u?63:-1}});var Qe=rt(pe=>{var Ye=je(),fe=5,qe=1<<fe,Ke=qe-1,ze=qe;function pi(e){return e<0?(-e<<1)+1:(e<<1)+0}function mi(e){var t=(e&1)===1,r=e>>1;return t?-r:r}pe.encode=function(t){var r="",n,i=pi(t);do n=i&Ke,i>>>=fe,i>0&&(n|=ze),r+=Ye.encode(n);while(i>0);return r};pe.decode=function(t,r,n){var i=t.length,o=0,c=0,l,u;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(u=Ye.decode(t.charCodeAt(r++)),u===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));l=!!(u&ze),u&=Ke,o=o+(u<<c),c+=fe}while(l);n.value=mi(o),n.rest=r}});var Yt=rt(L=>{function di(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}L.getArg=di;var $e=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,ki=/^data:.+\,.+$/;function gt(e){var t=e.match($e);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}L.urlParse=gt;function ot(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}L.urlGenerate=ot;var xi=32;function Si(e){var t=[];return function(r){for(var n=0;n<t.length;n++)if(t[n].input===r){var i=t[0];return t[0]=t[n],t[n]=i,t[0].result}var o=e(r);return t.unshift({input:r,result:o}),t.length>xi&&t.pop(),o}}var me=Si(function(t){var r=t,n=gt(t);if(n){if(!n.path)return t;r=n.path}for(var i=L.isAbsolute(r),o=[],c=0,l=0;;)if(c=l,l=r.indexOf("/",c),l===-1){o.push(r.slice(c));break}else for(o.push(r.slice(c,l));l<r.length&&r[l]==="/";)l++;for(var u,s=0,l=o.length-1;l>=0;l--)u=o[l],u==="."?o.splice(l,1):u===".."?s++:s>0&&(u===""?(o.splice(l+1,s),s=0):(o.splice(l,2),s--));return r=o.join("/"),r===""&&(r=i?"/":"."),n?(n.path=r,ot(n)):r});L.normalize=me;function Xe(e,t){e===""&&(e="."),t===""&&(t=".");var r=gt(t),n=gt(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),ot(r);if(r||t.match(ki))return t;if(n&&!n.host&&!n.path)return n.host=t,ot(n);var i=t.charAt(0)==="/"?t:me(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,ot(n)):i}L.join=Xe;L.isAbsolute=function(e){return e.charAt(0)==="/"||$e.test(e)};function gi(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)}L.relative=gi;var Je=(function(){var e=Object.create(null);return!("__proto__"in e)})();function Ze(e){return e}function Ci(e){return tr(e)?"$"+e:e}L.toSetString=Je?Ze:Ci;function yi(e){return tr(e)?e.slice(1):e}L.fromSetString=Je?Ze:yi;function tr(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 bi(e,t,r){var n=G(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:G(e.name,t.name)}L.compareByOriginalPositions=bi;function Ti(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:G(e.name,t.name)}L.compareByOriginalPositionsNoSource=Ti;function Li(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=G(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:G(e.name,t.name)}L.compareByGeneratedPositionsDeflated=Li;function Ei(e,t,r){var n=e.generatedColumn-t.generatedColumn;return n!==0||r||(n=G(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:G(e.name,t.name)}L.compareByGeneratedPositionsDeflatedNoLine=Ei;function G(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function vi(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=G(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:G(e.name,t.name)}L.compareByGeneratedPositionsInflated=vi;function wi(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}L.parseSourceMapInput=wi;function Ai(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=gt(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}t=Xe(ot(n),t)}return me(t)}L.computeSourceURL=Ai});var rr=rt(er=>{var de=Yt(),ke=Object.prototype.hasOwnProperty,X=typeof Map<"u";function H(){this._array=[],this._set=X?new Map:Object.create(null)}H.fromArray=function(t,r){for(var n=new H,i=0,o=t.length;i<o;i++)n.add(t[i],r);return n};H.prototype.size=function(){return X?this._set.size:Object.getOwnPropertyNames(this._set).length};H.prototype.add=function(t,r){var n=X?t:de.toSetString(t),i=X?this.has(t):ke.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(t),i||(X?this._set.set(t,o):this._set[n]=o)};H.prototype.has=function(t){if(X)return this._set.has(t);var r=de.toSetString(t);return ke.call(this._set,r)};H.prototype.indexOf=function(t){if(X){var r=this._set.get(t);if(r>=0)return r}else{var n=de.toSetString(t);if(ke.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};H.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};H.prototype.toArray=function(){return this._array.slice()};er.ArraySet=H});var sr=rt(ir=>{var nr=Yt();function Ii(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return n>r||n==r&&o>=i||nr.compareByGeneratedPositionsInflated(e,t)<=0}function qt(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}qt.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};qt.prototype.add=function(t){Ii(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};qt.prototype.toArray=function(){return this._sorted||(this._array.sort(nr.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};ir.MappingList=qt});var ar=rt(or=>{var Ct=Qe(),y=Yt(),Kt=rr().ArraySet,Ni=sr().MappingList;function P(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._ignoreInvalidMapping=y.getArg(e,"ignoreInvalidMapping",!1),this._sources=new Kt,this._names=new Kt,this._mappings=new Ni,this._sourcesContents=null}P.prototype._version=3;P.fromSourceMap=function(t,r){var n=t.sourceRoot,i=new P(Object.assign(r||{},{file:t.file,sourceRoot:n}));return t.eachMapping(function(o){var c={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(c.source=o.source,n!=null&&(c.source=y.relative(n,c.source)),c.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(c.name=o.name)),i.addMapping(c)}),t.sources.forEach(function(o){var c=o;n!==null&&(c=y.relative(n,o)),i._sources.has(c)||i._sources.add(c);var l=t.sourceContentFor(o);l!=null&&i.setSourceContent(o,l)}),i};P.prototype.addMapping=function(t){var r=y.getArg(t,"generated"),n=y.getArg(t,"original",null),i=y.getArg(t,"source",null),o=y.getArg(t,"name",null);!this._skipValidation&&this._validateMapping(r,n,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:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o}))};P.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))};P.prototype.applySourceMap=function(t,r,n){var i=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.`);i=t.file}var o=this._sourceRoot;o!=null&&(i=y.relative(o,i));var c=new Kt,l=new Kt;this._mappings.unsortedForEach(function(u){if(u.source===i&&u.originalLine!=null){var s=t.originalPositionFor({line:u.originalLine,column:u.originalColumn});s.source!=null&&(u.source=s.source,n!=null&&(u.source=y.join(n,u.source)),o!=null&&(u.source=y.relative(o,u.source)),u.originalLine=s.line,u.originalColumn=s.column,s.name!=null&&(u.name=s.name))}var a=u.source;a!=null&&!c.has(a)&&c.add(a);var h=u.name;h!=null&&!l.has(h)&&l.add(h)},this),this._sources=c,this._names=l,t.sources.forEach(function(u){var s=t.sourceContentFor(u);s!=null&&(n!=null&&(u=y.join(n,u)),o!=null&&(u=y.relative(o,u)),this.setSourceContent(u,s))},this)};P.prototype._validateMapping=function(t,r,n,i){if(r&&typeof r.line!="number"&&typeof r.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(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){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;var o="Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(o),!1;throw new Error(o)}};P.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,i=0,o=0,c=0,l="",u,s,a,h,p=this._mappings.toArray(),m=0,k=p.length;m<k;m++){if(s=p[m],u="",s.generatedLine!==r){t=0;var w=s.generatedLine-r;u+=w===1?";":";".repeat(w),r=s.generatedLine}else if(m>0){if(!y.compareByGeneratedPositionsInflated(s,p[m-1]))continue;u+=","}u+=Ct.encode(s.generatedColumn-t),t=s.generatedColumn,s.source!=null&&(h=this._sources.indexOf(s.source),u+=Ct.encode(h-c),c=h,u+=Ct.encode(s.originalLine-1-i),i=s.originalLine-1,u+=Ct.encode(s.originalColumn-n),n=s.originalColumn,s.name!=null&&(a=this._names.indexOf(s.name),u+=Ct.encode(a-o),o=a)),l+=u}return l};P.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=y.relative(r,n));var i=y.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};P.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};P.prototype.toString=function(){return JSON.stringify(this.toJSON())};or.SourceMapGenerator=P});var bs={};vt(bs,{default:()=>Re});module.exports=si(bs);function E(e){return e>=48&&e<=57}function j(e){return E(e)||e>=65&&e<=70||e>=97&&e<=102}function At(e){return e>=65&&e<=90}function oi(e){return e>=97&&e<=122}function ai(e){return At(e)||oi(e)}function ci(e){return e>=128}function wt(e){return ai(e)||ci(e)||e===95}function It(e){return wt(e)||E(e)||e===45}function li(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function ft(e){return e===10||e===13||e===12}function Y(e){return ft(e)||e===32||e===9}function A(e,t){return!(e!==92||ft(t)||t===0)}function Nt(e,t,r){return e===45?wt(t)||t===45||A(t,r):wt(e)?!0:e===92?A(e,t):!1}function Dt(e,t,r){return e===43||e===45?E(t)?2:t===46&&E(r)?3:0:e===46?E(t)?2:0:E(e)?1:0}function Pt(e){return e===65279||e===65534?1:0}var re=new Array(128),ui=128,pt=130,ne=131,Ft=132,ie=133;for(let e=0;e<re.length;e++)re[e]=Y(e)&&pt||E(e)&&ne||wt(e)&&Ft||li(e)&&ie||e||ui;function Ot(e){return e<128?re[e]:Ft}function nt(e,t){return t<e.length?e.charCodeAt(t):0}function Rt(e,t,r){return r===13&&nt(e,t+1)===10?2:1}function oe(e,t,r){let n=e.charCodeAt(t);return At(n)&&(n=n|32),n===r}function $(e,t,r,n){if(r-t!==n.length||t<0||r>e.length)return!1;for(let i=t;i<r;i++){let o=n.charCodeAt(i-t),c=e.charCodeAt(i);if(At(c)&&(c=c|32),c!==o)return!1}return!0}function Me(e,t){for(;t>=0&&Y(e.charCodeAt(t));t--);return t+1}function mt(e,t){for(;t<e.length&&Y(e.charCodeAt(t));t++);return t}function se(e,t){for(;t<e.length&&E(e.charCodeAt(t));t++);return t}function q(e,t){if(t+=2,j(nt(e,t-1))){for(let n=Math.min(e.length,t+5);t<n&&j(nt(e,t));t++);let r=nt(e,t);Y(r)&&(t+=Rt(e,t,r))}return t}function dt(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(!It(r)){if(A(r,nt(e,t+1))){t=q(e,t)-1;continue}break}}return t}function _t(e,t){let r=e.charCodeAt(t);if((r===43||r===45)&&(r=e.charCodeAt(t+=1)),E(r)&&(t=se(e,t+1),r=e.charCodeAt(t)),r===46&&E(e.charCodeAt(t+1))&&(t+=2,t=se(e,t)),oe(e,t,101)){let n=0;r=e.charCodeAt(t+1),(r===45||r===43)&&(n=1,r=e.charCodeAt(t+2)),E(r)&&(t=se(e,t+1+n+1))}return t}function Bt(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(r===41){t++;break}A(r,nt(e,t+1))&&(t=q(e,t))}return t}function ae(e){if(e.length===1&&!j(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 it=["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"];function st(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}var Ue=10,hi=12,We=13;function Ve(e){let t=e.source,r=t.length,n=t.length>0?Pt(t.charCodeAt(0)):0,i=st(e.lines,r),o=st(e.columns,r),c=e.startLine,l=e.startColumn;for(let u=n;u<r;u++){let s=t.charCodeAt(u);i[u]=c,o[u]=l++,(s===Ue||s===We||s===hi)&&(s===We&&u+1<r&&t.charCodeAt(u+1)===Ue&&(u++,i[u]=c,o[u]=l),c++,l=1)}i[r]=c,o[r]=l,e.lines=i,e.columns=o,e.computed=!0}var Mt=class{constructor(t,r,n,i){this.setSource(t,r,n,i),this.lines=null,this.columns=null}setSource(t="",r=0,n=1,i=1){this.source=t,this.startOffset=r,this.startLine=n,this.startColumn=i,this.computed=!1}getLocation(t,r){return this.computed||Ve(this),{source:r,offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}getLocationRange(t,r,n){return this.computed||Ve(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 F=16777215,O=24,kt=1,Ht=2,K=new Uint8Array(32);K[2]=22;K[21]=22;K[19]=20;K[23]=24;var R=new Uint8Array(32);R[2]=kt;R[21]=kt;R[19]=kt;R[23]=kt;R[22]=Ht;R[20]=Ht;R[24]=Ht;function Ge(e,t,r){return e<t?t:e>r?r:e}var Wt=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,i=st(this.offsetAndType,t.length+1),o=st(this.balance,t.length+1),c=0,l=-1,u=0,s=t.length;this.offsetAndType=null,this.balance=null,o.fill(0),r(t,(a,h,p)=>{let m=c++;if(i[m]=a<<O|p,l===-1&&(l=h),o[m]=s,a===u){let k=o[s];o[s]=m,s=k,u=K[i[k]>>O]}else this.isBlockOpenerTokenType(a)&&(s=m,u=K[a])}),i[c]=0<<O|n,o[c]=c;for(let a=0;a<c;a++){let h=o[a];if(h<=a){let p=o[h];p!==a&&(o[a]=p)}else h>c&&(o[a]=c)}this.source=t,this.firstCharOffset=l===-1?0:l,this.tokenCount=c,this.offsetAndType=i,this.balance=o,this.reset(),this.next()}lookupType(t){return t+=this.tokenIndex,t<this.tokenCount?this.offsetAndType[t]>>O:0}lookupTypeNonSC(t){for(let r=this.tokenIndex;r<this.tokenCount;r++){let n=this.offsetAndType[r]>>O;if(n!==13&&n!==25&&t--===0)return n}return 0}lookupOffset(t){return t+=this.tokenIndex,t<this.tokenCount?this.offsetAndType[t-1]&F:this.source.length}lookupOffsetNonSC(t){for(let r=this.tokenIndex;r<this.tokenCount;r++){let n=this.offsetAndType[r]>>O;if(n!==13&&n!==25&&t--===0)return r-this.tokenIndex}return 0}lookupValue(t,r){return t+=this.tokenIndex,t<this.tokenCount?$(this.source,this.offsetAndType[t-1]&F,this.offsetAndType[t]&F,r):!1}getTokenStart(t){return t===this.tokenIndex?this.tokenStart:t>0?t<this.tokenCount?this.offsetAndType[t-1]&F:this.offsetAndType[this.tokenCount]&F:this.firstCharOffset}getTokenEnd(t){return t===this.tokenIndex?this.tokenEnd:this.offsetAndType[Ge(t,0,this.tokenCount)]&F}getTokenType(t){return t===this.tokenIndex?this.tokenType:this.offsetAndType[Ge(t,0,this.tokenCount)]>>O}substrToCursor(t){return this.source.substring(t,this.tokenStart)}isBlockOpenerTokenType(t){return R[t]===kt}isBlockCloserTokenType(t){return R[t]===Ht}getBlockTokenPairIndex(t){let r=this.getTokenType(t);if(R[r]===1){let n=this.balance[t],i=this.getTokenType(n);return K[r]===i?n:-1}else if(R[r]===2){let n=this.balance[t],i=this.getTokenType(n);return K[i]===r?n:-1}return-1}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]&F,r=this.offsetAndType[r],this.tokenType=r>>O,this.tokenEnd=r&F):(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>>O,this.tokenEnd=t&F):(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,i=0,o=0;t:for(;n<this.tokenCount;n++){if(i=this.balance[n],i<t)break t;switch(o=n>0?this.offsetAndType[n-1]&F:this.firstCharOffset,r(this.source.charCodeAt(o))){case 1:break t;case 2:n++;break t;default:this.isBlockOpenerTokenType(this.offsetAndType[n]>>O)&&(n=i)}}this.skip(n-this.tokenIndex)}forEachToken(t){for(let r=0,n=this.firstCharOffset;r<this.tokenCount;r++){let i=n,o=this.offsetAndType[r],c=o&F,l=o>>O;n=c,t(l,i,c,r)}}dump(){let t=new Array(this.tokenCount);return this.forEachToken((r,n,i,o)=>{t[o]={idx:o,type:it[r],chunk:this.source.substring(n,i),balance:this.balance[o]}}),t}};function jt(e,t){function r(h){return h<l?e.charCodeAt(h):0}function n(){if(s=_t(e,s),Nt(r(s),r(s+1),r(s+2))){a=12,s=dt(e,s);return}if(r(s)===37){a=11,s++;return}a=10}function i(){let h=s;if(s=dt(e,s),$(e,h,s,"url")&&r(s)===40){if(s=mt(e,s+1),r(s)===34||r(s)===39){a=2,s=h+4;return}c();return}if(r(s)===40){a=2,s++;return}a=1}function o(h){for(h||(h=r(s++)),a=5;s<e.length;s++){let p=e.charCodeAt(s);switch(Ot(p)){case h:s++;return;case pt:if(ft(p)){s+=Rt(e,s,p),a=6;return}break;case 92:if(s===e.length-1)break;let m=r(s+1);ft(m)?s+=Rt(e,s+1,m):A(p,m)&&(s=q(e,s)-1);break}}}function c(){for(a=7,s=mt(e,s);s<e.length;s++){let h=e.charCodeAt(s);switch(Ot(h)){case 41:s++;return;case pt:if(s=mt(e,s),r(s)===41||s>=e.length){s<e.length&&s++;return}s=Bt(e,s),a=8;return;case 34:case 39:case 40:case ie:s=Bt(e,s),a=8;return;case 92:if(A(h,r(s+1))){s=q(e,s)-1;break}s=Bt(e,s),a=8;return}}}e=String(e||"");let l=e.length,u=Pt(r(0)),s=u,a;for(;s<l;){let h=e.charCodeAt(s);switch(Ot(h)){case pt:a=13,s=mt(e,s+1);break;case 34:o();break;case 35:It(r(s+1))||A(r(s+1),r(s+2))?(a=4,s=dt(e,s+1)):(a=9,s++);break;case 39:o();break;case 40:a=21,s++;break;case 41:a=22,s++;break;case 43:Dt(h,r(s+1),r(s+2))?n():(a=9,s++);break;case 44:a=18,s++;break;case 45:Dt(h,r(s+1),r(s+2))?n():r(s+1)===45&&r(s+2)===62?(a=15,s=s+3):Nt(h,r(s+1),r(s+2))?i():(a=9,s++);break;case 46:Dt(h,r(s+1),r(s+2))?n():(a=9,s++);break;case 47:r(s+1)===42?(a=25,s=e.indexOf("*/",s+2),s=s===-1?e.length:s+2):(a=9,s++);break;case 58:a=16,s++;break;case 59:a=17,s++;break;case 60:r(s+1)===33&&r(s+2)===45&&r(s+3)===45?(a=14,s=s+4):(a=9,s++);break;case 64:Nt(r(s+1),r(s+2),r(s+3))?(a=3,s=dt(e,s+1)):(a=9,s++);break;case 91:a=19,s++;break;case 92:A(h,r(s+1))?i():(a=9,s++);break;case 93:a=20,s++;break;case 123:a=23,s++;break;case 125:a=24,s++;break;case ne:n();break;case Ft:i();break;default:a=9,s++}t(a,u,u=s)}}var lr=ii(ar(),1),cr=new Set(["Atrule","Selector","Declaration"]);function ur(e){let t=new lr.SourceMapGenerator,r={line:1,column:0},n={line:0,column:0},i={line:1,column:0},o={generated:i},c=1,l=0,u=!1,s=e.node;e.node=function(p){if(p.loc&&p.loc.start&&cr.has(p.type)){let m=p.loc.start.line,k=p.loc.start.column-1;(n.line!==m||n.column!==k)&&(n.line=m,n.column=k,r.line=c,r.column=l,u&&(u=!1,(r.line!==i.line||r.column!==i.column)&&t.addMapping(o)),u=!0,t.addMapping({source:p.loc.source,original:n,generated:r}))}s.call(this,p),u&&cr.has(p.type)&&(i.line=c,i.column=l)};let a=e.emit;e.emit=function(p,m,k){for(let w=0;w<p.length;w++)p.charCodeAt(w)===10?(c++,l=0):l++;a(p,m,k)};let h=e.result;return e.result=function(){return u&&t.addMapping(o),{css:h(),map:t}},e}var zt={};vt(zt,{safe:()=>Se,spec:()=>Oi});var Di=43,Pi=45,xe=(e,t)=>(e===9&&(e=t),typeof e=="string"&&(e=Math.min(e.charCodeAt(0),128)<<6),e<<1),hr=[[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],["/","*"]],Fi=hr.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 fr(e){let t=new Set(e.map(([r,n])=>xe(r)<<16|xe(n)));return function(r,n,i){let o=xe(n,i),c=i.charCodeAt(0),l=c===Pi&&n!==1&&n!==2&&n!==15||c===Di?t.has((r&65534)<<16|c<<7):t.has((r&65534)<<16|o);return o|l}}var Oi=fr(hr),Se=fr(Fi);var Ri=92;function _i(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 pr(e){let t=new Map;for(let[r,n]of Object.entries(e.node))typeof(n.generate||n)=="function"&&t.set(r,n.generate||n);return function(r,n){let i="",o=0,c={node(u){if(t.has(u.type))t.get(u.type).call(l,u);else throw new Error("Unknown node type: "+u.type)},tokenBefore:Se,token(u,s,a){o=this.tokenBefore(o,u,s),!a&&o&1&&this.emit(" ",13,!0),this.emit(s,u,!1),u===9&&s.charCodeAt(0)===Ri&&this.emit(`
|
|
`,13,!0)},emit(u){i+=u},result(){return i}};n&&(typeof n.decorator=="function"&&(c=n.decorator(c)),n.sourceMap&&(c=ur(c)),n.mode in zt&&(c.tokenBefore=zt[n.mode]));let l={node:u=>c.node(u),children:_i,token:(u,s)=>c.token(u,s),tokenize:u=>jt(u,(s,a,h)=>{c.token(s,u.slice(a,h),a!==0)})};return c.node(r),c.result()}}var Te={};vt(Te,{AnPlusB:()=>dr,Atrule:()=>kr,AtrulePrelude:()=>xr,AttributeSelector:()=>Cr,Block:()=>yr,Brackets:()=>br,CDC:()=>Tr,CDO:()=>Lr,ClassSelector:()=>vr,Combinator:()=>Ir,Comment:()=>Nr,Condition:()=>Dr,Declaration:()=>Pr,DeclarationList:()=>Fr,Dimension:()=>Or,Feature:()=>Rr,FeatureFunction:()=>_r,FeatureRange:()=>Br,Function:()=>Mr,GeneralEnclosed:()=>Ur,Hash:()=>Wr,IdSelector:()=>jr,Identifier:()=>Gr,Layer:()=>Yr,LayerList:()=>qr,MediaQuery:()=>Kr,MediaQueryList:()=>zr,NestingSelector:()=>$r,Nth:()=>Jr,Number:()=>Zr,Operator:()=>en,Parentheses:()=>rn,Percentage:()=>sn,PseudoClassSelector:()=>an,PseudoElementSelector:()=>ln,Ratio:()=>un,Raw:()=>fn,Rule:()=>pn,Scope:()=>mn,Selector:()=>kn,SelectorList:()=>Sn,String:()=>Ln,StyleSheet:()=>En,SupportsDeclaration:()=>vn,TypeSelector:()=>In,UnicodeRange:()=>Nn,Url:()=>Pn,Value:()=>Fn,WhiteSpace:()=>On});var V=43,N=45,Qt=110,J=!0,Bi=!1;function $t(e,t){let r=this.tokenStart+e,n=this.charCodeAt(r);for((n===V||n===N)&&(t&&this.error("Number sign is not allowed"),r++);r<this.tokenEnd;r++)E(this.charCodeAt(r))||this.error("Integer is expected",r)}function at(e){return $t.call(this,0,e)}function z(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let r="";switch(t){case Qt:r="N is expected";break;case N:r="HyphenMinus is expected";break}this.error(r,this.tokenStart+e)}}function ge(){let e=0,t=0,r=this.tokenType;for(;r===13||r===25;)r=this.lookupType(++e);if(r!==10)if(this.isDelim(V,e)||this.isDelim(N,e)){t=this.isDelim(V,e)?V:N;do r=this.lookupType(++e);while(r===13||r===25);r!==10&&(this.skip(e),at.call(this,J))}else return null;return e>0&&this.skip(e),t===0&&(r=this.charCodeAt(this.tokenStart),r!==V&&r!==N&&this.error("Number sign is expected")),at.call(this,t!==0),t===N?"-"+this.consume(10):this.consume(10)}function mr(){let e=this.tokenStart,t=null,r=null;if(this.tokenType===10)at.call(this,Bi),r=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,N))switch(t="-1",z.call(this,1,Qt),this.tokenEnd-this.tokenStart){case 2:this.next(),r=ge.call(this);break;case 3:z.call(this,2,N),this.next(),this.skipSC(),at.call(this,J),r="-"+this.consume(10);break;default:z.call(this,2,N),$t.call(this,3,J),this.next(),r=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(V)&&this.lookupType(1)===1){let n=0;switch(t="1",this.isDelim(V)&&(n=1,this.next()),z.call(this,0,Qt),this.tokenEnd-this.tokenStart){case 1:this.next(),r=ge.call(this);break;case 2:z.call(this,1,N),this.next(),this.skipSC(),at.call(this,J),r="-"+this.consume(10);break;default:z.call(this,1,N),$t.call(this,2,J),this.next(),r=this.substrToCursor(e+n+1)}}else if(this.tokenType===12){let n=this.charCodeAt(this.tokenStart),i=n===V||n===N,o=this.tokenStart+i;for(;o<this.tokenEnd&&E(this.charCodeAt(o));o++);o===this.tokenStart+i&&this.error("Integer is expected",this.tokenStart+i),z.call(this,o-this.tokenStart,Qt),t=this.substring(e,o),o+1===this.tokenEnd?(this.next(),r=ge.call(this)):(z.call(this,o-this.tokenStart+1,N),o+2===this.tokenEnd?(this.next(),this.skipSC(),at.call(this,J),r="-"+this.consume(10)):($t.call(this,o-this.tokenStart+2,J),this.next(),r=this.substrToCursor(o+1)))}else this.error();return t!==null&&t.charCodeAt(0)===V&&(t=t.substr(1)),r!==null&&r.charCodeAt(0)===V&&(r=r.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:r}}function dr(e){if(e.a){let t=e.a==="+1"&&"n"||e.a==="1"&&"n"||e.a==="-1"&&"-n"||e.a+"n";if(e.b){let r=e.b[0]==="-"||e.b[0]==="+"?e.b:"+"+e.b;this.tokenize(t+r)}else this.tokenize(t)}else this.tokenize(e.b)}function kr(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}function xr(e){this.children(e)}var Mi=36,Sr=42,Xt=61,Ui=94,Ce=124,Wi=126;function Vi(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(Sr)?(t=!0,this.next()):this.isDelim(Ce)||this.eat(1),this.isDelim(Ce)?this.charCodeAt(this.tokenStart+1)!==Xt?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Gi(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==Xt&&t!==Wi&&t!==Ui&&t!==Mi&&t!==Sr&&t!==Ce&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==Xt&&(this.isDelim(Xt)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}function gr(){let e=this.tokenStart,t,r=null,n=null,i=null;return this.eat(19),this.skipSC(),t=Vi.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(r=Gi.call(this),this.skipSC(),n=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(i=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:r,value:n,flags:i}}function Cr(e){this.token(9,"["),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,"]")}function yr(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}function br(e){this.token(9,"["),this.children(e),this.token(9,"]")}function Tr(){this.token(15,"-->")}function Lr(){this.token(14,"<!--")}var Hi=46;function Er(){return this.eatDelim(Hi),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function vr(e){this.token(9,"."),this.token(1,e.name)}var ji=43,wr=47,Yi=62,qi=126;function Ar(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case Yi:case ji:case qi:this.next();break;case wr:this.next(),this.eatIdent("deep"),this.eatDelim(wr);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e);break}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function Ir(e){this.tokenize(e.name)}function Nr(e){this.token(25,"/*"+e.value+"*/")}function Dr(e){e.children.forEach(t=>{t.type==="Condition"?(this.token(21,"("),this.node(t),this.token(22,")")):this.node(t)})}function Pr(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,e.important===!0?"important":e.important))}function Fr(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")})}function Or(e){this.token(12,e.value+e.unit)}function Rr(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}function _r(e){this.token(2,e.feature+"("),this.node(e.value),this.token(22,")")}function Br(e){this.token(21,"("),this.node(e.left),this.tokenize(e.leftComparison),this.node(e.middle),e.right&&(this.tokenize(e.rightComparison),this.node(e.right)),this.token(22,")")}function Mr(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}function Ur(e){e.function?this.token(2,e.function+"("):this.token(21,"("),this.children(e),this.token(22,")")}function Wr(e){this.token(4,"#"+e.value)}function Vr(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function Gr(e){this.token(1,e.name)}function Hr(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function jr(e){this.token(9,"#"+e.name)}function Yr(e){this.tokenize(e.name)}function qr(e){this.children(e,()=>this.token(18,","))}function Kr(e){e.mediaType?(e.modifier&&this.token(1,e.modifier),this.token(1,e.mediaType),e.condition&&(this.token(1,"and"),this.node(e.condition))):e.condition&&this.node(e.condition)}function zr(e){this.children(e,()=>this.token(18,","))}var Ki=38;function Qr(){let e=this.tokenStart;return this.eatDelim(Ki),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function $r(){this.token(9,"&")}function Xr(){this.skipSC();let e=this.tokenStart,t=e,r=null,n;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?n=this.Identifier():n=this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),r=this.SelectorList(),t=this.tokenStart),{type:"Nth",loc:this.getLocation(e,t),nth:n,selector:r}}function Jr(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector))}function Zr(e){this.token(10,e.value)}function tn(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function en(e){this.tokenize(e.value)}function rn(e){this.token(21,"("),this.children(e),this.token(22,")")}function nn(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function sn(e){this.token(11,e.value+"%")}function on(){let e=this.tokenStart,t=null,r,n;return this.eat(16),this.tokenType===2?(r=this.consumeFunctionName(),n=r.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),t=this.pseudo[n].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):r=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:r,children:t}}function an(e){this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}function cn(){let e=this.tokenStart,t=null,r,n;return this.eat(16),this.eat(16),this.tokenType===2?(r=this.consumeFunctionName(),n=r.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),t=this.pseudo[n].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):r=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:r,children:t}}function ln(e){this.token(16,":"),this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}function un(e){this.node(e.left),this.token(9,"/"),e.right?this.node(e.right):this.node(10,1)}function zi(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}function hn(e,t){let r=this.getTokenStart(this.tokenIndex),n;return this.skipUntilBalanced(this.tokenIndex,e||this.consumeUntilBalanceEnd),t&&this.tokenStart>r?n=zi.call(this):n=this.tokenStart,{type:"Raw",loc:this.getLocation(r,n),value:this.substring(r,n)}}function fn(e){this.tokenize(e.value)}function pn(e){this.node(e.prelude),this.node(e.block)}function mn(e){e.root&&(this.token(21,"("),this.node(e.root),this.token(22,")")),e.limit&&(this.token(1,"to"),this.token(21,"("),this.node(e.limit),this.token(22,")"))}function dn(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function kn(e){this.children(e)}function xn(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function Sn(e){this.children(e,()=>this.token(18,","))}var ye=92,gn=34,Cn=39;function yn(e){let t=e.length,r=e.charCodeAt(0),n=r===gn||r===Cn?1:0,i=n===1&&t>1&&e.charCodeAt(t-1)===r?t-2:t-1,o="";for(let c=n;c<=i;c++){let l=e.charCodeAt(c);if(l===ye){if(c===i){c!==t-1&&(o=e.substr(c+1));break}if(l=e.charCodeAt(++c),A(ye,l)){let u=c-1,s=q(e,u);c=s-1,o+=ae(e.substring(u+1,s))}else l===13&&e.charCodeAt(c+1)===10&&c++}else o+=e[c]}return o}function bn(e,t){let r=t?"'":'"',n=t?Cn:gn,i="",o=!1;for(let c=0;c<e.length;c++){let l=e.charCodeAt(c);if(l===0){i+="\uFFFD";continue}if(l<=31||l===127){i+="\\"+l.toString(16),o=!0;continue}l===n||l===ye?(i+="\\"+e.charAt(c),o=!1):(o&&(j(l)||Y(l))&&(i+=" "),i+=e.charAt(c),o=!1)}return r+i+r}function Tn(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:yn(this.consume(5))}}function Ln(e){this.token(5,bn(e.value))}function En(e){this.children(e)}function vn(e){this.token(21,"("),this.node(e.declaration),this.token(22,")")}var Qi=42,wn=124;function be(){this.tokenType!==1&&this.isDelim(Qi)===!1&&this.error("Identifier or asterisk is expected"),this.next()}function An(){let e=this.tokenStart;return this.isDelim(wn)?(this.next(),be.call(this)):(be.call(this),this.isDelim(wn)&&(this.next(),be.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function In(e){this.tokenize(e.name)}function Nn(e){this.tokenize(e.value)}var $i=32,Xi=92,Ji=34,Zi=39,ts=40,es=41;function Dn(e){let t="",r=!1;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);if(i===0){t+="\uFFFD";continue}if(i<=31||i===127){t+="\\"+i.toString(16),r=!0;continue}i===$i||i===Xi||i===Ji||i===Zi||i===ts||i===es?(t+="\\"+e.charAt(n),r=!1):(r&&j(i)&&(t+=" "),t+=e.charAt(n),r=!1)}return"url("+t+")"}function Pn(e){this.token(7,Dn(e.value))}function Fn(e){this.children(e)}var ia=Object.freeze({type:"WhiteSpace",loc:null,value:" "});function On(e){this.token(13,e.value)}var Rn={node:Te};var _n=pr(Rn);var ct=null,yt=class e{static createItem(t){return{prev:null,next:null,data:t}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(t){return e.createItem(t)}allocateCursor(t,r){let n;return ct!==null?(n=ct,ct=ct.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=ct,ct=t}updateCursors(t,r,n,i){let{cursor:o}=this;for(;o!==null;)o.prev===t&&(o.prev=r),o.next===n&&(o.next=i),o=o.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 i=e.createItem(n);r!==null?r.next=i:this.head=i,i.prev=r,r=i}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 i=n.next;n.next=i.next,t.call(r,i.data,i,this)}this.releaseCursor()}forEachRight(t,r=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let i=n.prev;n.prev=i.prev,t.call(r,i.data,i,this)}this.releaseCursor()}reduce(t,r,n=this){let i=this.allocateCursor(null,this.head),o=r,c;for(;i.next!==null;)c=i.next,i.next=c.next,o=t.call(n,o,c.data,c,this);return this.releaseCursor(),o}reduceRight(t,r,n=this){let i=this.allocateCursor(this.tail,null),o=r,c;for(;i.prev!==null;)c=i.prev,i.prev=c.prev,o=t.call(n,o,c.data,c,this);return this.releaseCursor(),o}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 e;for(let i=this.head;i!==null;i=i.next)n.appendData(t.call(r,i.data,i,this));return n}filter(t,r=this){let n=new e;for(let i=this.head;i!==null;i=i.next)t.call(r,i.data,i,this)&&n.appendData(i.data);return n}nextUntil(t,r,n=this){if(t===null)return;let i=this.allocateCursor(null,t);for(;i.next!==null;){let o=i.next;if(i.next=o.next,r.call(n,o.data,o,this))break}this.releaseCursor()}prevUntil(t,r,n=this){if(t===null)return;let i=this.allocateCursor(t,null);for(;i.prev!==null;){let o=i.prev;if(i.prev=o.prev,r.call(n,o.data,o,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let t=new e;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(e.createItem(t))}append(t){return this.insert(t)}appendData(t){return this.insert(e.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(e.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(e.createItem(t))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(t){this.prepend(e.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 Bn(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 Le=100,Mn=60,Un=" ";function Wn({source:e,line:t,column:r,baseLine:n,baseColumn:i},o){function c(k,w){return s.slice(k,w).map((ee,ut)=>String(k+ut+1).padStart(p)+" |"+ee).join(`
|
|
`)}let l=`
|
|
`.repeat(Math.max(n-1,0)),u=" ".repeat(Math.max(i-1,0)),s=(l+u+e).split(/\r\n?|\n|\f/),a=Math.max(1,t-o)-1,h=Math.min(t+o,s.length+1),p=Math.max(4,String(h).length)+1,m=0;r+=(Un.length-1)*(s[t-1].substr(0,r-1).match(/\t/g)||[]).length,r>Le&&(m=r-Mn+3,r=Mn-2);for(let k=a;k<=h;k++)k>=0&&k<s.length&&(s[k]=s[k].replace(/\t/g,Un),s[k]=(m>0&&s[k].length>m?"\u2026":"")+s[k].substr(m,Le-2)+(s[k].length>m+Le-1?"\u2026":""));return[c(a,t),new Array(r+p+2).join("-")+"^",c(t,h)].filter(Boolean).join(`
|
|
`).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function Ee(e,t,r,n,i,o=1,c=1){return Object.assign(Bn("SyntaxError",e),{source:t,offset:r,line:n,column:i,sourceFragment(u){return Wn({source:t,line:n,column:i,baseLine:o,baseColumn:c},isNaN(u)?0:u)},get formattedMessage(){return`Parse error: ${e}
|
|
`+Wn({source:t,line:n,column:i,baseLine:o,baseColumn:c},2)}})}function Vn(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 i=e.getNode.call(this,n);if(i===void 0)break;r&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,i,t,n),r=!1),t.push(i)}return r&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}var lt=()=>{},ns=33,is=35,ve=59,Gn=123,Hn=0,ss={createList(){return[]},createSingleNodeList(e){return[e]},getFirstListNode(e){return e&&e[0]||null},getLastListNode(e){return e&&e.length>0?e[e.length-1]:null}},os={createList(){return new yt},createSingleNodeList(e){return new yt().appendData(e)},getFirstListNode(e){return e&&e.first},getLastListNode(e){return e&&e.last}};function as(e){return function(){return this[e]()}}function we(e){let t=Object.create(null);for(let r of Object.keys(e)){let n=e[r],i=n.parse||n;i&&(t[r]=i)}return t}function cs(e){let t={context:Object.create(null),features:Object.assign(Object.create(null),e.features),scope:Object.assign(Object.create(null),e.scope),atrule:we(e.atrule),pseudo:we(e.pseudo),node:we(e.node)};for(let[r,n]of Object.entries(e.parseContext))switch(typeof n){case"function":t.context[r]=n;break;case"string":t.context[r]=as(n);break}return{config:t,...t,...t.node}}function jn(e){let t="",r="<unknown>",n=!1,i=lt,o=!1,c=new Mt,l=Object.assign(new Wt,cs(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Vn,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(a){return a===Gn?1:0},consumeUntilLeftCurlyBracketOrSemicolon(a){return a===Gn||a===ve?1:0},consumeUntilExclamationMarkOrSemicolon(a){return a===ns||a===ve?1:0},consumeUntilSemicolonIncluded(a){return a===ve?2:0},createList:lt,createSingleNodeList:lt,getFirstListNode:lt,getLastListNode:lt,parseWithFallback(a,h){let p=this.tokenIndex;try{return a.call(this)}catch(m){if(o)throw m;this.skip(p-this.tokenIndex);let k=h.call(this);return o=!0,i(m,k),o=!1,k}},lookupNonWSType(a){let h;do if(h=this.lookupType(a++),h!==13&&h!==25)return h;while(h!==Hn);return Hn},charCodeAt(a){return a>=0&&a<t.length?t.charCodeAt(a):0},substring(a,h){return t.substring(a,h)},substrToCursor(a){return this.source.substring(a,this.tokenStart)},cmpChar(a,h){return oe(t,a,h)},cmpStr(a,h,p){return $(t,a,h,p)},consume(a){let h=this.tokenStart;return this.eat(a),this.substrToCursor(h)},consumeFunctionName(){let a=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),a},consumeNumber(a){let h=t.substring(this.tokenStart,_t(t,this.tokenStart));return this.eat(a),h},eat(a){if(this.tokenType!==a){let h=it[a].slice(0,-6).replace(/-/g," ").replace(/^./,k=>k.toUpperCase()),p=`${/[[\](){}]/.test(h)?`"${h}"`:h} is expected`,m=this.tokenStart;switch(a){case 1:this.tokenType===2||this.tokenType===7?(m=this.tokenEnd-1,p="Identifier is expected but function found"):p="Identifier is expected";break;case 4:this.isDelim(is)&&(this.next(),m++,p="Name is expected");break;case 11:this.tokenType===10&&(m=this.tokenEnd,p="Percent sign is expected");break}this.error(p,m)}this.next()},eatIdent(a){(this.tokenType!==1||this.lookupValue(0,a)===!1)&&this.error(`Identifier "${a}" is expected`),this.next()},eatDelim(a){this.isDelim(a)||this.error(`Delim "${String.fromCharCode(a)}" is expected`),this.next()},getLocation(a,h){return n?c.getLocationRange(a,h,r):null},getLocationFromList(a){if(n){let h=this.getFirstListNode(a),p=this.getLastListNode(a);return c.getLocationRange(h!==null?h.loc.start.offset-c.startOffset:this.tokenStart,p!==null?p.loc.end.offset-c.startOffset:this.tokenStart,r)}return null},error(a,h){let p=typeof h<"u"&&h<t.length?c.getLocation(h):this.eof?c.getLocation(Me(t,t.length-1)):c.getLocation(this.tokenStart);throw new Ee(a||"Unexpected input",t,p.offset,p.line,p.column,c.startLine,c.startColumn)}}),u=()=>({filename:r,source:t,tokenCount:l.tokenCount,getTokenType:a=>l.getTokenType(a),getTokenTypeName:a=>it[l.getTokenType(a)],getTokenStart:a=>l.getTokenStart(a),getTokenEnd:a=>l.getTokenEnd(a),getTokenValue:a=>l.source.substring(l.getTokenStart(a),l.getTokenEnd(a)),substring:(a,h)=>l.source.substring(a,h),balance:l.balance.subarray(0,l.tokenCount+1),isBlockOpenerTokenType:l.isBlockOpenerTokenType,isBlockCloserTokenType:l.isBlockCloserTokenType,getBlockTokenPairIndex:a=>l.getBlockTokenPairIndex(a),getLocation:a=>c.getLocation(a,r),getRangeLocation:(a,h)=>c.getLocationRange(a,h,r)});return Object.assign(function(a,h){t=a,h=h||{},l.setSource(t,jt),c.setSource(t,h.offset,h.line,h.column),r=h.filename||"<unknown>",n=!!h.positions,i=typeof h.onParseError=="function"?h.onParseError:lt,o=!1,l.parseAtrulePrelude="parseAtrulePrelude"in h?!!h.parseAtrulePrelude:!0,l.parseRulePrelude="parseRulePrelude"in h?!!h.parseRulePrelude:!0,l.parseValue="parseValue"in h?!!h.parseValue:!0,l.parseCustomProperty="parseCustomProperty"in h?!!h.parseCustomProperty:!1;let{context:p="default",list:m=!0,onComment:k,onToken:w}=h;if(!(p in l.context))throw new Error("Unknown context `"+p+"`");Object.assign(l,m?os:ss),Array.isArray(w)?l.forEachToken((ut,ht,Q)=>{w.push({type:ut,start:ht,end:Q})}):typeof w=="function"&&l.forEachToken(w.bind(u())),typeof k=="function"&&l.forEachToken((ut,ht,Q)=>{if(ut===25){let Xn=l.getLocation(ht,Q),Jn=$(t,Q-2,Q,"*/")?t.slice(ht+2,Q-2):t.slice(ht+2,Q);k(Jn,Xn)}});let ee=l.context[p].call(l,h);return l.eof||l.error(),ee},{SyntaxError:Ee,config:l.config})}var ls=35,us=38,hs=42,fs=43,ps=47,Yn=46,ms=62,ds=124,ks=126;function xs(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "})}function Ss(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===Yn&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case fs:case ms:case ks:case ps:return this.Combinator();case Yn:return this.ClassSelector();case hs:case ds:return this.TypeSelector();case ls:return this.IdSelector();case us:return this.NestingSelector()}break}}}var Ae={onWhiteSpace:xs,getNode:Ss};function qn(){let e=this.createList();this.skipSC();t:for(;!this.eof;){switch(this.tokenType){case 1:e.push(this.Identifier());break;case 5:e.push(this.String());break;case 18:e.push(this.Operator());break;case 22:break t;default:this.error("Identifier, string or comma is expected")}this.skipSC()}return e}var Z={parse(){return this.createSingleNodeList(this.SelectorList())}},Ie={parse(){return this.createSingleNodeList(this.Selector())}},gs={parse(){return this.createSingleNodeList(this.Identifier())}},Cs={parse:qn},Jt={parse(){return this.createSingleNodeList(this.Nth())}},Kn={dir:gs,has:Z,lang:Cs,matches:Z,is:Z,"-moz-any":Z,"-webkit-any":Z,where:Z,not:Z,"nth-child":Jt,"nth-last-child":Jt,"nth-last-of-type":Jt,"nth-of-type":Jt,slotted:Ie,host:Ie,"host-context":Ie};var Ne={};vt(Ne,{AnPlusB:()=>mr,AttributeSelector:()=>gr,ClassSelector:()=>Er,Combinator:()=>Ar,IdSelector:()=>Hr,Identifier:()=>Vr,NestingSelector:()=>Qr,Nth:()=>Xr,Operator:()=>tn,Percentage:()=>nn,PseudoClassSelector:()=>on,PseudoElementSelector:()=>cn,Raw:()=>hn,Selector:()=>dn,SelectorList:()=>xn,String:()=>Tn,TypeSelector:()=>An});var zn={parseContext:{default:"SelectorList",selectorList:"SelectorList",selector:"Selector"},scope:{Selector:Ae},atrule:{},pseudo:Kn,node:Ne};var De=jn(zn);var tt=(e,t)=>e.a===t.a?e.b===t.b?e.c-t.c:e.b-t.b:e.a-t.a,Pe=(e,t)=>tt(e,t)===0,Fe=(e,t)=>tt(e,t)>0,Oe=(e,t)=>tt(e,t)<0;var Qn=(e,t="ASC")=>{let r=e.sort(tt);return t==="DESC"?r.reverse():r},Zt=(...e)=>Qn(e,"ASC"),te=(...e)=>Qn(e,"DESC");var bt=(...e)=>te(...e)[0],$n=(...e)=>Zt(...e)[0];var Tt=e=>{if(!e||e.type!=="Selector")throw new TypeError("Passed in source is not a Selector AST");let t=0,r=0,n=0;return e.children.forEach(i=>{switch(i.type){case"IdSelector":t+=1;break;case"AttributeSelector":case"ClassSelector":r+=1;break;case"PseudoClassSelector":switch(i.name.toLowerCase()){case"where":break;case"-webkit-any":case"any":i.children?.first&&(r+=1);break;case"-moz-any":case"is":case"matches":case"not":case"has":if(i.children?.first){let c=bt(...et(i.children.first));t+=c.a,r+=c.b,n+=c.c}break;case"nth-child":case"nth-last-child":if(r+=1,i.children?.first?.selector){let c=bt(...et(i.children.first.selector));t+=c.a,r+=c.b,n+=c.c}break;case"host-context":case"host":if(r+=1,i.children?.first?.children){let c={type:"Selector",children:[]},l=!1;i.children.first.children.forEach(s=>{if(l)return!1;if(s.type==="Combinator")return l=!0,!1;c.children.push(s)});let u=et(c)[0];t+=u.a,r+=u.b,n+=u.c}break;case"after":case"before":case"first-letter":case"first-line":n+=1;break;default:r+=1;break}break;case"PseudoElementSelector":switch(i.name){case"slotted":if(n+=1,i.children?.first?.children){let c={type:"Selector",children:[]},l=!1;i.children.first.children.forEach(s=>{if(l)return!1;if(s.type==="Combinator")return l=!0,!1;c.children.push(s)});let u=et(c)[0];t+=u.a,r+=u.b,n+=u.c}break;case"view-transition-group":case"view-transition-image-pair":case"view-transition-old":case"view-transition-new":if(i.children?.first?.value==="*")break;n+=1;break;case"highlight":if(i.children?.size>0){if(i.children.first?.value==="*")break;n+=1}break;default:n+=1;break}break;case"TypeSelector":let o=i.name;o.includes("|")&&(o=o.split("|")[1]),o!=="*"&&(n+=1);break;default:break}}),new Re({a:t,b:r,c:n},e)},ys=e=>{if(typeof e=="string"||e instanceof String)try{return De(e,{context:"selectorList"})}catch(t){throw new TypeError(`Could not convert passed in source '${e}' to SelectorList: ${t.message}`)}if(e instanceof Object){if(e.type&&["Selector","SelectorList"].includes(e.type))return e;if(e.type&&e.type==="Raw")try{return De(e.value,{context:"selectorList"})}catch(t){throw new TypeError(`Could not convert passed in source to SelectorList: ${t.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.")},et=e=>{if(!e)return[];let t=ys(e);if(t.type==="Selector")return[Tt(e)];if(t.type==="SelectorList"){let r=[];return t.children.forEach(n=>{let i=Tt(n);r.push(i)}),r}};var Lt=class extends Error{constructor(){super("Manipulating a Specificity instance is not allowed. Instead, create a new Specificity()")}},_e=class{constructor(t,r=null){this.value=t,this.selector=r}get a(){return this.value.a}set a(t){throw new Lt}get b(){return this.value.b}set b(t){throw new Lt}get c(){return this.value.c}set c(t){throw new Lt}selectorString(){return typeof this.selector=="string"||this.selector instanceof String?this.selector:this.selector instanceof Object&&this.selector.type==="Selector"?_n(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(t){return Pe(this,t)}isGreaterThan(t){return Fe(this,t)}isLessThan(t){return Oe(this,t)}static calculate(t){return et(t)}static calculateForAST(t){return Tt(t)}static compare(t,r){return tt(t,r)}static equals(t,r){return Pe(t,r)}static lessThan(t,r){return Oe(t,r)}static greaterThan(t,r){return Fe(t,r)}static min(...t){return $n(...t)}static max(...t){return bt(...t)}static sortAsc(...t){return Zt(...t)}static sortDesc(...t){return te(...t)}},Re=_e;
|
|
//# sourceMappingURL=index.cjs.map
|