UNPKG

hallmark

Version:

Markdown Style Guide, with linter and automatic fixer

2 lines 1.22 MB
#!/usr/bin/env node import t,{realpathSync as e,statSync as i,Stats as r,promises as n,constants as s}from"node:fs";import o from"path";import a from"fs";import u from"events";import l from"assert";import c from"util";import h from"os";import p,{pathToFileURL as f,fileURLToPath as d,URL as g}from"url";import m from"node:process";import y from"node:os";import b from"node:tty";import w from"tty";import v from"node:path";import D from"process";import E from"constants";import k from"stream";import x,{execFileSync as A}from"child_process";import F from"buffer";import{format as C,inspect as S,promisify as _}from"node:util";import{exec as j}from"node:child_process";import O,{URL as B,fileURLToPath as T,pathToFileURL as R}from"node:url";import $,{PassThrough as I}from"node:stream";import P from"fs/promises";import N from"node:fs/promises";import L,{EventEmitter as M}from"node:events";import z from"node:string_decoder";import U from"node:assert";import{builtinModules as q}from"node:module";import W from"node:v8";var G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function H(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function V(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var i=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}),i}function K(t){return"number"==typeof t||(!!/^0x[0-9a-f]+$/i.test(t)||/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t))}function Y(t,e){return"constructor"===e&&"function"==typeof t[e]||"__proto__"===e}var J=function(t,e){e||(e={});var i={bools:{},strings:{},unknownFn:null};"function"==typeof e.unknown&&(i.unknownFn=e.unknown),"boolean"==typeof e.boolean&&e.boolean?i.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(t){i.bools[t]=!0});var r={};function n(t){return r[t].some(function(t){return i.bools[t]})}Object.keys(e.alias||{}).forEach(function(t){r[t]=[].concat(e.alias[t]),r[t].forEach(function(e){r[e]=[t].concat(r[t].filter(function(t){return e!==t}))})}),[].concat(e.string).filter(Boolean).forEach(function(t){i.strings[t]=!0,r[t]&&[].concat(r[t]).forEach(function(t){i.strings[t]=!0})});var s=e.default||{},o={_:[]};function a(t,e,r){for(var n=t,s=0;s<e.length-1;s++){var o=e[s];if(Y(n,o))return;void 0===n[o]&&(n[o]={}),n[o]!==Object.prototype&&n[o]!==Number.prototype&&n[o]!==String.prototype||(n[o]={}),n[o]===Array.prototype&&(n[o]=[]),n=n[o]}var a=e[e.length-1];Y(n,a)||(n!==Object.prototype&&n!==Number.prototype&&n!==String.prototype||(n={}),n===Array.prototype&&(n=[]),void 0===n[a]||i.bools[a]||"boolean"==typeof n[a]?n[a]=r:Array.isArray(n[a])?n[a].push(r):n[a]=[n[a],r])}function u(t,e,n){if(!n||!i.unknownFn||function(t,e){return i.allBools&&/^--[^=]+$/.test(e)||i.strings[t]||i.bools[t]||r[t]}(t,n)||!1!==i.unknownFn(n)){var s=!i.strings[t]&&K(e)?Number(e):e;a(o,t.split("."),s),(r[t]||[]).forEach(function(t){a(o,t.split("."),s)})}}Object.keys(i.bools).forEach(function(t){u(t,void 0!==s[t]&&s[t])});var l=[];-1!==t.indexOf("--")&&(l=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var c=0;c<t.length;c++){var h,p,f=t[c];if(/^--.+=/.test(f)){var d=f.match(/^--([^=]+)=([\s\S]*)$/);h=d[1];var g=d[2];i.bools[h]&&(g="false"!==g),u(h,g,f)}else if(/^--no-.+/.test(f))u(h=f.match(/^--no-(.+)/)[1],!1,f);else if(/^--.+/.test(f))h=f.match(/^--(.+)/)[1],void 0===(p=t[c+1])||/^(-|--)[^-]/.test(p)||i.bools[h]||i.allBools||r[h]&&n(h)?/^(true|false)$/.test(p)?(u(h,"true"===p,f),c+=1):u(h,!i.strings[h]||"",f):(u(h,p,f),c+=1);else if(/^-[^-]+/.test(f)){for(var m=f.slice(1,-1).split(""),y=!1,b=0;b<m.length;b++)if("-"!==(p=f.slice(b+2))){if(/[A-Za-z]/.test(m[b])&&"="===p[0]){u(m[b],p.slice(1),f),y=!0;break}if(/[A-Za-z]/.test(m[b])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(p)){u(m[b],p,f),y=!0;break}if(m[b+1]&&m[b+1].match(/\W/)){u(m[b],f.slice(b+2),f),y=!0;break}u(m[b],!i.strings[m[b]]||"",f)}else u(m[b],p,f);h=f.slice(-1)[0],y||"-"===h||(!t[c+1]||/^(-|--)[^-]/.test(t[c+1])||i.bools[h]||r[h]&&n(h)?t[c+1]&&/^(true|false)$/.test(t[c+1])?(u(h,"true"===t[c+1],f),c+=1):u(h,!i.strings[h]||"",f):(u(h,t[c+1],f),c+=1))}else if(i.unknownFn&&!1===i.unknownFn(f)||o._.push(i.strings._||!K(f)?f:Number(f)),e.stopEarly){o._.push.apply(o._,t.slice(c+1));break}}return Object.keys(s).forEach(function(t){(function(t,e){var i=t;return e.slice(0,-1).forEach(function(t){i=i[t]||{}}),e[e.length-1]in i})(o,t.split("."))||(a(o,t.split("."),s[t]),(r[t]||[]).forEach(function(e){a(o,e.split("."),s[t])}))}),e["--"]?o["--"]=l.slice():l.forEach(function(t){o._.push(t)}),o},Z=function t(e,i){for(var r,n=0,s=[],o=0;o<e.length;o++)if("string"==typeof e[o]&&/^\[/.test(e[o])&&0===n++&&(r=o),"string"==typeof e[o]&&/\]$/.test(e[o])){if(--n>0)continue;var a=e.slice(r,o+1);"string"==typeof a[0]&&(a[0]=a[0].replace(/^\[/,"")),""===a[0]&&a.shift();var u=a.length-1;"string"==typeof a[u]&&(a[u]=a[u].replace(/\]$/,"")),""===a[u]&&a.pop(),s.push(t(a))}else 0===n&&s.push(e[o]);return J(s,i)},Q=H(Z),X={exports:{}};!function(t){var e=o,i=a;function r(t){return i.existsSync(e.join(t,"package.json"))}t.exports=function i(n,s){if(s=s||r,"string"==typeof(n=n||t.parent.filename)&&(n[n.length-1]!==e.sep&&(n+=e.sep),n=n.split(e.sep)),!n.length)throw new Error("package.json not found in path");n.pop();var o=n.join(e.sep);try{if(s(o))return o}catch(t){}return i(n,s)}}(X);var tt=X.exports,et={},it=o,rt="win32"===process.platform,nt=a,st=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function ot(t){return"function"==typeof t?t:function(){var t;if(st){var e=new Error;t=function(t){t&&(e.message=t.message,i(t=e))}}else t=i;return t;function i(t){if(t){if(process.throwDeprecation)throw t;if(!process.noDeprecation){var e="fs: missing callback "+(t.stack||t.message);process.traceDeprecation?console.trace(e):console.error(e)}}}}()}if(it.normalize,rt)var at=/(.*?)(?:[\/\\]+|$)/g;else at=/(.*?)(?:[\/]+|$)/g;if(rt)var ut=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else ut=/^[\/]*/;et.realpathSync=function(t,e){if(t=it.resolve(t),e&&Object.prototype.hasOwnProperty.call(e,t))return e[t];var i,r,n,s,o=t,a={},u={};function l(){var e=ut.exec(t);i=e[0].length,r=e[0],n=e[0],s="",rt&&!u[n]&&(nt.lstatSync(n),u[n]=!0)}for(l();i<t.length;){at.lastIndex=i;var c=at.exec(t);if(s=r,r+=c[0],n=s+c[1],i=at.lastIndex,!(u[n]||e&&e[n]===n)){var h;if(e&&Object.prototype.hasOwnProperty.call(e,n))h=e[n];else{var p=nt.lstatSync(n);if(!p.isSymbolicLink()){u[n]=!0,e&&(e[n]=n);continue}var f=null;if(!rt){var d=p.dev.toString(32)+":"+p.ino.toString(32);a.hasOwnProperty(d)&&(f=a[d])}null===f&&(nt.statSync(n),f=nt.readlinkSync(n)),h=it.resolve(s,f),e&&(e[n]=h),rt||(a[d]=f)}t=it.resolve(h,t.slice(i)),l()}}return e&&(e[o]=t),t},et.realpath=function(t,e,i){if("function"!=typeof i&&(i=ot(e),e=null),t=it.resolve(t),e&&Object.prototype.hasOwnProperty.call(e,t))return process.nextTick(i.bind(null,null,e[t]));var r,n,s,o,a=t,u={},l={};function c(){var e=ut.exec(t);r=e[0].length,n=e[0],s=e[0],o="",rt&&!l[s]?nt.lstat(s,function(t){if(t)return i(t);l[s]=!0,h()}):process.nextTick(h)}function h(){if(r>=t.length)return e&&(e[a]=t),i(null,t);at.lastIndex=r;var u=at.exec(t);return o=n,n+=u[0],s=o+u[1],r=at.lastIndex,l[s]||e&&e[s]===s?process.nextTick(h):e&&Object.prototype.hasOwnProperty.call(e,s)?d(e[s]):nt.lstat(s,p)}function p(t,r){if(t)return i(t);if(!r.isSymbolicLink())return l[s]=!0,e&&(e[s]=s),process.nextTick(h);if(!rt){var n=r.dev.toString(32)+":"+r.ino.toString(32);if(u.hasOwnProperty(n))return f(null,u[n],s)}nt.stat(s,function(t){if(t)return i(t);nt.readlink(s,function(t,e){rt||(u[n]=e),f(t,e)})})}function f(t,r,n){if(t)return i(t);var s=it.resolve(o,r);e&&(e[n]=s),d(s)}function d(e){t=it.resolve(e,t.slice(r)),c()}c()};var lt=yt;yt.realpath=yt,yt.sync=bt,yt.realpathSync=bt,yt.monkeypatch=function(){ct.realpath=yt,ct.realpathSync=bt},yt.unmonkeypatch=function(){ct.realpath=ht,ct.realpathSync=pt};var ct=a,ht=ct.realpath,pt=ct.realpathSync,ft=process.version,dt=/^v[0-5]\./.test(ft),gt=et;function mt(t){return t&&"realpath"===t.syscall&&("ELOOP"===t.code||"ENOMEM"===t.code||"ENAMETOOLONG"===t.code)}function yt(t,e,i){if(dt)return ht(t,e,i);"function"==typeof e&&(i=e,e=null),ht(t,e,function(r,n){mt(r)?gt.realpath(t,e,i):i(r,n)})}function bt(t,e){if(dt)return pt(t,e);try{return pt(t,e)}catch(i){if(mt(i))return gt.realpathSync(t,e);throw i}}var wt=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},vt=Dt;function Dt(t,e,i){t instanceof RegExp&&(t=Et(t,i)),e instanceof RegExp&&(e=Et(e,i));var r=kt(t,e,i);return r&&{start:r[0],end:r[1],pre:i.slice(0,r[0]),body:i.slice(r[0]+t.length,r[1]),post:i.slice(r[1]+e.length)}}function Et(t,e){var i=e.match(t);return i?i[0]:null}function kt(t,e,i){var r,n,s,o,a,u=i.indexOf(t),l=i.indexOf(e,u+1),c=u;if(u>=0&&l>0){if(t===e)return[u,l];for(r=[],s=i.length;c>=0&&!a;)c==u?(r.push(c),u=i.indexOf(t,c+1)):1==r.length?a=[r.pop(),l]:((n=r.pop())<s&&(s=n,o=l),l=i.indexOf(e,c+1)),c=u<l&&u>=0?u:l;r.length&&(a=[s,o])}return a}Dt.range=kt;var xt=function(t,e){for(var i=[],r=0;r<t.length;r++){var n=e(t[r],r);wt(n)?i.push.apply(i,n):i.push(n)}return i},At=vt,Ft=function(t){if(!t)return[];"{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2));return Lt(function(t){return t.split("\\\\").join(Ct).split("\\{").join(St).split("\\}").join(_t).split("\\,").join(jt).split("\\.").join(Ot)}(t),!0).map(Tt)},Ct="\0SLASH"+Math.random()+"\0",St="\0OPEN"+Math.random()+"\0",_t="\0CLOSE"+Math.random()+"\0",jt="\0COMMA"+Math.random()+"\0",Ot="\0PERIOD"+Math.random()+"\0";function Bt(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function Tt(t){return t.split(Ct).join("\\").split(St).join("{").split(_t).join("}").split(jt).join(",").split(Ot).join(".")}function Rt(t){if(!t)return[""];var e=[],i=At("{","}",t);if(!i)return t.split(",");var r=i.pre,n=i.body,s=i.post,o=r.split(",");o[o.length-1]+="{"+n+"}";var a=Rt(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function $t(t){return"{"+t+"}"}function It(t){return/^-?0\d/.test(t)}function Pt(t,e){return t<=e}function Nt(t,e){return t>=e}function Lt(t,e){var i=[],r=At("{","}",t);if(!r||/\$$/.test(r.pre))return[t];var n,s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),a=s||o,u=r.body.indexOf(",")>=0;if(!a&&!u)return r.post.match(/,(?!,).*\}/)?Lt(t=r.pre+"{"+r.body+_t+r.post):[t];if(a)n=r.body.split(/\.\./);else if(1===(n=Rt(r.body)).length&&1===(n=Lt(n[0],!1).map($t)).length)return(h=r.post.length?Lt(r.post,!1):[""]).map(function(t){return r.pre+n[0]+t});var l,c=r.pre,h=r.post.length?Lt(r.post,!1):[""];if(a){var p=Bt(n[0]),f=Bt(n[1]),d=Math.max(n[0].length,n[1].length),g=3==n.length?Math.abs(Bt(n[2])):1,m=Pt;f<p&&(g*=-1,m=Nt);var y=n.some(It);l=[];for(var b=p;m(b,f);b+=g){var w;if(o)"\\"===(w=String.fromCharCode(b))&&(w="");else if(w=String(b),y){var v=d-w.length;if(v>0){var D=new Array(v+1).join("0");w=b<0?"-"+D+w.slice(1):D+w}}l.push(w)}}else l=xt(n,function(t){return Lt(t,!1)});for(var E=0;E<l.length;E++)for(var k=0;k<h.length;k++){var x=c+l[E]+h[k];(!e||a||x)&&i.push(x)}return i}var Mt=Jt;Jt.Minimatch=Zt;var zt=function(){try{return require("path")}catch(t){}}()||{sep:"/"};Jt.sep=zt.sep;var Ut=Jt.GLOBSTAR=Zt.GLOBSTAR={},qt=Ft,Wt={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Gt="[^/]",Ht=Gt+"*?",Vt="().*{}+?[]^$\\!".split("").reduce(function(t,e){return t[e]=!0,t},{});var Kt=/\/+/;function Yt(t,e){e=e||{};var i={};return Object.keys(t).forEach(function(e){i[e]=t[e]}),Object.keys(e).forEach(function(t){i[t]=e[t]}),i}function Jt(t,e,i){return Xt(e),i||(i={}),!(!i.nocomment&&"#"===e.charAt(0))&&new Zt(e,i).match(t)}function Zt(t,e){if(!(this instanceof Zt))return new Zt(t,e);Xt(t),e||(e={}),t=t.trim(),e.allowWindowsEscape||"/"===zt.sep||(t=t.split(zt.sep).join("/")),this.options=e,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}function Qt(t,e){return e||(e=this instanceof Zt?this.options:{}),t=void 0===t?this.pattern:t,Xt(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:qt(t)}Jt.filter=function(t,e){return e=e||{},function(i,r,n){return Jt(i,t,e)}},Jt.defaults=function(t){if(!t||"object"!=typeof t||!Object.keys(t).length)return Jt;var e=Jt,i=function(i,r,n){return e(i,r,Yt(t,n))};return i.Minimatch=function(i,r){return new e.Minimatch(i,Yt(t,r))},i.Minimatch.defaults=function(i){return e.defaults(Yt(t,i)).Minimatch},i.filter=function(i,r){return e.filter(i,Yt(t,r))},i.defaults=function(i){return e.defaults(Yt(t,i))},i.makeRe=function(i,r){return e.makeRe(i,Yt(t,r))},i.braceExpand=function(i,r){return e.braceExpand(i,Yt(t,r))},i.match=function(i,r,n){return e.match(i,r,Yt(t,n))},i},Zt.defaults=function(t){return Jt.defaults(t).Minimatch},Zt.prototype.debug=function(){},Zt.prototype.make=function(){var t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate();var i=this.globSet=this.braceExpand();e.debug&&(this.debug=function(){console.error.apply(console,arguments)});this.debug(this.pattern,i),i=this.globParts=i.map(function(t){return t.split(Kt)}),this.debug(this.pattern,i),i=i.map(function(t,e,i){return t.map(this.parse,this)},this),this.debug(this.pattern,i),i=i.filter(function(t){return-1===t.indexOf(!1)}),this.debug(this.pattern,i),this.set=i},Zt.prototype.parseNegate=function(){var t=this.pattern,e=!1,i=this.options,r=0;if(i.nonegate)return;for(var n=0,s=t.length;n<s&&"!"===t.charAt(n);n++)e=!e,r++;r&&(this.pattern=t.substr(r));this.negate=e},Jt.braceExpand=function(t,e){return Qt(t,e)},Zt.prototype.braceExpand=Qt;var Xt=function(t){if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};Zt.prototype.parse=function(t,e){Xt(t);var i=this.options;if("**"===t){if(!i.noglobstar)return Ut;t="*"}if(""===t)return"";var r,n="",s=!!i.nocase,o=!1,a=[],u=[],l=!1,c=-1,h=-1,p="."===t.charAt(0)?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",f=this;function d(){if(r){switch(r){case"*":n+=Ht,s=!0;break;case"?":n+=Gt,s=!0;break;default:n+="\\"+r}f.debug("clearStateChar %j %j",r,n),r=!1}}for(var g,m=0,y=t.length;m<y&&(g=t.charAt(m));m++)if(this.debug("%s\t%s %s %j",t,m,n,g),o&&Vt[g])n+="\\"+g,o=!1;else switch(g){case"/":return!1;case"\\":d(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",t,m,n,g),l){this.debug(" in class"),"!"===g&&m===h+1&&(g="^"),n+=g;continue}f.debug("call clearStateChar %j",r),d(),r=g,i.noext&&d();continue;case"(":if(l){n+="(";continue}if(!r){n+="\\(";continue}a.push({type:r,start:m-1,reStart:n.length,open:Wt[r].open,close:Wt[r].close}),n+="!"===r?"(?:(?!(?:":"(?:",this.debug("plType %j %j",r,n),r=!1;continue;case")":if(l||!a.length){n+="\\)";continue}d(),s=!0;var b=a.pop();n+=b.close,"!"===b.type&&u.push(b),b.reEnd=n.length;continue;case"|":if(l||!a.length||o){n+="\\|",o=!1;continue}d(),n+="|";continue;case"[":if(d(),l){n+="\\"+g;continue}l=!0,h=m,c=n.length,n+=g;continue;case"]":if(m===h+1||!l){n+="\\"+g,o=!1;continue}var w=t.substring(h+1,m);try{RegExp("["+w+"]")}catch(t){var v=this.parse(w,te);n=n.substr(0,c)+"\\["+v[0]+"\\]",s=s||v[1],l=!1;continue}s=!0,l=!1,n+=g;continue;default:d(),o?o=!1:!Vt[g]||"^"===g&&l||(n+="\\"),n+=g}l&&(w=t.substr(h+1),v=this.parse(w,te),n=n.substr(0,c)+"\\["+v[0],s=s||v[1]);for(b=a.pop();b;b=a.pop()){var D=n.slice(b.reStart+b.open.length);this.debug("setting tail",n,b),D=D.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(t,e,i){return i||(i="\\"),e+e+i+"|"}),this.debug("tail=%j\n %s",D,D,b,n);var E="*"===b.type?Ht:"?"===b.type?Gt:"\\"+b.type;s=!0,n=n.slice(0,b.reStart)+E+"\\("+D}d(),o&&(n+="\\\\");var k=!1;switch(n.charAt(0)){case"[":case".":case"(":k=!0}for(var x=u.length-1;x>-1;x--){var A=u[x],F=n.slice(0,A.reStart),C=n.slice(A.reStart,A.reEnd-8),S=n.slice(A.reEnd-8,A.reEnd),_=n.slice(A.reEnd);S+=_;var j=F.split("(").length-1,O=_;for(m=0;m<j;m++)O=O.replace(/\)[+*?]?/,"");var B="";""===(_=O)&&e!==te&&(B="$"),n=F+C+_+B+S}""!==n&&s&&(n="(?=.)"+n);k&&(n=p+n);if(e===te)return[n,s];if(!s)return function(t){return t.replace(/\\(.)/g,"$1")}(t);var T=i.nocase?"i":"";try{var R=new RegExp("^"+n+"$",T)}catch(t){return new RegExp("$.")}return R._glob=t,R._src=n,R};var te={};Jt.makeRe=function(t,e){return new Zt(t,e||{}).makeRe()},Zt.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,i=e.noglobstar?Ht:e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=e.nocase?"i":"",n=t.map(function(t){return t.map(function(t){return t===Ut?i:"string"==typeof t?function(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(t):t._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,r)}catch(t){this.regexp=!1}return this.regexp},Jt.match=function(t,e,i){var r=new Zt(e,i=i||{});return t=t.filter(function(t){return r.match(t)}),r.options.nonull&&!t.length&&t.push(e),t},Zt.prototype.match=function(t,e){if(void 0===e&&(e=this.partial),this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;var i=this.options;"/"!==zt.sep&&(t=t.split(zt.sep).join("/")),t=t.split(Kt),this.debug(this.pattern,"split",t);var r,n,s=this.set;for(this.debug(this.pattern,"set",s),n=t.length-1;n>=0&&!(r=t[n]);n--);for(n=0;n<s.length;n++){var o=s[n],a=t;if(i.matchBase&&1===o.length&&(a=[r]),this.matchOne(a,o,e))return!!i.flipNegate||!this.negate}return!i.flipNegate&&this.negate},Zt.prototype.matchOne=function(t,e,i){var r=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,s=0,o=t.length,a=e.length;n<o&&s<a;n++,s++){this.debug("matchOne loop");var u,l=e[s],c=t[n];if(this.debug(e,l,c),!1===l)return!1;if(l===Ut){this.debug("GLOBSTAR",[e,l,c]);var h=n,p=s+1;if(p===a){for(this.debug("** at the end");n<o;n++)if("."===t[n]||".."===t[n]||!r.dot&&"."===t[n].charAt(0))return!1;return!0}for(;h<o;){var f=t[h];if(this.debug("\nglobstar while",t,h,e,p,f),this.matchOne(t.slice(h),e.slice(p),i))return this.debug("globstar found match!",h,o,f),!0;if("."===f||".."===f||!r.dot&&"."===f.charAt(0)){this.debug("dot detected!",t,h,e,p);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!i||(this.debug("\n>>> no match, partial?",t,h,e,p),h!==o))}if("string"==typeof l?(u=c===l,this.debug("string match",l,c,u)):(u=c.match(l),this.debug("pattern match",l,c,u)),!u)return!1}if(n===o&&s===a)return!0;if(n===o)return i;if(s===a)return n===o-1&&""===t[n];throw new Error("wtf?")};var ee,ie={exports:{}},re={exports:{}};try{var ne=require("util");if("function"!=typeof ne.inherits)throw"";ie.exports=ne.inherits}catch(t){ie.exports=(ee||(ee=1,"function"==typeof Object.create?re.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:re.exports=function(t,e){if(e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}}),re.exports)}var se=ie.exports,oe={exports:{}};function ae(t){return"/"===t.charAt(0)}function ue(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(t),i=e[1]||"",r=Boolean(i&&":"!==i.charAt(1));return Boolean(e[2]||r)}oe.exports="win32"===process.platform?ue:ae,oe.exports.posix=ae,oe.exports.win32=ue;var le=oe.exports,ce={};function he(t,e){return Object.prototype.hasOwnProperty.call(t,e)}ce.setopts=function(t,e,i){i||(i={});if(i.matchBase&&-1===e.indexOf("/")){if(i.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}t.silent=!!i.silent,t.pattern=e,t.strict=!1!==i.strict,t.realpath=!!i.realpath,t.realpathCache=i.realpathCache||Object.create(null),t.follow=!!i.follow,t.dot=!!i.dot,t.mark=!!i.mark,t.nodir=!!i.nodir,t.nodir&&(t.mark=!0);t.sync=!!i.sync,t.nounique=!!i.nounique,t.nonull=!!i.nonull,t.nosort=!!i.nosort,t.nocase=!!i.nocase,t.stat=!!i.stat,t.noprocess=!!i.noprocess,t.absolute=!!i.absolute,t.fs=i.fs||de,t.maxLength=i.maxLength||1/0,t.cache=i.cache||Object.create(null),t.statCache=i.statCache||Object.create(null),t.symlinks=i.symlinks||Object.create(null),function(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]);t.ignore.length&&(t.ignore=t.ignore.map(we))}(t,i),t.changedCwd=!1;var r=process.cwd();he(i,"cwd")?(t.cwd=ge.resolve(i.cwd),t.changedCwd=t.cwd!==r):t.cwd=r;t.root=i.root||ge.resolve(t.cwd,"/"),t.root=ge.resolve(t.root),"win32"===process.platform&&(t.root=t.root.replace(/\\/g,"/"));t.cwdAbs=me(t.cwd)?t.cwd:ve(t,t.cwd),"win32"===process.platform&&(t.cwdAbs=t.cwdAbs.replace(/\\/g,"/"));t.nomount=!!i.nomount,i.nonegate=!0,i.nocomment=!0,i.allowWindowsEscape=!1,t.minimatch=new ye(e,i),t.options=t.minimatch.options},ce.ownProp=he,ce.makeAbs=ve,ce.finish=function(t){for(var e=t.nounique,i=e?[]:Object.create(null),r=0,n=t.matches.length;r<n;r++){var s=t.matches[r];if(s&&0!==Object.keys(s).length){var o=Object.keys(s);e?i.push.apply(i,o):o.forEach(function(t){i[t]=!0})}else if(t.nonull){var a=t.minimatch.globSet[r];e?i.push(a):i[a]=!0}}e||(i=Object.keys(i));t.nosort||(i=i.sort(be));if(t.mark){for(r=0;r<i.length;r++)i[r]=t._mark(i[r]);t.nodir&&(i=i.filter(function(e){var i=!/\/$/.test(e),r=t.cache[e]||t.cache[ve(t,e)];return i&&r&&(i="DIR"!==r&&!Array.isArray(r)),i}))}t.ignore.length&&(i=i.filter(function(e){return!De(t,e)}));t.found=i},ce.mark=function(t,e){var i=ve(t,e),r=t.cache[i],n=e;if(r){var s="DIR"===r||Array.isArray(r),o="/"===e.slice(-1);if(s&&!o?n+="/":!s&&o&&(n=n.slice(0,-1)),n!==e){var a=ve(t,n);t.statCache[a]=t.statCache[i],t.cache[a]=t.cache[i]}}return n},ce.isIgnored=De,ce.childrenIgnored=function(t,e){return!!t.ignore.length&&t.ignore.some(function(t){return!(!t.gmatcher||!t.gmatcher.match(e))})};var pe,fe,de=a,ge=o,me=le,ye=Mt.Minimatch;function be(t,e){return t.localeCompare(e,"en")}function we(t){var e=null;if("/**"===t.slice(-3)){var i=t.replace(/(\/\*\*)+$/,"");e=new ye(i,{dot:!0})}return{matcher:new ye(t,{dot:!0}),gmatcher:e}}function ve(t,e){var i=e;return i="/"===e.charAt(0)?ge.join(t.root,e):me(e)||""===e?e:t.changedCwd?ge.resolve(t.cwd,e):ge.resolve(e),"win32"===process.platform&&(i=i.replace(/\\/g,"/")),i}function De(t,e){return!!t.ignore.length&&t.ignore.some(function(t){return t.matcher.match(e)||!(!t.gmatcher||!t.gmatcher.match(e))})}var Ee=function t(e,i){if(e&&i)return t(e)(i);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(t){r[t]=e[t]}),r;function r(){for(var t=new Array(arguments.length),i=0;i<t.length;i++)t[i]=arguments[i];var r=e.apply(this,t),n=t[t.length-1];return"function"==typeof r&&r!==n&&Object.keys(n).forEach(function(t){r[t]=n[t]}),r}};var ke={exports:{}},xe=Ee;function Ae(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function Fe(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},i=t.name||"Function wrapped with `once`";return e.onceError=i+" shouldn't be called more than once",e.called=!1,e}ke.exports=xe(Ae),ke.exports.strict=xe(Fe),Ae.proto=Ae(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Ae(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Fe(this)},configurable:!0})});var Ce,Se,_e=ke.exports,je=Ee,Oe=Object.create(null),Be=_e,Te=je(function(t,e){return Oe[t]?(Oe[t].push(e),null):(Oe[t]=[e],function(t){return Be(function e(){var i=Oe[t],r=i.length,n=function(t){for(var e=t.length,i=[],r=0;r<e;r++)i[r]=t[r];return i}(arguments);try{for(var s=0;s<r;s++)i[s].apply(null,n)}finally{i.length>r?(i.splice(0,r),process.nextTick(function(){e.apply(null,n)})):delete Oe[t]}})}(t))});function Re(){if(Se)return Ce;Se=1,Ce=b;var t=lt,e=Mt;e.Minimatch;var i=se,r=u.EventEmitter,n=o,s=l,a=le,c=function(){if(fe)return pe;fe=1,pe=p,p.GlobSync=f;var t=lt,e=Mt;e.Minimatch,Re().Glob;var i=o,r=l,n=le,s=ce,a=s.setopts,u=s.ownProp,c=s.childrenIgnored,h=s.isIgnored;function p(t,e){if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new f(t,e).found}function f(t,e){if(!t)throw new Error("must provide pattern");if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof f))return new f(t,e);if(a(this,t,e),this.noprocess)return this;var i=this.minimatch.set.length;this.matches=new Array(i);for(var r=0;r<i;r++)this._process(this.minimatch.set[r],r,!1);this._finish()}return f.prototype._finish=function(){if(r.ok(this instanceof f),this.realpath){var e=this;this.matches.forEach(function(i,r){var n=e.matches[r]=Object.create(null);for(var s in i)try{s=e._makeAbs(s),n[t.realpathSync(s,e.realpathCache)]=!0}catch(t){if("stat"!==t.syscall)throw t;n[e._makeAbs(s)]=!0}})}s.finish(this)},f.prototype._process=function(t,i,s){r.ok(this instanceof f);for(var o,a=0;"string"==typeof t[a];)a++;switch(a){case t.length:return void this._processSimple(t.join("/"),i);case 0:o=null;break;default:o=t.slice(0,a).join("/")}var u,l=t.slice(a);null===o?u=".":n(o)||n(t.map(function(t){return"string"==typeof t?t:"[*]"}).join("/"))?(o&&n(o)||(o="/"+o),u=o):u=o;var h=this._makeAbs(u);c(this,u)||(l[0]===e.GLOBSTAR?this._processGlobStar(o,u,h,l,i,s):this._processReaddir(o,u,h,l,i,s))},f.prototype._processReaddir=function(t,e,r,n,s,o){var a=this._readdir(r,o);if(a){for(var u=n[0],l=!!this.minimatch.negate,c=u._glob,h=this.dot||"."===c.charAt(0),p=[],f=0;f<a.length;f++)("."!==(m=a[f]).charAt(0)||h)&&(l&&!t?!m.match(u):m.match(u))&&p.push(m);var d=p.length;if(0!==d)if(1!==n.length||this.mark||this.stat)for(n.shift(),f=0;f<d;f++){var g;m=p[f],g=t?[t,m]:[m],this._process(g.concat(n),s,o)}else{this.matches[s]||(this.matches[s]=Object.create(null));for(f=0;f<d;f++){var m=p[f];t&&(m="/"!==t.slice(-1)?t+"/"+m:t+m),"/"!==m.charAt(0)||this.nomount||(m=i.join(this.root,m)),this._emitMatch(s,m)}}}},f.prototype._emitMatch=function(t,e){if(!h(this,e)){var i=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=i),!this.matches[t][e]){if(this.nodir){var r=this.cache[i];if("DIR"===r||Array.isArray(r))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}},f.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,i;try{i=this.fs.lstatSync(t)}catch(t){if("ENOENT"===t.code)return null}var r=i&&i.isSymbolicLink();return this.symlinks[t]=r,r||!i||i.isDirectory()?e=this._readdir(t,!1):this.cache[t]="FILE",e},f.prototype._readdir=function(t,e){if(e&&!u(this.symlinks,t))return this._readdirInGlobStar(t);if(u(this.cache,t)){var i=this.cache[t];if(!i||"FILE"===i)return null;if(Array.isArray(i))return i}try{return this._readdirEntries(t,this.fs.readdirSync(t))}catch(e){return this._readdirError(t,e),null}},f.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var i=0;i<e.length;i++){var r=e[i];r="/"===t?t+r:t+"/"+r,this.cache[r]=!0}return this.cache[t]=e,e},f.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var i=this._makeAbs(t);if(this.cache[i]="FILE",i===this.cwdAbs){var r=new Error(e.code+" invalid cwd "+this.cwd);throw r.path=this.cwd,r.code=e.code,r}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e)}},f.prototype._processGlobStar=function(t,e,i,r,n,s){var o=this._readdir(i,s);if(o){var a=r.slice(1),u=t?[t]:[],l=u.concat(a);this._process(l,n,!1);var c=o.length;if(!this.symlinks[i]||!s)for(var h=0;h<c;h++)if("."!==o[h].charAt(0)||this.dot){var p=u.concat(o[h],a);this._process(p,n,!0);var f=u.concat(o[h],r);this._process(f,n,!0)}}},f.prototype._processSimple=function(t,e){var r=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),r){if(t&&n(t)&&!this.nomount){var s=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=i.join(this.root,t):(t=i.resolve(this.root,t),s&&(t+="/"))}"win32"===process.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}},f.prototype._stat=function(t){var e=this._makeAbs(t),i="/"===t.slice(-1);if(t.length>this.maxLength)return!1;if(!this.stat&&u(this.cache,e)){var r=this.cache[e];if(Array.isArray(r)&&(r="DIR"),!i||"DIR"===r)return r;if(i&&"FILE"===r)return!1}var n=this.statCache[e];if(!n){var s;try{s=this.fs.lstatSync(e)}catch(t){if(t&&("ENOENT"===t.code||"ENOTDIR"===t.code))return this.statCache[e]=!1,!1}if(s&&s.isSymbolicLink())try{n=this.fs.statSync(e)}catch(t){n=s}else n=s}return this.statCache[e]=n,r=!0,n&&(r=n.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||r,(!i||"FILE"!==r)&&r},f.prototype._mark=function(t){return s.mark(this,t)},f.prototype._makeAbs=function(t){return s.makeAbs(this,t)},pe}(),h=ce,p=h.setopts,f=h.ownProp,d=Te,g=h.childrenIgnored,m=h.isIgnored,y=_e;function b(t,e,i){if("function"==typeof e&&(i=e,e={}),e||(e={}),e.sync){if(i)throw new TypeError("callback provided to sync glob");return c(t,e)}return new v(t,e,i)}b.sync=c;var w=b.GlobSync=c.GlobSync;function v(t,e,i){if("function"==typeof e&&(i=e,e=null),e&&e.sync){if(i)throw new TypeError("callback provided to sync glob");return new w(t,e)}if(!(this instanceof v))return new v(t,e,i);p(this,t,e),this._didRealPath=!1;var r=this.minimatch.set.length;this.matches=new Array(r),"function"==typeof i&&(i=y(i),this.on("error",i),this.on("end",function(t){i(null,t)}));var n=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===r)return a();for(var s=!0,o=0;o<r;o++)this._process(this.minimatch.set[o],o,!1,a);function a(){--n._processing,n._processing<=0&&(s?process.nextTick(function(){n._finish()}):n._finish())}s=!1}return b.glob=b,b.hasMagic=function(t,e){var i=function(t,e){if(null===e||"object"!=typeof e)return t;for(var i=Object.keys(e),r=i.length;r--;)t[i[r]]=e[i[r]];return t}({},e);i.noprocess=!0;var r=new v(t,i).minimatch.set;if(!t)return!1;if(r.length>1)return!0;for(var n=0;n<r[0].length;n++)if("string"!=typeof r[0][n])return!0;return!1},b.Glob=v,i(v,r),v.prototype._finish=function(){if(s(this instanceof v),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();h.finish(this),this.emit("end",this.found)}},v.prototype._realpath=function(){if(!this._didRealpath){this._didRealpath=!0;var t=this.matches.length;if(0===t)return this._finish();for(var e=this,i=0;i<this.matches.length;i++)this._realpathSet(i,r)}function r(){0===--t&&e._finish()}},v.prototype._realpathSet=function(e,i){var r=this.matches[e];if(!r)return i();var n=Object.keys(r),s=this,o=n.length;if(0===o)return i();var a=this.matches[e]=Object.create(null);n.forEach(function(r,n){r=s._makeAbs(r),t.realpath(r,s.realpathCache,function(t,n){t?"stat"===t.syscall?a[r]=!0:s.emit("error",t):a[n]=!0,0===--o&&(s.matches[e]=a,i())})})},v.prototype._mark=function(t){return h.mark(this,t)},v.prototype._makeAbs=function(t){return h.makeAbs(this,t)},v.prototype.abort=function(){this.aborted=!0,this.emit("abort")},v.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))},v.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var i=t[e];this._emitMatch(i[0],i[1])}}if(this._processQueue.length){var r=this._processQueue.slice(0);this._processQueue.length=0;for(e=0;e<r.length;e++){var n=r[e];this._processing--,this._process(n[0],n[1],n[2],n[3])}}}},v.prototype._process=function(t,i,r,n){if(s(this instanceof v),s("function"==typeof n),!this.aborted)if(this._processing++,this.paused)this._processQueue.push([t,i,r,n]);else{for(var o,u=0;"string"==typeof t[u];)u++;switch(u){case t.length:return void this._processSimple(t.join("/"),i,n);case 0:o=null;break;default:o=t.slice(0,u).join("/")}var l,c=t.slice(u);null===o?l=".":a(o)||a(t.map(function(t){return"string"==typeof t?t:"[*]"}).join("/"))?(o&&a(o)||(o="/"+o),l=o):l=o;var h=this._makeAbs(l);if(g(this,l))return n();c[0]===e.GLOBSTAR?this._processGlobStar(o,l,h,c,i,r,n):this._processReaddir(o,l,h,c,i,r,n)}},v.prototype._processReaddir=function(t,e,i,r,n,s,o){var a=this;this._readdir(i,s,function(u,l){return a._processReaddir2(t,e,i,r,n,s,l,o)})},v.prototype._processReaddir2=function(t,e,i,r,s,o,a,u){if(!a)return u();for(var l=r[0],c=!!this.minimatch.negate,h=l._glob,p=this.dot||"."===h.charAt(0),f=[],d=0;d<a.length;d++){if("."!==(m=a[d]).charAt(0)||p)(c&&!t?!m.match(l):m.match(l))&&f.push(m)}var g=f.length;if(0===g)return u();if(1===r.length&&!this.mark&&!this.stat){this.matches[s]||(this.matches[s]=Object.create(null));for(d=0;d<g;d++){var m=f[d];t&&(m="/"!==t?t+"/"+m:t+m),"/"!==m.charAt(0)||this.nomount||(m=n.join(this.root,m)),this._emitMatch(s,m)}return u()}r.shift();for(d=0;d<g;d++){m=f[d];t&&(m="/"!==t?t+"/"+m:t+m),this._process([m].concat(r),s,o,u)}u()},v.prototype._emitMatch=function(t,e){if(!this.aborted&&!m(this,e))if(this.paused)this._emitQueue.push([t,e]);else{var i=a(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=i),!this.matches[t][e]){if(this.nodir){var r=this.cache[i];if("DIR"===r||Array.isArray(r))return}this.matches[t][e]=!0;var n=this.statCache[i];n&&this.emit("stat",e,n),this.emit("match",e)}}},v.prototype._readdirInGlobStar=function(t,e){if(!this.aborted){if(this.follow)return this._readdir(t,!1,e);var i=this,r=d("lstat\0"+t,function(r,n){if(r&&"ENOENT"===r.code)return e();var s=n&&n.isSymbolicLink();i.symlinks[t]=s,s||!n||n.isDirectory()?i._readdir(t,!1,e):(i.cache[t]="FILE",e())});r&&i.fs.lstat(t,r)}},v.prototype._readdir=function(t,e,i){if(!this.aborted&&(i=d("readdir\0"+t+"\0"+e,i))){if(e&&!f(this.symlinks,t))return this._readdirInGlobStar(t,i);if(f(this.cache,t)){var r=this.cache[t];if(!r||"FILE"===r)return i();if(Array.isArray(r))return i(null,r)}this.fs.readdir(t,function(t,e,i){return function(r,n){r?t._readdirError(e,r,i):t._readdirEntries(e,n,i)}}(this,t,i))}},v.prototype._readdirEntries=function(t,e,i){if(!this.aborted){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var n=e[r];n="/"===t?t+n:t+"/"+n,this.cache[n]=!0}return this.cache[t]=e,i(null,e)}},v.prototype._readdirError=function(t,e,i){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(t);if(this.cache[r]="FILE",r===this.cwdAbs){var n=new Error(e.code+" invalid cwd "+this.cwd);n.path=this.cwd,n.code=e.code,this.emit("error",n),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e)}return i()}},v.prototype._processGlobStar=function(t,e,i,r,n,s,o){var a=this;this._readdir(i,s,function(u,l){a._processGlobStar2(t,e,i,r,n,s,l,o)})},v.prototype._processGlobStar2=function(t,e,i,r,n,s,o,a){if(!o)return a();var u=r.slice(1),l=t?[t]:[],c=l.concat(u);this._process(c,n,!1,a);var h=this.symlinks[i],p=o.length;if(h&&s)return a();for(var f=0;f<p;f++){if("."!==o[f].charAt(0)||this.dot){var d=l.concat(o[f],u);this._process(d,n,!0,a);var g=l.concat(o[f],r);this._process(g,n,!0,a)}}a()},v.prototype._processSimple=function(t,e,i){var r=this;this._stat(t,function(n,s){r._processSimple2(t,e,n,s,i)})},v.prototype._processSimple2=function(t,e,i,r,s){if(this.matches[e]||(this.matches[e]=Object.create(null)),!r)return s();if(t&&a(t)&&!this.nomount){var o=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=n.join(this.root,t):(t=n.resolve(this.root,t),o&&(t+="/"))}"win32"===process.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),s()},v.prototype._stat=function(t,e){var i=this._makeAbs(t),r="/"===t.slice(-1);if(t.length>this.maxLength)return e();if(!this.stat&&f(this.cache,i)){var n=this.cache[i];if(Array.isArray(n)&&(n="DIR"),!r||"DIR"===n)return e(null,n);if(r&&"FILE"===n)return e()}var s=this.statCache[i];if(void 0!==s){if(!1===s)return e(null,s);var o=s.isDirectory()?"DIR":"FILE";return r&&"FILE"===o?e():e(null,o,s)}var a=this,u=d("stat\0"+i,function(r,n){if(n&&n.isSymbolicLink())return a.fs.stat(i,function(r,s){r?a._stat2(t,i,null,n,e):a._stat2(t,i,r,s,e)});a._stat2(t,i,r,n,e)});u&&a.fs.lstat(i,u)},v.prototype._stat2=function(t,e,i,r,n){if(i&&("ENOENT"===i.code||"ENOTDIR"===i.code))return this.statCache[e]=!1,n();var s="/"===t.slice(-1);if(this.statCache[e]=r,"/"===e.slice(-1)&&r&&!r.isDirectory())return n(null,!1,r);var o=!0;return r&&(o=r.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||o,s&&"FILE"===o?n():n(null,o,r)},Ce}function $e(t){return Array.isArray(t)?t:[t]}const Ie=/^\s+$/,Pe=/(?:[^\\]|^)\\$/,Ne=/^\\!/,Le=/^\\#/,Me=/\r?\n/g,ze=/^\.*\/|^\.+$/;let Ue="node-ignore";"undefined"!=typeof Symbol&&(Ue=Symbol.for("node-ignore"));const qe=Ue,We=/([0-z])-([0-z])/g,Ge=()=>!1,He=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(t,e,i)=>e+(0===i.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(t,e)=>{const{length:i}=e;return e.slice(0,i-i%2)+" "}],[/[\\$.|*+(){^]/g,t=>`\\${t}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(t,e,i)=>e+6<i.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(t,e,i)=>e+i.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(t,e,i,r,n)=>"\\"===e?`\\[${i}${(t=>{const{length:e}=t;return t.slice(0,e-e%2)})(r)}${n}`:"]"===n&&r.length%2==0?`[${(t=>t.replace(We,(t,e,i)=>e.charCodeAt(0)<=i.charCodeAt(0)?t:""))(i)}${r}]`:"[]"],[/(?:[^*])$/,t=>/\/$/.test(t)?`${t}$`:`${t}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(t,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`]],Ve=Object.create(null),Ke=t=>"string"==typeof t;class Ye{constructor(t,e,i,r){this.origin=t,this.pattern=e,this.negative=i,this.regex=r}}const Je=(t,e)=>{const i=t;let r=!1;0===t.indexOf("!")&&(r=!0,t=t.substr(1));const n=((t,e)=>{let i=Ve[t];return i||(i=He.reduce((e,[i,r])=>e.replace(i,r.bind(t)),t),Ve[t]=i),e?new RegExp(i,"i"):new RegExp(i)})(t=t.replace(Ne,"!").replace(Le,"#"),e);return new Ye(i,t,r,n)},Ze=(t,e)=>{throw new e(t)},Qe=(t,e,i)=>{if(!Ke(t))return i(`path must be a string, but got \`${e}\``,TypeError);if(!t)return i("path must not be empty",TypeError);if(Qe.isNotRelative(t)){return i(`path should be a ${"`path.relative()`d"} string, but got "${e}"`,RangeError)}return!0},Xe=t=>ze.test(t);Qe.isNotRelative=Xe,Qe.convert=t=>t;let ti=class{constructor({ignorecase:t=!0,ignoreCase:e=t,allowRelativePaths:i=!1}={}){var r,n,s;r=this,n=qe,s=!0,Object.defineProperty(r,n,{value:s}),this._rules=[],this._ignoreCase=e,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[qe])return this._rules=this._rules.concat(t._rules),void(this._added=!0);if((t=>t&&Ke(t)&&!Ie.test(t)&&!Pe.test(t)&&0!==t.indexOf("#"))(t)){const e=Je(t,this._ignoreCase);this._added=!0,this._rules.push(e)}}add(t){return this._added=!1,$e(Ke(t)?(t=>t.split(Me))(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,e){let i=!1,r=!1;return this._rules.forEach(n=>{const{negative:s}=n;if(r===s&&i!==r||s&&!i&&!r&&!e)return;n.regex.test(t)&&(i=!s,r=s)}),{ignored:i,unignored:r}}_test(t,e,i,r){const n=t&&Qe.convert(t);return Qe(n,t,this._allowRelativePaths?Ge:Ze),this._t(n,e,i,r)}_t(t,e,i,r){if(t in e)return e[t];if(r||(r=t.split("/")),r.pop(),!r.length)return e[t]=this._testOne(t,i);const n=this._t(r.join("/")+"/",e,i,r);return e[t]=n.ignored?n:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return $e(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}};const ei=t=>new ti(t);ei.isPathValid=t=>Qe(t&&Qe.convert(t),t,Ge),ei.default=ei;var ii=ei;if("undefined"!=typeof process&&(process.env&&process.env.IGNORE_TEST_WIN32||"win32"===process.platform)){const t=t=>/^\\\\\?\\/.test(t)||/["<>|\u0000-\u001F]+/u.test(t)?t:t.replace(/\\/g,"/");Qe.convert=t;const e=/^[a-z]:\//i;Qe.isNotRelative=t=>e.test(t)||Xe(t)}var ri=H(ii);let ni;var si="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:G):t=>(ni||(ni=Promise.resolve())).then(t).catch(t=>setTimeout(()=>{throw t},0)),oi=function(t,e){let i,r,n,s=!0;Array.isArray(t)?(i=[],r=t.length):(n=Object.keys(t),i={},r=n.length);function o(t){function r(){e&&e(t,i),e=null}s?ai(r):r()}function a(t,e,n){i[t]=n,(0===--r||e)&&o(e)}r?n?n.forEach(function(e){t[e](function(t,i){a(e,t,i)})}):t.forEach(function(t,e){t(function(t,i){a(e,t,i)})}):o(null);s=!1};const ai=si;function ui(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var li=c,ci=process.env.NODE_DEBUG||"",hi={},pi=function(){for(var t={},e=0;e<arguments.length;e++){var i=arguments[e];for(var r in i)fi.call(i,r)&&(t[r]=i[r])}return t},fi=Object.prototype.hasOwnProperty;var di=function(t){if(t=t.toUpperCase(),!hi[t])if(new RegExp("\\b"+t+"\\b","i").test(ci)){var e=process.pid;hi[t]=function(){console.error("%s %d: %s",t,e,li.format.apply(li,arguments))}}else hi[t]=function(){};return hi[t]}("pkg-config"),gi=pi,mi=tt,yi=a,bi=o;var wi=function(t,e,i){return 0===t.length?t:e?(i||t.sort(e),function(t,e){for(var i=1,r=t.length,n=t[0],s=t[0],o=1;o<r;++o)if(s=n,e(n=t[o],s)){if(o===i){i++;continue}t[i++]=n}return t.length=i,t}(t,e)):(i||t.sort(),function(t){for(var e=1,i=t.length,r=t[0],n=t[0],s=1;s<i;++s,n=r)if(n=r,(r=t[s])!==n){if(s===e){e++;continue}t[e++]=r}return t.length=e,t}(t))},vi=function t(e,i,r){if("function"==typeof i)return t(e,null,i);i=function(t){t||(t={});(t=Object.assign({useGitIgnore:!0,usePackageJson:!0,configKey:"config",gitIgnoreFile:[".gitignore",".git/info/exclude"]},t)).cwd||(t.cwd=process.cwd());Array.isArray(t.gitIgnoreFile)||(t.gitIgnoreFile=[t.gitIgnoreFile]);function e(e){t._ignore=t._ignore.concat(e),t._gitignore.addPattern(e)}t._ignore=[],t._gitignore=xi(),t.ignore&&e(t.ignore);if(!t.useGitIgnore&&!t.usePackageJson)return t;var i;try{i=Di(t.cwd)}catch(t){}if(i){if(t.usePackageJson){var r=Si(t.configKey,{root:!1,cwd:t.cwd});r&&r.ignore&&e(r.ignore)}if(t.useGitIgnore){t.gitIgnoreFile.map(function(t){try{return Ei.readFileSync(Ci.join(i,t),"utf8")}catch(t){}}).filter(Boolean).forEach(function(e){t._gitignore.addPattern(e.split(/\r?\n/))})}}return t}(i),"string"==typeof e&&(e=[e]);if(0===e.length)return function(t,e,i){process.nextTick(function(){t(e,i)})}(r,null,[]);Fi(e.map(function(t){return function(e){ki(t,{cwd:i.cwd,ignore:i._ignore,nodir:!0},e)}}),function(t,e){if(t)return r(t);var n=e.reduce(function(t,e){return e.forEach(function(e){t.push(Ci.resolve(i.cwd,e))}),t},[]);return n=_i(n),i._gitignore&&(n=function(t,e){return e.map(function(e){return Ci.relative(t,e)})}(i.cwd,n),"win32"===Ai.platform()&&(n=function(t){return t.map(function(t){return t.replace(/\\/g,"/")})}(n)),n=i._gitignore.filter(n),n=function(t,e){return e.map(function(e){return Ci.join(t,e)})}(i.cwd,n),"win32"===Ai.platform()&&(n=function(t){return t.map(function(t){return t.replace(/\//g,"\\")})}(n))),r(null,n)})},Di=tt,Ei=a,ki=Re(),xi=ii,Ai=h,Fi=oi,Ci=o,Si=function(t,e,i){var r=gi({root:"config",cwd:process.cwd(),cache:!0},e||{});try{var n,s=mi(r.cwd);if(!s)return void di("could not find at %s",r.cwd);di("found root at %s",s),r.cache?n=ui(bi.join(s,"package.json")):(n=yi.readFileSync(bi.join(s,"package.json"),{enconding:"utf8"}),n=JSON.parse(n)),di("found package.json at %s",s);var o=r.root?n[r.root]:n;return(t?o[t]:o)||i}catch(t){di(t.message)}},_i=wi;var ji,Oi,Bi,Ti,Ri=H(vi),$i={exports:{}};var Ii=h;void 0!==Ii.homedir?$i.exports=Ii.homedir:$i.exports=function(){if(Ti)return Bi;Ti=1;var t=a,e=function(){if(Oi)return ji;function t(t,e){if(!t||!t.length||"#"===t.charAt(0))return null;var i=t.split(":");return{username:i[0],password:i[1],uid:i[2],gid:i[3],gecos:i[4],homedir:i[5],shell:i[6]}}return Oi=1,ji=function(e){if("string"!=typeof e)throw new Error("expected a string");return e.split("\n").map(t).filter(Boolean)},ji}();return Bi=function(){if("win32"===process.platform)return process.env.USERPROFILE?process.env.USERPROFILE:process.env.HOMEDRIVE&&process.env.HOMEPATH?process.env.HOMEDRIVE+process.env.HOMEPATH:process.env.HOME?process.env.HOME:null;if(process.env.HOME)return process.env.HOME;var i=function(e){try{return t.readFileSync(e,"utf8")}catch(t){return""}}("/etc/passwd"),r=function(t,e){for(var i=t.length,r=0;r<i;r++)if(+t[r].uid===e)return t[r].homedir}(e(i),"function"==typeof process.geteuid?process.geteuid():process.getuid());if(r)return r;var n=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return n?"darwin"===process.platform?"/Users/"+n:"/home/"+n:null}}();var Pi=$i.exports,Ni=Pi,Li=o,Mi=function(t){var e=Ni();return 126===t.charCodeAt(0)?43===t.charCodeAt(1)?Li.join(process.cwd(),t.slice(2)):e?Li.join(e,t.slice(1)):t:t},zi={exports:{}},Ui={exports:{}},qi={};qi.parse=qi.decode=function(t){var e={},i=e,r=null,n=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;return t.split(/[\r\n]+/g).forEach(function(t,s,o){if(t&&!t.match(/^\s*[;#]/)){var a=t.match(n);if(a){if(void 0!==a[1])return"__proto__"===(r=Ki(a[1]))?void(i={}):void(i=e[r]=e[r]||{});var u=Ki(a[2]);if("__proto__"!==u){var l=!a[3]||Ki(a[4]);switch(l){case"true":case"false":case"null":l=JSON.parse(l)}if(u.length>2&&"[]"===u.slice(-2)){if("__proto__"===(u=u.substring(0,u.length-2)))return;i[u]?Array.isArray(i[u])||(i[u]=[i[u]]):i[u]=[]}Array.isArray(i[u])?i[u].push(l):i[u]=l}}}}),Object.keys(e).filter(function(t,i,r){if(!e[t]||"object"!=typeof e[t]||Array.isArray(e[t]))return!1;var n=Gi(t),s=e,o=n.pop(),a=o.replace(/\\\./g,".");return n.forEach(function(t,e,i){"__proto__"!==t&&(s[t]&&"object"==typeof s[t]||(s[t]={}),s=s[t])}),(s!==e||a!==o)&&(s[a]=e[t],!0)}).forEach(function(t,i,r){delete e[t]}),e},qi.stringify=qi.encode=function t(e,i){var r=[],n="";"string"==typeof i?i={section:i,whitespace:!1}:(i=i||{}).whitespace=!0===i.whitespace;var s=i.whitespace?" = ":"=";Object.keys(e).forEach(function(t,i,o){var a=e[t];a&&Array.isArray(a)?a.forEach(function(e){n+=Vi(t+"[]")+s+Vi(e)+"\n"}):a&&"object"==typeof a?r.push(t):n+=Vi(t)+s+Vi(a)+Wi}),i.section&&n.length&&(n="["+Vi(i.section)+"]"+Wi+n);return r.forEach(function(r,s,o){var a=Gi(r).join("\\."),u=(i.section?i.section+".":"")+a,l=t(e[r],{section:u,whitespace:i.whitespace});n.length&&l.length&&(n+=Wi),n+=l}),n},qi.safe=Vi,qi.unsafe=Ki;var Wi="undefined"!=typeof process&&"win32"===process.platform?"\r\n":"\n";function Gi(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(t){return t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function Hi(t){return'"'===t.charAt(0)&&'"'===t.slice(-1)||"'"===t.charAt(0)&&"'"===t.slice(-1)}function Vi(t){return"string"!=typeof t||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&Hi(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Ki(t,e){if(!Hi(t=(t||"").trim())){for(var i=!1,r="",n=0,s=t.length;n<s;n++){var o=t.charAt(n);if(i)-1!=="\\;#".indexOf(o)?r+=o:r+="\\"+o,i=!1;else{if(-1!==";#".indexOf(o))break;"\\"===o?i=!0:r+=o}}return i&&(r+="\\"),r.trim()}"'"===t.charAt(0)&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch(t){}return t}var Yi={exports:{}};!function(t,e){!function(i){e?t.exports=i():"undefined"!=typeof window?window.isWindows=i():void 0!==G?G.isWindows=i():"undefined"!=typeof self?self.isWindows=i():this.isWindows=i()}(function(){return function(){return process&&("win32"===process.platform||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})}(Yi,Yi.exports);var Ji,Zi,Qi,Xi,tr,er,ir,rr,nr=Yi.exports;function sr(){if(Zi)return Ji;Zi=1,Ji=i,i.sync=function(i,r){return e(t.statSync(i),i,r)};var t=a;function e(t,e,i){return!(!t.isSymbolicLink()&&!t.isFile())&&function(t,e){var i=void 0!==e.pathExt?e.pathExt:process.env.PATHEXT;if(!i)return!0;if(-1!==(i=i.split(";")).indexOf(""))return!0;for(var r=0;r<i.length;r++){var n=i[r].toLowerCase();if(n&&t.substr(-n.length).toLowerCase()===n)return!0}return!1}(e,i)}function i(i,r,n){t.stat(i,function(t,s){n(t,!t&&e(s,i,r))})}return Ji}function or(){if(Xi)return Qi;Xi=1,Qi=e,e.sync=function(e,r){return i(t.statSync(e),r)};var t=a;function e(e,r,n){t.stat(e,function(t,e){n(t,!t&&i(e,r))})}function i(t,e){return t.isFile()&&function(t,e){var i=t.mode,r=t.uid,n=t.gid,s=void 0!==e.uid?e.uid:process.getuid&&process.getuid(),o=void 0!==e.gid?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),l=parseInt("001",8),c=a|u,h=i&l||i&u&&n===o||i&a&&r===s||i&c&&0===s;return h}(t,e)}return Qi}function ar(){if(rr)return ir;rr=1,ir=a,a.sync=function(t,i){for(var o=s(t,i=i||{}),a=o.env,u=o.ext,l=o.extExe,c=[],h=0,p=a.length;h<p;h++){var f=a[h];'"'===f.charAt(0)&&'"'===f.slice(-1)&&(f=f.slice(1,-1));var d=e.join(f,t);!f&&/^\.[\\\/]/.test(t)&&(d=t.slice(0,2)+d);for(var g=0,m=u.length;g<m;g++){var y=d+u[g];try{if(r.sync(y,{pathExt:l})){if(!i.all)return y;c