@share-crm/sharedev-cli 0.0.4-rc.5 → 0.0.4-rc.50-test.0

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.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export const __webpack_esm_ids__=[891];export const __webpack_esm_modules__={39891(t,e,n){const r=n(6942),o=n(16928),i=n(66488),a=n(71312),s=(...t)=>r.findLast(t,t=>"boolean"==typeof t),c=(...t)=>r.findLast(t,t=>"string"==typeof t),f={noSort:!1,readEntries:!1,method:r.Constants.NONE,fs:null};t.exports=function(t,e){let n=null;const l=Object.assign(Object.create(null),f);t&&"object"==typeof t&&(t instanceof Uint8Array||(Object.assign(l,t),t=l.input?l.input:void 0,l.input&&delete l.input),Buffer.isBuffer(t)&&(n=t,l.method=r.Constants.BUFFER,t=void 0)),Object.assign(l,e);const u=new r(l),E=t=>{t.filter(t=>t.attr).sort((t,e)=>e.path.length-t.path.length).forEach(t=>u.fs.chmodSync(t.path,t.attr))};if("object"==typeof l.decoder&&"function"==typeof l.decoder.encode&&"function"==typeof l.decoder.decode||(l.decoder=r.decoder),t&&"string"==typeof t){if(!u.fs.existsSync(t))throw r.Errors.INVALID_FILENAME();l.method=r.Constants.FILE,l.filename=t,n=u.fs.readFileSync(t)}const d=new a(n,l),{canonical:h,sanitize:I,zipnamefix:m}=r;function L(t){var e;return t&&d&&("string"==typeof t&&(e=d.getEntry(o.posix.normalize(t))),"object"==typeof t&&void 0!==t.entryName&&void 0!==t.header&&(e=d.getEntry(t.entryName)),e)?e:null}function g(t){const{join:e,normalize:n,sep:r}=o.posix;return e(o.isAbsolute(t)?"/":".",n(r+t.split("\\").join(r)+r))}function D(t){return t instanceof RegExp?(e=t,function(t){return e.test(t)}):"function"!=typeof t?()=>!0:t;var e}const N=(t,e)=>{let n=e.slice(-1);return n=n===u.sep?u.sep:"",o.relative(t,e)+n};return{readFile:function(t,e){var n=L(t);return n&&n.getData(e)||null},childCount:function(t){const e=L(t);if(e)return d.getChildCount(e)},readFileAsync:function(t,e){var n=L(t);n?n.getDataAsync(e):e(null,"getEntry failed for:"+t)},readAsText:function(t,e){var n=L(t);if(n){var r=n.getData();if(r&&r.length)return r.toString(e||"utf8")}return""},readAsTextAsync:function(t,e,n){var r=L(t);r?r.getDataAsync(function(t,r){r?e(t,r):t&&t.length?e(t.toString(n||"utf8")):e("")}):e("")},deleteFile:function(t,e=!0){var n=L(t);n&&d.deleteFile(n.entryName,e)},deleteEntry:function(t){var e=L(t);e&&d.deleteEntry(e.entryName)},addZipComment:function(t){d.comment=t},getZipComment:function(){return d.comment||""},addZipEntryComment:function(t,e){var n=L(t);n&&(n.comment=e)},getZipEntryComment:function(t){var e=L(t);return e&&e.comment||""},updateFile:function(t,e){var n=L(t);n&&n.setData(e)},addLocalFile:function(t,e,n,i){if(!u.fs.existsSync(t))throw r.Errors.FILE_NOT_FOUND(t);{e=e?g(e):"";const r=o.win32.basename(o.win32.normalize(t));e+=n||r;const a=u.fs.statSync(t),s=a.isFile()?u.fs.readFileSync(t):Buffer.alloc(0);a.isDirectory()&&(e+=u.sep),this.addFile(e,s,i,a)}},addLocalFileAsync:function(t,e){t="object"==typeof t?t:{localPath:t};const n=o.resolve(t.localPath),{comment:r}=t;let{zipPath:i,zipName:a}=t;const s=this;u.fs.stat(n,function(t,c){if(t)return e(t,!1);i=i?g(i):"";const f=o.win32.basename(o.win32.normalize(n));if(i+=a||f,c.isFile())u.fs.readFile(n,function(t,n){return t?e(t,!1):(s.addFile(i,n,r,c),setImmediate(e,void 0,!0))});else if(c.isDirectory())return i+=u.sep,s.addFile(i,Buffer.alloc(0),r,c),setImmediate(e,void 0,!0)})},addLocalFolder:function(t,e,n){if(n=D(n),e=e?g(e):"",t=o.normalize(t),!u.fs.existsSync(t))throw r.Errors.FILE_NOT_FOUND(t);{const r=u.findFiles(t),i=this;if(r.length)for(const a of r){const r=o.join(e,N(t,a));n(r)&&i.addLocalFile(a,o.dirname(r))}}},addLocalFolderAsync:function(t,e,n,i){i=D(i),n=n?g(n):"",t=o.normalize(t);var a=this;u.fs.open(t,"r",function(o){if(o&&"ENOENT"===o.code)e(void 0,r.Errors.FILE_NOT_FOUND(t));else if(o)e(void 0,o);else{var s=u.findFiles(t),c=-1,f=function(){if((c+=1)<s.length){var r=s[c],o=N(t,r).split("\\").join("/");o=o.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),i(o)?u.fs.stat(r,function(t,i){t&&e(void 0,t),i.isFile()?u.fs.readFile(r,function(t,r){t?e(void 0,t):(a.addFile(n+o,r,"",i),f())}):(a.addFile(n+o+"/",Buffer.alloc(0),"",i),f())}):process.nextTick(()=>{f()})}else e(!0,void 0)};f()}})},addLocalFolderAsync2:function(t,e){const n=this;t="object"==typeof t?t:{localPath:t};const i=o.resolve(t.localPath);let{zipPath:a,filter:s,namefix:c}=t;var f;s instanceof RegExp?(f=s,s=function(t){return f.test(t)}):"function"!=typeof s&&(s=function(){return!0}),a=a?g(a):"","latin1"===c&&(c=t=>t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"")),"function"!=typeof c&&(c=t=>t);const l=t=>o.join(a,c(N(i,t))),E=t=>o.win32.basename(o.win32.normalize(c(t)));u.fs.open(i,"r",function(t){t&&"ENOENT"===t.code?e(r.Errors.FILE_NOT_FOUND(i),!1):t?e(t,!1):u.findFilesAsync(i,function(t,r){return t?e(t,!1):(r=r.filter(t=>s(l(t)))).length?void setImmediate(r.reverse().reduce(function(t,e){return function(r,i){if(r||!1===i)return setImmediate(t,r,!1);n.addLocalFileAsync({localPath:e,zipPath:o.dirname(l(e)),zipName:E(e)},t)}},e)):e(void 0,!0)})})},addLocalFolderPromise:function(t,e){return new Promise((n,r)=>{this.addLocalFolderAsync2(Object.assign({localPath:t},e),(t,e)=>{if(t)return r(t);e&&n(this)})})},addFile:function(t,e,n,r){let o=L(t=m(t));const a=null!=o;a||(o=new i(l),o.entryName=t),o.comment=n||"";const s="object"==typeof r&&r instanceof u.fs.Stats;s&&(o.header.time=r.mtime);var c=o.isDirectory?16:0;let f=o.isDirectory?16384:32768;return f|=s?4095&r.mode:"number"==typeof r?4095&r:o.isDirectory?493:420,c=(c|f<<16)>>>0,o.attr=c,o.setData(e),a||d.setEntry(o),o},getEntries:function(t){return d.password=t,d?d.entries:[]},getEntry:function(t){return L(t)},getEntryCount:function(){return d.getEntryCount()},forEach:function(t){return d.forEach(t)},extractEntryTo:function(t,e,n,i,a,f){i=s(!1,i),a=s(!1,a),n=s(!0,n),f=c(a,f);var l=L(t);if(!l)throw r.Errors.NO_ENTRY();var E=h(l.entryName),m=I(e,f&&!l.isDirectory?h(f):n?E:o.basename(E));if(l.isDirectory)return d.getEntryChildren(l).forEach(function(t){if(t.isDirectory)return;var o=t.getData();if(!o)throw r.Errors.CANT_EXTRACT_FILE();var s=h(n?t.entryName:t.entryName.substring(l.entryName.length)),c=I(e,s);u.assertPathSafe(e,c);const f=a?t.header.fileAttr:void 0;u.writeFileTo(c,o,i,f)}),!0;var g=l.getData(d.password);if(!g)throw r.Errors.CANT_EXTRACT_FILE();if(u.assertPathSafe(e,m),u.fs.existsSync(m)&&!i)throw r.Errors.CANT_OVERRIDE();const D=a?t.header.fileAttr:void 0;return u.writeFileTo(m,g,i,D),!0},test:function(t){if(!d)return!1;for(var e of d.entries)try{if(e.isDirectory)continue;if(!e.getData(t))return!1}catch(t){return!1}return!0},extractAllTo:function(t,e,n,o){if(n=s(!1,n),o=c(n,o),e=s(!1,e),!d)throw r.Errors.NO_ZIP();const i=[];d.entries.forEach(function(a){var s=I(t,h(a.entryName));if(u.assertPathSafe(t,s),a.isDirectory)return u.makeDir(s),void(n&&i.push({path:s,attr:a.header.fileAttr}));var c=a.getData(o);if(!c)throw r.Errors.CANT_EXTRACT_FILE();const f=n?a.header.fileAttr:void 0;u.writeFileTo(s,c,e,f);try{u.fs.utimesSync(s,a.header.time,a.header.time)}catch(t){}}),E(i)},extractAllToAsync:function(t,e,n,i){if(i=((...t)=>r.findLast(t,t=>"function"==typeof t))(e,n,i),n=s(!1,n),e=s(!1,e),!i)return new Promise((r,o)=>{this.extractAllToAsync(t,e,n,function(t){t?o(t):r(this)})});if(!d)return void i(r.Errors.NO_ZIP());t=o.resolve(t);const a=e=>I(t,o.normalize(h(e.entryName))),c=(t,e)=>new Error(t+': "'+e+'"'),f=[],l=[];d.entries.forEach(t=>{t.isDirectory?f.push(t):l.push(t)});const m=[];for(const e of f){const r=a(e),o=n?e.header.fileAttr:void 0;try{u.assertPathSafe(t,r),u.makeDir(r)}catch(t){i(c("Unable to create folder",r));continue}o&&m.push({path:r,attr:o});try{u.fs.utimesSync(r,e.header.time,e.header.time)}catch(t){}}l.reverse().reduce(function(i,a){return function(s){if(s)i(s);else{const s=o.normalize(h(a.entryName)),f=I(t,s);try{u.assertPathSafe(t,f)}catch(t){return i(t)}a.getDataAsync(function(t,o){if(o)i(o);else if(t){const r=n?a.header.fileAttr:void 0;u.writeFileToAsync(f,t,e,r,function(t){if(!t)return i(c("Unable to write file",f));u.fs.utimes(f,a.header.time,a.header.time,function(){i()})})}else i(r.Errors.CANT_EXTRACT_FILE())})}}},t=>{if(!t)try{E(m)}catch(t){return i(c("Unable to set folder permissions",t.path||""))}i(t)})()},writeZip:function(t,e){if(1===arguments.length&&"function"==typeof t&&(e=t,t=""),!t&&l.filename&&(t=l.filename),t){var n=d.compressToBuffer();if(n){var r=u.writeFileTo(t,n,!0);"function"==typeof e&&e(r?null:new Error("failed"),"")}}},writeZipPromise:function(t,e){const{overwrite:n,perm:r}=Object.assign({overwrite:!0},e);return new Promise((e,o)=>{!t&&l.filename&&(t=l.filename),t||o("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then(i=>{u.writeFileToAsync(t,i,n,r,t=>t?e(t):o("ADM-ZIP: Wasn't able to write zip file"))},o)})},toBufferPromise:function(){return new Promise((t,e)=>{d.toAsyncBuffer(t,e)})},toBuffer:function(t,e,n,r){return"function"==typeof t?(d.toAsyncBuffer(t,e,n,r),null):d.compressToBuffer()}}}},20537(t,e,n){var r=n(6942),o=r.Constants;t.exports=function(){var t=20,e=10,n=0,i=0,a=0,s=0,c=0,f=0,l=0,u=0,E=0,d=0,h=0,I=0,m=0;t|=r.isWin?2560:768,n|=o.FLG_EFS;const L={extraLen:0},g=t=>Math.max(0,t)>>>0;return a=r.fromDate2DOS(new Date),{get made(){return t},set made(e){t=e},get version(){return e},set version(t){e=t},get flags(){return n},set flags(t){n=t},get flags_efs(){return(n&o.FLG_EFS)>0},set flags_efs(t){t?n|=o.FLG_EFS:n&=~o.FLG_EFS},get flags_desc(){return(n&o.FLG_DESC)>0},set flags_desc(t){t?n|=o.FLG_DESC:n&=~o.FLG_DESC},get method(){return i},set method(t){switch(t){case o.STORED:this.version=10;break;case o.DEFLATED:default:this.version=20}i=t},get time(){return r.fromDOS2Date(this.timeval)},set time(t){t=new Date(t),this.timeval=r.fromDate2DOS(t)},get timeval(){return a},set timeval(t){a=g(t)},get timeHighByte(){return t=a>>>8,255&Math.max(0,t);var t},get crc(){return s},set crc(t){s=g(t)},get compressedSize(){return c},set compressedSize(t){c=g(t)},get size(){return f},set size(t){f=g(t)},get fileNameLength(){return l},set fileNameLength(t){l=t},get extraLength(){return u},set extraLength(t){u=t},get extraLocalLength(){return L.extraLen},set extraLocalLength(t){L.extraLen=t},get commentLength(){return E},set commentLength(t){E=t},get diskNumStart(){return d},set diskNumStart(t){d=g(t)},get inAttr(){return h},set inAttr(t){h=g(t)},get attr(){return I},set attr(t){I=g(t)},get fileAttr(){return(I||0)>>16&511},get offset(){return m},set offset(t){m=g(t)},get encrypted(){return(n&o.FLG_ENC)===o.FLG_ENC},get centralHeaderSize(){return o.CENHDR+l+u+E},get realDataOffset(){return m+o.LOCHDR+L.fnameLen+L.extraLen},get localHeader(){return L},loadLocalHeaderFromBinary:function(t){if(m<0||m+o.LOCHDR>t.length)throw r.Errors.INVALID_LOC();var e=t.slice(m,m+o.LOCHDR);if(e.readUInt32LE(0)!==o.LOCSIG)throw r.Errors.INVALID_LOC();L.version=e.readUInt16LE(o.LOCVER),L.flags=e.readUInt16LE(o.LOCFLG),L.flags_desc=(L.flags&o.FLG_DESC)>0,L.method=e.readUInt16LE(o.LOCHOW),L.time=e.readUInt32LE(o.LOCTIM),L.crc=e.readUInt32LE(o.LOCCRC),L.compressedSize=e.readUInt32LE(o.LOCSIZ),L.size=e.readUInt32LE(o.LOCLEN),L.fnameLen=e.readUInt16LE(o.LOCNAM),L.extraLen=e.readUInt16LE(o.LOCEXT);const n=m+o.LOCHDR+L.fnameLen,i=n+L.extraLen;return t.slice(n,i)},loadFromBinary:function(L){if(L.length!==o.CENHDR||L.readUInt32LE(0)!==o.CENSIG)throw r.Errors.INVALID_CEN();t=L.readUInt16LE(o.CENVEM),e=L.readUInt16LE(o.CENVER),n=L.readUInt16LE(o.CENFLG),i=L.readUInt16LE(o.CENHOW),a=L.readUInt32LE(o.CENTIM),s=L.readUInt32LE(o.CENCRC),c=L.readUInt32LE(o.CENSIZ),f=L.readUInt32LE(o.CENLEN),l=L.readUInt16LE(o.CENNAM),u=L.readUInt16LE(o.CENEXT),E=L.readUInt16LE(o.CENCOM),d=L.readUInt16LE(o.CENDSK),h=L.readUInt16LE(o.CENATT),I=L.readUInt32LE(o.CENATX),m=L.readUInt32LE(o.CENOFF)},localHeaderToBinary:function(){var t=Buffer.alloc(o.LOCHDR);return t.writeUInt32LE(o.LOCSIG,0),t.writeUInt16LE(e,o.LOCVER),t.writeUInt16LE(n&~o.FLG_DESC,o.LOCFLG),t.writeUInt16LE(i,o.LOCHOW),t.writeUInt32LE(a,o.LOCTIM),t.writeUInt32LE(s,o.LOCCRC),t.writeUInt32LE(c,o.LOCSIZ),t.writeUInt32LE(f,o.LOCLEN),t.writeUInt16LE(l,o.LOCNAM),t.writeUInt16LE(L.extraLen,o.LOCEXT),t},centralHeaderToBinary:function(){var r=Buffer.alloc(o.CENHDR+l+u+E);return r.writeUInt32LE(o.CENSIG,0),r.writeUInt16LE(t,o.CENVEM),r.writeUInt16LE(e,o.CENVER),r.writeUInt16LE(n&~o.FLG_DESC,o.CENFLG),r.writeUInt16LE(i,o.CENHOW),r.writeUInt32LE(a,o.CENTIM),r.writeUInt32LE(s,o.CENCRC),r.writeUInt32LE(c,o.CENSIZ),r.writeUInt32LE(f,o.CENLEN),r.writeUInt16LE(l,o.CENNAM),r.writeUInt16LE(u,o.CENEXT),r.writeUInt16LE(E,o.CENCOM),r.writeUInt16LE(d,o.CENDSK),r.writeUInt16LE(h,o.CENATT),r.writeUInt32LE(I,o.CENATX),r.writeUInt32LE(m,o.CENOFF),r},toJSON:function(){const a=function(t){return t+" bytes"};return{made:t,version:e,flags:n,method:r.methodToString(i),time:this.time,crc:"0x"+s.toString(16).toUpperCase(),compressedSize:a(c),size:a(f),fileNameLength:a(l),extraLength:a(u),commentLength:a(E),diskNumStart:d,inAttr:h,attr:I,offset:m,centralHeaderSize:a(o.CENHDR+l+u+E)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},21204(t,e,n){e.EntryHeader=n(20537),e.MainHeader=n(39522)},39522(t,e,n){var r=n(6942),o=r.Constants;t.exports=function(){var t=0,e=0,n=0,i=0,a=0;const s=()=>t>o.EF_ZIP64_OR_16||e>o.EF_ZIP64_OR_16||n>o.EF_ZIP64_OR_32||i>o.EF_ZIP64_OR_32;return{get diskEntries(){return t},set diskEntries(n){t=e=n},get totalEntries(){return e},set totalEntries(n){e=t=n},get size(){return n},set size(t){n=t},get offset(){return i},set offset(t){i=t},get commentLength(){return a},set commentLength(t){a=t},get mainHeaderSize(){return(s()?o.ZIP64HDR+o.END64HDR:0)+o.ENDHDR+a},loadFromBinary:function(s){if((s.length!==o.ENDHDR||s.readUInt32LE(0)!==o.ENDSIG)&&(s.length<o.ZIP64HDR||s.readUInt32LE(0)!==o.ZIP64SIG))throw r.Errors.INVALID_END();s.readUInt32LE(0)===o.ENDSIG?(t=s.readUInt16LE(o.ENDSUB),e=s.readUInt16LE(o.ENDTOT),n=s.readUInt32LE(o.ENDSIZ),i=s.readUInt32LE(o.ENDOFF),a=s.readUInt16LE(o.ENDCOM)):(t=r.readBigUInt64LE(s,o.ZIP64SUB),e=r.readBigUInt64LE(s,o.ZIP64TOT),n=r.readBigUInt64LE(s,o.ZIP64SIZB),i=r.readBigUInt64LE(s,o.ZIP64OFF),a=0)},toBinary:function(){var c;if(!s())return(c=Buffer.alloc(o.ENDHDR+a)).writeUInt32LE(o.ENDSIG,0),c.writeUInt32LE(0,4),c.writeUInt16LE(t,o.ENDSUB),c.writeUInt16LE(e,o.ENDTOT),c.writeUInt32LE(n,o.ENDSIZ),c.writeUInt32LE(i,o.ENDOFF),c.writeUInt16LE(a,o.ENDCOM),c.fill(" ",o.ENDHDR),c;let f=0;(c=Buffer.alloc(this.mainHeaderSize)).writeUInt32LE(o.ZIP64SIG,f),r.writeBigUInt64LE(c,o.ZIP64HDR-o.ZIP64LEAD,f+o.ZIP64SIZE),c.writeUInt16LE(45,f+o.ZIP64VEM),c.writeUInt16LE(45,f+o.ZIP64VER),c.writeUInt32LE(0,f+o.ZIP64DSK),c.writeUInt32LE(0,f+o.ZIP64DSKDIR),r.writeBigUInt64LE(c,t,f+o.ZIP64SUB),r.writeBigUInt64LE(c,e,f+o.ZIP64TOT),r.writeBigUInt64LE(c,n,f+o.ZIP64SIZB),r.writeBigUInt64LE(c,i,f+o.ZIP64OFF);const l=i+n;return f+=o.ZIP64HDR,c.writeUInt32LE(o.END64SIG,f),c.writeUInt32LE(0,f+o.END64START),r.writeBigUInt64LE(c,l,f+o.END64OFF),c.writeUInt32LE(1,f+o.END64NUMDISKS),f+=o.END64HDR,c.writeUInt32LE(o.ENDSIG,f),c.writeUInt32LE(0,f+4),c.writeUInt16LE(Math.min(t,o.EF_ZIP64_OR_16),f+o.ENDSUB),c.writeUInt16LE(Math.min(e,o.EF_ZIP64_OR_16),f+o.ENDTOT),c.writeUInt32LE(Math.min(n,o.EF_ZIP64_OR_32),f+o.ENDSIZ),c.writeUInt32LE(Math.min(i,o.EF_ZIP64_OR_32),f+o.ENDOFF),c.writeUInt16LE(a,f+o.ENDCOM),c.fill(" ",f+o.ENDHDR),c},toJSON:function(){return{diskEntries:t,totalEntries:e,size:n+" bytes",offset:function(t){let e=t.toString(16).toUpperCase();for(;e.length<4;)e="0"+e;return"0x"+e}(i),commentLength:a}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},52393(t,e,n){t.exports=function(t){var e=n(43106),r={chunkSize:1024*(parseInt(t.length/1024)+1)};return{deflate:function(){return e.deflateRawSync(t,r)},deflateAsync:function(n){var o=e.createDeflateRaw(r),i=[],a=0;o.on("data",function(t){i.push(t),a+=t.length}),o.on("end",function(){var t=Buffer.alloc(a),e=0;t.fill(0);for(var r=0;r<i.length;r++){var o=i[r];o.copy(t,e),e+=o.length}n&&n(t)}),o.end(t)}}}},16552(t,e,n){e.Deflater=n(52393),e.Inflater=n(91845),e.ZipCrypto=n(37574)},91845(t,e,n){const r=+(process?.versions?.node??"").split(".")[0]||0,o=n(22435);t.exports=function(t,e){var i=n(43106);const a=e>0?e:1,s=r>=15?{maxOutputLength:a}:{};return{inflate:function(){return i.inflateRawSync(t,s)},inflateAsync:function(e){var n=i.createInflateRaw(s),r=[],c=0,f=!1;const l=function(t){f||(f=!0,n.destroy(),e&&e(Buffer.alloc(0),t))};n.on("error",function(t){l(t)}),n.on("data",function(t){if(!f){if((c+=t.length)>a)return l(o.MAX_OUTPUT_EXCEEDED());r.push(t)}}),n.on("end",function(){if(!f){f=!0;var t=Buffer.alloc(c),n=0;t.fill(0);for(var o=0;o<r.length;o++){var i=r[o];i.copy(t,n),n+=i.length}e&&e(t)}}),n.end(t)}}}},37574(t,e,n){const{randomFillSync:r}=n(76982),o=n(22435),i=new Uint32Array(256).map((t,e)=>{for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;return e>>>0}),a=(t,e)=>Math.imul(t,e)>>>0,s=(t,e)=>i[255&(t^e)]^t>>>8,c=()=>"function"==typeof r?r(Buffer.alloc(12)):c.node();c.node=()=>{const t=Buffer.alloc(12),e=t.length;for(let n=0;n<e;n++)t[n]=256*Math.random()&255;return t};const f={genSalt:c};function l(t){const e=Buffer.isBuffer(t)?t:Buffer.from(t);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let t=0;t<e.length;t++)this.updateKeys(e[t])}l.prototype.updateKeys=function(t){const e=this.keys;return e[0]=s(e[0],t),e[1]+=255&e[0],e[1]=a(e[1],134775813)+1,e[2]=s(e[2],e[1]>>>24),t},l.prototype.next=function(){const t=(2|this.keys[2])>>>0;return a(t,1^t)>>8&255},t.exports={decrypt:function(t,e,n){if(!t||!Buffer.isBuffer(t)||t.length<12)return Buffer.alloc(0);const r=function(t){const e=new l(t);return function(t){const n=Buffer.alloc(t.length);let r=0;for(let o of t)n[r++]=e.updateKeys(o^e.next());return n}}(n),i=r(t.slice(0,12)),a=8&~e.flags?e.crc>>>24:e.timeHighByte;if(i[11]!==a)throw o.WRONG_PASSWORD();return r(t.slice(12))},encrypt:function(t,e,n,r=!1){null==t&&(t=Buffer.alloc(0)),Buffer.isBuffer(t)||(t=Buffer.from(t.toString()));const o=function(t){const e=new l(t);return function(t,n,r=0){n||(n=Buffer.alloc(t.length));for(let o of t){const t=e.next();n[r++]=o^t,e.updateKeys(o)}return n}}(n),i=f.genSalt();i[11]=e.crc>>>24&255,r&&(i[10]=e.crc>>>16&255);const a=Buffer.alloc(t.length+12);return o(i,a),o(t,a,12)},_salter:function(t){Buffer.isBuffer(t)&&t.length>=12?f.genSalt=function(){return t.slice(0,12)}:f.genSalt="node"===t?c.node:c}}},37935(t){t.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}},39346(t){t.exports={efs:!0,encode:t=>Buffer.from(t,"utf8"),decode:t=>t.toString("utf8")}},22435(t,e){const n={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",MAX_OUTPUT_EXCEEDED:"Decompressed data exceeds the declared uncompressed size",FILE_IN_THE_WAY:"There is a file in the way: {0}",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",DUPLICATE_ENTRY:"Duplicate entry name {0}",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",ZIP64_VALUE_TOO_LARGE:"Zip64 value exceeds the maximum safe integer",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function r(t){return function(...e){return e.length&&(t=t.replace(/\{(\d)\}/g,(t,n)=>e[n]||"")),new Error("ADM-ZIP: "+t)}}for(const t of Object.keys(n))e[t]=r(n[t])},11520(t,e,n){const r=n(16928);t.exports=function(t,{fs:e}){var n=t||"",o={directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0},i=null;return n&&e.existsSync(n)?(i=e.statSync(n),o.directory=i.isDirectory(),o.mtime=i.mtime,o.atime=i.atime,o.executable=!!(73&i.mode),o.readonly=!(128&i.mode),o.hidden="."===r.basename(n)[0]):console.warn("Invalid path: "+n),{get directory(){return o.directory},get readOnly(){return o.readonly},get hidden(){return o.hidden},get mtime(){return o.mtime},get atime(){return o.atime},get executable(){return o.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:n,isDirectory:o.directory,isReadOnly:o.readonly,isHidden:o.hidden,isExecutable:o.executable,mTime:o.mtime,aTime:o.atime}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},6942(t,e,n){t.exports=n(66863),t.exports.Constants=n(37935),t.exports.Errors=n(22435),t.exports.FileAttr=n(11520),t.exports.decoder=n(39346)},66863(t,e,n){const r=n(79896),o=n(16928),i=n(37935),a=n(22435),s="object"==typeof process&&"win32"===process.platform,c=t=>"object"==typeof t&&null!==t,f=new Uint32Array(256).map((t,e)=>{for(let t=0;t<8;t++)1&e?e=3988292384^e>>>1:e>>>=1;return e>>>0});function l(t){this.sep=o.sep,this.fs=r,c(t)&&c(t.fs)&&"function"==typeof t.fs.statSync&&(this.fs=t.fs)}t.exports=l,l.prototype.makeDir=function(t){const e=this;!function(t){let n=t.split(e.sep)[0];t.split(e.sep).forEach(function(t){if(t&&":"!==t.substr(-1,1)){var r;n+=e.sep+t;try{r=e.fs.statSync(n)}catch(t){if(!t.message||!t.message.startsWith("ENOENT"))throw t;e.fs.mkdirSync(n)}if(r&&r.isFile())throw a.FILE_IN_THE_WAY(`"${n}"`)}})}(t)},l.prototype.writeFileTo=function(t,e,n,r){const i=this;if(i.fs.existsSync(t)){if(!n)return!1;if(i.fs.statSync(t).isDirectory())return!1}var a,s=o.dirname(t);i.fs.existsSync(s)||i.makeDir(s);try{a=i.fs.openSync(t,"w",438)}catch(e){i.fs.chmodSync(t,438),a=i.fs.openSync(t,"w",438)}if(a)try{i.fs.writeSync(a,e,0,e.length,0)}finally{i.fs.closeSync(a)}return i.fs.chmodSync(t,r||438),!0},l.prototype.writeFileToAsync=function(t,e,n,r,i){"function"==typeof r&&(i=r,r=void 0);const a=this;a.fs.exists(t,function(s){if(s&&!n)return i(!1);a.fs.stat(t,function(n,c){if(s&&c&&c.isDirectory())return i(!1);var f=o.dirname(t);a.fs.exists(f,function(n){if(!n)try{a.makeDir(f)}catch(t){return i(!1)}const o=function(n){a.fs.write(n,e,0,e.length,0,function(e){a.fs.close(n,function(){if(e)return i(!1);a.fs.chmod(t,r||438,function(){i(!0)})})})};a.fs.open(t,"w",438,function(e,n){e?a.fs.chmod(t,438,function(){a.fs.open(t,"w",438,function(t,e){if(t||!e)return i(!1);o(e)})}):n?o(n):i(!1)})})})})},l.prototype.assertPathSafe=function(t,e){const n=this;if("function"!=typeof n.fs.lstatSync)return;const r=o.resolve(t),i=o.resolve(e);if(i===r)return;const s=o.relative(r,i);if(!s||".."===s||s.startsWith(".."+o.sep)||o.isAbsolute(s))return;let c=r;for(const t of s.split(o.sep)){if(!t||"."===t)continue;let e;c=o.join(c,t);try{e=n.fs.lstatSync(c)}catch(t){break}if(e.isSymbolicLink())throw a.FILE_IN_THE_WAY(`"${c}"`)}},l.prototype.findFiles=function(t){const e=this,n="function"==typeof e.fs.lstatSync,r=e.fs.realpathSync(t);return function t(i,a,s,c){"boolean"==typeof a&&(s=a,a=void 0);let f=[];return e.fs.readdirSync(i).forEach(function(l){const u=o.join(i,l);if(function(t){if(!n)return!1;if(!e.fs.lstatSync(t).isSymbolicLink())return!1;let i;try{i=e.fs.realpathSync(t)}catch(t){return!0}return!(i===r||i.startsWith(r+o.sep))}(u))return;const E=e.fs.statSync(u);if(a&&!a.test(u)||f.push(o.normalize(u)+(E.isDirectory()?e.sep:"")),E.isDirectory()&&s){const n=e.fs.realpathSync(u);c.has(n)||(c.add(n),f=f.concat(t(u,a,s,c)))}}),f}(t,void 0,!0,new Set([r]))},l.prototype.findFilesAsync=function(t,e){const n=this,r=[];let i=!1;const a=function(t){i||(i=!0,e(t,t?void 0:r))},s="function"==typeof n.fs.lstat;let c=null;const f=function(t,e,i){n.fs.readdir(t,function(a,l){if(a)return i(a);let u=l.length;if(!u)return i();l.forEach(function(a){const l=o.join(t,a);!function(t,e){if(!s)return e(null,!1);n.fs.lstat(t,function(r,i){return r?e(r):i&&i.isSymbolicLink()?void n.fs.realpath(t,function(t,n){if(t)return e(null,!0);e(null,!(n===c||n.startsWith(c+o.sep)))}):e(null,!1)})}(l,function(t,a){if(t)return i(t);a?--u||i():n.fs.stat(l,function(t,a){if(t)return i(t);a?(r.push(o.normalize(l)+(a.isDirectory()?n.sep:"")),a.isDirectory()?n.fs.realpath(l,function(t,n){if(t)return i(t);e.has(n)?--u||i():(e.add(n),f(l,e,function(t){if(t)return i(t);--u||i()}))}):--u||i()):--u||i()})})})})};n.fs.realpath(t,function(e,n){if(e)return a(e);c=n,f(t,new Set([n]),a)})},l.prototype.getAttributes=function(){},l.prototype.setAttributes=function(){},l.crc32update=function(t,e){return f[255&(t^e)]^t>>>8},l.crc32=function(t){"string"==typeof t&&(t=Buffer.from(t,"utf8"));let e=t.length,n=-1;for(let r=0;r<e;)n=l.crc32update(n,t[r++]);return~n>>>0},l.methodToString=function(t){switch(t){case i.STORED:return"STORED ("+t+")";case i.DEFLATED:return"DEFLATED ("+t+")";default:return"UNSUPPORTED ("+t+")"}},l.canonical=function(t){if(!t)return"";const e=o.posix.normalize("/"+t.split("\\").join("/"));return o.join(".",e)},l.zipnamefix=function(t){if(!t)return"";const e=o.posix.normalize("/"+t.split("\\").join("/"));return o.posix.join(".",e)},l.findLast=function(t,e){if(!Array.isArray(t))throw new TypeError("arr is not array");for(let n=(t.length>>>0)-1;n>=0;n--)if(e(t[n],n,t))return t[n]},l.sanitize=function(t,e){t=o.resolve(o.normalize(t));for(var n=e.split("/"),r=0,i=n.length;r<i;r++){var a=o.normalize(o.join(t,n.slice(r,i).join(o.sep)));if(a===t||a.startsWith(t+o.sep))return a}return o.normalize(o.join(t,o.basename(e)))},l.toBuffer=function(t,e){return Buffer.isBuffer(t)?t:t instanceof Uint8Array?Buffer.from(t):"string"==typeof t?e(t):Buffer.alloc(0)},l.readBigUInt64LE=function(t,e){const n=t.readUInt32LE(e),r=4294967296*t.readUInt32LE(e+4)+n;if(r>Number.MAX_SAFE_INTEGER)throw a.ZIP64_VALUE_TOO_LARGE();return r},l.writeBigUInt64LE=function(t,e,n){const r=e>>>0,o=Math.floor(e/4294967296)>>>0;t.writeUInt32LE(r,n),t.writeUInt32LE(o,n+4)},l.fromDOS2Date=function(t){return new Date(1980+(t>>25&127),Math.max((t>>21&15)-1,0),Math.max(t>>16&31,1),t>>11&31,t>>5&63,(31&t)<<1)},l.fromDate2DOS=function(t){let e=0,n=0;return t.getFullYear()>1979&&(e=(t.getFullYear()-1980&127)<<9|t.getMonth()+1<<5|t.getDate(),n=t.getHours()<<11|t.getMinutes()<<5|t.getSeconds()>>1),e<<16|n},l.isWin=s,l.crcTable=f},66488(t,e,n){var r=n(6942),o=n(21204),i=r.Constants,a=n(16552);t.exports=function(t,e){var n=new o.EntryHeader,s=Buffer.alloc(0),c=Buffer.alloc(0),f=!1,l=null,u=Buffer.alloc(0),E=Buffer.alloc(0),d=!0;const h=t,I="object"==typeof h.decoder?h.decoder:r.decoder;function m(){if(!(e&&e instanceof Uint8Array))return Buffer.alloc(0);E=n.loadLocalHeaderFromBinary(e);const t=n.realDataOffset,o=t+n.compressedSize;if(t<0||o<t||o>e.length)throw r.Errors.INVALID_LOC();return e.slice(t,o)}function L(t){const e=n.flags_desc||n.localHeader.flags_desc?n.crc:n.localHeader.crc;return r.crc32(t)===e}function g(t,e,o){if(void 0===e&&"string"==typeof t&&(o=t,t=void 0),f)return t&&e&&e(Buffer.alloc(0),r.Errors.DIRECTORY_CONTENT_ERROR()),Buffer.alloc(0);var i,c;try{if(0===(i=m()).length)return t&&e&&e(i),i;if(n.encrypted){if("string"!=typeof o&&!Buffer.isBuffer(o))throw r.Errors.INVALID_PASS_PARAM();i=a.ZipCrypto.decrypt(i,n,o)}}catch(n){if(t&&e)return e(Buffer.alloc(0),n),Buffer.alloc(0);throw n}switch(n.method){case r.Constants.STORED:if(c=Buffer.alloc(i.length),i.copy(c),L(c))return t&&e&&e(c),c;throw t&&e&&e(c,r.Errors.BAD_CRC()),r.Errors.BAD_CRC();case r.Constants.DEFLATED:var l=new a.Inflater(i,n.size);if(!t){if(!L(c=l.inflate()))throw r.Errors.BAD_CRC(`"${I.decode(s)}"`);return c}l.inflateAsync(function(t,n){e&&(n?e(Buffer.alloc(0),n):L(t)?e(t):e(t,r.Errors.BAD_CRC()))});break;default:throw t&&e&&e(Buffer.alloc(0),r.Errors.UNKNOWN_METHOD()),r.Errors.UNKNOWN_METHOD()}}function D(t,o){if((!l||!l.length)&&Buffer.isBuffer(e))return t&&o&&o(m()),m();if(l.length&&!f){var i;switch(n.method){case r.Constants.STORED:return n.compressedSize=n.size,i=Buffer.alloc(l.length),l.copy(i),t&&o&&o(i),i;default:case r.Constants.DEFLATED:var s=new a.Deflater(l);if(!t){var c=s.deflate();return n.compressedSize=c.length,c}s.deflateAsync(function(t){i=Buffer.alloc(t.length),n.compressedSize=t.length,t.copy(i),o&&o(i)}),s=null}}else{if(!t||!o)return Buffer.alloc(0);o(Buffer.alloc(0))}}function N(t,e){return r.readBigUInt64LE(t,e)}function y(t){var e,r,o,a;t.length>=i.EF_ZIP64_SCOMP&&(e=N(t,i.EF_ZIP64_SUNCOMP),n.size===i.EF_ZIP64_OR_32&&(n.size=e)),t.length>=i.EF_ZIP64_RHO&&(r=N(t,i.EF_ZIP64_SCOMP),n.compressedSize===i.EF_ZIP64_OR_32&&(n.compressedSize=r)),t.length>=i.EF_ZIP64_DSN&&(o=N(t,i.EF_ZIP64_RHO),n.offset===i.EF_ZIP64_OR_32&&(n.offset=o)),t.length>=i.EF_ZIP64_DSN+4&&(a=t.readUInt32LE(i.EF_ZIP64_DSN),n.diskNumStart===i.EF_ZIP64_OR_16&&(n.diskNumStart=a))}return d=!!I.hasOwnProperty("efs")&&I.efs,{get entryName(){return I.decode(s)},get rawEntryName(){return s},set entryName(t){var e=(s=r.toBuffer(t,I.encode))[s.length-1];f=47===e||92===e,n.fileNameLength=s.length},get efs(){return"function"==typeof d?d(this.entryName):d},get extra(){return u},set extra(t){u=t,n.extraLength=t.length,function(t){try{for(var e,n,o,a=0;a+4<t.length;)e=t.readUInt16LE(a),a+=2,n=t.readUInt16LE(a),a+=2,o=t.slice(a,a+n),a+=n,i.ID_ZIP64===e&&y(o)}catch(t){throw r.Errors.EXTRA_FIELD_PARSE_ERROR()}}(t)},get comment(){return I.decode(c)},set comment(t){if(c=r.toBuffer(t,I.encode),n.commentLength=c.length,c.length>65535)throw r.Errors.COMMENT_TOO_LONG()},get name(){const t=I.decode(s);return f?t.replace(/[/\\]$/,"").split("/").pop():t.split("/").pop()},get isDirectory(){return f},getCompressedData:function(){return D(!1,null)},getCompressedDataAsync:function(t){D(!0,t)},setData:function(t){l=r.toBuffer(t,r.decoder.encode),!f&&l.length?(n.size=l.length,n.method=r.Constants.DEFLATED,n.crc=r.crc32(t),n.changed=!0):n.method=r.Constants.STORED},getData:function(t){return n.changed?l:g(!1,null,t)},getDataAsync:function(t,e){n.changed?t(l):g(!0,t,e)},set attr(t){n.attr=t},get attr(){return n.attr},set header(t){n.loadFromBinary(t)},get header(){return n},packCentralHeader:function(){n.flags_efs=this.efs,n.extraLength=u.length;var t=n.centralHeaderToBinary(),e=r.Constants.CENHDR;return s.copy(t,e),e+=s.length,u.copy(t,e),e+=n.extraLength,c.copy(t,e),t},packLocalHeader:function(){let t=0;n.flags_efs=this.efs,n.extraLocalLength=E.length;const e=n.localHeaderToBinary(),r=Buffer.alloc(e.length+s.length+n.extraLocalLength);return e.copy(r,t),t+=e.length,s.copy(r,t),t+=s.length,E.copy(r,t),t+=E.length,r},toJSON:function(){const t=function(t){return"<"+(t&&t.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:n.toJSON(),compressedData:t(e),data:t(l)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}},71312(t,e,n){const r=n(66488),o=n(21204),i=n(6942);t.exports=function(t,e){var n=[],a=Object.create(null),s=Buffer.alloc(0),c=new o.MainHeader,f=!1;const l=new Set,u=e,{noSort:E,decoder:d}=u;function h(){if(f=!0,a=Object.create(null),c.diskEntries>(t.length-c.offset)/i.Constants.CENHDR)throw i.Errors.DISK_ENTRY_TOO_LARGE();n=new Array(c.diskEntries);for(var e=c.offset,o=0;o<n.length;o++){var s=e,E=new r(u,t);if(E.header=t.slice(s,s+=i.Constants.CENHDR),E.entryName=t.slice(s,s+=E.header.fileNameLength),E.header.extraLength&&(E.extra=t.slice(s,s+=E.header.extraLength)),E.header.commentLength&&(E.comment=t.slice(s,s+E.header.commentLength)),e+=E.header.centralHeaderSize,E.entryName in a)throw i.Errors.DUPLICATE_ENTRY(`"${E.entryName}"`);n[o]=E,a[E.entryName]=E}l.clear(),function(){const t=new Set;for(const e of Object.keys(a)){const n=e.split("/");if(n.pop(),n.length)for(let e=0;e<n.length;e++){const r=n.slice(0,e+1).join("/")+"/";t.add(r)}}for(const e of t)if(!(e in a)){const t=new r(u);t.entryName=e,t.attr=16,t.temporary=!0,n.push(t),a[t.entryName]=t,l.add(t)}}()}function I(){n.length>1&&!E&&(n=n.map(t=>({entry:t,key:t.entryName.toLowerCase()})).sort((t,e)=>t.key.localeCompare(e.key)).map(t=>t.entry))}return t?function(e){var n=t.length-i.Constants.ENDHDR,r=Math.max(0,n-65535),o=r,a=t.length,f=-1,l=0;for("boolean"==typeof u.trailingSpace&&u.trailingSpace&&(r=0);n>=o;n--)if(80===t[n])if(t.readUInt32LE(n)!==i.Constants.ENDSIG)if(t.readUInt32LE(n)!==i.Constants.END64SIG){if(t.readUInt32LE(n)===i.Constants.ZIP64SIG){f=n,a=n+i.readBigUInt64LE(t,n+i.Constants.ZIP64SIZE)+i.Constants.ZIP64LEAD;break}}else o=r;else f=n,l=n,a=n+i.Constants.ENDHDR,o=n-i.Constants.END64HDR;if(-1==f)throw i.Errors.INVALID_FORMAT();c.loadFromBinary(t.slice(f,a)),c.commentLength&&(s=t.slice(l+i.Constants.ENDHDR)),e&&h()}(u.readEntries):f=!0,{get entries(){return f||h(),n.filter(t=>!l.has(t))},get comment(){return d.decode(s)},set comment(t){s=i.toBuffer(t,d.encode),c.commentLength=s.length},getEntryCount:function(){return f?n.length:c.diskEntries},forEach:function(t){this.entries.forEach(t)},getEntry:function(t){return f||h(),a[t]||null},setEntry:function(t){f||h(),n.push(t),a[t.entryName]=t,c.totalEntries=n.length},deleteFile:function(t,e=!0){f||h();const n=a[t];this.getEntryChildren(n,e).map(t=>t.entryName).forEach(this.deleteEntry)},deleteEntry:function(t){f||h();const e=a[t],r=n.indexOf(e);r>=0&&(n.splice(r,1),delete a[t],c.totalEntries=n.length)},getEntryChildren:function(t,e=!0){if(f||h(),"object"==typeof t){if(t.isDirectory&&e){const e=[],r=t.entryName;for(const t of n)t.entryName.startsWith(r)&&e.push(t);return e}return[t]}return[]},getChildCount:function(t){if(t&&t.isDirectory){const e=this.getEntryChildren(t);return e.includes(t)?e.length-1:e.length}return 0},compressToBuffer:function(){f||h(),I();const e=[],n=[];let r=0,o=0;c.size=0,c.offset=0;let i=0;for(const t of this.entries){const a=t.getCompressedData();t.header.offset=o;const s=t.packLocalHeader(),f=s.length+a.length;o+=f,e.push(s),e.push(a);const l=t.packCentralHeader();n.push(l),c.size+=l.length,r+=f+l.length,i++}r+=c.mainHeaderSize,c.offset=o,c.totalEntries=i,o=0;const a=Buffer.alloc(r);for(const t of e)t.copy(a,o),o+=t.length;for(const t of n)t.copy(a,o),o+=t.length;const l=c.toBinary();return s&&s.copy(l,l.length-s.length),l.copy(a,o),t=a,f=!1,a},toAsyncBuffer:function(e,n,r,o){try{f||h(),I();const n=[],i=[];let a=0,l=0,u=0;c.size=0,c.offset=0;const E=function(d){if(d.length>0){const t=d.shift(),e=t.entryName+t.extra.toString();r&&r(e),t.getCompressedDataAsync(function(r){o&&o(e),t.header.offset=l;const s=t.packLocalHeader(),f=s.length+r.length;l+=f,n.push(s),n.push(r);const h=t.packCentralHeader();i.push(h),c.size+=h.length,a+=f+h.length,u++,E(d)})}else{a+=c.mainHeaderSize,c.offset=l,c.totalEntries=u,l=0;const r=Buffer.alloc(a);n.forEach(function(t){t.copy(r,l),l+=t.length}),i.forEach(function(t){t.copy(r,l),l+=t.length});const o=c.toBinary();s&&s.copy(o,o.length-s.length),o.copy(r,l),t=r,f=!1,e(r)}};E(Array.from(this.entries))}catch(t){n(t)}}}}}};