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