vbapm 0.6.3-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +246 -0
- package/lib/_commonjsHelpers-553b27b3.js +2 -0
- package/lib/_commonjsHelpers-553b27b3.js.map +1 -0
- package/lib/build-project-55e5df48.js +4 -0
- package/lib/build-project-55e5df48.js.map +1 -0
- package/lib/build-target-283e1e7d.js +10 -0
- package/lib/build-target-283e1e7d.js.map +1 -0
- package/lib/create-project-905598ca.js +11 -0
- package/lib/create-project-905598ca.js.map +1 -0
- package/lib/debug.js +2 -0
- package/lib/debug.js.map +1 -0
- package/lib/export-project-55168787.js +5 -0
- package/lib/export-project-55168787.js.map +1 -0
- package/lib/export-target-c9ddd2fa.js +5 -0
- package/lib/export-target-c9ddd2fa.js.map +1 -0
- package/lib/get-target-23b8cc04.js +12 -0
- package/lib/get-target-23b8cc04.js.map +1 -0
- package/lib/index-35cff1d5.js +38 -0
- package/lib/index-35cff1d5.js.map +1 -0
- package/lib/index-87f55e79.js +4 -0
- package/lib/index-87f55e79.js.map +1 -0
- package/lib/index-b49bd5b2.js +2 -0
- package/lib/index-b49bd5b2.js.map +1 -0
- package/lib/index-c97017db.js +2 -0
- package/lib/index-c97017db.js.map +1 -0
- package/lib/index-d9ba3ba0.js +6 -0
- package/lib/index-d9ba3ba0.js.map +1 -0
- package/lib/index-ffbba08f.js +3 -0
- package/lib/index-ffbba08f.js.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/inherits-713f4554.js +2 -0
- package/lib/inherits-713f4554.js.map +1 -0
- package/lib/init-project-a62cb644.js +16 -0
- package/lib/init-project-a62cb644.js.map +1 -0
- package/lib/load-from-project-e6530a69.js +6 -0
- package/lib/load-from-project-e6530a69.js.map +1 -0
- package/lib/minimatch-3a1d1fa9.js +2 -0
- package/lib/minimatch-3a1d1fa9.js.map +1 -0
- package/lib/once-9eb67b4f.js +2 -0
- package/lib/once-9eb67b4f.js.map +1 -0
- package/lib/project-d43b4e0c.js +30 -0
- package/lib/project-d43b4e0c.js.map +1 -0
- package/lib/run-macro-f4aa7c14.js +2 -0
- package/lib/run-macro-f4aa7c14.js.map +1 -0
- package/lib/sat-solver-01d6409e.js +2 -0
- package/lib/sat-solver-01d6409e.js.map +1 -0
- package/lib/src/actions/build-project.d.ts +2 -0
- package/lib/src/actions/create-project.d.ts +8 -0
- package/lib/src/actions/export-project.d.ts +6 -0
- package/lib/src/actions/increment-version.d.ts +5 -0
- package/lib/src/actions/init-project.d.ts +9 -0
- package/lib/src/actions/run-macro.d.ts +8 -0
- package/lib/src/actions/test-project.d.ts +5 -0
- package/lib/src/addin.d.ts +36 -0
- package/lib/src/bin/vba-blocks-build.d.ts +2 -0
- package/lib/src/bin/vba-blocks-export.d.ts +2 -0
- package/lib/src/bin/vba-blocks-init.d.ts +2 -0
- package/lib/src/bin/vba-blocks-new.d.ts +2 -0
- package/lib/src/bin/vba-blocks-run.d.ts +2 -0
- package/lib/src/bin/vba-blocks-test.d.ts +2 -0
- package/lib/src/bin/vba-blocks-version.d.ts +2 -0
- package/lib/src/bin/vba-blocks.d.ts +2 -0
- package/lib/src/build/apply-changeset.d.ts +3 -0
- package/lib/src/build/build-graph.d.ts +18 -0
- package/lib/src/build/changeset.d.ts +14 -0
- package/lib/src/build/compare-build-graphs.d.ts +3 -0
- package/lib/src/build/component.d.ts +25 -0
- package/lib/src/build/index.d.ts +7 -0
- package/lib/src/build/load-from-export.d.ts +2 -0
- package/lib/src/build/load-from-project.d.ts +5 -0
- package/lib/src/build/stage-build-graph.d.ts +2 -0
- package/lib/src/build/transform-build-graph.d.ts +3 -0
- package/lib/src/build/transforms/editor-config.d.ts +3 -0
- package/lib/src/cache.d.ts +9 -0
- package/lib/src/config.d.ts +29 -0
- package/lib/src/debug.d.ts +2 -0
- package/lib/src/env.d.ts +21 -0
- package/lib/src/errors.d.ts +56 -0
- package/lib/src/index.d.ts +16 -0
- package/lib/src/installer.d.ts +3 -0
- package/lib/src/lockfile/index.d.ts +23 -0
- package/lib/src/lockfile/is-lockfile-valid.d.ts +10 -0
- package/lib/src/lockfile/lockfile.d.ts +26 -0
- package/lib/src/manifest/dependency.d.ts +25 -0
- package/lib/src/manifest/index.d.ts +34 -0
- package/lib/src/manifest/reference.d.ts +12 -0
- package/lib/src/manifest/source.d.ts +8 -0
- package/lib/src/manifest/target.d.ts +10 -0
- package/lib/src/manifest/version.d.ts +3 -0
- package/lib/src/messages.d.ts +22 -0
- package/lib/src/professional/sources/git-source.d.ts +7 -0
- package/lib/src/professional/workspace.d.ts +10 -0
- package/lib/src/project.d.ts +48 -0
- package/lib/src/reporter.d.ts +12 -0
- package/lib/src/resolve/dependency-graph.d.ts +4 -0
- package/lib/src/resolve/index.d.ts +6 -0
- package/lib/src/resolve/latest-solver.d.ts +8 -0
- package/lib/src/resolve/resolver.d.ts +23 -0
- package/lib/src/resolve/sat-solver.d.ts +7 -0
- package/lib/src/sources/index.d.ts +16 -0
- package/lib/src/sources/path-source.d.ts +7 -0
- package/lib/src/sources/registration.d.ts +17 -0
- package/lib/src/sources/registry-source.d.ts +32 -0
- package/lib/src/sources/source.d.ts +6 -0
- package/lib/src/targets/add-target.d.ts +8 -0
- package/lib/src/targets/build-target.d.ts +41 -0
- package/lib/src/targets/export-target.d.ts +15 -0
- package/lib/src/targets/get-target.d.ts +7 -0
- package/lib/src/targets/index.d.ts +3 -0
- package/lib/src/targets/project-info.d.ts +7 -0
- package/lib/src/targets/transform-target.d.ts +3 -0
- package/lib/src/targets/transforms/core-xml.d.ts +2 -0
- package/lib/src/targets/transforms/workbook-xml.d.ts +2 -0
- package/lib/src/utils/async-map.d.ts +4 -0
- package/lib/src/utils/download.d.ts +1 -0
- package/lib/src/utils/fs.d.ts +23 -0
- package/lib/src/utils/get-staging.d.ts +1 -0
- package/lib/src/utils/git.d.ts +4 -0
- package/lib/src/utils/github.d.ts +9 -0
- package/lib/src/utils/has.d.ts +1 -0
- package/lib/src/utils/hash.d.ts +8 -0
- package/lib/src/utils/interop.d.ts +1 -0
- package/lib/src/utils/is.d.ts +5 -0
- package/lib/src/utils/noop.d.ts +1 -0
- package/lib/src/utils/observable.d.ts +15 -0
- package/lib/src/utils/parallel.d.ts +6 -0
- package/lib/src/utils/path.d.ts +7 -0
- package/lib/src/utils/pipe.d.ts +5 -0
- package/lib/src/utils/run.d.ts +17 -0
- package/lib/src/utils/stdout-file.d.ts +3 -0
- package/lib/src/utils/text.d.ts +4 -0
- package/lib/src/utils/toml.d.ts +4 -0
- package/lib/src/utils/unique.d.ts +1 -0
- package/lib/src/utils/without.d.ts +1 -0
- package/lib/src/utils/xml.d.ts +10 -0
- package/lib/src/utils/zip.d.ts +17 -0
- package/lib/test-project-d4f237d1.js +2 -0
- package/lib/test-project-d4f237d1.js.map +1 -0
- package/lib/text-ba532b40.js +10 -0
- package/lib/text-ba532b40.js.map +1 -0
- package/lib/tmp-bc08ebcf.js +10 -0
- package/lib/tmp-bc08ebcf.js.map +1 -0
- package/lib/toml-patch.es-6bd2145d.js +4 -0
- package/lib/toml-patch.es-6bd2145d.js.map +1 -0
- package/lib/vba-blocks-build-a717fcdb.js +10 -0
- package/lib/vba-blocks-build-a717fcdb.js.map +1 -0
- package/lib/vba-blocks-export-7e2c75cc.js +8 -0
- package/lib/vba-blocks-export-7e2c75cc.js.map +1 -0
- package/lib/vba-blocks-init-54531020.js +17 -0
- package/lib/vba-blocks-init-54531020.js.map +1 -0
- package/lib/vba-blocks-new-3210d92c.js +18 -0
- package/lib/vba-blocks-new-3210d92c.js.map +1 -0
- package/lib/vba-blocks-run-ab9d4ad4.js +11 -0
- package/lib/vba-blocks-run-ab9d4ad4.js.map +1 -0
- package/lib/vba-blocks-test-da5dba90.js +16 -0
- package/lib/vba-blocks-test-da5dba90.js.map +1 -0
- package/lib/vba-blocks-version-e1b3c35a.js +9 -0
- package/lib/vba-blocks-version-e1b3c35a.js.map +1 -0
- package/lib/vba-blocks.js +43 -0
- package/lib/vba-blocks.js.map +1 -0
- package/lib/workbook-xml-69fff4ae.js +3 -0
- package/lib/workbook-xml-69fff4ae.js.map +1 -0
- package/package.json +116 -0
- package/run-scripts/run.applescript +78 -0
- package/run-scripts/run.ps1 +211 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";var t=require("fs"),e=require("path"),r=require("./minimatch-3a1d1fa9.js"),n=require("./inherits-713f4554.js"),i=require("events"),o=require("assert"),s=require("util"),a=require("./once-9eb67b4f.js"),u=require("./_commonjsHelpers-553b27b3.js"),c=require("./text-ba532b40.js"),f=require("stream"),l=require("./index-b49bd5b2.js"),h=require("buffer"),p=require("zlib"),d=require("string_decoder");function y(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function m(t,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(r){if("default"!==r&&!(r in t)){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}))})),Object.freeze(t)}var g=y(t),v=y(e),b=y(i),w=y(o),E=y(s),S=y(f),O=y(h),I=y(p),T=y(d),A="win32"===process.platform,k=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function j(t){return"function"==typeof t?t:function(){var t;if(k){var e=new Error;t=function(t){t&&(e.message=t.message,r(t=e))}}else t=r;return t;function r(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(v.default.normalize,A)var L=/(.*?)(?:[\/\\]+|$)/g;else L=/(.*?)(?:[\/]+|$)/g;if(A)var D=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else D=/^[\/]*/;var B=function(t,e){if(t=v.default.resolve(t),e&&Object.prototype.hasOwnProperty.call(e,t))return e[t];var r,n,i,o,s=t,a={},u={};function c(){var e=D.exec(t);r=e[0].length,n=e[0],i=e[0],o="",A&&!u[i]&&(g.default.lstatSync(i),u[i]=!0)}for(c();r<t.length;){L.lastIndex=r;var f=L.exec(t);if(o=n,n+=f[0],i=o+f[1],r=L.lastIndex,!(u[i]||e&&e[i]===i)){var l;if(e&&Object.prototype.hasOwnProperty.call(e,i))l=e[i];else{var h=g.default.lstatSync(i);if(!h.isSymbolicLink()){u[i]=!0,e&&(e[i]=i);continue}var p=null;if(!A){var d=h.dev.toString(32)+":"+h.ino.toString(32);a.hasOwnProperty(d)&&(p=a[d])}null===p&&(g.default.statSync(i),p=g.default.readlinkSync(i)),l=v.default.resolve(o,p),e&&(e[i]=l),A||(a[d]=p)}t=v.default.resolve(l,t.slice(r)),c()}}return e&&(e[s]=t),t},z=function(t,e,r){if("function"!=typeof r&&(r=j(e),e=null),t=v.default.resolve(t),e&&Object.prototype.hasOwnProperty.call(e,t))return process.nextTick(r.bind(null,null,e[t]));var n,i,o,s,a=t,u={},c={};function f(){var e=D.exec(t);n=e[0].length,i=e[0],o=e[0],s="",A&&!c[o]?g.default.lstat(o,(function(t){if(t)return r(t);c[o]=!0,l()})):process.nextTick(l)}function l(){if(n>=t.length)return e&&(e[a]=t),r(null,t);L.lastIndex=n;var u=L.exec(t);return s=i,i+=u[0],o=s+u[1],n=L.lastIndex,c[o]||e&&e[o]===o?process.nextTick(l):e&&Object.prototype.hasOwnProperty.call(e,o)?d(e[o]):g.default.lstat(o,h)}function h(t,n){if(t)return r(t);if(!n.isSymbolicLink())return c[o]=!0,e&&(e[o]=o),process.nextTick(l);if(!A){var i=n.dev.toString(32)+":"+n.ino.toString(32);if(u.hasOwnProperty(i))return p(null,u[i],o)}g.default.stat(o,(function(t){if(t)return r(t);g.default.readlink(o,(function(t,e){A||(u[i]=e),p(t,e)}))}))}function p(t,n,i){if(t)return r(t);var o=v.default.resolve(s,n);e&&(e[i]=o),d(o)}function d(e){t=v.default.resolve(e,t.slice(n)),f()}f()},x=N;N.realpath=N,N.sync=U,N.realpathSync=U,N.monkeypatch=function(){g.default.realpath=N,g.default.realpathSync=U},N.unmonkeypatch=function(){g.default.realpath=R,g.default.realpathSync=C};var R=g.default.realpath,C=g.default.realpathSync,P=process.version,F=/^v[0-5]\./.test(P);function M(t){return t&&"realpath"===t.syscall&&("ELOOP"===t.code||"ENOMEM"===t.code||"ENAMETOOLONG"===t.code)}function N(t,e,r){if(F)return R(t,e,r);"function"==typeof e&&(r=e,e=null),R(t,e,(function(n,i){M(n)?z(t,e,r):r(n,i)}))}function U(t,e){if(F)return C(t,e);try{return C(t,e)}catch(r){if(M(r))return B(t,e);throw r}}function G(t){return"/"===t.charAt(0)}function Z(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(t),r=e[1]||"",n=Boolean(r&&":"!==r.charAt(1));return Boolean(e[2]||n)}var H="win32"===process.platform?Z:G,Q=G,q=Z;H.posix=Q,H.win32=q;var V=ot,$=it,Y=function(t,e,r){r||(r={});if(r.matchBase&&-1===e.indexOf("/")){if(r.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}t.silent=!!r.silent,t.pattern=e,t.strict=!1!==r.strict,t.realpath=!!r.realpath,t.realpathCache=r.realpathCache||Object.create(null),t.follow=!!r.follow,t.dot=!!r.dot,t.mark=!!r.mark,t.nodir=!!r.nodir,t.nodir&&(t.mark=!0);t.sync=!!r.sync,t.nounique=!!r.nounique,t.nonull=!!r.nonull,t.nosort=!!r.nosort,t.nocase=!!r.nocase,t.stat=!!r.stat,t.noprocess=!!r.noprocess,t.absolute=!!r.absolute,t.maxLength=r.maxLength||1/0,t.cache=r.cache||Object.create(null),t.statCache=r.statCache||Object.create(null),t.symlinks=r.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(st))}(t,r),t.changedCwd=!1;var n=process.cwd();rt(r,"cwd")?(t.cwd=v.default.resolve(r.cwd),t.changedCwd=t.cwd!==n):t.cwd=n;t.root=r.root||v.default.resolve(t.cwd,"/"),t.root=v.default.resolve(t.root),"win32"===process.platform&&(t.root=t.root.replace(/\\/g,"/"));t.cwdAbs=H(t.cwd)?t.cwd:at(t,t.cwd),"win32"===process.platform&&(t.cwdAbs=t.cwdAbs.replace(/\\/g,"/"));t.nomount=!!r.nomount,r.nonegate=!0,r.nocomment=!0,t.minimatch=new nt(e,r),t.options=t.minimatch.options},W=rt,K=at,X=function(t){for(var e=t.nounique,r=e?[]:Object.create(null),n=0,i=t.matches.length;n<i;n++){var o=t.matches[n];if(o&&0!==Object.keys(o).length){var s=Object.keys(o);e?r.push.apply(r,s):s.forEach((function(t){r[t]=!0}))}else if(t.nonull){var a=t.minimatch.globSet[n];e?r.push(a):r[a]=!0}}e||(r=Object.keys(r));t.nosort||(r=r.sort(t.nocase?it:ot));if(t.mark){for(n=0;n<r.length;n++)r[n]=t._mark(r[n]);t.nodir&&(r=r.filter((function(e){var r=!/\/$/.test(e),n=t.cache[e]||t.cache[at(t,e)];return r&&n&&(r="DIR"!==n&&!Array.isArray(n)),r})))}t.ignore.length&&(r=r.filter((function(e){return!ut(t,e)})));t.found=r},J=function(t,e){var r=at(t,e),n=t.cache[r],i=e;if(n){var o="DIR"===n||Array.isArray(n),s="/"===e.slice(-1);if(o&&!s?i+="/":!o&&s&&(i=i.slice(0,-1)),i!==e){var a=at(t,i);t.statCache[a]=t.statCache[r],t.cache[a]=t.cache[r]}}return i},tt=ut,et=function(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return!(!t.gmatcher||!t.gmatcher.match(e))}))};function rt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var nt=r.minimatch_1.Minimatch;function it(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}function ot(t,e){return t.localeCompare(e)}function st(t){var e=null;if("/**"===t.slice(-3)){var r=t.replace(/(\/\*\*)+$/,"");e=new nt(r,{dot:!0})}return{matcher:new nt(t,{dot:!0}),gmatcher:e}}function at(t,e){var r=e;return r="/"===e.charAt(0)?v.default.join(t.root,e):H(e)||""===e?e:t.changedCwd?v.default.resolve(t.cwd,e):v.default.resolve(e),"win32"===process.platform&&(r=r.replace(/\\/g,"/")),r}function ut(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return t.matcher.match(e)||!(!t.gmatcher||!t.gmatcher.match(e))}))}var ct={alphasort:V,alphasorti:$,setopts:Y,ownProp:W,makeAbs:K,finish:X,mark:J,isIgnored:tt,childrenIgnored:et},ft=bt,lt=mt;mt.GlobSync=_t,r.minimatch_1.Minimatch,ft.Glob;var ht=ct.setopts,pt=ct.ownProp,dt=ct.childrenIgnored,yt=ct.isIgnored;function mt(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 _t(t,e).found}function _t(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 _t))return new _t(t,e);if(ht(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}_t.prototype._finish=function(){if(w.default(this instanceof _t),this.realpath){var t=this;this.matches.forEach((function(e,r){var n=t.matches[r]=Object.create(null);for(var i in e)try{i=t._makeAbs(i),n[x.realpathSync(i,t.realpathCache)]=!0}catch(e){if("stat"!==e.syscall)throw e;n[t._makeAbs(i)]=!0}}))}ct.finish(this)},_t.prototype._process=function(t,e,n){w.default(this instanceof _t);for(var i,o=0;"string"==typeof t[o];)o++;switch(o){case t.length:return void this._processSimple(t.join("/"),e);case 0:i=null;break;default:i=t.slice(0,o).join("/")}var s,a=t.slice(o);null===i?s=".":H(i)||H(t.join("/"))?(i&&H(i)||(i="/"+i),s=i):s=i;var u=this._makeAbs(s);dt(this,s)||(a[0]===r.minimatch_1.GLOBSTAR?this._processGlobStar(i,s,u,a,e,n):this._processReaddir(i,s,u,a,e,n))},_t.prototype._processReaddir=function(t,e,r,n,i,o){var s=this._readdir(r,o);if(s){for(var a=n[0],u=!!this.minimatch.negate,c=a._glob,f=this.dot||"."===c.charAt(0),l=[],h=0;h<s.length;h++){if("."!==(y=s[h]).charAt(0)||f)(u&&!t?!y.match(a):y.match(a))&&l.push(y)}var p=l.length;if(0!==p)if(1!==n.length||this.mark||this.stat){n.shift();for(h=0;h<p;h++){var d;y=l[h];d=t?[t,y]:[y],this._process(d.concat(n),i,o)}}else{this.matches[i]||(this.matches[i]=Object.create(null));for(var h=0;h<p;h++){var y=l[h];t&&(y="/"!==t.slice(-1)?t+"/"+y:t+y),"/"!==y.charAt(0)||this.nomount||(y=v.default.join(this.root,y)),this._emitMatch(i,y)}}}},_t.prototype._emitMatch=function(t,e){if(!yt(this,e)){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}},_t.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r;try{r=g.default.lstatSync(t)}catch(t){if("ENOENT"===t.code)return null}var n=r&&r.isSymbolicLink();return this.symlinks[t]=n,n||!r||r.isDirectory()?e=this._readdir(t,!1):this.cache[t]="FILE",e},_t.prototype._readdir=function(t,e){if(e&&!pt(this.symlinks,t))return this._readdirInGlobStar(t);if(pt(this.cache,t)){var r=this.cache[t];if(!r||"FILE"===r)return null;if(Array.isArray(r))return r}try{return this._readdirEntries(t,g.default.readdirSync(t))}catch(e){return this._readdirError(t,e),null}},_t.prototype._readdirEntries=function(t,e){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,e},_t.prototype._readdirError=function(t,e){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);throw n.path=this.cwd,n.code=e.code,n}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)}},_t.prototype._processGlobStar=function(t,e,r,n,i,o){var s=this._readdir(r,o);if(s){var a=n.slice(1),u=t?[t]:[],c=u.concat(a);this._process(c,i,!1);var f=s.length;if(!this.symlinks[r]||!o)for(var l=0;l<f;l++){if("."!==s[l].charAt(0)||this.dot){var h=u.concat(s[l],a);this._process(h,i,!0);var p=u.concat(s[l],n);this._process(p,i,!0)}}}},_t.prototype._processSimple=function(t,e){var r=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),r){if(t&&H(t)&&!this.nomount){var n=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=v.default.join(this.root,t):(t=v.default.resolve(this.root,t),n&&(t+="/"))}"win32"===process.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}},_t.prototype._stat=function(t){var e=this._makeAbs(t),r="/"===t.slice(-1);if(t.length>this.maxLength)return!1;if(!this.stat&&pt(this.cache,e)){var n=this.cache[e];if(Array.isArray(n)&&(n="DIR"),!r||"DIR"===n)return n;if(r&&"FILE"===n)return!1}var i=this.statCache[e];if(!i){var o;try{o=g.default.lstatSync(e)}catch(t){if(t&&("ENOENT"===t.code||"ENOTDIR"===t.code))return this.statCache[e]=!1,!1}if(o&&o.isSymbolicLink())try{i=g.default.statSync(e)}catch(t){i=o}else i=o}this.statCache[e]=i;n=!0;return i&&(n=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||n,(!r||"FILE"!==n)&&n},_t.prototype._mark=function(t){return ct.mark(this,t)},_t.prototype._makeAbs=function(t){return ct.makeAbs(this,t)};var gt=Object.create(null),vt=a.wrappy_1((function(t,e){return gt[t]?(gt[t].push(e),null):(gt[t]=[e],function(t){return a.once_1((function e(){var r=gt[t],n=r.length,i=function(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n]=t[n];return r}(arguments);try{for(var o=0;o<n;o++)r[o].apply(null,i)}finally{r.length>n?(r.splice(0,n),process.nextTick((function(){e.apply(null,i)}))):delete gt[t]}}))}(t))}));var bt=Tt;r.minimatch_1.Minimatch;var wt=b.default.EventEmitter,Et=ct.setopts,St=ct.ownProp,Ot=ct.childrenIgnored,It=ct.isIgnored;function Tt(t,e,r){if("function"==typeof e&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return lt(t,e)}return new kt(t,e,r)}Tt.sync=lt;var At=Tt.GlobSync=lt.GlobSync;function kt(t,e,r){if("function"==typeof e&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new At(t,e)}if(!(this instanceof kt))return new kt(t,e,r);Et(this,t,e),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),"function"==typeof r&&(r=a.once_1(r),this.on("error",r),this.on("end",(function(t){r(null,t)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===n)return u();for(var o=!0,s=0;s<n;s++)this._process(this.minimatch.set[s],s,!1,u);function u(){--i._processing,i._processing<=0&&(o?process.nextTick((function(){i._finish()})):i._finish())}o=!1}Tt.glob=Tt,Tt.hasMagic=function(t,e){var r=function(t,e){if(null===e||"object"!=typeof e)return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}({},e);r.noprocess=!0;var n=new kt(t,r).minimatch.set;if(!t)return!1;if(n.length>1)return!0;for(var i=0;i<n[0].length;i++)if("string"!=typeof n[0][i])return!0;return!1},Tt.Glob=kt,n.inherits(kt,wt),kt.prototype._finish=function(){if(w.default(this instanceof kt),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();ct.finish(this),this.emit("end",this.found)}},kt.prototype._realpath=function(){if(!this._didRealpath){this._didRealpath=!0;var t=this.matches.length;if(0===t)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,n)}function n(){0==--t&&e._finish()}},kt.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var n=Object.keys(r),i=this,o=n.length;if(0===o)return e();var s=this.matches[t]=Object.create(null);n.forEach((function(r,n){r=i._makeAbs(r),x.realpath(r,i.realpathCache,(function(n,a){n?"stat"===n.syscall?s[r]=!0:i.emit("error",n):s[a]=!0,0==--o&&(i.matches[t]=s,e())}))}))},kt.prototype._mark=function(t){return ct.mark(this,t)},kt.prototype._makeAbs=function(t){return ct.makeAbs(this,t)},kt.prototype.abort=function(){this.aborted=!0,this.emit("abort")},kt.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))},kt.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 r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(e=0;e<n.length;e++){var i=n[e];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}},kt.prototype._process=function(t,e,n,i){if(w.default(this instanceof kt),w.default("function"==typeof i),!this.aborted)if(this._processing++,this.paused)this._processQueue.push([t,e,n,i]);else{for(var o,s=0;"string"==typeof t[s];)s++;switch(s){case t.length:return void this._processSimple(t.join("/"),e,i);case 0:o=null;break;default:o=t.slice(0,s).join("/")}var a,u=t.slice(s);null===o?a=".":H(o)||H(t.join("/"))?(o&&H(o)||(o="/"+o),a=o):a=o;var c=this._makeAbs(a);if(Ot(this,a))return i();u[0]===r.minimatch_1.GLOBSTAR?this._processGlobStar(o,a,c,u,e,n,i):this._processReaddir(o,a,c,u,e,n,i)}},kt.prototype._processReaddir=function(t,e,r,n,i,o,s){var a=this;this._readdir(r,o,(function(u,c){return a._processReaddir2(t,e,r,n,i,o,c,s)}))},kt.prototype._processReaddir2=function(t,e,r,n,i,o,s,a){if(!s)return a();for(var u=n[0],c=!!this.minimatch.negate,f=u._glob,l=this.dot||"."===f.charAt(0),h=[],p=0;p<s.length;p++){if("."!==(y=s[p]).charAt(0)||l)(c&&!t?!y.match(u):y.match(u))&&h.push(y)}var d=h.length;if(0===d)return a();if(1===n.length&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(p=0;p<d;p++){var y=h[p];t&&(y="/"!==t?t+"/"+y:t+y),"/"!==y.charAt(0)||this.nomount||(y=v.default.join(this.root,y)),this._emitMatch(i,y)}return a()}n.shift();for(p=0;p<d;p++){y=h[p];t&&(y="/"!==t?t+"/"+y:t+y),this._process([y].concat(n),i,o,a)}a()},kt.prototype._emitMatch=function(t,e){if(!this.aborted&&!It(this,e))if(this.paused)this._emitQueue.push([t,e]);else{var r=H(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[t][e]=!0;var i=this.statCache[r];i&&this.emit("stat",e,i),this.emit("match",e)}}},kt.prototype._readdirInGlobStar=function(t,e){if(!this.aborted){if(this.follow)return this._readdir(t,!1,e);var r=this,n=vt("lstat\0"+t,(function(n,i){if(n&&"ENOENT"===n.code)return e();var o=i&&i.isSymbolicLink();r.symlinks[t]=o,o||!i||i.isDirectory()?r._readdir(t,!1,e):(r.cache[t]="FILE",e())}));n&&g.default.lstat(t,n)}},kt.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=vt("readdir\0"+t+"\0"+e,r))){if(e&&!St(this.symlinks,t))return this._readdirInGlobStar(t,r);if(St(this.cache,t)){var n=this.cache[t];if(!n||"FILE"===n)return r();if(Array.isArray(n))return r(null,n)}g.default.readdir(t,function(t,e,r){return function(n,i){n?t._readdirError(e,n,r):t._readdirEntries(e,i,r)}}(this,t,r))}},kt.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<e.length;n++){var i=e[n];i="/"===t?t+i:t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,r(null,e)}},kt.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(t);if(this.cache[n]="FILE",n===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=e.code,this.emit("error",i),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 r()}},kt.prototype._processGlobStar=function(t,e,r,n,i,o,s){var a=this;this._readdir(r,o,(function(u,c){a._processGlobStar2(t,e,r,n,i,o,c,s)}))},kt.prototype._processGlobStar2=function(t,e,r,n,i,o,s,a){if(!s)return a();var u=n.slice(1),c=t?[t]:[],f=c.concat(u);this._process(f,i,!1,a);var l=this.symlinks[r],h=s.length;if(l&&o)return a();for(var p=0;p<h;p++){if("."!==s[p].charAt(0)||this.dot){var d=c.concat(s[p],u);this._process(d,i,!0,a);var y=c.concat(s[p],n);this._process(y,i,!0,a)}}a()},kt.prototype._processSimple=function(t,e,r){var n=this;this._stat(t,(function(i,o){n._processSimple2(t,e,i,o,r)}))},kt.prototype._processSimple2=function(t,e,r,n,i){if(this.matches[e]||(this.matches[e]=Object.create(null)),!n)return i();if(t&&H(t)&&!this.nomount){var o=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=v.default.join(this.root,t):(t=v.default.resolve(this.root,t),o&&(t+="/"))}"win32"===process.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),i()},kt.prototype._stat=function(t,e){var r=this._makeAbs(t),n="/"===t.slice(-1);if(t.length>this.maxLength)return e();if(!this.stat&&St(this.cache,r)){var i=this.cache[r];if(Array.isArray(i)&&(i="DIR"),!n||"DIR"===i)return e(null,i);if(n&&"FILE"===i)return e()}var o=this.statCache[r];if(void 0!==o){if(!1===o)return e(null,o);var s=o.isDirectory()?"DIR":"FILE";return n&&"FILE"===s?e():e(null,s,o)}var a=this,u=vt("stat\0"+r,(function(n,i){if(i&&i.isSymbolicLink())return g.default.stat(r,(function(n,o){n?a._stat2(t,r,null,i,e):a._stat2(t,r,n,o,e)}));a._stat2(t,r,n,i,e)}));u&&g.default.lstat(r,u)},kt.prototype._stat2=function(t,e,r,n,i){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[e]=!1,i();var o="/"===t.slice(-1);if(this.statCache[e]=n,"/"===e.slice(-1)&&n&&!n.isDirectory())return i(null,!1,n);var s=!0;return n&&(s=n.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||s,o&&"FILE"===s?i():i(null,s,n)};var jt=u.createCommonjsModule((function(t,e){u.commonjsGlobal,function(e){function r(t,e){e|=0;for(var r=Math.max(t.length-e,0),n=Array(r),i=0;i<r;i++)n[i]=t[e+i];return n}var n=function(t){var e=r(arguments,1);return function(){var n=r(arguments);return t.apply(null,e.concat(n))}},i=function(t){return function(){var e=r(arguments),n=e.pop();t.call(this,e,n)}};function o(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var s="function"==typeof setImmediate&&setImmediate,a="object"==typeof process&&"function"==typeof process.nextTick;function c(t){setTimeout(t,0)}function f(t){return function(e){var n=r(arguments,1);t((function(){e.apply(null,n)}))}}var l=f(s?setImmediate:a?process.nextTick:c);function h(t){return i((function(e,r){var n;try{n=t.apply(this,e)}catch(t){return r(t)}o(n)&&"function"==typeof n.then?n.then((function(t){p(r,null,t)}),(function(t){p(r,t.message?t:new Error(t))})):r(null,n)}))}function p(t,e,r){try{t(e,r)}catch(t){l(d,t)}}function d(t){throw t}var y="function"==typeof Symbol;function m(t){return y&&"AsyncFunction"===t[Symbol.toStringTag]}function _(t){return m(t)?h(t):t}function g(t){return function(e){var n=r(arguments,1),o=i((function(r,n){var i=this;return t(e,(function(t,e){_(t).apply(i,r.concat(e))}),n)}));return n.length?o.apply(this,n):o}}var v="object"==typeof u.commonjsGlobal&&u.commonjsGlobal&&u.commonjsGlobal.Object===Object&&u.commonjsGlobal,b="object"==typeof self&&self&&self.Object===Object&&self,w=v||b||Function("return this")(),E=w.Symbol,S=Object.prototype,O=S.hasOwnProperty,I=S.toString,T=E?E.toStringTag:void 0;function A(t){var e=O.call(t,T),r=t[T];try{t[T]=void 0;var n=!0}catch(t){}var i=I.call(t);return n&&(e?t[T]=r:delete t[T]),i}var k=Object.prototype,j=k.toString;function L(t){return j.call(t)}var D="[object Null]",B="[object Undefined]",z=E?E.toStringTag:void 0;function x(t){return null==t?void 0===t?B:D:z&&z in Object(t)?A(t):L(t)}var R="[object AsyncFunction]",C="[object Function]",P="[object GeneratorFunction]",F="[object Proxy]";function M(t){if(!o(t))return!1;var e=x(t);return e==C||e==P||e==R||e==F}var N=9007199254740991;function U(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=N}function G(t){return null!=t&&U(t.length)&&!M(t)}var Z={};function H(){}function Q(t){return function(){if(null!==t){var e=t;t=null,e.apply(this,arguments)}}}var q="function"==typeof Symbol&&Symbol.iterator,V=function(t){return q&&t[q]&&t[q]()};function $(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Y(t){return null!=t&&"object"==typeof t}var W="[object Arguments]";function K(t){return Y(t)&&x(t)==W}var X=Object.prototype,J=X.hasOwnProperty,tt=X.propertyIsEnumerable,et=K(function(){return arguments}())?K:function(t){return Y(t)&&J.call(t,"callee")&&!tt.call(t,"callee")},rt=Array.isArray;function nt(){return!1}var it="object"==typeof e&&e&&!e.nodeType&&e,ot=it&&t&&!t.nodeType&&t,st=ot&&ot.exports===it?w.Buffer:void 0,at=(st?st.isBuffer:void 0)||nt,ut=9007199254740991,ct=/^(?:0|[1-9]\d*)$/;function ft(t,e){var r=typeof t;return!!(e=null==e?ut:e)&&("number"==r||"symbol"!=r&&ct.test(t))&&t>-1&&t%1==0&&t<e}var lt="[object Arguments]",ht="[object Array]",pt="[object Boolean]",dt="[object Date]",yt="[object Error]",mt="[object Function]",_t="[object Map]",gt="[object Number]",vt="[object Object]",bt="[object RegExp]",wt="[object Set]",Et="[object String]",St="[object WeakMap]",Ot="[object ArrayBuffer]",It="[object DataView]",Tt="[object Float64Array]",At="[object Int8Array]",kt="[object Int16Array]",jt="[object Int32Array]",Lt="[object Uint8Array]",Dt="[object Uint8ClampedArray]",Bt="[object Uint16Array]",zt="[object Uint32Array]",xt={};function Rt(t){return Y(t)&&U(t.length)&&!!xt[x(t)]}function Ct(t){return function(e){return t(e)}}xt["[object Float32Array]"]=xt[Tt]=xt[At]=xt[kt]=xt[jt]=xt[Lt]=xt[Dt]=xt[Bt]=xt[zt]=!0,xt[lt]=xt[ht]=xt[Ot]=xt[pt]=xt[It]=xt[dt]=xt[yt]=xt[mt]=xt[_t]=xt[gt]=xt[vt]=xt[bt]=xt[wt]=xt[Et]=xt[St]=!1;var Pt="object"==typeof e&&e&&!e.nodeType&&e,Ft=Pt&&t&&!t.nodeType&&t,Mt=Ft&&Ft.exports===Pt&&v.process,Nt=function(){try{var t=Ft&&Ft.require&&Ft.require("util").types;return t||Mt&&Mt.binding&&Mt.binding("util")}catch(t){}}(),Ut=Nt&&Nt.isTypedArray,Gt=Ut?Ct(Ut):Rt,Zt=Object.prototype,Ht=Zt.hasOwnProperty;function Qt(t,e){var r=rt(t),n=!r&&et(t),i=!r&&!n&&at(t),o=!r&&!n&&!i&&Gt(t),s=r||n||i||o,a=s?$(t.length,String):[],u=a.length;for(var c in t)!e&&!Ht.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ft(c,u))||a.push(c);return a}var qt=Object.prototype;function Vt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||qt)}function $t(t,e){return function(r){return t(e(r))}}var Yt=$t(Object.keys,Object),Wt=Object.prototype,Kt=Wt.hasOwnProperty;function Xt(t){if(!Vt(t))return Yt(t);var e=[];for(var r in Object(t))Kt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Jt(t){return G(t)?Qt(t):Xt(t)}function te(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function ee(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}function re(t){var e=Jt(t),r=-1,n=e.length;return function i(){var o=e[++r];return"__proto__"===o?i():r<n?{value:t[o],key:o}:null}}function ne(t){if(G(t))return te(t);var e=V(t);return e?ee(e):re(t)}function ie(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}function oe(t){return function(e,r,n){if(n=Q(n||H),t<=0||!e)return n(null);var i=ne(e),o=!1,s=0,a=!1;function u(t,e){if(s-=1,t)o=!0,n(t);else{if(e===Z||o&&s<=0)return o=!0,n(null);a||c()}}function c(){for(a=!0;s<t&&!o;){var e=i();if(null===e)return o=!0,void(s<=0&&n(null));s+=1,r(e.value,e.key,ie(u))}a=!1}c()}}function se(t,e,r,n){oe(e)(t,_(r),n)}function ae(t,e){return function(r,n,i){return t(r,e,n,i)}}function ue(t,e,r){r=Q(r||H);var n=0,i=0,o=t.length;function s(t,e){t?r(t):++i!==o&&e!==Z||r(null)}for(0===o&&r(null);n<o;n++)e(t[n],n,ie(s))}var ce=ae(se,1/0),fe=function(t,e,r){(G(t)?ue:ce)(t,_(e),r)};function le(t){return function(e,r,n){return t(fe,e,_(r),n)}}function he(t,e,r,n){n=n||H,e=e||[];var i=[],o=0,s=_(r);t(e,(function(t,e,r){var n=o++;s(t,(function(t,e){i[n]=e,r(t)}))}),(function(t){n(t,i)}))}var pe=le(he),de=g(pe);function ye(t){return function(e,r,n,i){return t(oe(r),e,_(n),i)}}var me=ye(he),_e=ae(me,1),ge=g(_e);function ve(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function be(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),a=s.length;a--;){var u=s[t?a:++i];if(!1===r(o[u],u,o))break}return e}}var we=be();function Ee(t,e){return t&&we(t,e,Jt)}function Se(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Oe(t){return t!=t}function Ie(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}function Te(t,e,r){return e==e?Ie(t,e,r):Se(t,Oe,r)}var Ae=function(t,e,n){"function"==typeof e&&(n=e,e=null),n=Q(n||H);var i=Jt(t).length;if(!i)return n(null);e||(e=i);var o={},s=0,a=!1,u=Object.create(null),c=[],f=[],l={};function h(t,e){c.push((function(){m(t,e)}))}function p(){if(0===c.length&&0===s)return n(null,o);for(;c.length&&s<e;)c.shift()()}function d(t,e){var r=u[t];r||(r=u[t]=[]),r.push(e)}function y(t){ve(u[t]||[],(function(t){t()})),p()}function m(t,e){if(!a){var i=ie((function(e,i){if(s--,arguments.length>2&&(i=r(arguments,1)),e){var c={};Ee(o,(function(t,e){c[e]=t})),c[t]=i,a=!0,u=Object.create(null),n(e,c)}else o[t]=i,y(t)}));s++;var c=_(e[e.length-1]);e.length>1?c(o,i):c(i)}}function g(){for(var t=0;f.length;)t++,ve(v(f.pop()),(function(t){0==--l[t]&&f.push(t)}));if(t!==i)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function v(e){var r=[];return Ee(t,(function(t,n){rt(t)&&Te(t,e,0)>=0&&r.push(n)})),r}Ee(t,(function(e,r){if(!rt(e))return h(r,[e]),void f.push(r);var n=e.slice(0,e.length-1),i=n.length;if(0===i)return h(r,e),void f.push(r);l[r]=i,ve(n,(function(o){if(!t[o])throw new Error("async.auto task `"+r+"` has a non-existent dependency `"+o+"` in "+n.join(", "));d(o,(function(){0==--i&&h(r,e)}))}))})),g(),p()};function ke(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var je="[object Symbol]";function Le(t){return"symbol"==typeof t||Y(t)&&x(t)==je}var De=1/0,Be=E?E.prototype:void 0,ze=Be?Be.toString:void 0;function xe(t){if("string"==typeof t)return t;if(rt(t))return ke(t,xe)+"";if(Le(t))return ze?ze.call(t):"";var e=t+"";return"0"==e&&1/t==-De?"-0":e}function Re(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}function Ce(t,e,r){var n=t.length;return r=void 0===r?n:r,!e&&r>=n?t:Re(t,e,r)}function Pe(t,e){for(var r=t.length;r--&&Te(e,t[r],0)>-1;);return r}function Fe(t,e){for(var r=-1,n=t.length;++r<n&&Te(e,t[r],0)>-1;);return r}function Me(t){return t.split("")}var Ne=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Ue(t){return Ne.test(t)}var Ge="\\ud800-\\udfff",Ze="["+Ge+"]",He="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Qe="\\ud83c[\\udffb-\\udfff]",qe="[^"+Ge+"]",Ve="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",Ye="(?:"+He+"|"+Qe+")?",We="[\\ufe0e\\ufe0f]?",Ke="(?:\\u200d(?:"+[qe,Ve,$e].join("|")+")"+We+Ye+")*",Xe=We+Ye+Ke,Je="(?:"+[qe+He+"?",He,Ve,$e,Ze].join("|")+")",tr=RegExp(Qe+"(?="+Qe+")|"+Je+Xe,"g");function er(t){return t.match(tr)||[]}function rr(t){return Ue(t)?er(t):Me(t)}function nr(t){return null==t?"":xe(t)}var ir=/^\s+|\s+$/g;function or(t,e,r){if((t=nr(t))&&(r||void 0===e))return t.replace(ir,"");if(!t||!(e=xe(e)))return t;var n=rr(t),i=rr(e);return Ce(n,Fe(n,i),Pe(n,i)+1).join("")}var sr=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,ar=/,/,ur=/(=.+)?(\s*)$/,cr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function fr(t){return t=(t=(t=(t=t.toString().replace(cr,"")).match(sr)[2].replace(" ",""))?t.split(ar):[]).map((function(t){return or(t.replace(ur,""))}))}function lr(t,e){var r={};Ee(t,(function(t,e){var n,i=m(t),o=!i&&1===t.length||i&&0===t.length;if(rt(t))n=t.slice(0,-1),t=t[t.length-1],r[e]=n.concat(n.length>0?s:t);else if(o)r[e]=t;else{if(n=fr(t),0===t.length&&!i&&0===n.length)throw new Error("autoInject task functions require explicit parameters.");i||n.pop(),r[e]=n.concat(s)}function s(e,r){var i=ke(n,(function(t){return e[t]}));i.push(r),_(t).apply(null,i)}})),Ae(r,e)}function hr(){this.head=this.tail=null,this.length=0}function pr(t,e){t.length=1,t.head=t.tail=e}function dr(t,e,r){if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var n=_(t),i=0,o=[],s=!1;function a(t,e,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(f.started=!0,rt(t)||(t=[t]),0===t.length&&f.idle())return l((function(){f.drain()}));for(var n=0,i=t.length;n<i;n++){var o={data:t[n],callback:r||H};e?f._tasks.unshift(o):f._tasks.push(o)}s||(s=!0,l((function(){s=!1,f.process()})))}function u(t){return function(e){i-=1;for(var r=0,n=t.length;r<n;r++){var s=t[r],a=Te(o,s,0);0===a?o.shift():a>0&&o.splice(a,1),s.callback.apply(s,arguments),null!=e&&f.error(e,s.data)}i<=f.concurrency-f.buffer&&f.unsaturated(),f.idle()&&f.drain(),f.process()}}var c=!1,f={_tasks:new hr,concurrency:e,payload:r,saturated:H,unsaturated:H,buffer:e/4,empty:H,drain:H,error:H,started:!1,paused:!1,push:function(t,e){a(t,!1,e)},kill:function(){f.drain=H,f._tasks.empty()},unshift:function(t,e){a(t,!0,e)},remove:function(t){f._tasks.remove(t)},process:function(){if(!c){for(c=!0;!f.paused&&i<f.concurrency&&f._tasks.length;){var t=[],e=[],r=f._tasks.length;f.payload&&(r=Math.min(r,f.payload));for(var s=0;s<r;s++){var a=f._tasks.shift();t.push(a),o.push(a),e.push(a.data)}i+=1,0===f._tasks.length&&f.empty(),i===f.concurrency&&f.saturated();var l=ie(u(t));n(e,l)}c=!1}},length:function(){return f._tasks.length},running:function(){return i},workersList:function(){return o},idle:function(){return f._tasks.length+i===0},pause:function(){f.paused=!0},resume:function(){!1!==f.paused&&(f.paused=!1,l(f.process))}};return f}function yr(t,e){return dr(t,1,e)}hr.prototype.removeLink=function(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t},hr.prototype.empty=function(){for(;this.head;)this.shift();return this},hr.prototype.insertAfter=function(t,e){e.prev=t,e.next=t.next,t.next?t.next.prev=e:this.tail=e,t.next=e,this.length+=1},hr.prototype.insertBefore=function(t,e){e.prev=t.prev,e.next=t,t.prev?t.prev.next=e:this.head=e,t.prev=e,this.length+=1},hr.prototype.unshift=function(t){this.head?this.insertBefore(this.head,t):pr(this,t)},hr.prototype.push=function(t){this.tail?this.insertAfter(this.tail,t):pr(this,t)},hr.prototype.shift=function(){return this.head&&this.removeLink(this.head)},hr.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},hr.prototype.toArray=function(){for(var t=Array(this.length),e=this.head,r=0;r<this.length;r++)t[r]=e.data,e=e.next;return t},hr.prototype.remove=function(t){for(var e=this.head;e;){var r=e.next;t(e)&&this.removeLink(e),e=r}return this};var mr=ae(se,1);function _r(t,e,r,n){n=Q(n||H);var i=_(r);mr(t,(function(t,r,n){i(e,t,(function(t,r){e=r,n(t)}))}),(function(t){n(t,e)}))}function gr(){var t=ke(arguments,_);return function(){var e=r(arguments),n=this,i=e[e.length-1];"function"==typeof i?e.pop():i=H,_r(t,e,(function(t,e,i){e.apply(n,t.concat((function(t){var e=r(arguments,1);i(t,e)})))}),(function(t,e){i.apply(n,[t].concat(e))}))}}var vr=function(){return gr.apply(null,r(arguments).reverse())},br=Array.prototype.concat,wr=function(t,e,n,i){i=i||H;var o=_(n);me(t,e,(function(t,e){o(t,(function(t){return t?e(t):e(null,r(arguments,1))}))}),(function(t,e){for(var r=[],n=0;n<e.length;n++)e[n]&&(r=br.apply(r,e[n]));return i(t,r)}))},Er=ae(wr,1/0),Sr=ae(wr,1),Or=function(){var t=r(arguments),e=[null].concat(t);return function(){return arguments[arguments.length-1].apply(this,e)}};function Ir(t){return t}function Tr(t,e){return function(r,n,i,o){o=o||H;var s,a=!1;r(n,(function(r,n,o){i(r,(function(n,i){n?o(n):t(i)&&!s?(a=!0,s=e(!0,r),o(null,Z)):o()}))}),(function(t){t?o(t):o(null,a?s:e(!1))}))}}function Ar(t,e){return e}var kr=le(Tr(Ir,Ar)),jr=ye(Tr(Ir,Ar)),Lr=ae(jr,1);function Dr(t){return function(e){var n=r(arguments,1);n.push((function(e){var n=r(arguments,1);"object"==typeof console&&(e?console.error&&console.error(e):console[t]&&ve(n,(function(e){console[t](e)})))})),_(e).apply(null,n)}}var Br=Dr("dir");function zr(t,e,n){n=ie(n||H);var i=_(t),o=_(e);function s(t){if(t)return n(t);var e=r(arguments,1);e.push(a),o.apply(this,e)}function a(t,e){return t?n(t):e?void i(s):n(null)}a(null,!0)}function xr(t,e,n){n=ie(n||H);var i=_(t),o=function(t){if(t)return n(t);var s=r(arguments,1);if(e.apply(this,s))return i(o);n.apply(null,[null].concat(s))};i(o)}function Rr(t,e,r){xr(t,(function(){return!e.apply(this,arguments)}),r)}function Cr(t,e,r){r=ie(r||H);var n=_(e),i=_(t);function o(t){if(t)return r(t);i(s)}function s(t,e){return t?r(t):e?void n(o):r(null)}i(s)}function Pr(t){return function(e,r,n){return t(e,n)}}function Fr(t,e,r){fe(t,Pr(_(e)),r)}function Mr(t,e,r,n){oe(e)(t,Pr(_(r)),n)}var Nr=ae(Mr,1);function Ur(t){return m(t)?t:i((function(e,r){var n=!0;e.push((function(){var t=arguments;n?l((function(){r.apply(null,t)})):r.apply(null,t)})),t.apply(this,e),n=!1}))}function Gr(t){return!t}var Zr=le(Tr(Gr,Gr)),Hr=ye(Tr(Gr,Gr)),Qr=ae(Hr,1);function qr(t){return function(e){return null==e?void 0:e[t]}}function Vr(t,e,r,n){var i=new Array(e.length);t(e,(function(t,e,n){r(t,(function(t,r){i[e]=!!r,n(t)}))}),(function(t){if(t)return n(t);for(var r=[],o=0;o<e.length;o++)i[o]&&r.push(e[o]);n(null,r)}))}function $r(t,e,r,n){var i=[];t(e,(function(t,e,n){r(t,(function(r,o){r?n(r):(o&&i.push({index:e,value:t}),n())}))}),(function(t){t?n(t):n(null,ke(i.sort((function(t,e){return t.index-e.index})),qr("value")))}))}function Yr(t,e,r,n){(G(e)?Vr:$r)(t,e,_(r),n||H)}var Wr=le(Yr),Kr=ye(Yr),Xr=ae(Kr,1);function Jr(t,e){var r=ie(e||H),n=_(Ur(t));function i(t){if(t)return r(t);n(i)}i()}var tn=function(t,e,r,n){n=n||H;var i=_(r);me(t,e,(function(t,e){i(t,(function(r,n){return r?e(r):e(null,{key:n,val:t})}))}),(function(t,e){for(var r={},i=Object.prototype.hasOwnProperty,o=0;o<e.length;o++)if(e[o]){var s=e[o].key,a=e[o].val;i.call(r,s)?r[s].push(a):r[s]=[a]}return n(t,r)}))},en=ae(tn,1/0),rn=ae(tn,1),nn=Dr("log");function on(t,e,r,n){n=Q(n||H);var i={},o=_(r);se(t,e,(function(t,e,r){o(t,e,(function(t,n){if(t)return r(t);i[e]=n,r()}))}),(function(t){n(t,i)}))}var sn=ae(on,1/0),an=ae(on,1);function un(t,e){return e in t}function cn(t,e){var n=Object.create(null),o=Object.create(null);e=e||Ir;var s=_(t),a=i((function(t,i){var a=e.apply(null,t);un(n,a)?l((function(){i.apply(null,n[a])})):un(o,a)?o[a].push(i):(o[a]=[i],s.apply(null,t.concat((function(){var t=r(arguments);n[a]=t;var e=o[a];delete o[a];for(var i=0,s=e.length;i<s;i++)e[i].apply(null,t)}))))}));return a.memo=n,a.unmemoized=t,a}var fn=f(a?process.nextTick:s?setImmediate:c);function ln(t,e,n){n=n||H;var i=G(e)?[]:{};t(e,(function(t,e,n){_(t)((function(t,o){arguments.length>2&&(o=r(arguments,1)),i[e]=o,n(t)}))}),(function(t){n(t,i)}))}function hn(t,e){ln(fe,t,e)}function pn(t,e,r){ln(oe(e),t,r)}var dn=function(t,e){var r=_(t);return dr((function(t,e){r(t[0],e)}),e,1)},yn=function(t,e){var r=dn(t,e);return r.push=function(t,e,n){if(null==n&&(n=H),"function"!=typeof n)throw new Error("task callback must be a function");if(r.started=!0,rt(t)||(t=[t]),0===t.length)return l((function(){r.drain()}));e=e||0;for(var i=r._tasks.head;i&&e>=i.priority;)i=i.next;for(var o=0,s=t.length;o<s;o++){var a={data:t[o],priority:e,callback:n};i?r._tasks.insertBefore(i,a):r._tasks.push(a)}l(r.process)},delete r.unshift,r};function mn(t,e){if(e=Q(e||H),!rt(t))return e(new TypeError("First argument to race must be an array of functions"));if(!t.length)return e();for(var r=0,n=t.length;r<n;r++)_(t[r])(e)}function _n(t,e,n,i){_r(r(t).reverse(),e,n,i)}function gn(t){var e=_(t);return i((function(t,n){return t.push((function(t,e){var i;t?n(null,{error:t}):(i=arguments.length<=2?e:r(arguments,1),n(null,{value:i}))})),e.apply(this,t)}))}function vn(t){var e;return rt(t)?e=ke(t,gn):(e={},Ee(t,(function(t,r){e[r]=gn.call(this,t)}))),e}function bn(t,e,r,n){Yr(t,e,(function(t,e){r(t,(function(t,r){e(t,!r)}))}),n)}var wn=le(bn),En=ye(bn),Sn=ae(En,1);function On(t){return function(){return t}}function In(t,e,r){var n=5,i=0,o={times:n,intervalFunc:On(i)};function s(t,e){if("object"==typeof e)t.times=+e.times||n,t.intervalFunc="function"==typeof e.interval?e.interval:On(+e.interval||i),t.errorFilter=e.errorFilter;else{if("number"!=typeof e&&"string"!=typeof e)throw new Error("Invalid arguments for async.retry");t.times=+e||n}}if(arguments.length<3&&"function"==typeof t?(r=e||H,e=t):(s(o,t),r=r||H),"function"!=typeof e)throw new Error("Invalid arguments for async.retry");var a=_(e),u=1;function c(){a((function(t){t&&u++<o.times&&("function"!=typeof o.errorFilter||o.errorFilter(t))?setTimeout(c,o.intervalFunc(u)):r.apply(null,arguments)}))}c()}var Tn=function(t,e){e||(e=t,t=null);var r=_(e);return i((function(e,n){function i(t){r.apply(null,e.concat(t))}t?In(t,i,n):In(i,n)}))};function An(t,e){ln(mr,t,e)}var kn=le(Tr(Boolean,Ir)),jn=ye(Tr(Boolean,Ir)),Ln=ae(jn,1);function Dn(t,e,r){var n=_(e);function i(t,e){var r=t.criteria,n=e.criteria;return r<n?-1:r>n?1:0}pe(t,(function(t,e){n(t,(function(r,n){if(r)return e(r);e(null,{value:t,criteria:n})}))}),(function(t,e){if(t)return r(t);r(null,ke(e.sort(i),qr("value")))}))}function Bn(t,e,r){var n=_(t);return i((function(i,o){var s,a=!1;function u(){var e=t.name||"anonymous",n=new Error('Callback function "'+e+'" timed out.');n.code="ETIMEDOUT",r&&(n.info=r),a=!0,o(n)}i.push((function(){a||(o.apply(null,arguments),clearTimeout(s))})),s=setTimeout(u,e),n.apply(null,i)}))}var zn=Math.ceil,xn=Math.max;function Rn(t,e,r,n){for(var i=-1,o=xn(zn((e-t)/(r||1)),0),s=Array(o);o--;)s[n?o:++i]=t,t+=r;return s}function Cn(t,e,r,n){var i=_(r);me(Rn(0,t,1),e,i,n)}var Pn=ae(Cn,1/0),Fn=ae(Cn,1);function Mn(t,e,r,n){arguments.length<=3&&(n=r,r=e,e=rt(t)?[]:{}),n=Q(n||H);var i=_(r);fe(t,(function(t,r,n){i(e,t,r,n)}),(function(t){n(t,e)}))}function Nn(t,e){var n,i=null;e=e||H,Nr(t,(function(t,e){_(t)((function(t,o){n=arguments.length>2?r(arguments,1):o,i=t,e(!t)}))}),(function(){e(i,n)}))}function Un(t){return function(){return(t.unmemoized||t).apply(null,arguments)}}function Gn(t,e,n){n=ie(n||H);var i=_(e);if(!t())return n(null);var o=function(e){if(e)return n(e);if(t())return i(o);var s=r(arguments,1);n.apply(null,[null].concat(s))};i(o)}function Zn(t,e,r){Gn((function(){return!t.apply(this,arguments)}),e,r)}var Hn=function(t,e){if(e=Q(e||H),!rt(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var n=0;function i(e){var r=_(t[n++]);e.push(ie(o)),r.apply(null,e)}function o(o){if(o||n===t.length)return e.apply(null,arguments);i(r(arguments,1))}i([])},Qn={apply:n,applyEach:de,applyEachSeries:ge,asyncify:h,auto:Ae,autoInject:lr,cargo:yr,compose:vr,concat:Er,concatLimit:wr,concatSeries:Sr,constant:Or,detect:kr,detectLimit:jr,detectSeries:Lr,dir:Br,doDuring:zr,doUntil:Rr,doWhilst:xr,during:Cr,each:Fr,eachLimit:Mr,eachOf:fe,eachOfLimit:se,eachOfSeries:mr,eachSeries:Nr,ensureAsync:Ur,every:Zr,everyLimit:Hr,everySeries:Qr,filter:Wr,filterLimit:Kr,filterSeries:Xr,forever:Jr,groupBy:en,groupByLimit:tn,groupBySeries:rn,log:nn,map:pe,mapLimit:me,mapSeries:_e,mapValues:sn,mapValuesLimit:on,mapValuesSeries:an,memoize:cn,nextTick:fn,parallel:hn,parallelLimit:pn,priorityQueue:yn,queue:dn,race:mn,reduce:_r,reduceRight:_n,reflect:gn,reflectAll:vn,reject:wn,rejectLimit:En,rejectSeries:Sn,retry:In,retryable:Tn,seq:gr,series:An,setImmediate:l,some:kn,someLimit:jn,someSeries:Ln,sortBy:Dn,timeout:Bn,times:Pn,timesLimit:Cn,timesSeries:Fn,transform:Mn,tryEach:Nn,unmemoize:Un,until:Zn,waterfall:Hn,whilst:Gn,all:Zr,allLimit:Hr,allSeries:Qr,any:kn,anyLimit:jn,anySeries:Ln,find:kr,findLimit:jr,findSeries:Lr,forEach:Fr,forEachSeries:Nr,forEachLimit:Mr,forEachOf:fe,forEachOfSeries:mr,forEachOfLimit:se,inject:_r,foldl:_r,foldr:_n,select:Wr,selectLimit:Kr,selectSeries:Xr,wrapSync:h};e.default=Qn,e.apply=n,e.applyEach=de,e.applyEachSeries=ge,e.asyncify=h,e.auto=Ae,e.autoInject=lr,e.cargo=yr,e.compose=vr,e.concat=Er,e.concatLimit=wr,e.concatSeries=Sr,e.constant=Or,e.detect=kr,e.detectLimit=jr,e.detectSeries=Lr,e.dir=Br,e.doDuring=zr,e.doUntil=Rr,e.doWhilst=xr,e.during=Cr,e.each=Fr,e.eachLimit=Mr,e.eachOf=fe,e.eachOfLimit=se,e.eachOfSeries=mr,e.eachSeries=Nr,e.ensureAsync=Ur,e.every=Zr,e.everyLimit=Hr,e.everySeries=Qr,e.filter=Wr,e.filterLimit=Kr,e.filterSeries=Xr,e.forever=Jr,e.groupBy=en,e.groupByLimit=tn,e.groupBySeries=rn,e.log=nn,e.map=pe,e.mapLimit=me,e.mapSeries=_e,e.mapValues=sn,e.mapValuesLimit=on,e.mapValuesSeries=an,e.memoize=cn,e.nextTick=fn,e.parallel=hn,e.parallelLimit=pn,e.priorityQueue=yn,e.queue=dn,e.race=mn,e.reduce=_r,e.reduceRight=_n,e.reflect=gn,e.reflectAll=vn,e.reject=wn,e.rejectLimit=En,e.rejectSeries=Sn,e.retry=In,e.retryable=Tn,e.seq=gr,e.series=An,e.setImmediate=l,e.some=kn,e.someLimit=jn,e.someSeries=Ln,e.sortBy=Dn,e.timeout=Bn,e.times=Pn,e.timesLimit=Cn,e.timesSeries=Fn,e.transform=Mn,e.tryEach=Nn,e.unmemoize=Un,e.until=Zn,e.waterfall=Hn,e.whilst=Gn,e.all=Zr,e.allLimit=Hr,e.allSeries=Qr,e.any=kn,e.anyLimit=jn,e.anySeries=Ln,e.find=kr,e.findLimit=jr,e.findSeries=Lr,e.forEach=Fr,e.forEachSeries=Nr,e.forEachLimit=Mr,e.forEachOf=fe,e.forEachOfSeries=mr,e.forEachOfLimit=se,e.inject=_r,e.foldl=_r,e.foldr=_n,e.select=Wr,e.selectLimit=Kr,e.selectSeries=Xr,e.wrapSync=h,Object.defineProperty(e,"__esModule",{value:!0})}(e)})),Lt=S.default.PassThrough,Dt={Readable:zt,Writable:xt};function Bt(t,e,r){t[e]=function(){return delete t[e],r.apply(this,arguments),this[e].apply(this,arguments)}}function zt(t,e){if(!(this instanceof zt))return new zt(t,e);Lt.call(this,e),Bt(this,"_read",(function(){var r=t.call(this,e),n=this.emit.bind(this,"error");r.on("error",n),r.pipe(this)})),this.emit("readable")}function xt(t,e){if(!(this instanceof xt))return new xt(t,e);Lt.call(this,e),Bt(this,"_write",(function(){var r=t.call(this,e),n=this.emit.bind(this,"error");r.on("error",n),this.pipe(r)})),this.emit("writable")}
|
|
2
|
+
/*!
|
|
3
|
+
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
6
|
+
* Released under the MIT License.
|
|
7
|
+
*/E.default.inherits(zt,Lt),E.default.inherits(xt,Lt);var Rt=function(t,e){if("string"!=typeof t)throw new TypeError("expected path to be a string");if("\\"===t||"/"===t)return"/";var r=t.length;if(r<=1)return t;var n="";if(r>4&&"\\"===t[3]){var i=t[2];"?"!==i&&"."!==i||"\\\\"!==t.slice(0,2)||(t=t.slice(2),n="//")}var o=t.split(/[/\\]+/);return!1!==e&&""===o[o.length-1]&&o.pop(),n+o.join("/")},Ct=9007199254740991,Pt="[object Arguments]",Ft="[object Function]",Mt="[object GeneratorFunction]",Nt=/^(?:0|[1-9]\d*)$/;function Ut(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Gt=Object.prototype,Zt=Gt.hasOwnProperty,Ht=Gt.toString,Qt=Gt.propertyIsEnumerable,qt=Math.max;function Vt(t,e){var r=te(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&ee(t)}(t)&&Zt.call(t,"callee")&&(!Qt.call(t,"callee")||Ht.call(t)==Pt)}(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,i=!!n;for(var o in t)!e&&!Zt.call(t,o)||i&&("length"==o||Xt(o,n))||r.push(o);return r}function $t(t,e,r,n){return void 0===t||Jt(t,Gt[r])&&!Zt.call(n,r)?e:t}function Yt(t,e,r){var n=t[e];Zt.call(t,e)&&Jt(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function Wt(t){if(!re(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e,r,n,i=(r=(e=t)&&e.constructor,n="function"==typeof r&&r.prototype||Gt,e===n),o=[];for(var s in t)("constructor"!=s||!i&&Zt.call(t,s))&&o.push(s);return o}function Kt(t,e){return e=qt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,n=-1,i=qt(r.length-e,0),o=Array(i);++n<i;)o[n]=r[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=r[n];return s[e]=o,Ut(t,this,s)}}function Xt(t,e){return!!(e=null==e?Ct:e)&&("number"==typeof t||Nt.test(t))&&t>-1&&t%1==0&&t<e}function Jt(t,e){return t===e||t!=t&&e!=e}var te=Array.isArray;function ee(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Ct}(t.length)&&!function(t){var e=re(t)?Ht.call(t):"";return e==Ft||e==Mt}(t)}function re(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var ne,ie=(ne=function(t,e,r,n){!function(t,e,r,n){r||(r={});for(var i=-1,o=e.length;++i<o;){var s=e[i],a=n?n(r[s],t[s],s,r,t):void 0;Yt(r,s,void 0===a?t[s]:a)}}(e,function(t){return ee(t)?Vt(t,!0):Wt(t)}(e),t,n)},Kt((function(t,e){var r=-1,n=e.length,i=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(i=ne.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(t,e,r){if(!re(r))return!1;var n=typeof e;return!!("number"==n?ee(r)&&Xt(e,r.length):"string"==n&&e in r)&&Jt(r[e],t)}(e[0],e[1],o)&&(i=n<3?void 0:i,n=1),t=Object(t);++r<n;){var s=e[r];s&&ne(t,s,r,i)}return t})));var oe=Kt((function(t){return t.push(void 0,$t),Ut(ie,void 0,t)})),se=u.createCommonjsModule((function(t,e){(e=t.exports=S.default.Readable).Readable=S.default.Readable,e.Writable=S.default.Writable,e.Duplex=S.default.Duplex,e.Transform=S.default.Transform,e.PassThrough=S.default.PassThrough,e.Stream=S.default})),ae=9007199254740991,ue="[object Arguments]",ce="[object Function]",fe="[object GeneratorFunction]",le="object"==typeof u.commonjsGlobal&&u.commonjsGlobal&&u.commonjsGlobal.Object===Object&&u.commonjsGlobal,he="object"==typeof self&&self&&self.Object===Object&&self,pe=le||he||Function("return this")();function de(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var ye=Object.prototype,me=ye.hasOwnProperty,_e=ye.toString,ge=pe.Symbol,ve=ye.propertyIsEnumerable,be=ge?ge.isConcatSpreadable:void 0;function we(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=Ee),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?we(a,e-1,r,n,i):de(i,a):n||(i[i.length]=a)}return i}function Ee(t){return Se(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=ae}(t.length)&&!function(t){var e=function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}(t)?_e.call(t):"";return e==ce||e==fe}(t)}(t)}(t)&&me.call(t,"callee")&&(!ve.call(t,"callee")||_e.call(t)==ue)}(t)||!!(be&&t&&t[be])}var Se=Array.isArray;var Oe=function(t){return(t?t.length:0)?we(t,1):[]},Ie="__lodash_hash_undefined__",Te=9007199254740991,Ae="[object Arguments]",ke=/^\[object .+?Constructor\]$/,je="object"==typeof u.commonjsGlobal&&u.commonjsGlobal&&u.commonjsGlobal.Object===Object&&u.commonjsGlobal,Le="object"==typeof self&&self&&self.Object===Object&&self,De=je||Le||Function("return this")();function Be(t,e){return!!(t?t.length:0)&&function(t,e,r){if(e!=e)return function(t,e,r,n){var i=t.length,o=r+(n?1:-1);for(;n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,Re,r);var n=r-1,i=t.length;for(;++n<i;)if(t[n]===e)return n;return-1}(t,e,0)>-1}function ze(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1}function xe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function Re(t){return t!=t}function Ce(t,e){return t.has(e)}var Pe,Fe=Array.prototype,Me=Function.prototype,Ne=Object.prototype,Ue=De["__core-js_shared__"],Ge=(Pe=/[^.]+$/.exec(Ue&&Ue.keys&&Ue.keys.IE_PROTO||""))?"Symbol(src)_1."+Pe:"",Ze=Me.toString,He=Ne.hasOwnProperty,Qe=Ne.toString,qe=RegExp("^"+Ze.call(He).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=De.Symbol,$e=Ne.propertyIsEnumerable,Ye=Fe.splice,We=Ve?Ve.isConcatSpreadable:void 0,Ke=Math.max,Xe=cr(De,"Map"),Je=cr(Object,"create");function tr(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function er(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function rr(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function nr(t){var e=-1,r=t?t.length:0;for(this.__data__=new rr;++e<r;)this.add(t[e])}function ir(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function or(t,e,r,n){var i,o=-1,s=Be,a=!0,u=t.length,c=[],f=e.length;if(!u)return c;r&&(e=function(t,e){for(var r=-1,n=t?t.length:0,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}(e,(i=r,function(t){return i(t)}))),n?(s=ze,a=!1):e.length>=200&&(s=Ce,a=!1,e=new nr(e));t:for(;++o<u;){var l=t[o],h=r?r(l):l;if(l=n||0!==l?l:0,a&&h==h){for(var p=f;p--;)if(e[p]===h)continue t;c.push(l)}else s(e,h,n)||c.push(l)}return c}function sr(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=fr),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?sr(a,e-1,r,n,i):xe(i,a):n||(i[i.length]=a)}return i}function ar(t){if(!gr(t)||(e=t,Ge&&Ge in e))return!1;var e,r=_r(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?qe:ke;return r.test(function(t){if(null!=t){try{return Ze.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function ur(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function cr(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return ar(r)?r:void 0}function fr(t){return dr(t)||function(t){return mr(t)&&He.call(t,"callee")&&(!$e.call(t,"callee")||Qe.call(t)==Ae)}(t)||!!(We&&t&&t[We])}tr.prototype.clear=function(){this.__data__=Je?Je(null):{}},tr.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},tr.prototype.get=function(t){var e=this.__data__;if(Je){var r=e[t];return r===Ie?void 0:r}return He.call(e,t)?e[t]:void 0},tr.prototype.has=function(t){var e=this.__data__;return Je?void 0!==e[t]:He.call(e,t)},tr.prototype.set=function(t,e){return this.__data__[t]=Je&&void 0===e?Ie:e,this},er.prototype.clear=function(){this.__data__=[]},er.prototype.delete=function(t){var e=this.__data__,r=ir(e,t);return!(r<0)&&(r==e.length-1?e.pop():Ye.call(e,r,1),!0)},er.prototype.get=function(t){var e=this.__data__,r=ir(e,t);return r<0?void 0:e[r][1]},er.prototype.has=function(t){return ir(this.__data__,t)>-1},er.prototype.set=function(t,e){var r=this.__data__,n=ir(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},rr.prototype.clear=function(){this.__data__={hash:new tr,map:new(Xe||er),string:new tr}},rr.prototype.delete=function(t){return ur(this,t).delete(t)},rr.prototype.get=function(t){return ur(this,t).get(t)},rr.prototype.has=function(t){return ur(this,t).has(t)},rr.prototype.set=function(t,e){return ur(this,t).set(t,e),this},nr.prototype.add=nr.prototype.push=function(t){return this.__data__.set(t,Ie),this},nr.prototype.has=function(t){return this.__data__.has(t)};var lr,hr,pr=(lr=function(t,e){return mr(t)?or(t,sr(e,1,mr,!0)):[]},hr=Ke(void 0===hr?lr.length-1:hr,0),function(){for(var t=arguments,e=-1,r=Ke(t.length-hr,0),n=Array(r);++e<r;)n[e]=t[hr+e];e=-1;for(var i=Array(hr+1);++e<hr;)i[e]=t[e];return i[hr]=n,function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(lr,this,i)});var dr=Array.isArray;function yr(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Te}(t.length)&&!_r(t)}function mr(t){return function(t){return!!t&&"object"==typeof t}(t)&&yr(t)}function _r(t){var e=gr(t)?Qe.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function gr(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var vr=pr,br="__lodash_hash_undefined__",wr=9007199254740991,Er="[object Arguments]",Sr=/^\[object .+?Constructor\]$/,Or="object"==typeof u.commonjsGlobal&&u.commonjsGlobal&&u.commonjsGlobal.Object===Object&&u.commonjsGlobal,Ir="object"==typeof self&&self&&self.Object===Object&&self,Tr=Or||Ir||Function("return this")();function Ar(t,e){return!!(t?t.length:0)&&function(t,e,r){if(e!=e)return function(t,e,r,n){var i=t.length,o=r+(n?1:-1);for(;n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,Lr,r);var n=r-1,i=t.length;for(;++n<i;)if(t[n]===e)return n;return-1}(t,e,0)>-1}function kr(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1}function jr(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function Lr(t){return t!=t}function Dr(t,e){return t.has(e)}function Br(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var zr=Array.prototype,xr=Function.prototype,Rr=Object.prototype,Cr=Tr["__core-js_shared__"],Pr=function(){var t=/[^.]+$/.exec(Cr&&Cr.keys&&Cr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Fr=xr.toString,Mr=Rr.hasOwnProperty,Nr=Rr.toString,Ur=RegExp("^"+Fr.call(Mr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gr=Tr.Symbol,Zr=Rr.propertyIsEnumerable,Hr=zr.splice,Qr=Gr?Gr.isConcatSpreadable:void 0,qr=Math.max,Vr=sn(Tr,"Map"),$r=sn(Tr,"Set"),Yr=sn(Object,"create");function Wr(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Kr(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Xr(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Jr(t){var e=-1,r=t?t.length:0;for(this.__data__=new Xr;++e<r;)this.add(t[e])}function tn(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function en(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=an),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?en(a,e-1,r,n,i):jr(i,a):n||(i[i.length]=a)}return i}function rn(t){if(!pn(t)||function(t){return!!Pr&&Pr in t}(t))return!1;var e=hn(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?Ur:Sr;return e.test(function(t){if(null!=t){try{return Fr.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}Wr.prototype.clear=function(){this.__data__=Yr?Yr(null):{}},Wr.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Wr.prototype.get=function(t){var e=this.__data__;if(Yr){var r=e[t];return r===br?void 0:r}return Mr.call(e,t)?e[t]:void 0},Wr.prototype.has=function(t){var e=this.__data__;return Yr?void 0!==e[t]:Mr.call(e,t)},Wr.prototype.set=function(t,e){return this.__data__[t]=Yr&&void 0===e?br:e,this},Kr.prototype.clear=function(){this.__data__=[]},Kr.prototype.delete=function(t){var e=this.__data__,r=tn(e,t);return!(r<0)&&(r==e.length-1?e.pop():Hr.call(e,r,1),!0)},Kr.prototype.get=function(t){var e=this.__data__,r=tn(e,t);return r<0?void 0:e[r][1]},Kr.prototype.has=function(t){return tn(this.__data__,t)>-1},Kr.prototype.set=function(t,e){var r=this.__data__,n=tn(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Xr.prototype.clear=function(){this.__data__={hash:new Wr,map:new(Vr||Kr),string:new Wr}},Xr.prototype.delete=function(t){return on(this,t).delete(t)},Xr.prototype.get=function(t){return on(this,t).get(t)},Xr.prototype.has=function(t){return on(this,t).has(t)},Xr.prototype.set=function(t,e){return on(this,t).set(t,e),this},Jr.prototype.add=Jr.prototype.push=function(t){return this.__data__.set(t,br),this},Jr.prototype.has=function(t){return this.__data__.has(t)};var nn=$r&&1/Br(new $r([,-0]))[1]==1/0?function(t){return new $r(t)}:function(){};function on(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function sn(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return rn(r)?r:void 0}function an(t){return cn(t)||function(t){return ln(t)&&Mr.call(t,"callee")&&(!Zr.call(t,"callee")||Nr.call(t)==Er)}(t)||!!(Qr&&t&&t[Qr])}var un=function(t,e){return e=qr(void 0===e?t.length-1:e,0),function(){for(var r=arguments,n=-1,i=qr(r.length-e,0),o=Array(i);++n<i;)o[n]=r[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=r[n];return s[e]=o,function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(t,this,s)}}((function(t){return function(t,e,r){var n=-1,i=Ar,o=t.length,s=!0,a=[],u=a;if(r)s=!1,i=kr;else if(o>=200){var c=e?null:nn(t);if(c)return Br(c);s=!1,i=Dr,u=new Jr}else u=e?[]:a;t:for(;++n<o;){var f=t[n],l=e?e(f):f;if(f=r||0!==f?f:0,s&&l==l){for(var h=u.length;h--;)if(u[h]===l)continue t;e&&u.push(l),a.push(f)}else i(u,l,r)||(u!==a&&u.push(l),a.push(f))}return a}(en(t,1,ln,!0))}));var cn=Array.isArray;function fn(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=wr}(t.length)&&!hn(t)}function ln(t){return function(t){return!!t&&"object"==typeof t}(t)&&fn(t)}function hn(t){var e=pn(t)?Nr.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function pn(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var dn=un;var yn=Function.prototype,mn=Object.prototype,_n=yn.toString,gn=mn.hasOwnProperty,vn=_n.call(Object),bn=mn.toString,wn=function(t,e){return function(r){return t(e(r))}}(Object.getPrototypeOf,Object);var En=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=bn.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=wn(t);if(null===e)return!0;var r=gn.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&_n.call(r)==vn},Sn=u.createCommonjsModule((function(t){var e=t.exports={},r=/[\/\\]/g;e.exists=function(){var t=v.default.join.apply(v.default,arguments);return c.gracefulFs.existsSync(t)},e.expand=function(...t){var e=En(t[0])?t.shift():{},r=Array.isArray(t[0])?t[0]:t;if(0===r.length)return[];var n=function(t,e){var r=[];return Oe(t).forEach((function(t){var n=0===t.indexOf("!");n&&(t=t.slice(1));var i=e(t);r=n?vr(r,i):dn(r,i)})),r}(r,(function(t){return ft.sync(t,e)}));return e.filter&&(n=n.filter((function(t){t=v.default.join(e.cwd||"",t);try{return"function"==typeof e.filter?e.filter(t):c.gracefulFs.statSync(t)[e.filter]()}catch(t){return!1}}))),n},e.expandMapping=function(t,n,i){i=Object.assign({rename:function(t,e){return v.default.join(t||"",e)}},i);var o=[],s={};return e.expand(i,t).forEach((function(t){var e=t;i.flatten&&(e=v.default.basename(e)),i.ext&&(e=e.replace(/(\.[^\/]*)?$/,i.ext));var a=i.rename(n,e,i);i.cwd&&(t=v.default.join(i.cwd,t)),a=a.replace(r,"/"),t=t.replace(r,"/"),s[a]?s[a].src.push(t):(o.push({src:[t],dest:a}),s[a]=o[o.length-1])})),o},e.normalizeFilesArray=function(t){var r=[];return t.forEach((function(t){("src"in t||"dest"in t)&&r.push(t)})),0===r.length?[]:r=_(r).chain().forEach((function(t){"src"in t&&t.src&&(Array.isArray(t.src)?t.src=Oe(t.src):t.src=[t.src])})).map((function(t){var r=Object.assign({},t);if(delete r.src,delete r.dest,t.expand)return e.expandMapping(t.src,t.dest,r).map((function(e){var r=Object.assign({},t);return r.orig=Object.assign({},t),r.src=e.src,r.dest=e.dest,["expand","cwd","flatten","rename","ext"].forEach((function(t){delete r[t]})),r}));var n=Object.assign({},t);return n.orig=Object.assign({},t),"src"in n&&Object.defineProperty(n,"src",{enumerable:!0,get:function n(){var i;return"result"in n||(i=t.src,i=Array.isArray(i)?Oe(i):[i],n.result=e.expand(r,i)),n.result}}),"dest"in n&&(n.dest=t.dest),n})).flatten().value()}})),On=u.createCommonjsModule((function(t){var e=S.default.Stream,r=se.PassThrough,n=t.exports={};n.file=Sn,n.collectStream=function(t,e){var r=[],n=0;t.on("error",e),t.on("data",(function(t){r.push(t),n+=t.length})),t.on("end",(function(){var t=new Buffer(n),i=0;r.forEach((function(e){e.copy(t,i),i+=e.length})),e(null,t)}))},n.dateify=function(t){return(t=t||new Date)instanceof Date||(t="string"==typeof t?new Date(t):new Date),t},n.defaults=function(t,e,r){var n=arguments;return n[0]=n[0]||{},oe(...n)},n.isStream=function(t){return t instanceof e},n.lazyReadStream=function(t){return new Dt.Readable((function(){return c.gracefulFs.createReadStream(t)}))},n.normalizeInputSource=function(t){if(null===t)return new Buffer(0);if("string"==typeof t)return new Buffer(t);if(n.isStream(t)&&!t._readableState){var e=new r;return t.pipe(e),e}return t},n.sanitizePath=function(t){return Rt(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")},n.trailingSlashIt=function(t){return"/"!==t.slice(-1)?t+"/":t},n.unixifyPath=function(t){return Rt(t,!1).replace(/^\w+:/,"")},n.walkdir=function(t,e,r){var i=[];"function"==typeof e&&(r=e,e=t),c.gracefulFs.readdir(t,(function(o,s){var a,u,f=0;if(o)return r(o);!function o(){if(!(a=s[f++]))return r(null,i);u=v.default.join(t,a),c.gracefulFs.stat(u,(function(t,r){i.push({path:u,relative:v.default.relative(e,u).replace(/\\/g,"/"),stats:r}),r&&r.isDirectory()?n.walkdir(u,e,(function(t,e){e.forEach((function(t){i.push(t)})),o()})):o()}))}()}))}})),In=u.createCommonjsModule((function(t,e){
|
|
8
|
+
/**
|
|
9
|
+
* Archiver Core
|
|
10
|
+
*
|
|
11
|
+
* @ignore
|
|
12
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
13
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
14
|
+
*/
|
|
15
|
+
const r={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function n(t,e){Error.captureStackTrace(this,this.constructor),this.message=r[t]||t,this.code=t,this.data=e}E.default.inherits(n,Error),t.exports=n})),Tn=u.createCommonjsModule((function(t,e){(e=t.exports=S.default.Readable).Readable=S.default.Readable,e.Writable=S.default.Writable,e.Duplex=S.default.Duplex,e.Transform=S.default.Transform,e.PassThrough=S.default.PassThrough,e.Stream=S.default})),An=E.default.inherits,kn=Tn.Transform,jn="win32"===process.platform,Ln=function(t,e){if(!(this instanceof Ln))return new Ln(t,e);"string"!=typeof t&&(e=t,t="zip"),e=this.options=On.defaults(e,{highWaterMark:1048576,statConcurrency:4}),kn.call(this,e),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=jt.queue(this._onQueueTask.bind(this),1),this._queue.drain=this._onQueueDrain.bind(this),this._statQueue=jt.queue(this._onStatQueueTask.bind(this),e.statConcurrency),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};An(Ln,kn),Ln.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()},Ln.prototype._append=function(t,e){var r={source:null,filepath:t};(e=e||{}).name||(e.name=t),e.sourcePath=t,r.data=e,this._entriesCount++,e.stats&&e.stats instanceof g.default.Stats?(r=this._updateQueueTaskWithStats(r,e.stats))&&(e.stats.size&&(this._fsEntriesTotalBytes+=e.stats.size),this._queue.push(r)):this._statQueue.push(r)},Ln.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)},Ln.prototype._maybeFinalize=function(){return!(this._state.finalizing||this._state.finalized||this._state.aborted)&&(!!(this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle())&&(this._finalize(),!0))},Ln.prototype._moduleAppend=function(t,e,r){this._state.aborted?r():this._module.append(t,e,function(t){if(this._task=null,this._state.aborted)this._shutdown();else{if(t)return this.emit("error",t),void setImmediate(r);this.emit("entry",e),this._entriesProcessedCount++,e.stats&&e.stats.size&&(this._fsEntriesProcessedBytes+=e.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(r)}}.bind(this))},Ln.prototype._moduleFinalize=function(){"function"==typeof this._module.finalize?this._module.finalize():"function"==typeof this._module.end?this._module.end():this.emit("error",new In("NOENDMETHOD"))},Ln.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0},Ln.prototype._moduleSupports=function(t){return!(!this._module.supports||!this._module.supports[t])&&this._module.supports[t]},Ln.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1},Ln.prototype._normalizeEntryData=function(t,e){t=On.defaults(t,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),e&&!1===t.stats&&(t.stats=e);var r="directory"===t.type;return t.name&&("string"==typeof t.prefix&&""!==t.prefix&&(t.name=t.prefix+"/"+t.name,t.prefix=null),t.name=On.sanitizePath(t.name),"symlink"!==t.type&&"/"===t.name.slice(-1)?(r=!0,t.type="directory"):r&&(t.name+="/")),"number"==typeof t.mode?t.mode&=jn?511:4095:t.stats&&null===t.mode?(t.mode=jn?511&t.stats.mode:4095&t.stats.mode,jn&&r&&(t.mode=493)):null===t.mode&&(t.mode=r?493:420),t.stats&&null===t.date?t.date=t.stats.mtime:t.date=On.dateify(t.date),t},Ln.prototype._onModuleError=function(t){this.emit("error",t)},Ln.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()},Ln.prototype._onQueueTask=function(t,e){this._state.finalizing||this._state.finalized||this._state.aborted?e():(this._task=t,this._moduleAppend(t.source,t.data,e))},Ln.prototype._onStatQueueTask=function(t,e){this._state.finalizing||this._state.finalized||this._state.aborted?e():g.default.lstat(t.filepath,function(r,n){if(this._state.aborted)setImmediate(e);else{if(r)return this._entriesCount--,this.emit("warning",r),void setImmediate(e);(t=this._updateQueueTaskWithStats(t,n))&&(n.size&&(this._fsEntriesTotalBytes+=n.size),this._queue.push(t)),setImmediate(e)}}.bind(this))},Ln.prototype._shutdown=function(){this._moduleUnpipe(),this.end()},Ln.prototype._transform=function(t,e,r){t&&(this._pointer+=t.length),r(null,t)},Ln.prototype._updateQueueTaskWithStats=function(t,e){if(e.isFile())t.data.type="file",t.data.sourceType="stream",t.source=On.lazyReadStream(t.filepath);else if(e.isDirectory()&&this._moduleSupports("directory"))t.data.name=On.trailingSlashIt(t.data.name),t.data.type="directory",t.data.sourcePath=On.trailingSlashIt(t.filepath),t.data.sourceType="buffer",t.source=Buffer.concat([]);else{if(!e.isSymbolicLink()||!this._moduleSupports("symlink"))return e.isDirectory()?this.emit("warning",new In("DIRECTORYNOTSUPPORTED",t.data)):e.isSymbolicLink()?this.emit("warning",new In("SYMLINKNOTSUPPORTED",t.data)):this.emit("warning",new In("ENTRYNOTSUPPORTED",t.data)),null;var r=g.default.readlinkSync(t.filepath),n=v.default.dirname(t.filepath);t.data.type="symlink",t.data.linkname=v.default.relative(n,v.default.resolve(n,r)),t.data.sourceType="buffer",t.source=Buffer.concat([])}return t.data=this._normalizeEntryData(t.data,e),t},Ln.prototype.abort=function(){return this._state.aborted||this._state.finalized||this._abort(),this},Ln.prototype.append=function(t,e){if(this._state.finalize||this._state.aborted)return this.emit("error",new In("QUEUECLOSED")),this;if("string"!=typeof(e=this._normalizeEntryData(e)).name||0===e.name.length)return this.emit("error",new In("ENTRYNAMEREQUIRED")),this;if("directory"===e.type&&!this._moduleSupports("directory"))return this.emit("error",new In("DIRECTORYNOTSUPPORTED",{name:e.name})),this;if(t=On.normalizeInputSource(t),Buffer.isBuffer(t))e.sourceType="buffer";else{if(!On.isStream(t))return this.emit("error",new In("INPUTSTEAMBUFFERREQUIRED",{name:e.name})),this;e.sourceType="stream"}return this._entriesCount++,this._queue.push({data:e,source:t}),this},Ln.prototype.directory=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new In("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new In("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,!1===e?e="":"string"!=typeof e&&(e=t);var n=!1;"function"==typeof r?(n=r,r={}):"object"!=typeof r&&(r={});var i=ft("**",{stat:!1,dot:!0,cwd:t});return i.on("error",function(t){this.emit("error",t)}.bind(this)),i.on("match",function(o){var s=!1,a=Object.assign({},r);a.name=o,a.prefix=e,o=i._makeAbs(o);try{if(n)if(!1===(a=n(a)))s=!0;else if("object"!=typeof a)throw new In("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:t})}catch(t){return void this.emit("error",t)}s||this._append(o,a)}.bind(this)),i.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},Ln.prototype.file=function(t,e){return this._state.finalize||this._state.aborted?(this.emit("error",new In("QUEUECLOSED")),this):"string"!=typeof t||0===t.length?(this.emit("error",new In("FILEFILEPATHREQUIRED")),this):(this._append(t,e),this)},Ln.prototype.glob=function(t,e,r){this._pending++,e=On.defaults(e,{stat:!1});var n=ft(t,e);return n.on("error",function(t){this.emit("error",t)}.bind(this)),n.on("match",function(t){var i=Object.assign({},r);e.cwd&&(i.name=t,t=n._makeAbs(t)),this._append(t,i)}.bind(this)),n.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},Ln.prototype.finalize=function(){if(this._state.aborted)return this.emit("error",new In("ABORTED")),this;if(this._state.finalize)return this.emit("error",new In("FINALIZING")),this;this._state.finalize=!0,0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var t=this;return new Promise((function(e,r){var n;t._module.on("end",(function(){n||e()})),t._module.on("error",(function(t){n=!0,r(t)}))}))},Ln.prototype.setFormat=function(t){return this._format?(this.emit("error",new In("FORMATSET")),this):(this._format=t,this)},Ln.prototype.setModule=function(t){return this._state.aborted?(this.emit("error",new In("ABORTED")),this):this._state.module?(this.emit("error",new In("MODULESET")),this):(this._module=t,this._modulePipe(),this)},Ln.prototype.symlink=function(t,e){if(this._state.finalize||this._state.aborted)return this.emit("error",new In("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new In("SYMLINKFILEPATHREQUIRED")),this;if("string"!=typeof e||0===e.length)return this.emit("error",new In("SYMLINKTARGETREQUIRED",{filepath:t})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new In("SYMLINKNOTSUPPORTED",{filepath:t})),this;var r={type:"symlink"};return r.name=t.replace(/\\/g,"/"),r.linkname=e.replace(/\\/g,"/"),r.sourceType="buffer",this._entriesCount++,this._queue.push({data:r,source:Buffer.concat([])}),this},Ln.prototype.pointer=function(){return this._pointer},Ln.prototype.use=function(t){return this._streams.push(t),this};var Dn=Ln,Bn=u.createCommonjsModule((function(t){var e=t.exports=function(){};e.prototype.getName=function(){},e.prototype.getSize=function(){},e.prototype.getLastModifiedDate=function(){},e.prototype.isDirectory=function(){}})),zn=u.createCommonjsModule((function(t){var e=t.exports={};e.dateToDos=function(t,e){var r=(e=e||!1)?t.getFullYear():t.getUTCFullYear();return r<1980?2162688:r>=2044?2141175677:r-1980<<25|(e?t.getMonth():t.getUTCMonth())+1<<21|(e?t.getDate():t.getUTCDate())<<16|(e?t.getHours():t.getUTCHours())<<11|(e?t.getMinutes():t.getUTCMinutes())<<5|(e?t.getSeconds():t.getUTCSeconds())/2},e.dosToDate=function(t){return new Date(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1)},e.fromDosTime=function(t){return e.dosToDate(t.readUInt32LE(0))},e.getEightBytes=function(t){var e=Buffer.alloc(8);return e.writeUInt32LE(t%4294967296,0),e.writeUInt32LE(t/4294967296|0,4),e},e.getShortBytes=function(t){var e=Buffer.alloc(2);return e.writeUInt16LE((65535&t)>>>0,0),e},e.getShortBytesValue=function(t,e){return t.readUInt16LE(e)},e.getLongBytes=function(t){var e=Buffer.alloc(4);return e.writeUInt32LE((4294967295&t)>>>0,0),e},e.getLongBytesValue=function(t,e){return t.readUInt32LE(e)},e.toDosTime=function(t){return e.getLongBytes(e.dateToDos(t))}})),xn=u.createCommonjsModule((function(t){var e=t.exports=function(){return this instanceof e?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new e};e.prototype.encode=function(){return zn.getShortBytes((this.descriptor?8:0)|(this.utf8?2048:0)|(this.encryption?1:0)|(this.strongEncryption?64:0))},e.prototype.parse=function(t,r){var n=zn.getShortBytesValue(t,r),i=new e;return i.useDataDescriptor(!!(8&n)),i.useUTF8ForNames(!!(2048&n)),i.useStrongEncryption(!!(64&n)),i.useEncryption(!!(1&n)),i.setSlidingDictionarySize(2&n?8192:4096),i.setNumberOfShannonFanoTrees(4&n?3:2),i},e.prototype.setNumberOfShannonFanoTrees=function(t){this.numberOfShannonFanoTrees=t},e.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees},e.prototype.setSlidingDictionarySize=function(t){this.slidingDictionarySize=t},e.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize},e.prototype.useDataDescriptor=function(t){this.descriptor=t},e.prototype.usesDataDescriptor=function(){return this.descriptor},e.prototype.useEncryption=function(t){this.encryption=t},e.prototype.usesEncryption=function(){return this.encryption},e.prototype.useStrongEncryption=function(t){this.strongEncryption=t},e.prototype.usesStrongEncryption=function(){return this.strongEncryption},e.prototype.useUTF8ForNames=function(t){this.utf8=t},e.prototype.usesUTF8ForNames=function(){return this.utf8}})),Rn=61440,Cn=40960,Pn={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1},Fn=u.createCommonjsModule((function(t){var e=E.default.inherits,r=t.exports=function(t){if(!(this instanceof r))return new r(t);Bn.call(this),this.platform=Pn.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new xn,this.crc=0,this.time=-1,this.minver=Pn.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,t&&this.setName(t)};e(r,Bn),r.prototype.getCentralDirectoryExtra=function(){return this.getExtra()},r.prototype.getComment=function(){return null!==this.comment?this.comment:""},r.prototype.getCompressedSize=function(){return this.csize},r.prototype.getCrc=function(){return this.crc},r.prototype.getExternalAttributes=function(){return this.exattr},r.prototype.getExtra=function(){return null!==this.extra?this.extra:Pn.EMPTY},r.prototype.getGeneralPurposeBit=function(){return this.gpb},r.prototype.getInternalAttributes=function(){return this.inattr},r.prototype.getLastModifiedDate=function(){return this.getTime()},r.prototype.getLocalFileDataExtra=function(){return this.getExtra()},r.prototype.getMethod=function(){return this.method},r.prototype.getName=function(){return this.name},r.prototype.getPlatform=function(){return this.platform},r.prototype.getSize=function(){return this.size},r.prototype.getTime=function(){return-1!==this.time?zn.dosToDate(this.time):-1},r.prototype.getTimeDos=function(){return-1!==this.time?this.time:0},r.prototype.getUnixMode=function(){return this.platform!==Pn.PLATFORM_UNIX?0:this.getExternalAttributes()>>Pn.SHORT_SHIFT&Pn.SHORT_MASK},r.prototype.getVersionNeededToExtract=function(){return this.minver},r.prototype.setComment=function(t){Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=t},r.prototype.setCompressedSize=function(t){if(t<0)throw new Error("invalid entry compressed size");this.csize=t},r.prototype.setCrc=function(t){if(t<0)throw new Error("invalid entry crc32");this.crc=t},r.prototype.setExternalAttributes=function(t){this.exattr=t>>>0},r.prototype.setExtra=function(t){this.extra=t},r.prototype.setGeneralPurposeBit=function(t){if(!(t instanceof xn))throw new Error("invalid entry GeneralPurposeBit");this.gpb=t},r.prototype.setInternalAttributes=function(t){this.inattr=t},r.prototype.setMethod=function(t){if(t<0)throw new Error("invalid entry compression method");this.method=t},r.prototype.setName=function(t){t=Rt(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=t},r.prototype.setPlatform=function(t){this.platform=t},r.prototype.setSize=function(t){if(t<0)throw new Error("invalid entry size");this.size=t},r.prototype.setTime=function(t,e){if(!(t instanceof Date))throw new Error("invalid entry time");this.time=zn.dateToDos(t,e)},r.prototype.setUnixMode=function(t){var e=0;e|=(t|=this.isDirectory()?Pn.S_IFDIR:Pn.S_IFREG)<<Pn.SHORT_SHIFT|(this.isDirectory()?Pn.S_DOS_D:Pn.S_DOS_A),this.setExternalAttributes(e),this.mode=t&Pn.MODE_MASK,this.platform=Pn.PLATFORM_UNIX},r.prototype.setVersionNeededToExtract=function(t){this.minver=t},r.prototype.isDirectory=function(){return"/"===this.getName().slice(-1)},r.prototype.isUnixSymlink=function(){return(this.getUnixMode()&Rn)===Cn},r.prototype.isZip64=function(){return this.csize>Pn.ZIP64_MAGIC||this.size>Pn.ZIP64_MAGIC}})),Mn=u.createCommonjsModule((function(t,e){(e=t.exports=S.default.Readable).Readable=S.default.Readable,e.Writable=S.default.Writable,e.Duplex=S.default.Duplex,e.Transform=S.default.Transform,e.PassThrough=S.default.PassThrough,e.Stream=S.default})),Nn=u.createCommonjsModule((function(t){var e=S.default.Stream,r=Mn.PassThrough,n=t.exports={};n.isStream=function(t){return t instanceof e},n.normalizeInputSource=function(t){if(null===t)return Buffer.alloc(0);if("string"==typeof t)return Buffer.from(t);if(n.isStream(t)&&!t._readableState){var e=new r;return t.pipe(e),e}return t}})),Un=u.createCommonjsModule((function(t){var e=E.default.inherits,r=Mn.Transform,n=t.exports=function(t){if(!(this instanceof n))return new n(t);r.call(this,t),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};e(n,r),n.prototype._appendBuffer=function(t,e,r){},n.prototype._appendStream=function(t,e,r){},n.prototype._emitErrorCallback=function(t){t&&this.emit("error",t)},n.prototype._finish=function(t){},n.prototype._normalizeEntry=function(t){},n.prototype._transform=function(t,e,r){r(null,t)},n.prototype.entry=function(t,e,r){if(e=e||null,"function"!=typeof r&&(r=this._emitErrorCallback.bind(this)),t instanceof Bn)if(this._archive.finish||this._archive.finished)r(new Error("unacceptable entry after finish"));else{if(!this._archive.processing){if(this._archive.processing=!0,this._normalizeEntry(t),this._entry=t,e=Nn.normalizeInputSource(e),Buffer.isBuffer(e))this._appendBuffer(t,e,r);else{if(!Nn.isStream(e))return this._archive.processing=!1,void r(new Error("input source must be valid Stream or Buffer instance"));this._appendStream(t,e,r)}return this}r(new Error("already processing an entry"))}else r(new Error("not a valid instance of ArchiveEntry"))},n.prototype.finish=function(){this._archive.processing?this._archive.finish=!0:this._finish()},n.prototype.getBytesWritten=function(){return this.offset},n.prototype.write=function(t,e){return t&&(this.offset+=t.length),r.prototype.write.call(this,t,e)}}));const Gn=h.Buffer.from&&h.Buffer.alloc&&h.Buffer.allocUnsafe&&h.Buffer.allocUnsafeSlow?h.Buffer.from:t=>new h.Buffer(t);function Zn(t,e){const r=(t,r)=>e(t,r)>>>0;return r.signed=e,r.unsigned=r,r.model=t,r}const Hn=Zn("crc1",(function(t,e){h.Buffer.isBuffer(t)||(t=Gn(t));let r=~~e,n=0;for(let e=0;e<t.length;e++){n+=t[e]}return r+=n%256,r%256}));let Qn=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];"undefined"!=typeof Int32Array&&(Qn=new Int32Array(Qn));const qn=Zn("crc-8",(function(t,e){h.Buffer.isBuffer(t)||(t=Gn(t));let r=~~e;for(let e=0;e<t.length;e++){const n=t[e];r=255&Qn[255&(r^n)]}return r}));let Vn=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];"undefined"!=typeof Int32Array&&(Vn=new Int32Array(Vn));const $n=Zn("dallas-1-wire",(function(t,e){h.Buffer.isBuffer(t)||(t=Gn(t));let r=~~e;for(let e=0;e<t.length;e++){const n=t[e];r=255&Vn[255&(r^n)]}return r}));let Yn=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(Yn=new Int32Array(Yn));const Wn=Zn("crc-16",(function(t,e){h.Buffer.isBuffer(t)||(t=Gn(t));let r=~~e;for(let e=0;e<t.length;e++){const n=t[e];r=65535&(Yn[255&(r^n)]^r>>8)}return r}));let Kn=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920];"undefined"!=typeof Int32Array&&(Kn=new Int32Array(Kn));const Xn=Zn("ccitt",(function(t,e){h.Buffer.isBuffer(t)||(t=Gn(t));let r=void 0!==e?~~e:65535;for(let e=0;e<t.length;e++){const n=t[e];r=65535&(Kn[255&(r>>8^n)]^r<<8)}return r}));let Jn=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(Jn=new Int32Array(Jn));const ti=Zn("crc-16-modbus",(function(t,e){h.Buffer.isBuffer(t)||(t=Gn(t));let r=void 0!==e?~~e:65535;for(let e=0;e<t.length;e++){const n=t[e];r=65535&(Jn[255&(r^n)]^r>>8)}return r})),ei=Zn("xmodem",(function(t,e){h.Buffer.isBuffer(t)||(t=Gn(t));let r=void 0!==e?~~e:0;for(let e=0;e<t.length;e++){let n=r>>>8&255;n^=255&t[e],n^=n>>>4,r=r<<8&65535,r^=n,n=n<<5&65535,r^=n,n=n<<7&65535,r^=n}return r}));let ri=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];"undefined"!=typeof Int32Array&&(ri=new Int32Array(ri));const ni=Zn("kermit",(function(t,e){h.Buffer.isBuffer(t)||(t=Gn(t));let r=void 0!==e?~~e:0;for(let e=0;e<t.length;e++){const n=t[e];r=65535&(ri[255&(r^n)]^r>>8)}return r}));let ii=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];"undefined"!=typeof Int32Array&&(ii=new Int32Array(ii));const oi=Zn("crc-24",(function(t,e){h.Buffer.isBuffer(t)||(t=Gn(t));let r=void 0!==e?~~e:11994318;for(let e=0;e<t.length;e++){const n=t[e];r=16777215&(ii[255&(r>>16^n)]^r<<8)}return r}));let si=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(si=new Int32Array(si));const ai=Zn("crc-32",(function(t,e){h.Buffer.isBuffer(t)||(t=Gn(t));let r=0===e?0:~e;for(let e=0;e<t.length;e++){const n=t[e];r=si[255&(r^n)]^r>>>8}return~r}));let ui=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(ui=new Int32Array(ui));const ci=Zn("jam",(function(t,e=-1){h.Buffer.isBuffer(t)||(t=Gn(t));let r=0===e?0:~~e;for(let e=0;e<t.length;e++){const n=t[e];r=ui[255&(r^n)]^r>>>8}return r}));var fi={crc1:Hn,crc8:qn,crc81wire:$n,crc16:Wn,crc16ccitt:Xn,crc16modbus:ti,crc16xmodem:ei,crc16kermit:ni,crc24:oi,crc32:ai,crcjam:ci},li=Object.freeze({__proto__:null,crc1:Hn,crc8:qn,crc81wire:$n,crc16:Wn,crc16ccitt:Xn,crc16modbus:ti,crc16xmodem:ei,crc16kermit:ni,crc24:oi,crc32:ai,crcjam:ci,default:fi}),hi=u.getAugmentedNamespace(li);const{Transform:pi}=Tn,{crc32:di}=hi;var yi=class extends pi{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(t,e,r){t&&(this.checksum=di(t,this.checksum),this.rawSize+=t.length),r(null,t)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}};const{DeflateRaw:mi}=I.default,{crc32:_i}=hi;var gi={CRC32Stream:yi,DeflateCRC32Stream:class extends mi{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(t,e){return t&&(this.compressedSize+=t.length),super.push(t,e)}write(t,e,r){return t&&(this.checksum=_i(t,this.checksum),this.rawSize+=t.length),super.write(t,e,r)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(t=!1){return t?this.compressedSize:this.rawSize}}},vi=u.createCommonjsModule((function(t){var e=E.default.inherits,{CRC32Stream:r}=gi,{DeflateCRC32Stream:n}=gi,i=t.exports=function(t){if(!(this instanceof i))return new i(t);t=this.options=this._defaults(t),Un.call(this,t),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}};e(i,Un),i.prototype._afterAppend=function(t){this._entries.push(t),t.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(t),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()},i.prototype._appendBuffer=function(t,e,r){0===e.length&&t.setMethod(Pn.METHOD_STORED);var n=t.getMethod();return n===Pn.METHOD_STORED&&(t.setSize(e.length),t.setCompressedSize(e.length),t.setCrc(l.bufferCrc32.unsigned(e))),this._writeLocalFileHeader(t),n===Pn.METHOD_STORED?(this.write(e),this._afterAppend(t),void r(null,t)):n===Pn.METHOD_DEFLATED?void this._smartStream(t,r).end(e):void r(new Error("compression method "+n+" not implemented"))},i.prototype._appendStream=function(t,e,r){t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(Pn.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(t);var n=this._smartStream(t,r);e.once("error",(function(t){n.emit("error",t),n.end()})),e.pipe(n)},i.prototype._defaults=function(t){return"object"!=typeof t&&(t={}),"object"!=typeof t.zlib&&(t.zlib={}),"number"!=typeof t.zlib.level&&(t.zlib.level=Pn.ZLIB_BEST_SPEED),t.forceZip64=!!t.forceZip64,t.forceLocalTime=!!t.forceLocalTime,t},i.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(t){this._writeCentralFileHeader(t)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()},i.prototype._normalizeEntry=function(t){-1===t.getMethod()&&t.setMethod(Pn.METHOD_DEFLATED),t.getMethod()===Pn.METHOD_DEFLATED&&(t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(Pn.MIN_VERSION_DATA_DESCRIPTOR)),-1===t.getTime()&&t.setTime(new Date,this._archive.forceLocalTime),t._offsets={file:0,data:0,contents:0}},i.prototype._smartStream=function(t,e){var i=t.getMethod()===Pn.METHOD_DEFLATED?new n(this.options.zlib):new r,o=null;return i.once("end",function(){var r=i.digest().readUInt32BE(0);t.setCrc(r),t.setSize(i.size()),t.setCompressedSize(i.size(!0)),this._afterAppend(t),e(o,t)}.bind(this)),i.once("error",(function(t){o=t})),i.pipe(this,{end:!1}),i},i.prototype._writeCentralDirectoryEnd=function(){var t=this._entries.length,e=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(t=Pn.ZIP64_MAGIC_SHORT,e=Pn.ZIP64_MAGIC,r=Pn.ZIP64_MAGIC),this.write(zn.getLongBytes(Pn.SIG_EOCD)),this.write(Pn.SHORT_ZERO),this.write(Pn.SHORT_ZERO),this.write(zn.getShortBytes(t)),this.write(zn.getShortBytes(t)),this.write(zn.getLongBytes(e)),this.write(zn.getLongBytes(r));var n=this.getComment(),i=Buffer.byteLength(n);this.write(zn.getShortBytes(i)),this.write(n)},i.prototype._writeCentralDirectoryZip64=function(){this.write(zn.getLongBytes(Pn.SIG_ZIP64_EOCD)),this.write(zn.getEightBytes(44)),this.write(zn.getShortBytes(Pn.MIN_VERSION_ZIP64)),this.write(zn.getShortBytes(Pn.MIN_VERSION_ZIP64)),this.write(Pn.LONG_ZERO),this.write(Pn.LONG_ZERO),this.write(zn.getEightBytes(this._entries.length)),this.write(zn.getEightBytes(this._entries.length)),this.write(zn.getEightBytes(this._archive.centralLength)),this.write(zn.getEightBytes(this._archive.centralOffset)),this.write(zn.getLongBytes(Pn.SIG_ZIP64_EOCD_LOC)),this.write(Pn.LONG_ZERO),this.write(zn.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(zn.getLongBytes(1))},i.prototype._writeCentralFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t._offsets,i=t.getSize(),o=t.getCompressedSize();if(t.isZip64()||n.file>Pn.ZIP64_MAGIC){i=Pn.ZIP64_MAGIC,o=Pn.ZIP64_MAGIC,t.setVersionNeededToExtract(Pn.MIN_VERSION_ZIP64);var s=Buffer.concat([zn.getShortBytes(Pn.ZIP64_EXTRA_ID),zn.getShortBytes(24),zn.getEightBytes(t.getSize()),zn.getEightBytes(t.getCompressedSize()),zn.getEightBytes(n.file)],28);t.setExtra(s)}this.write(zn.getLongBytes(Pn.SIG_CFH)),this.write(zn.getShortBytes(t.getPlatform()<<8|Pn.VERSION_MADEBY)),this.write(zn.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(zn.getShortBytes(r)),this.write(zn.getLongBytes(t.getTimeDos())),this.write(zn.getLongBytes(t.getCrc())),this.write(zn.getLongBytes(o)),this.write(zn.getLongBytes(i));var a=t.getName(),u=t.getComment(),c=t.getCentralDirectoryExtra();e.usesUTF8ForNames()&&(a=Buffer.from(a),u=Buffer.from(u)),this.write(zn.getShortBytes(a.length)),this.write(zn.getShortBytes(c.length)),this.write(zn.getShortBytes(u.length)),this.write(Pn.SHORT_ZERO),this.write(zn.getShortBytes(t.getInternalAttributes())),this.write(zn.getLongBytes(t.getExternalAttributes())),n.file>Pn.ZIP64_MAGIC?this.write(zn.getLongBytes(Pn.ZIP64_MAGIC)):this.write(zn.getLongBytes(n.file)),this.write(a),this.write(c),this.write(u)},i.prototype._writeDataDescriptor=function(t){this.write(zn.getLongBytes(Pn.SIG_DD)),this.write(zn.getLongBytes(t.getCrc())),t.isZip64()?(this.write(zn.getEightBytes(t.getCompressedSize())),this.write(zn.getEightBytes(t.getSize()))):(this.write(zn.getLongBytes(t.getCompressedSize())),this.write(zn.getLongBytes(t.getSize())))},i.prototype._writeLocalFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t.getName(),i=t.getLocalFileDataExtra();t.isZip64()&&(e.useDataDescriptor(!0),t.setVersionNeededToExtract(Pn.MIN_VERSION_ZIP64)),e.usesUTF8ForNames()&&(n=Buffer.from(n)),t._offsets.file=this.offset,this.write(zn.getLongBytes(Pn.SIG_LFH)),this.write(zn.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(zn.getShortBytes(r)),this.write(zn.getLongBytes(t.getTimeDos())),t._offsets.data=this.offset,e.usesDataDescriptor()?(this.write(Pn.LONG_ZERO),this.write(Pn.LONG_ZERO),this.write(Pn.LONG_ZERO)):(this.write(zn.getLongBytes(t.getCrc())),this.write(zn.getLongBytes(t.getCompressedSize())),this.write(zn.getLongBytes(t.getSize()))),this.write(zn.getShortBytes(n.length)),this.write(zn.getShortBytes(i.length)),this.write(n),this.write(i),t._offsets.contents=this.offset},i.prototype.getComment=function(t){return null!==this._archive.comment?this._archive.comment:""},i.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>Pn.ZIP64_MAGIC_SHORT||this._archive.centralLength>Pn.ZIP64_MAGIC||this._archive.centralOffset>Pn.ZIP64_MAGIC},i.prototype.setComment=function(t){this._archive.comment=t}})),bi={ArchiveEntry:Bn,ZipArchiveEntry:Fn,ArchiveOutputStream:Un,ZipArchiveOutputStream:vi},wi=u.createCommonjsModule((function(t){
|
|
16
|
+
/**
|
|
17
|
+
* ZipStream
|
|
18
|
+
*
|
|
19
|
+
* @ignore
|
|
20
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE}
|
|
21
|
+
* @copyright (c) 2014 Chris Talkington, contributors.
|
|
22
|
+
*/
|
|
23
|
+
var e=E.default.inherits,r=bi.ZipArchiveOutputStream,n=bi.ZipArchiveEntry,i=t.exports=function(t){if(!(this instanceof i))return new i(t);(t=this.options=t||{}).zlib=t.zlib||{},r.call(this,t),"number"==typeof t.level&&t.level>=0&&(t.zlib.level=t.level,delete t.level),t.forceZip64||"number"!=typeof t.zlib.level||0!==t.zlib.level||(t.store=!0),t.comment&&t.comment.length>0&&this.setComment(t.comment)};e(i,r),i.prototype._normalizeFileData=function(t){var e="directory"===(t=On.defaults(t,{type:"file",name:null,linkname:null,date:null,mode:null,store:this.options.store,comment:""})).type,r="symlink"===t.type;return t.name&&(t.name=On.sanitizePath(t.name),r||"/"!==t.name.slice(-1)?e&&(t.name+="/"):(e=!0,t.type="directory")),(e||r)&&(t.store=!0),t.date=On.dateify(t.date),t},i.prototype.entry=function(t,e,i){if("function"!=typeof i&&(i=this._emitErrorCallback.bind(this)),"file"===(e=this._normalizeFileData(e)).type||"directory"===e.type||"symlink"===e.type)if("string"==typeof e.name&&0!==e.name.length){if("symlink"!==e.type||"string"==typeof e.linkname){var o=new n(e.name);return o.setTime(e.date,this.options.forceLocalTime),e.store&&o.setMethod(0),e.comment.length>0&&o.setComment(e.comment),"symlink"===e.type&&"number"!=typeof e.mode&&(e.mode=40960),"number"==typeof e.mode&&("symlink"===e.type&&(e.mode|=40960),o.setUnixMode(e.mode)),"symlink"===e.type&&"string"==typeof e.linkname&&(t=Buffer.from(e.linkname)),r.prototype.entry.call(this,o,t,i)}i(new Error("entry linkname must be a non-empty string value when type equals symlink"))}else i(new Error("entry name must be a non-empty string value"));else i(new Error(e.type+" entries not currently supported"))},i.prototype.finalize=function(){this.finish()}})),Ei=function(t){if(!(this instanceof Ei))return new Ei(t);t=this.options=On.defaults(t,{comment:"",forceUTC:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new wi(t)};Ei.prototype.append=function(t,e,r){this.engine.entry(t,e,r)},Ei.prototype.finalize=function(){this.engine.finalize()},Ei.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},Ei.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)},Ei.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)};var Si=Ei;const{Buffer:Oi}=O.default,Ii=Symbol.for("BufferList");function Ti(t){if(!(this instanceof Ti))return new Ti(t);Ti._init.call(this,t)}Ti._init=function(t){Object.defineProperty(this,Ii,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},Ti.prototype._new=function(t){return new Ti(t)},Ti.prototype._offset=function(t){if(0===t)return[0,0];let e=0;for(let r=0;r<this._bufs.length;r++){const n=e+this._bufs[r].length;if(t<n||r===this._bufs.length-1)return[r,t-e];e=n}},Ti.prototype._reverseOffset=function(t){const e=t[0];let r=t[1];for(let t=0;t<e;t++)r+=this._bufs[t].length;return r},Ti.prototype.get=function(t){if(t>this.length||t<0)return;const e=this._offset(t);return this._bufs[e[0]][e[1]]},Ti.prototype.slice=function(t,e){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof e&&e<0&&(e+=this.length),this.copy(null,0,t,e)},Ti.prototype.copy=function(t,e,r,n){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof n||n>this.length)&&(n=this.length),r>=this.length)return t||Oi.alloc(0);if(n<=0)return t||Oi.alloc(0);const i=!!t,o=this._offset(r),s=n-r;let a=s,u=i&&e||0,c=o[1];if(0===r&&n===this.length){if(!i)return 1===this._bufs.length?this._bufs[0]:Oi.concat(this._bufs,this.length);for(let e=0;e<this._bufs.length;e++)this._bufs[e].copy(t,u),u+=this._bufs[e].length;return t}if(a<=this._bufs[o[0]].length-c)return i?this._bufs[o[0]].copy(t,e,c,c+a):this._bufs[o[0]].slice(c,c+a);i||(t=Oi.allocUnsafe(s));for(let e=o[0];e<this._bufs.length;e++){const r=this._bufs[e].length-c;if(!(a>r)){this._bufs[e].copy(t,u,c,c+a),u+=r;break}this._bufs[e].copy(t,u,c),u+=r,a-=r,c&&(c=0)}return t.length>u?t.slice(0,u):t},Ti.prototype.shallowSlice=function(t,e){if(t=t||0,e="number"!=typeof e?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();const r=this._offset(t),n=this._offset(e),i=this._bufs.slice(r[0],n[0]+1);return 0===n[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,n[1]),0!==r[1]&&(i[0]=i[0].slice(r[1])),this._new(i)},Ti.prototype.toString=function(t,e,r){return this.slice(e,r).toString(t)},Ti.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},Ti.prototype.duplicate=function(){const t=this._new();for(let e=0;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},Ti.prototype.append=function(t){if(null==t)return this;if(t.buffer)this._appendBuffer(Oi.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let e=0;e<t.length;e++)this.append(t[e]);else if(this._isBufferList(t))for(let e=0;e<t._bufs.length;e++)this.append(t._bufs[e]);else"number"==typeof t&&(t=t.toString()),this._appendBuffer(Oi.from(t));return this},Ti.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length},Ti.prototype.indexOf=function(t,e,r){if(void 0===r&&"string"==typeof e&&(r=e,e=void 0),"function"==typeof t||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof t?t=Oi.from([t]):"string"==typeof t?t=Oi.from(t,r):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=Oi.from(t.buffer,t.byteOffset,t.byteLength):Oi.isBuffer(t)||(t=Oi.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),0===t.length)return e>this.length?this.length:e;const n=this._offset(e);let i=n[0],o=n[1];for(;i<this._bufs.length;i++){const e=this._bufs[i];for(;o<e.length;){if(e.length-o>=t.length){const r=e.indexOf(t,o);if(-1!==r)return this._reverseOffset([i,r]);o=e.length-t.length+1}else{const e=this._reverseOffset([i,o]);if(this._match(e,t))return e;o++}}o=0}return-1},Ti.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let r=0;r<e.length;r++)if(this.get(t+r)!==e[r])return!1;return!0},function(){const t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const e in t)!function(e){Ti.prototype[e]=null===t[e]?function(t,r){return this.slice(t,t+r)[e](0,r)}:function(r){return this.slice(r,r+t[e])[e](0)}}(e)}(),Ti.prototype._isBufferList=function(t){return t instanceof Ti||Ti.isBufferList(t)},Ti.isBufferList=function(t){return null!=t&&t[Ii]};var Ai=Ti;const ki=Tn.Duplex;function ji(t){if(!(this instanceof ji))return new ji(t);if("function"==typeof t){this._callback=t;const e=function(t){this._callback&&(this._callback(t),this._callback=null)}.bind(this);this.on("pipe",(function(t){t.on("error",e)})),this.on("unpipe",(function(t){t.removeListener("error",e)})),t=null}Ai._init.call(this,t),ki.call(this)}n.inherits(ji,ki),Object.assign(ji.prototype,Ai.prototype),ji.prototype._new=function(t){return new ji(t)},ji.prototype._write=function(t,e,r){this._appendBuffer(t),"function"==typeof r&&r()},ji.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)},ji.prototype.end=function(t){ki.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},ji.prototype._destroy=function(t,e){this._bufs.length=0,this.length=0,e(t)},ji.prototype._isBufferList=function(t){return t instanceof ji||t instanceof Ai||ji.isBufferList(t)},ji.isBufferList=Ai.isBufferList;var Li=ji,Di=ji,Bi=Ai;Li.BufferListStream=Di,Li.BufferList=Bi;var zi=Buffer.alloc,xi="0".charCodeAt(0),Ri=Buffer.from("ustar\0","binary"),Ci=Buffer.from("00","binary"),Pi=Buffer.from("ustar ","binary"),Fi=Buffer.from(" \0","binary"),Mi=parseInt("7777",8),Ni=257,Ui=function(t,e,r,n){for(;r<n;r++)if(t[r]===e)return r;return n},Gi=function(t){for(var e=256,r=0;r<148;r++)e+=t[r];for(var n=156;n<512;n++)e+=t[n];return e},Zi=function(t,e){return(t=t.toString(8)).length>e?"7777777777777777777".slice(0,e)+" ":"0000000000000000000".slice(0,e-t.length)+t+" "};var Hi=function(t,e,r){if(128&(t=t.slice(e,e+r))[e=0])return function(t){var e;if(128===t[0])e=!0;else{if(255!==t[0])return null;e=!1}for(var r=[],n=t.length-1;n>0;n--){var i=t[n];e?r.push(i):r.push(255-i)}var o=0,s=r.length;for(n=0;n<s;n++)o+=r[n]*Math.pow(256,n);return e?o:-1*o}(t);for(;e<t.length&&32===t[e];)e++;for(var n=function(t,e,r){return"number"!=typeof t?r:(t=~~t)>=e?e:t>=0||(t+=e)>=0?t:0}(Ui(t,32,e,t.length),t.length,t.length);e<n&&0===t[e];)e++;return n===e?0:parseInt(t.slice(e,n).toString(),8)},Qi=function(t,e,r,n){return t.slice(e,Ui(t,0,e,e+r)).toString(n)},qi=function(t){var e=Buffer.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t},Vi=function(t,e){return Qi(t,0,t.length,e)},$i=function(t){var e="";t.name&&(e+=qi(" path="+t.name+"\n")),t.linkname&&(e+=qi(" linkpath="+t.linkname+"\n"));var r=t.pax;if(r)for(var n in r)e+=qi(" "+n+"="+r[n]+"\n");return Buffer.from(e)},Yi=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&32!==t[r];)r++;var n=parseInt(t.slice(0,r).toString(),10);if(!n)return e;var i=t.slice(r+1,n-1).toString(),o=i.indexOf("=");if(-1===o)return e;e[i.slice(0,o)]=i.slice(o+1),t=t.slice(n)}return e},Wi=function(t){var e=zi(512),r=t.name,n="";if(5===t.typeflag&&"/"!==r[r.length-1]&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var i=r.indexOf("/");if(-1===i)return null;n+=n?"/"+r.slice(0,i):r.slice(0,i),r=r.slice(i+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(n)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(Zi(t.mode&Mi,6),100),e.write(Zi(t.uid,6),108),e.write(Zi(t.gid,6),116),e.write(Zi(t.size,11),124),e.write(Zi(t.mtime.getTime()/1e3|0,11),136),e[156]=xi+function(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}(t.type),t.linkname&&e.write(t.linkname,157),Ri.copy(e,Ni),Ci.copy(e,263),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(Zi(t.devmajor||0,6),329),e.write(Zi(t.devminor||0,6),337),n&&e.write(n,345),e.write(Zi(Gi(e),6),148),e)},Ki=function(t,e){var r=0===t[156]?0:t[156]-xi,n=Qi(t,0,100,e),i=Hi(t,100,8),o=Hi(t,108,8),s=Hi(t,116,8),a=Hi(t,124,12),u=Hi(t,136,12),c=function(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}(r),f=0===t[157]?null:Qi(t,157,100,e),l=Qi(t,265,32),h=Qi(t,297,32),p=Hi(t,329,8),d=Hi(t,337,8),y=Gi(t);if(256===y)return null;if(y!==Hi(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(0===Ri.compare(t,Ni,263))t[345]&&(n=Qi(t,345,155,e)+"/"+n);else if(0!==Pi.compare(t,Ni,263)||0!==Fi.compare(t,263,265))throw new Error("Invalid tar header: unknown format.");return 0===r&&n&&"/"===n[n.length-1]&&(r=5),{name:n,mode:i,uid:o,gid:s,size:a,mtime:new Date(1e3*u),type:c,linkname:f,uname:l,gname:h,devmajor:p,devminor:d}},Xi=Tn.Writable,Ji=Tn.PassThrough,to=function(){},eo=function(t){return(t&=511)&&512-t},ro=function(t,e){this._parent=t,this.offset=e,Ji.call(this,{autoDestroy:!1})};E.default.inherits(ro,Ji),ro.prototype.destroy=function(t){this._parent.destroy(t)};var no=function(t){if(!(this instanceof no))return new no(t);Xi.call(this,t),t=t||{},this._offset=0,this._buffer=Li(),this._missing=0,this._partial=!1,this._onparse=to,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,n=function(){e._continue()},i=function(t){if(e._locked=!1,t)return e.destroy(t);e._stream||n()},o=function(){e._stream=null;var t=eo(e._header.size);t?e._parse(t,s):e._parse(512,l),e._locked||n()},s=function(){e._buffer.consume(eo(e._header.size)),e._parse(512,l),n()},a=function(){var t=e._header.size;e._paxGlobal=Yi(r.slice(0,t)),r.consume(t),o()},u=function(){var t=e._header.size;e._pax=Yi(r.slice(0,t)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(t),o()},c=function(){var n=e._header.size;this._gnuLongPath=Vi(r.slice(0,n),t.filenameEncoding),r.consume(n),o()},f=function(){var n=e._header.size;this._gnuLongLinkPath=Vi(r.slice(0,n),t.filenameEncoding),r.consume(n),o()},l=function(){var s,h=e._offset;try{s=e._header=Ki(r.slice(0,512),t.filenameEncoding)}catch(t){e.emit("error",t)}return r.consume(512),s?"gnu-long-path"===s.type?(e._parse(s.size,c),void n()):"gnu-long-link-path"===s.type?(e._parse(s.size,f),void n()):"pax-global-header"===s.type?(e._parse(s.size,a),void n()):"pax-header"===s.type?(e._parse(s.size,u),void n()):(e._gnuLongPath&&(s.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(s.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=s=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t}(s,e._pax),e._pax=null),e._locked=!0,s.size&&"directory"!==s.type?(e._stream=new ro(e,h),e.emit("entry",s,e._stream,i),e._parse(s.size,o),void n()):(e._parse(512,l),void e.emit("entry",s,function(t,e){var r=new ro(t,e);return r.end(),r}(e,h),i))):(e._parse(512,l),void n())};this._onheader=l,this._parse(512,l)};E.default.inherits(no,Xi),no.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))},no.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)},no.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=to,this._overflow?this._write(this._overflow,void 0,t):t()}},no.prototype._write=function(t,e,r){if(!this._destroyed){var n=this._stream,i=this._buffer,o=this._missing;if(t.length&&(this._partial=!0),t.length<o)return this._missing-=t.length,this._overflow=null,n?n.write(t,r):(i.append(t),r());this._cb=r,this._missing=0;var s=null;t.length>o&&(s=t.slice(o),t=t.slice(0,o)),n?n.end(t):i.append(t),this._overflow=s,this._onparse()}},no.prototype._final=function(t){if(this._partial)return this.destroy(new Error("Unexpected end of data"));t()};var io=no,oo=Buffer.alloc,so=Tn.Readable,ao=Tn.Writable,uo=T.default.StringDecoder,co=parseInt("755",8),fo=parseInt("644",8),lo=oo(1024),ho=function(){},po=function(t,e){(e&=511)&&t.push(lo.slice(0,512-e))};var yo=function(t){ao.call(this),this.written=0,this._to=t,this._destroyed=!1};n.inherits(yo,ao),yo.prototype._write=function(t,e,r){if(this.written+=t.length,this._to.push(t))return r();this._to._drain=r},yo.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var mo=function(){ao.call(this),this.linkname="",this._decoder=new uo("utf-8"),this._destroyed=!1};n.inherits(mo,ao),mo.prototype._write=function(t,e,r){this.linkname+=this._decoder.write(t),r()},mo.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var _o=function(){ao.call(this),this._destroyed=!1};n.inherits(_o,ao),_o.prototype._write=function(t,e,r){r(new Error("No body allowed for this entry"))},_o.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var go=function(t){if(!(this instanceof go))return new go(t);so.call(this,t),this._drain=ho,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};n.inherits(go,so),go.prototype.entry=function(t,e,r){if(this._stream)throw new Error("already piping an entry");if(!this._finalized&&!this._destroyed){"function"==typeof e&&(r=e,e=null),r||(r=ho);var n=this;if(t.size&&"symlink"!==t.type||(t.size=0),t.type||(t.type=function(t){switch(t&l.fsConstants.S_IFMT){case l.fsConstants.S_IFBLK:return"block-device";case l.fsConstants.S_IFCHR:return"character-device";case l.fsConstants.S_IFDIR:return"directory";case l.fsConstants.S_IFIFO:return"fifo";case l.fsConstants.S_IFLNK:return"symlink"}return"file"}(t.mode)),t.mode||(t.mode="directory"===t.type?co:fo),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),"string"==typeof e&&(e=Buffer.from(e)),Buffer.isBuffer(e)){t.size=e.length,this._encode(t);var i=this.push(e);return po(n,t.size),i?process.nextTick(r):this._drain=r,new _o}if("symlink"===t.type&&!t.linkname){var o=new mo;return l.endOfStream(o,(function(e){if(e)return n.destroy(),r(e);t.linkname=o.linkname,n._encode(t),r()})),o}if(this._encode(t),"file"!==t.type&&"contiguous-file"!==t.type)return process.nextTick(r),new _o;var s=new yo(this);return this._stream=s,l.endOfStream(s,(function(e){return n._stream=null,e?(n.destroy(),r(e)):s.written!==t.size?(n.destroy(),r(new Error("size mismatch"))):(po(n,t.size),n._finalizing&&n.finalize(),void r())})),s}},go.prototype.finalize=function(){this._stream?this._finalizing=!0:this._finalized||(this._finalized=!0,this.push(lo),this.push(null))},go.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())},go.prototype._encode=function(t){if(!t.pax){var e=Wi(t);if(e)return void this.push(e)}this._encodePax(t)},go.prototype._encodePax=function(t){var e=$i({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:"PaxHeader",mode:t.mode,uid:t.uid,gid:t.gid,size:e.length,mtime:t.mtime,type:"pax-header",linkname:t.linkname&&"PaxHeader",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(Wi(r)),this.push(e),po(this,e.length),r.size=t.size,r.type=t.type,this.push(Wi(r))},go.prototype._read=function(t){var e=this._drain;this._drain=ho,e()};var vo={extract:io,pack:go},bo=function(t){if(!(this instanceof bo))return new bo(t);"object"!=typeof(t=this.options=On.defaults(t,{gzip:!1})).gzipOptions&&(t.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=vo.pack(t),this.compressor=!1,t.gzip&&(this.compressor=I.default.createGzip(t.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))};bo.prototype._onCompressorError=function(t){this.engine.emit("error",t)},bo.prototype.append=function(t,e,r){var n=this;function i(t,i){t?r(t):n.engine.entry(e,i,(function(t){r(t,e)}))}if(e.mtime=e.date,"buffer"===e.sourceType)i(null,t);else if("stream"===e.sourceType&&e.stats){e.size=e.stats.size;var o=n.engine.entry(e,(function(t){r(t,e)}));t.pipe(o)}else"stream"===e.sourceType&&On.collectStream(t,i)},bo.prototype.finalize=function(){this.engine.finalize()},bo.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},bo.prototype.pipe=function(t,e){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(t,e):this.engine.pipe.apply(this.engine,arguments)},bo.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)};var wo=bo,Eo=E.default.inherits,So=Tn.Transform,Oo=function(t){if(!(this instanceof Oo))return new Oo(t);t=this.options=On.defaults(t,{}),So.call(this,t),this.supports={directory:!0,symlink:!0},this.files=[]};
|
|
24
|
+
/**
|
|
25
|
+
* JSON Format Plugin
|
|
26
|
+
*
|
|
27
|
+
* @module plugins/json
|
|
28
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
29
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
30
|
+
*/Eo(Oo,So),Oo.prototype._transform=function(t,e,r){r(null,t)},Oo.prototype._writeStringified=function(){var t=JSON.stringify(this.files);this.write(t)},Oo.prototype.append=function(t,e,r){var n=this;function i(t,i){t?r(t):(e.size=i.length||0,e.crc32=l.bufferCrc32.unsigned(i),n.files.push(e),r(null,e))}e.crc32=0,"buffer"===e.sourceType?i(null,t):"stream"===e.sourceType&&On.collectStream(t,i)},Oo.prototype.finalize=function(){this._writeStringified(),this.end()};var Io=Oo,To={},Ao=function(t,e){return Ao.create(t,e)};
|
|
31
|
+
/**
|
|
32
|
+
* Archiver Vending
|
|
33
|
+
*
|
|
34
|
+
* @ignore
|
|
35
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
36
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
37
|
+
*/Ao.create=function(t,e){if(To[t]){var r=new Dn(t,e);return r.setFormat(t),r.setModule(new To[t](e)),r}throw new Error("create("+t+"): format not registered")},Ao.registerFormat=function(t,e){if(To[t])throw new Error("register("+t+"): format already registered");if("function"!=typeof e)throw new Error("register("+t+"): format module invalid");if("function"!=typeof e.prototype.append||"function"!=typeof e.prototype.finalize)throw new Error("register("+t+"): format module missing methods");To[t]=e},Ao.registerFormat("zip",Si),Ao.registerFormat("tar",wo),Ao.registerFormat("json",Io);var ko=m({__proto__:null,default:Ao},[Ao]);exports.index=ko;
|
|
38
|
+
//# sourceMappingURL=index-35cff1d5.js.map
|