1 "use strict";(()=>{var sr=Object.create;var Vt=Object.defineProperty,ir=Object.defineProperties,or=Object.getOwnPropertyDescriptor,lr=Object.getOwnPropertyDescriptors,cr=Object.getOwnPropertyNames,Ce=Object.getOwnPropertySymbols,ur=Object.getPrototypeOf,Ee=Object.prototype.hasOwnProperty,hr=Object.prototype.propertyIsEnumerable;var Ae=(a,e,t)=>e in a?Vt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,gt=(a,e)=>{for(var t in e||(e={}))Ee.call(e,t)&&Ae(a,t,e[t]);if(Ce)for(var t of Ce(e))hr.call(e,t)&&Ae(a,t,e[t]);return a},Pt=(a,e)=>ir(a,lr(e));var Nt=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var dr=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports);var fr=(a,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of cr(e))!Ee.call(a,n)&&n!==t&&Vt(a,n,{get:()=>e[n],enumerable:!(r=or(e,n))||r.enumerable});return a};var pr=(a,e,t)=>(t=a!=null?sr(ur(a)):{},fr(e||!a||!a.__esModule?Vt(t,"default",{value:a,enumerable:!0}):t,a));var ze=dr((Me,Xt)=>{(function(a){typeof Me=="object"&&typeof Xt<"u"?Xt.exports=a():typeof define=="function"&&define.amd?define([],a):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).JSZip=a()})(function(){return function a(e,t,r){function n(d,v){if(!t[d]){if(!e[d]){var m=typeof Nt=="function"&&Nt;if(!v&&m)return m(d,!0);if(s)return s(d,!0);var y=new Error("Cannot find module '"+d+"'");throw y.code="MODULE_NOT_FOUND",y}var u=t[d]={exports:{}};e[d][0].call(u.exports,function(g){var c=e[d][1][g];return n(c||g)},u,u.exports,a,e,t,r)}return t[d].exports}for(var s=typeof Nt=="function"&&Nt,o=0;o<r.length;o++)n(r[o]);return n}({1:[function(a,e,t){"use strict";var r=a("./utils"),n=a("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.encode=function(o){for(var d,v,m,y,u,g,c,p=[],h=0,k=o.length,w=k,x=r.getTypeOf(o)!=="string";h<o.length;)w=k-h,m=x?(d=o[h++],v=h<k?o[h++]:0,h<k?o[h++]:0):(d=o.charCodeAt(h++),v=h<k?o.charCodeAt(h++):0,h<k?o.charCodeAt(h++):0),y=d>>2,u=(3&d)<<4|v>>4,g=1<w?(15&v)<<2|m>>6:64,c=2<w?63&m:64,p.push(s.charAt(y)+s.charAt(u)+s.charAt(g)+s.charAt(c));return p.join("")},t.decode=function(o){var d,v,m,y,u,g,c=0,p=0,h="data:";if(o.substr(0,h.length)===h)throw new Error("Invalid base64 input, it looks like a data url.");var k,w=3*(o=o.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(o.charAt(o.length-1)===s.charAt(64)&&w--,o.charAt(o.length-2)===s.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(k=n.uint8array?new Uint8Array(0|w):new Array(0|w);c<o.length;)d=s.indexOf(o.charAt(c++))<<2|(y=s.indexOf(o.charAt(c++)))>>4,v=(15&y)<<4|(u=s.indexOf(o.charAt(c++)))>>2,m=(3&u)<<6|(g=s.indexOf(o.charAt(c++))),k[p++]=d,u!==64&&(k[p++]=v),g!==64&&(k[p++]=m);return k}},{"./support":30,"./utils":32}],2:[function(a,e,t){"use strict";var r=a("./external"),n=a("./stream/DataWorker"),s=a("./stream/Crc32Probe"),o=a("./stream/DataLengthProbe");function d(v,m,y,u,g){this.compressedSize=v,this.uncompressedSize=m,this.crc32=y,this.compression=u,this.compressedContent=g}d.prototype={getContentWorker:function(){var v=new n(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),m=this;return v.on("end",function(){if(this.streamInfo.data_length!==m.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),v},getCompressedWorker:function(){return new n(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},d.createWorkerFrom=function(v,m,y){return v.pipe(new s).pipe(new o("uncompressedSize")).pipe(m.compressWorker(y)).pipe(new o("compressedSize")).withStreamInfo("compression",m)},e.exports=d},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(a,e,t){"use strict";var r=a("./stream/GenericWorker");t.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},t.DEFLATE=a("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(a,e,t){"use strict";var r=a("./utils"),n=function(){for(var s,o=[],d=0;d<256;d++){s=d;for(var v=0;v<8;v++)s=1&s?3988292384^s>>>1:s>>>1;o[d]=s}return o}();e.exports=function(s,o){return s!==void 0&&s.length?r.getTypeOf(s)!=="string"?function(d,v,m,y){var u=n,g=y+m;d^=-1;for(var c=y;c<g;c++)d=d>>>8^u[255&(d^v[c])];return-1^d}(0|o,s,s.length,0):function(d,v,m,y){var u=n,g=y+m;d^=-1;for(var c=y;c<g;c++)d=d>>>8^u[255&(d^v.charCodeAt(c))];return-1^d}(0|o,s,s.length,0):0}},{"./utils":32}],5:[function(a,e,t){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},{}],6:[function(a,e,t){"use strict";var r=null;r=typeof Promise<"u"?Promise:a("lie"),e.exports={Promise:r}},{lie:37}],7:[function(a,e,t){"use strict";var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",n=a("pako"),s=a("./utils"),o=a("./stream/GenericWorker"),d=r?"uint8array":"array";function v(m,y){o.call(this,"FlateWorker/"+m),this._pako=null,this._pakoAction=m,this._pakoOptions=y,this.meta={}}t.magic="\b\0",s.inherits(v,o),v.prototype.processChunk=function(m){this.meta=m.meta,this._pako===null&&this._createPako(),this._pako.push(s.transformTo(d,m.data),!1)},v.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},v.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},v.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var m=this;this._pako.onData=function(y){m.push({data:y,meta:m.meta})}},t.compressWorker=function(m){return new v("Deflate",m)},t.uncompressWorker=function(){return new v("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(a,e,t){"use strict";function r(u,g){var c,p="";for(c=0;c<g;c++)p+=String.fromCharCode(255&u),u>>>=8;return p}function n(u,g,c,p,h,k){var w,x,C=u.file,T=u.compression,O=k!==d.utf8encode,j=s.transformTo("string",k(C.name)),B=s.transformTo("string",d.utf8encode(C.name)),Z=C.comment,Y=s.transformTo("string",k(Z)),_=s.transformTo("string",d.utf8encode(Z)),R=B.length!==C.name.length,l=_.length!==Z.length,F="",Q="",U="",tt=C.dir,W=C.date,J={crc32:0,compressedSize:0,uncompressedSize:0};g&&!c||(J.crc32=u.crc32,J.compressedSize=u.compressedSize,J.uncompressedSize=u.uncompressedSize);var N=0;g&&(N|=8),O||!R&&!l||(N|=2048);var P=0,K=0;tt&&(P|=16),h==="UNIX"?(K=798,P|=function(V,ct){var mt=V;return V||(mt=ct?16893:33204),(65535&mt)<<16}(C.unixPermissions,tt)):(K=20,P|=function(V){return 63&(V||0)}(C.dosPermissions)),w=W.getUTCHours(),w<<=6,w|=W.getUTCMinutes(),w<<=5,w|=W.getUTCSeconds()/2,x=W.getUTCFullYear()-1980,x<<=4,x|=W.getUTCMonth()+1,x<<=5,x|=W.getUTCDate(),R&&(Q=r(1,1)+r(v(j),4)+B,F+="up"+r(Q.length,2)+Q),l&&(U=r(1,1)+r(v(Y),4)+_,F+="uc"+r(U.length,2)+U);var G="";return G+="\n\0",G+=r(N,2),G+=T.magic,G+=r(w,2),G+=r(x,2),G+=r(J.crc32,4),G+=r(J.compressedSize,4),G+=r(J.uncompressedSize,4),G+=r(j.length,2),G+=r(F.length,2),{fileRecord:m.LOCAL_FILE_HEADER+G+j+F,dirRecord:m.CENTRAL_FILE_HEADER+r(K,2)+G+r(Y.length,2)+"\0\0\0\0"+r(P,4)+r(p,4)+j+F+Y}}var s=a("../utils"),o=a("../stream/GenericWorker"),d=a("../utf8"),v=a("../crc32"),m=a("../signature");function y(u,g,c,p){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=c,this.encodeFileName=p,this.streamFiles=u,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(y,o),y.prototype.push=function(u){var g=u.meta.percent||0,c=this.entriesCount,p=this._sources.length;this.accumulate?this.contentBuffer.push(u):(this.bytesWritten+=u.data.length,o.prototype.push.call(this,{data:u.data,meta:{currentFile:this.currentFile,percent:c?(g+100*(c-p-1))/c:100}}))},y.prototype.openedSource=function(u){this.currentSourceOffset=this.bytesWritten,this.currentFile=u.file.name;var g=this.streamFiles&&!u.file.dir;if(g){var c=n(u,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:c.fileRecord,meta:{percent:0}})}else this.accumulate=!0},y.prototype.closedSource=function(u){this.accumulate=!1;var g=this.streamFiles&&!u.file.dir,c=n(u,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(c.dirRecord),g)this.push({data:function(p){return m.DATA_DESCRIPTOR+r(p.crc32,4)+r(p.compressedSize,4)+r(p.uncompressedSize,4)}(u),meta:{percent:100}});else for(this.push({data:c.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},y.prototype.flush=function(){for(var u=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var c=this.bytesWritten-u,p=function(h,k,w,x,C){var T=s.transformTo("string",C(x));return m.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(h,2)+r(h,2)+r(k,4)+r(w,4)+r(T.length,2)+T}(this.dirRecords.length,c,u,this.zipComment,this.encodeFileName);this.push({data:p,meta:{percent:100}})},y.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},y.prototype.registerPrevious=function(u){this._sources.push(u);var g=this;return u.on("data",function(c){g.processChunk(c)}),u.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),u.on("error",function(c){g.error(c)}),this},y.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},y.prototype.error=function(u){var g=this._sources;if(!o.prototype.error.call(this,u))return!1;for(var c=0;c<g.length;c++)try{g[c].error(u)}catch(p){}return!0},y.prototype.lock=function(){o.prototype.lock.call(this);for(var u=this._sources,g=0;g<u.length;g++)u[g].lock()},e.exports=y},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(a,e,t){"use strict";var r=a("../compressions"),n=a("./ZipFileWorker");t.generateWorker=function(s,o,d){var v=new n(o.streamFiles,d,o.platform,o.encodeFileName),m=0;try{s.forEach(function(y,u){m++;var g=function(k,w){var x=k||w,C=r[x];if(!C)throw new Error(x+" is not a valid compression method !");return C}(u.options.compression,o.compression),c=u.options.compressionOptions||o.compressionOptions||{},p=u.dir,h=u.date;u._compressWorker(g,c).withStreamInfo("file",{name:y,dir:p,date:h,comment:u.comment||"",unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions}).pipe(v)}),v.entriesCount=m}catch(y){v.error(y)}return v}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(a,e,t){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var n=new r;for(var s in this)typeof this[s]!="function"&&(n[s]=this[s]);return n}}(r.prototype=a("./object")).loadAsync=a("./load"),r.support=a("./support"),r.defaults=a("./defaults"),r.version="3.10.1",r.loadAsync=function(n,s){return new r().loadAsync(n,s)},r.external=a("./external"),e.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(a,e,t){"use strict";var r=a("./utils"),n=a("./external"),s=a("./utf8"),o=a("./zipEntries"),d=a("./stream/Crc32Probe"),v=a("./nodejsUtils");function m(y){return new n.Promise(function(u,g){var c=y.decompressed.getContentWorker().pipe(new d);c.on("error",function(p){g(p)}).on("end",function(){c.streamInfo.crc32!==y.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):u()}).resume()})}e.exports=function(y,u){var g=this;return u=r.extend(u||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),v.isNode&&v.isStream(y)?n.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",y,!0,u.optimizedBinaryString,u.base64).then(function(c){var p=new o(u);return p.load(c),p}).then(function(c){var p=[n.Promise.resolve(c)],h=c.files;if(u.checkCRC32)for(var k=0;k<h.length;k++)p.push(m(h[k]));return n.Promise.all(p)}).then(function(c){for(var p=c.shift(),h=p.files,k=0;k<h.length;k++){var w=h[k],x=w.fileNameStr,C=r.resolve(w.fileNameStr);g.file(C,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:u.createFolders}),w.dir||(g.file(C).unsafeOriginalName=x)}return p.zipComment.length&&(g.comment=p.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(a,e,t){"use strict";var r=a("../utils"),n=a("../stream/GenericWorker");function s(o,d){n.call(this,"Nodejs stream input adapter for "+o),this._upstreamEnded=!1,this._bindStream(d)}r.inherits(s,n),s.prototype._bindStream=function(o){var d=this;(this._stream=o).pause(),o.on("data",function(v){d.push({data:v,meta:{percent:0}})}).on("error",function(v){d.isPaused?this.generatedError=v:d.error(v)}).on("end",function(){d.isPaused?d._upstreamEnded=!0:d.end()})},s.prototype.pause=function(){return!!n.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(a,e,t){"use strict";var r=a("readable-stream").Readable;function n(s,o,d){r.call(this,o),this._helper=s;var v=this;s.on("data",function(m,y){v.push(m)||v._helper.pause(),d&&d(y)}).on("error",function(m){v.emit("error",m)}).on("end",function(){v.push(null)})}a("../utils").inherits(n,r),n.prototype._read=function(){this._helper.resume()},e.exports=n},{"../utils":32,"readable-stream":16}],14:[function(a,e,t){"use strict";e.exports={isNode:typeof Buffer<"u",newBufferFrom:function(r,n){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(r,n);if(typeof r=="number")throw new Error('The "data" argument must not be a number');return new Buffer(r,n)},allocBuffer:function(r){if(Buffer.alloc)return Buffer.alloc(r);var n=new Buffer(r);return n.fill(0),n},isBuffer:function(r){return Buffer.isBuffer(r)},isStream:function(r){return r&&typeof r.on=="function"&&typeof r.pause=="function"&&typeof r.resume=="function"}}},{}],15:[function(a,e,t){"use strict";function r(C,T,O){var j,B=s.getTypeOf(T),Z=s.extend(O||{},v);Z.date=Z.date||new Date,Z.compression!==null&&(Z.compression=Z.compression.toUpperCase()),typeof Z.unixPermissions=="string"&&(Z.unixPermissions=parseInt(Z.unixPermissions,8)),Z.unixPermissions&&16384&Z.unixPermissions&&(Z.dir=!0),Z.dosPermissions&&16&Z.dosPermissions&&(Z.dir=!0),Z.dir&&(C=h(C)),Z.createFolders&&(j=p(C))&&k.call(this,j,!0);var Y=B==="string"&&Z.binary===!1&&Z.base64===!1;O&&O.binary!==void 0||(Z.binary=!Y),(T instanceof m&&T.uncompressedSize===0||Z.dir||!T||T.length===0)&&(Z.base64=!1,Z.binary=!0,T="",Z.compression="STORE",B="string");var _=null;_=T instanceof m||T instanceof o?T:g.isNode&&g.isStream(T)?new c(C,T):s.prepareContent(C,T,Z.binary,Z.optimizedBinaryString,Z.base64);var R=new y(C,_,Z);this.files[C]=R}var n=a("./utf8"),s=a("./utils"),o=a("./stream/GenericWorker"),d=a("./stream/StreamHelper"),v=a("./defaults"),m=a("./compressedObject"),y=a("./zipObject"),u=a("./generate"),g=a("./nodejsUtils"),c=a("./nodejs/NodejsStreamInputAdapter"),p=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var T=C.lastIndexOf("/");return 0<T?C.substring(0,T):""},h=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},k=function(C,T){return T=T!==void 0?T:v.createFolders,C=h(C),this.files[C]||r.call(this,C,null,{dir:!0,createFolders:T}),this.files[C]};function w(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var x={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var T,O,j;for(T in this.files)j=this.files[T],(O=T.slice(this.root.length,T.length))&&T.slice(0,this.root.length)===this.root&&C(O,j)},filter:function(C){var T=[];return this.forEach(function(O,j){C(O,j)&&T.push(j)}),T},file:function(C,T,O){if(arguments.length!==1)return C=this.root+C,r.call(this,C,T,O),this;if(w(C)){var j=C;return this.filter(function(Z,Y){return!Y.dir&&j.test(Z)})}var B=this.files[this.root+C];return B&&!B.dir?B:null},folder:function(C){if(!C)return this;if(w(C))return this.filter(function(B,Z){return Z.dir&&C.test(B)});var T=this.root+C,O=k.call(this,T),j=this.clone();return j.root=O.name,j},remove:function(C){C=this.root+C;var T=this.files[C];if(T||(C.slice(-1)!=="/"&&(C+="/"),T=this.files[C]),T&&!T.dir)delete this.files[C];else for(var O=this.filter(function(B,Z){return Z.name.slice(0,C.length)===C}),j=0;j<O.length;j++)delete this.files[O[j].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var T,O={};try{if((O=s.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.utf8encode})).type=O.type.toLowerCase(),O.compression=O.compression.toUpperCase(),O.type==="binarystring"&&(O.type="string"),!O.type)throw new Error("No output type specified.");s.checkSupport(O.type),O.platform!=="darwin"&&O.platform!=="freebsd"&&O.platform!=="linux"&&O.platform!=="sunos"||(O.platform="UNIX"),O.platform==="win32"&&(O.platform="DOS");var j=O.comment||this.comment||"";T=u.generateWorker(this,O,j)}catch(B){(T=new o("error")).error(B)}return new d(T,O.type||"string",O.mimeType)},generateAsync:function(C,T){return this.generateInternalStream(C).accumulate(T)},generateNodeStream:function(C,T){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(T)}};e.exports=x},{"./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(a,e,t){"use strict";e.exports=a("stream")},{stream:void 0}],17:[function(a,e,t){"use strict";var r=a("./DataReader");function n(s){r.call(this,s);for(var o=0;o<this.data.length;o++)s[o]=255&s[o]}a("../utils").inherits(n,r),n.prototype.byteAt=function(s){return this.data[this.zero+s]},n.prototype.lastIndexOfSignature=function(s){for(var o=s.charCodeAt(0),d=s.charCodeAt(1),v=s.charCodeAt(2),m=s.charCodeAt(3),y=this.length-4;0<=y;--y)if(this.data[y]===o&&this.data[y+1]===d&&this.data[y+2]===v&&this.data[y+3]===m)return y-this.zero;return-1},n.prototype.readAndCheckSignature=function(s){var o=s.charCodeAt(0),d=s.charCodeAt(1),v=s.charCodeAt(2),m=s.charCodeAt(3),y=this.readData(4);return o===y[0]&&d===y[1]&&v===y[2]&&m===y[3]},n.prototype.readData=function(s){if(this.checkOffset(s),s===0)return[];var o=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,o},e.exports=n},{"../utils":32,"./DataReader":18}],18:[function(a,e,t){"use strict";var r=a("../utils");function n(s){this.data=s,this.length=s.length,this.index=0,this.zero=0}n.prototype={checkOffset:function(s){this.checkIndex(this.index+s)},checkIndex:function(s){if(this.length<this.zero+s||s<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+s+"). Corrupted zip ?")},setIndex:function(s){this.checkIndex(s),this.index=s},skip:function(s){this.setIndex(this.index+s)},byteAt:function(){},readInt:function(s){var o,d=0;for(this.checkOffset(s),o=this.index+s-1;o>=this.index;o--)d=(d<<8)+this.byteAt(o);return this.index+=s,d},readString:function(s){return r.transformTo("string",this.readData(s))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var s=this.readInt(4);return new Date(Date.UTC(1980+(s>>25&127),(s>>21&15)-1,s>>16&31,s>>11&31,s>>5&63,(31&s)<<1))}},e.exports=n},{"../utils":32}],19:[function(a,e,t){"use strict";var r=a("./Uint8ArrayReader");function n(s){r.call(this,s)}a("../utils").inherits(n,r),n.prototype.readData=function(s){this.checkOffset(s);var o=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,o},e.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(a,e,t){"use strict";var r=a("./DataReader");function n(s){r.call(this,s)}a("../utils").inherits(n,r),n.prototype.byteAt=function(s){return this.data.charCodeAt(this.zero+s)},n.prototype.lastIndexOfSignature=function(s){return this.data.lastIndexOf(s)-this.zero},n.prototype.readAndCheckSignature=function(s){return s===this.readData(4)},n.prototype.readData=function(s){this.checkOffset(s);var o=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,o},e.exports=n},{"../utils":32,"./DataReader":18}],21:[function(a,e,t){"use strict";var r=a("./ArrayReader");function n(s){r.call(this,s)}a("../utils").inherits(n,r),n.prototype.readData=function(s){if(this.checkOffset(s),s===0)return new Uint8Array(0);var o=this.data.subarray(this.zero+this.index,this.zero+this.index+s);return this.index+=s,o},e.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(a,e,t){"use strict";var r=a("../utils"),n=a("../support"),s=a("./ArrayReader"),o=a("./StringReader"),d=a("./NodeBufferReader"),v=a("./Uint8ArrayReader");e.exports=function(m){var y=r.getTypeOf(m);return r.checkSupport(y),y!=="string"||n.uint8array?y==="nodebuffer"?new d(m):n.uint8array?new v(r.transformTo("uint8array",m)):new s(r.transformTo("array",m)):new o(m)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(a,e,t){"use strict";t.LOCAL_FILE_HEADER="PK
\x03\x04",t.CENTRAL_FILE_HEADER="PK
\x01\x02",t.CENTRAL_DIRECTORY_END="PK
\x05\x06",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK
\x06\x07",t.ZIP64_CENTRAL_DIRECTORY_END="PK
\x06\x06",t.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(a,e,t){"use strict";var r=a("./GenericWorker"),n=a("../utils");function s(o){r.call(this,"ConvertWorker to "+o),this.destType=o}n.inherits(s,r),s.prototype.processChunk=function(o){this.push({data:n.transformTo(this.destType,o.data),meta:o.meta})},e.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(a,e,t){"use strict";var r=a("./GenericWorker"),n=a("../crc32");function s(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}a("../utils").inherits(s,r),s.prototype.processChunk=function(o){this.streamInfo.crc32=n(o.data,this.streamInfo.crc32||0),this.push(o)},e.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(a,e,t){"use strict";var r=a("../utils"),n=a("./GenericWorker");function s(o){n.call(this,"DataLengthProbe for "+o),this.propName=o,this.withStreamInfo(o,0)}r.inherits(s,n),s.prototype.processChunk=function(o){if(o){var d=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=d+o.data.length}n.prototype.processChunk.call(this,o)},e.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(a,e,t){"use strict";var r=a("../utils"),n=a("./GenericWorker");function s(o){n.call(this,"DataWorker");var d=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,o.then(function(v){d.dataIsReady=!0,d.data=v,d.max=v&&v.length||0,d.type=r.getTypeOf(v),d.isPaused||d._tickAndRepeat()},function(v){d.error(v)})}r.inherits(s,n),s.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var o=null,d=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":o=this.data.substring(this.index,d);break;case"uint8array":o=this.data.subarray(this.index,d);break;case"array":case"nodebuffer":o=this.data.slice(this.index,d)}return this.index=d,this.push({data:o,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(a,e,t){"use strict";function r(n){this.name=n||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(n){this.emit("data",n)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(n){this.emit("error",n)}return!0},error:function(n){return!this.isFinished&&(this.isPaused?this.generatedError=n:(this.isFinished=!0,this.emit("error",n),this.previous&&this.previous.error(n),this.cleanUp()),!0)},on:function(n,s){return this._listeners[n].push(s),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(n,s){if(this._listeners[n])for(var o=0;o<this._listeners[n].length;o++)this._listeners[n][o].call(this,s)},pipe:function(n){return n.registerPrevious(this)},registerPrevious:function(n){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=n.streamInfo,this.mergeStreamInfo(),this.previous=n;var s=this;return n.on("data",function(o){s.processChunk(o)}),n.on("end",function(){s.end()}),n.on("error",function(o){s.error(o)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var n=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),n=!0),this.previous&&this.previous.resume(),!n},flush:function(){},processChunk:function(n){this.push(n)},withStreamInfo:function(n,s){return this.extraStreamInfo[n]=s,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var n in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,n)&&(this.streamInfo[n]=this.extraStreamInfo[n])},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 n="Worker "+this.name;return this.previous?this.previous+" -> "+n:n}},e.exports=r},{}],29:[function(a,e,t){"use strict";var r=a("../utils"),n=a("./ConvertWorker"),s=a("./GenericWorker"),o=a("../base64"),d=a("../support"),v=a("../external"),m=null;if(d.nodestream)try{m=a("../nodejs/NodejsStreamOutputAdapter")}catch(g){}function y(g,c){return new v.Promise(function(p,h){var k=[],w=g._internalType,x=g._outputType,C=g._mimeType;g.on("data",function(T,O){k.push(T),c&&c(O)}).on("error",function(T){k=[],h(T)}).on("end",function(){try{var T=function(O,j,B){switch(O){case"blob":return r.newBlob(r.transformTo("arraybuffer",j),B);case"base64":return o.encode(j);default:return r.transformTo(O,j)}}(x,function(O,j){var B,Z=0,Y=null,_=0;for(B=0;B<j.length;B++)_+=j[B].length;switch(O){case"string":return j.join("");case"array":return Array.prototype.concat.apply([],j);case"uint8array":for(Y=new Uint8Array(_),B=0;B<j.length;B++)Y.set(j[B],Z),Z+=j[B].length;return Y;case"nodebuffer":return Buffer.concat(j);default:throw new Error("concat : unsupported type '"+O+"'")}}(w,k),C);p(T)}catch(O){h(O)}k=[]}).resume()})}function u(g,c,p){var h=c;switch(c){case"blob":case"arraybuffer":h="uint8array";break;case"base64":h="string"}try{this._internalType=h,this._outputType=c,this._mimeType=p,r.checkSupport(h),this._worker=g.pipe(new n(h)),g.lock()}catch(k){this._worker=new s("error"),this._worker.error(k)}}u.prototype={accumulate:function(g){return y(this,g)},on:function(g,c){var p=this;return g==="data"?this._worker.on(g,function(h){c.call(p,h.data,h.meta)}):this._worker.on(g,function(){r.delay(c,arguments,p)}),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(r.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new m(this,{objectMode:this._outputType!=="nodebuffer"},g)}},e.exports=u},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(a,e,t){"use strict";if(t.base64=!0,t.array=!0,t.string=!0,t.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",t.nodebuffer=typeof Buffer<"u",t.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")t.blob=!1;else{var r=new ArrayBuffer(0);try{t.blob=new Blob([r],{type:"application/zip"}).size===0}catch(s){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);n.append(r),t.blob=n.getBlob("application/zip").size===0}catch(o){t.blob=!1}}}try{t.nodestream=!!a("readable-stream").Readable}catch(s){t.nodestream=!1}},{"readable-stream":16}],31:[function(a,e,t){"use strict";for(var r=a("./utils"),n=a("./support"),s=a("./nodejsUtils"),o=a("./stream/GenericWorker"),d=new Array(256),v=0;v<256;v++)d[v]=252<=v?6:248<=v?5:240<=v?4:224<=v?3:192<=v?2:1;d[254]=d[254]=1;function m(){o.call(this,"utf-8 decode"),this.leftOver=null}function y(){o.call(this,"utf-8 encode")}t.utf8encode=function(u){return n.nodebuffer?s.newBufferFrom(u,"utf-8"):function(g){var c,p,h,k,w,x=g.length,C=0;for(k=0;k<x;k++)(64512&(p=g.charCodeAt(k)))==55296&&k+1<x&&(64512&(h=g.charCodeAt(k+1)))==56320&&(p=65536+(p-55296<<10)+(h-56320),k++),C+=p<128?1:p<2048?2:p<65536?3:4;for(c=n.uint8array?new Uint8Array(C):new Array(C),k=w=0;w<C;k++)(64512&(p=g.charCodeAt(k)))==55296&&k+1<x&&(64512&(h=g.charCodeAt(k+1)))==56320&&(p=65536+(p-55296<<10)+(h-56320),k++),p<128?c[w++]=p:(p<2048?c[w++]=192|p>>>6:(p<65536?c[w++]=224|p>>>12:(c[w++]=240|p>>>18,c[w++]=128|p>>>12&63),c[w++]=128|p>>>6&63),c[w++]=128|63&p);return c}(u)},t.utf8decode=function(u){return n.nodebuffer?r.transformTo("nodebuffer",u).toString("utf-8"):function(g){var c,p,h,k,w=g.length,x=new Array(2*w);for(c=p=0;c<w;)if((h=g[c++])<128)x[p++]=h;else if(4<(k=d[h]))x[p++]=65533,c+=k-1;else{for(h&=k===2?31:k===3?15:7;1<k&&c<w;)h=h<<6|63&g[c++],k--;1<k?x[p++]=65533:h<65536?x[p++]=h:(h-=65536,x[p++]=55296|h>>10&1023,x[p++]=56320|1023&h)}return x.length!==p&&(x.subarray?x=x.subarray(0,p):x.length=p),r.applyFromCharCode(x)}(u=r.transformTo(n.uint8array?"uint8array":"array",u))},r.inherits(m,o),m.prototype.processChunk=function(u){var g=r.transformTo(n.uint8array?"uint8array":"array",u.data);if(this.leftOver&&this.leftOver.length){if(n.uint8array){var c=g;(g=new Uint8Array(c.length+this.leftOver.length)).set(this.leftOver,0),g.set(c,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var p=function(k,w){var x;for((w=w||k.length)>k.length&&(w=k.length),x=w-1;0<=x&&(192&k[x])==128;)x--;return x<0||x===0?w:x+d[k[x]]>w?x:w}(g),h=g;p!==g.length&&(n.uint8array?(h=g.subarray(0,p),this.leftOver=g.subarray(p,g.length)):(h=g.slice(0,p),this.leftOver=g.slice(p,g.length))),this.push({data:t.utf8decode(h),meta:u.meta})},m.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=m,r.inherits(y,o),y.prototype.processChunk=function(u){this.push({data:t.utf8encode(u.data),meta:u.meta})},t.Utf8EncodeWorker=y},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(a,e,t){"use strict";var r=a("./support"),n=a("./base64"),s=a("./nodejsUtils"),o=a("./external");function d(c){return c}function v(c,p){for(var h=0;h<c.length;++h)p[h]=255&c.charCodeAt(h);return p}a("setimmediate"),t.newBlob=function(c,p){t.checkSupport("blob");try{return new Blob([c],{type:p})}catch(k){try{var h=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return h.append(c),h.getBlob(p)}catch(w){throw new Error("Bug : can't construct the Blob.")}}};var m={stringifyByChunk:function(c,p,h){var k=[],w=0,x=c.length;if(x<=h)return String.fromCharCode.apply(null,c);for(;w<x;)p==="array"||p==="nodebuffer"?k.push(String.fromCharCode.apply(null,c.slice(w,Math.min(w+h,x)))):k.push(String.fromCharCode.apply(null,c.subarray(w,Math.min(w+h,x)))),w+=h;return k.join("")},stringifyByChar:function(c){for(var p="",h=0;h<c.length;h++)p+=String.fromCharCode(c[h]);return p},applyCanBeUsed:{uint8array:function(){try{return r.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(c){return!1}}(),nodebuffer:function(){try{return r.nodebuffer&&String.fromCharCode.apply(null,s.allocBuffer(1)).length===1}catch(c){return!1}}()}};function y(c){var p=65536,h=t.getTypeOf(c),k=!0;if(h==="uint8array"?k=m.applyCanBeUsed.uint8array:h==="nodebuffer"&&(k=m.applyCanBeUsed.nodebuffer),k)for(;1<p;)try{return m.stringifyByChunk(c,h,p)}catch(w){p=Math.floor(p/2)}return m.stringifyByChar(c)}function u(c,p){for(var h=0;h<c.length;h++)p[h]=c[h];return p}t.applyFromCharCode=y;var g={};g.string={string:d,array:function(c){return v(c,new Array(c.length))},arraybuffer:function(c){return g.string.uint8array(c).buffer},uint8array:function(c){return v(c,new Uint8Array(c.length))},nodebuffer:function(c){return v(c,s.allocBuffer(c.length))}},g.array={string:y,array:d,arraybuffer:function(c){return new Uint8Array(c).buffer},uint8array:function(c){return new Uint8Array(c)},nodebuffer:function(c){return s.newBufferFrom(c)}},g.arraybuffer={string:function(c){return y(new Uint8Array(c))},array:function(c){return u(new Uint8Array(c),new Array(c.byteLength))},arraybuffer:d,uint8array:function(c){return new Uint8Array(c)},nodebuffer:function(c){return s.newBufferFrom(new Uint8Array(c))}},g.uint8array={string:y,array:function(c){return u(c,new Array(c.length))},arraybuffer:function(c){return c.buffer},uint8array:d,nodebuffer:function(c){return s.newBufferFrom(c)}},g.nodebuffer={string:y,array:function(c){return u(c,new Array(c.length))},arraybuffer:function(c){return g.nodebuffer.uint8array(c).buffer},uint8array:function(c){return u(c,new Uint8Array(c.length))},nodebuffer:d},t.transformTo=function(c,p){if(p=p||"",!c)return p;t.checkSupport(c);var h=t.getTypeOf(p);return g[h][c](p)},t.resolve=function(c){for(var p=c.split("/"),h=[],k=0;k<p.length;k++){var w=p[k];w==="."||w===""&&k!==0&&k!==p.length-1||(w===".."?h.pop():h.push(w))}return h.join("/")},t.getTypeOf=function(c){return typeof c=="string"?"string":Object.prototype.toString.call(c)==="[object Array]"?"array":r.nodebuffer&&s.isBuffer(c)?"nodebuffer":r.uint8array&&c instanceof Uint8Array?"uint8array":r.arraybuffer&&c instanceof ArrayBuffer?"arraybuffer":void 0},t.checkSupport=function(c){if(!r[c.toLowerCase()])throw new Error(c+" is not supported by this platform")},t.MAX_VALUE_16BITS=65535,t.MAX_VALUE_32BITS=-1,t.pretty=function(c){var p,h,k="";for(h=0;h<(c||"").length;h++)k+="\\x"+((p=c.charCodeAt(h))<16?"0":"")+p.toString(16).toUpperCase();return k},t.delay=function(c,p,h){setImmediate(function(){c.apply(h||null,p||[])})},t.inherits=function(c,p){function h(){}h.prototype=p.prototype,c.prototype=new h},t.extend=function(){var c,p,h={};for(c=0;c<arguments.length;c++)for(p in arguments[c])Object.prototype.hasOwnProperty.call(arguments[c],p)&&h[p]===void 0&&(h[p]=arguments[c][p]);return h},t.prepareContent=function(c,p,h,k,w){return o.Promise.resolve(p).then(function(x){return r.blob&&(x instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(x))!==-1)&&typeof FileReader<"u"?new o.Promise(function(C,T){var O=new FileReader;O.onload=function(j){C(j.target.result)},O.onerror=function(j){T(j.target.error)},O.readAsArrayBuffer(x)}):x}).then(function(x){var C=t.getTypeOf(x);return C?(C==="arraybuffer"?x=t.transformTo("uint8array",x):C==="string"&&(w?x=n.decode(x):h&&k!==!0&&(x=function(T){return v(T,r.uint8array?new Uint8Array(T.length):new Array(T.length))}(x))),x):o.Promise.reject(new Error("Can't read the data of '"+c+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(a,e,t){"use strict";var r=a("./reader/readerFor"),n=a("./utils"),s=a("./signature"),o=a("./zipEntry"),d=a("./support");function v(m){this.files=[],this.loadOptions=m}v.prototype={checkSignature:function(m){if(!this.reader.readAndCheckSignature(m)){this.reader.index-=4;var y=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+n.pretty(y)+", expected "+n.pretty(m)+")")}},isSignature:function(m,y){var u=this.reader.index;this.reader.setIndex(m);var g=this.reader.readString(4)===y;return this.reader.setIndex(u),g},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),y=d.uint8array?"uint8array":"array",u=n.transformTo(y,m);this.zipComment=this.loadOptions.decodeFileName(u)},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,y,u,g=this.zip64EndOfCentralSize-44;0<g;)m=this.reader.readInt(2),y=this.reader.readInt(4),u=this.reader.readData(y),this.zip64ExtensibleData[m]={id:m,length:y,value:u}},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,y;for(m=0;m<this.files.length;m++)y=this.files[m],this.reader.setIndex(y.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),y.readLocalPart(this.reader),y.handleUTF8(),y.processAttributes()},readCentralDir:function(){var m;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(m=new o({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(s.CENTRAL_DIRECTORY_END);if(m<0)throw this.isSignature(0,s.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 y=m;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===n.MAX_VALUE_16BITS||this.centralDirRecords===n.MAX_VALUE_16BITS||this.centralDirSize===n.MAX_VALUE_32BITS||this.centralDirOffset===n.MAX_VALUE_32BITS){if(this.zip64=!0,(m=this.reader.lastIndexOfSignature(s.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(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.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(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var u=this.centralDirOffset+this.centralDirSize;this.zip64&&(u+=20,u+=12+this.zip64EndOfCentralSize);var g=y-u;if(0<g)this.isSignature(y,s.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(m){this.reader=r(m)},load:function(m){this.prepareReader(m),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=v},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(a,e,t){"use strict";var r=a("./reader/readerFor"),n=a("./utils"),s=a("./compressedObject"),o=a("./crc32"),d=a("./utf8"),v=a("./compressions"),m=a("./support");function y(u,g){this.options=u,this.loadOptions=g}y.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(u){var g,c;if(u.skip(22),this.fileNameLength=u.readInt(2),c=u.readInt(2),this.fileName=u.readData(this.fileNameLength),u.skip(c),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((g=function(p){for(var h in v)if(Object.prototype.hasOwnProperty.call(v,h)&&v[h].magic===p)return v[h];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+n.pretty(this.compressionMethod)+" unknown (inner file : "+n.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,g,u.readData(this.compressedSize))},readCentralPart:function(u){this.versionMadeBy=u.readInt(2),u.skip(2),this.bitFlag=u.readInt(2),this.compressionMethod=u.readString(2),this.date=u.readDate(),this.crc32=u.readInt(4),this.compressedSize=u.readInt(4),this.uncompressedSize=u.readInt(4);var g=u.readInt(2);if(this.extraFieldsLength=u.readInt(2),this.fileCommentLength=u.readInt(2),this.diskNumberStart=u.readInt(2),this.internalFileAttributes=u.readInt(2),this.externalFileAttributes=u.readInt(4),this.localHeaderOffset=u.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");u.skip(g),this.readExtraFields(u),this.parseZIP64ExtraField(u),this.fileComment=u.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var u=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),u==0&&(this.dosPermissions=63&this.externalFileAttributes),u==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var u=r(this.extraFields[1].value);this.uncompressedSize===n.MAX_VALUE_32BITS&&(this.uncompressedSize=u.readInt(8)),this.compressedSize===n.MAX_VALUE_32BITS&&(this.compressedSize=u.readInt(8)),this.localHeaderOffset===n.MAX_VALUE_32BITS&&(this.localHeaderOffset=u.readInt(8)),this.diskNumberStart===n.MAX_VALUE_32BITS&&(this.diskNumberStart=u.readInt(4))}},readExtraFields:function(u){var g,c,p,h=u.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});u.index+4<h;)g=u.readInt(2),c=u.readInt(2),p=u.readData(c),this.extraFields[g]={id:g,length:c,value:p};u.setIndex(h)},handleUTF8:function(){var u=m.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=d.utf8decode(this.fileName),this.fileCommentStr=d.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var c=n.transformTo(u,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(c)}var p=this.findExtraFieldUnicodeComment();if(p!==null)this.fileCommentStr=p;else{var h=n.transformTo(u,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(h)}}},findExtraFieldUnicodePath:function(){var u=this.extraFields[28789];if(u){var g=r(u.value);return g.readInt(1)!==1||o(this.fileName)!==g.readInt(4)?null:d.utf8decode(g.readData(u.length-5))}return null},findExtraFieldUnicodeComment:function(){var u=this.extraFields[25461];if(u){var g=r(u.value);return g.readInt(1)!==1||o(this.fileComment)!==g.readInt(4)?null:d.utf8decode(g.readData(u.length-5))}return null}},e.exports=y},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(a,e,t){"use strict";function r(g,c,p){this.name=g,this.dir=p.dir,this.date=p.date,this.comment=p.comment,this.unixPermissions=p.unixPermissions,this.dosPermissions=p.dosPermissions,this._data=c,this._dataBinary=p.binary,this.options={compression:p.compression,compressionOptions:p.compressionOptions}}var n=a("./stream/StreamHelper"),s=a("./stream/DataWorker"),o=a("./utf8"),d=a("./compressedObject"),v=a("./stream/GenericWorker");r.prototype={internalStream:function(g){var c=null,p="string";try{if(!g)throw new Error("No output type specified.");var h=(p=g.toLowerCase())==="string"||p==="text";p!=="binarystring"&&p!=="text"||(p="string"),c=this._decompressWorker();var k=!this._dataBinary;k&&!h&&(c=c.pipe(new o.Utf8EncodeWorker)),!k&&h&&(c=c.pipe(new o.Utf8DecodeWorker))}catch(w){(c=new v("error")).error(w)}return new n(c,p,"")},async:function(g,c){return this.internalStream(g).accumulate(c)},nodeStream:function(g,c){return this.internalStream(g||"nodebuffer").toNodejsStream(c)},_compressWorker:function(g,c){if(this._data instanceof d&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var p=this._decompressWorker();return this._dataBinary||(p=p.pipe(new o.Utf8EncodeWorker)),d.createWorkerFrom(p,g,c)},_decompressWorker:function(){return this._data instanceof d?this._data.getContentWorker():this._data instanceof v?this._data:new s(this._data)}};for(var m=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],y=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<m.length;u++)r.prototype[m[u]]=y;e.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(a,e,t){(function(r){"use strict";var n,s,o=r.MutationObserver||r.WebKitMutationObserver;if(o){var d=0,v=new o(g),m=r.document.createTextNode("");v.observe(m,{characterData:!0}),n=function(){m.data=d=++d%2}}else if(r.setImmediate||r.MessageChannel===void 0)n="document"in r&&"onreadystatechange"in r.document.createElement("script")?function(){var c=r.document.createElement("script");c.onreadystatechange=function(){g(),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},r.document.documentElement.appendChild(c)}:function(){setTimeout(g,0)};else{var y=new r.MessageChannel;y.port1.onmessage=g,n=function(){y.port2.postMessage(0)}}var u=[];function g(){var c,p;s=!0;for(var h=u.length;h;){for(p=u,u=[],c=-1;++c<h;)p[c]();h=u.length}s=!1}e.exports=function(c){u.push(c)!==1||s||n()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(a,e,t){"use strict";var r=a("immediate");function n(){}var s={},o=["REJECTED"],d=["FULFILLED"],v=["PENDING"];function m(h){if(typeof h!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,h!==n&&c(this,h)}function y(h,k,w){this.promise=h,typeof k=="function"&&(this.onFulfilled=k,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&&(this.onRejected=w,this.callRejected=this.otherCallRejected)}function u(h,k,w){r(function(){var x;try{x=k(w)}catch(C){return s.reject(h,C)}x===h?s.reject(h,new TypeError("Cannot resolve promise with itself")):s.resolve(h,x)})}function g(h){var k=h&&h.then;if(h&&(typeof h=="object"||typeof h=="function")&&typeof k=="function")return function(){k.apply(h,arguments)}}function c(h,k){var w=!1;function x(O){w||(w=!0,s.reject(h,O))}function C(O){w||(w=!0,s.resolve(h,O))}var T=p(function(){k(C,x)});T.status==="error"&&x(T.value)}function p(h,k){var w={};try{w.value=h(k),w.status="success"}catch(x){w.status="error",w.value=x}return w}(e.exports=m).prototype.finally=function(h){if(typeof h!="function")return this;var k=this.constructor;return this.then(function(w){return k.resolve(h()).then(function(){return w})},function(w){return k.resolve(h()).then(function(){throw w})})},m.prototype.catch=function(h){return this.then(null,h)},m.prototype.then=function(h,k){if(typeof h!="function"&&this.state===d||typeof k!="function"&&this.state===o)return this;var w=new this.constructor(n);return this.state!==v?u(w,this.state===d?h:k,this.outcome):this.queue.push(new y(w,h,k)),w},y.prototype.callFulfilled=function(h){s.resolve(this.promise,h)},y.prototype.otherCallFulfilled=function(h){u(this.promise,this.onFulfilled,h)},y.prototype.callRejected=function(h){s.reject(this.promise,h)},y.prototype.otherCallRejected=function(h){u(this.promise,this.onRejected,h)},s.resolve=function(h,k){var w=p(g,k);if(w.status==="error")return s.reject(h,w.value);var x=w.value;if(x)c(h,x);else{h.state=d,h.outcome=k;for(var C=-1,T=h.queue.length;++C<T;)h.queue[C].callFulfilled(k)}return h},s.reject=function(h,k){h.state=o,h.outcome=k;for(var w=-1,x=h.queue.length;++w<x;)h.queue[w].callRejected(k);return h},m.resolve=function(h){return h instanceof this?h:s.resolve(new this(n),h)},m.reject=function(h){var k=new this(n);return s.reject(k,h)},m.all=function(h){var k=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=h.length,x=!1;if(!w)return this.resolve([]);for(var C=new Array(w),T=0,O=-1,j=new this(n);++O<w;)B(h[O],O);return j;function B(Z,Y){k.resolve(Z).then(function(_){C[Y]=_,++T!==w||x||(x=!0,s.resolve(j,C))},function(_){x||(x=!0,s.reject(j,_))})}},m.race=function(h){var k=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=h.length,x=!1;if(!w)return this.resolve([]);for(var C=-1,T=new this(n);++C<w;)O=h[C],k.resolve(O).then(function(j){x||(x=!0,s.resolve(T,j))},function(j){x||(x=!0,s.reject(T,j))});var O;return T}},{immediate:36}],38:[function(a,e,t){"use strict";var r={};(0,a("./lib/utils/common").assign)(r,a("./lib/deflate"),a("./lib/inflate"),a("./lib/zlib/constants")),e.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(a,e,t){"use strict";var r=a("./zlib/deflate"),n=a("./utils/common"),s=a("./utils/strings"),o=a("./zlib/messages"),d=a("./zlib/zstream"),v=Object.prototype.toString,m=0,y=-1,u=0,g=8;function c(h){if(!(this instanceof c))return new c(h);this.options=n.assign({level:y,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},h||{});var k=this.options;k.raw&&0<k.windowBits?k.windowBits=-k.windowBits:k.gzip&&0<k.windowBits&&k.windowBits<16&&(k.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var w=r.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(w!==m)throw new Error(o[w]);if(k.header&&r.deflateSetHeader(this.strm,k.header),k.dictionary){var x;if(x=typeof k.dictionary=="string"?s.string2buf(k.dictionary):v.call(k.dictionary)==="[object ArrayBuffer]"?new Uint8Array(k.dictionary):k.dictionary,(w=r.deflateSetDictionary(this.strm,x))!==m)throw new Error(o[w]);this._dict_set=!0}}function p(h,k){var w=new c(k);if(w.push(h,!0),w.err)throw w.msg||o[w.err];return w.result}c.prototype.push=function(h,k){var w,x,C=this.strm,T=this.options.chunkSize;if(this.ended)return!1;x=k===~~k?k:k===!0?4:0,typeof h=="string"?C.input=s.string2buf(h):v.call(h)==="[object ArrayBuffer]"?C.input=new Uint8Array(h):C.input=h,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new n.Buf8(T),C.next_out=0,C.avail_out=T),(w=r.deflate(C,x))!==1&&w!==m)return this.onEnd(w),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||x!==4&&x!==2)||(this.options.to==="string"?this.onData(s.buf2binstring(n.shrinkBuf(C.output,C.next_out))):this.onData(n.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&w!==1);return x===4?(w=r.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===m):x!==2||(this.onEnd(m),!(C.avail_out=0))},c.prototype.onData=function(h){this.chunks.push(h)},c.prototype.onEnd=function(h){h===m&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=h,this.msg=this.strm.msg},t.Deflate=c,t.deflate=p,t.deflateRaw=function(h,k){return(k=k||{}).raw=!0,p(h,k)},t.gzip=function(h,k){return(k=k||{}).gzip=!0,p(h,k)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(a,e,t){"use strict";var r=a("./zlib/inflate"),n=a("./utils/common"),s=a("./utils/strings"),o=a("./zlib/constants"),d=a("./zlib/messages"),v=a("./zlib/zstream"),m=a("./zlib/gzheader"),y=Object.prototype.toString;function u(c){if(!(this instanceof u))return new u(c);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},c||{});var p=this.options;p.raw&&0<=p.windowBits&&p.windowBits<16&&(p.windowBits=-p.windowBits,p.windowBits===0&&(p.windowBits=-15)),!(0<=p.windowBits&&p.windowBits<16)||c&&c.windowBits||(p.windowBits+=32),15<p.windowBits&&p.windowBits<48&&!(15&p.windowBits)&&(p.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new v,this.strm.avail_out=0;var h=r.inflateInit2(this.strm,p.windowBits);if(h!==o.Z_OK)throw new Error(d[h]);this.header=new m,r.inflateGetHeader(this.strm,this.header)}function g(c,p){var h=new u(p);if(h.push(c,!0),h.err)throw h.msg||d[h.err];return h.result}u.prototype.push=function(c,p){var h,k,w,x,C,T,O=this.strm,j=this.options.chunkSize,B=this.options.dictionary,Z=!1;if(this.ended)return!1;k=p===~~p?p:p===!0?o.Z_FINISH:o.Z_NO_FLUSH,typeof c=="string"?O.input=s.binstring2buf(c):y.call(c)==="[object ArrayBuffer]"?O.input=new Uint8Array(c):O.input=c,O.next_in=0,O.avail_in=O.input.length;do{if(O.avail_out===0&&(O.output=new n.Buf8(j),O.next_out=0,O.avail_out=j),(h=r.inflate(O,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&B&&(T=typeof B=="string"?s.string2buf(B):y.call(B)==="[object ArrayBuffer]"?new Uint8Array(B):B,h=r.inflateSetDictionary(this.strm,T)),h===o.Z_BUF_ERROR&&Z===!0&&(h=o.Z_OK,Z=!1),h!==o.Z_STREAM_END&&h!==o.Z_OK)return this.onEnd(h),!(this.ended=!0);O.next_out&&(O.avail_out!==0&&h!==o.Z_STREAM_END&&(O.avail_in!==0||k!==o.Z_FINISH&&k!==o.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=s.utf8border(O.output,O.next_out),x=O.next_out-w,C=s.buf2string(O.output,w),O.next_out=x,O.avail_out=j-x,x&&n.arraySet(O.output,O.output,w,x,0),this.onData(C)):this.onData(n.shrinkBuf(O.output,O.next_out)))),O.avail_in===0&&O.avail_out===0&&(Z=!0)}while((0<O.avail_in||O.avail_out===0)&&h!==o.Z_STREAM_END);return h===o.Z_STREAM_END&&(k=o.Z_FINISH),k===o.Z_FINISH?(h=r.inflateEnd(this.strm),this.onEnd(h),this.ended=!0,h===o.Z_OK):k!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(O.avail_out=0))},u.prototype.onData=function(c){this.chunks.push(c)},u.prototype.onEnd=function(c){c===o.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=c,this.msg=this.strm.msg},t.Inflate=u,t.inflate=g,t.inflateRaw=function(c,p){return(p=p||{}).raw=!0,g(c,p)},t.ungzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(a,e,t){"use strict";var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";t.assign=function(o){for(var d=Array.prototype.slice.call(arguments,1);d.length;){var v=d.shift();if(v){if(typeof v!="object")throw new TypeError(v+"must be non-object");for(var m in v)v.hasOwnProperty(m)&&(o[m]=v[m])}}return o},t.shrinkBuf=function(o,d){return o.length===d?o:o.subarray?o.subarray(0,d):(o.length=d,o)};var n={arraySet:function(o,d,v,m,y){if(d.subarray&&o.subarray)o.set(d.subarray(v,v+m),y);else for(var u=0;u<m;u++)o[y+u]=d[v+u]},flattenChunks:function(o){var d,v,m,y,u,g;for(d=m=0,v=o.length;d<v;d++)m+=o[d].length;for(g=new Uint8Array(m),d=y=0,v=o.length;d<v;d++)u=o[d],g.set(u,y),y+=u.length;return g}},s={arraySet:function(o,d,v,m,y){for(var u=0;u<m;u++)o[y+u]=d[v+u]},flattenChunks:function(o){return[].concat.apply([],o)}};t.setTyped=function(o){o?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,n)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(r)},{}],42:[function(a,e,t){"use strict";var r=a("./common"),n=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(m){n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(m){s=!1}for(var o=new r.Buf8(256),d=0;d<256;d++)o[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;function v(m,y){if(y<65537&&(m.subarray&&s||!m.subarray&&n))return String.fromCharCode.apply(null,r.shrinkBuf(m,y));for(var u="",g=0;g<y;g++)u+=String.fromCharCode(m[g]);return u}o[254]=o[254]=1,t.string2buf=function(m){var y,u,g,c,p,h=m.length,k=0;for(c=0;c<h;c++)(64512&(u=m.charCodeAt(c)))==55296&&c+1<h&&(64512&(g=m.charCodeAt(c+1)))==56320&&(u=65536+(u-55296<<10)+(g-56320),c++),k+=u<128?1:u<2048?2:u<65536?3:4;for(y=new r.Buf8(k),c=p=0;p<k;c++)(64512&(u=m.charCodeAt(c)))==55296&&c+1<h&&(64512&(g=m.charCodeAt(c+1)))==56320&&(u=65536+(u-55296<<10)+(g-56320),c++),u<128?y[p++]=u:(u<2048?y[p++]=192|u>>>6:(u<65536?y[p++]=224|u>>>12:(y[p++]=240|u>>>18,y[p++]=128|u>>>12&63),y[p++]=128|u>>>6&63),y[p++]=128|63&u);return y},t.buf2binstring=function(m){return v(m,m.length)},t.binstring2buf=function(m){for(var y=new r.Buf8(m.length),u=0,g=y.length;u<g;u++)y[u]=m.charCodeAt(u);return y},t.buf2string=function(m,y){var u,g,c,p,h=y||m.length,k=new Array(2*h);for(u=g=0;u<h;)if((c=m[u++])<128)k[g++]=c;else if(4<(p=o[c]))k[g++]=65533,u+=p-1;else{for(c&=p===2?31:p===3?15:7;1<p&&u<h;)c=c<<6|63&m[u++],p--;1<p?k[g++]=65533:c<65536?k[g++]=c:(c-=65536,k[g++]=55296|c>>10&1023,k[g++]=56320|1023&c)}return v(k,g)},t.utf8border=function(m,y){var u;for((y=y||m.length)>m.length&&(y=m.length),u=y-1;0<=u&&(192&m[u])==128;)u--;return u<0||u===0?y:u+o[m[u]]>y?u:y}},{"./common":41}],43:[function(a,e,t){"use strict";e.exports=function(r,n,s,o){for(var d=65535&r|0,v=r>>>16&65535|0,m=0;s!==0;){for(s-=m=2e3<s?2e3:s;v=v+(d=d+n[o++]|0)|0,--m;);d%=65521,v%=65521}return d|v<<16|0}},{}],44:[function(a,e,t){"use strict";e.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(a,e,t){"use strict";var r=function(){for(var n,s=[],o=0;o<256;o++){n=o;for(var d=0;d<8;d++)n=1&n?3988292384^n>>>1:n>>>1;s[o]=n}return s}();e.exports=function(n,s,o,d){var v=r,m=d+o;n^=-1;for(var y=d;y<m;y++)n=n>>>8^v[255&(n^s[y])];return-1^n}},{}],46:[function(a,e,t){"use strict";var r,n=a("../utils/common"),s=a("./trees"),o=a("./adler32"),d=a("./crc32"),v=a("./messages"),m=0,y=4,u=0,g=-2,c=-1,p=4,h=2,k=8,w=9,x=286,C=30,T=19,O=2*x+1,j=15,B=3,Z=258,Y=Z+B+1,_=42,R=113,l=1,F=2,Q=3,U=4;function tt(i,I){return i.msg=v[I],I}function W(i){return(i<<1)-(4<i?9:0)}function J(i){for(var I=i.length;0<=--I;)i[I]=0}function N(i){var I=i.state,M=I.pending;M>i.avail_out&&(M=i.avail_out),M!==0&&(n.arraySet(i.output,I.pending_buf,I.pending_out,M,i.next_out),i.next_out+=M,I.pending_out+=M,i.total_out+=M,i.avail_out-=M,I.pending-=M,I.pending===0&&(I.pending_out=0))}function P(i,I){s._tr_flush_block(i,0<=i.block_start?i.block_start:-1,i.strstart-i.block_start,I),i.block_start=i.strstart,N(i.strm)}function K(i,I){i.pending_buf[i.pending++]=I}function G(i,I){i.pending_buf[i.pending++]=I>>>8&255,i.pending_buf[i.pending++]=255&I}function V(i,I){var M,b,f=i.max_chain_length,S=i.strstart,L=i.prev_length,D=i.nice_match,E=i.strstart>i.w_size-Y?i.strstart-(i.w_size-Y):0,$=i.window,X=i.w_mask,H=i.prev,q=i.strstart+Z,it=$[S+L-1],at=$[S+L];i.prev_length>=i.good_match&&(f>>=2),D>i.lookahead&&(D=i.lookahead);do if($[(M=I)+L]===at&&$[M+L-1]===it&&$[M]===$[S]&&$[++M]===$[S+1]){S+=2,M++;do;while($[++S]===$[++M]&&$[++S]===$[++M]&&$[++S]===$[++M]&&$[++S]===$[++M]&&$[++S]===$[++M]&&$[++S]===$[++M]&&$[++S]===$[++M]&&$[++S]===$[++M]&&S<q);if(b=Z-(q-S),S=q-Z,L<b){if(i.match_start=I,D<=(L=b))break;it=$[S+L-1],at=$[S+L]}}while((I=H[I&X])>E&&--f!=0);return L<=i.lookahead?L:i.lookahead}function ct(i){var I,M,b,f,S,L,D,E,$,X,H=i.w_size;do{if(f=i.window_size-i.lookahead-i.strstart,i.strstart>=H+(H-Y)){for(n.arraySet(i.window,i.window,H,H,0),i.match_start-=H,i.strstart-=H,i.block_start-=H,I=M=i.hash_size;b=i.head[--I],i.head[I]=H<=b?b-H:0,--M;);for(I=M=H;b=i.prev[--I],i.prev[I]=H<=b?b-H:0,--M;);f+=H}if(i.strm.avail_in===0)break;if(L=i.strm,D=i.window,E=i.strstart+i.lookahead,$=f,X=void 0,X=L.avail_in,$<X&&(X=$),M=X===0?0:(L.avail_in-=X,n.arraySet(D,L.input,L.next_in,X,E),L.state.wrap===1?L.adler=o(L.adler,D,X,E):L.state.wrap===2&&(L.adler=d(L.adler,D,X,E)),L.next_in+=X,L.total_in+=X,X),i.lookahead+=M,i.lookahead+i.insert>=B)for(S=i.strstart-i.insert,i.ins_h=i.window[S],i.ins_h=(i.ins_h<<i.hash_shift^i.window[S+1])&i.hash_mask;i.insert&&(i.ins_h=(i.ins_h<<i.hash_shift^i.window[S+B-1])&i.hash_mask,i.prev[S&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=S,S++,i.insert--,!(i.lookahead+i.insert<B)););}while(i.lookahead<Y&&i.strm.avail_in!==0)}function mt(i,I){for(var M,b;;){if(i.lookahead<Y){if(ct(i),i.lookahead<Y&&I===m)return l;if(i.lookahead===0)break}if(M=0,i.lookahead>=B&&(i.ins_h=(i.ins_h<<i.hash_shift^i.window[i.strstart+B-1])&i.hash_mask,M=i.prev[i.strstart&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=i.strstart),M!==0&&i.strstart-M<=i.w_size-Y&&(i.match_length=V(i,M)),i.match_length>=B)if(b=s._tr_tally(i,i.strstart-i.match_start,i.match_length-B),i.lookahead-=i.match_length,i.match_length<=i.max_lazy_match&&i.lookahead>=B){for(i.match_length--;i.strstart++,i.ins_h=(i.ins_h<<i.hash_shift^i.window[i.strstart+B-1])&i.hash_mask,M=i.prev[i.strstart&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=i.strstart,--i.match_length!=0;);i.strstart++}else i.strstart+=i.match_length,i.match_length=0,i.ins_h=i.window[i.strstart],i.ins_h=(i.ins_h<<i.hash_shift^i.window[i.strstart+1])&i.hash_mask;else b=s._tr_tally(i,0,i.window[i.strstart]),i.lookahead--,i.strstart++;if(b&&(P(i,!1),i.strm.avail_out===0))return l}return i.insert=i.strstart<B-1?i.strstart:B-1,I===y?(P(i,!0),i.strm.avail_out===0?Q:U):i.last_lit&&(P(i,!1),i.strm.avail_out===0)?l:F}function rt(i,I){for(var M,b,f;;){if(i.lookahead<Y){if(ct(i),i.lookahead<Y&&I===m)return l;if(i.lookahead===0)break}if(M=0,i.lookahead>=B&&(i.ins_h=(i.ins_h<<i.hash_shift^i.window[i.strstart+B-1])&i.hash_mask,M=i.prev[i.strstart&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=i.strstart),i.prev_length=i.match_length,i.prev_match=i.match_start,i.match_length=B-1,M!==0&&i.prev_length<i.max_lazy_match&&i.strstart-M<=i.w_size-Y&&(i.match_length=V(i,M),i.match_length<=5&&(i.strategy===1||i.match_length===B&&4096<i.strstart-i.match_start)&&(i.match_length=B-1)),i.prev_length>=B&&i.match_length<=i.prev_length){for(f=i.strstart+i.lookahead-B,b=s._tr_tally(i,i.strstart-1-i.prev_match,i.prev_length-B),i.lookahead-=i.prev_length-1,i.prev_length-=2;++i.strstart<=f&&(i.ins_h=(i.ins_h<<i.hash_shift^i.window[i.strstart+B-1])&i.hash_mask,M=i.prev[i.strstart&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=i.strstart),--i.prev_length!=0;);if(i.match_available=0,i.match_length=B-1,i.strstart++,b&&(P(i,!1),i.strm.avail_out===0))return l}else if(i.match_available){if((b=s._tr_tally(i,0,i.window[i.strstart-1]))&&P(i,!1),i.strstart++,i.lookahead--,i.strm.avail_out===0)return l}else i.match_available=1,i.strstart++,i.lookahead--}return i.match_available&&(b=s._tr_tally(i,0,i.window[i.strstart-1]),i.match_available=0),i.insert=i.strstart<B-1?i.strstart:B-1,I===y?(P(i,!0),i.strm.avail_out===0?Q:U):i.last_lit&&(P(i,!1),i.strm.avail_out===0)?l:F}function nt(i,I,M,b,f){this.good_length=i,this.max_lazy=I,this.nice_length=M,this.max_chain=b,this.func=f}function pt(){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=k,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 n.Buf16(2*O),this.dyn_dtree=new n.Buf16(2*(2*C+1)),this.bl_tree=new n.Buf16(2*(2*T+1)),J(this.dyn_ltree),J(this.dyn_dtree),J(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new n.Buf16(j+1),this.heap=new n.Buf16(2*x+1),J(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(2*x+1),J(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 ut(i){var I;return i&&i.state?(i.total_in=i.total_out=0,i.data_type=h,(I=i.state).pending=0,I.pending_out=0,I.wrap<0&&(I.wrap=-I.wrap),I.status=I.wrap?_:R,i.adler=I.wrap===2?0:1,I.last_flush=m,s._tr_init(I),u):tt(i,g)}function kt(i){var I=ut(i);return I===u&&function(M){M.window_size=2*M.w_size,J(M.head),M.max_lazy_match=r[M.level].max_lazy,M.good_match=r[M.level].good_length,M.nice_match=r[M.level].nice_length,M.max_chain_length=r[M.level].max_chain,M.strstart=0,M.block_start=0,M.lookahead=0,M.insert=0,M.match_length=M.prev_length=B-1,M.match_available=0,M.ins_h=0}(i.state),I}function yt(i,I,M,b,f,S){if(!i)return g;var L=1;if(I===c&&(I=6),b<0?(L=0,b=-b):15<b&&(L=2,b-=16),f<1||w<f||M!==k||b<8||15<b||I<0||9<I||S<0||p<S)return tt(i,g);b===8&&(b=9);var D=new pt;return(i.state=D).strm=i,D.wrap=L,D.gzhead=null,D.w_bits=b,D.w_size=1<<D.w_bits,D.w_mask=D.w_size-1,D.hash_bits=f+7,D.hash_size=1<<D.hash_bits,D.hash_mask=D.hash_size-1,D.hash_shift=~~((D.hash_bits+B-1)/B),D.window=new n.Buf8(2*D.w_size),D.head=new n.Buf16(D.hash_size),D.prev=new n.Buf16(D.w_size),D.lit_bufsize=1<<f+6,D.pending_buf_size=4*D.lit_bufsize,D.pending_buf=new n.Buf8(D.pending_buf_size),D.d_buf=1*D.lit_bufsize,D.l_buf=3*D.lit_bufsize,D.level=I,D.strategy=S,D.method=M,kt(i)}r=[new nt(0,0,0,0,function(i,I){var M=65535;for(M>i.pending_buf_size-5&&(M=i.pending_buf_size-5);;){if(i.lookahead<=1){if(ct(i),i.lookahead===0&&I===m)return l;if(i.lookahead===0)break}i.strstart+=i.lookahead,i.lookahead=0;var b=i.block_start+M;if((i.strstart===0||i.strstart>=b)&&(i.lookahead=i.strstart-b,i.strstart=b,P(i,!1),i.strm.avail_out===0)||i.strstart-i.block_start>=i.w_size-Y&&(P(i,!1),i.strm.avail_out===0))return l}return i.insert=0,I===y?(P(i,!0),i.strm.avail_out===0?Q:U):(i.strstart>i.block_start&&(P(i,!1),i.strm.avail_out),l)}),new nt(4,4,8,4,mt),new nt(4,5,16,8,mt),new nt(4,6,32,32,mt),new nt(4,4,16,16,rt),new nt(8,16,32,32,rt),new nt(8,16,128,128,rt),new nt(8,32,128,256,rt),new nt(32,128,258,1024,rt),new nt(32,258,258,4096,rt)],t.deflateInit=function(i,I){return yt(i,I,k,15,8,0)},t.deflateInit2=yt,t.deflateReset=kt,t.deflateResetKeep=ut,t.deflateSetHeader=function(i,I){return i&&i.state?i.state.wrap!==2?g:(i.state.gzhead=I,u):g},t.deflate=function(i,I){var M,b,f,S;if(!i||!i.state||5<I||I<0)return i?tt(i,g):g;if(b=i.state,!i.output||!i.input&&i.avail_in!==0||b.status===666&&I!==y)return tt(i,i.avail_out===0?-5:g);if(b.strm=i,M=b.last_flush,b.last_flush=I,b.status===_)if(b.wrap===2)i.adler=0,K(b,31),K(b,139),K(b,8),b.gzhead?(K(b,(b.gzhead.text?1:0)+(b.gzhead.hcrc?2:0)+(b.gzhead.extra?4:0)+(b.gzhead.name?8:0)+(b.gzhead.comment?16:0)),K(b,255&b.gzhead.time),K(b,b.gzhead.time>>8&255),K(b,b.gzhead.time>>16&255),K(b,b.gzhead.time>>24&255),K(b,b.level===9?2:2<=b.strategy||b.level<2?4:0),K(b,255&b.gzhead.os),b.gzhead.extra&&b.gzhead.extra.length&&(K(b,255&b.gzhead.extra.length),K(b,b.gzhead.extra.length>>8&255)),b.gzhead.hcrc&&(i.adler=d(i.adler,b.pending_buf,b.pending,0)),b.gzindex=0,b.status=69):(K(b,0),K(b,0),K(b,0),K(b,0),K(b,0),K(b,b.level===9?2:2<=b.strategy||b.level<2?4:0),K(b,3),b.status=R);else{var L=k+(b.w_bits-8<<4)<<8;L|=(2<=b.strategy||b.level<2?0:b.level<6?1:b.level===6?2:3)<<6,b.strstart!==0&&(L|=32),L+=31-L%31,b.status=R,G(b,L),b.strstart!==0&&(G(b,i.adler>>>16),G(b,65535&i.adler)),i.adler=1}if(b.status===69)if(b.gzhead.extra){for(f=b.pending;b.gzindex<(65535&b.gzhead.extra.length)&&(b.pending!==b.pending_buf_size||(b.gzhead.hcrc&&b.pending>f&&(i.adler=d(i.adler,b.pending_buf,b.pending-f,f)),N(i),f=b.pending,b.pending!==b.pending_buf_size));)K(b,255&b.gzhead.extra[b.gzindex]),b.gzindex++;b.gzhead.hcrc&&b.pending>f&&(i.adler=d(i.adler,b.pending_buf,b.pending-f,f)),b.gzindex===b.gzhead.extra.length&&(b.gzindex=0,b.status=73)}else b.status=73;if(b.status===73)if(b.gzhead.name){f=b.pending;do{if(b.pending===b.pending_buf_size&&(b.gzhead.hcrc&&b.pending>f&&(i.adler=d(i.adler,b.pending_buf,b.pending-f,f)),N(i),f=b.pending,b.pending===b.pending_buf_size)){S=1;break}S=b.gzindex<b.gzhead.name.length?255&b.gzhead.name.charCodeAt(b.gzindex++):0,K(b,S)}while(S!==0);b.gzhead.hcrc&&b.pending>f&&(i.adler=d(i.adler,b.pending_buf,b.pending-f,f)),S===0&&(b.gzindex=0,b.status=91)}else b.status=91;if(b.status===91)if(b.gzhead.comment){f=b.pending;do{if(b.pending===b.pending_buf_size&&(b.gzhead.hcrc&&b.pending>f&&(i.adler=d(i.adler,b.pending_buf,b.pending-f,f)),N(i),f=b.pending,b.pending===b.pending_buf_size)){S=1;break}S=b.gzindex<b.gzhead.comment.length?255&b.gzhead.comment.charCodeAt(b.gzindex++):0,K(b,S)}while(S!==0);b.gzhead.hcrc&&b.pending>f&&(i.adler=d(i.adler,b.pending_buf,b.pending-f,f)),S===0&&(b.status=103)}else b.status=103;if(b.status===103&&(b.gzhead.hcrc?(b.pending+2>b.pending_buf_size&&N(i),b.pending+2<=b.pending_buf_size&&(K(b,255&i.adler),K(b,i.adler>>8&255),i.adler=0,b.status=R)):b.status=R),b.pending!==0){if(N(i),i.avail_out===0)return b.last_flush=-1,u}else if(i.avail_in===0&&W(I)<=W(M)&&I!==y)return tt(i,-5);if(b.status===666&&i.avail_in!==0)return tt(i,-5);if(i.avail_in!==0||b.lookahead!==0||I!==m&&b.status!==666){var D=b.strategy===2?function(E,$){for(var X;;){if(E.lookahead===0&&(ct(E),E.lookahead===0)){if($===m)return l;break}if(E.match_length=0,X=s._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++,X&&(P(E,!1),E.strm.avail_out===0))return l}return E.insert=0,$===y?(P(E,!0),E.strm.avail_out===0?Q:U):E.last_lit&&(P(E,!1),E.strm.avail_out===0)?l:F}(b,I):b.strategy===3?function(E,$){for(var X,H,q,it,at=E.window;;){if(E.lookahead<=Z){if(ct(E),E.lookahead<=Z&&$===m)return l;if(E.lookahead===0)break}if(E.match_length=0,E.lookahead>=B&&0<E.strstart&&(H=at[q=E.strstart-1])===at[++q]&&H===at[++q]&&H===at[++q]){it=E.strstart+Z;do;while(H===at[++q]&&H===at[++q]&&H===at[++q]&&H===at[++q]&&H===at[++q]&&H===at[++q]&&H===at[++q]&&H===at[++q]&&q<it);E.match_length=Z-(it-q),E.match_length>E.lookahead&&(E.match_length=E.lookahead)}if(E.match_length>=B?(X=s._tr_tally(E,1,E.match_length-B),E.lookahead-=E.match_length,E.strstart+=E.match_length,E.match_length=0):(X=s._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++),X&&(P(E,!1),E.strm.avail_out===0))return l}return E.insert=0,$===y?(P(E,!0),E.strm.avail_out===0?Q:U):E.last_lit&&(P(E,!1),E.strm.avail_out===0)?l:F}(b,I):r[b.level].func(b,I);if(D!==Q&&D!==U||(b.status=666),D===l||D===Q)return i.avail_out===0&&(b.last_flush=-1),u;if(D===F&&(I===1?s._tr_align(b):I!==5&&(s._tr_stored_block(b,0,0,!1),I===3&&(J(b.head),b.lookahead===0&&(b.strstart=0,b.block_start=0,b.insert=0))),N(i),i.avail_out===0))return b.last_flush=-1,u}return I!==y?u:b.wrap<=0?1:(b.wrap===2?(K(b,255&i.adler),K(b,i.adler>>8&255),K(b,i.adler>>16&255),K(b,i.adler>>24&255),K(b,255&i.total_in),K(b,i.total_in>>8&255),K(b,i.total_in>>16&255),K(b,i.total_in>>24&255)):(G(b,i.adler>>>16),G(b,65535&i.adler)),N(i),0<b.wrap&&(b.wrap=-b.wrap),b.pending!==0?u:1)},t.deflateEnd=function(i){var I;return i&&i.state?(I=i.state.status)!==_&&I!==69&&I!==73&&I!==91&&I!==103&&I!==R&&I!==666?tt(i,g):(i.state=null,I===R?tt(i,-3):u):g},t.deflateSetDictionary=function(i,I){var M,b,f,S,L,D,E,$,X=I.length;if(!i||!i.state||(S=(M=i.state).wrap)===2||S===1&&M.status!==_||M.lookahead)return g;for(S===1&&(i.adler=o(i.adler,I,X,0)),M.wrap=0,X>=M.w_size&&(S===0&&(J(M.head),M.strstart=0,M.block_start=0,M.insert=0),$=new n.Buf8(M.w_size),n.arraySet($,I,X-M.w_size,M.w_size,0),I=$,X=M.w_size),L=i.avail_in,D=i.next_in,E=i.input,i.avail_in=X,i.next_in=0,i.input=I,ct(M);M.lookahead>=B;){for(b=M.strstart,f=M.lookahead-(B-1);M.ins_h=(M.ins_h<<M.hash_shift^M.window[b+B-1])&M.hash_mask,M.prev[b&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=b,b++,--f;);M.strstart=b,M.lookahead=B-1,ct(M)}return M.strstart+=M.lookahead,M.block_start=M.strstart,M.insert=M.lookahead,M.lookahead=0,M.match_length=M.prev_length=B-1,M.match_available=0,i.next_in=D,i.input=E,i.avail_in=L,M.wrap=S,u},t.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(a,e,t){"use strict";e.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(a,e,t){"use strict";e.exports=function(r,n){var s,o,d,v,m,y,u,g,c,p,h,k,w,x,C,T,O,j,B,Z,Y,_,R,l,F;s=r.state,o=r.next_in,l=r.input,d=o+(r.avail_in-5),v=r.next_out,F=r.output,m=v-(n-r.avail_out),y=v+(r.avail_out-257),u=s.dmax,g=s.wsize,c=s.whave,p=s.wnext,h=s.window,k=s.hold,w=s.bits,x=s.lencode,C=s.distcode,T=(1<<s.lenbits)-1,O=(1<<s.distbits)-1;t:do{w<15&&(k+=l[o++]<<w,w+=8,k+=l[o++]<<w,w+=8),j=x[k&T];e:for(;;){if(k>>>=B=j>>>24,w-=B,(B=j>>>16&255)===0)F[v++]=65535&j;else{if(!(16&B)){if(!(64&B)){j=x[(65535&j)+(k&(1<<B)-1)];continue e}if(32&B){s.mode=12;break t}r.msg="invalid literal/length code",s.mode=30;break t}Z=65535&j,(B&=15)&&(w<B&&(k+=l[o++]<<w,w+=8),Z+=k&(1<<B)-1,k>>>=B,w-=B),w<15&&(k+=l[o++]<<w,w+=8,k+=l[o++]<<w,w+=8),j=C[k&O];r:for(;;){if(k>>>=B=j>>>24,w-=B,!(16&(B=j>>>16&255))){if(!(64&B)){j=C[(65535&j)+(k&(1<<B)-1)];continue r}r.msg="invalid distance code",s.mode=30;break t}if(Y=65535&j,w<(B&=15)&&(k+=l[o++]<<w,(w+=8)<B&&(k+=l[o++]<<w,w+=8)),u<(Y+=k&(1<<B)-1)){r.msg="invalid distance too far back",s.mode=30;break t}if(k>>>=B,w-=B,(B=v-m)<Y){if(c<(B=Y-B)&&s.sane){r.msg="invalid distance too far back",s.mode=30;break t}if(R=h,(_=0)===p){if(_+=g-B,B<Z){for(Z-=B;F[v++]=h[_++],--B;);_=v-Y,R=F}}else if(p<B){if(_+=g+p-B,(B-=p)<Z){for(Z-=B;F[v++]=h[_++],--B;);if(_=0,p<Z){for(Z-=B=p;F[v++]=h[_++],--B;);_=v-Y,R=F}}}else if(_+=p-B,B<Z){for(Z-=B;F[v++]=h[_++],--B;);_=v-Y,R=F}for(;2<Z;)F[v++]=R[_++],F[v++]=R[_++],F[v++]=R[_++],Z-=3;Z&&(F[v++]=R[_++],1<Z&&(F[v++]=R[_++]))}else{for(_=v-Y;F[v++]=F[_++],F[v++]=F[_++],F[v++]=F[_++],2<(Z-=3););Z&&(F[v++]=F[_++],1<Z&&(F[v++]=F[_++]))}break}}break}}while(o<d&&v<y);o-=Z=w>>3,k&=(1<<(w-=Z<<3))-1,r.next_in=o,r.next_out=v,r.avail_in=o<d?d-o+5:5-(o-d),r.avail_out=v<y?y-v+257:257-(v-y),s.hold=k,s.bits=w}},{}],49:[function(a,e,t){"use strict";var r=a("../utils/common"),n=a("./adler32"),s=a("./crc32"),o=a("./inffast"),d=a("./inftrees"),v=1,m=2,y=0,u=-2,g=1,c=852,p=592;function h(_){return(_>>>24&255)+(_>>>8&65280)+((65280&_)<<8)+((255&_)<<24)}function k(){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 r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(_){var R;return _&&_.state?(R=_.state,_.total_in=_.total_out=R.total=0,_.msg="",R.wrap&&(_.adler=1&R.wrap),R.mode=g,R.last=0,R.havedict=0,R.dmax=32768,R.head=null,R.hold=0,R.bits=0,R.lencode=R.lendyn=new r.Buf32(c),R.distcode=R.distdyn=new r.Buf32(p),R.sane=1,R.back=-1,y):u}function x(_){var R;return _&&_.state?((R=_.state).wsize=0,R.whave=0,R.wnext=0,w(_)):u}function C(_,R){var l,F;return _&&_.state?(F=_.state,R<0?(l=0,R=-R):(l=1+(R>>4),R<48&&(R&=15)),R&&(R<8||15<R)?u:(F.window!==null&&F.wbits!==R&&(F.window=null),F.wrap=l,F.wbits=R,x(_))):u}function T(_,R){var l,F;return _?(F=new k,(_.state=F).window=null,(l=C(_,R))!==y&&(_.state=null),l):u}var O,j,B=!0;function Z(_){if(B){var R;for(O=new r.Buf32(512),j=new r.Buf32(32),R=0;R<144;)_.lens[R++]=8;for(;R<256;)_.lens[R++]=9;for(;R<280;)_.lens[R++]=7;for(;R<288;)_.lens[R++]=8;for(d(v,_.lens,0,288,O,0,_.work,{bits:9}),R=0;R<32;)_.lens[R++]=5;d(m,_.lens,0,32,j,0,_.work,{bits:5}),B=!1}_.lencode=O,_.lenbits=9,_.distcode=j,_.distbits=5}function Y(_,R,l,F){var Q,U=_.state;return U.window===null&&(U.wsize=1<<U.wbits,U.wnext=0,U.whave=0,U.window=new r.Buf8(U.wsize)),F>=U.wsize?(r.arraySet(U.window,R,l-U.wsize,U.wsize,0),U.wnext=0,U.whave=U.wsize):(F<(Q=U.wsize-U.wnext)&&(Q=F),r.arraySet(U.window,R,l-F,Q,U.wnext),(F-=Q)?(r.arraySet(U.window,R,l-F,F,0),U.wnext=F,U.whave=U.wsize):(U.wnext+=Q,U.wnext===U.wsize&&(U.wnext=0),U.whave<U.wsize&&(U.whave+=Q))),0}t.inflateReset=x,t.inflateReset2=C,t.inflateResetKeep=w,t.inflateInit=function(_){return T(_,15)},t.inflateInit2=T,t.inflate=function(_,R){var l,F,Q,U,tt,W,J,N,P,K,G,V,ct,mt,rt,nt,pt,ut,kt,yt,i,I,M,b,f=0,S=new r.Buf8(4),L=[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 u;(l=_.state).mode===12&&(l.mode=13),tt=_.next_out,Q=_.output,J=_.avail_out,U=_.next_in,F=_.input,W=_.avail_in,N=l.hold,P=l.bits,K=W,G=J,I=y;t:for(;;)switch(l.mode){case g:if(l.wrap===0){l.mode=13;break}for(;P<16;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}if(2&l.wrap&&N===35615){S[l.check=0]=255&N,S[1]=N>>>8&255,l.check=s(l.check,S,2,0),P=N=0,l.mode=2;break}if(l.flags=0,l.head&&(l.head.done=!1),!(1&l.wrap)||(((255&N)<<8)+(N>>8))%31){_.msg="incorrect header check",l.mode=30;break}if((15&N)!=8){_.msg="unknown compression method",l.mode=30;break}if(P-=4,i=8+(15&(N>>>=4)),l.wbits===0)l.wbits=i;else if(i>l.wbits){_.msg="invalid window size",l.mode=30;break}l.dmax=1<<i,_.adler=l.check=1,l.mode=512&N?10:12,P=N=0;break;case 2:for(;P<16;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}if(l.flags=N,(255&l.flags)!=8){_.msg="unknown compression method",l.mode=30;break}if(57344&l.flags){_.msg="unknown header flags set",l.mode=30;break}l.head&&(l.head.text=N>>8&1),512&l.flags&&(S[0]=255&N,S[1]=N>>>8&255,l.check=s(l.check,S,2,0)),P=N=0,l.mode=3;case 3:for(;P<32;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}l.head&&(l.head.time=N),512&l.flags&&(S[0]=255&N,S[1]=N>>>8&255,S[2]=N>>>16&255,S[3]=N>>>24&255,l.check=s(l.check,S,4,0)),P=N=0,l.mode=4;case 4:for(;P<16;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}l.head&&(l.head.xflags=255&N,l.head.os=N>>8),512&l.flags&&(S[0]=255&N,S[1]=N>>>8&255,l.check=s(l.check,S,2,0)),P=N=0,l.mode=5;case 5:if(1024&l.flags){for(;P<16;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}l.length=N,l.head&&(l.head.extra_len=N),512&l.flags&&(S[0]=255&N,S[1]=N>>>8&255,l.check=s(l.check,S,2,0)),P=N=0}else l.head&&(l.head.extra=null);l.mode=6;case 6:if(1024&l.flags&&(W<(V=l.length)&&(V=W),V&&(l.head&&(i=l.head.extra_len-l.length,l.head.extra||(l.head.extra=new Array(l.head.extra_len)),r.arraySet(l.head.extra,F,U,V,i)),512&l.flags&&(l.check=s(l.check,F,V,U)),W-=V,U+=V,l.length-=V),l.length))break t;l.length=0,l.mode=7;case 7:if(2048&l.flags){if(W===0)break t;for(V=0;i=F[U+V++],l.head&&i&&l.length<65536&&(l.head.name+=String.fromCharCode(i)),i&&V<W;);if(512&l.flags&&(l.check=s(l.check,F,V,U)),W-=V,U+=V,i)break t}else l.head&&(l.head.name=null);l.length=0,l.mode=8;case 8:if(4096&l.flags){if(W===0)break t;for(V=0;i=F[U+V++],l.head&&i&&l.length<65536&&(l.head.comment+=String.fromCharCode(i)),i&&V<W;);if(512&l.flags&&(l.check=s(l.check,F,V,U)),W-=V,U+=V,i)break t}else l.head&&(l.head.comment=null);l.mode=9;case 9:if(512&l.flags){for(;P<16;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}if(N!==(65535&l.check)){_.msg="header crc mismatch",l.mode=30;break}P=N=0}l.head&&(l.head.hcrc=l.flags>>9&1,l.head.done=!0),_.adler=l.check=0,l.mode=12;break;case 10:for(;P<32;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}_.adler=l.check=h(N),P=N=0,l.mode=11;case 11:if(l.havedict===0)return _.next_out=tt,_.avail_out=J,_.next_in=U,_.avail_in=W,l.hold=N,l.bits=P,2;_.adler=l.check=1,l.mode=12;case 12:if(R===5||R===6)break t;case 13:if(l.last){N>>>=7&P,P-=7&P,l.mode=27;break}for(;P<3;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}switch(l.last=1&N,P-=1,3&(N>>>=1)){case 0:l.mode=14;break;case 1:if(Z(l),l.mode=20,R!==6)break;N>>>=2,P-=2;break t;case 2:l.mode=17;break;case 3:_.msg="invalid block type",l.mode=30}N>>>=2,P-=2;break;case 14:for(N>>>=7&P,P-=7&P;P<32;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}if((65535&N)!=(N>>>16^65535)){_.msg="invalid stored block lengths",l.mode=30;break}if(l.length=65535&N,P=N=0,l.mode=15,R===6)break t;case 15:l.mode=16;case 16:if(V=l.length){if(W<V&&(V=W),J<V&&(V=J),V===0)break t;r.arraySet(Q,F,U,V,tt),W-=V,U+=V,J-=V,tt+=V,l.length-=V;break}l.mode=12;break;case 17:for(;P<14;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}if(l.nlen=257+(31&N),N>>>=5,P-=5,l.ndist=1+(31&N),N>>>=5,P-=5,l.ncode=4+(15&N),N>>>=4,P-=4,286<l.nlen||30<l.ndist){_.msg="too many length or distance symbols",l.mode=30;break}l.have=0,l.mode=18;case 18:for(;l.have<l.ncode;){for(;P<3;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}l.lens[L[l.have++]]=7&N,N>>>=3,P-=3}for(;l.have<19;)l.lens[L[l.have++]]=0;if(l.lencode=l.lendyn,l.lenbits=7,M={bits:l.lenbits},I=d(0,l.lens,0,19,l.lencode,0,l.work,M),l.lenbits=M.bits,I){_.msg="invalid code lengths set",l.mode=30;break}l.have=0,l.mode=19;case 19:for(;l.have<l.nlen+l.ndist;){for(;nt=(f=l.lencode[N&(1<<l.lenbits)-1])>>>16&255,pt=65535&f,!((rt=f>>>24)<=P);){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}if(pt<16)N>>>=rt,P-=rt,l.lens[l.have++]=pt;else{if(pt===16){for(b=rt+2;P<b;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}if(N>>>=rt,P-=rt,l.have===0){_.msg="invalid bit length repeat",l.mode=30;break}i=l.lens[l.have-1],V=3+(3&N),N>>>=2,P-=2}else if(pt===17){for(b=rt+3;P<b;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}P-=rt,i=0,V=3+(7&(N>>>=rt)),N>>>=3,P-=3}else{for(b=rt+7;P<b;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}P-=rt,i=0,V=11+(127&(N>>>=rt)),N>>>=7,P-=7}if(l.have+V>l.nlen+l.ndist){_.msg="invalid bit length repeat",l.mode=30;break}for(;V--;)l.lens[l.have++]=i}}if(l.mode===30)break;if(l.lens[256]===0){_.msg="invalid code -- missing end-of-block",l.mode=30;break}if(l.lenbits=9,M={bits:l.lenbits},I=d(v,l.lens,0,l.nlen,l.lencode,0,l.work,M),l.lenbits=M.bits,I){_.msg="invalid literal/lengths set",l.mode=30;break}if(l.distbits=6,l.distcode=l.distdyn,M={bits:l.distbits},I=d(m,l.lens,l.nlen,l.ndist,l.distcode,0,l.work,M),l.distbits=M.bits,I){_.msg="invalid distances set",l.mode=30;break}if(l.mode=20,R===6)break t;case 20:l.mode=21;case 21:if(6<=W&&258<=J){_.next_out=tt,_.avail_out=J,_.next_in=U,_.avail_in=W,l.hold=N,l.bits=P,o(_,G),tt=_.next_out,Q=_.output,J=_.avail_out,U=_.next_in,F=_.input,W=_.avail_in,N=l.hold,P=l.bits,l.mode===12&&(l.back=-1);break}for(l.back=0;nt=(f=l.lencode[N&(1<<l.lenbits)-1])>>>16&255,pt=65535&f,!((rt=f>>>24)<=P);){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}if(nt&&!(240&nt)){for(ut=rt,kt=nt,yt=pt;nt=(f=l.lencode[yt+((N&(1<<ut+kt)-1)>>ut)])>>>16&255,pt=65535&f,!(ut+(rt=f>>>24)<=P);){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}N>>>=ut,P-=ut,l.back+=ut}if(N>>>=rt,P-=rt,l.back+=rt,l.length=pt,nt===0){l.mode=26;break}if(32&nt){l.back=-1,l.mode=12;break}if(64&nt){_.msg="invalid literal/length code",l.mode=30;break}l.extra=15&nt,l.mode=22;case 22:if(l.extra){for(b=l.extra;P<b;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}l.length+=N&(1<<l.extra)-1,N>>>=l.extra,P-=l.extra,l.back+=l.extra}l.was=l.length,l.mode=23;case 23:for(;nt=(f=l.distcode[N&(1<<l.distbits)-1])>>>16&255,pt=65535&f,!((rt=f>>>24)<=P);){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}if(!(240&nt)){for(ut=rt,kt=nt,yt=pt;nt=(f=l.distcode[yt+((N&(1<<ut+kt)-1)>>ut)])>>>16&255,pt=65535&f,!(ut+(rt=f>>>24)<=P);){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}N>>>=ut,P-=ut,l.back+=ut}if(N>>>=rt,P-=rt,l.back+=rt,64&nt){_.msg="invalid distance code",l.mode=30;break}l.offset=pt,l.extra=15&nt,l.mode=24;case 24:if(l.extra){for(b=l.extra;P<b;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}l.offset+=N&(1<<l.extra)-1,N>>>=l.extra,P-=l.extra,l.back+=l.extra}if(l.offset>l.dmax){_.msg="invalid distance too far back",l.mode=30;break}l.mode=25;case 25:if(J===0)break t;if(V=G-J,l.offset>V){if((V=l.offset-V)>l.whave&&l.sane){_.msg="invalid distance too far back",l.mode=30;break}ct=V>l.wnext?(V-=l.wnext,l.wsize-V):l.wnext-V,V>l.length&&(V=l.length),mt=l.window}else mt=Q,ct=tt-l.offset,V=l.length;for(J<V&&(V=J),J-=V,l.length-=V;Q[tt++]=mt[ct++],--V;);l.length===0&&(l.mode=21);break;case 26:if(J===0)break t;Q[tt++]=l.length,J--,l.mode=21;break;case 27:if(l.wrap){for(;P<32;){if(W===0)break t;W--,N|=F[U++]<<P,P+=8}if(G-=J,_.total_out+=G,l.total+=G,G&&(_.adler=l.check=l.flags?s(l.check,Q,G,tt-G):n(l.check,Q,G,tt-G)),G=J,(l.flags?N:h(N))!==l.check){_.msg="incorrect data check",l.mode=30;break}P=N=0}l.mode=28;case 28:if(l.wrap&&l.flags){for(;P<32;){if(W===0)break t;W--,N+=F[U++]<<P,P+=8}if(N!==(4294967295&l.total)){_.msg="incorrect length check",l.mode=30;break}P=N=0}l.mode=29;case 29:I=1;break t;case 30:I=-3;break t;case 31:return-4;case 32:default:return u}return _.next_out=tt,_.avail_out=J,_.next_in=U,_.avail_in=W,l.hold=N,l.bits=P,(l.wsize||G!==_.avail_out&&l.mode<30&&(l.mode<27||R!==4))&&Y(_,_.output,_.next_out,G-_.avail_out)?(l.mode=31,-4):(K-=_.avail_in,G-=_.avail_out,_.total_in+=K,_.total_out+=G,l.total+=G,l.wrap&&G&&(_.adler=l.check=l.flags?s(l.check,Q,G,_.next_out-G):n(l.check,Q,G,_.next_out-G)),_.data_type=l.bits+(l.last?64:0)+(l.mode===12?128:0)+(l.mode===20||l.mode===15?256:0),(K==0&&G===0||R===4)&&I===y&&(I=-5),I)},t.inflateEnd=function(_){if(!_||!_.state)return u;var R=_.state;return R.window&&(R.window=null),_.state=null,y},t.inflateGetHeader=function(_,R){var l;return _&&_.state&&2&(l=_.state).wrap?((l.head=R).done=!1,y):u},t.inflateSetDictionary=function(_,R){var l,F=R.length;return _&&_.state?(l=_.state).wrap!==0&&l.mode!==11?u:l.mode===11&&n(1,R,F,0)!==l.check?-3:Y(_,R,F,F)?(l.mode=31,-4):(l.havedict=1,y):u},t.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(a,e,t){"use strict";var r=a("../utils/common"),n=[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],s=[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],o=[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],d=[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];e.exports=function(v,m,y,u,g,c,p,h){var k,w,x,C,T,O,j,B,Z,Y=h.bits,_=0,R=0,l=0,F=0,Q=0,U=0,tt=0,W=0,J=0,N=0,P=null,K=0,G=new r.Buf16(16),V=new r.Buf16(16),ct=null,mt=0;for(_=0;_<=15;_++)G[_]=0;for(R=0;R<u;R++)G[m[y+R]]++;for(Q=Y,F=15;1<=F&&G[F]===0;F--);if(F<Q&&(Q=F),F===0)return g[c++]=20971520,g[c++]=20971520,h.bits=1,0;for(l=1;l<F&&G[l]===0;l++);for(Q<l&&(Q=l),_=W=1;_<=15;_++)if(W<<=1,(W-=G[_])<0)return-1;if(0<W&&(v===0||F!==1))return-1;for(V[1]=0,_=1;_<15;_++)V[_+1]=V[_]+G[_];for(R=0;R<u;R++)m[y+R]!==0&&(p[V[m[y+R]]++]=R);if(O=v===0?(P=ct=p,19):v===1?(P=n,K-=257,ct=s,mt-=257,256):(P=o,ct=d,-1),_=l,T=c,tt=R=N=0,x=-1,C=(J=1<<(U=Q))-1,v===1&&852<J||v===2&&592<J)return 1;for(;;){for(j=_-tt,Z=p[R]<O?(B=0,p[R]):p[R]>O?(B=ct[mt+p[R]],P[K+p[R]]):(B=96,0),k=1<<_-tt,l=w=1<<U;g[T+(N>>tt)+(w-=k)]=j<<24|B<<16|Z|0,w!==0;);for(k=1<<_-1;N&k;)k>>=1;if(k!==0?(N&=k-1,N+=k):N=0,R++,--G[_]==0){if(_===F)break;_=m[y+p[R]]}if(Q<_&&(N&C)!==x){for(tt===0&&(tt=Q),T+=l,W=1<<(U=_-tt);U+tt<F&&!((W-=G[U+tt])<=0);)U++,W<<=1;if(J+=1<<U,v===1&&852<J||v===2&&592<J)return 1;g[x=N&C]=Q<<24|U<<16|T-c|0}}return N!==0&&(g[T+N]=_-tt<<24|64<<16|0),h.bits=Q,0}},{"../utils/common":41}],51:[function(a,e,t){"use strict";e.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(a,e,t){"use strict";var r=a("../utils/common"),n=0,s=1;function o(f){for(var S=f.length;0<=--S;)f[S]=0}var d=0,v=29,m=256,y=m+1+v,u=30,g=19,c=2*y+1,p=15,h=16,k=7,w=256,x=16,C=17,T=18,O=[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],j=[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],B=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=new Array(2*(y+2));o(Y);var _=new Array(2*u);o(_);var R=new Array(512);o(R);var l=new Array(256);o(l);var F=new Array(v);o(F);var Q,U,tt,W=new Array(u);function J(f,S,L,D,E){this.static_tree=f,this.extra_bits=S,this.extra_base=L,this.elems=D,this.max_length=E,this.has_stree=f&&f.length}function N(f,S){this.dyn_tree=f,this.max_code=0,this.stat_desc=S}function P(f){return f<256?R[f]:R[256+(f>>>7)]}function K(f,S){f.pending_buf[f.pending++]=255&S,f.pending_buf[f.pending++]=S>>>8&255}function G(f,S,L){f.bi_valid>h-L?(f.bi_buf|=S<<f.bi_valid&65535,K(f,f.bi_buf),f.bi_buf=S>>h-f.bi_valid,f.bi_valid+=L-h):(f.bi_buf|=S<<f.bi_valid&65535,f.bi_valid+=L)}function V(f,S,L){G(f,L[2*S],L[2*S+1])}function ct(f,S){for(var L=0;L|=1&f,f>>>=1,L<<=1,0<--S;);return L>>>1}function mt(f,S,L){var D,E,$=new Array(p+1),X=0;for(D=1;D<=p;D++)$[D]=X=X+L[D-1]<<1;for(E=0;E<=S;E++){var H=f[2*E+1];H!==0&&(f[2*E]=ct($[H]++,H))}}function rt(f){var S;for(S=0;S<y;S++)f.dyn_ltree[2*S]=0;for(S=0;S<u;S++)f.dyn_dtree[2*S]=0;for(S=0;S<g;S++)f.bl_tree[2*S]=0;f.dyn_ltree[2*w]=1,f.opt_len=f.static_len=0,f.last_lit=f.matches=0}function nt(f){8<f.bi_valid?K(f,f.bi_buf):0<f.bi_valid&&(f.pending_buf[f.pending++]=f.bi_buf),f.bi_buf=0,f.bi_valid=0}function pt(f,S,L,D){var E=2*S,$=2*L;return f[E]<f[$]||f[E]===f[$]&&D[S]<=D[L]}function ut(f,S,L){for(var D=f.heap[L],E=L<<1;E<=f.heap_len&&(E<f.heap_len&&pt(S,f.heap[E+1],f.heap[E],f.depth)&&E++,!pt(S,D,f.heap[E],f.depth));)f.heap[L]=f.heap[E],L=E,E<<=1;f.heap[L]=D}function kt(f,S,L){var D,E,$,X,H=0;if(f.last_lit!==0)for(;D=f.pending_buf[f.d_buf+2*H]<<8|f.pending_buf[f.d_buf+2*H+1],E=f.pending_buf[f.l_buf+H],H++,D===0?V(f,E,S):(V(f,($=l[E])+m+1,S),(X=O[$])!==0&&G(f,E-=F[$],X),V(f,$=P(--D),L),(X=j[$])!==0&&G(f,D-=W[$],X)),H<f.last_lit;);V(f,w,S)}function yt(f,S){var L,D,E,$=S.dyn_tree,X=S.stat_desc.static_tree,H=S.stat_desc.has_stree,q=S.stat_desc.elems,it=-1;for(f.heap_len=0,f.heap_max=c,L=0;L<q;L++)$[2*L]!==0?(f.heap[++f.heap_len]=it=L,f.depth[L]=0):$[2*L+1]=0;for(;f.heap_len<2;)$[2*(E=f.heap[++f.heap_len]=it<2?++it:0)]=1,f.depth[E]=0,f.opt_len--,H&&(f.static_len-=X[2*E+1]);for(S.max_code=it,L=f.heap_len>>1;1<=L;L--)ut(f,$,L);for(E=q;L=f.heap[1],f.heap[1]=f.heap[f.heap_len--],ut(f,$,1),D=f.heap[1],f.heap[--f.heap_max]=L,f.heap[--f.heap_max]=D,$[2*E]=$[2*L]+$[2*D],f.depth[E]=(f.depth[L]>=f.depth[D]?f.depth[L]:f.depth[D])+1,$[2*L+1]=$[2*D+1]=E,f.heap[1]=E++,ut(f,$,1),2<=f.heap_len;);f.heap[--f.heap_max]=f.heap[1],function(at,vt){var Ct,_t,At,ht,Rt,Zt,wt=vt.dyn_tree,Se=vt.max_code,rr=vt.stat_desc.static_tree,ar=vt.stat_desc.has_stree,nr=vt.stat_desc.extra_bits,xe=vt.stat_desc.extra_base,Et=vt.stat_desc.max_length,It=0;for(ht=0;ht<=p;ht++)at.bl_count[ht]=0;for(wt[2*at.heap[at.heap_max]+1]=0,Ct=at.heap_max+1;Ct<c;Ct++)Et<(ht=wt[2*wt[2*(_t=at.heap[Ct])+1]+1]+1)&&(ht=Et,It++),wt[2*_t+1]=ht,Se<_t||(at.bl_count[ht]++,Rt=0,xe<=_t&&(Rt=nr[_t-xe]),Zt=wt[2*_t],at.opt_len+=Zt*(ht+Rt),ar&&(at.static_len+=Zt*(rr[2*_t+1]+Rt)));if(It!==0){do{for(ht=Et-1;at.bl_count[ht]===0;)ht--;at.bl_count[ht]--,at.bl_count[ht+1]+=2,at.bl_count[Et]--,It-=2}while(0<It);for(ht=Et;ht!==0;ht--)for(_t=at.bl_count[ht];_t!==0;)Se<(At=at.heap[--Ct])||(wt[2*At+1]!==ht&&(at.opt_len+=(ht-wt[2*At+1])*wt[2*At],wt[2*At+1]=ht),_t--)}}(f,S),mt($,it,f.bl_count)}function i(f,S,L){var D,E,$=-1,X=S[1],H=0,q=7,it=4;for(X===0&&(q=138,it=3),S[2*(L+1)+1]=65535,D=0;D<=L;D++)E=X,X=S[2*(D+1)+1],++H<q&&E===X||(H<it?f.bl_tree[2*E]+=H:E!==0?(E!==$&&f.bl_tree[2*E]++,f.bl_tree[2*x]++):H<=10?f.bl_tree[2*C]++:f.bl_tree[2*T]++,$=E,it=(H=0)===X?(q=138,3):E===X?(q=6,3):(q=7,4))}function I(f,S,L){var D,E,$=-1,X=S[1],H=0,q=7,it=4;for(X===0&&(q=138,it=3),D=0;D<=L;D++)if(E=X,X=S[2*(D+1)+1],!(++H<q&&E===X)){if(H<it)for(;V(f,E,f.bl_tree),--H!=0;);else E!==0?(E!==$&&(V(f,E,f.bl_tree),H--),V(f,x,f.bl_tree),G(f,H-3,2)):H<=10?(V(f,C,f.bl_tree),G(f,H-3,3)):(V(f,T,f.bl_tree),G(f,H-11,7));$=E,it=(H=0)===X?(q=138,3):E===X?(q=6,3):(q=7,4)}}o(W);var M=!1;function b(f,S,L,D){G(f,(d<<1)+(D?1:0),3),function(E,$,X,H){nt(E),H&&(K(E,X),K(E,~X)),r.arraySet(E.pending_buf,E.window,$,X,E.pending),E.pending+=X}(f,S,L,!0)}t._tr_init=function(f){M||(function(){var S,L,D,E,$,X=new Array(p+1);for(E=D=0;E<v-1;E++)for(F[E]=D,S=0;S<1<<O[E];S++)l[D++]=E;for(l[D-1]=E,E=$=0;E<16;E++)for(W[E]=$,S=0;S<1<<j[E];S++)R[$++]=E;for($>>=7;E<u;E++)for(W[E]=$<<7,S=0;S<1<<j[E]-7;S++)R[256+$++]=E;for(L=0;L<=p;L++)X[L]=0;for(S=0;S<=143;)Y[2*S+1]=8,S++,X[8]++;for(;S<=255;)Y[2*S+1]=9,S++,X[9]++;for(;S<=279;)Y[2*S+1]=7,S++,X[7]++;for(;S<=287;)Y[2*S+1]=8,S++,X[8]++;for(mt(Y,y+1,X),S=0;S<u;S++)_[2*S+1]=5,_[2*S]=ct(S,5);Q=new J(Y,O,m+1,y,p),U=new J(_,j,0,u,p),tt=new J(new Array(0),B,0,g,k)}(),M=!0),f.l_desc=new N(f.dyn_ltree,Q),f.d_desc=new N(f.dyn_dtree,U),f.bl_desc=new N(f.bl_tree,tt),f.bi_buf=0,f.bi_valid=0,rt(f)},t._tr_stored_block=b,t._tr_flush_block=function(f,S,L,D){var E,$,X=0;0<f.level?(f.strm.data_type===2&&(f.strm.data_type=function(H){var q,it=4093624447;for(q=0;q<=31;q++,it>>>=1)if(1&it&&H.dyn_ltree[2*q]!==0)return n;if(H.dyn_ltree[18]!==0||H.dyn_ltree[20]!==0||H.dyn_ltree[26]!==0)return s;for(q=32;q<m;q++)if(H.dyn_ltree[2*q]!==0)return s;return n}(f)),yt(f,f.l_desc),yt(f,f.d_desc),X=function(H){var q;for(i(H,H.dyn_ltree,H.l_desc.max_code),i(H,H.dyn_dtree,H.d_desc.max_code),yt(H,H.bl_desc),q=g-1;3<=q&&H.bl_tree[2*Z[q]+1]===0;q--);return H.opt_len+=3*(q+1)+5+5+4,q}(f),E=f.opt_len+3+7>>>3,($=f.static_len+3+7>>>3)<=E&&(E=$)):E=$=L+5,L+4<=E&&S!==-1?b(f,S,L,D):f.strategy===4||$===E?(G(f,2+(D?1:0),3),kt(f,Y,_)):(G(f,4+(D?1:0),3),function(H,q,it,at){var vt;for(G(H,q-257,5),G(H,it-1,5),G(H,at-4,4),vt=0;vt<at;vt++)G(H,H.bl_tree[2*Z[vt]+1],3);I(H,H.dyn_ltree,q-1),I(H,H.dyn_dtree,it-1)}(f,f.l_desc.max_code+1,f.d_desc.max_code+1,X+1),kt(f,f.dyn_ltree,f.dyn_dtree)),rt(f),D&&nt(f)},t._tr_tally=function(f,S,L){return f.pending_buf[f.d_buf+2*f.last_lit]=S>>>8&255,f.pending_buf[f.d_buf+2*f.last_lit+1]=255&S,f.pending_buf[f.l_buf+f.last_lit]=255&L,f.last_lit++,S===0?f.dyn_ltree[2*L]++:(f.matches++,S--,f.dyn_ltree[2*(l[L]+m+1)]++,f.dyn_dtree[2*P(S)]++),f.last_lit===f.lit_bufsize-1},t._tr_align=function(f){G(f,2,3),V(f,w,Y),function(S){S.bi_valid===16?(K(S,S.bi_buf),S.bi_buf=0,S.bi_valid=0):8<=S.bi_valid&&(S.pending_buf[S.pending++]=255&S.bi_buf,S.bi_buf>>=8,S.bi_valid-=8)}(f)}},{"../utils/common":41}],53:[function(a,e,t){"use strict";e.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(a,e,t){(function(r){(function(n,s){"use strict";if(!n.setImmediate){var o,d,v,m,y=1,u={},g=!1,c=n.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(n);p=p&&p.setTimeout?p:n,o={}.toString.call(n.process)==="[object process]"?function(x){process.nextTick(function(){k(x)})}:function(){if(n.postMessage&&!n.importScripts){var x=!0,C=n.onmessage;return n.onmessage=function(){x=!1},n.postMessage("","*"),n.onmessage=C,x}}()?(m="setImmediate$"+Math.random()+"$",n.addEventListener?n.addEventListener("message",w,!1):n.attachEvent("onmessage",w),function(x){n.postMessage(m+x,"*")}):n.MessageChannel?((v=new MessageChannel).port1.onmessage=function(x){k(x.data)},function(x){v.port2.postMessage(x)}):c&&"onreadystatechange"in c.createElement("script")?(d=c.documentElement,function(x){var C=c.createElement("script");C.onreadystatechange=function(){k(x),C.onreadystatechange=null,d.removeChild(C),C=null},d.appendChild(C)}):function(x){setTimeout(k,0,x)},p.setImmediate=function(x){typeof x!="function"&&(x=new Function(""+x));for(var C=new Array(arguments.length-1),T=0;T<C.length;T++)C[T]=arguments[T+1];var O={callback:x,args:C};return u[y]=O,o(y),y++},p.clearImmediate=h}function h(x){delete u[x]}function k(x){if(g)setTimeout(k,0,x);else{var C=u[x];if(C){g=!0;try{(function(T){var O=T.callback,j=T.args;switch(j.length){case 0:O();break;case 1:O(j[0]);break;case 2:O(j[0],j[1]);break;case 3:O(j[0],j[1],j[2]);break;default:O.apply(s,j)}})(C)}finally{h(x),g=!1}}}}function w(x){x.source===n&&typeof x.data=="string"&&x.data.indexOf(m)===0&&k(+x.data.slice(m.length))}})(typeof self>"u"?r===void 0?this:r:self)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})});var mr=a=>a instanceof Error||a&&typeof a.message=="string";function Pe(a){if(typeof a=="string"||typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)return a;if(mr(a))return Gt(a);if(Array.isArray(a))return gr(a);if(typeof a=="object")return Ne(a)}function gr(a){return a.map(Pe)}function Ne(a){if(typeof a!="object")return;let e={};return Object.entries(a).forEach(([t,r])=>{let n=Pe(r);n!==void 0&&(e[t]=n)}),e}function Gt(a){return{name:a.name,message:a.message,stack:a.stack,context:Ne(a.context)}}var We=pr(ze(),1);var ft;(function(a){a.OfficeDocument="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",a.FontTable="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",a.Image="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",a.Numbering="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",a.Styles="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",a.StylesWithEffects="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects",a.Theme="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",a.Settings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",a.WebSettings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",a.Hyperlink="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",a.Footnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",a.Endnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",a.Footer="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",a.Header="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",a.ExtendedProperties="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",a.CoreProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",a.CustomProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties"})(ft||(ft={}));function br(a,e){return e.elements(a).map(t=>({id:e.attr(t,"Id"),type:e.attr(t,"Type"),target:e.attr(t,"Target"),targetMode:e.attr(t,"TargetMode")}))}var $e={wordml:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",drawingml:"http://schemas.openxmlformats.org/drawingml/2006/main",picture:"http://schemas.openxmlformats.org/drawingml/2006/picture",compatibility:"http://schemas.openxmlformats.org/markup-compatibility/2006",math:"http://schemas.openxmlformats.org/officeDocument/2006/math"},dt={Dxa:{mul:.05,unit:"pt"},Emu:{mul:1/12700,unit:"pt"},FontSize:{mul:.5,unit:"pt"},Border:{mul:.125,unit:"pt"},Point:{mul:1,unit:"pt"},Percent:{mul:.02,unit:"%"},LineHeight:{mul:1/240,unit:""},VmlEmu:{mul:1/12700,unit:""}};function He(a,e=dt.Dxa){return a==null||/.+(p[xt]|[%])$/.test(a)?a:"".concat((parseInt(a)*e.mul).toFixed(2)).concat(e.unit)}function vr(a,e=!1){switch(a){case"1":return!0;case"0":return!1;case"on":return!0;case"off":return!1;case"true":return!0;case"false":return!1;default:return e}}function Ze(a,e,t){if(a.namespaceURI!=$e.wordml)return!1;switch(a.localName){case"color":e.color=t.attr(a,"val");break;case"sz":e.fontSize=t.lengthAttr(a,"val",dt.FontSize);break;default:return!1}return!0}function yr(a,e=!1){e&&(a=a.replace(/<[?].*[?]>/,"")),a=_r(a);let t=new DOMParser().parseFromString(a,"application/xml"),r=kr(t);if(r)throw new Error(r);return t}function kr(a){var e;return(e=a.getElementsByTagName("parsererror")[0])==null?void 0:e.textContent}function _r(a){return a.charCodeAt(0)===65279?a.substring(1):a}function wr(a){return new XMLSerializer().serializeToString(a)}var Dt=class{elements(e,t=null){let r=[];for(let n=0,s=e.childNodes.length;n<s;n++){let o=e.childNodes.item(n);o.nodeType==1&&(t==null||o.localName==t)&&r.push(o)}return r}element(e,t){for(let r=0,n=e.childNodes.length;r<n;r++){let s=e.childNodes.item(r);if(s.nodeType==1&&s.localName==t)return s}return null}elementAttr(e,t,r){var n=this.element(e,t);return n?this.attr(n,r):void 0}attrs(e){return Array.from(e.attributes)}attr(e,t){for(let r=0,n=e.attributes.length;r<n;r++){let s=e.attributes.item(r);if(s.localName==t)return s.value}return null}intAttr(e,t,r=null){var n=this.attr(e,t);return n?parseInt(n):r}hexAttr(e,t,r=null){var n=this.attr(e,t);return n?parseInt(n,16):r}floatAttr(e,t,r=null){var n=this.attr(e,t);return n?parseFloat(n):r}boolAttr(e,t,r=null){return vr(this.attr(e,t),r)}lengthAttr(e,t,r=dt.Dxa){return He(this.attr(e,t),r)}},A=new Dt,bt=class{constructor(e,t){this._package=e,this.path=t}async load(){this.rels=await this._package.loadRelationships(this.path);let e=await this._package.load(this.path),t=this._package.parseXmlDocument(e);this._package.options.keepOrigin&&(this._xmlDocument=t),this.parseXml(t.firstElementChild)}save(){this._package.update(this.path,wr(this._xmlDocument))}parseXml(e){}},Sr={embedRegular:"regular",embedBold:"bold",embedItalic:"italic",embedBoldItalic:"boldItalic"};function xr(a,e){return e.elements(a).map(t=>Cr(t,e))}function Cr(a,e){let t={name:e.attr(a,"name"),embedFontRefs:[]};for(let r of e.elements(a))switch(r.localName){case"family":t.family=e.attr(r,"val");break;case"altName":t.altName=e.attr(r,"val");break;case"embedRegular":case"embedBold":case"embedItalic":case"embedBoldItalic":t.embedFontRefs.push(Ar(r,e));break}return t}function Ar(a,e){return{id:e.attr(a,"id"),key:e.attr(a,"fontKey"),type:Sr[a.localName]}}var Yt=class extends bt{parseXml(e){this.fonts=xr(e,this._package.xmlParser)}};function Er(a){return a==null?void 0:a.replace(/[ .]+/g,"-").replace(/[&]+/g,"and").toLowerCase()}function Ft(a){let e=a.lastIndexOf("/")+1,t=e==0?"":a.substring(0,e),r=e==0?a:a.substring(e);return[t,r]}function qt(a,e){try{let t="http://docx/";return new URL(a,t+e).toString().substring(t.length)}catch(t){return"".concat(e).concat(a)}}function St(a,e){return a.reduce((t,r)=>(t[e(r)]=r,t),{})}function Pr(a){return new Promise((e,t)=>{let r=new FileReader;r.onloadend=()=>e(r.result),r.onerror=()=>t(),r.readAsDataURL(a)})}function Kt(a){return a&&typeof a=="object"&&!Array.isArray(a)}function Nr(a){return typeof a=="string"||a instanceof String}function jt(a,...e){var r;if(!e.length)return a;let t=e.shift();if(Kt(a)&&Kt(t))for(let n in t)if(Kt(t[n])){let s=(r=a[n])!=null?r:a[n]={};jt(s,t[n])}else a[n]=t[n];return jt(a,...e)}function Mt(a){return Array.isArray(a)?a:[a]}var Jt=class a{constructor(e,t){this._zip=e,this.options=t,this.xmlParser=new Dt}get(e){return this._zip.files[Mr(e)]}update(e,t){this._zip.file(e,t)}static async load(e,t){let r=await We.default.loadAsync(e);return new a(r,t)}save(e="blob"){return this._zip.generateAsync({type:e})}load(e,t="string"){var r,n;return(n=(r=this.get(e))==null?void 0:r.async(t))!=null?n:Promise.resolve(null)}async loadRelationships(e=null){let t="_rels/.rels";if(e!=null){let[n,s]=Ft(e);t="".concat(n,"_rels/").concat(s,".rels")}let r=await this.load(t);return r?br(this.parseXmlDocument(r).firstElementChild,this.xmlParser):null}parseXmlDocument(e){return yr(e,this.options.trimXmlDeclaration)}};function Mr(a){return a.startsWith("/")?a.substr(1):a}var Qt=class extends bt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.body=this._documentParser.parseDocumentFile(e)}};function Tt(a,e){return{type:e.attr(a,"val"),color:e.attr(a,"color"),size:e.lengthAttr(a,"sz",dt.Border),offset:e.lengthAttr(a,"space",dt.Point),frame:e.boolAttr(a,"frame"),shadow:e.boolAttr(a,"shadow")}}function zr(a,e){var t={};for(let r of e.elements(a))switch(r.localName){case"left":t.left=Tt(r,e);break;case"top":t.top=Tt(r,e);break;case"right":t.right=Tt(r,e);break;case"bottom":t.bottom=Tt(r,e);break}return t}var Be;(function(a){a.Continuous="continuous",a.NextPage="nextPage",a.NextColumn="nextColumn",a.EvenPage="evenPage",a.OddPage="oddPage"})(Be||(Be={}));function Ve(a,e=A){var r,n;var t={};for(let s of e.elements(a))switch(s.localName){case"pgSz":t.pageSize={width:e.lengthAttr(s,"w"),height:e.lengthAttr(s,"h"),orientation:e.attr(s,"orient")};break;case"type":t.type=e.attr(s,"val");break;case"pgMar":t.pageMargins={left:e.lengthAttr(s,"left"),right:e.lengthAttr(s,"right"),top:e.lengthAttr(s,"top"),bottom:e.lengthAttr(s,"bottom"),header:e.lengthAttr(s,"header"),footer:e.lengthAttr(s,"footer"),gutter:e.lengthAttr(s,"gutter")};break;case"cols":t.columns=Br(s,e);break;case"headerReference":((r=t.headerRefs)!=null?r:t.headerRefs=[]).push(Oe(s,e));break;case"footerReference":((n=t.footerRefs)!=null?n:t.footerRefs=[]).push(Oe(s,e));break;case"titlePg":t.titlePage=e.boolAttr(s,"val",!0);break;case"pgBorders":t.pageBorders=zr(s,e);break;case"pgNumType":t.pageNumber=Or(s,e);break}return t}function Br(a,e){return{numberOfColumns:e.intAttr(a,"num"),space:e.lengthAttr(a,"space"),separator:e.boolAttr(a,"sep"),equalWidth:e.boolAttr(a,"equalWidth",!0),columns:e.elements(a,"col").map(t=>({width:e.lengthAttr(t,"w"),space:e.lengthAttr(t,"space")}))}}function Or(a,e){return{chapSep:e.attr(a,"chapSep"),chapStyle:e.attr(a,"chapStyle"),format:e.attr(a,"fmt"),start:e.intAttr(a,"start")}}function Oe(a,e){return{id:e.attr(a,"id"),type:e.attr(a,"type")}}function Rr(a,e){return{before:e.lengthAttr(a,"before"),after:e.lengthAttr(a,"after"),line:e.intAttr(a,"line"),lineRule:e.attr(a,"lineRule")}}function we(a,e){let t={};for(let r of e.elements(a))Ir(r,t,e);return t}function Ir(a,e,t){return!!Ze(a,e,t)}function Ge(a,e){let t={};for(let r of e.elements(a))Xe(r,t,e);return t}function Xe(a,e,t){if(a.namespaceURI!=$e.wordml)return!1;if(Ze(a,e,t))return!0;switch(a.localName){case"tabs":e.tabs=Tr(a,t);break;case"sectPr":e.sectionProps=Ve(a,t);break;case"numPr":e.numbering=Fr(a,t);break;case"spacing":return e.lineSpacing=Rr(a,t),!1;case"textAlignment":return e.textAlignment=t.attr(a,"val"),!1;case"keepLines":e.keepLines=t.boolAttr(a,"val",!0);break;case"keepNext":e.keepNext=t.boolAttr(a,"val",!0);break;case"pageBreakBefore":e.pageBreakBefore=t.boolAttr(a,"val",!0);break;case"outlineLvl":e.outlineLevel=t.intAttr(a,"val");break;case"pStyle":e.styleName=t.attr(a,"val");break;case"rPr":e.runProps=we(a,t);break;default:return!1}return!0}function Tr(a,e){return e.elements(a,"tab").map(t=>({position:e.lengthAttr(t,"pos"),leader:e.attr(t,"leader"),style:e.attr(t,"val")}))}function Fr(a,e){var t={};for(let r of e.elements(a))switch(r.localName){case"numId":t.id=e.attr(r,"val");break;case"ilvl":t.level=e.intAttr(r,"val");break}return t}function Lr(a,e){let t={numberings:[],abstractNumberings:[],bulletPictures:[]};for(let r of e.elements(a))switch(r.localName){case"num":t.numberings.push(Dr(r,e));break;case"abstractNum":t.abstractNumberings.push(jr(r,e));break;case"numPicBullet":t.bulletPictures.push(Wr(r,e));break}return t}function Dr(a,e){let t={id:e.attr(a,"numId"),overrides:[]};for(let r of e.elements(a))switch(r.localName){case"abstractNumId":t.abstractId=e.attr(r,"val");break;case"lvlOverride":t.overrides.push(Ur(r,e));break}return t}function jr(a,e){let t={id:e.attr(a,"abstractNumId"),levels:[]};for(let r of e.elements(a))switch(r.localName){case"name":t.name=e.attr(r,"val");break;case"multiLevelType":t.multiLevelType=e.attr(r,"val");break;case"numStyleLink":t.numberingStyleLink=e.attr(r,"val");break;case"styleLink":t.styleLink=e.attr(r,"val");break;case"lvl":t.levels.push(qe(r,e));break}return t}function qe(a,e){let t={level:e.intAttr(a,"ilvl")};for(let r of e.elements(a))switch(r.localName){case"start":t.start=e.attr(r,"val");break;case"lvlRestart":t.restart=e.intAttr(r,"val");break;case"numFmt":t.format=e.attr(r,"val");break;case"lvlText":t.text=e.attr(r,"val");break;case"lvlJc":t.justification=e.attr(r,"val");break;case"lvlPicBulletId":t.bulletPictureId=e.attr(r,"val");break;case"pStyle":t.paragraphStyle=e.attr(r,"val");break;case"pPr":t.paragraphProps=Ge(r,e);break;case"rPr":t.runProps=we(r,e);break}return t}function Ur(a,e){let t={level:e.intAttr(a,"ilvl")};for(let r of e.elements(a))switch(r.localName){case"startOverride":t.start=e.intAttr(r,"val");break;case"lvl":t.numberingLevel=qe(r,e);break}return t}function Wr(a,e){var t=e.element(a,"pict"),r=t&&e.element(t,"shape"),n=r&&e.element(r,"imagedata");return n?{id:e.attr(a,"numPicBulletId"),referenceId:e.attr(n,"id"),style:e.attr(r,"style")}:null}var te=class extends bt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){Object.assign(this,Lr(e,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(e)}},ee=class extends bt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.styles=this._documentParser.parseStylesFile(e)}},z;(function(a){a.Document="document",a.Paragraph="paragraph",a.Run="run",a.Break="break",a.NoBreakHyphen="noBreakHyphen",a.Table="table",a.Row="row",a.Cell="cell",a.Hyperlink="hyperlink",a.Drawing="drawing",a.Image="image",a.Text="text",a.Tab="tab",a.Symbol="symbol",a.BookmarkStart="bookmarkStart",a.BookmarkEnd="bookmarkEnd",a.Footer="footer",a.Header="header",a.FootnoteReference="footnoteReference",a.EndnoteReference="endnoteReference",a.Footnote="footnote",a.Endnote="endnote",a.SimpleField="simpleField",a.ComplexField="complexField",a.Instruction="instruction",a.VmlPicture="vmlPicture",a.MmlMath="mmlMath",a.MmlMathParagraph="mmlMathParagraph",a.MmlFraction="mmlFraction",a.MmlFunction="mmlFunction",a.MmlFunctionName="mmlFunctionName",a.MmlNumerator="mmlNumerator",a.MmlDenominator="mmlDenominator",a.MmlRadical="mmlRadical",a.MmlBase="mmlBase",a.MmlDegree="mmlDegree",a.MmlSuperscript="mmlSuperscript",a.MmlSubscript="mmlSubscript",a.MmlPreSubSuper="mmlPreSubSuper",a.MmlSubArgument="mmlSubArgument",a.MmlSuperArgument="mmlSuperArgument",a.MmlNary="mmlNary",a.MmlDelimiter="mmlDelimiter",a.MmlRun="mmlRun",a.MmlEquationArray="mmlEquationArray",a.MmlLimit="mmlLimit",a.MmlLimitLower="mmlLimitLower",a.MmlMatrix="mmlMatrix",a.MmlMatrixRow="mmlMatrixRow",a.MmlBox="mmlBox",a.MmlBar="mmlBar",a.MmlGroupChar="mmlGroupChar",a.VmlElement="vmlElement",a.Inserted="inserted",a.Deleted="deleted",a.DeletedText="deletedText"})(z||(z={}));var Ot=class{constructor(){this.children=[],this.cssStyle={}}},re=class extends Ot{constructor(){super(...arguments),this.type=z.Header}},ae=class extends Ot{constructor(){super(...arguments),this.type=z.Footer}},Ut=class extends bt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.rootElement=this.createRootElement(),this.rootElement.children=this._documentParser.parseBodyElements(e)}},ne=class extends Ut{createRootElement(){return new re}},se=class extends Ut{createRootElement(){return new ae}};function $r(a,e){let t={};for(let r of e.elements(a))switch(r.localName){case"Template":t.template=r.textContent;break;case"Pages":t.pages=zt(r.textContent);break;case"Words":t.words=zt(r.textContent);break;case"Characters":t.characters=zt(r.textContent);break;case"Application":t.application=r.textContent;break;case"Lines":t.lines=zt(r.textContent);break;case"Paragraphs":t.paragraphs=zt(r.textContent);break;case"Company":t.company=r.textContent;break;case"AppVersion":t.appVersion=r.textContent;break}return t}function zt(a){if(!(typeof a>"u"))return parseInt(a)}var ie=class extends bt{parseXml(e){this.props=$r(e,this._package.xmlParser)}};function Hr(a,e){let t={};for(let r of e.elements(a))switch(r.localName){case"title":t.title=r.textContent;break;case"description":t.description=r.textContent;break;case"subject":t.subject=r.textContent;break;case"creator":t.creator=r.textContent;break;case"keywords":t.keywords=r.textContent;break;case"language":t.language=r.textContent;break;case"lastModifiedBy":t.lastModifiedBy=r.textContent;break;case"revision":r.textContent&&(t.revision=parseInt(r.textContent));break}return t}var oe=class extends bt{parseXml(e){this.props=Hr(e,this._package.xmlParser)}},le=class{};function Zr(a,e){var t=new le,r=e.element(a,"themeElements");for(let n of e.elements(r))switch(n.localName){case"clrScheme":t.colorScheme=Vr(n,e);break;case"fontScheme":t.fontScheme=Gr(n,e);break}return t}function Vr(a,e){var t={name:e.attr(a,"name"),colors:{}};for(let s of e.elements(a)){var r=e.element(s,"srgbClr"),n=e.element(s,"sysClr");r?t.colors[s.localName]=e.attr(r,"val"):n&&(t.colors[s.localName]=e.attr(n,"lastClr"))}return t}function Gr(a,e){var t={name:e.attr(a,"name")};for(let r of e.elements(a))switch(r.localName){case"majorFont":t.majorFont=Re(r,e);break;case"minorFont":t.minorFont=Re(r,e);break}return t}function Re(a,e){return{latinTypeface:e.elementAttr(a,"latin","typeface"),eaTypeface:e.elementAttr(a,"ea","typeface"),csTypeface:e.elementAttr(a,"cs","typeface")}}var ce=class extends bt{constructor(e,t){super(e,t)}parseXml(e){this.theme=Zr(e,this._package.xmlParser)}},Wt=class{},ue=class extends Wt{constructor(){super(...arguments),this.type=z.Footnote}},he=class extends Wt{constructor(){super(...arguments),this.type=z.Endnote}},$t=class extends bt{constructor(e,t,r){super(e,t),this._documentParser=r}},de=class extends $t{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"footnote",ue)}},fe=class extends $t{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"endnote",he)}};function Xr(a,e){var t={};for(let r of e.elements(a))switch(r.localName){case"defaultTabStop":t.defaultTabStop=e.lengthAttr(r,"val");break;case"footnotePr":t.footnoteProps=Ie(r,e);break;case"endnotePr":t.endnoteProps=Ie(r,e);break;case"autoHyphenation":t.autoHyphenation=e.boolAttr(r,"val");break}return t}function Ie(a,e){var t={defaultNoteIds:[]};for(let r of e.elements(a))switch(r.localName){case"numFmt":t.nummeringFormat=e.attr(r,"val");break;case"footnote":case"endnote":t.defaultNoteIds.push(e.attr(r,"id"));break}return t}var pe=class extends bt{constructor(e,t){super(e,t)}parseXml(e){this.settings=Xr(e,this._package.xmlParser)}};function qr(a,e){return e.elements(a,"property").map(t=>{let r=t.firstChild;return{formatId:e.attr(t,"fmtid"),name:e.attr(t,"name"),type:r.nodeName,value:r.textContent}})}var me=class extends bt{parseXml(e){this.props=qr(e,this._package.xmlParser)}},Kr=[{type:ft.OfficeDocument,target:"word/document.xml"},{type:ft.ExtendedProperties,target:"docProps/app.xml"},{type:ft.CoreProperties,target:"docProps/core.xml"},{type:ft.CustomProperties,target:"docProps/custom.xml"}],ge=class a{constructor(){this.parts=[],this.partsMap={}}static async load(e,t,r){var n=new a;return n._options=r,n._parser=t,n._package=await Jt.load(e,r),n.rels=await n._package.loadRelationships(),await Promise.all(Kr.map(s=>{var d;let o=(d=n.rels.find(v=>v.type===s.type))!=null?d:s;return n.loadRelationshipPart(o.target,o.type)})),n}save(e="blob"){return this._package.save(e)}async loadRelationshipPart(e,t){var n;if(this.partsMap[e])return this.partsMap[e];if(!this._package.get(e))return null;let r=null;switch(t){case ft.OfficeDocument:this.documentPart=r=new Qt(this._package,e,this._parser);break;case ft.FontTable:this.fontTablePart=r=new Yt(this._package,e);break;case ft.Numbering:this.numberingPart=r=new te(this._package,e,this._parser);break;case ft.Styles:this.stylesPart=r=new ee(this._package,e,this._parser);break;case ft.Theme:this.themePart=r=new ce(this._package,e);break;case ft.Footnotes:this.footnotesPart=r=new de(this._package,e,this._parser);break;case ft.Endnotes:this.endnotesPart=r=new fe(this._package,e,this._parser);break;case ft.Footer:r=new se(this._package,e,this._parser);break;case ft.Header:r=new ne(this._package,e,this._parser);break;case ft.CoreProperties:this.corePropsPart=r=new oe(this._package,e);break;case ft.ExtendedProperties:this.extendedPropsPart=r=new ie(this._package,e);break;case ft.CustomProperties:r=new me(this._package,e);break;case ft.Settings:this.settingsPart=r=new pe(this._package,e);break}if(r==null)return Promise.resolve(null);if(this.partsMap[e]=r,this.parts.push(r),await r.load(),((n=r.rels)==null?void 0:n.length)>0){let[s]=Ft(r.path);await Promise.all(r.rels.map(o=>this.loadRelationshipPart(qt(o.target,s),o.type)))}return r}async loadDocumentImage(e,t){let r=await this.loadResource(t!=null?t:this.documentPart,e,"blob");return this.blobToURL(r)}async loadNumberingImage(e){let t=await this.loadResource(this.numberingPart,e,"blob");return this.blobToURL(t)}async loadFont(e,t){let r=await this.loadResource(this.fontTablePart,e,"uint8array");return r&&this.blobToURL(new Blob([Yr(r,t)]))}blobToURL(e){return e?this._options.useBase64URL?Pr(e):URL.createObjectURL(e):null}findPartByRelId(e,t=null){var s;var r=((s=t.rels)!=null?s:this.rels).find(o=>o.id==e);let n=t?Ft(t.path)[0]:"";return r?this.partsMap[qt(r.target,n)]:null}getPathById(e,t){let r=e.rels.find(s=>s.id==t),[n]=Ft(e.path);return r?qt(r.target,n):null}loadResource(e,t,r){let n=this.getPathById(e,t);return n?this._package.load(n,r):Promise.resolve(null)}};function Yr(a,e){let r=e.replace(/{|}|-/g,""),n=new Array(16);for(let s=0;s<16;s++)n[16-s-1]=parseInt(r.substr(s*2,2),16);for(let s=0;s<32;s++)a[s]=a[s]^n[s%16];return a}function Jr(a,e){return{type:z.BookmarkStart,id:e.attr(a,"id"),name:e.attr(a,"name"),colFirst:e.intAttr(a,"colFirst"),colLast:e.intAttr(a,"colLast")}}function Qr(a,e){return{type:z.BookmarkEnd,id:e.attr(a,"id")}}var be=class extends Ot{constructor(){super(...arguments),this.type=z.VmlElement,this.attrs={}}};function Ke(a,e){var t=new be;switch(a.localName){case"rect":t.tagName="rect",Object.assign(t.attrs,{width:"100%",height:"100%"});break;case"oval":t.tagName="ellipse",Object.assign(t.attrs,{cx:"50%",cy:"50%",rx:"50%",ry:"50%"});break;case"line":t.tagName="line";break;case"shape":t.tagName="g";break;case"textbox":t.tagName="foreignObject",Object.assign(t.attrs,{width:"100%",height:"100%"});break;default:return null}for(let r of A.attrs(a))switch(r.localName){case"style":t.cssStyleText=r.value;break;case"fillcolor":t.attrs.fill=r.value;break;case"from":let[n,s]=Te(r.value);Object.assign(t.attrs,{x1:n,y1:s});break;case"to":let[o,d]=Te(r.value);Object.assign(t.attrs,{x2:o,y2:d});break}for(let r of A.elements(a))switch(r.localName){case"stroke":Object.assign(t.attrs,ta(r));break;case"fill":Object.assign(t.attrs,ea());break;case"imagedata":t.tagName="image",Object.assign(t.attrs,{width:"100%",height:"100%"}),t.imageHref={id:A.attr(r,"id"),title:A.attr(r,"title")};break;case"txbxContent":t.children.push(...e.parseBodyElements(r));break;default:let n=Ke(r,e);n&&t.children.push(n);break}return t}function ta(a){var e;return{stroke:A.attr(a,"color"),"stroke-width":(e=A.lengthAttr(a,"weight",dt.Emu))!=null?e:"1px"}}function ea(a){return{}}function Te(a){return a.split(",")}var Lt={shd:"inherit",color:"black",borderColor:"black",highlight:"transparent"},ra=[],Fe={oMath:z.MmlMath,oMathPara:z.MmlMathParagraph,f:z.MmlFraction,func:z.MmlFunction,fName:z.MmlFunctionName,num:z.MmlNumerator,den:z.MmlDenominator,rad:z.MmlRadical,deg:z.MmlDegree,e:z.MmlBase,sSup:z.MmlSuperscript,sSub:z.MmlSubscript,sPre:z.MmlPreSubSuper,sup:z.MmlSuperArgument,sub:z.MmlSubArgument,d:z.MmlDelimiter,nary:z.MmlNary,eqArr:z.MmlEquationArray,lim:z.MmlLimit,limLow:z.MmlLimitLower,m:z.MmlMatrix,mr:z.MmlMatrixRow,box:z.MmlBox,bar:z.MmlBar,groupChr:z.MmlGroupChar},ve=class{constructor(e){this.options=gt({ignoreWidth:!1,debug:!1},e)}parseNotes(e,t,r){var n=[];for(let s of A.elements(e,t)){let o=new r;o.id=A.attr(s,"id"),o.noteType=A.attr(s,"type"),o.children=this.parseBodyElements(s),n.push(o)}return n}parseDocumentFile(e){var t=A.element(e,"body"),r=A.element(e,"background"),n=A.element(t,"sectPr");return{type:z.Document,children:this.parseBodyElements(t),props:n?Ve(n,A):{},cssStyle:r?this.parseBackground(r):{}}}parseBackground(e){var t={},r=lt.colorAttr(e,"color");return r&&(t["background-color"]=r),t}parseBodyElements(e){var t=[];for(let r of A.elements(e))switch(r.localName){case"p":t.push(this.parseParagraph(r));break;case"tbl":t.push(this.parseTable(r));break;case"sdt":t.push(...this.parseSdt(r,n=>this.parseBodyElements(n)));break}return t}parseStylesFile(e){var t=[];return lt.foreach(e,r=>{switch(r.localName){case"style":t.push(this.parseStyle(r));break;case"docDefaults":t.push(this.parseDefaultStyles(r));break}}),t}parseDefaultStyles(e){var t={id:null,name:null,target:null,basedOn:null,styles:[]};return lt.foreach(e,r=>{switch(r.localName){case"rPrDefault":var n=A.element(r,"rPr");n&&t.styles.push({target:"span",values:this.parseDefaultProperties(n,{})});break;case"pPrDefault":var s=A.element(r,"pPr");s&&t.styles.push({target:"p",values:this.parseDefaultProperties(s,{})});break}}),t}parseStyle(e){var t={id:A.attr(e,"styleId"),isDefault:A.boolAttr(e,"default"),name:null,target:null,basedOn:null,styles:[],linked:null};switch(A.attr(e,"type")){case"paragraph":t.target="p";break;case"table":t.target="table";break;case"character":t.target="span";break}return lt.foreach(e,r=>{switch(r.localName){case"basedOn":t.basedOn=A.attr(r,"val");break;case"name":t.name=A.attr(r,"val");break;case"link":t.linked=A.attr(r,"val");break;case"next":t.next=A.attr(r,"val");break;case"aliases":t.aliases=A.attr(r,"val").split(",");break;case"pPr":t.styles.push({target:"p",values:this.parseDefaultProperties(r,{})}),t.paragraphProps=Ge(r,A);break;case"rPr":t.styles.push({target:"span",values:this.parseDefaultProperties(r,{})}),t.runProps=we(r,A);break;case"tblPr":case"tcPr":t.styles.push({target:"td",values:this.parseDefaultProperties(r,{})});break;case"tblStylePr":for(let n of this.parseTableStyle(r))t.styles.push(n);break;case"rsid":case"qFormat":case"hidden":case"semiHidden":case"unhideWhenUsed":case"autoRedefine":case"uiPriority":break;default:this.options.debug&&console.warn("DOCX: Unknown style element: ".concat(r.localName))}}),t}parseTableStyle(e){var t=[],r=A.attr(e,"type"),n="",s="";switch(r){case"firstRow":s=".first-row",n="tr.first-row td";break;case"lastRow":s=".last-row",n="tr.last-row td";break;case"firstCol":s=".first-col",n="td.first-col";break;case"lastCol":s=".last-col",n="td.last-col";break;case"band1Vert":s=":not(.no-vband)",n="td.odd-col";break;case"band2Vert":s=":not(.no-vband)",n="td.even-col";break;case"band1Horz":s=":not(.no-hband)",n="tr.odd-row";break;case"band2Horz":s=":not(.no-hband)",n="tr.even-row";break;default:return[]}return lt.foreach(e,o=>{switch(o.localName){case"pPr":t.push({target:"".concat(n," p"),mod:s,values:this.parseDefaultProperties(o,{})});break;case"rPr":t.push({target:"".concat(n," span"),mod:s,values:this.parseDefaultProperties(o,{})});break;case"tblPr":case"tcPr":t.push({target:n,mod:s,values:this.parseDefaultProperties(o,{})});break}}),t}parseNumberingFile(e){var t=[],r={},n=[];return lt.foreach(e,s=>{switch(s.localName){case"abstractNum":this.parseAbstractNumbering(s,n).forEach(v=>t.push(v));break;case"numPicBullet":n.push(this.parseNumberingPicBullet(s));break;case"num":var o=A.attr(s,"numId"),d=A.elementAttr(s,"abstractNumId","val");r[d]=o;break}}),t.forEach(s=>s.id=r[s.id]),t}parseNumberingPicBullet(e){var t=A.element(e,"pict"),r=t&&A.element(t,"shape"),n=r&&A.element(r,"imagedata");return n?{id:A.intAttr(e,"numPicBulletId"),src:A.attr(n,"id"),style:A.attr(r,"style")}:null}parseAbstractNumbering(e,t){var r=[],n=A.attr(e,"abstractNumId");return lt.foreach(e,s=>{switch(s.localName){case"lvl":r.push(this.parseNumberingLevel(n,s,t));break}}),r}parseNumberingLevel(e,t,r){var n={id:e,level:A.intAttr(t,"ilvl"),start:1,pStyleName:void 0,pStyle:{},rStyle:{},suff:"tab"};return lt.foreach(t,s=>{switch(s.localName){case"start":n.start=A.intAttr(s,"val");break;case"pPr":this.parseDefaultProperties(s,n.pStyle);break;case"rPr":this.parseDefaultProperties(s,n.rStyle);break;case"lvlPicBulletId":var o=A.intAttr(s,"val");n.bullet=r.find(d=>d.id==o);break;case"lvlText":n.levelText=A.attr(s,"val");break;case"pStyle":n.pStyleName=A.attr(s,"val");break;case"numFmt":n.format=A.attr(s,"val");break;case"suff":n.suff=A.attr(s,"val");break}}),n}parseSdt(e,t){let r=A.element(e,"sdtContent");return r?t(r):[]}parseInserted(e,t){var r,n;return{type:z.Inserted,children:(n=(r=t(e))==null?void 0:r.children)!=null?n:[]}}parseDeleted(e,t){var r,n;return{type:z.Deleted,children:(n=(r=t(e))==null?void 0:r.children)!=null?n:[]}}parseParagraph(e){var t={type:z.Paragraph,children:[]};for(let r of A.elements(e))switch(r.localName){case"pPr":this.parseParagraphProperties(r,t);break;case"r":t.children.push(this.parseRun(r,t));break;case"hyperlink":t.children.push(this.parseHyperlink(r,t));break;case"bookmarkStart":t.children.push(Jr(r,A));break;case"bookmarkEnd":t.children.push(Qr(r,A));break;case"oMath":case"oMathPara":t.children.push(this.parseMathElement(r));break;case"sdt":t.children.push(...this.parseSdt(r,n=>this.parseParagraph(n).children));break;case"ins":t.children.push(this.parseInserted(r,n=>this.parseParagraph(n)));break;case"del":t.children.push(this.parseDeleted(r,n=>this.parseParagraph(n)));break}return t}parseParagraphProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,r=>{if(Xe(r,t,A))return!0;switch(r.localName){case"pStyle":t.styleName=A.attr(r,"val");break;case"cnfStyle":t.className=st.classNameOfCnfStyle(r);break;case"framePr":this.parseFrame(r,t);break;case"rPr":break;default:return!1}return!0})}parseFrame(e,t){var r=A.attr(e,"dropCap");r=="drop"&&(t.cssStyle.float="left")}parseHyperlink(e,t){var r={type:z.Hyperlink,parent:t,children:[]},n=A.attr(e,"anchor"),s=A.attr(e,"id");return n&&(r.href="#"+n),s&&(r.id=s),lt.foreach(e,o=>{switch(o.localName){case"r":r.children.push(this.parseRun(o,r));break}}),r}parseRun(e,t){var r={type:z.Run,parent:t,children:[]};return lt.foreach(e,n=>{switch(n=this.checkAlternateContent(n),n.localName){case"t":r.children.push({type:z.Text,text:n.textContent});break;case"delText":r.children.push({type:z.DeletedText,text:n.textContent});break;case"fldSimple":r.children.push({type:z.SimpleField,instruction:A.attr(n,"instr"),lock:A.boolAttr(n,"lock",!1),dirty:A.boolAttr(n,"dirty",!1)});break;case"instrText":r.fieldRun=!0,r.children.push({type:z.Instruction,text:n.textContent});break;case"fldChar":r.fieldRun=!0,r.children.push({type:z.ComplexField,charType:A.attr(n,"fldCharType"),lock:A.boolAttr(n,"lock",!1),dirty:A.boolAttr(n,"dirty",!1)});break;case"noBreakHyphen":r.children.push({type:z.NoBreakHyphen});break;case"br":r.children.push({type:z.Break,break:A.attr(n,"type")||"textWrapping"});break;case"lastRenderedPageBreak":r.children.push({type:z.Break,break:"lastRenderedPageBreak"});break;case"sym":r.children.push({type:z.Symbol,font:A.attr(n,"font"),char:A.attr(n,"char")});break;case"tab":r.children.push({type:z.Tab});break;case"footnoteReference":r.children.push({type:z.FootnoteReference,id:A.attr(n,"id")});break;case"endnoteReference":r.children.push({type:z.EndnoteReference,id:A.attr(n,"id")});break;case"drawing":let s=this.parseDrawing(n);s&&(r.children=[s]);break;case"pict":r.children.push(this.parseVmlPicture(n));break;case"rPr":this.parseRunProperties(n,r);break}}),r}parseMathElement(e){let t="".concat(e.localName,"Pr"),r={type:Fe[e.localName],children:[]};for(let s of A.elements(e))if(Fe[s.localName])r.children.push(this.parseMathElement(s));else if(s.localName=="r"){var n=this.parseRun(s);n.type=z.MmlRun,r.children.push(n)}else s.localName==t&&(r.props=this.parseMathProperies(s));return r}parseMathProperies(e){let t={};for(let r of A.elements(e))switch(r.localName){case"chr":t.char=A.attr(r,"val");break;case"vertJc":t.verticalJustification=A.attr(r,"val");break;case"pos":t.position=A.attr(r,"val");break;case"degHide":t.hideDegree=A.boolAttr(r,"val");break;case"begChr":t.beginChar=A.attr(r,"val");break;case"endChr":t.endChar=A.attr(r,"val");break}return t}parseRunProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,r=>{switch(r.localName){case"rStyle":t.styleName=A.attr(r,"val");break;case"vertAlign":t.verticalAlign=st.valueOfVertAlign(r,!0);break;default:return!1}return!0})}parseVmlPicture(e){let t={type:z.VmlPicture,children:[]};for(let r of A.elements(e)){let n=Ke(r,this);n&&t.children.push(n)}return t}checkAlternateContent(e){var s;if(e.localName!="AlternateContent")return e;var t=A.element(e,"Choice");if(t){var r=A.attr(t,"Requires"),n=e.lookupNamespaceURI(r);if(ra.includes(n))return t.firstElementChild}return(s=A.element(e,"Fallback"))==null?void 0:s.firstElementChild}parseDrawing(e){for(var t of A.elements(e))switch(t.localName){case"inline":case"anchor":return this.parseDrawingWrapper(t)}}parseDrawingWrapper(e){var g;var t={type:z.Drawing,children:[],cssStyle:{}},r=e.localName=="anchor";let n=null,s=A.boolAttr(e,"simplePos"),o={relative:"page",align:"left",offset:"0"},d={relative:"page",align:"top",offset:"0"};for(var v of A.elements(e))switch(v.localName){case"simplePos":s&&(o.offset=A.lengthAttr(v,"x",dt.Emu),d.offset=A.lengthAttr(v,"y",dt.Emu));break;case"extent":t.cssStyle.width=A.lengthAttr(v,"cx",dt.Emu),t.cssStyle.height=A.lengthAttr(v,"cy",dt.Emu);break;case"positionH":case"positionV":if(!s){let c=v.localName=="positionH"?o:d;var m=A.element(v,"align"),y=A.element(v,"posOffset");c.relative=(g=A.attr(v,"relativeFrom"))!=null?g:c.relative,m&&(c.align=m.textContent),y&&(c.offset=lt.sizeValue(y,dt.Emu))}break;case"wrapTopAndBottom":n="wrapTopAndBottom";break;case"wrapNone":n="wrapNone";break;case"graphic":var u=this.parseGraphic(v);u&&t.children.push(u);break}return n=="wrapTopAndBottom"?(t.cssStyle.display="block",o.align&&(t.cssStyle["text-align"]=o.align,t.cssStyle.width="100%")):n=="wrapNone"?(t.cssStyle.display="block",t.cssStyle.position="relative",t.cssStyle.width="0px",t.cssStyle.height="0px",o.offset&&(t.cssStyle.left=o.offset),d.offset&&(t.cssStyle.top=d.offset)):r&&(o.align=="left"||o.align=="right")&&(t.cssStyle.float=o.align),t}parseGraphic(e){var t=A.element(e,"graphicData");for(let r of A.elements(t))switch(r.localName){case"pic":return this.parsePicture(r)}return null}parsePicture(e){var t={type:z.Image,src:"",cssStyle:{}},r=A.element(e,"blipFill"),n=A.element(r,"blip");t.src=A.attr(n,"embed");var s=A.element(e,"spPr"),o=A.element(s,"xfrm");t.cssStyle.position="relative";for(var d of A.elements(o))switch(d.localName){case"ext":t.cssStyle.width=A.lengthAttr(d,"cx",dt.Emu),t.cssStyle.height=A.lengthAttr(d,"cy",dt.Emu);break;case"off":t.cssStyle.left=A.lengthAttr(d,"x",dt.Emu),t.cssStyle.top=A.lengthAttr(d,"y",dt.Emu);break}return t}parseTable(e){var t={type:z.Table,children:[]};return lt.foreach(e,r=>{switch(r.localName){case"tr":t.children.push(this.parseTableRow(r));break;case"tblGrid":t.columns=this.parseTableColumns(r);break;case"tblPr":this.parseTableProperties(r,t);break}}),t}parseTableColumns(e){var t=[];return lt.foreach(e,r=>{switch(r.localName){case"gridCol":t.push({width:A.lengthAttr(r,"w")});break}}),t}parseTableProperties(e,t){switch(t.cssStyle={},t.cellStyle={},this.parseDefaultProperties(e,t.cssStyle,t.cellStyle,r=>{switch(r.localName){case"tblStyle":t.styleName=A.attr(r,"val");break;case"tblLook":t.className=st.classNameOftblLook(r);break;case"tblpPr":this.parseTablePosition(r,t);break;case"tblStyleColBandSize":t.colBandSize=A.intAttr(r,"val");break;case"tblStyleRowBandSize":t.rowBandSize=A.intAttr(r,"val");break;default:return!1}return!0}),t.cssStyle["text-align"]){case"center":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto",t.cssStyle["margin-right"]="auto";break;case"right":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto";break}}parseTablePosition(e,t){var r=A.lengthAttr(e,"topFromText"),n=A.lengthAttr(e,"bottomFromText"),s=A.lengthAttr(e,"rightFromText"),o=A.lengthAttr(e,"leftFromText");t.cssStyle.float="left",t.cssStyle["margin-bottom"]=st.addSize(t.cssStyle["margin-bottom"],n),t.cssStyle["margin-left"]=st.addSize(t.cssStyle["margin-left"],o),t.cssStyle["margin-right"]=st.addSize(t.cssStyle["margin-right"],s),t.cssStyle["margin-top"]=st.addSize(t.cssStyle["margin-top"],r)}parseTableRow(e){var t={type:z.Row,children:[]};return lt.foreach(e,r=>{switch(r.localName){case"tc":t.children.push(this.parseTableCell(r));break;case"trPr":this.parseTableRowProperties(r,t);break}}),t}parseTableRowProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,r=>{switch(r.localName){case"cnfStyle":t.className=st.classNameOfCnfStyle(r);break;case"tblHeader":t.isHeader=A.boolAttr(r,"val");break;default:return!1}return!0})}parseTableCell(e){var t={type:z.Cell,children:[]};return lt.foreach(e,r=>{switch(r.localName){case"tbl":t.children.push(this.parseTable(r));break;case"p":t.children.push(this.parseParagraph(r));break;case"tcPr":this.parseTableCellProperties(r,t);break}}),t}parseTableCellProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,r=>{var n;switch(r.localName){case"gridSpan":t.span=A.intAttr(r,"val",null);break;case"vMerge":t.verticalMerge=(n=A.attr(r,"val"))!=null?n:"continue";break;case"cnfStyle":t.className=st.classNameOfCnfStyle(r);break;default:return!1}return!0})}parseDefaultProperties(e,t=null,r=null,n=null){return t=t||{},lt.foreach(e,s=>{if(!(n!=null&&n(s)))switch(s.localName){case"jc":t["text-align"]=st.valueOfJc(s);break;case"textAlignment":t["vertical-align"]=st.valueOfTextAlignment(s);break;case"color":t.color=lt.colorAttr(s,"val",null,Lt.color);break;case"sz":t["font-size"]=t["min-height"]=A.lengthAttr(s,"val",dt.FontSize);break;case"shd":t["background-color"]=lt.colorAttr(s,"fill",null,Lt.shd);break;case"highlight":t["background-color"]=lt.colorAttr(s,"val",null,Lt.highlight);break;case"vertAlign":break;case"position":t.verticalAlign=A.lengthAttr(s,"val",dt.FontSize);break;case"tcW":if(this.options.ignoreWidth)break;case"tblW":t.width=st.valueOfSize(s,"w");break;case"trHeight":this.parseTrHeight(s,t);break;case"strike":t["text-decoration"]=A.boolAttr(s,"val",!0)?"line-through":"none";break;case"b":t["font-weight"]=A.boolAttr(s,"val",!0)?"bold":"normal";break;case"i":t["font-style"]=A.boolAttr(s,"val",!0)?"italic":"normal";break;case"caps":t["text-transform"]=A.boolAttr(s,"val",!0)?"uppercase":"none";break;case"smallCaps":t["font-variant"]=A.boolAttr(s,"val",!0)?"small-caps":"none";break;case"u":this.parseUnderline(s,t);break;case"ind":case"tblInd":this.parseIndentation(s,t);break;case"rFonts":this.parseFont(s,t);break;case"tblBorders":this.parseBorderProperties(s,r||t);break;case"tblCellSpacing":t["border-spacing"]=st.valueOfMargin(s),t["border-collapse"]="separate";break;case"pBdr":this.parseBorderProperties(s,t);break;case"bdr":t.border=st.valueOfBorder(s);break;case"tcBorders":this.parseBorderProperties(s,t);break;case"vanish":A.boolAttr(s,"val",!0)&&(t.display="none");break;case"kern":break;case"noWrap":break;case"tblCellMar":case"tcMar":this.parseMarginProperties(s,r||t);break;case"tblLayout":t["table-layout"]=st.valueOfTblLayout(s);break;case"vAlign":t["vertical-align"]=st.valueOfTextAlignment(s);break;case"spacing":e.localName=="pPr"&&this.parseSpacing(s,t);break;case"wordWrap":A.boolAttr(s,"val")&&(t["overflow-wrap"]="break-word");break;case"suppressAutoHyphens":t.hyphens=A.boolAttr(s,"val",!0)?"none":"auto";break;case"lang":t.$lang=A.attr(s,"val");break;case"bCs":case"iCs":case"szCs":case"tabs":case"outlineLvl":case"contextualSpacing":case"tblStyleColBandSize":case"tblStyleRowBandSize":case"webHidden":case"pageBreakBefore":case"suppressLineNumbers":case"keepLines":case"keepNext":case"widowControl":case"bidi":case"rtl":case"noProof":break;default:this.options.debug&&console.warn("DOCX: Unknown document element: ".concat(e.localName,".").concat(s.localName));break}}),t}parseUnderline(e,t){var r=A.attr(e,"val");if(r!=null){switch(r){case"dash":case"dashDotDotHeavy":case"dashDotHeavy":case"dashedHeavy":case"dashLong":case"dashLongHeavy":case"dotDash":case"dotDotDash":t["text-decoration"]="underline dashed";break;case"dotted":case"dottedHeavy":t["text-decoration"]="underline dotted";break;case"double":t["text-decoration"]="underline double";break;case"single":case"thick":t["text-decoration"]="underline";break;case"wave":case"wavyDouble":case"wavyHeavy":t["text-decoration"]="underline wavy";break;case"words":t["text-decoration"]="underline";break;case"none":t["text-decoration"]="none";break}var n=lt.colorAttr(e,"color");n&&(t["text-decoration-color"]=n)}}parseFont(e,t){var r=A.attr(e,"ascii"),n=st.themeValue(e,"asciiTheme"),s=[r,n].filter(o=>o).join(", ");s.length>0&&(t["font-family"]=s)}parseIndentation(e,t){var r=A.lengthAttr(e,"firstLine"),n=A.lengthAttr(e,"hanging"),s=A.lengthAttr(e,"left"),o=A.lengthAttr(e,"start"),d=A.lengthAttr(e,"right"),v=A.lengthAttr(e,"end");r&&(t["text-indent"]=r),n&&(t["text-indent"]="-".concat(n)),(s||o)&&(t["margin-left"]=s||o),(d||v)&&(t["margin-right"]=d||v)}parseSpacing(e,t){var r=A.lengthAttr(e,"before"),n=A.lengthAttr(e,"after"),s=A.intAttr(e,"line",null),o=A.attr(e,"lineRule");if(r&&(t["margin-top"]=r),n&&(t["margin-bottom"]=n),s!==null)switch(o){case"auto":t["line-height"]="".concat((s/240).toFixed(2));break;case"atLeast":t["line-height"]="calc(100% + ".concat(s/20,"pt)");break;default:t["line-height"]=t["min-height"]="".concat(s/20,"pt");break}}parseMarginProperties(e,t){lt.foreach(e,r=>{switch(r.localName){case"left":t["padding-left"]=st.valueOfMargin(r);break;case"right":t["padding-right"]=st.valueOfMargin(r);break;case"top":t["padding-top"]=st.valueOfMargin(r);break;case"bottom":t["padding-bottom"]=st.valueOfMargin(r);break}})}parseTrHeight(e,t){switch(A.attr(e,"hRule")){case"exact":t.height=A.lengthAttr(e,"val");break;case"atLeast":default:t.height=A.lengthAttr(e,"val");break}}parseBorderProperties(e,t){lt.foreach(e,r=>{switch(r.localName){case"start":case"left":t["border-left"]=st.valueOfBorder(r);break;case"end":case"right":t["border-right"]=st.valueOfBorder(r);break;case"top":t["border-top"]=st.valueOfBorder(r);break;case"bottom":t["border-bottom"]=st.valueOfBorder(r);break}})}},aa=["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","none","red","white","yellow"],lt=class{static foreach(e,t){for(var r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];n.nodeType==Node.ELEMENT_NODE&&t(n)}}static colorAttr(e,t,r=null,n="black"){var s=A.attr(e,t);if(s)return s=="auto"?n:aa.includes(s)?s:"#".concat(s);var o=A.attr(e,"themeColor");return o?"var(--docx-".concat(o,"-color)"):r}static sizeValue(e,t=dt.Dxa){return He(e.textContent,t)}},st=class{static themeValue(e,t){var r=A.attr(e,t);return r?"var(--docx-".concat(r,"-font)"):null}static valueOfSize(e,t){var r=dt.Dxa;switch(A.attr(e,"type")){case"dxa":break;case"pct":r=dt.Percent;break;case"auto":return"auto"}return A.lengthAttr(e,t,r)}static valueOfMargin(e){return A.lengthAttr(e,"w")}static valueOfBorder(e){var t=A.attr(e,"val");if(t=="nil")return"none";var r=lt.colorAttr(e,"color"),n=A.lengthAttr(e,"sz",dt.Border);return"".concat(n," solid ").concat(r=="auto"?Lt.borderColor:r)}static valueOfTblLayout(e){var t=A.attr(e,"val");return t=="fixed"?"fixed":"auto"}static classNameOfCnfStyle(e){let t=A.attr(e,"val");return["first-row","last-row","first-col","last-col","odd-col","even-col","odd-row","even-row","ne-cell","nw-cell","se-cell","sw-cell"].filter((n,s)=>t[s]=="1").join(" ")}static valueOfJc(e){var t=A.attr(e,"val");switch(t){case"start":case"left":return"left";case"center":return"center";case"end":case"right":return"right";case"both":return"justify"}return t}static valueOfVertAlign(e,t=!1){var r=A.attr(e,"val");switch(r){case"subscript":return"sub";case"superscript":return t?"sup":"super"}return t?null:r}static valueOfTextAlignment(e){var t=A.attr(e,"val");switch(t){case"auto":case"baseline":return"baseline";case"top":return"top";case"center":return"middle";case"bottom":return"bottom"}return t}static addSize(e,t){return e==null?t:t==null?e:"calc(".concat(e," + ").concat(t,")")}static classNameOftblLook(e){let t=A.hexAttr(e,"val",0),r="";return(A.boolAttr(e,"firstRow")||t&32)&&(r+=" first-row"),(A.boolAttr(e,"lastRow")||t&64)&&(r+=" last-row"),(A.boolAttr(e,"firstColumn")||t&128)&&(r+=" first-col"),(A.boolAttr(e,"lastColumn")||t&256)&&(r+=" last-col"),(A.boolAttr(e,"noHBand")||t&512)&&(r+=" no-hband"),(A.boolAttr(e,"noVBand")||t&1024)&&(r+=" no-vband"),r.trim()}},Le={pos:0,leader:"none",style:"left"},na=50;function sa(a=document.body){let e=document.createElement("div");e.style.width="100pt",a.appendChild(e);let t=100/e.offsetWidth;return a.removeChild(e),t}function ia(a,e,t,r=72/96){let n=a.closest("p"),s=a.getBoundingClientRect(),o=n.getBoundingClientRect(),d=getComputedStyle(n),v=(e==null?void 0:e.length)>0?e.map(x=>({pos:De(x.position),leader:x.leader,style:x.style})).sort((x,C)=>x.pos-C.pos):[Le],m=v[v.length-1],y=o.width*r,u=De(t),g=m.pos+u;if(g<y)for(;g<y&&v.length<na;g+=u)v.push(Pt(gt({},Le),{pos:g}));let c=parseFloat(d.marginLeft),p=o.left+c,h=(s.left-p)*r,k=v.find(x=>x.style!="clear"&&x.pos>h);if(k==null)return;let w=1;if(k.style=="right"||k.style=="center"){let x=Array.from(n.querySelectorAll(".".concat(a.className))),C=x.indexOf(a)+1,T=document.createRange();T.setStart(a,1),C<x.length?T.setEndBefore(x[C]):T.setEndAfter(n);let O=k.style=="center"?.5:1,j=T.getBoundingClientRect(),B=j.left+O*j.width-(o.left-c);w=k.pos-B*r}else w=k.pos-h;switch(a.innerHTML=" ",a.style.textDecoration="inherit",a.style.wordSpacing="".concat(w.toFixed(0),"pt"),k.leader){case"dot":case"middleDot":a.style.textDecoration="underline",a.style.textDecorationStyle="dotted";break;case"hyphen":case"heavy":case"underscore":a.style.textDecoration="underline";break}}function De(a){return parseFloat(a)}var et={svg:"http://www.w3.org/2000/svg",mathML:"http://www.w3.org/1998/Math/MathML"},ye=class{constructor(e){this.htmlDocument=e,this.className="docx",this.styleMap={},this.currentPart=null,this.tableVerticalMerges=[],this.currentVerticalMerge=null,this.tableCellPositions=[],this.currentCellPosition=null,this.footnoteMap={},this.endnoteMap={},this.currentEndnoteIds=[],this.usedHederFooterParts=[],this.currentTabs=[],this.tabsTimeout=0,this.tasks=[],this.createElement=ke}render(e,t,r=null,n){var o;this.document=e,this.options=n,this.className=n.className,this.rootSelector=n.inWrapper?".".concat(this.className,"-wrapper"):":root",this.styleMap=null,this.tasks=[],r=r||t,Ue(r),Ue(t),Bt(r,"docxjs library predefined styles"),r.appendChild(this.renderDefaultStyle()),e.themePart&&(Bt(r,"docxjs document theme values"),this.renderTheme(e.themePart,r)),e.stylesPart!=null&&(this.styleMap=this.processStyles(e.stylesPart.styles),Bt(r,"docxjs document styles"),r.appendChild(this.renderStyles(e.stylesPart.styles))),e.numberingPart&&(this.prodessNumberings(e.numberingPart.domNumberings),Bt(r,"docxjs document numbering styles"),r.appendChild(this.renderNumbering(e.numberingPart.domNumberings,r))),e.footnotesPart&&(this.footnoteMap=St(e.footnotesPart.notes,d=>d.id)),e.endnotesPart&&(this.endnoteMap=St(e.endnotesPart.notes,d=>d.id)),e.settingsPart&&(this.defaultTabSize=(o=e.settingsPart.settings)==null?void 0:o.defaultTabStop),!n.ignoreFonts&&e.fontTablePart&&this.renderFontTable(e.fontTablePart,r);var s=this.renderSections(e.documentPart.body);this.options.inWrapper?t.appendChild(this.renderWrapper(s)):_e(t,s),this.refreshTabStops()}renderTheme(e,t){var d,v;let r={},n=(d=e.theme)==null?void 0:d.fontScheme;n&&(n.majorFont&&(r["--docx-majorHAnsi-font"]=n.majorFont.latinTypeface),n.minorFont&&(r["--docx-minorHAnsi-font"]=n.minorFont.latinTypeface));let s=(v=e.theme)==null?void 0:v.colorScheme;if(s)for(let[m,y]of Object.entries(s.colors))r["--docx-".concat(m,"-color")]="#".concat(y);let o=this.styleToString(".".concat(this.className),r);t.appendChild(xt(o))}renderFontTable(e,t){for(let r of e.fonts)for(let n of r.embedFontRefs)this.tasks.push(this.document.loadFont(n.id,n.key).then(s=>{let o={"font-family":r.name,src:"url(".concat(s,")")};(n.type=="bold"||n.type=="boldItalic")&&(o["font-weight"]="bold"),(n.type=="italic"||n.type=="boldItalic")&&(o["font-style"]="italic"),Bt(t,"docxjs ".concat(r.name," font"));let d=this.styleToString("@font-face",o);t.appendChild(xt(d)),this.refreshTabStops()}))}processStyleName(e){return e?"".concat(this.className,"_").concat(Er(e)):this.className}processStyles(e){let t=St(e.filter(n=>n.id!=null),n=>n.id);for(let n of e.filter(s=>s.basedOn)){var r=t[n.basedOn];if(r){n.paragraphProps=jt(n.paragraphProps,r.paragraphProps),n.runProps=jt(n.runProps,r.runProps);for(let s of r.styles){let o=n.styles.find(d=>d.target==s.target);o?this.copyStyleProperties(s.values,o.values):n.styles.push(Pt(gt({},s),{values:gt({},s.values)}))}}else this.options.debug&&console.warn("Can't find base style ".concat(n.basedOn))}for(let n of e)n.cssName=this.processStyleName(n.id);return t}prodessNumberings(e){var t;for(let r of e.filter(n=>n.pStyleName)){let n=this.findStyle(r.pStyleName);(t=n==null?void 0:n.paragraphProps)!=null&&t.numbering&&(n.paragraphProps.numbering.level=r.level)}}processElement(e){if(e.children)for(var t of e.children)t.parent=e,t.type==z.Table?this.processTable(t):this.processElement(t)}processTable(e){for(var t of e.children)for(var r of t.children)r.cssStyle=this.copyStyleProperties(e.cellStyle,r.cssStyle,["border-left","border-right","border-top","border-bottom","padding-left","padding-right","padding-top","padding-bottom"]),this.processElement(r)}copyStyleProperties(e,t,r=null){if(!e)return t;t==null&&(t={}),r==null&&(r=Object.getOwnPropertyNames(e));for(var n of r)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n]);return t}createSection(e,t){var r=this.createElement("section",{className:e});return t&&(t.pageMargins&&(r.style.paddingLeft=t.pageMargins.left,r.style.paddingRight=t.pageMargins.right,r.style.paddingTop=t.pageMargins.top,r.style.paddingBottom=t.pageMargins.bottom),t.pageSize&&(this.options.ignoreWidth||(r.style.width=t.pageSize.width),this.options.ignoreHeight||(r.style.minHeight=t.pageSize.height)),t.columns&&t.columns.numberOfColumns&&(r.style.columnCount="".concat(t.columns.numberOfColumns),r.style.columnGap=t.columns.space,t.columns.separator&&(r.style.columnRule="1px solid black"))),r}renderSections(e){let t=[];this.processElement(e);let r=this.splitBySection(e.children),n=null;for(let o=0,d=r.length;o<d;o++){this.currentFootnoteIds=[];let v=r[o],m=v.sectProps||e.props,y=this.createSection(this.className,m);this.renderStyleValues(e.cssStyle,y),this.options.renderHeaders&&this.renderHeaderFooter(m.headerRefs,m,t.length,n!=m,y);var s=this.createElement("article");this.renderElements(v.elements,s),y.appendChild(s),this.options.renderFootnotes&&this.renderNotes(this.currentFootnoteIds,this.footnoteMap,y),this.options.renderEndnotes&&o==d-1&&this.renderNotes(this.currentEndnoteIds,this.endnoteMap,y),this.options.renderFooters&&this.renderHeaderFooter(m.footerRefs,m,t.length,n!=m,y),t.push(y),n=m}return t}renderHeaderFooter(e,t,r,n,s){var v,m;if(e){var o=(m=(v=t.titlePage&&n?e.find(y=>y.type=="first"):null)!=null?v:r%2==1?e.find(y=>y.type=="even"):null)!=null?m:e.find(y=>y.type=="default"),d=o&&this.document.findPartByRelId(o.id,this.document.documentPart);if(d){this.currentPart=d,this.usedHederFooterParts.includes(d.path)||(this.processElement(d.rootElement),this.usedHederFooterParts.push(d.path));let[y]=this.renderElements([d.rootElement],s);t!=null&&t.pageMargins&&(d.rootElement.type===z.Header?(y.style.marginTop="calc(".concat(t.pageMargins.header," - ").concat(t.pageMargins.top,")"),y.style.minHeight="calc(".concat(t.pageMargins.top," - ").concat(t.pageMargins.header,")")):d.rootElement.type===z.Footer&&(y.style.marginBottom="calc(".concat(t.pageMargins.footer," - ").concat(t.pageMargins.bottom,")"),y.style.minHeight="calc(".concat(t.pageMargins.bottom," - ").concat(t.pageMargins.footer,")"))),this.currentPart=null}}}isPageBreakElement(e){return e.type!=z.Break?!1:e.break=="lastRenderedPageBreak"?!this.options.ignoreLastRenderedPageBreak:e.break=="page"}splitBySection(e){var y;var t={sectProps:null,elements:[]},r=[t];for(let u of e){if(u.type==z.Paragraph){let g=this.findStyle(u.styleName);(y=g==null?void 0:g.paragraphProps)!=null&&y.pageBreakBefore&&(t.sectProps=n,t={sectProps:null,elements:[]},r.push(t))}if(t.elements.push(u),u.type==z.Paragraph){let g=u;var n=g.sectionProps,s=-1,o=-1;if(this.options.breakPages&&g.children&&(s=g.children.findIndex(c=>{var p,h;return o=(h=(p=c.children)==null?void 0:p.findIndex(this.isPageBreakElement.bind(this)))!=null?h:-1,o!=-1})),(n||s!=-1)&&(t.sectProps=n,t={sectProps:null,elements:[]},r.push(t)),s!=-1){let c=g.children[s],p=o<c.children.length-1;if(s<g.children.length-1||p){var d=u.children,v=Pt(gt({},u),{children:d.slice(s)});if(u.children=d.slice(0,s),t.elements.push(v),p){let h=c.children,k=Pt(gt({},c),{children:h.slice(0,o)});u.children.push(k),c.children=h.slice(o)}}}}}let m=null;for(let u=r.length-1;u>=0;u--)r[u].sectProps==null?r[u].sectProps=m:m=r[u].sectProps;return r}renderWrapper(e){return this.createElement("div",{className:"".concat(this.className,"-wrapper")},e)}renderDefaultStyle(){var e=this.className,t="\n.".concat(e,"-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } \n.").concat(e,"-wrapper>section.").concat(e," { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }\n.").concat(e," { color: black; hyphens: auto; text-underline-position: from-font; }\nsection.").concat(e," { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; }\nsection.").concat(e,">article { margin-bottom: auto; z-index: 1; }\nsection.").concat(e,">footer { z-index: 1; }\n.").concat(e," table { border-collapse: collapse; }\n.").concat(e," table td, .").concat(e," table th { vertical-align: top; }\n.").concat(e," p { margin: 0pt; min-height: 1em; }\n.").concat(e," span { white-space: pre-wrap; overflow-wrap: break-word; }\n.").concat(e," a { color: inherit; text-decoration: inherit; }\n");return xt(t)}renderNumbering(e,t){var r="",n=[];for(var s of e){var o="p.".concat(this.numberingClass(s.id,s.level)),d="none";if(s.bullet){let v="--".concat(this.className,"-").concat(s.bullet.src).toLowerCase();r+=this.styleToString("".concat(o,":before"),{content:"' '",display:"inline-block",background:"var(".concat(v,")")},s.bullet.style),this.tasks.push(this.document.loadNumberingImage(s.bullet.src).then(m=>{var y="".concat(this.rootSelector," { ").concat(v,": url(").concat(m,") }");t.appendChild(xt(y))}))}else if(s.levelText){let v=this.numberingCounter(s.id,s.level),m=v+" "+(s.start-1);s.level>0&&(r+=this.styleToString("p.".concat(this.numberingClass(s.id,s.level-1)),{"counter-reset":m})),n.push(m),r+=this.styleToString("".concat(o,":before"),gt({content:this.levelTextToContent(s.levelText,s.suff,s.id,this.numFormatToCssValue(s.format)),"counter-increment":v},s.rStyle))}else d=this.numFormatToCssValue(s.format);r+=this.styleToString(o,gt({display:"list-item","list-style-position":"inside","list-style-type":d},s.pStyle))}return n.length>0&&(r+=this.styleToString(this.rootSelector,{"counter-reset":n.join(" ")})),xt(r)}renderStyles(e){var v;var t="";let r=this.styleMap,n=St(e.filter(m=>m.isDefault),m=>m.target);for(let m of e){var s=m.styles;if(m.linked){var o=m.linked&&r[m.linked];o?s=s.concat(o.styles):this.options.debug&&console.warn("Can't find linked style ".concat(m.linked))}for(let y of s){var d="".concat((v=m.target)!=null?v:"",".").concat(m.cssName);m.target!=y.target&&(d+=" ".concat(y.target)),n[m.target]==m&&(d=".".concat(this.className," ").concat(m.target,", ")+d),t+=this.styleToString(d,y.values)}}return xt(t)}renderNotes(e,t,r){var n=e.map(o=>t[o]).filter(o=>o);if(n.length>0){var s=this.createElement("ol",null,this.renderElements(n));r.appendChild(s)}}renderElement(e){switch(e.type){case z.Paragraph:return this.renderParagraph(e);case z.BookmarkStart:return this.renderBookmarkStart(e);case z.BookmarkEnd:return null;case z.Run:return this.renderRun(e);case z.Table:return this.renderTable(e);case z.Row:return this.renderTableRow(e);case z.Cell:return this.renderTableCell(e);case z.Hyperlink:return this.renderHyperlink(e);case z.Drawing:return this.renderDrawing(e);case z.Image:return this.renderImage(e);case z.Text:return this.renderText(e);case z.Text:return this.renderText(e);case z.DeletedText:return this.renderDeletedText(e);case z.Tab:return this.renderTab(e);case z.Symbol:return this.renderSymbol(e);case z.Break:return this.renderBreak(e);case z.Footer:return this.renderContainer(e,"footer");case z.Header:return this.renderContainer(e,"header");case z.Footnote:case z.Endnote:return this.renderContainer(e,"li");case z.FootnoteReference:return this.renderFootnoteReference(e);case z.EndnoteReference:return this.renderEndnoteReference(e);case z.NoBreakHyphen:return this.createElement("wbr");case z.VmlPicture:return this.renderVmlPicture(e);case z.VmlElement:return this.renderVmlElement(e);case z.MmlMath:return this.renderContainerNS(e,et.mathML,"math",{xmlns:et.mathML});case z.MmlMathParagraph:return this.renderContainer(e,"span");case z.MmlFraction:return this.renderContainerNS(e,et.mathML,"mfrac");case z.MmlBase:return this.renderContainerNS(e,et.mathML,e.parent.type==z.MmlMatrixRow?"mtd":"mrow");case z.MmlNumerator:case z.MmlDenominator:case z.MmlFunction:case z.MmlLimit:case z.MmlBox:return this.renderContainerNS(e,et.mathML,"mrow");case z.MmlGroupChar:return this.renderMmlGroupChar(e);case z.MmlLimitLower:return this.renderContainerNS(e,et.mathML,"munder");case z.MmlMatrix:return this.renderContainerNS(e,et.mathML,"mtable");case z.MmlMatrixRow:return this.renderContainerNS(e,et.mathML,"mtr");case z.MmlRadical:return this.renderMmlRadical(e);case z.MmlSuperscript:return this.renderContainerNS(e,et.mathML,"msup");case z.MmlSubscript:return this.renderContainerNS(e,et.mathML,"msub");case z.MmlDegree:case z.MmlSuperArgument:case z.MmlSubArgument:return this.renderContainerNS(e,et.mathML,"mn");case z.MmlFunctionName:return this.renderContainerNS(e,et.mathML,"ms");case z.MmlDelimiter:return this.renderMmlDelimiter(e);case z.MmlRun:return this.renderMmlRun(e);case z.MmlNary:return this.renderMmlNary(e);case z.MmlPreSubSuper:return this.renderMmlPreSubSuper(e);case z.MmlBar:return this.renderMmlBar(e);case z.MmlEquationArray:return this.renderMllList(e);case z.Inserted:return this.renderInserted(e);case z.Deleted:return this.renderDeleted(e)}return null}renderChildren(e,t){return this.renderElements(e.children,t)}renderElements(e,t){if(e==null)return null;var r=e.flatMap(n=>this.renderElement(n)).filter(n=>n!=null);return t&&_e(t,r),r}renderContainer(e,t,r){return this.createElement(t,r,this.renderChildren(e))}renderContainerNS(e,t,r,n){return ot(t,r,n,this.renderChildren(e))}renderParagraph(e){var s,o,d,v;var t=this.createElement("p");let r=this.findStyle(e.styleName);(o=e.tabs)!=null||(e.tabs=(s=r==null?void 0:r.paragraphProps)==null?void 0:s.tabs),this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),this.renderCommonProperties(t.style,e);let n=(v=e.numbering)!=null?v:(d=r==null?void 0:r.paragraphProps)==null?void 0:d.numbering;return n&&t.classList.add(this.numberingClass(n.id,n.level)),t}renderRunProperties(e,t){this.renderCommonProperties(e,t)}renderCommonProperties(e,t){t!=null&&(t.color&&(e.color=t.color),t.fontSize&&(e["font-size"]=t.fontSize))}renderHyperlink(e){var t=this.createElement("a");if(this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),e.href)t.href=e.href;else if(e.id){let r=this.document.documentPart.rels.find(n=>n.id==e.id&&n.targetMode==="External");t.href=r==null?void 0:r.target}return t}renderDrawing(e){var t=this.createElement("div");return t.style.display="inline-block",t.style.position="relative",t.style.textIndent="0px",this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),t}renderImage(e){let t=this.createElement("img");return this.renderStyleValues(e.cssStyle,t),this.document&&this.tasks.push(this.document.loadDocumentImage(e.src,this.currentPart).then(r=>{t.src=r})),t}renderText(e){return this.htmlDocument.createTextNode(e.text)}renderDeletedText(e){return this.options.renderEndnotes?this.htmlDocument.createTextNode(e.text):null}renderBreak(e){return e.break=="textWrapping"?this.createElement("br"):null}renderInserted(e){return this.options.renderChanges?this.renderContainer(e,"ins"):this.renderChildren(e)}renderDeleted(e){return this.options.renderChanges?this.renderContainer(e,"del"):null}renderSymbol(e){var t=this.createElement("span");return t.style.fontFamily=e.font,t.innerHTML="&#x".concat(e.char,";"),t}renderFootnoteReference(e){var t=this.createElement("sup");return this.currentFootnoteIds.push(e.id),t.textContent="".concat(this.currentFootnoteIds.length),t}renderEndnoteReference(e){var t=this.createElement("sup");return this.currentEndnoteIds.push(e.id),t.textContent="".concat(this.currentEndnoteIds.length),t}renderTab(e){var n;var t=this.createElement("span");if(t.innerHTML=" ",this.options.experimental){t.className=this.tabStopClass();var r=(n=oa(e,z.Paragraph))==null?void 0:n.tabs;this.currentTabs.push({stops:r,span:t})}return t}renderBookmarkStart(e){var t=this.createElement("span");return t.id=e.name,t}renderRun(e){if(e.fieldRun)return null;let t=this.createElement("span");if(e.id&&(t.id=e.id),this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),e.verticalAlign){let r=this.createElement(e.verticalAlign);this.renderChildren(e,r),t.appendChild(r)}else this.renderChildren(e,t);return t}renderTable(e){let t=this.createElement("table");return this.tableCellPositions.push(this.currentCellPosition),this.tableVerticalMerges.push(this.currentVerticalMerge),this.currentVerticalMerge={},this.currentCellPosition={col:0,row:0},e.columns&&t.appendChild(this.renderTableColumns(e.columns)),this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),this.currentVerticalMerge=this.tableVerticalMerges.pop(),this.currentCellPosition=this.tableCellPositions.pop(),t}renderTableColumns(e){let t=this.createElement("colgroup");for(let r of e){let n=this.createElement("col");r.width&&(n.style.width=r.width),t.appendChild(n)}return t}renderTableRow(e){let t=this.createElement("tr");return this.currentCellPosition.col=0,this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),this.currentCellPosition.row++,t}renderTableCell(e){let t=this.createElement("td"),r=this.currentCellPosition.col;return e.verticalMerge?e.verticalMerge=="restart"?(this.currentVerticalMerge[r]=t,t.rowSpan=1):this.currentVerticalMerge[r]&&(this.currentVerticalMerge[r].rowSpan+=1,t.style.display="none"):this.currentVerticalMerge[r]=null,this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),e.span&&(t.colSpan=e.span),this.currentCellPosition.col+=t.colSpan,t}renderVmlPicture(e){var t=ke("div");return this.renderChildren(e,t),t}renderVmlElement(e){var n,s;var t=je("svg");t.setAttribute("style",e.cssStyleText);let r=this.renderVmlChildElement(e);return(n=e.imageHref)!=null&&n.id&&this.tasks.push((s=this.document)==null?void 0:s.loadDocumentImage(e.imageHref.id,this.currentPart).then(o=>r.setAttribute("href",o))),t.appendChild(r),requestAnimationFrame(()=>{let o=t.firstElementChild.getBBox();t.setAttribute("width","".concat(Math.ceil(o.x+o.width))),t.setAttribute("height","".concat(Math.ceil(o.y+o.height)))}),t}renderVmlChildElement(e){let t=je(e.tagName);Object.entries(e.attrs).forEach(([r,n])=>t.setAttribute(r,n));for(let r of e.children)r.type==z.VmlElement?t.appendChild(this.renderVmlChildElement(r)):t.appendChild(...Mt(this.renderElement(r)));return t}renderMmlRadical(e){var n;let t=e.children.find(s=>s.type==z.MmlBase);if((n=e.props)!=null&&n.hideDegree)return ot(et.mathML,"msqrt",null,this.renderElements([t]));let r=e.children.find(s=>s.type==z.MmlDegree);return ot(et.mathML,"mroot",null,this.renderElements([t,r]))}renderMmlDelimiter(e){var r,n;let t=[];return t.push(ot(et.mathML,"mo",null,[(r=e.props.beginChar)!=null?r:"("])),t.push(...this.renderElements(e.children)),t.push(ot(et.mathML,"mo",null,[(n=e.props.endChar)!=null?n:")"])),ot(et.mathML,"mrow",null,t)}renderMmlNary(e){var m,y;let t=[],r=St(e.children,u=>u.type),n=r[z.MmlSuperArgument],s=r[z.MmlSubArgument],o=n?ot(et.mathML,"mo",null,Mt(this.renderElement(n))):null,d=s?ot(et.mathML,"mo",null,Mt(this.renderElement(s))):null,v=ot(et.mathML,"mo",null,[(y=(m=e.props)==null?void 0:m.char)!=null?y:"\u222B"]);return o||d?t.push(ot(et.mathML,"munderover",null,[v,d,o])):o?t.push(ot(et.mathML,"mover",null,[v,o])):d?t.push(ot(et.mathML,"munder",null,[v,d])):t.push(v),t.push(...this.renderElements(r[z.MmlBase].children)),ot(et.mathML,"mrow",null,t)}renderMmlPreSubSuper(e){let t=[],r=St(e.children,m=>m.type),n=r[z.MmlSuperArgument],s=r[z.MmlSubArgument],o=n?ot(et.mathML,"mo",null,Mt(this.renderElement(n))):null,d=s?ot(et.mathML,"mo",null,Mt(this.renderElement(s))):null,v=ot(et.mathML,"mo",null);return t.push(ot(et.mathML,"msubsup",null,[v,d,o])),t.push(...this.renderElements(r[z.MmlBase].children)),ot(et.mathML,"mrow",null,t)}renderMmlGroupChar(e){let t=e.props.verticalJustification==="bot"?"mover":"munder",r=this.renderContainerNS(e,et.mathML,t);return e.props.char&&r.appendChild(ot(et.mathML,"mo",null,[e.props.char])),r}renderMmlBar(e){let t=this.renderContainerNS(e,et.mathML,"mrow");switch(e.props.position){case"top":t.style.textDecoration="overline";break;case"bottom":t.style.textDecoration="underline";break}return t}renderMmlRun(e){let t=ot(et.mathML,"ms");return this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.renderChildren(e,t),t}renderMllList(e){let t=ot(et.mathML,"mtable");this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.renderChildren(e);for(let r of this.renderChildren(e))t.appendChild(ot(et.mathML,"mtr",null,[ot(et.mathML,"mtd",null,[r])]));return t}renderStyleValues(e,t){for(let r in e)r.startsWith("$")?t.setAttribute(r.slice(1),e[r]):t.style[r]=e[r]}renderClass(e,t){e.className&&(t.className=e.className),e.styleName&&t.classList.add(this.processStyleName(e.styleName))}findStyle(e){var t;return e&&((t=this.styleMap)==null?void 0:t[e])}numberingClass(e,t){return"".concat(this.className,"-num-").concat(e,"-").concat(t)}tabStopClass(){return"".concat(this.className,"-tab-stop")}styleToString(e,t,r=null){let n="".concat(e," {\r\n");for(let s in t)s.startsWith("$")||(n+=" ".concat(s,": ").concat(t[s],";\r\n"));return r&&(n+=r),n+"}\r\n"}numberingCounter(e,t){return"".concat(this.className,"-num-").concat(e,"-").concat(t)}levelTextToContent(e,t,r,n){var d;let s={tab:"\\9",space:"\\a0"};var o=e.replace(/%\d*/g,v=>{let m=parseInt(v.substring(1),10)-1;return'"counter('.concat(this.numberingCounter(r,m),", ").concat(n,')"')});return'"'.concat(o).concat((d=s[t])!=null?d:"",'"')}numFormatToCssValue(e){var r;var t={none:"none",bullet:"disc",decimal:"decimal",lowerLetter:"lower-alpha",upperLetter:"upper-alpha",lowerRoman:"lower-roman",upperRoman:"upper-roman",decimalZero:"decimal-leading-zero",aiueo:"katakana",aiueoFullWidth:"katakana",chineseCounting:"simp-chinese-informal",chineseCountingThousand:"simp-chinese-informal",chineseLegalSimplified:"simp-chinese-formal",chosung:"hangul-consonant",ideographDigital:"cjk-ideographic",ideographTraditional:"cjk-heavenly-stem",ideographLegalTraditional:"trad-chinese-formal",ideographZodiac:"cjk-earthly-branch",iroha:"katakana-iroha",irohaFullWidth:"katakana-iroha",japaneseCounting:"japanese-informal",japaneseDigitalTenThousand:"cjk-decimal",japaneseLegal:"japanese-formal",thaiNumbers:"thai",koreanCounting:"korean-hangul-formal",koreanDigital:"korean-hangul-formal",koreanDigital2:"korean-hanja-informal",hebrew1:"hebrew",hebrew2:"hebrew",hindiNumbers:"devanagari",ganada:"hangul",taiwaneseCounting:"cjk-ideographic",taiwaneseCountingThousand:"cjk-ideographic",taiwaneseDigital:"cjk-decimal"};return(r=t[e])!=null?r:e}refreshTabStops(){this.options.experimental&&(clearTimeout(this.tabsTimeout),this.tabsTimeout=setTimeout(()=>{let e=sa();for(let t of this.currentTabs)ia(t.span,t.stops,this.defaultTabSize,e)},500))}};function ke(a,e,t){return ot(void 0,a,e,t)}function je(a,e,t){return ot(et.svg,a,e,t)}function ot(a,e,t,r){var n=a?document.createElementNS(a,e):document.createElement(e);return Object.assign(n,t),r&&_e(n,r),n}function Ue(a){a.innerHTML=""}function _e(a,e){e.forEach(t=>a.appendChild(Nr(t)?document.createTextNode(t):t))}function xt(a){return ke("style",{innerHTML:a})}function Bt(a,e){a.appendChild(document.createComment(e))}function oa(a,e){for(var t=a.parent;t!=null&&t.type!=e;)t=t.parent;return t}var Ye={ignoreHeight:!1,ignoreWidth:!1,ignoreFonts:!1,breakPages:!0,debug:!1,experimental:!1,className:"docx",inWrapper:!0,trimXmlDeclaration:!0,ignoreLastRenderedPageBreak:!0,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0,useBase64URL:!1,renderChanges:!1};function la(a,e){let t=gt(gt({},Ye),e);return ge.load(a,new ve(t),t)}async function ca(a,e,t,r){let n=gt(gt({},Ye),r),s=new ye(window.document);return s.render(a,e,t,n),Promise.allSettled(s.tasks.filter(o=>o))}async function Je(a,e,t,r){let n=await la(a,r);return await ca(n,e,t,r),n}var ua=async a=>{let e=document.createElement("div");await Je(a,e,e,{className:"docx",breakPages:!0}),document.body.appendChild(e)},Qe=ua;var ha={"application/vnd.openxmlformats-officedocument.wordprocessingml.document":Qe},tr=ha;var da=a=>{window.parent.postMessage(a,window.location.origin)},Ht=a=>{console.error(a),da({type:"error",error:Gt(a)})},fa=async a=>{let e=tr[a.mimeType];try{if(e)await e(a.data);else throw new Error("Unsupported sandboxed preview mimetype: ".concat(a.mimeType))}catch(t){Ht(t)}},er=a=>{a.type==="data"?fa(a):Ht(new Error("Unexpected message type: ".concat(a.type)))};window.addEventListener("load",()=>{window.addEventListener("message",a=>{if(a.origin!==window.location.origin)return;let e=a.data;if(typeof e!="object"||!e.type){Ht(new Error("Unexpected message format"));return}er(e)})});})();