UNPKG

@zidsa/themes-cli

Version:

A CLI to process zid theme folder

2 lines 1.07 MB
/*! For license information please see zid-theme.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("open")):"function"==typeof define&&define.amd?define(["open"],t):"object"==typeof exports?exports.cli=t(require("open")):e.cli=t(e.open)}(global,(e=>(()=>{var t={6584:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4988);class r extends i.EventTarget{constructor(){throw super(),new TypeError("AbortSignal cannot be constructed directly")}get aborted(){const e=a.get(this);if("boolean"!=typeof e)throw new TypeError("Expected 'this' to be an 'AbortSignal' object, but got "+(null===this?"null":typeof this));return e}}i.defineEventAttribute(r.prototype,"abort");const a=new WeakMap;Object.defineProperties(r.prototype,{aborted:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(r.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class o{constructor(){s.set(this,function(){const e=Object.create(r.prototype);return i.EventTarget.call(e),a.set(e,!1),e}())}get signal(){return c(this)}abort(){var e;e=c(this),!1===a.get(e)&&(a.set(e,!0),e.dispatchEvent({type:"abort"}))}}const s=new WeakMap;function c(e){const t=s.get(e);if(null==t)throw new TypeError("Expected 'this' to be an 'AbortController' object, but got "+(null===e?"null":typeof e));return t}Object.defineProperties(o.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(o.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"}),t.AbortController=o,t.AbortSignal=r,t.default=o,e.exports=o,e.exports.AbortController=e.exports.default=o,e.exports.AbortSignal=r},2594:(e,t,n)=>{"use strict";var i=n(1297),r=n(6049);function a(e){if(!(this instanceof a))return new a(e);this.headers=e.headers,this.negotiator=new i(e)}function o(e){return-1===e.indexOf("/")?r.lookup(e):e}function s(e){return"string"==typeof e}e.exports=a,a.prototype.type=a.prototype.types=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var n=0;n<t.length;n++)t[n]=arguments[n]}if(!t||0===t.length)return this.negotiator.mediaTypes();if(!this.headers.accept)return t[0];var i=t.map(o),r=this.negotiator.mediaTypes(i.filter(s))[0];return!!r&&t[i.indexOf(r)]},a.prototype.encoding=a.prototype.encodings=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var n=0;n<t.length;n++)t[n]=arguments[n]}return t&&0!==t.length?this.negotiator.encodings(t)[0]||!1:this.negotiator.encodings()},a.prototype.charset=a.prototype.charsets=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var n=0;n<t.length;n++)t[n]=arguments[n]}return t&&0!==t.length?this.negotiator.charsets(t)[0]||!1:this.negotiator.charsets()},a.prototype.lang=a.prototype.langs=a.prototype.language=a.prototype.languages=function(e){var t=e;if(t&&!Array.isArray(t)){t=new Array(arguments.length);for(var n=0;n<t.length;n++)t[n]=arguments[n]}return t&&0!==t.length?this.negotiator.languages(t)[0]||!1:this.negotiator.languages()}},283:(e,t,n)=>{const i=n(4070),r=n(6928),a=n(16),o=n(7224),s=(e,t)=>"boolean"==typeof e?e:t,c=(e,t)=>"string"==typeof e?e:t,l={noSort:!1,readEntries:!1,method:i.Constants.NONE,fs:null};e.exports=function(e,t){let n=null;const p=Object.assign(Object.create(null),l);e&&"object"==typeof e&&(e instanceof Uint8Array||(Object.assign(p,e),e=p.input?p.input:void 0,p.input&&delete p.input),Buffer.isBuffer(e)&&(n=e,p.method=i.Constants.BUFFER,e=void 0)),Object.assign(p,t);const u=new i(p);if(e&&"string"==typeof e){if(!u.fs.existsSync(e))throw new Error(i.Errors.INVALID_FILENAME);p.method=i.Constants.FILE,p.filename=e,n=u.fs.readFileSync(e)}const d=new o(n,p),{canonical:f,sanitize:h}=i;function m(e){var t;return e&&d&&("string"==typeof e&&(t=d.getEntry(e)),"object"==typeof e&&void 0!==e.entryName&&void 0!==e.header&&(t=d.getEntry(e.entryName)),t)?t:null}function g(e){const{join:t,normalize:n,sep:i}=r.posix;return t(".",n(i+e.split("\\").join(i)+i))}return{readFile:function(e,t){var n=m(e);return n&&n.getData(t)||null},readFileAsync:function(e,t){var n=m(e);n?n.getDataAsync(t):t(null,"getEntry failed for:"+e)},readAsText:function(e,t){var n=m(e);if(n){var i=n.getData();if(i&&i.length)return i.toString(t||"utf8")}return""},readAsTextAsync:function(e,t,n){var i=m(e);i?i.getDataAsync((function(e,i){i?t(e,i):e&&e.length?t(e.toString(n||"utf8")):t("")})):t("")},deleteFile:function(e){var t=m(e);t&&d.deleteEntry(t.entryName)},addZipComment:function(e){d.comment=e},getZipComment:function(){return d.comment||""},addZipEntryComment:function(e,t){var n=m(e);n&&(n.comment=t)},getZipEntryComment:function(e){var t=m(e);return t&&t.comment||""},updateFile:function(e,t){var n=m(e);n&&n.setData(t)},addLocalFile:function(e,t,n,r){if(!u.fs.existsSync(e))throw new Error(i.Errors.FILE_NOT_FOUND.replace("%s",e));{t=t?g(t):"";var a=e.split("\\").join("/").split("/").pop();t+=n||a;const i=u.fs.statSync(e);this.addFile(t,u.fs.readFileSync(e),r,i)}},addLocalFolder:function(e,t,n,a){var o;if(n instanceof RegExp?(o=n,n=function(e){return o.test(e)}):"function"!=typeof n&&(n=function(){return!0}),t=t?g(t):"",e=r.normalize(e),!u.fs.existsSync(e))throw new Error(i.Errors.FILE_NOT_FOUND.replace("%s",e));{const i=u.findFiles(e),o=this;i.length&&i.forEach((function(i){var s=r.relative(e,i).split("\\").join("/");if(n(s)){var c=u.fs.statSync(i);c.isFile()?o.addFile(t+s,u.fs.readFileSync(i),"",a||c):o.addFile(t+s+"/",Buffer.alloc(0),"",a||c)}}))}},addLocalFolderAsync:function(e,t,n,a){var o;a instanceof RegExp?(o=a,a=function(e){return o.test(e)}):"function"!=typeof a&&(a=function(){return!0}),n=n?g(n):"",e=r.normalize(e);var s=this;u.fs.open(e,"r",(function(o){if(o&&"ENOENT"===o.code)t(void 0,i.Errors.FILE_NOT_FOUND.replace("%s",e));else if(o)t(void 0,o);else{var c=u.findFiles(e),l=-1,p=function(){if((l+=1)<c.length){var i=c[l],o=r.relative(e,i).split("\\").join("/");o=o.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),a(o)?u.fs.stat(i,(function(e,r){e&&t(void 0,e),r.isFile()?u.fs.readFile(i,(function(e,i){e?t(void 0,e):(s.addFile(n+o,i,"",r),p())})):(s.addFile(n+o+"/",Buffer.alloc(0),"",r),p())})):process.nextTick((()=>{p()}))}else t(!0,void 0)};p()}}))},addLocalFolderPromise:function(e,t){return new Promise(((n,i)=>{const{filter:r,zipPath:a}=Object.assign({},t);this.addLocalFolderAsync(e,((e,t)=>{t&&i(t),e&&n(this)}),a,r)}))},addFile:function(e,t,n,r){let o=m(e);const s=null!=o;s||(o=new a,o.entryName=i.canonical(e)),o.comment=n||"";const c="object"==typeof r&&r instanceof u.fs.Stats;c&&(o.header.time=r.mtime);var l=o.isDirectory?16:0;let p=o.isDirectory?16384:32768;return p|=c?4095&r.mode:"number"==typeof r?4095&r:o.isDirectory?493:420,l=(l|p<<16)>>>0,o.attr=l,o.setData(t),s||d.setEntry(o),o},getEntries:function(e){return d.password=e,d?d.entries:[]},getEntry:function(e){return m(e)},getEntryCount:function(){return d.getEntryCount()},forEach:function(e){return d.forEach(e)},extractEntryTo:function(e,t,n,a,o,l){a=s(a,!1),o=s(o,!1),n=s(n,!0),l=c(l,c(o,void 0));var p=m(e);if(!p)throw new Error(i.Errors.NO_ENTRY);var g=f(p.entryName),b=h(t,l&&!p.isDirectory?l:n?g:r.basename(g));if(p.isDirectory)return d.getEntryChildren(p).forEach((function(e){if(e.isDirectory)return;var s=e.getData();if(!s)throw new Error(i.Errors.CANT_EXTRACT_FILE);var c=f(e.entryName),l=h(t,n?c:r.basename(c));const p=o?e.header.fileAttr:void 0;u.writeFileTo(l,s,a,p)})),!0;var v=p.getData(d.password);if(!v)throw new Error(i.Errors.CANT_EXTRACT_FILE);if(u.fs.existsSync(b)&&!a)throw new Error(i.Errors.CANT_OVERRIDE);const y=o?e.header.fileAttr:void 0;return u.writeFileTo(b,v,a,y),!0},test:function(e){if(!d)return!1;for(var t in d.entries)try{if(t.isDirectory)continue;if(!d.entries[t].getData(e))return!1}catch(e){return!1}return!0},extractAllTo:function(e,t,n,r){if(t=s(t,!1),r=c(n,r),n=s(n,!1),!d)throw new Error(i.Errors.NO_ZIP);d.entries.forEach((function(a){var o=h(e,f(a.entryName.toString()));if(a.isDirectory)return void u.makeDir(o);var s=a.getData(r);if(!s)throw new Error(i.Errors.CANT_EXTRACT_FILE);const c=n?a.header.fileAttr:void 0;u.writeFileTo(o,s,t,c);try{u.fs.utimesSync(o,a.header.time,a.header.time)}catch(e){throw new Error(i.Errors.CANT_EXTRACT_FILE)}}))},extractAllToAsync:function(e,t,n,a){if("function"!=typeof t||a||(a=t),t=s(t,!1),"function"!=typeof n||a||(a=n),n=s(n,!1),!a)return new Promise(((i,r)=>{this.extractAllToAsync(e,t,n,(function(e){e?r(e):i(this)}))}));if(!d)return void a(new Error(i.Errors.NO_ZIP));e=r.resolve(e);const o=t=>h(e,r.normalize(f(t.entryName.toString()))),c=(e,t)=>new Error(e+': "'+t+'"'),l=[],p=[];d.entries.forEach((e=>{e.isDirectory?l.push(e):p.push(e)}));for(const e of l){const t=o(e),i=n?e.header.fileAttr:void 0;try{u.makeDir(t),i&&u.fs.chmodSync(t,i),u.fs.utimesSync(t,e.header.time,e.header.time)}catch(e){a(c("Unable to create folder",t))}}p.reverse().reduce((function(a,o){return function(s){if(s)a(s);else{const s=r.normalize(f(o.entryName.toString())),l=h(e,s);o.getDataAsync((function(e,r){if(r)a(new Error(r));else if(e){const i=n?o.header.fileAttr:void 0;u.writeFileToAsync(l,e,t,i,(function(e){e||a(c("Unable to write file",l)),u.fs.utimes(l,o.header.time,o.header.time,(function(e){e?a(c("Unable to set times",l)):a()}))}))}else a(new Error(i.Errors.CANT_EXTRACT_FILE))}))}}}),a)()},writeZip:function(e,t){if(1===arguments.length&&"function"==typeof e&&(t=e,e=""),!e&&p.filename&&(e=p.filename),e){var n=d.compressToBuffer();if(n){var i=u.writeFileTo(e,n,!0);"function"==typeof t&&t(i?null:new Error("failed"),"")}}},writeZipPromise:function(e,t){const{overwrite:n,perm:i}=Object.assign({overwrite:!0},t);return new Promise(((t,r)=>{!e&&p.filename&&(e=p.filename),e||r("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then((a=>{u.writeFileToAsync(e,a,n,i,(e=>e?t(e):r("ADM-ZIP: Wasn't able to write zip file")))}),r)}))},toBufferPromise:function(){return new Promise(((e,t)=>{d.toAsyncBuffer(e,t)}))},toBuffer:function(e,t,n,i){return this.valueOf=2,"function"==typeof e?(d.toAsyncBuffer(e,t,n,i),null):d.compressToBuffer()}}}},974:(e,t,n)=>{var i=n(4070),r=i.Constants;e.exports=function(){var e=20,t=10,n=0,a=0,o=0,s=0,c=0,l=0,p=0,u=0,d=0,f=0,h=0,m=0,g=0;e|=i.isWin?2560:768,n|=r.FLG_EFS;var b={};function v(e){e=new Date(e),o=(e.getFullYear()-1980&127)<<25|e.getMonth()+1<<21|e.getDate()<<16|e.getHours()<<11|e.getMinutes()<<5|e.getSeconds()>>1}return v(+new Date),{get made(){return e},set made(t){e=t},get version(){return t},set version(e){t=e},get flags(){return n},set flags(e){n=e},get method(){return a},set method(e){switch(e){case r.STORED:this.version=10;case r.DEFLATED:default:this.version=20}a=e},get time(){return new Date(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1)},set time(e){v(e)},get timeHighByte(){return o>>>8&255},get crc(){return s},set crc(e){s=Math.max(0,e)>>>0},get compressedSize(){return c},set compressedSize(e){c=Math.max(0,e)>>>0},get size(){return l},set size(e){l=Math.max(0,e)>>>0},get fileNameLength(){return p},set fileNameLength(e){p=e},get extraLength(){return u},set extraLength(e){u=e},get commentLength(){return d},set commentLength(e){d=e},get diskNumStart(){return f},set diskNumStart(e){f=Math.max(0,e)>>>0},get inAttr(){return h},set inAttr(e){h=Math.max(0,e)>>>0},get attr(){return m},set attr(e){m=Math.max(0,e)>>>0},get fileAttr(){return m?m>>>0>>16&4095:0},get offset(){return g},set offset(e){g=Math.max(0,e)>>>0},get encrypted(){return!(1&~n)},get centralHeaderSize(){return r.CENHDR+p+u+d},get realDataOffset(){return g+r.LOCHDR+b.fnameLen+b.extraLen},get localHeader(){return b},loadLocalHeaderFromBinary:function(e){var t=e.slice(g,g+r.LOCHDR);if(t.readUInt32LE(0)!==r.LOCSIG)throw new Error(i.Errors.INVALID_LOC);b={version:t.readUInt16LE(r.LOCVER),flags:t.readUInt16LE(r.LOCFLG),method:t.readUInt16LE(r.LOCHOW),time:t.readUInt32LE(r.LOCTIM),crc:t.readUInt32LE(r.LOCCRC),compressedSize:t.readUInt32LE(r.LOCSIZ),size:t.readUInt32LE(r.LOCLEN),fnameLen:t.readUInt16LE(r.LOCNAM),extraLen:t.readUInt16LE(r.LOCEXT)}},loadFromBinary:function(b){if(b.length!==r.CENHDR||b.readUInt32LE(0)!==r.CENSIG)throw new Error(i.Errors.INVALID_CEN);e=b.readUInt16LE(r.CENVEM),t=b.readUInt16LE(r.CENVER),n=b.readUInt16LE(r.CENFLG),a=b.readUInt16LE(r.CENHOW),o=b.readUInt32LE(r.CENTIM),s=b.readUInt32LE(r.CENCRC),c=b.readUInt32LE(r.CENSIZ),l=b.readUInt32LE(r.CENLEN),p=b.readUInt16LE(r.CENNAM),u=b.readUInt16LE(r.CENEXT),d=b.readUInt16LE(r.CENCOM),f=b.readUInt16LE(r.CENDSK),h=b.readUInt16LE(r.CENATT),m=b.readUInt32LE(r.CENATX),g=b.readUInt32LE(r.CENOFF)},localHeaderToBinary:function(){var e=Buffer.alloc(r.LOCHDR);return e.writeUInt32LE(r.LOCSIG,0),e.writeUInt16LE(t,r.LOCVER),e.writeUInt16LE(n,r.LOCFLG),e.writeUInt16LE(a,r.LOCHOW),e.writeUInt32LE(o,r.LOCTIM),e.writeUInt32LE(s,r.LOCCRC),e.writeUInt32LE(c,r.LOCSIZ),e.writeUInt32LE(l,r.LOCLEN),e.writeUInt16LE(p,r.LOCNAM),e.writeUInt16LE(u,r.LOCEXT),e},centralHeaderToBinary:function(){var i=Buffer.alloc(r.CENHDR+p+u+d);return i.writeUInt32LE(r.CENSIG,0),i.writeUInt16LE(e,r.CENVEM),i.writeUInt16LE(t,r.CENVER),i.writeUInt16LE(n,r.CENFLG),i.writeUInt16LE(a,r.CENHOW),i.writeUInt32LE(o,r.CENTIM),i.writeUInt32LE(s,r.CENCRC),i.writeUInt32LE(c,r.CENSIZ),i.writeUInt32LE(l,r.CENLEN),i.writeUInt16LE(p,r.CENNAM),i.writeUInt16LE(u,r.CENEXT),i.writeUInt16LE(d,r.CENCOM),i.writeUInt16LE(f,r.CENDSK),i.writeUInt16LE(h,r.CENATT),i.writeUInt32LE(m,r.CENATX),i.writeUInt32LE(g,r.CENOFF),i.fill(0,r.CENHDR),i},toJSON:function(){const o=function(e){return e+" bytes"};return{made:e,version:t,flags:n,method:i.methodToString(a),time:this.time,crc:"0x"+s.toString(16).toUpperCase(),compressedSize:o(c),size:o(l),fileNameLength:o(p),extraLength:o(u),commentLength:o(d),diskNumStart:f,inAttr:h,attr:m,offset:g,centralHeaderSize:o(r.CENHDR+p+u+d)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},6780:(e,t,n)=>{t.EntryHeader=n(974),t.MainHeader=n(2138)},2138:(e,t,n)=>{var i=n(4070),r=i.Constants;e.exports=function(){var e=0,t=0,n=0,a=0,o=0;return{get diskEntries(){return e},set diskEntries(n){e=t=n},get totalEntries(){return t},set totalEntries(n){t=e=n},get size(){return n},set size(e){n=e},get offset(){return a},set offset(e){a=e},get commentLength(){return o},set commentLength(e){o=e},get mainHeaderSize(){return r.ENDHDR+o},loadFromBinary:function(s){if((s.length!==r.ENDHDR||s.readUInt32LE(0)!==r.ENDSIG)&&(s.length<r.ZIP64HDR||s.readUInt32LE(0)!==r.ZIP64SIG))throw new Error(i.Errors.INVALID_END);s.readUInt32LE(0)===r.ENDSIG?(e=s.readUInt16LE(r.ENDSUB),t=s.readUInt16LE(r.ENDTOT),n=s.readUInt32LE(r.ENDSIZ),a=s.readUInt32LE(r.ENDOFF),o=s.readUInt16LE(r.ENDCOM)):(e=i.readBigUInt64LE(s,r.ZIP64SUB),t=i.readBigUInt64LE(s,r.ZIP64TOT),n=i.readBigUInt64LE(s,r.ZIP64SIZE),a=i.readBigUInt64LE(s,r.ZIP64OFF),o=0)},toBinary:function(){var i=Buffer.alloc(r.ENDHDR+o);return i.writeUInt32LE(r.ENDSIG,0),i.writeUInt32LE(0,4),i.writeUInt16LE(e,r.ENDSUB),i.writeUInt16LE(t,r.ENDTOT),i.writeUInt32LE(n,r.ENDSIZ),i.writeUInt32LE(a,r.ENDOFF),i.writeUInt16LE(o,r.ENDCOM),i.fill(" ",r.ENDHDR),i},toJSON:function(){return{diskEntries:e,totalEntries:t,size:n+" bytes",offset:function(e){let t=e.toString(16).toUpperCase();for(;t.length<4;)t="0"+t;return"0x"+t}(a),commentLength:o}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},3601:(e,t,n)=>{e.exports=function(e){var t=n(3106),i={chunkSize:1024*(parseInt(e.length/1024)+1)};return{deflate:function(){return t.deflateRawSync(e,i)},deflateAsync:function(n){var r=t.createDeflateRaw(i),a=[],o=0;r.on("data",(function(e){a.push(e),o+=e.length})),r.on("end",(function(){var e=Buffer.alloc(o),t=0;e.fill(0);for(var i=0;i<a.length;i++){var r=a[i];r.copy(e,t),t+=r.length}n&&n(e)})),r.end(e)}}}},5776:(e,t,n)=>{t.Deflater=n(3601),t.Inflater=n(5821),t.ZipCrypto=n(4014)},5821:(e,t,n)=>{const i=+(process.versions?process.versions.node:"").split(".")[0]||0;e.exports=function(e,t){var r=n(3106);const a=i>=15&&t>0?{maxOutputLength:t}:{};return{inflate:function(){return r.inflateRawSync(e,a)},inflateAsync:function(t){var n=r.createInflateRaw(a),i=[],o=0;n.on("data",(function(e){i.push(e),o+=e.length})),n.on("end",(function(){var e=Buffer.alloc(o),n=0;e.fill(0);for(var r=0;r<i.length;r++){var a=i[r];a.copy(e,n),n+=a.length}t&&t(e)})),n.end(e)}}}},4014:(e,t,n)=>{"use strict";const{randomFillSync:i}=n(6982),r=new Uint32Array(256).map(((e,t)=>{for(let e=0;e<8;e++)1&t?t=t>>>1^3988292384:t>>>=1;return t>>>0})),a=(e,t)=>Math.imul(e,t)>>>0,o=(e,t)=>r[255&(e^t)]^e>>>8,s=()=>"function"==typeof i?i(Buffer.alloc(12)):s.node();s.node=()=>{const e=Buffer.alloc(12),t=e.length;for(let n=0;n<t;n++)e[n]=256*Math.random()&255;return e};const c={genSalt:s};function l(e){const t=Buffer.isBuffer(e)?e:Buffer.from(e);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let e=0;e<t.length;e++)this.updateKeys(t[e])}l.prototype.updateKeys=function(e){const t=this.keys;return t[0]=o(t[0],e),t[1]+=255&t[0],t[1]=a(t[1],134775813)+1,t[2]=o(t[2],t[1]>>>24),e},l.prototype.next=function(){const e=(2|this.keys[2])>>>0;return a(e,1^e)>>8&255},e.exports={decrypt:function(e,t,n){if(!e||!Buffer.isBuffer(e)||e.length<12)return Buffer.alloc(0);const i=function(e){const t=new l(e);return function(e){const n=Buffer.alloc(e.length);let i=0;for(let r of e)n[i++]=t.updateKeys(r^t.next());return n}}(n),r=i(e.slice(0,12)),a=8&~t.flags?t.crc>>>24:t.timeHighByte;if(r[11]!==a)throw"ADM-ZIP: Wrong Password";return i(e.slice(12))},encrypt:function(e,t,n,i=!1){null==e&&(e=Buffer.alloc(0)),Buffer.isBuffer(e)||(e=Buffer.from(e.toString()));const r=function(e){const t=new l(e);return function(e,n,i=0){n||(n=Buffer.alloc(e.length));for(let r of e){const e=t.next();n[i++]=r^e,t.updateKeys(r)}return n}}(n),a=c.genSalt();a[11]=t.crc>>>24&255,i&&(a[10]=t.crc>>>16&255);const o=Buffer.alloc(e.length+12);return r(a,o),r(e,o,12)},_salter:function(e){Buffer.isBuffer(e)&&e.length>=12?c.genSalt=function(){return e.slice(0,12)}:c.genSalt="node"===e?s.node:s}}},1383:e=>{e.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}},1243:e=>{e.exports={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed",FILE_IN_THE_WAY:"There is a file in the way: %s",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:"File not found: %s",NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found"}},7819:(e,t,n)=>{const i=n(7807).require(),r=n(6928);i.existsSync=i.existsSync||r.existsSync,e.exports=function(e){var t=e||"",n={directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0},a=null;return t&&i.existsSync(t)?(a=i.statSync(t),n.directory=a.isDirectory(),n.mtime=a.mtime,n.atime=a.atime,n.executable=!!(73&a.mode),n.readonly=!(128&a.mode),n.hidden="."===r.basename(t)[0]):console.warn("Invalid path: "+t),{get directory(){return n.directory},get readOnly(){return n.readonly},get hidden(){return n.hidden},get mtime(){return n.mtime},get atime(){return n.atime},get executable(){return n.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:t,isDirectory:n.directory,isReadOnly:n.readonly,isHidden:n.hidden,isExecutable:n.executable,mTime:n.mtime,aTime:n.atime}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},7807:(e,t,n)=>{t.require=function(){if("object"==typeof process&&process.versions&&process.versions.electron)try{const e=n(522);if(Object.keys(e).length>0)return e}catch(e){}return n(9896)}},4070:(e,t,n)=>{e.exports=n(1527),e.exports.Constants=n(1383),e.exports.Errors=n(1243),e.exports.FileAttr=n(7819)},1527:(e,t,n)=>{const i=n(7807).require(),r=n(6928),a=n(1383),o=n(1243),s="object"==typeof process&&"win32"===process.platform,c=e=>e&&"object"==typeof e,l=new Uint32Array(256).map(((e,t)=>{for(let e=0;e<8;e++)1&t?t=3988292384^t>>>1:t>>>=1;return t>>>0}));function p(e){this.sep=r.sep,this.fs=i,c(e)&&c(e.fs)&&"function"==typeof e.fs.statSync&&(this.fs=e.fs)}e.exports=p,p.prototype.makeDir=function(e){const t=this;!function(e){let n=e.split(t.sep)[0];e.split(t.sep).forEach((function(e){if(e&&":"!==e.substr(-1,1)){var i;n+=t.sep+e;try{i=t.fs.statSync(n)}catch(e){t.fs.mkdirSync(n)}if(i&&i.isFile())throw o.FILE_IN_THE_WAY.replace("%s",n)}}))}(e)},p.prototype.writeFileTo=function(e,t,n,i){const a=this;if(a.fs.existsSync(e)){if(!n)return!1;if(a.fs.statSync(e).isDirectory())return!1}var o,s=r.dirname(e);a.fs.existsSync(s)||a.makeDir(s);try{o=a.fs.openSync(e,"w",438)}catch(t){a.fs.chmodSync(e,438),o=a.fs.openSync(e,"w",438)}if(o)try{a.fs.writeSync(o,t,0,t.length,0)}finally{a.fs.closeSync(o)}return a.fs.chmodSync(e,i||438),!0},p.prototype.writeFileToAsync=function(e,t,n,i,a){"function"==typeof i&&(a=i,i=void 0);const o=this;o.fs.exists(e,(function(s){if(s&&!n)return a(!1);o.fs.stat(e,(function(n,c){if(s&&c.isDirectory())return a(!1);var l=r.dirname(e);o.fs.exists(l,(function(n){n||o.makeDir(l),o.fs.open(e,"w",438,(function(n,r){n?o.fs.chmod(e,438,(function(){o.fs.open(e,"w",438,(function(n,r){o.fs.write(r,t,0,t.length,0,(function(){o.fs.close(r,(function(){o.fs.chmod(e,i||438,(function(){a(!0)}))}))}))}))})):r?o.fs.write(r,t,0,t.length,0,(function(){o.fs.close(r,(function(){o.fs.chmod(e,i||438,(function(){a(!0)}))}))})):o.fs.chmod(e,i||438,(function(){a(!0)}))}))}))}))}))},p.prototype.findFiles=function(e){const t=this;return function e(n,i,a){"boolean"==typeof i&&(a=i,i=void 0);let o=[];return t.fs.readdirSync(n).forEach((function(s){var c=r.join(n,s);t.fs.statSync(c).isDirectory()&&a&&(o=o.concat(e(c,i,a))),i&&!i.test(c)||o.push(r.normalize(c)+(t.fs.statSync(c).isDirectory()?t.sep:""))})),o}(e,void 0,!0)},p.prototype.getAttributes=function(){},p.prototype.setAttributes=function(){},p.crc32update=function(e,t){return l[255&(e^t)]^e>>>8},p.crc32=function(e){"string"==typeof e&&(e=Buffer.from(e,"utf8")),l.length||genCRCTable();let t=e.length,n=-1;for(let i=0;i<t;)n=p.crc32update(n,e[i++]);return~n>>>0},p.methodToString=function(e){switch(e){case a.STORED:return"STORED ("+e+")";case a.DEFLATED:return"DEFLATED ("+e+")";default:return"UNSUPPORTED ("+e+")"}},p.canonical=function(e){if(!e)return"";var t=r.posix.normalize("/"+e.split("\\").join("/"));return r.join(".",t)},p.sanitize=function(e,t){e=r.resolve(r.normalize(e));for(var n=t.split("/"),i=0,a=n.length;i<a;i++){var o=r.normalize(r.join(e,n.slice(i,a).join(r.sep)));if(0===o.indexOf(e))return o}return r.normalize(r.join(e,r.basename(t)))},p.toBuffer=function(e){return Buffer.isBuffer(e)?e:e instanceof Uint8Array?Buffer.from(e):"string"==typeof e?Buffer.from(e,"utf8"):Buffer.alloc(0)},p.readBigUInt64LE=function(e,t){var n=Buffer.from(e.slice(t,t+8));return n.swap64(),parseInt(`0x${n.toString("hex")}`)},p.isWin=s,p.crcTable=l},16:(e,t,n)=>{var i=n(4070),r=n(6780),a=i.Constants,o=n(5776);e.exports=function(e){var t=new r.EntryHeader,n=Buffer.alloc(0),s=Buffer.alloc(0),c=!1,l=null,p=Buffer.alloc(0);function u(){return e&&e instanceof Uint8Array?(t.loadLocalHeaderFromBinary(e),e.slice(t.realDataOffset,t.realDataOffset+t.compressedSize)):Buffer.alloc(0)}function d(e){return!(8&~t.flags&&i.crc32(e)!==t.localHeader.crc)}function f(e,r,a){if(void 0===r&&"string"==typeof e&&(a=e,e=void 0),c)return e&&r&&r(Buffer.alloc(0),i.Errors.DIRECTORY_CONTENT_ERROR),Buffer.alloc(0);var s=u();if(0===s.length)return e&&r&&r(s),s;if(t.encrypted){if("string"!=typeof a&&!Buffer.isBuffer(a))throw new Error("ADM-ZIP: Incompatible password parameter");s=o.ZipCrypto.decrypt(s,t,a)}var l=Buffer.alloc(t.size);switch(t.method){case i.Constants.STORED:if(s.copy(l),d(l))return e&&r&&r(l),l;throw e&&r&&r(l,i.Errors.BAD_CRC),new Error(i.Errors.BAD_CRC);case i.Constants.DEFLATED:var p=new o.Inflater(s,t.size);if(!e){if(p.inflate(l).copy(l,0),!d(l))throw new Error(i.Errors.BAD_CRC+" "+n.toString());return l}p.inflateAsync((function(e){e.copy(e,0),r&&(d(e)?r(e):r(e,i.Errors.BAD_CRC))}));break;default:throw e&&r&&r(Buffer.alloc(0),i.Errors.UNKNOWN_METHOD),new Error(i.Errors.UNKNOWN_METHOD)}}function h(n,r){if((!l||!l.length)&&Buffer.isBuffer(e))return n&&r&&r(u()),u();if(l.length&&!c){var a;switch(t.method){case i.Constants.STORED:return t.compressedSize=t.size,a=Buffer.alloc(l.length),l.copy(a),n&&r&&r(a),a;default:case i.Constants.DEFLATED:var s=new o.Deflater(l);if(!n){var p=s.deflate();return t.compressedSize=p.length,p}s.deflateAsync((function(e){a=Buffer.alloc(e.length),t.compressedSize=e.length,e.copy(a),r&&r(a)})),s=null}}else{if(!n||!r)return Buffer.alloc(0);r(Buffer.alloc(0))}}function m(e,t){return(e.readUInt32LE(t+4)<<4)+e.readUInt32LE(t)}function g(e){var n,i,r,o;e.length>=a.EF_ZIP64_SCOMP&&(n=m(e,a.EF_ZIP64_SUNCOMP),t.size===a.EF_ZIP64_OR_32&&(t.size=n)),e.length>=a.EF_ZIP64_RHO&&(i=m(e,a.EF_ZIP64_SCOMP),t.compressedSize===a.EF_ZIP64_OR_32&&(t.compressedSize=i)),e.length>=a.EF_ZIP64_DSN&&(r=m(e,a.EF_ZIP64_RHO),t.offset===a.EF_ZIP64_OR_32&&(t.offset=r)),e.length>=a.EF_ZIP64_DSN+4&&(o=e.readUInt32LE(a.EF_ZIP64_DSN),t.diskNumStart===a.EF_ZIP64_OR_16&&(t.diskNumStart=o))}return{get entryName(){return n.toString()},get rawEntryName(){return n},set entryName(e){var r=(n=i.toBuffer(e))[n.length-1];c=47===r||92===r,t.fileNameLength=n.length},get extra(){return p},set extra(e){p=e,t.extraLength=e.length,function(e){for(var t,n,i,r=0;r<e.length;)t=e.readUInt16LE(r),r+=2,n=e.readUInt16LE(r),r+=2,i=e.slice(r,r+n),r+=n,a.ID_ZIP64===t&&g(i)}(e)},get comment(){return s.toString()},set comment(e){s=i.toBuffer(e),t.commentLength=s.length},get name(){var e=n.toString();return c?e.substr(e.length-1).split("/").pop():e.split("/").pop()},get isDirectory(){return c},getCompressedData:function(){return h(!1,null)},getCompressedDataAsync:function(e){h(!0,e)},setData:function(e){l=i.toBuffer(e),!c&&l.length?(t.size=l.length,t.method=i.Constants.DEFLATED,t.crc=i.crc32(e),t.changed=!0):t.method=i.Constants.STORED},getData:function(e){return t.changed?l:f(!1,null,e)},getDataAsync:function(e,n){t.changed?e(l):f(!0,e,n)},set attr(e){t.attr=e},get attr(){return t.attr},set header(e){t.loadFromBinary(e)},get header(){return t},packCentralHeader:function(){var e=t.centralHeaderToBinary(),r=i.Constants.CENHDR;return n.copy(e,r),r+=n.length,t.extraLength&&(p.copy(e,r),r+=t.extraLength),t.commentLength&&s.copy(e,r),e},packLocalHeader:function(){let e=0;const i=t.localHeaderToBinary(),r=Buffer.alloc(i.length+n.length+p.length);return i.copy(r,e),e+=i.length,n.copy(r,e),e+=n.length,p.copy(r,e),e+=p.length,r},toJSON:function(){const n=function(e){return"<"+(e&&e.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:t.toJSON(),compressedData:n(e),data:n(l)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},7224:(e,t,n)=>{const i=n(16),r=n(6780),a=n(4070);e.exports=function(e,t){var n=[],o={},s=Buffer.alloc(0),c=new r.MainHeader,l=!1;const p=Object.assign(Object.create(null),t),{noSort:u}=p;function d(){if(l=!0,o={},c.diskEntries>(e.length-c.offset)/a.Constants.CENHDR)throw new Error(a.Errors.DISK_ENTRY_TOO_LARGE);n=new Array(c.diskEntries);for(var t=c.offset,r=0;r<n.length;r++){var s=t,p=new i(e);p.header=e.slice(s,s+=a.Constants.CENHDR),p.entryName=e.slice(s,s+=p.header.fileNameLength),p.header.extraLength&&(p.extra=e.slice(s,s+=p.header.extraLength)),p.header.commentLength&&(p.comment=e.slice(s,s+p.header.commentLength)),t+=p.header.centralHeaderSize,n[r]=p,o[p.entryName]=p}}function f(){n.length>1&&!u&&n.sort(((e,t)=>e.entryName.toLowerCase().localeCompare(t.entryName.toLowerCase())))}return e?function(t){for(var n=e.length-a.Constants.ENDHDR,i=Math.max(0,n-65535),r=i,o=e.length,l=-1,p=0;n>=r;n--)if(80===e[n])if(e.readUInt32LE(n)!==a.Constants.ENDSIG)if(e.readUInt32LE(n)!==a.Constants.END64SIG){if(e.readUInt32LE(n)===a.Constants.ZIP64SIG){l=n,o=n+a.readBigUInt64LE(e,n+a.Constants.ZIP64SIZE)+a.Constants.ZIP64LEAD;break}}else r=i;else l=n,p=n,o=n+a.Constants.ENDHDR,r=n-a.Constants.END64HDR;if(!~l)throw new Error(a.Errors.INVALID_FORMAT);c.loadFromBinary(e.slice(l,o)),c.commentLength&&(s=e.slice(p+a.Constants.ENDHDR)),t&&d()}(p.readEntries):l=!0,{get entries(){return l||d(),n},get comment(){return s.toString()},set comment(e){s=a.toBuffer(e),c.commentLength=s.length},getEntryCount:function(){return l?n.length:c.diskEntries},forEach:function(t){l?n.forEach(t):function(t){const n=c.diskEntries;let r=c.offset;for(let o=0;o<n;o++){let n=r;const o=new i(e);o.header=e.slice(n,n+=a.Constants.CENHDR),o.entryName=e.slice(n,n+=o.header.fileNameLength),r+=o.header.centralHeaderSize,t(o)}}(t)},getEntry:function(e){return l||d(),o[e]||null},setEntry:function(e){l||d(),n.push(e),o[e.entryName]=e,c.totalEntries=n.length},deleteEntry:function(e){l||d();var t=o[e];if(t&&t.isDirectory){var i=this;this.getEntryChildren(t).forEach((function(t){t.entryName!==e&&i.deleteEntry(t.entryName)}))}n.splice(n.indexOf(t),1),delete o[e],c.totalEntries=n.length},getEntryChildren:function(e){if(l||d(),e&&e.isDirectory){const t=[],i=e.entryName,r=i.length;return n.forEach((function(e){e.entryName.substr(0,r)===i&&t.push(e)})),t}return[]},compressToBuffer:function(){l||d(),f();const e=[],t=[];let i=0,r=0;c.size=0,c.offset=0;for(const a of n){const n=a.getCompressedData();a.header.offset=r;const o=a.packLocalHeader(),s=o.length+n.length;r+=s,e.push(o),e.push(n);const l=a.packCentralHeader();t.push(l),c.size+=l.length,i+=s+l.length}i+=c.mainHeaderSize,c.offset=r,r=0;const o=Buffer.alloc(i);for(const t of e)t.copy(o,r),r+=t.length;for(const e of t)e.copy(o,r),r+=e.length;const p=c.toBinary();return s&&s.copy(p,a.Constants.ENDHDR),p.copy(o,r),o},toAsyncBuffer:function(e,t,i,r){try{l||d(),f();const t=[],o=[];let p=0,u=0;c.size=0,c.offset=0;const h=function(n){if(n.length>0){const e=n.shift(),a=e.entryName+e.extra.toString();i&&i(a),e.getCompressedDataAsync((function(i){r&&r(a),e.header.offset=u;const s=e.packLocalHeader(),l=s.length+i.length;u+=l,t.push(s),t.push(i);const d=e.packCentralHeader();o.push(d),c.size+=d.length,p+=l+d.length,h(n)}))}else{p+=c.mainHeaderSize,c.offset=u,u=0;const n=Buffer.alloc(p);t.forEach((function(e){e.copy(n,u),u+=e.length})),o.forEach((function(e){e.copy(n,u),u+=e.length}));const i=c.toBinary();s&&s.copy(i,a.Constants.ENDHDR),i.copy(n,u),e(n)}};h(Array.from(n))}catch(e){t(e)}}}}},8599:(e,t,n)=>{var i=n(3735),r=n(6928),a=n(5970),o=n(6245),s=n(299),c=n(1331),l=n(1756),p=e.exports={},u=/[\/\\]/g;p.exists=function(){var e=r.join.apply(r,arguments);return i.existsSync(e)},p.expand=function(...e){var t=c(e[0])?e.shift():{},n=Array.isArray(e[0])?e[0]:e;if(0===n.length)return[];var p=function(e){var n=[];return a(e).forEach((function(e){var i=0===e.indexOf("!");i&&(e=e.slice(1));var r=function(e){return l.sync(e,t)}(e);n=i?o(n,r):s(n,r)})),n}(n);return t.filter&&(p=p.filter((function(e){e=r.join(t.cwd||"",e);try{return"function"==typeof t.filter?t.filter(e):i.statSync(e)[t.filter]()}catch(e){return!1}}))),p},p.expandMapping=function(e,t,n){n=Object.assign({rename:function(e,t){return r.join(e||"",t)}},n);var i=[],a={};return p.expand(n,e).forEach((function(e){var o=e;n.flatten&&(o=r.basename(o)),n.ext&&(o=o.replace(/(\.[^\/]*)?$/,n.ext));var s=n.rename(t,o,n);n.cwd&&(e=r.join(n.cwd,e)),s=s.replace(u,"/"),e=e.replace(u,"/"),a[s]?a[s].src.push(e):(i.push({src:[e],dest:s}),a[s]=i[i.length-1])})),i},p.normalizeFilesArray=function(e){var t=[];return e.forEach((function(e){("src"in e||"dest"in e)&&t.push(e)})),0===t.length?[]:t=_(t).chain().forEach((function(e){"src"in e&&e.src&&(Array.isArray(e.src)?e.src=a(e.src):e.src=[e.src])})).map((function(e){var t=Object.assign({},e);if(delete t.src,delete t.dest,e.expand)return p.expandMapping(e.src,e.dest,t).map((function(t){var n=Object.assign({},e);return n.orig=Object.assign({},e),n.src=t.src,n.dest=t.dest,["expand","cwd","flatten","rename","ext"].forEach((function(e){delete n[e]})),n}));var n=Object.assign({},e);return n.orig=Object.assign({},e),"src"in n&&Object.defineProperty(n,"src",{enumerable:!0,get:function n(){var i;return"result"in n||(i=e.src,i=Array.isArray(i)?a(i):[i],n.result=p.expand(t,i)),n.result}}),"dest"in n&&(n.dest=e.dest),n})).flatten().value()}},1789:(e,t,n)=>{var i=n(3735),r=n(6928),a=n(1232),o=n(85),s=n(4100),c=n(4684),l=(n(2203).Stream,n(4478).PassThrough),p=e.exports={};p.file=n(8599),p.collectStream=function(e,t){var n=[],i=0;e.on("error",t),e.on("data",(function(e){n.push(e),i+=e.length})),e.on("end",(function(){var e=Buffer.alloc(i),r=0;n.forEach((function(t){t.copy(e,r),r+=t.length})),t(null,e)}))},p.dateify=function(e){return(e=e||new Date)instanceof Date||(e="string"==typeof e?new Date(e):new Date),e},p.defaults=function(e,t,n){var i=arguments;return i[0]=i[0]||{},c(...i)},p.isStream=function(e){return a(e)},p.lazyReadStream=function(e){return new o.Readable((function(){return i.createReadStream(e)}))},p.normalizeInputSource=function(e){return null===e?Buffer.alloc(0):"string"==typeof e?Buffer.from(e):p.isStream(e)?e.pipe(new l):e},p.sanitizePath=function(e){return s(e,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")},p.trailingSlashIt=function(e){return"/"!==e.slice(-1)?e+"/":e},p.unixifyPath=function(e){return s(e,!1).replace(/^\w+:/,"")},p.walkdir=function(e,t,n){var a=[];"function"==typeof t&&(n=t,t=e),i.readdir(e,(function(o,s){var c,l,u=0;if(o)return n(o);!function o(){if(!(c=s[u++]))return n(null,a);l=r.join(e,c),i.stat(l,(function(e,i){a.push({path:l,relative:r.relative(t,l).replace(/\\/g,"/"),stats:i}),i&&i.isDirectory()?p.walkdir(l,t,(function(e,t){if(e)return n(e);t.forEach((function(e){a.push(e)})),o()})):o()}))}()}))}},9133:(e,t,n)=>{var i=n(826),r={},a=function(e,t){return a.create(e,t)};a.create=function(e,t){if(r[e]){var n=new i(e,t);return n.setFormat(e),n.setModule(new r[e](t)),n}throw new Error("create("+e+"): format not registered")},a.registerFormat=function(e,t){if(r[e])throw new Error("register("+e+"): format already registered");if("function"!=typeof t)throw new Error("register("+e+"): format module invalid");if("function"!=typeof t.prototype.append||"function"!=typeof t.prototype.finalize)throw new Error("register("+e+"): format module missing methods");r[e]=t},a.isRegisteredFormat=function(e){return!!r[e]},a.registerFormat("zip",n(3541)),a.registerFormat("tar",n(741)),a.registerFormat("json",n(6530)),e.exports=a},826:(e,t,n)=>{var i=n(9896),r=n(6965),a=n(2268),o=n(6928),s=n(1789),c=n(9023).inherits,l=n(2383),p=n(4478).Transform,u="win32"===process.platform,d=function(e,t){if(!(this instanceof d))return new d(e,t);"string"!=typeof e&&(t=e,e="zip"),t=this.options=s.defaults(t,{highWaterMark:1048576,statConcurrency:4}),p.call(this,t),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=a.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=a.queue(this._onStatQueueTask.bind(this),t.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};c(d,p),d.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()},d.prototype._append=function(e,t){var n={source:null,filepath:e};(t=t||{}).name||(t.name=e),t.sourcePath=e,n.data=t,this._entriesCount++,t.stats&&t.stats instanceof i.Stats?(n=this._updateQueueTaskWithStats(n,t.stats))&&(t.stats.size&&(this._fsEntriesTotalBytes+=t.stats.size),this._queue.push(n)):this._statQueue.push(n)},d.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)},d.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))},d.prototype._moduleAppend=function(e,t,n){this._state.aborted?n():this._module.append(e,t,function(e){if(this._task=null,this._state.aborted)this._shutdown();else{if(e)return this.emit("error",e),void setImmediate(n);this.emit("entry",t),this._entriesProcessedCount++,t.stats&&t.stats.size&&(this._fsEntriesProcessedBytes+=t.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(n)}}.bind(this))},d.prototype._moduleFinalize=function(){"function"==typeof this._module.finalize?this._module.finalize():"function"==typeof this._module.end?this._module.end():this.emit("error",new l("NOENDMETHOD"))},d.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0},d.prototype._moduleSupports=function(e){return!(!this._module.supports||!this._module.supports[e])&&this._module.supports[e]},d.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1},d.prototype._normalizeEntryData=function(e,t){e=s.defaults(e,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),t&&!1===e.stats&&(e.stats=t);var n="directory"===e.type;return e.name&&("string"==typeof e.prefix&&""!==e.prefix&&(e.name=e.prefix+"/"+e.name,e.prefix=null),e.name=s.sanitizePath(e.name),"symlink"!==e.type&&"/"===e.name.slice(-1)?(n=!0,e.type="directory"):n&&(e.name+="/")),"number"==typeof e.mode?e.mode&=u?511:4095:e.stats&&null===e.mode?(e.mode=u?511&e.stats.mode:4095&e.stats.mode,u&&n&&(e.mode=493)):null===e.mode&&(e.mode=n?493:420),e.stats&&null===e.date?e.date=e.stats.mtime:e.date=s.dateify(e.date),e},d.prototype._onModuleError=function(e){this.emit("error",e)},d.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()},d.prototype._onQueueTask=function(e,t){var n=()=>{e.data.callback&&e.data.callback(),t()};this._state.finalizing||this._state.finalized||this._state.aborted?n():(this._task=e,this._moduleAppend(e.source,e.data,n))},d.prototype._onStatQueueTask=function(e,t){this._state.finalizing||this._state.finalized||this._state.aborted?t():i.lstat(e.filepath,function(n,i){if(this._state.aborted)setImmediate(t);else{if(n)return this._entriesCount--,this.emit("warning",n),void setImmediate(t);(e=this._updateQueueTaskWithStats(e,i))&&(i.size&&(this._fsEntriesTotalBytes+=i.size),this._queue.push(e)),setImmediate(t)}}.bind(this))},d.prototype._shutdown=function(){this._moduleUnpipe(),this.end()},d.prototype._transform=function(e,t,n){e&&(this._pointer+=e.length),n(null,e)},d.prototype._updateQueueTaskWithStats=function(e,t){if(t.isFile())e.data.type="file",e.data.sourceType="stream",e.source=s.lazyReadStream(e.filepath);else if(t.isDirectory()&&this._moduleSupports("directory"))e.data.name=s.trailingSlashIt(e.data.name),e.data.type="directory",e.data.sourcePath=s.trailingSlashIt(e.filepath),e.data.sourceType="buffer",e.source=Buffer.concat([]);else{if(!t.isSymbolicLink()||!this._moduleSupports("symlink"))return t.isDirectory()?this.emit("warning",new l("DIRECTORYNOTSUPPORTED",e.data)):t.isSymbolicLink()?this.emit("warning",new l("SYMLINKNOTSUPPORTED",e.data)):this.emit("warning",new l("ENTRYNOTSUPPORTED",e.data)),null;var n=i.readlinkSync(e.filepath),r=o.dirname(e.filepath);e.data.type="symlink",e.data.linkname=o.relative(r,o.resolve(r,n)),e.data.sourceType="buffer",e.source=Buffer.concat([])}return e.data=this._normalizeEntryData(e.data,t),e},d.prototype.abort=function(){return this._state.aborted||this._state.finalized||this._abort(),this},d.prototype.append=function(e,t){if(this._state.finalize||this._state.aborted)return this.emit("error",new l("QUEUECLOSED")),this;if("string"!=typeof(t=this._normalizeEntryData(t)).name||0===t.name.length)return this.emit("error",new l("ENTRYNAMEREQUIRED")),this;if("directory"===t.type&&!this._moduleSupports("directory"))return this.emit("error",new l("DIRECTORYNOTSUPPORTED",{name:t.name})),this;if(e=s.normalizeInputSource(e),Buffer.isBuffer(e))t.sourceType="buffer";else{if(!s.isStream(e))return this.emit("error",new l("INPUTSTEAMBUFFERREQUIRED",{name:t.name})),this;t.sourceType="stream"}return this._entriesCount++,this._queue.push({data:t,source:e}),this},d.prototype.directory=function(e,t,n){if(this._state.finalize||this._state.aborted)return this.emit("error",new l("QUEUECLOSED")),this;if("string"!=typeof e||0===e.length)return this.emit("error",new l("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,!1===t?t="":"string"!=typeof t&&(t=e);var i=!1;"function"==typeof n?(i=n,n={}):"object"!=typeof n&&(n={});var a=r(e,{stat:!0,dot:!0});return a.on("error",function(e){this.emit("error",e)}.bind(this)),a.on("match",function(r){a.pause();var o=!1,s=Object.assign({},n);s.name=r.relative,s.prefix=t,s.stats=r.stat,s.callback=a.resume.bind(a);try{if(i)if(!1===(s=i(s)))o=!0;else if("object"!=typeof s)throw new l("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:e})}catch(e){return void this.emit("error",e)}o?a.resume():this._append(r.absolute,s)}.bind(this)),a.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},d.prototype.file=function(e,t){return this._state.finalize||this._state.aborted?(this.emit("error",new l("QUEUECLOSED")),this):"string"!=typeof e||0===e.length?(this.emit("error",new l("FILEFILEPATHREQUIRED")),this):(this._append(e,t),this)},d.prototype.glob=function(e,t,n){this._pending++,t=s.defaults(t,{stat:!0,pattern:e});var i=r(t.cwd||".",t);return i.on("error",function(e){this.emit("error",e)}.bind(this)),i.on("match",function(e){i.pause();var t=Object.assign({},n);t.callback=i.resume.bind(i),t.stats=e.stat,t.name=e.relative,this._append(e.absolute,t)}.bind(this)),i.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},d.prototype.finalize=function(){if(this._state.aborted){var e=new l("ABORTED");return this.emit("error",e),Promise.reject(e)}if(this._state.finalize){var t=new l("FINALIZING");return this.emit("error",t),Promise.reject(t)}this._state.finalize=!0,0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var n=this;return new Promise((function(e,t){var i;n._module.on("end",(function(){i||e()})),n._module.on("error",(function(e){i=!0,t(e)}))}))},d.prototype.setFormat=function(e){return this._format?(this.emit("error",new l("FORMATSET")),this):(this._format=e,this)},d.prototype.setModule=function(e){return this._state.aborted?(this.emit("error",new l("ABORTED")),this):this._state.module?(this.emit("error",new l("MODULESET")),this):(this._module=e,this._modulePipe(),this)},d.prototype.symlink=function(e,t,n){if(this._state.finalize||this._state.aborted)return this.emit("error",new l("QUEUECLOSED")),this;if("string"!=typeof e||0===e.length)return this.emit("error",new l("SYMLINKFILEPATHREQUIRED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new l("SYMLINKTARGETREQUIRED",{filepath:e})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new l("SYMLINKNOTSUPPORTED",{filepath:e})),this;var i={type:"symlink"};return i.name=e.replace(/\\/g,"/"),i.linkname=t.replace(/\\/g,"/"),i.sourceType="buffer","number"==typeof n&&(i.mode=n),this._entriesCount++,this._queue.push({data:i,source:Buffer.concat([])}),this},d.prototype.pointer=function(){return this._pointer},d.prototype.use=function(e){return this._streams.push(e),this},e.exports=d},2383:(e,t,n)=>{var i=n(9023);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 a(e,t){Error.captureStackTrace(this,this.constructor),this.message=r[e]||e,this.code=e,this.data=t}i.inherits(a,Error),e.exports=a},6530:(e,t,n)=>{var i=n(9023).inherits,r=n(4478).Transform,a=n(4132),o=n(1789),s=function(e){if(!(this instanceof s))return new s(e);e=this.options=o.defaults(e,{}),r.call(this,e),this.supports={directory:!0,symlink:!0},this.files=[]};i(s,r),s.prototype._transform=function(e,t,n){n(null,e)},s.prototype._writeStringified=function(){var e=JSON.stringify(this.files);this.write(e)},s.prototype.append=function(e,t,n){var i=this;function r(e,r){e?n(e):(t.size=r.length||0,t.crc32=a.unsigned(r),i.files.push(t),n(null,t))}t.crc32=0,"buffer"===t.sourceType?r(null,e):"stream"===t.sourceType&&o.collectStream(e,r)},s.prototype.finalize=function(){this._writeStringified(),this.end()},e.exports=s},741:(e,t,n)=>{var i=n(3106),r=n(4231),a=n(1789),o=function(e){if(!(this instanceof o))return new o(e);"object"!=typeof(e=this.options=a.defaults(e,{gzip:!1})).gzipOptions&&(e.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=r.pack(e),this.compressor=!1,e.gzip&&(this.compressor=i.createGzip(e.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))};o.prototype._onCompressorError=function(e){this.engine.emit("error",e)},o.prototype.append=function(e,t,n){var i=this;function r(e,r){e?n(e):i.engine.entry(t,r,(function(e){n(e,t)}))}if(t.mtime=t.date,"buffer"===t.sourceType)r(null,e);else if("stream"===t.sourceType&&t.stats){t.size=t.stats.size;var o=i.engine.entry(t,(function(e){n(e,t)}));e.pipe(o)}else"stream"===t.sourceType&&a.collectStream(e,r)},o.prototype.finalize=function(){this.engine.finalize()},o.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},o.prototype.pipe=function(e,t){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(e,t):this.engine.pipe.apply(this.engine,arguments)},o.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)},e.exports=o},3541:(e,t,n)=>{var i=n(8919),r=n(1789),a=function(e){if(!(this instanceof a))return new a(e);e=this.options=r.defaults(e,{comment:"",forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new i(e)};a.prototype.append=function(e,t,n){this.engine.entry(e,t,n)},a.prototype.finalize=function(){this.engine.finalize()},a.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},a.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)},a.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,a