You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
194 KiB

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.gen
`)}})}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("Unkno
`,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 Err
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){retur
`+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(;n=Au(e);)n.type!=="Spaces"&&(n.type==="Combinator"?((o===null||o.type==="Combinator")&&(e.pos=i,e.error("Unexpected combinator")),r[n.value]=!0):o!==null&&o.type!=="Combinator"&&(r[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(n),o=n,i=e.pos);return o!==null&&o.type==="Combinator"&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:t,combinator:Su(t,r)||" ",disallowEmpty:!1,explicit:!1}}function Cu(e){let t;return e.eat(cr),t=Ka(e),e.eat(nn),t.explicit=!0,e.charCode()===Wa&&(e.pos++,t.disallowEmpty=!0),t}function Au(e){let t=e
`})),n.insert(w.createItem(l.comment)),s.isEmpty||n.insert(w.createItem({type:"Raw",value:`
`}))),i&&!s.isEmpty){let u=s.last;(u.type!=="Atrule"||u.name!=="import"&&u.name!=="charset")&&(i=!1)}o!=="exclamation"&&(o=!1),n.appendList(s)}while(!a.isEmpty);return{ast:e}}function Dl(e){let t=nt.encode(e,!0),r=nt.encode(e);return t.length<r.length?t:r}var{lexer:nd,tokenize:od,parse:id,generate:ad,walk:sd,find:ld,findLast:cd,findAll:ud,fromPlainObject:pd,toPlainObject:hd}=el({node:{String:{generate(e){this.token(Ee.String,Dl(e.value))}},Url:{generate(e){let t=Pt.encode(e.value),r=Dl(e.value);this.token(Ee.Url,t.length<=r.length+5?t:"url("+r+")")}}}});var Nl={};y(Nl,{addSelectors:()=>Oe,compareDeclarations:()=>Ai,hasSimilarSelectors:()=>wr,isEqualDeclarations:()=>zt,isEqualSelectors:()=>Rt,processSelector:()=>Mt,unsafeToSkipNode:()=>De});var{parse:fd,generate:Bi,compress:md}=Fi;function at(e,t,r,n){return t.debug&&console.error(`## ${e} done in %d ms
`,Date.now()-r),n}function dd(e){let t;return function(n,o){let i=n;if(o&&(i=`[${((Date.now()-t)/1e3).toFixed(3)}s] ${i}`),e>1&&o){let a=Bi(o);e===2&&a.length>256&&(a=a.substr(0,256)+"..."),i+=`
${a}
`}console.error(i),t=Date.now()}}function gd(e){return e={...e},typeof e.logger!="function"&&e.debug&&(e.logger=dd(e.debug)),e}function Ml(e,t,r){Array.isArray(r)||(r=[r]),r.forEach(n=>n(e,t))}function Rl(e,t,r){r=r||{};let n=r.filename||"<unknown>",o,i=at("parsing",r,Date.now(),fd(t,{context:e,filename:n,positions:Boolean(r.sourceMap)}));r.beforeCompress&&at("beforeCompress",r,Date.now(),Ml(i,r,r.beforeCompress));let a=at("compress",r,Date.now(),md(i,gd(r)));return r.afterCompress&&at("afterCompress",r,Date.now(),Ml(a,r,r.afterCompress)),r.sourceMap?o=at("generate(sourceMap: true)",r,Date.now(),(()=>{let l=Bi(a.ast,{sourceMap:!0});return l.map._file=n,l.map.setSourceContent(n,t),l})()):o=at("generate",r,Date.now(),{css:Bi(a.ast),map:null}),o}function X0(e,t){return Rl("stylesheet",e,t)}function Z0(e,t){return Rl("declarationList",e,t)}export{X0 as minify,Z0 as minifyBlock,Fi as syntax,Nl as utils,Hl as version};