UNPKG

@loaders.gl/zip

Version:

Zip Archive Loader

8 lines 188 kB
(function webpackUniversalModuleDefinition(root, factory) { if (typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if (typeof define === 'function' && define.amd) define([], factory); else if (typeof exports === 'object') exports['loaders'] = factory(); else root['loaders'] = factory();})(globalThis, function () { "use strict";var __exports__=(()=>{var Eo=Object.create;var pr=Object.defineProperty;var Bo=Object.getOwnPropertyDescriptor;var So=Object.getOwnPropertyNames;var Co=Object.getPrototypeOf,zo=Object.prototype.hasOwnProperty;var Le=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(n,e)=>(typeof require<"u"?require:n)[e]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var dt=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports),Hn=(t,n)=>{for(var e in n)pr(t,e,{get:n[e],enumerable:!0})},dr=(t,n,e,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of So(n))!zo.call(t,i)&&i!==e&&pr(t,i,{get:()=>n[i],enumerable:!(r=Bo(n,i))||r.enumerable});return t},_r=(t,n,e)=>(dr(t,n,"default"),e&&dr(e,n,"default")),ce=(t,n,e)=>(e=t!=null?Eo(Co(t)):{},dr(n||!t||!t.__esModule?pr(e,"default",{value:t,enumerable:!0}):e,t)),Io=t=>dr(pr({},"__esModule",{value:!0}),t);var Wr=dt((Tl,Pn)=>{Pn.exports=globalThis.loaders});var qr=dt((Qn,Gr)=>{(function(t){typeof Qn=="object"&&typeof Gr<"u"?Gr.exports=t():typeof define=="function"&&define.amd?define([],t):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).JSZip=t()})(function(){return function t(n,e,r){function i(f,g){if(!e[f]){if(!n[f]){var c=typeof Le=="function"&&Le;if(!g&&c)return c(f,!0);if(a)return a(f,!0);var u=new Error("Cannot find module '"+f+"'");throw u.code="MODULE_NOT_FOUND",u}var p=e[f]={exports:{}};n[f][0].call(p.exports,function(m){var h=n[f][1][m];return i(h||m)},p,p.exports,t,n,e,r)}return e[f].exports}for(var a=typeof Le=="function"&&Le,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(t,n,e){"use strict";var r=t("./utils"),i=t("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.encode=function(o){for(var f,g,c,u,p,m,h,b=[],d=0,w=o.length,y=w,k=r.getTypeOf(o)!=="string";d<o.length;)y=w-d,c=k?(f=o[d++],g=d<w?o[d++]:0,d<w?o[d++]:0):(f=o.charCodeAt(d++),g=d<w?o.charCodeAt(d++):0,d<w?o.charCodeAt(d++):0),u=f>>2,p=(3&f)<<4|g>>4,m=1<y?(15&g)<<2|c>>6:64,h=2<y?63&c:64,b.push(a.charAt(u)+a.charAt(p)+a.charAt(m)+a.charAt(h));return b.join("")},e.decode=function(o){var f,g,c,u,p,m,h=0,b=0,d="data:";if(o.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var w,y=3*(o=o.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(o.charAt(o.length-1)===a.charAt(64)&&y--,o.charAt(o.length-2)===a.charAt(64)&&y--,y%1!=0)throw new Error("Invalid base64 input, bad content length.");for(w=i.uint8array?new Uint8Array(0|y):new Array(0|y);h<o.length;)f=a.indexOf(o.charAt(h++))<<2|(u=a.indexOf(o.charAt(h++)))>>4,g=(15&u)<<4|(p=a.indexOf(o.charAt(h++)))>>2,c=(3&p)<<6|(m=a.indexOf(o.charAt(h++))),w[b++]=f,p!==64&&(w[b++]=g),m!==64&&(w[b++]=c);return w}},{"./support":30,"./utils":32}],2:[function(t,n,e){"use strict";var r=t("./external"),i=t("./stream/DataWorker"),a=t("./stream/Crc32Probe"),o=t("./stream/DataLengthProbe");function f(g,c,u,p,m){this.compressedSize=g,this.uncompressedSize=c,this.crc32=u,this.compression=p,this.compressedContent=m}f.prototype={getContentWorker:function(){var g=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),c=this;return g.on("end",function(){if(this.streamInfo.data_length!==c.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),g},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},f.createWorkerFrom=function(g,c,u){return g.pipe(new a).pipe(new o("uncompressedSize")).pipe(c.compressWorker(u)).pipe(new o("compressedSize")).withStreamInfo("compression",c)},n.exports=f},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,n,e){"use strict";var r=t("./stream/GenericWorker");e.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},e.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,n,e){"use strict";var r=t("./utils"),i=function(){for(var a,o=[],f=0;f<256;f++){a=f;for(var g=0;g<8;g++)a=1&a?3988292384^a>>>1:a>>>1;o[f]=a}return o}();n.exports=function(a,o){return a!==void 0&&a.length?r.getTypeOf(a)!=="string"?function(f,g,c,u){var p=i,m=u+c;f^=-1;for(var h=u;h<m;h++)f=f>>>8^p[255&(f^g[h])];return-1^f}(0|o,a,a.length,0):function(f,g,c,u){var p=i,m=u+c;f^=-1;for(var h=u;h<m;h++)f=f>>>8^p[255&(f^g.charCodeAt(h))];return-1^f}(0|o,a,a.length,0):0}},{"./utils":32}],5:[function(t,n,e){"use strict";e.base64=!1,e.binary=!1,e.dir=!1,e.createFolders=!0,e.date=null,e.compression=null,e.compressionOptions=null,e.comment=null,e.unixPermissions=null,e.dosPermissions=null},{}],6:[function(t,n,e){"use strict";var r=null;r=typeof Promise<"u"?Promise:t("lie"),n.exports={Promise:r}},{lie:37}],7:[function(t,n,e){"use strict";var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=t("pako"),a=t("./utils"),o=t("./stream/GenericWorker"),f=r?"uint8array":"array";function g(c,u){o.call(this,"FlateWorker/"+c),this._pako=null,this._pakoAction=c,this._pakoOptions=u,this.meta={}}e.magic="\b\0",a.inherits(g,o),g.prototype.processChunk=function(c){this.meta=c.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(f,c.data),!1)},g.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},g.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},g.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var c=this;this._pako.onData=function(u){c.push({data:u,meta:c.meta})}},e.compressWorker=function(c){return new g("Deflate",c)},e.uncompressWorker=function(){return new g("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,n,e){"use strict";function r(p,m){var h,b="";for(h=0;h<m;h++)b+=String.fromCharCode(255&p),p>>>=8;return b}function i(p,m,h,b,d,w){var y,k,E=p.file,F=p.compression,C=w!==f.utf8encode,Z=a.transformTo("string",w(E.name)),S=a.transformTo("string",f.utf8encode(E.name)),L=E.comment,B=a.transformTo("string",w(L)),_=a.transformTo("string",f.utf8encode(L)),x=S.length!==E.name.length,s=_.length!==L.length,H="",$="",Q="",j=E.dir,q=E.date,tt={crc32:0,compressedSize:0,uncompressedSize:0};m&&!h||(tt.crc32=p.crc32,tt.compressedSize=p.compressedSize,tt.uncompressedSize=p.uncompressedSize);var D=0;m&&(D|=8),C||!x&&!s||(D|=2048);var R=0,nt=0;j&&(R|=16),d==="UNIX"?(nt=798,R|=function(z,U){var M=z;return z||(M=U?16893:33204),(65535&M)<<16}(E.unixPermissions,j)):(nt=20,R|=function(z){return 63&(z||0)}(E.dosPermissions)),y=q.getUTCHours(),y<<=6,y|=q.getUTCMinutes(),y<<=5,y|=q.getUTCSeconds()/2,k=q.getUTCFullYear()-1980,k<<=4,k|=q.getUTCMonth()+1,k<<=5,k|=q.getUTCDate(),x&&($=r(1,1)+r(g(Z),4)+S,H+="up"+r($.length,2)+$),s&&(Q=r(1,1)+r(g(B),4)+_,H+="uc"+r(Q.length,2)+Q);var K="";return K+=` \0`,K+=r(D,2),K+=F.magic,K+=r(y,2),K+=r(k,2),K+=r(tt.crc32,4),K+=r(tt.compressedSize,4),K+=r(tt.uncompressedSize,4),K+=r(Z.length,2),K+=r(H.length,2),{fileRecord:c.LOCAL_FILE_HEADER+K+Z+H,dirRecord:c.CENTRAL_FILE_HEADER+r(nt,2)+K+r(B.length,2)+"\0\0\0\0"+r(R,4)+r(b,4)+Z+H+B}}var a=t("../utils"),o=t("../stream/GenericWorker"),f=t("../utf8"),g=t("../crc32"),c=t("../signature");function u(p,m,h,b){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=h,this.encodeFileName=b,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(p){var m=p.meta.percent||0,h=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,o.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:h?(m+100*(h-b-1))/h:100}}))},u.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var m=this.streamFiles&&!p.file.dir;if(m){var h=i(p,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:h.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(p){this.accumulate=!1;var m=this.streamFiles&&!p.file.dir,h=i(p,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(h.dirRecord),m)this.push({data:function(b){return c.DATA_DESCRIPTOR+r(b.crc32,4)+r(b.compressedSize,4)+r(b.uncompressedSize,4)}(p),meta:{percent:100}});else for(this.push({data:h.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var p=this.bytesWritten,m=0;m<this.dirRecords.length;m++)this.push({data:this.dirRecords[m],meta:{percent:100}});var h=this.bytesWritten-p,b=function(d,w,y,k,E){var F=a.transformTo("string",E(k));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(d,2)+r(d,2)+r(w,4)+r(y,4)+r(F.length,2)+F}(this.dirRecords.length,h,p,this.zipComment,this.encodeFileName);this.push({data:b,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(p){this._sources.push(p);var m=this;return p.on("data",function(h){m.processChunk(h)}),p.on("end",function(){m.closedSource(m.previous.streamInfo),m._sources.length?m.prepareNextSource():m.end()}),p.on("error",function(h){m.error(h)}),this},u.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(p){var m=this._sources;if(!o.prototype.error.call(this,p))return!1;for(var h=0;h<m.length;h++)try{m[h].error(p)}catch{}return!0},u.prototype.lock=function(){o.prototype.lock.call(this);for(var p=this._sources,m=0;m<p.length;m++)p[m].lock()},n.exports=u},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,n,e){"use strict";var r=t("../compressions"),i=t("./ZipFileWorker");e.generateWorker=function(a,o,f){var g=new i(o.streamFiles,f,o.platform,o.encodeFileName),c=0;try{a.forEach(function(u,p){c++;var m=function(w,y){var k=w||y,E=r[k];if(!E)throw new Error(k+" is not a valid compression method !");return E}(p.options.compression,o.compression),h=p.options.compressionOptions||o.compressionOptions||{},b=p.dir,d=p.date;p._compressWorker(m,h).withStreamInfo("file",{name:u,dir:b,date:d,comment:p.comment||"",unixPermissions:p.unixPermissions,dosPermissions:p.dosPermissions}).pipe(g)}),g.entriesCount=c}catch(u){g.error(u)}return g}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,n,e){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new r;for(var a in this)typeof this[a]!="function"&&(i[a]=this[a]);return i}}(r.prototype=t("./object")).loadAsync=t("./load"),r.support=t("./support"),r.defaults=t("./defaults"),r.version="3.10.1",r.loadAsync=function(i,a){return new r().loadAsync(i,a)},r.external=t("./external"),n.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,n,e){"use strict";var r=t("./utils"),i=t("./external"),a=t("./utf8"),o=t("./zipEntries"),f=t("./stream/Crc32Probe"),g=t("./nodejsUtils");function c(u){return new i.Promise(function(p,m){var h=u.decompressed.getContentWorker().pipe(new f);h.on("error",function(b){m(b)}).on("end",function(){h.streamInfo.crc32!==u.decompressed.crc32?m(new Error("Corrupted zip : CRC32 mismatch")):p()}).resume()})}n.exports=function(u,p){var m=this;return p=r.extend(p||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),g.isNode&&g.isStream(u)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",u,!0,p.optimizedBinaryString,p.base64).then(function(h){var b=new o(p);return b.load(h),b}).then(function(h){var b=[i.Promise.resolve(h)],d=h.files;if(p.checkCRC32)for(var w=0;w<d.length;w++)b.push(c(d[w]));return i.Promise.all(b)}).then(function(h){for(var b=h.shift(),d=b.files,w=0;w<d.length;w++){var y=d[w],k=y.fileNameStr,E=r.resolve(y.fileNameStr);m.file(E,y.decompressed,{binary:!0,optimizedBinaryString:!0,date:y.date,dir:y.dir,comment:y.fileCommentStr.length?y.fileCommentStr:null,unixPermissions:y.unixPermissions,dosPermissions:y.dosPermissions,createFolders:p.createFolders}),y.dir||(m.file(E).unsafeOriginalName=k)}return b.zipComment.length&&(m.comment=b.zipComment),m})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,n,e){"use strict";var r=t("../utils"),i=t("../stream/GenericWorker");function a(o,f){i.call(this,"Nodejs stream input adapter for "+o),this._upstreamEnded=!1,this._bindStream(f)}r.inherits(a,i),a.prototype._bindStream=function(o){var f=this;(this._stream=o).pause(),o.on("data",function(g){f.push({data:g,meta:{percent:0}})}).on("error",function(g){f.isPaused?this.generatedError=g:f.error(g)}).on("end",function(){f.isPaused?f._upstreamEnded=!0:f.end()})},a.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,n,e){"use strict";var r=t("readable-stream").Readable;function i(a,o,f){r.call(this,o),this._helper=a;var g=this;a.on("data",function(c,u){g.push(c)||g._helper.pause(),f&&f(u)}).on("error",function(c){g.emit("error",c)}).on("end",function(){g.push(null)})}t("../utils").inherits(i,r),i.prototype._read=function(){this._helper.resume()},n.exports=i},{"../utils":32,"readable-stream":16}],14:[function(t,n,e){"use strict";n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(r,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(r,i);if(typeof r=="number")throw new Error('The "data" argument must not be a number');return new Buffer(r,i)},allocBuffer:function(r){if(Buffer.alloc)return Buffer.alloc(r);var i=new Buffer(r);return i.fill(0),i},isBuffer:function(r){return Buffer.isBuffer(r)},isStream:function(r){return r&&typeof r.on=="function"&&typeof r.pause=="function"&&typeof r.resume=="function"}}},{}],15:[function(t,n,e){"use strict";function r(E,F,C){var Z,S=a.getTypeOf(F),L=a.extend(C||{},g);L.date=L.date||new Date,L.compression!==null&&(L.compression=L.compression.toUpperCase()),typeof L.unixPermissions=="string"&&(L.unixPermissions=parseInt(L.unixPermissions,8)),L.unixPermissions&&16384&L.unixPermissions&&(L.dir=!0),L.dosPermissions&&16&L.dosPermissions&&(L.dir=!0),L.dir&&(E=d(E)),L.createFolders&&(Z=b(E))&&w.call(this,Z,!0);var B=S==="string"&&L.binary===!1&&L.base64===!1;C&&C.binary!==void 0||(L.binary=!B),(F instanceof c&&F.uncompressedSize===0||L.dir||!F||F.length===0)&&(L.base64=!1,L.binary=!0,F="",L.compression="STORE",S="string");var _=null;_=F instanceof c||F instanceof o?F:m.isNode&&m.isStream(F)?new h(E,F):a.prepareContent(E,F,L.binary,L.optimizedBinaryString,L.base64);var x=new u(E,_,L);this.files[E]=x}var i=t("./utf8"),a=t("./utils"),o=t("./stream/GenericWorker"),f=t("./stream/StreamHelper"),g=t("./defaults"),c=t("./compressedObject"),u=t("./zipObject"),p=t("./generate"),m=t("./nodejsUtils"),h=t("./nodejs/NodejsStreamInputAdapter"),b=function(E){E.slice(-1)==="/"&&(E=E.substring(0,E.length-1));var F=E.lastIndexOf("/");return 0<F?E.substring(0,F):""},d=function(E){return E.slice(-1)!=="/"&&(E+="/"),E},w=function(E,F){return F=F!==void 0?F:g.createFolders,E=d(E),this.files[E]||r.call(this,E,null,{dir:!0,createFolders:F}),this.files[E]};function y(E){return Object.prototype.toString.call(E)==="[object RegExp]"}var k={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(E){var F,C,Z;for(F in this.files)Z=this.files[F],(C=F.slice(this.root.length,F.length))&&F.slice(0,this.root.length)===this.root&&E(C,Z)},filter:function(E){var F=[];return this.forEach(function(C,Z){E(C,Z)&&F.push(Z)}),F},file:function(E,F,C){if(arguments.length!==1)return E=this.root+E,r.call(this,E,F,C),this;if(y(E)){var Z=E;return this.filter(function(L,B){return!B.dir&&Z.test(L)})}var S=this.files[this.root+E];return S&&!S.dir?S:null},folder:function(E){if(!E)return this;if(y(E))return this.filter(function(S,L){return L.dir&&E.test(S)});var F=this.root+E,C=w.call(this,F),Z=this.clone();return Z.root=C.name,Z},remove:function(E){E=this.root+E;var F=this.files[E];if(F||(E.slice(-1)!=="/"&&(E+="/"),F=this.files[E]),F&&!F.dir)delete this.files[E];else for(var C=this.filter(function(S,L){return L.name.slice(0,E.length)===E}),Z=0;Z<C.length;Z++)delete this.files[C[Z].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(E){var F,C={};try{if((C=a.extend(E||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=C.type.toLowerCase(),C.compression=C.compression.toUpperCase(),C.type==="binarystring"&&(C.type="string"),!C.type)throw new Error("No output type specified.");a.checkSupport(C.type),C.platform!=="darwin"&&C.platform!=="freebsd"&&C.platform!=="linux"&&C.platform!=="sunos"||(C.platform="UNIX"),C.platform==="win32"&&(C.platform="DOS");var Z=C.comment||this.comment||"";F=p.generateWorker(this,C,Z)}catch(S){(F=new o("error")).error(S)}return new f(F,C.type||"string",C.mimeType)},generateAsync:function(E,F){return this.generateInternalStream(E).accumulate(F)},generateNodeStream:function(E,F){return(E=E||{}).type||(E.type="nodebuffer"),this.generateInternalStream(E).toNodejsStream(F)}};n.exports=k},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,n,e){"use strict";n.exports=t("stream")},{stream:void 0}],17:[function(t,n,e){"use strict";var r=t("./DataReader");function i(a){r.call(this,a);for(var o=0;o<this.data.length;o++)a[o]=255&a[o]}t("../utils").inherits(i,r),i.prototype.byteAt=function(a){return this.data[this.zero+a]},i.prototype.lastIndexOfSignature=function(a){for(var o=a.charCodeAt(0),f=a.charCodeAt(1),g=a.charCodeAt(2),c=a.charCodeAt(3),u=this.length-4;0<=u;--u)if(this.data[u]===o&&this.data[u+1]===f&&this.data[u+2]===g&&this.data[u+3]===c)return u-this.zero;return-1},i.prototype.readAndCheckSignature=function(a){var o=a.charCodeAt(0),f=a.charCodeAt(1),g=a.charCodeAt(2),c=a.charCodeAt(3),u=this.readData(4);return o===u[0]&&f===u[1]&&g===u[2]&&c===u[3]},i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var o=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},n.exports=i},{"../utils":32,"./DataReader":18}],18:[function(t,n,e){"use strict";var r=t("../utils");function i(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var o,f=0;for(this.checkOffset(a),o=this.index+a-1;o>=this.index;o--)f=(f<<8)+this.byteAt(o);return this.index+=a,f},readString:function(a){return r.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=i},{"../utils":32}],19:[function(t,n,e){"use strict";var r=t("./Uint8ArrayReader");function i(a){r.call(this,a)}t("../utils").inherits(i,r),i.prototype.readData=function(a){this.checkOffset(a);var o=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},n.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,n,e){"use strict";var r=t("./DataReader");function i(a){r.call(this,a)}t("../utils").inherits(i,r),i.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},i.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},i.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},i.prototype.readData=function(a){this.checkOffset(a);var o=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},n.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,n,e){"use strict";var r=t("./ArrayReader");function i(a){r.call(this,a)}t("../utils").inherits(i,r),i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var o=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},n.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,n,e){"use strict";var r=t("../utils"),i=t("../support"),a=t("./ArrayReader"),o=t("./StringReader"),f=t("./NodeBufferReader"),g=t("./Uint8ArrayReader");n.exports=function(c){var u=r.getTypeOf(c);return r.checkSupport(u),u!=="string"||i.uint8array?u==="nodebuffer"?new f(c):i.uint8array?new g(r.transformTo("uint8array",c)):new a(r.transformTo("array",c)):new o(c)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,n,e){"use strict";e.LOCAL_FILE_HEADER="PK",e.CENTRAL_FILE_HEADER="PK",e.CENTRAL_DIRECTORY_END="PK",e.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",e.ZIP64_CENTRAL_DIRECTORY_END="PK",e.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,n,e){"use strict";var r=t("./GenericWorker"),i=t("../utils");function a(o){r.call(this,"ConvertWorker to "+o),this.destType=o}i.inherits(a,r),a.prototype.processChunk=function(o){this.push({data:i.transformTo(this.destType,o.data),meta:o.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(t,n,e){"use strict";var r=t("./GenericWorker"),i=t("../crc32");function a(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(a,r),a.prototype.processChunk=function(o){this.streamInfo.crc32=i(o.data,this.streamInfo.crc32||0),this.push(o)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,n,e){"use strict";var r=t("../utils"),i=t("./GenericWorker");function a(o){i.call(this,"DataLengthProbe for "+o),this.propName=o,this.withStreamInfo(o,0)}r.inherits(a,i),a.prototype.processChunk=function(o){if(o){var f=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=f+o.data.length}i.prototype.processChunk.call(this,o)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(t,n,e){"use strict";var r=t("../utils"),i=t("./GenericWorker");function a(o){i.call(this,"DataWorker");var f=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,o.then(function(g){f.dataIsReady=!0,f.data=g,f.max=g&&g.length||0,f.type=r.getTypeOf(g),f.isPaused||f._tickAndRepeat()},function(g){f.error(g)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var o=null,f=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":o=this.data.substring(this.index,f);break;case"uint8array":o=this.data.subarray(this.index,f);break;case"array":case"nodebuffer":o=this.data.slice(this.index,f)}return this.index=f,this.push({data:o,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(t,n,e){"use strict";function r(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,a){return this._listeners[i].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,a){if(this._listeners[i])for(var o=0;o<this._listeners[i].length;o++)this._listeners[i][o].call(this,a)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var a=this;return i.on("data",function(o){a.processChunk(o)}),i.on("end",function(){a.end()}),i.on("error",function(o){a.error(o)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,a){return this.extraStreamInfo[i]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},n.exports=r},{}],29:[function(t,n,e){"use strict";var r=t("../utils"),i=t("./ConvertWorker"),a=t("./GenericWorker"),o=t("../base64"),f=t("../support"),g=t("../external"),c=null;if(f.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function u(m,h){return new g.Promise(function(b,d){var w=[],y=m._internalType,k=m._outputType,E=m._mimeType;m.on("data",function(F,C){w.push(F),h&&h(C)}).on("error",function(F){w=[],d(F)}).on("end",function(){try{var F=function(C,Z,S){switch(C){case"blob":return r.newBlob(r.transformTo("arraybuffer",Z),S);case"base64":return o.encode(Z);default:return r.transformTo(C,Z)}}(k,function(C,Z){var S,L=0,B=null,_=0;for(S=0;S<Z.length;S++)_+=Z[S].length;switch(C){case"string":return Z.join("");case"array":return Array.prototype.concat.apply([],Z);case"uint8array":for(B=new Uint8Array(_),S=0;S<Z.length;S++)B.set(Z[S],L),L+=Z[S].length;return B;case"nodebuffer":return Buffer.concat(Z);default:throw new Error("concat : unsupported type '"+C+"'")}}(y,w),E);b(F)}catch(C){d(C)}w=[]}).resume()})}function p(m,h,b){var d=h;switch(h){case"blob":case"arraybuffer":d="uint8array";break;case"base64":d="string"}try{this._internalType=d,this._outputType=h,this._mimeType=b,r.checkSupport(d),this._worker=m.pipe(new i(d)),m.lock()}catch(w){this._worker=new a("error"),this._worker.error(w)}}p.prototype={accumulate:function(m){return u(this,m)},on:function(m,h){var b=this;return m==="data"?this._worker.on(m,function(d){h.call(b,d.data,d.meta)}):this._worker.on(m,function(){r.delay(h,arguments,b)}),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(m){if(r.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:this._outputType!=="nodebuffer"},m)}},n.exports=p},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,n,e){"use strict";if(e.base64=!0,e.array=!0,e.string=!0,e.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",e.nodebuffer=typeof Buffer<"u",e.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")e.blob=!1;else{var r=new ArrayBuffer(0);try{e.blob=new Blob([r],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),e.blob=i.getBlob("application/zip").size===0}catch{e.blob=!1}}}try{e.nodestream=!!t("readable-stream").Readable}catch{e.nodestream=!1}},{"readable-stream":16}],31:[function(t,n,e){"use strict";for(var r=t("./utils"),i=t("./support"),a=t("./nodejsUtils"),o=t("./stream/GenericWorker"),f=new Array(256),g=0;g<256;g++)f[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;f[254]=f[254]=1;function c(){o.call(this,"utf-8 decode"),this.leftOver=null}function u(){o.call(this,"utf-8 encode")}e.utf8encode=function(p){return i.nodebuffer?a.newBufferFrom(p,"utf-8"):function(m){var h,b,d,w,y,k=m.length,E=0;for(w=0;w<k;w++)(64512&(b=m.charCodeAt(w)))==55296&&w+1<k&&(64512&(d=m.charCodeAt(w+1)))==56320&&(b=65536+(b-55296<<10)+(d-56320),w++),E+=b<128?1:b<2048?2:b<65536?3:4;for(h=i.uint8array?new Uint8Array(E):new Array(E),w=y=0;y<E;w++)(64512&(b=m.charCodeAt(w)))==55296&&w+1<k&&(64512&(d=m.charCodeAt(w+1)))==56320&&(b=65536+(b-55296<<10)+(d-56320),w++),b<128?h[y++]=b:(b<2048?h[y++]=192|b>>>6:(b<65536?h[y++]=224|b>>>12:(h[y++]=240|b>>>18,h[y++]=128|b>>>12&63),h[y++]=128|b>>>6&63),h[y++]=128|63&b);return h}(p)},e.utf8decode=function(p){return i.nodebuffer?r.transformTo("nodebuffer",p).toString("utf-8"):function(m){var h,b,d,w,y=m.length,k=new Array(2*y);for(h=b=0;h<y;)if((d=m[h++])<128)k[b++]=d;else if(4<(w=f[d]))k[b++]=65533,h+=w-1;else{for(d&=w===2?31:w===3?15:7;1<w&&h<y;)d=d<<6|63&m[h++],w--;1<w?k[b++]=65533:d<65536?k[b++]=d:(d-=65536,k[b++]=55296|d>>10&1023,k[b++]=56320|1023&d)}return k.length!==b&&(k.subarray?k=k.subarray(0,b):k.length=b),r.applyFromCharCode(k)}(p=r.transformTo(i.uint8array?"uint8array":"array",p))},r.inherits(c,o),c.prototype.processChunk=function(p){var m=r.transformTo(i.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var h=m;(m=new Uint8Array(h.length+this.leftOver.length)).set(this.leftOver,0),m.set(h,this.leftOver.length)}else m=this.leftOver.concat(m);this.leftOver=null}var b=function(w,y){var k;for((y=y||w.length)>w.length&&(y=w.length),k=y-1;0<=k&&(192&w[k])==128;)k--;return k<0||k===0?y:k+f[w[k]]>y?k:y}(m),d=m;b!==m.length&&(i.uint8array?(d=m.subarray(0,b),this.leftOver=m.subarray(b,m.length)):(d=m.slice(0,b),this.leftOver=m.slice(b,m.length))),this.push({data:e.utf8decode(d),meta:p.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=c,r.inherits(u,o),u.prototype.processChunk=function(p){this.push({data:e.utf8encode(p.data),meta:p.meta})},e.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,n,e){"use strict";var r=t("./support"),i=t("./base64"),a=t("./nodejsUtils"),o=t("./external");function f(h){return h}function g(h,b){for(var d=0;d<h.length;++d)b[d]=255&h.charCodeAt(d);return b}t("setimmediate"),e.newBlob=function(h,b){e.checkSupport("blob");try{return new Blob([h],{type:b})}catch{try{var d=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return d.append(h),d.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var c={stringifyByChunk:function(h,b,d){var w=[],y=0,k=h.length;if(k<=d)return String.fromCharCode.apply(null,h);for(;y<k;)b==="array"||b==="nodebuffer"?w.push(String.fromCharCode.apply(null,h.slice(y,Math.min(y+d,k)))):w.push(String.fromCharCode.apply(null,h.subarray(y,Math.min(y+d,k)))),y+=d;return w.join("")},stringifyByChar:function(h){for(var b="",d=0;d<h.length;d++)b+=String.fromCharCode(h[d]);return b},applyCanBeUsed:{uint8array:function(){try{return r.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return r.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function u(h){var b=65536,d=e.getTypeOf(h),w=!0;if(d==="uint8array"?w=c.applyCanBeUsed.uint8array:d==="nodebuffer"&&(w=c.applyCanBeUsed.nodebuffer),w)for(;1<b;)try{return c.stringifyByChunk(h,d,b)}catch{b=Math.floor(b/2)}return c.stringifyByChar(h)}function p(h,b){for(var d=0;d<h.length;d++)b[d]=h[d];return b}e.applyFromCharCode=u;var m={};m.string={string:f,array:function(h){return g(h,new Array(h.length))},arraybuffer:function(h){return m.string.uint8array(h).buffer},uint8array:function(h){return g(h,new Uint8Array(h.length))},nodebuffer:function(h){return g(h,a.allocBuffer(h.length))}},m.array={string:u,array:f,arraybuffer:function(h){return new Uint8Array(h).buffer},uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return a.newBufferFrom(h)}},m.arraybuffer={string:function(h){return u(new Uint8Array(h))},array:function(h){return p(new Uint8Array(h),new Array(h.byteLength))},arraybuffer:f,uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return a.newBufferFrom(new Uint8Array(h))}},m.uint8array={string:u,array:function(h){return p(h,new Array(h.length))},arraybuffer:function(h){return h.buffer},uint8array:f,nodebuffer:function(h){return a.newBufferFrom(h)}},m.nodebuffer={string:u,array:function(h){return p(h,new Array(h.length))},arraybuffer:function(h){return m.nodebuffer.uint8array(h).buffer},uint8array:function(h){return p(h,new Uint8Array(h.length))},nodebuffer:f},e.transformTo=function(h,b){if(b=b||"",!h)return b;e.checkSupport(h);var d=e.getTypeOf(b);return m[d][h](b)},e.resolve=function(h){for(var b=h.split("/"),d=[],w=0;w<b.length;w++){var y=b[w];y==="."||y===""&&w!==0&&w!==b.length-1||(y===".."?d.pop():d.push(y))}return d.join("/")},e.getTypeOf=function(h){return typeof h=="string"?"string":Object.prototype.toString.call(h)==="[object Array]"?"array":r.nodebuffer&&a.isBuffer(h)?"nodebuffer":r.uint8array&&h instanceof Uint8Array?"uint8array":r.arraybuffer&&h instanceof ArrayBuffer?"arraybuffer":void 0},e.checkSupport=function(h){if(!r[h.toLowerCase()])throw new Error(h+" is not supported by this platform")},e.MAX_VALUE_16BITS=65535,e.MAX_VALUE_32BITS=-1,e.pretty=function(h){var b,d,w="";for(d=0;d<(h||"").length;d++)w+="\\x"+((b=h.charCodeAt(d))<16?"0":"")+b.toString(16).toUpperCase();return w},e.delay=function(h,b,d){setImmediate(function(){h.apply(d||null,b||[])})},e.inherits=function(h,b){function d(){}d.prototype=b.prototype,h.prototype=new d},e.extend=function(){var h,b,d={};for(h=0;h<arguments.length;h++)for(b in arguments[h])Object.prototype.hasOwnProperty.call(arguments[h],b)&&d[b]===void 0&&(d[b]=arguments[h][b]);return d},e.prepareContent=function(h,b,d,w,y){return o.Promise.resolve(b).then(function(k){return r.blob&&(k instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(k))!==-1)&&typeof FileReader<"u"?new o.Promise(function(E,F){var C=new FileReader;C.onload=function(Z){E(Z.target.result)},C.onerror=function(Z){F(Z.target.error)},C.readAsArrayBuffer(k)}):k}).then(function(k){var E=e.getTypeOf(k);return E?(E==="arraybuffer"?k=e.transformTo("uint8array",k):E==="string"&&(y?k=i.decode(k):d&&w!==!0&&(k=function(F){return g(F,r.uint8array?new Uint8Array(F.length):new Array(F.length))}(k))),k):o.Promise.reject(new Error("Can't read the data of '"+h+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,n,e){"use strict";var r=t("./reader/readerFor"),i=t("./utils"),a=t("./signature"),o=t("./zipEntry"),f=t("./support");function g(c){this.files=[],this.loadOptions=c}g.prototype={checkSignature:function(c){if(!this.reader.readAndCheckSignature(c)){this.reader.index-=4;var u=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(u)+", expected "+i.pretty(c)+")")}},isSignature:function(c,u){var p=this.reader.index;this.reader.setIndex(c);var m=this.reader.readString(4)===u;return this.reader.setIndex(p),m},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var c=this.reader.readData(this.zipCommentLength),u=f.uint8array?"uint8array":"array",p=i.transformTo(u,c);this.zipComment=this.loadOptions.decodeFileName(p)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var c,u,p,m=this.zip64EndOfCentralSize-44;0<m;)c=this.reader.readInt(2),u=this.reader.readInt(4),p=this.reader.readData(u),this.zip64ExtensibleData[c]={id:c,length:u,value:p}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var c,u;for(c=0;c<this.files.length;c++)u=this.files[c],this.reader.setIndex(u.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),u.readLocalPart(this.reader),u.handleUTF8(),u.processAttributes()},readCentralDir:function(){var c;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(c=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(c);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var c=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(c<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(c);var u=c;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(c=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(c),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var p=this.centralDirOffset+this.centralDirSize;this.zip64&&(p+=20,p+=12+this.zip64EndOfCentralSize);var m=u-p;if(0<m)this.isSignature(u,a.CENTRAL_FILE_HEADER)||(this.reader.zero=m);else if(m<0)throw new Error("Corrupted zip: missing "+Math.abs(m)+" bytes.")},prepareReader:function(c){this.reader=r(c)},load:function(c){this.prepareReader(c),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=g},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,n,e){"use strict";var r=t("./reader/readerFor"),i=t("./utils"),a=t("./compressedObject"),o=t("./crc32"),f=t("./utf8"),g=t("./compressions"),c=t("./support");function u(p,m){this.options=p,this.loadOptions=m}u.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(p){var m,h;if(p.skip(22),this.fileNameLength=p.readInt(2),h=p.readInt(2),this.fileName=p.readData(this.fileNameLength),p.skip(h),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((m=function(b){for(var d in g)if(Object.prototype.hasOwnProperty.call(g,d)&&g[d].magic===b)return g[d];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,m,p.readData(this.compressedSize))},readCentralPart:function(p){this.versionMadeBy=p.readInt(2),p.skip(2),this.bitFlag=p.readInt(2),this.compressionMethod=p.readString(2),this.date=p.readDate(),this.crc32=p.readInt(4),this.compressedSize=p.readInt(4),this.uncompressedSize=p.readInt(4);var m=p.readInt(2);if(this.extraFieldsLength=p.readInt(2),this.fileCommentLength=p.readInt(2),this.diskNumberStart=p.readInt(2),this.internalFileAttributes=p.readInt(2),this.externalFileAttributes=p.readInt(4),this.localHeaderOffset=p.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");p.skip(m),this.readExtraFields(p),this.parseZIP64ExtraField(p),this.fileComment=p.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var p=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var m,h,b,d=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4<d;)m=p.readInt(2),h=p.readInt(2),b=p.readData(h),this.extraFields[m]={id:m,length:h,value:b};p.setIndex(d)},handleUTF8:function(){var p=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=f.utf8decode(this.fileName),this.fileCommentStr=f.utf8decode(this.fileComment);else{var m=this.findExtraFieldUnicodePath();if(m!==null)this.fileNameStr=m;else{var h=i.transformTo(p,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(h)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var d=i.transformTo(p,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(d)}}},findExtraFieldUnicodePath:function(){var p=this.extraFields[28789];if(p){var m=r(p.value);return m.readInt(1)!==1||o(this.fileName)!==m.readInt(4)?null:f.utf8decode(m.readData(p.length-5))}return null},findExtraFieldUnicodeComment:function(){var p=this.extraFields[25461];if(p){var m=r(p.value);return m.readInt(1)!==1||o(this.fileComment)!==m.readInt(4)?null:f.utf8decode(m.readData(p.length-5))}return null}},n.exports=u},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,n,e){"use strict";function r(m,h,b){this.name=m,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=h,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var i=t("./stream/StreamHelper"),a=t("./stream/DataWorker"),o=t("./utf8"),f=t("./compressedObject"),g=t("./stream/GenericWorker");r.prototype={internalStream:function(m){var h=null,b="string";try{if(!m)throw new Error("No output type specified.");var d=(b=m.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),h=this._decompressWorker();var w=!this._dataBinary;w&&!d&&(h=h.pipe(new o.Utf8EncodeWorker)),!w&&d&&(h=h.pipe(new o.Utf8DecodeWorker))}catch(y){(h=new g("error")).error(y)}return new i(h,b,"")},async:function(m,h){return this.internalStream(m).accumulate(h)},nodeStream:function(m,h){return this.internalStream(m||"nodebuffer").toNodejsStream(h)},_compressWorker:function(m,h){if(this._data instanceof f&&this._data.compression.magic===m.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new o.Utf8EncodeWorker)),f.createWorkerFrom(b,m,h)},_decompressWorker:function(){return this._data instanceof f?this._data.getContentWorker():this._data instanceof g?this._data:new a(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],u=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},p=0;p<c.length;p++)r.prototype[c[p]]=u;n.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,n,e){(function(r){"use strict";var i,a,o=r.MutationObserver||r.WebKitMutationObserver;if(o){var f=0,g=new o(m),c=r.document.createTextNode("");g.observe(c,{characterData:!0}),i=function(){c.data=f=++f%2}}else if(r.setImmediate||r.MessageChannel===void 0)i="document"in r&&"onreadystatechange"in r.document.createElement("script")?function(){var h=r.document.createElement("script");h.onreadystatechange=function(){m(),h.onreadystatechange=null,h.parentNode.removeChild(h),h=null},r.document.documentElement.appendChild(h)}:function(){setTimeout(m,0)};else{var u=new r.MessageChannel;u.port1.onmessage=m,i=function(){u.port2.postMessage(0)}}var p=[];function m(){var h,b;a=!0;for(var d=p.length;d;){for(b=p,p=[],h=-1;++h<d;)b[h]();d=p.length}a=!1}n.exports=function(h){p.push(h)!==1||a||i()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,n,e){"use strict";var r=t("immediate");function i(){}var a={},o=["REJECTED"],f=["FULFILLED"],g=["PENDING"];function c(d){if(typeof d!="function")throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,d!==i&&h(this,d)}function u(d,w,y){this.promise=d,typeof w=="function"&&(this.onFulfilled=w,this.callFulfilled=this.otherCallFulfilled),typeof y=="function"&&(this.onRejected=y,this.callRejected=this.otherCallRejected)}function p(d,w,y){r(function(){var k;try{k=w(y)}catch(E){return a.reject(d,E)}k===d?a.reject(d,new TypeError("Cannot resolve promise with itself")):a.resolve(d,k)})}function m(d){var w=d&&d.then;if(d&&(typeof d=="object"||typeof d=="function")&&typeof w=="function")return function(){w.apply(d,arguments)}}function h(d,w){var y=!1;function k(C){y||(y=!0,a.reject(d,C))}function E(C){y||(y=!0,a.resolve(d,C))}var F=b(function(){w(E,k)});F.status==="error"&&k(F.value)}function b(d,w){var y={};try{y.value=d(w),y.status="success"}catch(k){y.status="error",y.value=k}return y}(n.exports=c).prototype.finally=function(d){if(typeof d!="function")return this;var w=this.constructor;return this.then(function(y){return w.resolve(d()).then(function(){return y})},function(y){return w.resolve(d()).then(function(){throw y})})},c.prototype.catch=function(d){return this.then(null,d)},c.prototype.then=function(d,w){if(typeof d!="function"&&this.state===f||typeof w!="function"&&this.state===o)return this;var y=new this.constructor(i);return this.state