mirror of
https://github.com/quintsmart/obsidian-course-module-loader.git
synced 2026-07-22 05:48:51 +00:00
22 lines
104 KiB
JavaScript
22 lines
104 KiB
JavaScript
/*
|
||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
||
if you want to view the source, please visit the github repository of this plugin
|
||
*/
|
||
|
||
var Dt=Object.create;var wt=Object.defineProperty;var Pt=Object.getOwnPropertyDescriptor;var Ut=Object.getOwnPropertyNames;var Nt=Object.getPrototypeOf,Lt=Object.prototype.hasOwnProperty;var jt=(g,T)=>()=>(T||g((T={exports:{}}).exports,T),T.exports),Wt=(g,T)=>{for(var p in T)wt(g,p,{get:T[p],enumerable:!0})},At=(g,T,p,a)=>{if(T&&typeof T=="object"||typeof T=="function")for(let s of Ut(T))!Lt.call(g,s)&&s!==p&&wt(g,s,{get:()=>T[s],enumerable:!(a=Pt(T,s))||a.enumerable});return g};var Zt=(g,T,p)=>(p=g!=null?Dt(Nt(g)):{},At(T||!g||!g.__esModule?wt(p,"default",{value:g,enumerable:!0}):p,g)),Mt=g=>At(wt({},"__esModule",{value:!0}),g);var Ft=jt((It,kt)=>{(function(g){typeof It=="object"&&typeof kt!="undefined"?kt.exports=g():typeof define=="function"&&define.amd?define([],g):(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this).JSZip=g()})(function(){return function g(T,p,a){function s(b,y){if(!p[b]){if(!T[b]){var m=typeof require=="function"&&require;if(!y&&m)return m(b,!0);if(r)return r(b,!0);var w=new Error("Cannot find module '"+b+"'");throw w.code="MODULE_NOT_FOUND",w}var i=p[b]={exports:{}};T[b][0].call(i.exports,function(f){var n=T[b][1][f];return s(n||f)},i,i.exports,g,T,p,a)}return p[b].exports}for(var r=typeof require=="function"&&require,h=0;h<a.length;h++)s(a[h]);return s}({1:[function(g,T,p){"use strict";var a=g("./utils"),s=g("./support"),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";p.encode=function(h){for(var b,y,m,w,i,f,n,u=[],o=0,d=h.length,v=d,S=a.getTypeOf(h)!=="string";o<h.length;)v=d-o,m=S?(b=h[o++],y=o<d?h[o++]:0,o<d?h[o++]:0):(b=h.charCodeAt(o++),y=o<d?h.charCodeAt(o++):0,o<d?h.charCodeAt(o++):0),w=b>>2,i=(3&b)<<4|y>>4,f=1<v?(15&y)<<2|m>>6:64,n=2<v?63&m:64,u.push(r.charAt(w)+r.charAt(i)+r.charAt(f)+r.charAt(n));return u.join("")},p.decode=function(h){var b,y,m,w,i,f,n=0,u=0,o="data:";if(h.substr(0,o.length)===o)throw new Error("Invalid base64 input, it looks like a data url.");var d,v=3*(h=h.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(h.charAt(h.length-1)===r.charAt(64)&&v--,h.charAt(h.length-2)===r.charAt(64)&&v--,v%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=s.uint8array?new Uint8Array(0|v):new Array(0|v);n<h.length;)b=r.indexOf(h.charAt(n++))<<2|(w=r.indexOf(h.charAt(n++)))>>4,y=(15&w)<<4|(i=r.indexOf(h.charAt(n++)))>>2,m=(3&i)<<6|(f=r.indexOf(h.charAt(n++))),d[u++]=b,i!==64&&(d[u++]=y),f!==64&&(d[u++]=m);return d}},{"./support":30,"./utils":32}],2:[function(g,T,p){"use strict";var a=g("./external"),s=g("./stream/DataWorker"),r=g("./stream/Crc32Probe"),h=g("./stream/DataLengthProbe");function b(y,m,w,i,f){this.compressedSize=y,this.uncompressedSize=m,this.crc32=w,this.compression=i,this.compressedContent=f}b.prototype={getContentWorker:function(){var y=new s(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")),m=this;return y.on("end",function(){if(this.streamInfo.data_length!==m.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),y},getCompressedWorker:function(){return new s(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},b.createWorkerFrom=function(y,m,w){return y.pipe(new r).pipe(new h("uncompressedSize")).pipe(m.compressWorker(w)).pipe(new h("compressedSize")).withStreamInfo("compression",m)},T.exports=b},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(g,T,p){"use strict";var a=g("./stream/GenericWorker");p.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},p.DEFLATE=g("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(g,T,p){"use strict";var a=g("./utils"),s=function(){for(var r,h=[],b=0;b<256;b++){r=b;for(var y=0;y<8;y++)r=1&r?3988292384^r>>>1:r>>>1;h[b]=r}return h}();T.exports=function(r,h){return r!==void 0&&r.length?a.getTypeOf(r)!=="string"?function(b,y,m,w){var i=s,f=w+m;b^=-1;for(var n=w;n<f;n++)b=b>>>8^i[255&(b^y[n])];return-1^b}(0|h,r,r.length,0):function(b,y,m,w){var i=s,f=w+m;b^=-1;for(var n=w;n<f;n++)b=b>>>8^i[255&(b^y.charCodeAt(n))];return-1^b}(0|h,r,r.length,0):0}},{"./utils":32}],5:[function(g,T,p){"use strict";p.base64=!1,p.binary=!1,p.dir=!1,p.createFolders=!0,p.date=null,p.compression=null,p.compressionOptions=null,p.comment=null,p.unixPermissions=null,p.dosPermissions=null},{}],6:[function(g,T,p){"use strict";var a=null;a=typeof Promise!="undefined"?Promise:g("lie"),T.exports={Promise:a}},{lie:37}],7:[function(g,T,p){"use strict";var a=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Uint32Array!="undefined",s=g("pako"),r=g("./utils"),h=g("./stream/GenericWorker"),b=a?"uint8array":"array";function y(m,w){h.call(this,"FlateWorker/"+m),this._pako=null,this._pakoAction=m,this._pakoOptions=w,this.meta={}}p.magic="\b\0",r.inherits(y,h),y.prototype.processChunk=function(m){this.meta=m.meta,this._pako===null&&this._createPako(),this._pako.push(r.transformTo(b,m.data),!1)},y.prototype.flush=function(){h.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},y.prototype.cleanUp=function(){h.prototype.cleanUp.call(this),this._pako=null},y.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var m=this;this._pako.onData=function(w){m.push({data:w,meta:m.meta})}},p.compressWorker=function(m){return new y("Deflate",m)},p.uncompressWorker=function(){return new y("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(g,T,p){"use strict";function a(i,f){var n,u="";for(n=0;n<f;n++)u+=String.fromCharCode(255&i),i>>>=8;return u}function s(i,f,n,u,o,d){var v,S,x=i.file,R=i.compression,F=d!==b.utf8encode,N=r.transformTo("string",d(x.name)),I=r.transformTo("string",b.utf8encode(x.name)),M=x.comment,X=r.transformTo("string",d(M)),_=r.transformTo("string",b.utf8encode(M)),O=I.length!==x.name.length,e=_.length!==M.length,D="",q="",L="",Q=x.dir,j=x.date,V={crc32:0,compressedSize:0,uncompressedSize:0};f&&!n||(V.crc32=i.crc32,V.compressedSize=i.compressedSize,V.uncompressedSize=i.uncompressedSize);var z=0;f&&(z|=8),F||!O&&!e||(z|=2048);var E=0,Y=0;Q&&(E|=16),o==="UNIX"?(Y=798,E|=function(H,it){var lt=H;return H||(lt=it?16893:33204),(65535<)<<16}(x.unixPermissions,Q)):(Y=20,E|=function(H){return 63&(H||0)}(x.dosPermissions)),v=j.getUTCHours(),v<<=6,v|=j.getUTCMinutes(),v<<=5,v|=j.getUTCSeconds()/2,S=j.getUTCFullYear()-1980,S<<=4,S|=j.getUTCMonth()+1,S<<=5,S|=j.getUTCDate(),O&&(q=a(1,1)+a(y(N),4)+I,D+="up"+a(q.length,2)+q),e&&(L=a(1,1)+a(y(X),4)+_,D+="uc"+a(L.length,2)+L);var $="";return $+=`
|
||
\0`,$+=a(z,2),$+=R.magic,$+=a(v,2),$+=a(S,2),$+=a(V.crc32,4),$+=a(V.compressedSize,4),$+=a(V.uncompressedSize,4),$+=a(N.length,2),$+=a(D.length,2),{fileRecord:m.LOCAL_FILE_HEADER+$+N+D,dirRecord:m.CENTRAL_FILE_HEADER+a(Y,2)+$+a(X.length,2)+"\0\0\0\0"+a(E,4)+a(u,4)+N+D+X}}var r=g("../utils"),h=g("../stream/GenericWorker"),b=g("../utf8"),y=g("../crc32"),m=g("../signature");function w(i,f,n,u){h.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=f,this.zipPlatform=n,this.encodeFileName=u,this.streamFiles=i,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}r.inherits(w,h),w.prototype.push=function(i){var f=i.meta.percent||0,n=this.entriesCount,u=this._sources.length;this.accumulate?this.contentBuffer.push(i):(this.bytesWritten+=i.data.length,h.prototype.push.call(this,{data:i.data,meta:{currentFile:this.currentFile,percent:n?(f+100*(n-u-1))/n:100}}))},w.prototype.openedSource=function(i){this.currentSourceOffset=this.bytesWritten,this.currentFile=i.file.name;var f=this.streamFiles&&!i.file.dir;if(f){var n=s(i,f,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},w.prototype.closedSource=function(i){this.accumulate=!1;var f=this.streamFiles&&!i.file.dir,n=s(i,f,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),f)this.push({data:function(u){return m.DATA_DESCRIPTOR+a(u.crc32,4)+a(u.compressedSize,4)+a(u.uncompressedSize,4)}(i),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},w.prototype.flush=function(){for(var i=this.bytesWritten,f=0;f<this.dirRecords.length;f++)this.push({data:this.dirRecords[f],meta:{percent:100}});var n=this.bytesWritten-i,u=function(o,d,v,S,x){var R=r.transformTo("string",x(S));return m.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a(o,2)+a(o,2)+a(d,4)+a(v,4)+a(R.length,2)+R}(this.dirRecords.length,n,i,this.zipComment,this.encodeFileName);this.push({data:u,meta:{percent:100}})},w.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},w.prototype.registerPrevious=function(i){this._sources.push(i);var f=this;return i.on("data",function(n){f.processChunk(n)}),i.on("end",function(){f.closedSource(f.previous.streamInfo),f._sources.length?f.prepareNextSource():f.end()}),i.on("error",function(n){f.error(n)}),this},w.prototype.resume=function(){return!!h.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},w.prototype.error=function(i){var f=this._sources;if(!h.prototype.error.call(this,i))return!1;for(var n=0;n<f.length;n++)try{f[n].error(i)}catch(u){}return!0},w.prototype.lock=function(){h.prototype.lock.call(this);for(var i=this._sources,f=0;f<i.length;f++)i[f].lock()},T.exports=w},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(g,T,p){"use strict";var a=g("../compressions"),s=g("./ZipFileWorker");p.generateWorker=function(r,h,b){var y=new s(h.streamFiles,b,h.platform,h.encodeFileName),m=0;try{r.forEach(function(w,i){m++;var f=function(d,v){var S=d||v,x=a[S];if(!x)throw new Error(S+" is not a valid compression method !");return x}(i.options.compression,h.compression),n=i.options.compressionOptions||h.compressionOptions||{},u=i.dir,o=i.date;i._compressWorker(f,n).withStreamInfo("file",{name:w,dir:u,date:o,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(y)}),y.entriesCount=m}catch(w){y.error(w)}return y}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(g,T,p){"use strict";function a(){if(!(this instanceof a))return new a;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 s=new a;for(var r in this)typeof this[r]!="function"&&(s[r]=this[r]);return s}}(a.prototype=g("./object")).loadAsync=g("./load"),a.support=g("./support"),a.defaults=g("./defaults"),a.version="3.10.1",a.loadAsync=function(s,r){return new a().loadAsync(s,r)},a.external=g("./external"),T.exports=a},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(g,T,p){"use strict";var a=g("./utils"),s=g("./external"),r=g("./utf8"),h=g("./zipEntries"),b=g("./stream/Crc32Probe"),y=g("./nodejsUtils");function m(w){return new s.Promise(function(i,f){var n=w.decompressed.getContentWorker().pipe(new b);n.on("error",function(u){f(u)}).on("end",function(){n.streamInfo.crc32!==w.decompressed.crc32?f(new Error("Corrupted zip : CRC32 mismatch")):i()}).resume()})}T.exports=function(w,i){var f=this;return i=a.extend(i||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:r.utf8decode}),y.isNode&&y.isStream(w)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):a.prepareContent("the loaded zip file",w,!0,i.optimizedBinaryString,i.base64).then(function(n){var u=new h(i);return u.load(n),u}).then(function(n){var u=[s.Promise.resolve(n)],o=n.files;if(i.checkCRC32)for(var d=0;d<o.length;d++)u.push(m(o[d]));return s.Promise.all(u)}).then(function(n){for(var u=n.shift(),o=u.files,d=0;d<o.length;d++){var v=o[d],S=v.fileNameStr,x=a.resolve(v.fileNameStr);f.file(x,v.decompressed,{binary:!0,optimizedBinaryString:!0,date:v.date,dir:v.dir,comment:v.fileCommentStr.length?v.fileCommentStr:null,unixPermissions:v.unixPermissions,dosPermissions:v.dosPermissions,createFolders:i.createFolders}),v.dir||(f.file(x).unsafeOriginalName=S)}return u.zipComment.length&&(f.comment=u.zipComment),f})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(g,T,p){"use strict";var a=g("../utils"),s=g("../stream/GenericWorker");function r(h,b){s.call(this,"Nodejs stream input adapter for "+h),this._upstreamEnded=!1,this._bindStream(b)}a.inherits(r,s),r.prototype._bindStream=function(h){var b=this;(this._stream=h).pause(),h.on("data",function(y){b.push({data:y,meta:{percent:0}})}).on("error",function(y){b.isPaused?this.generatedError=y:b.error(y)}).on("end",function(){b.isPaused?b._upstreamEnded=!0:b.end()})},r.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},r.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},T.exports=r},{"../stream/GenericWorker":28,"../utils":32}],13:[function(g,T,p){"use strict";var a=g("readable-stream").Readable;function s(r,h,b){a.call(this,h),this._helper=r;var y=this;r.on("data",function(m,w){y.push(m)||y._helper.pause(),b&&b(w)}).on("error",function(m){y.emit("error",m)}).on("end",function(){y.push(null)})}g("../utils").inherits(s,a),s.prototype._read=function(){this._helper.resume()},T.exports=s},{"../utils":32,"readable-stream":16}],14:[function(g,T,p){"use strict";T.exports={isNode:typeof Buffer!="undefined",newBufferFrom:function(a,s){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(a,s);if(typeof a=="number")throw new Error('The "data" argument must not be a number');return new Buffer(a,s)},allocBuffer:function(a){if(Buffer.alloc)return Buffer.alloc(a);var s=new Buffer(a);return s.fill(0),s},isBuffer:function(a){return Buffer.isBuffer(a)},isStream:function(a){return a&&typeof a.on=="function"&&typeof a.pause=="function"&&typeof a.resume=="function"}}},{}],15:[function(g,T,p){"use strict";function a(x,R,F){var N,I=r.getTypeOf(R),M=r.extend(F||{},y);M.date=M.date||new Date,M.compression!==null&&(M.compression=M.compression.toUpperCase()),typeof M.unixPermissions=="string"&&(M.unixPermissions=parseInt(M.unixPermissions,8)),M.unixPermissions&&16384&M.unixPermissions&&(M.dir=!0),M.dosPermissions&&16&M.dosPermissions&&(M.dir=!0),M.dir&&(x=o(x)),M.createFolders&&(N=u(x))&&d.call(this,N,!0);var X=I==="string"&&M.binary===!1&&M.base64===!1;F&&F.binary!==void 0||(M.binary=!X),(R instanceof m&&R.uncompressedSize===0||M.dir||!R||R.length===0)&&(M.base64=!1,M.binary=!0,R="",M.compression="STORE",I="string");var _=null;_=R instanceof m||R instanceof h?R:f.isNode&&f.isStream(R)?new n(x,R):r.prepareContent(x,R,M.binary,M.optimizedBinaryString,M.base64);var O=new w(x,_,M);this.files[x]=O}var s=g("./utf8"),r=g("./utils"),h=g("./stream/GenericWorker"),b=g("./stream/StreamHelper"),y=g("./defaults"),m=g("./compressedObject"),w=g("./zipObject"),i=g("./generate"),f=g("./nodejsUtils"),n=g("./nodejs/NodejsStreamInputAdapter"),u=function(x){x.slice(-1)==="/"&&(x=x.substring(0,x.length-1));var R=x.lastIndexOf("/");return 0<R?x.substring(0,R):""},o=function(x){return x.slice(-1)!=="/"&&(x+="/"),x},d=function(x,R){return R=R!==void 0?R:y.createFolders,x=o(x),this.files[x]||a.call(this,x,null,{dir:!0,createFolders:R}),this.files[x]};function v(x){return Object.prototype.toString.call(x)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(x){var R,F,N;for(R in this.files)N=this.files[R],(F=R.slice(this.root.length,R.length))&&R.slice(0,this.root.length)===this.root&&x(F,N)},filter:function(x){var R=[];return this.forEach(function(F,N){x(F,N)&&R.push(N)}),R},file:function(x,R,F){if(arguments.length!==1)return x=this.root+x,a.call(this,x,R,F),this;if(v(x)){var N=x;return this.filter(function(M,X){return!X.dir&&N.test(M)})}var I=this.files[this.root+x];return I&&!I.dir?I:null},folder:function(x){if(!x)return this;if(v(x))return this.filter(function(I,M){return M.dir&&x.test(I)});var R=this.root+x,F=d.call(this,R),N=this.clone();return N.root=F.name,N},remove:function(x){x=this.root+x;var R=this.files[x];if(R||(x.slice(-1)!=="/"&&(x+="/"),R=this.files[x]),R&&!R.dir)delete this.files[x];else for(var F=this.filter(function(I,M){return M.name.slice(0,x.length)===x}),N=0;N<F.length;N++)delete this.files[F[N].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(x){var R,F={};try{if((F=r.extend(x||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=F.type.toLowerCase(),F.compression=F.compression.toUpperCase(),F.type==="binarystring"&&(F.type="string"),!F.type)throw new Error("No output type specified.");r.checkSupport(F.type),F.platform!=="darwin"&&F.platform!=="freebsd"&&F.platform!=="linux"&&F.platform!=="sunos"||(F.platform="UNIX"),F.platform==="win32"&&(F.platform="DOS");var N=F.comment||this.comment||"";R=i.generateWorker(this,F,N)}catch(I){(R=new h("error")).error(I)}return new b(R,F.type||"string",F.mimeType)},generateAsync:function(x,R){return this.generateInternalStream(x).accumulate(R)},generateNodeStream:function(x,R){return(x=x||{}).type||(x.type="nodebuffer"),this.generateInternalStream(x).toNodejsStream(R)}};T.exports=S},{"./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(g,T,p){"use strict";T.exports=g("stream")},{stream:void 0}],17:[function(g,T,p){"use strict";var a=g("./DataReader");function s(r){a.call(this,r);for(var h=0;h<this.data.length;h++)r[h]=255&r[h]}g("../utils").inherits(s,a),s.prototype.byteAt=function(r){return this.data[this.zero+r]},s.prototype.lastIndexOfSignature=function(r){for(var h=r.charCodeAt(0),b=r.charCodeAt(1),y=r.charCodeAt(2),m=r.charCodeAt(3),w=this.length-4;0<=w;--w)if(this.data[w]===h&&this.data[w+1]===b&&this.data[w+2]===y&&this.data[w+3]===m)return w-this.zero;return-1},s.prototype.readAndCheckSignature=function(r){var h=r.charCodeAt(0),b=r.charCodeAt(1),y=r.charCodeAt(2),m=r.charCodeAt(3),w=this.readData(4);return h===w[0]&&b===w[1]&&y===w[2]&&m===w[3]},s.prototype.readData=function(r){if(this.checkOffset(r),r===0)return[];var h=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,h},T.exports=s},{"../utils":32,"./DataReader":18}],18:[function(g,T,p){"use strict";var a=g("../utils");function s(r){this.data=r,this.length=r.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(r){this.checkIndex(this.index+r)},checkIndex:function(r){if(this.length<this.zero+r||r<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+r+"). Corrupted zip ?")},setIndex:function(r){this.checkIndex(r),this.index=r},skip:function(r){this.setIndex(this.index+r)},byteAt:function(){},readInt:function(r){var h,b=0;for(this.checkOffset(r),h=this.index+r-1;h>=this.index;h--)b=(b<<8)+this.byteAt(h);return this.index+=r,b},readString:function(r){return a.transformTo("string",this.readData(r))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var r=this.readInt(4);return new Date(Date.UTC(1980+(r>>25&127),(r>>21&15)-1,r>>16&31,r>>11&31,r>>5&63,(31&r)<<1))}},T.exports=s},{"../utils":32}],19:[function(g,T,p){"use strict";var a=g("./Uint8ArrayReader");function s(r){a.call(this,r)}g("../utils").inherits(s,a),s.prototype.readData=function(r){this.checkOffset(r);var h=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,h},T.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(g,T,p){"use strict";var a=g("./DataReader");function s(r){a.call(this,r)}g("../utils").inherits(s,a),s.prototype.byteAt=function(r){return this.data.charCodeAt(this.zero+r)},s.prototype.lastIndexOfSignature=function(r){return this.data.lastIndexOf(r)-this.zero},s.prototype.readAndCheckSignature=function(r){return r===this.readData(4)},s.prototype.readData=function(r){this.checkOffset(r);var h=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,h},T.exports=s},{"../utils":32,"./DataReader":18}],21:[function(g,T,p){"use strict";var a=g("./ArrayReader");function s(r){a.call(this,r)}g("../utils").inherits(s,a),s.prototype.readData=function(r){if(this.checkOffset(r),r===0)return new Uint8Array(0);var h=this.data.subarray(this.zero+this.index,this.zero+this.index+r);return this.index+=r,h},T.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(g,T,p){"use strict";var a=g("../utils"),s=g("../support"),r=g("./ArrayReader"),h=g("./StringReader"),b=g("./NodeBufferReader"),y=g("./Uint8ArrayReader");T.exports=function(m){var w=a.getTypeOf(m);return a.checkSupport(w),w!=="string"||s.uint8array?w==="nodebuffer"?new b(m):s.uint8array?new y(a.transformTo("uint8array",m)):new r(a.transformTo("array",m)):new h(m)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(g,T,p){"use strict";p.LOCAL_FILE_HEADER="PK",p.CENTRAL_FILE_HEADER="PK",p.CENTRAL_DIRECTORY_END="PK",p.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",p.ZIP64_CENTRAL_DIRECTORY_END="PK",p.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(g,T,p){"use strict";var a=g("./GenericWorker"),s=g("../utils");function r(h){a.call(this,"ConvertWorker to "+h),this.destType=h}s.inherits(r,a),r.prototype.processChunk=function(h){this.push({data:s.transformTo(this.destType,h.data),meta:h.meta})},T.exports=r},{"../utils":32,"./GenericWorker":28}],25:[function(g,T,p){"use strict";var a=g("./GenericWorker"),s=g("../crc32");function r(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}g("../utils").inherits(r,a),r.prototype.processChunk=function(h){this.streamInfo.crc32=s(h.data,this.streamInfo.crc32||0),this.push(h)},T.exports=r},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(g,T,p){"use strict";var a=g("../utils"),s=g("./GenericWorker");function r(h){s.call(this,"DataLengthProbe for "+h),this.propName=h,this.withStreamInfo(h,0)}a.inherits(r,s),r.prototype.processChunk=function(h){if(h){var b=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=b+h.data.length}s.prototype.processChunk.call(this,h)},T.exports=r},{"../utils":32,"./GenericWorker":28}],27:[function(g,T,p){"use strict";var a=g("../utils"),s=g("./GenericWorker");function r(h){s.call(this,"DataWorker");var b=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,h.then(function(y){b.dataIsReady=!0,b.data=y,b.max=y&&y.length||0,b.type=a.getTypeOf(y),b.isPaused||b._tickAndRepeat()},function(y){b.error(y)})}a.inherits(r,s),r.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},r.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},r.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},r.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var h=null,b=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":h=this.data.substring(this.index,b);break;case"uint8array":h=this.data.subarray(this.index,b);break;case"array":case"nodebuffer":h=this.data.slice(this.index,b)}return this.index=b,this.push({data:h,meta:{percent:this.max?this.index/this.max*100:0}})},T.exports=r},{"../utils":32,"./GenericWorker":28}],28:[function(g,T,p){"use strict";function a(s){this.name=s||"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}a.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,r){return this._listeners[s].push(r),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,r){if(this._listeners[s])for(var h=0;h<this._listeners[s].length;h++)this._listeners[s][h].call(this,r)},pipe:function(s){return s.registerPrevious(this)},registerPrevious:function(s){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=s.streamInfo,this.mergeStreamInfo(),this.previous=s;var r=this;return s.on("data",function(h){r.processChunk(h)}),s.on("end",function(){r.end()}),s.on("error",function(h){r.error(h)}),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 s=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),s=!0),this.previous&&this.previous.resume(),!s},flush:function(){},processChunk:function(s){this.push(s)},withStreamInfo:function(s,r){return this.extraStreamInfo[s]=r,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var s in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,s)&&(this.streamInfo[s]=this.extraStreamInfo[s])},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 s="Worker "+this.name;return this.previous?this.previous+" -> "+s:s}},T.exports=a},{}],29:[function(g,T,p){"use strict";var a=g("../utils"),s=g("./ConvertWorker"),r=g("./GenericWorker"),h=g("../base64"),b=g("../support"),y=g("../external"),m=null;if(b.nodestream)try{m=g("../nodejs/NodejsStreamOutputAdapter")}catch(f){}function w(f,n){return new y.Promise(function(u,o){var d=[],v=f._internalType,S=f._outputType,x=f._mimeType;f.on("data",function(R,F){d.push(R),n&&n(F)}).on("error",function(R){d=[],o(R)}).on("end",function(){try{var R=function(F,N,I){switch(F){case"blob":return a.newBlob(a.transformTo("arraybuffer",N),I);case"base64":return h.encode(N);default:return a.transformTo(F,N)}}(S,function(F,N){var I,M=0,X=null,_=0;for(I=0;I<N.length;I++)_+=N[I].length;switch(F){case"string":return N.join("");case"array":return Array.prototype.concat.apply([],N);case"uint8array":for(X=new Uint8Array(_),I=0;I<N.length;I++)X.set(N[I],M),M+=N[I].length;return X;case"nodebuffer":return Buffer.concat(N);default:throw new Error("concat : unsupported type '"+F+"'")}}(v,d),x);u(R)}catch(F){o(F)}d=[]}).resume()})}function i(f,n,u){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=u,a.checkSupport(o),this._worker=f.pipe(new s(o)),f.lock()}catch(d){this._worker=new r("error"),this._worker.error(d)}}i.prototype={accumulate:function(f){return w(this,f)},on:function(f,n){var u=this;return f==="data"?this._worker.on(f,function(o){n.call(u,o.data,o.meta)}):this._worker.on(f,function(){a.delay(n,arguments,u)}),this},resume:function(){return a.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(f){if(a.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new m(this,{objectMode:this._outputType!=="nodebuffer"},f)}},T.exports=i},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(g,T,p){"use strict";if(p.base64=!0,p.array=!0,p.string=!0,p.arraybuffer=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined",p.nodebuffer=typeof Buffer!="undefined",p.uint8array=typeof Uint8Array!="undefined",typeof ArrayBuffer=="undefined")p.blob=!1;else{var a=new ArrayBuffer(0);try{p.blob=new Blob([a],{type:"application/zip"}).size===0}catch(r){try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(a),p.blob=s.getBlob("application/zip").size===0}catch(h){p.blob=!1}}}try{p.nodestream=!!g("readable-stream").Readable}catch(r){p.nodestream=!1}},{"readable-stream":16}],31:[function(g,T,p){"use strict";for(var a=g("./utils"),s=g("./support"),r=g("./nodejsUtils"),h=g("./stream/GenericWorker"),b=new Array(256),y=0;y<256;y++)b[y]=252<=y?6:248<=y?5:240<=y?4:224<=y?3:192<=y?2:1;b[254]=b[254]=1;function m(){h.call(this,"utf-8 decode"),this.leftOver=null}function w(){h.call(this,"utf-8 encode")}p.utf8encode=function(i){return s.nodebuffer?r.newBufferFrom(i,"utf-8"):function(f){var n,u,o,d,v,S=f.length,x=0;for(d=0;d<S;d++)(64512&(u=f.charCodeAt(d)))==55296&&d+1<S&&(64512&(o=f.charCodeAt(d+1)))==56320&&(u=65536+(u-55296<<10)+(o-56320),d++),x+=u<128?1:u<2048?2:u<65536?3:4;for(n=s.uint8array?new Uint8Array(x):new Array(x),d=v=0;v<x;d++)(64512&(u=f.charCodeAt(d)))==55296&&d+1<S&&(64512&(o=f.charCodeAt(d+1)))==56320&&(u=65536+(u-55296<<10)+(o-56320),d++),u<128?n[v++]=u:(u<2048?n[v++]=192|u>>>6:(u<65536?n[v++]=224|u>>>12:(n[v++]=240|u>>>18,n[v++]=128|u>>>12&63),n[v++]=128|u>>>6&63),n[v++]=128|63&u);return n}(i)},p.utf8decode=function(i){return s.nodebuffer?a.transformTo("nodebuffer",i).toString("utf-8"):function(f){var n,u,o,d,v=f.length,S=new Array(2*v);for(n=u=0;n<v;)if((o=f[n++])<128)S[u++]=o;else if(4<(d=b[o]))S[u++]=65533,n+=d-1;else{for(o&=d===2?31:d===3?15:7;1<d&&n<v;)o=o<<6|63&f[n++],d--;1<d?S[u++]=65533:o<65536?S[u++]=o:(o-=65536,S[u++]=55296|o>>10&1023,S[u++]=56320|1023&o)}return S.length!==u&&(S.subarray?S=S.subarray(0,u):S.length=u),a.applyFromCharCode(S)}(i=a.transformTo(s.uint8array?"uint8array":"array",i))},a.inherits(m,h),m.prototype.processChunk=function(i){var f=a.transformTo(s.uint8array?"uint8array":"array",i.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var n=f;(f=new Uint8Array(n.length+this.leftOver.length)).set(this.leftOver,0),f.set(n,this.leftOver.length)}else f=this.leftOver.concat(f);this.leftOver=null}var u=function(d,v){var S;for((v=v||d.length)>d.length&&(v=d.length),S=v-1;0<=S&&(192&d[S])==128;)S--;return S<0||S===0?v:S+b[d[S]]>v?S:v}(f),o=f;u!==f.length&&(s.uint8array?(o=f.subarray(0,u),this.leftOver=f.subarray(u,f.length)):(o=f.slice(0,u),this.leftOver=f.slice(u,f.length))),this.push({data:p.utf8decode(o),meta:i.meta})},m.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:p.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},p.Utf8DecodeWorker=m,a.inherits(w,h),w.prototype.processChunk=function(i){this.push({data:p.utf8encode(i.data),meta:i.meta})},p.Utf8EncodeWorker=w},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(g,T,p){"use strict";var a=g("./support"),s=g("./base64"),r=g("./nodejsUtils"),h=g("./external");function b(n){return n}function y(n,u){for(var o=0;o<n.length;++o)u[o]=255&n.charCodeAt(o);return u}g("setimmediate"),p.newBlob=function(n,u){p.checkSupport("blob");try{return new Blob([n],{type:u})}catch(d){try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return o.append(n),o.getBlob(u)}catch(v){throw new Error("Bug : can't construct the Blob.")}}};var m={stringifyByChunk:function(n,u,o){var d=[],v=0,S=n.length;if(S<=o)return String.fromCharCode.apply(null,n);for(;v<S;)u==="array"||u==="nodebuffer"?d.push(String.fromCharCode.apply(null,n.slice(v,Math.min(v+o,S)))):d.push(String.fromCharCode.apply(null,n.subarray(v,Math.min(v+o,S)))),v+=o;return d.join("")},stringifyByChar:function(n){for(var u="",o=0;o<n.length;o++)u+=String.fromCharCode(n[o]);return u},applyCanBeUsed:{uint8array:function(){try{return a.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(n){return!1}}(),nodebuffer:function(){try{return a.nodebuffer&&String.fromCharCode.apply(null,r.allocBuffer(1)).length===1}catch(n){return!1}}()}};function w(n){var u=65536,o=p.getTypeOf(n),d=!0;if(o==="uint8array"?d=m.applyCanBeUsed.uint8array:o==="nodebuffer"&&(d=m.applyCanBeUsed.nodebuffer),d)for(;1<u;)try{return m.stringifyByChunk(n,o,u)}catch(v){u=Math.floor(u/2)}return m.stringifyByChar(n)}function i(n,u){for(var o=0;o<n.length;o++)u[o]=n[o];return u}p.applyFromCharCode=w;var f={};f.string={string:b,array:function(n){return y(n,new Array(n.length))},arraybuffer:function(n){return f.string.uint8array(n).buffer},uint8array:function(n){return y(n,new Uint8Array(n.length))},nodebuffer:function(n){return y(n,r.allocBuffer(n.length))}},f.array={string:w,array:b,arraybuffer:function(n){return new Uint8Array(n).buffer},uint8array:function(n){return new Uint8Array(n)},nodebuffer:function(n){return r.newBufferFrom(n)}},f.arraybuffer={string:function(n){return w(new Uint8Array(n))},array:function(n){return i(new Uint8Array(n),new Array(n.byteLength))},arraybuffer:b,uint8array:function(n){return new Uint8Array(n)},nodebuffer:function(n){return r.newBufferFrom(new Uint8Array(n))}},f.uint8array={string:w,array:function(n){return i(n,new Array(n.length))},arraybuffer:function(n){return n.buffer},uint8array:b,nodebuffer:function(n){return r.newBufferFrom(n)}},f.nodebuffer={string:w,array:function(n){return i(n,new Array(n.length))},arraybuffer:function(n){return f.nodebuffer.uint8array(n).buffer},uint8array:function(n){return i(n,new Uint8Array(n.length))},nodebuffer:b},p.transformTo=function(n,u){if(u=u||"",!n)return u;p.checkSupport(n);var o=p.getTypeOf(u);return f[o][n](u)},p.resolve=function(n){for(var u=n.split("/"),o=[],d=0;d<u.length;d++){var v=u[d];v==="."||v===""&&d!==0&&d!==u.length-1||(v===".."?o.pop():o.push(v))}return o.join("/")},p.getTypeOf=function(n){return typeof n=="string"?"string":Object.prototype.toString.call(n)==="[object Array]"?"array":a.nodebuffer&&r.isBuffer(n)?"nodebuffer":a.uint8array&&n instanceof Uint8Array?"uint8array":a.arraybuffer&&n instanceof ArrayBuffer?"arraybuffer":void 0},p.checkSupport=function(n){if(!a[n.toLowerCase()])throw new Error(n+" is not supported by this platform")},p.MAX_VALUE_16BITS=65535,p.MAX_VALUE_32BITS=-1,p.pretty=function(n){var u,o,d="";for(o=0;o<(n||"").length;o++)d+="\\x"+((u=n.charCodeAt(o))<16?"0":"")+u.toString(16).toUpperCase();return d},p.delay=function(n,u,o){setImmediate(function(){n.apply(o||null,u||[])})},p.inherits=function(n,u){function o(){}o.prototype=u.prototype,n.prototype=new o},p.extend=function(){var n,u,o={};for(n=0;n<arguments.length;n++)for(u in arguments[n])Object.prototype.hasOwnProperty.call(arguments[n],u)&&o[u]===void 0&&(o[u]=arguments[n][u]);return o},p.prepareContent=function(n,u,o,d,v){return h.Promise.resolve(u).then(function(S){return a.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader!="undefined"?new h.Promise(function(x,R){var F=new FileReader;F.onload=function(N){x(N.target.result)},F.onerror=function(N){R(N.target.error)},F.readAsArrayBuffer(S)}):S}).then(function(S){var x=p.getTypeOf(S);return x?(x==="arraybuffer"?S=p.transformTo("uint8array",S):x==="string"&&(v?S=s.decode(S):o&&d!==!0&&(S=function(R){return y(R,a.uint8array?new Uint8Array(R.length):new Array(R.length))}(S))),S):h.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,setimmediate:54}],33:[function(g,T,p){"use strict";var a=g("./reader/readerFor"),s=g("./utils"),r=g("./signature"),h=g("./zipEntry"),b=g("./support");function y(m){this.files=[],this.loadOptions=m}y.prototype={checkSignature:function(m){if(!this.reader.readAndCheckSignature(m)){this.reader.index-=4;var w=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(w)+", expected "+s.pretty(m)+")")}},isSignature:function(m,w){var i=this.reader.index;this.reader.setIndex(m);var f=this.reader.readString(4)===w;return this.reader.setIndex(i),f},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 m=this.reader.readData(this.zipCommentLength),w=b.uint8array?"uint8array":"array",i=s.transformTo(w,m);this.zipComment=this.loadOptions.decodeFileName(i)},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 m,w,i,f=this.zip64EndOfCentralSize-44;0<f;)m=this.reader.readInt(2),w=this.reader.readInt(4),i=this.reader.readData(w),this.zip64ExtensibleData[m]={id:m,length:w,value:i}},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 m,w;for(m=0;m<this.files.length;m++)w=this.files[m],this.reader.setIndex(w.localHeaderOffset),this.checkSignature(r.LOCAL_FILE_HEADER),w.readLocalPart(this.reader),w.handleUTF8(),w.processAttributes()},readCentralDir:function(){var m;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(r.CENTRAL_FILE_HEADER);)(m=new h({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(m);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var m=this.reader.lastIndexOfSignature(r.CENTRAL_DIRECTORY_END);if(m<0)throw this.isSignature(0,r.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(m);var w=m;if(this.checkSignature(r.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(m=this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(m),this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,r.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(r.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(r.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var f=w-i;if(0<f)this.isSignature(w,r.CENTRAL_FILE_HEADER)||(this.reader.zero=f);else if(f<0)throw new Error("Corrupted zip: missing "+Math.abs(f)+" bytes.")},prepareReader:function(m){this.reader=a(m)},load:function(m){this.prepareReader(m),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},T.exports=y},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(g,T,p){"use strict";var a=g("./reader/readerFor"),s=g("./utils"),r=g("./compressedObject"),h=g("./crc32"),b=g("./utf8"),y=g("./compressions"),m=g("./support");function w(i,f){this.options=i,this.loadOptions=f}w.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(i){var f,n;if(i.skip(22),this.fileNameLength=i.readInt(2),n=i.readInt(2),this.fileName=i.readData(this.fileNameLength),i.skip(n),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((f=function(u){for(var o in y)if(Object.prototype.hasOwnProperty.call(y,o)&&y[o].magic===u)return y[o];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new r(this.compressedSize,this.uncompressedSize,this.crc32,f,i.readData(this.compressedSize))},readCentralPart:function(i){this.versionMadeBy=i.readInt(2),i.skip(2),this.bitFlag=i.readInt(2),this.compressionMethod=i.readString(2),this.date=i.readDate(),this.crc32=i.readInt(4),this.compressedSize=i.readInt(4),this.uncompressedSize=i.readInt(4);var f=i.readInt(2);if(this.extraFieldsLength=i.readInt(2),this.fileCommentLength=i.readInt(2),this.diskNumberStart=i.readInt(2),this.internalFileAttributes=i.readInt(2),this.externalFileAttributes=i.readInt(4),this.localHeaderOffset=i.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");i.skip(f),this.readExtraFields(i),this.parseZIP64ExtraField(i),this.fileComment=i.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var i=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),i==0&&(this.dosPermissions=63&this.externalFileAttributes),i==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var i=a(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=i.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=i.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=i.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=i.readInt(4))}},readExtraFields:function(i){var f,n,u,o=i.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});i.index+4<o;)f=i.readInt(2),n=i.readInt(2),u=i.readData(n),this.extraFields[f]={id:f,length:n,value:u};i.setIndex(o)},handleUTF8:function(){var i=m.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=b.utf8decode(this.fileName),this.fileCommentStr=b.utf8decode(this.fileComment);else{var f=this.findExtraFieldUnicodePath();if(f!==null)this.fileNameStr=f;else{var n=s.transformTo(i,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var u=this.findExtraFieldUnicodeComment();if(u!==null)this.fileCommentStr=u;else{var o=s.transformTo(i,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var i=this.extraFields[28789];if(i){var f=a(i.value);return f.readInt(1)!==1||h(this.fileName)!==f.readInt(4)?null:b.utf8decode(f.readData(i.length-5))}return null},findExtraFieldUnicodeComment:function(){var i=this.extraFields[25461];if(i){var f=a(i.value);return f.readInt(1)!==1||h(this.fileComment)!==f.readInt(4)?null:b.utf8decode(f.readData(i.length-5))}return null}},T.exports=w},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(g,T,p){"use strict";function a(f,n,u){this.name=f,this.dir=u.dir,this.date=u.date,this.comment=u.comment,this.unixPermissions=u.unixPermissions,this.dosPermissions=u.dosPermissions,this._data=n,this._dataBinary=u.binary,this.options={compression:u.compression,compressionOptions:u.compressionOptions}}var s=g("./stream/StreamHelper"),r=g("./stream/DataWorker"),h=g("./utf8"),b=g("./compressedObject"),y=g("./stream/GenericWorker");a.prototype={internalStream:function(f){var n=null,u="string";try{if(!f)throw new Error("No output type specified.");var o=(u=f.toLowerCase())==="string"||u==="text";u!=="binarystring"&&u!=="text"||(u="string"),n=this._decompressWorker();var d=!this._dataBinary;d&&!o&&(n=n.pipe(new h.Utf8EncodeWorker)),!d&&o&&(n=n.pipe(new h.Utf8DecodeWorker))}catch(v){(n=new y("error")).error(v)}return new s(n,u,"")},async:function(f,n){return this.internalStream(f).accumulate(n)},nodeStream:function(f,n){return this.internalStream(f||"nodebuffer").toNodejsStream(n)},_compressWorker:function(f,n){if(this._data instanceof b&&this._data.compression.magic===f.magic)return this._data.getCompressedWorker();var u=this._decompressWorker();return this._dataBinary||(u=u.pipe(new h.Utf8EncodeWorker)),b.createWorkerFrom(u,f,n)},_decompressWorker:function(){return this._data instanceof b?this._data.getContentWorker():this._data instanceof y?this._data:new r(this._data)}};for(var m=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],w=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},i=0;i<m.length;i++)a.prototype[m[i]]=w;T.exports=a},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(g,T,p){(function(a){"use strict";var s,r,h=a.MutationObserver||a.WebKitMutationObserver;if(h){var b=0,y=new h(f),m=a.document.createTextNode("");y.observe(m,{characterData:!0}),s=function(){m.data=b=++b%2}}else if(a.setImmediate||a.MessageChannel===void 0)s="document"in a&&"onreadystatechange"in a.document.createElement("script")?function(){var n=a.document.createElement("script");n.onreadystatechange=function(){f(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},a.document.documentElement.appendChild(n)}:function(){setTimeout(f,0)};else{var w=new a.MessageChannel;w.port1.onmessage=f,s=function(){w.port2.postMessage(0)}}var i=[];function f(){var n,u;r=!0;for(var o=i.length;o;){for(u=i,i=[],n=-1;++n<o;)u[n]();o=i.length}r=!1}T.exports=function(n){i.push(n)!==1||r||s()}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],37:[function(g,T,p){"use strict";var a=g("immediate");function s(){}var r={},h=["REJECTED"],b=["FULFILLED"],y=["PENDING"];function m(o){if(typeof o!="function")throw new TypeError("resolver must be a function");this.state=y,this.queue=[],this.outcome=void 0,o!==s&&n(this,o)}function w(o,d,v){this.promise=o,typeof d=="function"&&(this.onFulfilled=d,this.callFulfilled=this.otherCallFulfilled),typeof v=="function"&&(this.onRejected=v,this.callRejected=this.otherCallRejected)}function i(o,d,v){a(function(){var S;try{S=d(v)}catch(x){return r.reject(o,x)}S===o?r.reject(o,new TypeError("Cannot resolve promise with itself")):r.resolve(o,S)})}function f(o){var d=o&&o.then;if(o&&(typeof o=="object"||typeof o=="function")&&typeof d=="function")return function(){d.apply(o,arguments)}}function n(o,d){var v=!1;function S(F){v||(v=!0,r.reject(o,F))}function x(F){v||(v=!0,r.resolve(o,F))}var R=u(function(){d(x,S)});R.status==="error"&&S(R.value)}function u(o,d){var v={};try{v.value=o(d),v.status="success"}catch(S){v.status="error",v.value=S}return v}(T.exports=m).prototype.finally=function(o){if(typeof o!="function")return this;var d=this.constructor;return this.then(function(v){return d.resolve(o()).then(function(){return v})},function(v){return d.resolve(o()).then(function(){throw v})})},m.prototype.catch=function(o){return this.then(null,o)},m.prototype.then=function(o,d){if(typeof o!="function"&&this.state===b||typeof d!="function"&&this.state===h)return this;var v=new this.constructor(s);return this.state!==y?i(v,this.state===b?o:d,this.outcome):this.queue.push(new w(v,o,d)),v},w.prototype.callFulfilled=function(o){r.resolve(this.promise,o)},w.prototype.otherCallFulfilled=function(o){i(this.promise,this.onFulfilled,o)},w.prototype.callRejected=function(o){r.reject(this.promise,o)},w.prototype.otherCallRejected=function(o){i(this.promise,this.onRejected,o)},r.resolve=function(o,d){var v=u(f,d);if(v.status==="error")return r.reject(o,v.value);var S=v.value;if(S)n(o,S);else{o.state=b,o.outcome=d;for(var x=-1,R=o.queue.length;++x<R;)o.queue[x].callFulfilled(d)}return o},r.reject=function(o,d){o.state=h,o.outcome=d;for(var v=-1,S=o.queue.length;++v<S;)o.queue[v].callRejected(d);return o},m.resolve=function(o){return o instanceof this?o:r.resolve(new this(s),o)},m.reject=function(o){var d=new this(s);return r.reject(d,o)},m.all=function(o){var d=this;if(Object.prototype.toString.call(o)!=="[object Array]")return this.reject(new TypeError("must be an array"));var v=o.length,S=!1;if(!v)return this.resolve([]);for(var x=new Array(v),R=0,F=-1,N=new this(s);++F<v;)I(o[F],F);return N;function I(M,X){d.resolve(M).then(function(_){x[X]=_,++R!==v||S||(S=!0,r.resolve(N,x))},function(_){S||(S=!0,r.reject(N,_))})}},m.race=function(o){var d=this;if(Object.prototype.toString.call(o)!=="[object Array]")return this.reject(new TypeError("must be an array"));var v=o.length,S=!1;if(!v)return this.resolve([]);for(var x=-1,R=new this(s);++x<v;)F=o[x],d.resolve(F).then(function(N){S||(S=!0,r.resolve(R,N))},function(N){S||(S=!0,r.reject(R,N))});var F;return R}},{immediate:36}],38:[function(g,T,p){"use strict";var a={};(0,g("./lib/utils/common").assign)(a,g("./lib/deflate"),g("./lib/inflate"),g("./lib/zlib/constants")),T.exports=a},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(g,T,p){"use strict";var a=g("./zlib/deflate"),s=g("./utils/common"),r=g("./utils/strings"),h=g("./zlib/messages"),b=g("./zlib/zstream"),y=Object.prototype.toString,m=0,w=-1,i=0,f=8;function n(o){if(!(this instanceof n))return new n(o);this.options=s.assign({level:w,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:i,to:""},o||{});var d=this.options;d.raw&&0<d.windowBits?d.windowBits=-d.windowBits:d.gzip&&0<d.windowBits&&d.windowBits<16&&(d.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new b,this.strm.avail_out=0;var v=a.deflateInit2(this.strm,d.level,d.method,d.windowBits,d.memLevel,d.strategy);if(v!==m)throw new Error(h[v]);if(d.header&&a.deflateSetHeader(this.strm,d.header),d.dictionary){var S;if(S=typeof d.dictionary=="string"?r.string2buf(d.dictionary):y.call(d.dictionary)==="[object ArrayBuffer]"?new Uint8Array(d.dictionary):d.dictionary,(v=a.deflateSetDictionary(this.strm,S))!==m)throw new Error(h[v]);this._dict_set=!0}}function u(o,d){var v=new n(d);if(v.push(o,!0),v.err)throw v.msg||h[v.err];return v.result}n.prototype.push=function(o,d){var v,S,x=this.strm,R=this.options.chunkSize;if(this.ended)return!1;S=d===~~d?d:d===!0?4:0,typeof o=="string"?x.input=r.string2buf(o):y.call(o)==="[object ArrayBuffer]"?x.input=new Uint8Array(o):x.input=o,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new s.Buf8(R),x.next_out=0,x.avail_out=R),(v=a.deflate(x,S))!==1&&v!==m)return this.onEnd(v),!(this.ended=!0);x.avail_out!==0&&(x.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(r.buf2binstring(s.shrinkBuf(x.output,x.next_out))):this.onData(s.shrinkBuf(x.output,x.next_out)))}while((0<x.avail_in||x.avail_out===0)&&v!==1);return S===4?(v=a.deflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===m):S!==2||(this.onEnd(m),!(x.avail_out=0))},n.prototype.onData=function(o){this.chunks.push(o)},n.prototype.onEnd=function(o){o===m&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=o,this.msg=this.strm.msg},p.Deflate=n,p.deflate=u,p.deflateRaw=function(o,d){return(d=d||{}).raw=!0,u(o,d)},p.gzip=function(o,d){return(d=d||{}).gzip=!0,u(o,d)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(g,T,p){"use strict";var a=g("./zlib/inflate"),s=g("./utils/common"),r=g("./utils/strings"),h=g("./zlib/constants"),b=g("./zlib/messages"),y=g("./zlib/zstream"),m=g("./zlib/gzheader"),w=Object.prototype.toString;function i(n){if(!(this instanceof i))return new i(n);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},n||{});var u=this.options;u.raw&&0<=u.windowBits&&u.windowBits<16&&(u.windowBits=-u.windowBits,u.windowBits===0&&(u.windowBits=-15)),!(0<=u.windowBits&&u.windowBits<16)||n&&n.windowBits||(u.windowBits+=32),15<u.windowBits&&u.windowBits<48&&!(15&u.windowBits)&&(u.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new y,this.strm.avail_out=0;var o=a.inflateInit2(this.strm,u.windowBits);if(o!==h.Z_OK)throw new Error(b[o]);this.header=new m,a.inflateGetHeader(this.strm,this.header)}function f(n,u){var o=new i(u);if(o.push(n,!0),o.err)throw o.msg||b[o.err];return o.result}i.prototype.push=function(n,u){var o,d,v,S,x,R,F=this.strm,N=this.options.chunkSize,I=this.options.dictionary,M=!1;if(this.ended)return!1;d=u===~~u?u:u===!0?h.Z_FINISH:h.Z_NO_FLUSH,typeof n=="string"?F.input=r.binstring2buf(n):w.call(n)==="[object ArrayBuffer]"?F.input=new Uint8Array(n):F.input=n,F.next_in=0,F.avail_in=F.input.length;do{if(F.avail_out===0&&(F.output=new s.Buf8(N),F.next_out=0,F.avail_out=N),(o=a.inflate(F,h.Z_NO_FLUSH))===h.Z_NEED_DICT&&I&&(R=typeof I=="string"?r.string2buf(I):w.call(I)==="[object ArrayBuffer]"?new Uint8Array(I):I,o=a.inflateSetDictionary(this.strm,R)),o===h.Z_BUF_ERROR&&M===!0&&(o=h.Z_OK,M=!1),o!==h.Z_STREAM_END&&o!==h.Z_OK)return this.onEnd(o),!(this.ended=!0);F.next_out&&(F.avail_out!==0&&o!==h.Z_STREAM_END&&(F.avail_in!==0||d!==h.Z_FINISH&&d!==h.Z_SYNC_FLUSH)||(this.options.to==="string"?(v=r.utf8border(F.output,F.next_out),S=F.next_out-v,x=r.buf2string(F.output,v),F.next_out=S,F.avail_out=N-S,S&&s.arraySet(F.output,F.output,v,S,0),this.onData(x)):this.onData(s.shrinkBuf(F.output,F.next_out)))),F.avail_in===0&&F.avail_out===0&&(M=!0)}while((0<F.avail_in||F.avail_out===0)&&o!==h.Z_STREAM_END);return o===h.Z_STREAM_END&&(d=h.Z_FINISH),d===h.Z_FINISH?(o=a.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===h.Z_OK):d!==h.Z_SYNC_FLUSH||(this.onEnd(h.Z_OK),!(F.avail_out=0))},i.prototype.onData=function(n){this.chunks.push(n)},i.prototype.onEnd=function(n){n===h.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg},p.Inflate=i,p.inflate=f,p.inflateRaw=function(n,u){return(u=u||{}).raw=!0,f(n,u)},p.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(g,T,p){"use strict";var a=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";p.assign=function(h){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var y=b.shift();if(y){if(typeof y!="object")throw new TypeError(y+"must be non-object");for(var m in y)y.hasOwnProperty(m)&&(h[m]=y[m])}}return h},p.shrinkBuf=function(h,b){return h.length===b?h:h.subarray?h.subarray(0,b):(h.length=b,h)};var s={arraySet:function(h,b,y,m,w){if(b.subarray&&h.subarray)h.set(b.subarray(y,y+m),w);else for(var i=0;i<m;i++)h[w+i]=b[y+i]},flattenChunks:function(h){var b,y,m,w,i,f;for(b=m=0,y=h.length;b<y;b++)m+=h[b].length;for(f=new Uint8Array(m),b=w=0,y=h.length;b<y;b++)i=h[b],f.set(i,w),w+=i.length;return f}},r={arraySet:function(h,b,y,m,w){for(var i=0;i<m;i++)h[w+i]=b[y+i]},flattenChunks:function(h){return[].concat.apply([],h)}};p.setTyped=function(h){h?(p.Buf8=Uint8Array,p.Buf16=Uint16Array,p.Buf32=Int32Array,p.assign(p,s)):(p.Buf8=Array,p.Buf16=Array,p.Buf32=Array,p.assign(p,r))},p.setTyped(a)},{}],42:[function(g,T,p){"use strict";var a=g("./common"),s=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(m){s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(m){r=!1}for(var h=new a.Buf8(256),b=0;b<256;b++)h[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;function y(m,w){if(w<65537&&(m.subarray&&r||!m.subarray&&s))return String.fromCharCode.apply(null,a.shrinkBuf(m,w));for(var i="",f=0;f<w;f++)i+=String.fromCharCode(m[f]);return i}h[254]=h[254]=1,p.string2buf=function(m){var w,i,f,n,u,o=m.length,d=0;for(n=0;n<o;n++)(64512&(i=m.charCodeAt(n)))==55296&&n+1<o&&(64512&(f=m.charCodeAt(n+1)))==56320&&(i=65536+(i-55296<<10)+(f-56320),n++),d+=i<128?1:i<2048?2:i<65536?3:4;for(w=new a.Buf8(d),n=u=0;u<d;n++)(64512&(i=m.charCodeAt(n)))==55296&&n+1<o&&(64512&(f=m.charCodeAt(n+1)))==56320&&(i=65536+(i-55296<<10)+(f-56320),n++),i<128?w[u++]=i:(i<2048?w[u++]=192|i>>>6:(i<65536?w[u++]=224|i>>>12:(w[u++]=240|i>>>18,w[u++]=128|i>>>12&63),w[u++]=128|i>>>6&63),w[u++]=128|63&i);return w},p.buf2binstring=function(m){return y(m,m.length)},p.binstring2buf=function(m){for(var w=new a.Buf8(m.length),i=0,f=w.length;i<f;i++)w[i]=m.charCodeAt(i);return w},p.buf2string=function(m,w){var i,f,n,u,o=w||m.length,d=new Array(2*o);for(i=f=0;i<o;)if((n=m[i++])<128)d[f++]=n;else if(4<(u=h[n]))d[f++]=65533,i+=u-1;else{for(n&=u===2?31:u===3?15:7;1<u&&i<o;)n=n<<6|63&m[i++],u--;1<u?d[f++]=65533:n<65536?d[f++]=n:(n-=65536,d[f++]=55296|n>>10&1023,d[f++]=56320|1023&n)}return y(d,f)},p.utf8border=function(m,w){var i;for((w=w||m.length)>m.length&&(w=m.length),i=w-1;0<=i&&(192&m[i])==128;)i--;return i<0||i===0?w:i+h[m[i]]>w?i:w}},{"./common":41}],43:[function(g,T,p){"use strict";T.exports=function(a,s,r,h){for(var b=65535&a|0,y=a>>>16&65535|0,m=0;r!==0;){for(r-=m=2e3<r?2e3:r;y=y+(b=b+s[h++]|0)|0,--m;);b%=65521,y%=65521}return b|y<<16|0}},{}],44:[function(g,T,p){"use strict";T.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(g,T,p){"use strict";var a=function(){for(var s,r=[],h=0;h<256;h++){s=h;for(var b=0;b<8;b++)s=1&s?3988292384^s>>>1:s>>>1;r[h]=s}return r}();T.exports=function(s,r,h,b){var y=a,m=b+h;s^=-1;for(var w=b;w<m;w++)s=s>>>8^y[255&(s^r[w])];return-1^s}},{}],46:[function(g,T,p){"use strict";var a,s=g("../utils/common"),r=g("./trees"),h=g("./adler32"),b=g("./crc32"),y=g("./messages"),m=0,w=4,i=0,f=-2,n=-1,u=4,o=2,d=8,v=9,S=286,x=30,R=19,F=2*S+1,N=15,I=3,M=258,X=M+I+1,_=42,O=113,e=1,D=2,q=3,L=4;function Q(t,B){return t.msg=y[B],B}function j(t){return(t<<1)-(4<t?9:0)}function V(t){for(var B=t.length;0<=--B;)t[B]=0}function z(t){var B=t.state,A=B.pending;A>t.avail_out&&(A=t.avail_out),A!==0&&(s.arraySet(t.output,B.pending_buf,B.pending_out,A,t.next_out),t.next_out+=A,B.pending_out+=A,t.total_out+=A,t.avail_out-=A,B.pending-=A,B.pending===0&&(B.pending_out=0))}function E(t,B){r._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,B),t.block_start=t.strstart,z(t.strm)}function Y(t,B){t.pending_buf[t.pending++]=B}function $(t,B){t.pending_buf[t.pending++]=B>>>8&255,t.pending_buf[t.pending++]=255&B}function H(t,B){var A,c,l=t.max_chain_length,k=t.strstart,P=t.prev_length,U=t.nice_match,C=t.strstart>t.w_size-X?t.strstart-(t.w_size-X):0,W=t.window,G=t.w_mask,Z=t.prev,K=t.strstart+M,nt=W[k+P-1],et=W[k+P];t.prev_length>=t.good_match&&(l>>=2),U>t.lookahead&&(U=t.lookahead);do if(W[(A=B)+P]===et&&W[A+P-1]===nt&&W[A]===W[k]&&W[++A]===W[k+1]){k+=2,A++;do;while(W[++k]===W[++A]&&W[++k]===W[++A]&&W[++k]===W[++A]&&W[++k]===W[++A]&&W[++k]===W[++A]&&W[++k]===W[++A]&&W[++k]===W[++A]&&W[++k]===W[++A]&&k<K);if(c=M-(K-k),k=K-M,P<c){if(t.match_start=B,U<=(P=c))break;nt=W[k+P-1],et=W[k+P]}}while((B=Z[B&G])>C&&--l!=0);return P<=t.lookahead?P:t.lookahead}function it(t){var B,A,c,l,k,P,U,C,W,G,Z=t.w_size;do{if(l=t.window_size-t.lookahead-t.strstart,t.strstart>=Z+(Z-X)){for(s.arraySet(t.window,t.window,Z,Z,0),t.match_start-=Z,t.strstart-=Z,t.block_start-=Z,B=A=t.hash_size;c=t.head[--B],t.head[B]=Z<=c?c-Z:0,--A;);for(B=A=Z;c=t.prev[--B],t.prev[B]=Z<=c?c-Z:0,--A;);l+=Z}if(t.strm.avail_in===0)break;if(P=t.strm,U=t.window,C=t.strstart+t.lookahead,W=l,G=void 0,G=P.avail_in,W<G&&(G=W),A=G===0?0:(P.avail_in-=G,s.arraySet(U,P.input,P.next_in,G,C),P.state.wrap===1?P.adler=h(P.adler,U,G,C):P.state.wrap===2&&(P.adler=b(P.adler,U,G,C)),P.next_in+=G,P.total_in+=G,G),t.lookahead+=A,t.lookahead+t.insert>=I)for(k=t.strstart-t.insert,t.ins_h=t.window[k],t.ins_h=(t.ins_h<<t.hash_shift^t.window[k+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[k+I-1])&t.hash_mask,t.prev[k&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=k,k++,t.insert--,!(t.lookahead+t.insert<I)););}while(t.lookahead<X&&t.strm.avail_in!==0)}function lt(t,B){for(var A,c;;){if(t.lookahead<X){if(it(t),t.lookahead<X&&B===m)return e;if(t.lookahead===0)break}if(A=0,t.lookahead>=I&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+I-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),A!==0&&t.strstart-A<=t.w_size-X&&(t.match_length=H(t,A)),t.match_length>=I)if(c=r._tr_tally(t,t.strstart-t.match_start,t.match_length-I),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=I){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+I-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,--t.match_length!=0;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else c=r._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(c&&(E(t,!1),t.strm.avail_out===0))return e}return t.insert=t.strstart<I-1?t.strstart:I-1,B===w?(E(t,!0),t.strm.avail_out===0?q:L):t.last_lit&&(E(t,!1),t.strm.avail_out===0)?e:D}function tt(t,B){for(var A,c,l;;){if(t.lookahead<X){if(it(t),t.lookahead<X&&B===m)return e;if(t.lookahead===0)break}if(A=0,t.lookahead>=I&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+I-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=I-1,A!==0&&t.prev_length<t.max_lazy_match&&t.strstart-A<=t.w_size-X&&(t.match_length=H(t,A),t.match_length<=5&&(t.strategy===1||t.match_length===I&&4096<t.strstart-t.match_start)&&(t.match_length=I-1)),t.prev_length>=I&&t.match_length<=t.prev_length){for(l=t.strstart+t.lookahead-I,c=r._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-I),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=l&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+I-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),--t.prev_length!=0;);if(t.match_available=0,t.match_length=I-1,t.strstart++,c&&(E(t,!1),t.strm.avail_out===0))return e}else if(t.match_available){if((c=r._tr_tally(t,0,t.window[t.strstart-1]))&&E(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return e}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(c=r._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<I-1?t.strstart:I-1,B===w?(E(t,!0),t.strm.avail_out===0?q:L):t.last_lit&&(E(t,!1),t.strm.avail_out===0)?e:D}function rt(t,B,A,c,l){this.good_length=t,this.max_lazy=B,this.nice_length=A,this.max_chain=c,this.func=l}function ot(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=d,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new s.Buf16(2*F),this.dyn_dtree=new s.Buf16(2*(2*x+1)),this.bl_tree=new s.Buf16(2*(2*R+1)),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new s.Buf16(N+1),this.heap=new s.Buf16(2*S+1),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(2*S+1),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function st(t){var B;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=o,(B=t.state).pending=0,B.pending_out=0,B.wrap<0&&(B.wrap=-B.wrap),B.status=B.wrap?_:O,t.adler=B.wrap===2?0:1,B.last_flush=m,r._tr_init(B),i):Q(t,f)}function ct(t){var B=st(t);return B===i&&function(A){A.window_size=2*A.w_size,V(A.head),A.max_lazy_match=a[A.level].max_lazy,A.good_match=a[A.level].good_length,A.nice_match=a[A.level].nice_length,A.max_chain_length=a[A.level].max_chain,A.strstart=0,A.block_start=0,A.lookahead=0,A.insert=0,A.match_length=A.prev_length=I-1,A.match_available=0,A.ins_h=0}(t.state),B}function ut(t,B,A,c,l,k){if(!t)return f;var P=1;if(B===n&&(B=6),c<0?(P=0,c=-c):15<c&&(P=2,c-=16),l<1||v<l||A!==d||c<8||15<c||B<0||9<B||k<0||u<k)return Q(t,f);c===8&&(c=9);var U=new ot;return(t.state=U).strm=t,U.wrap=P,U.gzhead=null,U.w_bits=c,U.w_size=1<<U.w_bits,U.w_mask=U.w_size-1,U.hash_bits=l+7,U.hash_size=1<<U.hash_bits,U.hash_mask=U.hash_size-1,U.hash_shift=~~((U.hash_bits+I-1)/I),U.window=new s.Buf8(2*U.w_size),U.head=new s.Buf16(U.hash_size),U.prev=new s.Buf16(U.w_size),U.lit_bufsize=1<<l+6,U.pending_buf_size=4*U.lit_bufsize,U.pending_buf=new s.Buf8(U.pending_buf_size),U.d_buf=1*U.lit_bufsize,U.l_buf=3*U.lit_bufsize,U.level=B,U.strategy=k,U.method=A,ct(t)}a=[new rt(0,0,0,0,function(t,B){var A=65535;for(A>t.pending_buf_size-5&&(A=t.pending_buf_size-5);;){if(t.lookahead<=1){if(it(t),t.lookahead===0&&B===m)return e;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var c=t.block_start+A;if((t.strstart===0||t.strstart>=c)&&(t.lookahead=t.strstart-c,t.strstart=c,E(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-X&&(E(t,!1),t.strm.avail_out===0))return e}return t.insert=0,B===w?(E(t,!0),t.strm.avail_out===0?q:L):(t.strstart>t.block_start&&(E(t,!1),t.strm.avail_out),e)}),new rt(4,4,8,4,lt),new rt(4,5,16,8,lt),new rt(4,6,32,32,lt),new rt(4,4,16,16,tt),new rt(8,16,32,32,tt),new rt(8,16,128,128,tt),new rt(8,32,128,256,tt),new rt(32,128,258,1024,tt),new rt(32,258,258,4096,tt)],p.deflateInit=function(t,B){return ut(t,B,d,15,8,0)},p.deflateInit2=ut,p.deflateReset=ct,p.deflateResetKeep=st,p.deflateSetHeader=function(t,B){return t&&t.state?t.state.wrap!==2?f:(t.state.gzhead=B,i):f},p.deflate=function(t,B){var A,c,l,k;if(!t||!t.state||5<B||B<0)return t?Q(t,f):f;if(c=t.state,!t.output||!t.input&&t.avail_in!==0||c.status===666&&B!==w)return Q(t,t.avail_out===0?-5:f);if(c.strm=t,A=c.last_flush,c.last_flush=B,c.status===_)if(c.wrap===2)t.adler=0,Y(c,31),Y(c,139),Y(c,8),c.gzhead?(Y(c,(c.gzhead.text?1:0)+(c.gzhead.hcrc?2:0)+(c.gzhead.extra?4:0)+(c.gzhead.name?8:0)+(c.gzhead.comment?16:0)),Y(c,255&c.gzhead.time),Y(c,c.gzhead.time>>8&255),Y(c,c.gzhead.time>>16&255),Y(c,c.gzhead.time>>24&255),Y(c,c.level===9?2:2<=c.strategy||c.level<2?4:0),Y(c,255&c.gzhead.os),c.gzhead.extra&&c.gzhead.extra.length&&(Y(c,255&c.gzhead.extra.length),Y(c,c.gzhead.extra.length>>8&255)),c.gzhead.hcrc&&(t.adler=b(t.adler,c.pending_buf,c.pending,0)),c.gzindex=0,c.status=69):(Y(c,0),Y(c,0),Y(c,0),Y(c,0),Y(c,0),Y(c,c.level===9?2:2<=c.strategy||c.level<2?4:0),Y(c,3),c.status=O);else{var P=d+(c.w_bits-8<<4)<<8;P|=(2<=c.strategy||c.level<2?0:c.level<6?1:c.level===6?2:3)<<6,c.strstart!==0&&(P|=32),P+=31-P%31,c.status=O,$(c,P),c.strstart!==0&&($(c,t.adler>>>16),$(c,65535&t.adler)),t.adler=1}if(c.status===69)if(c.gzhead.extra){for(l=c.pending;c.gzindex<(65535&c.gzhead.extra.length)&&(c.pending!==c.pending_buf_size||(c.gzhead.hcrc&&c.pending>l&&(t.adler=b(t.adler,c.pending_buf,c.pending-l,l)),z(t),l=c.pending,c.pending!==c.pending_buf_size));)Y(c,255&c.gzhead.extra[c.gzindex]),c.gzindex++;c.gzhead.hcrc&&c.pending>l&&(t.adler=b(t.adler,c.pending_buf,c.pending-l,l)),c.gzindex===c.gzhead.extra.length&&(c.gzindex=0,c.status=73)}else c.status=73;if(c.status===73)if(c.gzhead.name){l=c.pending;do{if(c.pending===c.pending_buf_size&&(c.gzhead.hcrc&&c.pending>l&&(t.adler=b(t.adler,c.pending_buf,c.pending-l,l)),z(t),l=c.pending,c.pending===c.pending_buf_size)){k=1;break}k=c.gzindex<c.gzhead.name.length?255&c.gzhead.name.charCodeAt(c.gzindex++):0,Y(c,k)}while(k!==0);c.gzhead.hcrc&&c.pending>l&&(t.adler=b(t.adler,c.pending_buf,c.pending-l,l)),k===0&&(c.gzindex=0,c.status=91)}else c.status=91;if(c.status===91)if(c.gzhead.comment){l=c.pending;do{if(c.pending===c.pending_buf_size&&(c.gzhead.hcrc&&c.pending>l&&(t.adler=b(t.adler,c.pending_buf,c.pending-l,l)),z(t),l=c.pending,c.pending===c.pending_buf_size)){k=1;break}k=c.gzindex<c.gzhead.comment.length?255&c.gzhead.comment.charCodeAt(c.gzindex++):0,Y(c,k)}while(k!==0);c.gzhead.hcrc&&c.pending>l&&(t.adler=b(t.adler,c.pending_buf,c.pending-l,l)),k===0&&(c.status=103)}else c.status=103;if(c.status===103&&(c.gzhead.hcrc?(c.pending+2>c.pending_buf_size&&z(t),c.pending+2<=c.pending_buf_size&&(Y(c,255&t.adler),Y(c,t.adler>>8&255),t.adler=0,c.status=O)):c.status=O),c.pending!==0){if(z(t),t.avail_out===0)return c.last_flush=-1,i}else if(t.avail_in===0&&j(B)<=j(A)&&B!==w)return Q(t,-5);if(c.status===666&&t.avail_in!==0)return Q(t,-5);if(t.avail_in!==0||c.lookahead!==0||B!==m&&c.status!==666){var U=c.strategy===2?function(C,W){for(var G;;){if(C.lookahead===0&&(it(C),C.lookahead===0)){if(W===m)return e;break}if(C.match_length=0,G=r._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++,G&&(E(C,!1),C.strm.avail_out===0))return e}return C.insert=0,W===w?(E(C,!0),C.strm.avail_out===0?q:L):C.last_lit&&(E(C,!1),C.strm.avail_out===0)?e:D}(c,B):c.strategy===3?function(C,W){for(var G,Z,K,nt,et=C.window;;){if(C.lookahead<=M){if(it(C),C.lookahead<=M&&W===m)return e;if(C.lookahead===0)break}if(C.match_length=0,C.lookahead>=I&&0<C.strstart&&(Z=et[K=C.strstart-1])===et[++K]&&Z===et[++K]&&Z===et[++K]){nt=C.strstart+M;do;while(Z===et[++K]&&Z===et[++K]&&Z===et[++K]&&Z===et[++K]&&Z===et[++K]&&Z===et[++K]&&Z===et[++K]&&Z===et[++K]&&K<nt);C.match_length=M-(nt-K),C.match_length>C.lookahead&&(C.match_length=C.lookahead)}if(C.match_length>=I?(G=r._tr_tally(C,1,C.match_length-I),C.lookahead-=C.match_length,C.strstart+=C.match_length,C.match_length=0):(G=r._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++),G&&(E(C,!1),C.strm.avail_out===0))return e}return C.insert=0,W===w?(E(C,!0),C.strm.avail_out===0?q:L):C.last_lit&&(E(C,!1),C.strm.avail_out===0)?e:D}(c,B):a[c.level].func(c,B);if(U!==q&&U!==L||(c.status=666),U===e||U===q)return t.avail_out===0&&(c.last_flush=-1),i;if(U===D&&(B===1?r._tr_align(c):B!==5&&(r._tr_stored_block(c,0,0,!1),B===3&&(V(c.head),c.lookahead===0&&(c.strstart=0,c.block_start=0,c.insert=0))),z(t),t.avail_out===0))return c.last_flush=-1,i}return B!==w?i:c.wrap<=0?1:(c.wrap===2?(Y(c,255&t.adler),Y(c,t.adler>>8&255),Y(c,t.adler>>16&255),Y(c,t.adler>>24&255),Y(c,255&t.total_in),Y(c,t.total_in>>8&255),Y(c,t.total_in>>16&255),Y(c,t.total_in>>24&255)):($(c,t.adler>>>16),$(c,65535&t.adler)),z(t),0<c.wrap&&(c.wrap=-c.wrap),c.pending!==0?i:1)},p.deflateEnd=function(t){var B;return t&&t.state?(B=t.state.status)!==_&&B!==69&&B!==73&&B!==91&&B!==103&&B!==O&&B!==666?Q(t,f):(t.state=null,B===O?Q(t,-3):i):f},p.deflateSetDictionary=function(t,B){var A,c,l,k,P,U,C,W,G=B.length;if(!t||!t.state||(k=(A=t.state).wrap)===2||k===1&&A.status!==_||A.lookahead)return f;for(k===1&&(t.adler=h(t.adler,B,G,0)),A.wrap=0,G>=A.w_size&&(k===0&&(V(A.head),A.strstart=0,A.block_start=0,A.insert=0),W=new s.Buf8(A.w_size),s.arraySet(W,B,G-A.w_size,A.w_size,0),B=W,G=A.w_size),P=t.avail_in,U=t.next_in,C=t.input,t.avail_in=G,t.next_in=0,t.input=B,it(A);A.lookahead>=I;){for(c=A.strstart,l=A.lookahead-(I-1);A.ins_h=(A.ins_h<<A.hash_shift^A.window[c+I-1])&A.hash_mask,A.prev[c&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=c,c++,--l;);A.strstart=c,A.lookahead=I-1,it(A)}return A.strstart+=A.lookahead,A.block_start=A.strstart,A.insert=A.lookahead,A.lookahead=0,A.match_length=A.prev_length=I-1,A.match_available=0,t.next_in=U,t.input=C,t.avail_in=P,A.wrap=k,i},p.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(g,T,p){"use strict";T.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(g,T,p){"use strict";T.exports=function(a,s){var r,h,b,y,m,w,i,f,n,u,o,d,v,S,x,R,F,N,I,M,X,_,O,e,D;r=a.state,h=a.next_in,e=a.input,b=h+(a.avail_in-5),y=a.next_out,D=a.output,m=y-(s-a.avail_out),w=y+(a.avail_out-257),i=r.dmax,f=r.wsize,n=r.whave,u=r.wnext,o=r.window,d=r.hold,v=r.bits,S=r.lencode,x=r.distcode,R=(1<<r.lenbits)-1,F=(1<<r.distbits)-1;t:do{v<15&&(d+=e[h++]<<v,v+=8,d+=e[h++]<<v,v+=8),N=S[d&R];e:for(;;){if(d>>>=I=N>>>24,v-=I,(I=N>>>16&255)===0)D[y++]=65535&N;else{if(!(16&I)){if(!(64&I)){N=S[(65535&N)+(d&(1<<I)-1)];continue e}if(32&I){r.mode=12;break t}a.msg="invalid literal/length code",r.mode=30;break t}M=65535&N,(I&=15)&&(v<I&&(d+=e[h++]<<v,v+=8),M+=d&(1<<I)-1,d>>>=I,v-=I),v<15&&(d+=e[h++]<<v,v+=8,d+=e[h++]<<v,v+=8),N=x[d&F];r:for(;;){if(d>>>=I=N>>>24,v-=I,!(16&(I=N>>>16&255))){if(!(64&I)){N=x[(65535&N)+(d&(1<<I)-1)];continue r}a.msg="invalid distance code",r.mode=30;break t}if(X=65535&N,v<(I&=15)&&(d+=e[h++]<<v,(v+=8)<I&&(d+=e[h++]<<v,v+=8)),i<(X+=d&(1<<I)-1)){a.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=I,v-=I,(I=y-m)<X){if(n<(I=X-I)&&r.sane){a.msg="invalid distance too far back",r.mode=30;break t}if(O=o,(_=0)===u){if(_+=f-I,I<M){for(M-=I;D[y++]=o[_++],--I;);_=y-X,O=D}}else if(u<I){if(_+=f+u-I,(I-=u)<M){for(M-=I;D[y++]=o[_++],--I;);if(_=0,u<M){for(M-=I=u;D[y++]=o[_++],--I;);_=y-X,O=D}}}else if(_+=u-I,I<M){for(M-=I;D[y++]=o[_++],--I;);_=y-X,O=D}for(;2<M;)D[y++]=O[_++],D[y++]=O[_++],D[y++]=O[_++],M-=3;M&&(D[y++]=O[_++],1<M&&(D[y++]=O[_++]))}else{for(_=y-X;D[y++]=D[_++],D[y++]=D[_++],D[y++]=D[_++],2<(M-=3););M&&(D[y++]=D[_++],1<M&&(D[y++]=D[_++]))}break}}break}}while(h<b&&y<w);h-=M=v>>3,d&=(1<<(v-=M<<3))-1,a.next_in=h,a.next_out=y,a.avail_in=h<b?b-h+5:5-(h-b),a.avail_out=y<w?w-y+257:257-(y-w),r.hold=d,r.bits=v}},{}],49:[function(g,T,p){"use strict";var a=g("../utils/common"),s=g("./adler32"),r=g("./crc32"),h=g("./inffast"),b=g("./inftrees"),y=1,m=2,w=0,i=-2,f=1,n=852,u=592;function o(_){return(_>>>24&255)+(_>>>8&65280)+((65280&_)<<8)+((255&_)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(_){var O;return _&&_.state?(O=_.state,_.total_in=_.total_out=O.total=0,_.msg="",O.wrap&&(_.adler=1&O.wrap),O.mode=f,O.last=0,O.havedict=0,O.dmax=32768,O.head=null,O.hold=0,O.bits=0,O.lencode=O.lendyn=new a.Buf32(n),O.distcode=O.distdyn=new a.Buf32(u),O.sane=1,O.back=-1,w):i}function S(_){var O;return _&&_.state?((O=_.state).wsize=0,O.whave=0,O.wnext=0,v(_)):i}function x(_,O){var e,D;return _&&_.state?(D=_.state,O<0?(e=0,O=-O):(e=1+(O>>4),O<48&&(O&=15)),O&&(O<8||15<O)?i:(D.window!==null&&D.wbits!==O&&(D.window=null),D.wrap=e,D.wbits=O,S(_))):i}function R(_,O){var e,D;return _?(D=new d,(_.state=D).window=null,(e=x(_,O))!==w&&(_.state=null),e):i}var F,N,I=!0;function M(_){if(I){var O;for(F=new a.Buf32(512),N=new a.Buf32(32),O=0;O<144;)_.lens[O++]=8;for(;O<256;)_.lens[O++]=9;for(;O<280;)_.lens[O++]=7;for(;O<288;)_.lens[O++]=8;for(b(y,_.lens,0,288,F,0,_.work,{bits:9}),O=0;O<32;)_.lens[O++]=5;b(m,_.lens,0,32,N,0,_.work,{bits:5}),I=!1}_.lencode=F,_.lenbits=9,_.distcode=N,_.distbits=5}function X(_,O,e,D){var q,L=_.state;return L.window===null&&(L.wsize=1<<L.wbits,L.wnext=0,L.whave=0,L.window=new a.Buf8(L.wsize)),D>=L.wsize?(a.arraySet(L.window,O,e-L.wsize,L.wsize,0),L.wnext=0,L.whave=L.wsize):(D<(q=L.wsize-L.wnext)&&(q=D),a.arraySet(L.window,O,e-D,q,L.wnext),(D-=q)?(a.arraySet(L.window,O,e-D,D,0),L.wnext=D,L.whave=L.wsize):(L.wnext+=q,L.wnext===L.wsize&&(L.wnext=0),L.whave<L.wsize&&(L.whave+=q))),0}p.inflateReset=S,p.inflateReset2=x,p.inflateResetKeep=v,p.inflateInit=function(_){return R(_,15)},p.inflateInit2=R,p.inflate=function(_,O){var e,D,q,L,Q,j,V,z,E,Y,$,H,it,lt,tt,rt,ot,st,ct,ut,t,B,A,c,l=0,k=new a.Buf8(4),P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!_||!_.state||!_.output||!_.input&&_.avail_in!==0)return i;(e=_.state).mode===12&&(e.mode=13),Q=_.next_out,q=_.output,V=_.avail_out,L=_.next_in,D=_.input,j=_.avail_in,z=e.hold,E=e.bits,Y=j,$=V,B=w;t:for(;;)switch(e.mode){case f:if(e.wrap===0){e.mode=13;break}for(;E<16;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}if(2&e.wrap&&z===35615){k[e.check=0]=255&z,k[1]=z>>>8&255,e.check=r(e.check,k,2,0),E=z=0,e.mode=2;break}if(e.flags=0,e.head&&(e.head.done=!1),!(1&e.wrap)||(((255&z)<<8)+(z>>8))%31){_.msg="incorrect header check",e.mode=30;break}if((15&z)!=8){_.msg="unknown compression method",e.mode=30;break}if(E-=4,t=8+(15&(z>>>=4)),e.wbits===0)e.wbits=t;else if(t>e.wbits){_.msg="invalid window size",e.mode=30;break}e.dmax=1<<t,_.adler=e.check=1,e.mode=512&z?10:12,E=z=0;break;case 2:for(;E<16;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}if(e.flags=z,(255&e.flags)!=8){_.msg="unknown compression method",e.mode=30;break}if(57344&e.flags){_.msg="unknown header flags set",e.mode=30;break}e.head&&(e.head.text=z>>8&1),512&e.flags&&(k[0]=255&z,k[1]=z>>>8&255,e.check=r(e.check,k,2,0)),E=z=0,e.mode=3;case 3:for(;E<32;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}e.head&&(e.head.time=z),512&e.flags&&(k[0]=255&z,k[1]=z>>>8&255,k[2]=z>>>16&255,k[3]=z>>>24&255,e.check=r(e.check,k,4,0)),E=z=0,e.mode=4;case 4:for(;E<16;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}e.head&&(e.head.xflags=255&z,e.head.os=z>>8),512&e.flags&&(k[0]=255&z,k[1]=z>>>8&255,e.check=r(e.check,k,2,0)),E=z=0,e.mode=5;case 5:if(1024&e.flags){for(;E<16;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}e.length=z,e.head&&(e.head.extra_len=z),512&e.flags&&(k[0]=255&z,k[1]=z>>>8&255,e.check=r(e.check,k,2,0)),E=z=0}else e.head&&(e.head.extra=null);e.mode=6;case 6:if(1024&e.flags&&(j<(H=e.length)&&(H=j),H&&(e.head&&(t=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Array(e.head.extra_len)),a.arraySet(e.head.extra,D,L,H,t)),512&e.flags&&(e.check=r(e.check,D,H,L)),j-=H,L+=H,e.length-=H),e.length))break t;e.length=0,e.mode=7;case 7:if(2048&e.flags){if(j===0)break t;for(H=0;t=D[L+H++],e.head&&t&&e.length<65536&&(e.head.name+=String.fromCharCode(t)),t&&H<j;);if(512&e.flags&&(e.check=r(e.check,D,H,L)),j-=H,L+=H,t)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=8;case 8:if(4096&e.flags){if(j===0)break t;for(H=0;t=D[L+H++],e.head&&t&&e.length<65536&&(e.head.comment+=String.fromCharCode(t)),t&&H<j;);if(512&e.flags&&(e.check=r(e.check,D,H,L)),j-=H,L+=H,t)break t}else e.head&&(e.head.comment=null);e.mode=9;case 9:if(512&e.flags){for(;E<16;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}if(z!==(65535&e.check)){_.msg="header crc mismatch",e.mode=30;break}E=z=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),_.adler=e.check=0,e.mode=12;break;case 10:for(;E<32;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}_.adler=e.check=o(z),E=z=0,e.mode=11;case 11:if(e.havedict===0)return _.next_out=Q,_.avail_out=V,_.next_in=L,_.avail_in=j,e.hold=z,e.bits=E,2;_.adler=e.check=1,e.mode=12;case 12:if(O===5||O===6)break t;case 13:if(e.last){z>>>=7&E,E-=7&E,e.mode=27;break}for(;E<3;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}switch(e.last=1&z,E-=1,3&(z>>>=1)){case 0:e.mode=14;break;case 1:if(M(e),e.mode=20,O!==6)break;z>>>=2,E-=2;break t;case 2:e.mode=17;break;case 3:_.msg="invalid block type",e.mode=30}z>>>=2,E-=2;break;case 14:for(z>>>=7&E,E-=7&E;E<32;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}if((65535&z)!=(z>>>16^65535)){_.msg="invalid stored block lengths",e.mode=30;break}if(e.length=65535&z,E=z=0,e.mode=15,O===6)break t;case 15:e.mode=16;case 16:if(H=e.length){if(j<H&&(H=j),V<H&&(H=V),H===0)break t;a.arraySet(q,D,L,H,Q),j-=H,L+=H,V-=H,Q+=H,e.length-=H;break}e.mode=12;break;case 17:for(;E<14;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}if(e.nlen=257+(31&z),z>>>=5,E-=5,e.ndist=1+(31&z),z>>>=5,E-=5,e.ncode=4+(15&z),z>>>=4,E-=4,286<e.nlen||30<e.ndist){_.msg="too many length or distance symbols",e.mode=30;break}e.have=0,e.mode=18;case 18:for(;e.have<e.ncode;){for(;E<3;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}e.lens[P[e.have++]]=7&z,z>>>=3,E-=3}for(;e.have<19;)e.lens[P[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,A={bits:e.lenbits},B=b(0,e.lens,0,19,e.lencode,0,e.work,A),e.lenbits=A.bits,B){_.msg="invalid code lengths set",e.mode=30;break}e.have=0,e.mode=19;case 19:for(;e.have<e.nlen+e.ndist;){for(;rt=(l=e.lencode[z&(1<<e.lenbits)-1])>>>16&255,ot=65535&l,!((tt=l>>>24)<=E);){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}if(ot<16)z>>>=tt,E-=tt,e.lens[e.have++]=ot;else{if(ot===16){for(c=tt+2;E<c;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}if(z>>>=tt,E-=tt,e.have===0){_.msg="invalid bit length repeat",e.mode=30;break}t=e.lens[e.have-1],H=3+(3&z),z>>>=2,E-=2}else if(ot===17){for(c=tt+3;E<c;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}E-=tt,t=0,H=3+(7&(z>>>=tt)),z>>>=3,E-=3}else{for(c=tt+7;E<c;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}E-=tt,t=0,H=11+(127&(z>>>=tt)),z>>>=7,E-=7}if(e.have+H>e.nlen+e.ndist){_.msg="invalid bit length repeat",e.mode=30;break}for(;H--;)e.lens[e.have++]=t}}if(e.mode===30)break;if(e.lens[256]===0){_.msg="invalid code -- missing end-of-block",e.mode=30;break}if(e.lenbits=9,A={bits:e.lenbits},B=b(y,e.lens,0,e.nlen,e.lencode,0,e.work,A),e.lenbits=A.bits,B){_.msg="invalid literal/lengths set",e.mode=30;break}if(e.distbits=6,e.distcode=e.distdyn,A={bits:e.distbits},B=b(m,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,A),e.distbits=A.bits,B){_.msg="invalid distances set",e.mode=30;break}if(e.mode=20,O===6)break t;case 20:e.mode=21;case 21:if(6<=j&&258<=V){_.next_out=Q,_.avail_out=V,_.next_in=L,_.avail_in=j,e.hold=z,e.bits=E,h(_,$),Q=_.next_out,q=_.output,V=_.avail_out,L=_.next_in,D=_.input,j=_.avail_in,z=e.hold,E=e.bits,e.mode===12&&(e.back=-1);break}for(e.back=0;rt=(l=e.lencode[z&(1<<e.lenbits)-1])>>>16&255,ot=65535&l,!((tt=l>>>24)<=E);){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}if(rt&&!(240&rt)){for(st=tt,ct=rt,ut=ot;rt=(l=e.lencode[ut+((z&(1<<st+ct)-1)>>st)])>>>16&255,ot=65535&l,!(st+(tt=l>>>24)<=E);){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}z>>>=st,E-=st,e.back+=st}if(z>>>=tt,E-=tt,e.back+=tt,e.length=ot,rt===0){e.mode=26;break}if(32&rt){e.back=-1,e.mode=12;break}if(64&rt){_.msg="invalid literal/length code",e.mode=30;break}e.extra=15&rt,e.mode=22;case 22:if(e.extra){for(c=e.extra;E<c;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}e.length+=z&(1<<e.extra)-1,z>>>=e.extra,E-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=23;case 23:for(;rt=(l=e.distcode[z&(1<<e.distbits)-1])>>>16&255,ot=65535&l,!((tt=l>>>24)<=E);){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}if(!(240&rt)){for(st=tt,ct=rt,ut=ot;rt=(l=e.distcode[ut+((z&(1<<st+ct)-1)>>st)])>>>16&255,ot=65535&l,!(st+(tt=l>>>24)<=E);){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}z>>>=st,E-=st,e.back+=st}if(z>>>=tt,E-=tt,e.back+=tt,64&rt){_.msg="invalid distance code",e.mode=30;break}e.offset=ot,e.extra=15&rt,e.mode=24;case 24:if(e.extra){for(c=e.extra;E<c;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}e.offset+=z&(1<<e.extra)-1,z>>>=e.extra,E-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){_.msg="invalid distance too far back",e.mode=30;break}e.mode=25;case 25:if(V===0)break t;if(H=$-V,e.offset>H){if((H=e.offset-H)>e.whave&&e.sane){_.msg="invalid distance too far back",e.mode=30;break}it=H>e.wnext?(H-=e.wnext,e.wsize-H):e.wnext-H,H>e.length&&(H=e.length),lt=e.window}else lt=q,it=Q-e.offset,H=e.length;for(V<H&&(H=V),V-=H,e.length-=H;q[Q++]=lt[it++],--H;);e.length===0&&(e.mode=21);break;case 26:if(V===0)break t;q[Q++]=e.length,V--,e.mode=21;break;case 27:if(e.wrap){for(;E<32;){if(j===0)break t;j--,z|=D[L++]<<E,E+=8}if($-=V,_.total_out+=$,e.total+=$,$&&(_.adler=e.check=e.flags?r(e.check,q,$,Q-$):s(e.check,q,$,Q-$)),$=V,(e.flags?z:o(z))!==e.check){_.msg="incorrect data check",e.mode=30;break}E=z=0}e.mode=28;case 28:if(e.wrap&&e.flags){for(;E<32;){if(j===0)break t;j--,z+=D[L++]<<E,E+=8}if(z!==(4294967295&e.total)){_.msg="incorrect length check",e.mode=30;break}E=z=0}e.mode=29;case 29:B=1;break t;case 30:B=-3;break t;case 31:return-4;case 32:default:return i}return _.next_out=Q,_.avail_out=V,_.next_in=L,_.avail_in=j,e.hold=z,e.bits=E,(e.wsize||$!==_.avail_out&&e.mode<30&&(e.mode<27||O!==4))&&X(_,_.output,_.next_out,$-_.avail_out)?(e.mode=31,-4):(Y-=_.avail_in,$-=_.avail_out,_.total_in+=Y,_.total_out+=$,e.total+=$,e.wrap&&$&&(_.adler=e.check=e.flags?r(e.check,q,$,_.next_out-$):s(e.check,q,$,_.next_out-$)),_.data_type=e.bits+(e.last?64:0)+(e.mode===12?128:0)+(e.mode===20||e.mode===15?256:0),(Y==0&&$===0||O===4)&&B===w&&(B=-5),B)},p.inflateEnd=function(_){if(!_||!_.state)return i;var O=_.state;return O.window&&(O.window=null),_.state=null,w},p.inflateGetHeader=function(_,O){var e;return _&&_.state&&2&(e=_.state).wrap?((e.head=O).done=!1,w):i},p.inflateSetDictionary=function(_,O){var e,D=O.length;return _&&_.state?(e=_.state).wrap!==0&&e.mode!==11?i:e.mode===11&&s(1,O,D,0)!==e.check?-3:X(_,O,D,D)?(e.mode=31,-4):(e.havedict=1,w):i},p.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(g,T,p){"use strict";var a=g("../utils/common"),s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],r=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],b=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];T.exports=function(y,m,w,i,f,n,u,o){var d,v,S,x,R,F,N,I,M,X=o.bits,_=0,O=0,e=0,D=0,q=0,L=0,Q=0,j=0,V=0,z=0,E=null,Y=0,$=new a.Buf16(16),H=new a.Buf16(16),it=null,lt=0;for(_=0;_<=15;_++)$[_]=0;for(O=0;O<i;O++)$[m[w+O]]++;for(q=X,D=15;1<=D&&$[D]===0;D--);if(D<q&&(q=D),D===0)return f[n++]=20971520,f[n++]=20971520,o.bits=1,0;for(e=1;e<D&&$[e]===0;e++);for(q<e&&(q=e),_=j=1;_<=15;_++)if(j<<=1,(j-=$[_])<0)return-1;if(0<j&&(y===0||D!==1))return-1;for(H[1]=0,_=1;_<15;_++)H[_+1]=H[_]+$[_];for(O=0;O<i;O++)m[w+O]!==0&&(u[H[m[w+O]]++]=O);if(F=y===0?(E=it=u,19):y===1?(E=s,Y-=257,it=r,lt-=257,256):(E=h,it=b,-1),_=e,R=n,Q=O=z=0,S=-1,x=(V=1<<(L=q))-1,y===1&&852<V||y===2&&592<V)return 1;for(;;){for(N=_-Q,M=u[O]<F?(I=0,u[O]):u[O]>F?(I=it[lt+u[O]],E[Y+u[O]]):(I=96,0),d=1<<_-Q,e=v=1<<L;f[R+(z>>Q)+(v-=d)]=N<<24|I<<16|M|0,v!==0;);for(d=1<<_-1;z&d;)d>>=1;if(d!==0?(z&=d-1,z+=d):z=0,O++,--$[_]==0){if(_===D)break;_=m[w+u[O]]}if(q<_&&(z&x)!==S){for(Q===0&&(Q=q),R+=e,j=1<<(L=_-Q);L+Q<D&&!((j-=$[L+Q])<=0);)L++,j<<=1;if(V+=1<<L,y===1&&852<V||y===2&&592<V)return 1;f[S=z&x]=q<<24|L<<16|R-n|0}}return z!==0&&(f[R+z]=_-Q<<24|64<<16|0),o.bits=q,0}},{"../utils/common":41}],51:[function(g,T,p){"use strict";T.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(g,T,p){"use strict";var a=g("../utils/common"),s=0,r=1;function h(l){for(var k=l.length;0<=--k;)l[k]=0}var b=0,y=29,m=256,w=m+1+y,i=30,f=19,n=2*w+1,u=15,o=16,d=7,v=256,S=16,x=17,R=18,F=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],N=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],X=new Array(2*(w+2));h(X);var _=new Array(2*i);h(_);var O=new Array(512);h(O);var e=new Array(256);h(e);var D=new Array(y);h(D);var q,L,Q,j=new Array(i);function V(l,k,P,U,C){this.static_tree=l,this.extra_bits=k,this.extra_base=P,this.elems=U,this.max_length=C,this.has_stree=l&&l.length}function z(l,k){this.dyn_tree=l,this.max_code=0,this.stat_desc=k}function E(l){return l<256?O[l]:O[256+(l>>>7)]}function Y(l,k){l.pending_buf[l.pending++]=255&k,l.pending_buf[l.pending++]=k>>>8&255}function $(l,k,P){l.bi_valid>o-P?(l.bi_buf|=k<<l.bi_valid&65535,Y(l,l.bi_buf),l.bi_buf=k>>o-l.bi_valid,l.bi_valid+=P-o):(l.bi_buf|=k<<l.bi_valid&65535,l.bi_valid+=P)}function H(l,k,P){$(l,P[2*k],P[2*k+1])}function it(l,k){for(var P=0;P|=1&l,l>>>=1,P<<=1,0<--k;);return P>>>1}function lt(l,k,P){var U,C,W=new Array(u+1),G=0;for(U=1;U<=u;U++)W[U]=G=G+P[U-1]<<1;for(C=0;C<=k;C++){var Z=l[2*C+1];Z!==0&&(l[2*C]=it(W[Z]++,Z))}}function tt(l){var k;for(k=0;k<w;k++)l.dyn_ltree[2*k]=0;for(k=0;k<i;k++)l.dyn_dtree[2*k]=0;for(k=0;k<f;k++)l.bl_tree[2*k]=0;l.dyn_ltree[2*v]=1,l.opt_len=l.static_len=0,l.last_lit=l.matches=0}function rt(l){8<l.bi_valid?Y(l,l.bi_buf):0<l.bi_valid&&(l.pending_buf[l.pending++]=l.bi_buf),l.bi_buf=0,l.bi_valid=0}function ot(l,k,P,U){var C=2*k,W=2*P;return l[C]<l[W]||l[C]===l[W]&&U[k]<=U[P]}function st(l,k,P){for(var U=l.heap[P],C=P<<1;C<=l.heap_len&&(C<l.heap_len&&ot(k,l.heap[C+1],l.heap[C],l.depth)&&C++,!ot(k,U,l.heap[C],l.depth));)l.heap[P]=l.heap[C],P=C,C<<=1;l.heap[P]=U}function ct(l,k,P){var U,C,W,G,Z=0;if(l.last_lit!==0)for(;U=l.pending_buf[l.d_buf+2*Z]<<8|l.pending_buf[l.d_buf+2*Z+1],C=l.pending_buf[l.l_buf+Z],Z++,U===0?H(l,C,k):(H(l,(W=e[C])+m+1,k),(G=F[W])!==0&&$(l,C-=D[W],G),H(l,W=E(--U),P),(G=N[W])!==0&&$(l,U-=j[W],G)),Z<l.last_lit;);H(l,v,k)}function ut(l,k){var P,U,C,W=k.dyn_tree,G=k.stat_desc.static_tree,Z=k.stat_desc.has_stree,K=k.stat_desc.elems,nt=-1;for(l.heap_len=0,l.heap_max=n,P=0;P<K;P++)W[2*P]!==0?(l.heap[++l.heap_len]=nt=P,l.depth[P]=0):W[2*P+1]=0;for(;l.heap_len<2;)W[2*(C=l.heap[++l.heap_len]=nt<2?++nt:0)]=1,l.depth[C]=0,l.opt_len--,Z&&(l.static_len-=G[2*C+1]);for(k.max_code=nt,P=l.heap_len>>1;1<=P;P--)st(l,W,P);for(C=K;P=l.heap[1],l.heap[1]=l.heap[l.heap_len--],st(l,W,1),U=l.heap[1],l.heap[--l.heap_max]=P,l.heap[--l.heap_max]=U,W[2*C]=W[2*P]+W[2*U],l.depth[C]=(l.depth[P]>=l.depth[U]?l.depth[P]:l.depth[U])+1,W[2*P+1]=W[2*U+1]=C,l.heap[1]=C++,st(l,W,1),2<=l.heap_len;);l.heap[--l.heap_max]=l.heap[1],function(et,ht){var pt,dt,mt,at,_t,yt,ft=ht.dyn_tree,Et=ht.max_code,Tt=ht.stat_desc.static_tree,Bt=ht.stat_desc.has_stree,Rt=ht.stat_desc.extra_bits,zt=ht.stat_desc.extra_base,gt=ht.stat_desc.max_length,bt=0;for(at=0;at<=u;at++)et.bl_count[at]=0;for(ft[2*et.heap[et.heap_max]+1]=0,pt=et.heap_max+1;pt<n;pt++)gt<(at=ft[2*ft[2*(dt=et.heap[pt])+1]+1]+1)&&(at=gt,bt++),ft[2*dt+1]=at,Et<dt||(et.bl_count[at]++,_t=0,zt<=dt&&(_t=Rt[dt-zt]),yt=ft[2*dt],et.opt_len+=yt*(at+_t),Bt&&(et.static_len+=yt*(Tt[2*dt+1]+_t)));if(bt!==0){do{for(at=gt-1;et.bl_count[at]===0;)at--;et.bl_count[at]--,et.bl_count[at+1]+=2,et.bl_count[gt]--,bt-=2}while(0<bt);for(at=gt;at!==0;at--)for(dt=et.bl_count[at];dt!==0;)Et<(mt=et.heap[--pt])||(ft[2*mt+1]!==at&&(et.opt_len+=(at-ft[2*mt+1])*ft[2*mt],ft[2*mt+1]=at),dt--)}}(l,k),lt(W,nt,l.bl_count)}function t(l,k,P){var U,C,W=-1,G=k[1],Z=0,K=7,nt=4;for(G===0&&(K=138,nt=3),k[2*(P+1)+1]=65535,U=0;U<=P;U++)C=G,G=k[2*(U+1)+1],++Z<K&&C===G||(Z<nt?l.bl_tree[2*C]+=Z:C!==0?(C!==W&&l.bl_tree[2*C]++,l.bl_tree[2*S]++):Z<=10?l.bl_tree[2*x]++:l.bl_tree[2*R]++,W=C,nt=(Z=0)===G?(K=138,3):C===G?(K=6,3):(K=7,4))}function B(l,k,P){var U,C,W=-1,G=k[1],Z=0,K=7,nt=4;for(G===0&&(K=138,nt=3),U=0;U<=P;U++)if(C=G,G=k[2*(U+1)+1],!(++Z<K&&C===G)){if(Z<nt)for(;H(l,C,l.bl_tree),--Z!=0;);else C!==0?(C!==W&&(H(l,C,l.bl_tree),Z--),H(l,S,l.bl_tree),$(l,Z-3,2)):Z<=10?(H(l,x,l.bl_tree),$(l,Z-3,3)):(H(l,R,l.bl_tree),$(l,Z-11,7));W=C,nt=(Z=0)===G?(K=138,3):C===G?(K=6,3):(K=7,4)}}h(j);var A=!1;function c(l,k,P,U){$(l,(b<<1)+(U?1:0),3),function(C,W,G,Z){rt(C),Z&&(Y(C,G),Y(C,~G)),a.arraySet(C.pending_buf,C.window,W,G,C.pending),C.pending+=G}(l,k,P,!0)}p._tr_init=function(l){A||(function(){var k,P,U,C,W,G=new Array(u+1);for(C=U=0;C<y-1;C++)for(D[C]=U,k=0;k<1<<F[C];k++)e[U++]=C;for(e[U-1]=C,C=W=0;C<16;C++)for(j[C]=W,k=0;k<1<<N[C];k++)O[W++]=C;for(W>>=7;C<i;C++)for(j[C]=W<<7,k=0;k<1<<N[C]-7;k++)O[256+W++]=C;for(P=0;P<=u;P++)G[P]=0;for(k=0;k<=143;)X[2*k+1]=8,k++,G[8]++;for(;k<=255;)X[2*k+1]=9,k++,G[9]++;for(;k<=279;)X[2*k+1]=7,k++,G[7]++;for(;k<=287;)X[2*k+1]=8,k++,G[8]++;for(lt(X,w+1,G),k=0;k<i;k++)_[2*k+1]=5,_[2*k]=it(k,5);q=new V(X,F,m+1,w,u),L=new V(_,N,0,i,u),Q=new V(new Array(0),I,0,f,d)}(),A=!0),l.l_desc=new z(l.dyn_ltree,q),l.d_desc=new z(l.dyn_dtree,L),l.bl_desc=new z(l.bl_tree,Q),l.bi_buf=0,l.bi_valid=0,tt(l)},p._tr_stored_block=c,p._tr_flush_block=function(l,k,P,U){var C,W,G=0;0<l.level?(l.strm.data_type===2&&(l.strm.data_type=function(Z){var K,nt=4093624447;for(K=0;K<=31;K++,nt>>>=1)if(1&nt&&Z.dyn_ltree[2*K]!==0)return s;if(Z.dyn_ltree[18]!==0||Z.dyn_ltree[20]!==0||Z.dyn_ltree[26]!==0)return r;for(K=32;K<m;K++)if(Z.dyn_ltree[2*K]!==0)return r;return s}(l)),ut(l,l.l_desc),ut(l,l.d_desc),G=function(Z){var K;for(t(Z,Z.dyn_ltree,Z.l_desc.max_code),t(Z,Z.dyn_dtree,Z.d_desc.max_code),ut(Z,Z.bl_desc),K=f-1;3<=K&&Z.bl_tree[2*M[K]+1]===0;K--);return Z.opt_len+=3*(K+1)+5+5+4,K}(l),C=l.opt_len+3+7>>>3,(W=l.static_len+3+7>>>3)<=C&&(C=W)):C=W=P+5,P+4<=C&&k!==-1?c(l,k,P,U):l.strategy===4||W===C?($(l,2+(U?1:0),3),ct(l,X,_)):($(l,4+(U?1:0),3),function(Z,K,nt,et){var ht;for($(Z,K-257,5),$(Z,nt-1,5),$(Z,et-4,4),ht=0;ht<et;ht++)$(Z,Z.bl_tree[2*M[ht]+1],3);B(Z,Z.dyn_ltree,K-1),B(Z,Z.dyn_dtree,nt-1)}(l,l.l_desc.max_code+1,l.d_desc.max_code+1,G+1),ct(l,l.dyn_ltree,l.dyn_dtree)),tt(l),U&&rt(l)},p._tr_tally=function(l,k,P){return l.pending_buf[l.d_buf+2*l.last_lit]=k>>>8&255,l.pending_buf[l.d_buf+2*l.last_lit+1]=255&k,l.pending_buf[l.l_buf+l.last_lit]=255&P,l.last_lit++,k===0?l.dyn_ltree[2*P]++:(l.matches++,k--,l.dyn_ltree[2*(e[P]+m+1)]++,l.dyn_dtree[2*E(k)]++),l.last_lit===l.lit_bufsize-1},p._tr_align=function(l){$(l,2,3),H(l,v,X),function(k){k.bi_valid===16?(Y(k,k.bi_buf),k.bi_buf=0,k.bi_valid=0):8<=k.bi_valid&&(k.pending_buf[k.pending++]=255&k.bi_buf,k.bi_buf>>=8,k.bi_valid-=8)}(l)}},{"../utils/common":41}],53:[function(g,T,p){"use strict";T.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(g,T,p){(function(a){(function(s,r){"use strict";if(!s.setImmediate){var h,b,y,m,w=1,i={},f=!1,n=s.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(s);u=u&&u.setTimeout?u:s,h={}.toString.call(s.process)==="[object process]"?function(S){process.nextTick(function(){d(S)})}:function(){if(s.postMessage&&!s.importScripts){var S=!0,x=s.onmessage;return s.onmessage=function(){S=!1},s.postMessage("","*"),s.onmessage=x,S}}()?(m="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",v,!1):s.attachEvent("onmessage",v),function(S){s.postMessage(m+S,"*")}):s.MessageChannel?((y=new MessageChannel).port1.onmessage=function(S){d(S.data)},function(S){y.port2.postMessage(S)}):n&&"onreadystatechange"in n.createElement("script")?(b=n.documentElement,function(S){var x=n.createElement("script");x.onreadystatechange=function(){d(S),x.onreadystatechange=null,b.removeChild(x),x=null},b.appendChild(x)}):function(S){setTimeout(d,0,S)},u.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var x=new Array(arguments.length-1),R=0;R<x.length;R++)x[R]=arguments[R+1];var F={callback:S,args:x};return i[w]=F,h(w),w++},u.clearImmediate=o}function o(S){delete i[S]}function d(S){if(f)setTimeout(d,0,S);else{var x=i[S];if(x){f=!0;try{(function(R){var F=R.callback,N=R.args;switch(N.length){case 0:F();break;case 1:F(N[0]);break;case 2:F(N[0],N[1]);break;case 3:F(N[0],N[1],N[2]);break;default:F.apply(r,N)}})(x)}finally{o(S),f=!1}}}}function v(S){S.source===s&&typeof S.data=="string"&&S.data.indexOf(m)===0&&d(+S.data.slice(m.length))}})(typeof self=="undefined"?a===void 0?this:a:self)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}]},{},[10])(10)})});var $t={};Wt($t,{default:()=>vt});module.exports=Mt($t);var J=require("obsidian"),Ot=Zt(Ft()),Ht={targetFolder:"Course Modules"},xt=class extends J.Modal{constructor(p,a){super(p);this.result="";this.onSubmit=a}onOpen(){let{contentEl:p}=this;p.empty(),p.createEl("h2",{text:"Enter Course Module URL"}),new J.Setting(p).setName("URL").addText(a=>a.onChange(s=>{this.result=s.trim()}).inputEl.focus()),new J.Setting(p).addButton(a=>a.setButtonText("Download and Unzip").setCta().onClick(()=>{this.result?(this.close(),this.onSubmit(this.result)):new J.Notice("Please enter a URL.")})),p.addEventListener("keypress",a=>{a.key==="Enter"&&(a.preventDefault(),this.result?(this.close(),this.onSubmit(this.result)):new J.Notice("Please enter a URL."))})}onClose(){let{contentEl:p}=this;p.empty()}},St=class extends J.FuzzySuggestModal{constructor(p,a,s,r){super(p);this.plugin=a,this.settingDisplayElement=s,this.preFetchedFolders=r,this.setPlaceholder("Search for a folder..."),console.log("FolderSuggestModal: Initialized with pre-fetched list containing",r.length,"folders.")}getItems(){if(this.preFetchedFolders)return console.log("FolderSuggestModal: Using pre-fetched folder list."),this.preFetchedFolders;console.warn("FolderSuggestModal: Pre-fetched list not available, fetching manually.");let p=this.app.vault.getAllLoadedFiles().filter(s=>s instanceof J.TFolder),a=this.app.vault.getRoot();return p.some(s=>s.path==="/")||p.unshift(a),p}getItemText(p){return p.path==="/"?"/ (Vault Root)":p.path}onChooseItem(p,a){let s=p.path;this.plugin.settings.targetFolder=s,this.plugin.saveSettings(),new J.Notice(`Target folder set to: ${s}`),this.settingDisplayElement.value=s}renderSuggestion(p,a){if(super.renderSuggestion(p,a),p.item.path==="/"){let s=a.querySelector(".suggestion-content");s?s.textContent="/ (Vault Root)":a.setText("/ (Vault Root)")}}},Ct=class extends J.PluginSettingTab{constructor(p,a){super(p,a);this.plugin=a}display(){let{containerEl:p}=this;p.empty(),p.createEl("h2",{text:"Course Material Downloader Settings"});let a=new J.Setting(p).setName("Target Folder").setDesc("The folder where downloaded modules will be unzipped.");a.addText(s=>{s.setValue(this.plugin.settings.targetFolder).setDisabled(!0),s.inputEl.style.width="100%",s.inputEl.style.marginRight="10px";let r=s.inputEl;a.addButton(h=>{h.setButtonText("Change Folder").onClick(()=>{console.log("Settings Tab: 'Change Folder' clicked. Fetching folder list...");let b=this.app.vault.getAllLoadedFiles().filter(m=>m instanceof J.TFolder),y=this.app.vault.getRoot();b.some(m=>m.path==="/")||b.unshift(y),console.log("Settings Tab: Passing",b.length,"folders to modal."),new St(this.app,this.plugin,r,b).open()})})}),p.createEl("p",{text:"Note: If the desired folder doesn't exist, it will be created during the download process (if possible)."})}},vt=class extends J.Plugin{async onload(){console.log("Loading Course Material Downloader Plugin"),await this.loadSettings(),this.addCommand({id:"download-course-module",name:"Download and Unzip Course Module",callback:()=>{this.showUrlInputModal()}}),this.addSettingTab(new Ct(this.app,this))}onunload(){console.log("Unloading Course Material Downloader Plugin")}async loadSettings(){this.settings=Object.assign({},Ht,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}async ensureFolderExists(p){if(p==="/"||p==="")return this.app.vault.getRoot();let a=p.replace(/^\/|\/$/g,"");if(a==="")return this.app.vault.getRoot();try{let s=this.app.vault.getAbstractFileByPath(a);if(s instanceof J.TFolder)return s;if(s instanceof J.TFile)return console.error(`Cannot create folder '${a}', a file with this name already exists.`),new J.Notice(`Cannot create folder '${a}', a file exists there.`),null;console.log(`Attempting to create folder: ${a}`);try{let r=await this.app.vault.createFolder(a);return new J.Notice(`Created folder: ${a}`),r}catch(r){console.error(`Error creating folder '${a}':`,r);let h=this.app.vault.getAbstractFileByPath(a);return h instanceof J.TFolder?(console.log(`Folder '${a}' found after initial creation attempt failed.`),h):(new J.Notice(`Error creating folder '${a}'. Check console.`),null)}}catch(s){return console.error(`Unexpected error ensuring folder exists '${a}':`,s),new J.Notice(`Unexpected error checking folder '${a}'. Check console.`),null}}showUrlInputModal(){new xt(this.app,p=>{this.downloadAndUnzip(p)}).open()}async downloadAndUnzip(p){var b,y;if(!p.startsWith("http://")&&!p.startsWith("https://")){new J.Notice("Invalid URL received. Must start with http:// or https://");return}p=p.replace("www.dropbox.com","dl.dropboxusercontent.com"),p.includes("dropbox.com")&&!p.includes("dl=1")&&(p=p.includes("?")?`${p}&dl=1`:`${p}?dl=1`);let a=this.settings.targetFolder,s=await this.ensureFolderExists(a);if(!s){new J.Notice(`Target folder "${a}" could not be found or created. Aborting.`);return}let r=s.path==="/"?"":s.path,h;try{new J.Notice("Downloading module..."),console.log(`Requesting URL: ${p}`),h=(await(0,J.requestUrl)({url:p})).arrayBuffer,new J.Notice("Download complete. Unzipping..."),console.log(`Downloaded ${h.byteLength} bytes.`)}catch(m){console.error("Download Error:",m),new J.Notice(`Failed to download file: ${m.message}. Check console (Ctrl+Shift+I or Cmd+Opt+I).`);return}try{let m=await Ot.default.loadAsync(h),w=0,i=new Set;for(let f in m.files){let n=f.split("/").pop();if(f.startsWith("__MACOSX/")||n===".DS_Store"||!f){f.startsWith("__MACOSX/")&&console.log(`Ignoring macOS metadata folder: ${f}`),n===".DS_Store"&&console.log(`Ignoring .DS_Store file: ${f}`);continue}let u=m.files[f],d=(r?`${r}/${f}`:f).replace(/\\/g,"/").replace(/\/+/g,"/");if(u.dir){let v=d.endsWith("/")?d.slice(0,-1):d;v&&!i.has(v)&&(await this.ensureFolderExists(v)?i.add(v):console.warn(`Could not ensure directory exists: ${v}. Skipping contents.`))}else{let v=await u.async("arraybuffer"),S=d.lastIndexOf("/"),x=S>0?d.substring(0,S):S===0?"/":"";if(x&&x!==r&&!i.has(x))if(await this.ensureFolderExists(x))i.add(x);else{console.warn(`Could not ensure parent directory exists: ${x}. Skipping file: ${d}`);continue}let R=d.startsWith("/")?d.substring(1):d;if(R===""&&d==="/"){console.warn("Attempting to check root path '/' for a file. Skipping.");continue}let F=R?this.app.vault.getAbstractFileByPath(R):null;if(F instanceof J.TFile){console.log(`Skipping extraction for existing file: ${d}`);continue}else if(F instanceof J.TFolder){console.error(`Skipping file write: A folder exists at path ${d}`),new J.Notice(`Skipping file write: Folder exists at ${d}`);continue}else try{console.log(`Creating new file: ${d}`),await this.app.vault.createBinary(d,v,{mtime:Date.now()}),w++}catch(N){(b=N.message)!=null&&b.toLowerCase().includes("file already exists")?console.warn(`Caught 'File already exists' on createBinary for ${d}. Skipping.`):(console.error(`Error creating file '${d}':`,N),new J.Notice(`Error creating file '${d}'. Check console.`))}}}new J.Notice(`Successfully extracted ${w} new file(s) to '${s.path}'.`),console.log(`Extraction complete to folder: ${s.path}`)}catch(m){console.error("Unzip/Write Error:",m),(y=m.message)!=null&&y.toLowerCase().includes("file already exists")?(console.warn("Caught 'File already exists' error during unzip/write phase, possibly handled. Check logic if files were missed."),new J.Notice("An unexpected 'File already exists' error occurred during processing. Some files might not have been processed correctly. Check console.")):new J.Notice(`Failed to unzip or write files: ${m.message}. Check console.`)}}};
|
||
/*! Bundled license information:
|
||
|
||
jszip/dist/jszip.min.js:
|
||
(*!
|
||
|
||
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
||
<http://stuartk.com/jszip>
|
||
|
||
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
||
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
||
|
||
JSZip uses the library pako released under the MIT license :
|
||
https://github.com/nodeca/pako/blob/main/LICENSE
|
||
*)
|
||
*/
|