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