/*! * @plugin @tinymce-plugin/tp-importword * @version 0.0.3-beta.6 (2022-7-29) * @description 导入word文档 * @copyright (2022) Li Hailong . All rights reserved. https://github.com/tinymce-plugin/tp-importword */(function(){var Me=function(i,t){return Me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])},Me(i,t)};function be(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Me(i,t);function e(){this.constructor=i}i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var me=function(){return me=Object.assign||function(i){for(var t,e=1,n=arguments.length;e/,""));var e=new DOMParser().parseFromString(i,"application/xml"),n=Ct(e);if(n)throw new Error(n);return e}function Ct(i){var t;return(t=i.getElementsByTagName("parsererror")[0])===null||t===void 0?void 0:t.textContent}function Et(i){return new XMLSerializer().serializeToString(i)}var et=function(){function i(){}return Object.defineProperty(i.prototype,"elements",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){e===void 0&&(e=null);for(var n=[],a=0,r=t.childNodes.length;a>2,f=(3&h)<<4|p>>4,v=1>6:64,k=2>4,p=(15&w)<<4|(f=u.indexOf(l.charAt(k++)))>>2,m=(3&f)<<6|(v=u.indexOf(l.charAt(k++))),y[d++]=h,f!==64&&(y[d++]=p),v!==64&&(y[d++]=m);return y}},{"./support":30,"./utils":32}],2:[function(e,n,a){var r=e("./external"),o=e("./stream/DataWorker"),u=e("./stream/Crc32Probe"),l=e("./stream/DataLengthProbe");function h(p,m,w,f,v){this.compressedSize=p,this.uncompressedSize=m,this.crc32=w,this.compression=f,this.compressedContent=v}h.prototype={getContentWorker:function(){var p=new o(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),m=this;return p.on("end",function(){if(this.streamInfo.data_length!==m.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),p},getCompressedWorker:function(){return new o(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(p,m,w){return p.pipe(new u).pipe(new l("uncompressedSize")).pipe(m.compressWorker(w)).pipe(new l("compressedSize")).withStreamInfo("compression",m)},n.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,n,a){var r=e("./stream/GenericWorker");a.STORE={magic:"\0\0",compressWorker:function(o){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},a.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,n,a){var r=e("./utils"),o=function(){for(var u,l=[],h=0;h<256;h++){u=h;for(var p=0;p<8;p++)u=1&u?3988292384^u>>>1:u>>>1;l[h]=u}return l}();n.exports=function(u,l){return u!==void 0&&u.length?r.getTypeOf(u)!=="string"?function(h,p,m,w){var f=o,v=w+m;h^=-1;for(var k=w;k>>8^f[255&(h^p[k])];return-1^h}(0|l,u,u.length,0):function(h,p,m,w){var f=o,v=w+m;h^=-1;for(var k=w;k>>8^f[255&(h^p.charCodeAt(k))];return-1^h}(0|l,u,u.length,0):0}},{"./utils":32}],5:[function(e,n,a){a.base64=!1,a.binary=!1,a.dir=!1,a.createFolders=!0,a.date=null,a.compression=null,a.compressionOptions=null,a.comment=null,a.unixPermissions=null,a.dosPermissions=null},{}],6:[function(e,n,a){var r=null;r=typeof Promise<"u"?Promise:e("lie"),n.exports={Promise:r}},{lie:37}],7:[function(e,n,a){var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=e("pako"),u=e("./utils"),l=e("./stream/GenericWorker"),h=r?"uint8array":"array";function p(m,w){l.call(this,"FlateWorker/"+m),this._pako=null,this._pakoAction=m,this._pakoOptions=w,this.meta={}}a.magic="\b\0",u.inherits(p,l),p.prototype.processChunk=function(m){this.meta=m.meta,this._pako===null&&this._createPako(),this._pako.push(u.transformTo(h,m.data),!1)},p.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},p.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},p.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var m=this;this._pako.onData=function(w){m.push({data:w,meta:m.meta})}},a.compressWorker=function(m){return new p("Deflate",m)},a.uncompressWorker=function(){return new p("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,n,a){function r(f,v){var k,d="";for(k=0;k>>=8;return d}function o(f,v,k,d,b,y){var P,N,O=f.file,I=f.compression,T=y!==h.utf8encode,M=u.transformTo("string",y(O.name)),j=u.transformTo("string",h.utf8encode(O.name)),G=O.comment,J=u.transformTo("string",y(G)),x=u.transformTo("string",h.utf8encode(G)),R=j.length!==O.name.length,c=x.length!==G.length,F="",te="",W="",re=O.dir,H=O.date,ee={crc32:0,compressedSize:0,uncompressedSize:0};v&&!k||(ee.crc32=f.crc32,ee.compressedSize=f.compressedSize,ee.uncompressedSize=f.uncompressedSize);var A=0;v&&(A|=8),T||!R&&!c||(A|=2048);var E=0,Q=0;re&&(E|=16),b==="UNIX"?(Q=798,E|=function(K,ue){var ve=K;return K||(ve=ue?16893:33204),(65535&ve)<<16}(O.unixPermissions,re)):(Q=20,E|=function(K){return 63&(K||0)}(O.dosPermissions)),P=H.getUTCHours(),P<<=6,P|=H.getUTCMinutes(),P<<=5,P|=H.getUTCSeconds()/2,N=H.getUTCFullYear()-1980,N<<=4,N|=H.getUTCMonth()+1,N<<=5,N|=H.getUTCDate(),R&&(te=r(1,1)+r(p(M),4)+j,F+="up"+r(te.length,2)+te),c&&(W=r(1,1)+r(p(J),4)+x,F+="uc"+r(W.length,2)+W);var Y="";return Y+=` \0`,Y+=r(A,2),Y+=I.magic,Y+=r(P,2),Y+=r(N,2),Y+=r(ee.crc32,4),Y+=r(ee.compressedSize,4),Y+=r(ee.uncompressedSize,4),Y+=r(M.length,2),Y+=r(F.length,2),{fileRecord:m.LOCAL_FILE_HEADER+Y+M+F,dirRecord:m.CENTRAL_FILE_HEADER+r(Q,2)+Y+r(J.length,2)+"\0\0\0\0"+r(E,4)+r(d,4)+M+F+J}}var u=e("../utils"),l=e("../stream/GenericWorker"),h=e("../utf8"),p=e("../crc32"),m=e("../signature");function w(f,v,k,d){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=k,this.encodeFileName=d,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}u.inherits(w,l),w.prototype.push=function(f){var v=f.meta.percent||0,k=this.entriesCount,d=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,l.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:k?(v+100*(k-d-1))/k:100}}))},w.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var v=this.streamFiles&&!f.file.dir;if(v){var k=o(f,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:k.fileRecord,meta:{percent:0}})}else this.accumulate=!0},w.prototype.closedSource=function(f){this.accumulate=!1;var v=this.streamFiles&&!f.file.dir,k=o(f,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(k.dirRecord),v)this.push({data:function(d){return m.DATA_DESCRIPTOR+r(d.crc32,4)+r(d.compressedSize,4)+r(d.uncompressedSize,4)}(f),meta:{percent:100}});else for(this.push({data:k.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},w.prototype.flush=function(){for(var f=this.bytesWritten,v=0;v=this.index;l--)h=(h<<8)+this.byteAt(l);return this.index+=u,h},readString:function(u){return r.transformTo("string",this.readData(u))},readData:function(u){},lastIndexOfSignature:function(u){},readAndCheckSignature:function(u){},readDate:function(){var u=this.readInt(4);return new Date(Date.UTC(1980+(u>>25&127),(u>>21&15)-1,u>>16&31,u>>11&31,u>>5&63,(31&u)<<1))}},n.exports=o},{"../utils":32}],19:[function(e,n,a){var r=e("./Uint8ArrayReader");function o(u){r.call(this,u)}e("../utils").inherits(o,r),o.prototype.readData=function(u){this.checkOffset(u);var l=this.data.slice(this.zero+this.index,this.zero+this.index+u);return this.index+=u,l},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,n,a){var r=e("./DataReader");function o(u){r.call(this,u)}e("../utils").inherits(o,r),o.prototype.byteAt=function(u){return this.data.charCodeAt(this.zero+u)},o.prototype.lastIndexOfSignature=function(u){return this.data.lastIndexOf(u)-this.zero},o.prototype.readAndCheckSignature=function(u){return u===this.readData(4)},o.prototype.readData=function(u){this.checkOffset(u);var l=this.data.slice(this.zero+this.index,this.zero+this.index+u);return this.index+=u,l},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(e,n,a){var r=e("./ArrayReader");function o(u){r.call(this,u)}e("../utils").inherits(o,r),o.prototype.readData=function(u){if(this.checkOffset(u),u===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+u);return this.index+=u,l},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(e,n,a){var r=e("../utils"),o=e("../support"),u=e("./ArrayReader"),l=e("./StringReader"),h=e("./NodeBufferReader"),p=e("./Uint8ArrayReader");n.exports=function(m){var w=r.getTypeOf(m);return r.checkSupport(w),w!=="string"||o.uint8array?w==="nodebuffer"?new h(m):o.uint8array?new p(r.transformTo("uint8array",m)):new u(r.transformTo("array",m)):new l(m)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,n,a){a.LOCAL_FILE_HEADER="PK",a.CENTRAL_FILE_HEADER="PK",a.CENTRAL_DIRECTORY_END="PK",a.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",a.ZIP64_CENTRAL_DIRECTORY_END="PK",a.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(e,n,a){var r=e("./GenericWorker"),o=e("../utils");function u(l){r.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(u,r),u.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},n.exports=u},{"../utils":32,"./GenericWorker":28}],25:[function(e,n,a){var r=e("./GenericWorker"),o=e("../crc32");function u(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(u,r),u.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=u},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,n,a){var r=e("../utils"),o=e("./GenericWorker");function u(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}r.inherits(u,o),u.prototype.processChunk=function(l){if(l){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+l.data.length}o.prototype.processChunk.call(this,l)},n.exports=u},{"../utils":32,"./GenericWorker":28}],27:[function(e,n,a){var r=e("../utils"),o=e("./GenericWorker");function u(l){o.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(p){h.dataIsReady=!0,h.data=p,h.max=p&&p.length||0,h.type=r.getTypeOf(p),h.isPaused||h._tickAndRepeat()},function(p){h.error(p)})}r.inherits(u,o),u.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},u.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},u.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},u.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,h=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,h);break;case"uint8array":l=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":l=this.data.slice(this.index,h)}return this.index=h,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=u},{"../utils":32,"./GenericWorker":28}],28:[function(e,n,a){function r(o){this.name=o||"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(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,u){return this._listeners[o].push(u),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,u){if(this._listeners[o])for(var l=0;l "+o:o}},n.exports=r},{}],29:[function(e,n,a){var r=e("../utils"),o=e("./ConvertWorker"),u=e("./GenericWorker"),l=e("../base64"),h=e("../support"),p=e("../external"),m=null;if(h.nodestream)try{m=e("../nodejs/NodejsStreamOutputAdapter")}catch{}function w(v,k){return new p.Promise(function(d,b){var y=[],P=v._internalType,N=v._outputType,O=v._mimeType;v.on("data",function(I,T){y.push(I),k&&k(T)}).on("error",function(I){y=[],b(I)}).on("end",function(){try{var I=function(T,M,j){switch(T){case"blob":return r.newBlob(r.transformTo("arraybuffer",M),j);case"base64":return l.encode(M);default:return r.transformTo(T,M)}}(N,function(T,M){var j,G=0,J=null,x=0;for(j=0;j"u")a.blob=!1;else{var r=new ArrayBuffer(0);try{a.blob=new Blob([r],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(r),a.blob=o.getBlob("application/zip").size===0}catch{a.blob=!1}}}try{a.nodestream=!!e("readable-stream").Readable}catch{a.nodestream=!1}},{"readable-stream":16}],31:[function(e,n,a){for(var r=e("./utils"),o=e("./support"),u=e("./nodejsUtils"),l=e("./stream/GenericWorker"),h=new Array(256),p=0;p<256;p++)h[p]=252<=p?6:248<=p?5:240<=p?4:224<=p?3:192<=p?2:1;h[254]=h[254]=1;function m(){l.call(this,"utf-8 decode"),this.leftOver=null}function w(){l.call(this,"utf-8 encode")}a.utf8encode=function(f){return o.nodebuffer?u.newBufferFrom(f,"utf-8"):function(v){var k,d,b,y,P,N=v.length,O=0;for(y=0;y>>6:(d<65536?k[P++]=224|d>>>12:(k[P++]=240|d>>>18,k[P++]=128|d>>>12&63),k[P++]=128|d>>>6&63),k[P++]=128|63&d);return k}(f)},a.utf8decode=function(f){return o.nodebuffer?r.transformTo("nodebuffer",f).toString("utf-8"):function(v){var k,d,b,y,P=v.length,N=new Array(2*P);for(k=d=0;k>10&1023,N[d++]=56320|1023&b)}return N.length!==d&&(N.subarray?N=N.subarray(0,d):N.length=d),r.applyFromCharCode(N)}(f=r.transformTo(o.uint8array?"uint8array":"array",f))},r.inherits(m,l),m.prototype.processChunk=function(f){var v=r.transformTo(o.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var k=v;(v=new Uint8Array(k.length+this.leftOver.length)).set(this.leftOver,0),v.set(k,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var d=function(y,P){var N;for((P=P||y.length)>y.length&&(P=y.length),N=P-1;0<=N&&(192&y[N])==128;)N--;return N<0||N===0?P:N+h[y[N]]>P?N:P}(v),b=v;d!==v.length&&(o.uint8array?(b=v.subarray(0,d),this.leftOver=v.subarray(d,v.length)):(b=v.slice(0,d),this.leftOver=v.slice(d,v.length))),this.push({data:a.utf8decode(b),meta:f.meta})},m.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:a.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},a.Utf8DecodeWorker=m,r.inherits(w,l),w.prototype.processChunk=function(f){this.push({data:a.utf8encode(f.data),meta:f.meta})},a.Utf8EncodeWorker=w},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,n,a){var r=e("./support"),o=e("./base64"),u=e("./nodejsUtils"),l=e("set-immediate-shim"),h=e("./external");function p(d){return d}function m(d,b){for(var y=0;y>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(f){if(this.extraFields[1]){var v=r(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=v.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=v.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=v.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=v.readInt(4))}},readExtraFields:function(f){var v,k,d,b=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4>>6:(f<65536?w[d++]=224|f>>>12:(w[d++]=240|f>>>18,w[d++]=128|f>>>12&63),w[d++]=128|f>>>6&63),w[d++]=128|63&f);return w},a.buf2binstring=function(m){return p(m,m.length)},a.binstring2buf=function(m){for(var w=new r.Buf8(m.length),f=0,v=w.length;f>10&1023,y[v++]=56320|1023&k)}return p(y,v)},a.utf8border=function(m,w){var f;for((w=w||m.length)>m.length&&(w=m.length),f=w-1;0<=f&&(192&m[f])==128;)f--;return f<0||f===0?w:f+l[m[f]]>w?f:w}},{"./common":41}],43:[function(e,n,a){n.exports=function(r,o,u,l){for(var h=65535&r|0,p=r>>>16&65535|0,m=0;u!==0;){for(u-=m=2e3>>1:o>>>1;u[l]=o}return u}();n.exports=function(o,u,l,h){var p=r,m=h+l;o^=-1;for(var w=h;w>>8^p[255&(o^u[w])];return-1^o}},{}],46:[function(e,n,a){var r,o=e("../utils/common"),u=e("./trees"),l=e("./adler32"),h=e("./crc32"),p=e("./messages"),m=0,w=4,f=0,v=-2,k=-1,d=4,b=2,y=8,P=9,N=286,O=30,I=19,T=2*N+1,M=15,j=3,G=258,J=G+j+1,x=42,R=113,c=1,F=2,te=3,W=4;function re(s,D){return s.msg=p[D],D}function H(s){return(s<<1)-(4s.avail_out&&(z=s.avail_out),z!==0&&(o.arraySet(s.output,D.pending_buf,D.pending_out,z,s.next_out),s.next_out+=z,D.pending_out+=z,s.total_out+=z,s.avail_out-=z,D.pending-=z,D.pending===0&&(D.pending_out=0))}function E(s,D){u._tr_flush_block(s,0<=s.block_start?s.block_start:-1,s.strstart-s.block_start,D),s.block_start=s.strstart,A(s.strm)}function Q(s,D){s.pending_buf[s.pending++]=D}function Y(s,D){s.pending_buf[s.pending++]=D>>>8&255,s.pending_buf[s.pending++]=255&D}function K(s,D){var z,_,g=s.max_chain_length,S=s.strstart,L=s.prev_length,U=s.nice_match,C=s.strstart>s.w_size-J?s.strstart-(s.w_size-J):0,Z=s.window,q=s.w_mask,V=s.prev,$=s.strstart+G,oe=Z[S+L-1],ae=Z[S+L];s.prev_length>=s.good_match&&(g>>=2),U>s.lookahead&&(U=s.lookahead);do if(Z[(z=D)+L]===ae&&Z[z+L-1]===oe&&Z[z]===Z[S]&&Z[++z]===Z[S+1]){S+=2,z++;do;while(Z[++S]===Z[++z]&&Z[++S]===Z[++z]&&Z[++S]===Z[++z]&&Z[++S]===Z[++z]&&Z[++S]===Z[++z]&&Z[++S]===Z[++z]&&Z[++S]===Z[++z]&&Z[++S]===Z[++z]&&S<$);if(_=G-($-S),S=$-G,L<_){if(s.match_start=D,U<=(L=_))break;oe=Z[S+L-1],ae=Z[S+L]}}while((D=V[D&q])>C&&--g!=0);return L<=s.lookahead?L:s.lookahead}function ue(s){var D,z,_,g,S,L,U,C,Z,q,V=s.w_size;do{if(g=s.window_size-s.lookahead-s.strstart,s.strstart>=V+(V-J)){for(o.arraySet(s.window,s.window,V,V,0),s.match_start-=V,s.strstart-=V,s.block_start-=V,D=z=s.hash_size;_=s.head[--D],s.head[D]=V<=_?_-V:0,--z;);for(D=z=V;_=s.prev[--D],s.prev[D]=V<=_?_-V:0,--z;);g+=V}if(s.strm.avail_in===0)break;if(L=s.strm,U=s.window,C=s.strstart+s.lookahead,Z=g,q=void 0,q=L.avail_in,Z=j)for(S=s.strstart-s.insert,s.ins_h=s.window[S],s.ins_h=(s.ins_h<=j&&(s.ins_h=(s.ins_h<=j)if(_=u._tr_tally(s,s.strstart-s.match_start,s.match_length-j),s.lookahead-=s.match_length,s.match_length<=s.max_lazy_match&&s.lookahead>=j){for(s.match_length--;s.strstart++,s.ins_h=(s.ins_h<=j&&(s.ins_h=(s.ins_h<=j&&s.match_length<=s.prev_length){for(g=s.strstart+s.lookahead-j,_=u._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-j),s.lookahead-=s.prev_length-1,s.prev_length-=2;++s.strstart<=g&&(s.ins_h=(s.ins_h<s.pending_buf_size-5&&(z=s.pending_buf_size-5);;){if(s.lookahead<=1){if(ue(s),s.lookahead===0&&D===m)return c;if(s.lookahead===0)break}s.strstart+=s.lookahead,s.lookahead=0;var _=s.block_start+z;if((s.strstart===0||s.strstart>=_)&&(s.lookahead=s.strstart-_,s.strstart=_,E(s,!1),s.strm.avail_out===0)||s.strstart-s.block_start>=s.w_size-J&&(E(s,!1),s.strm.avail_out===0))return c}return s.insert=0,D===w?(E(s,!0),s.strm.avail_out===0?te:W):(s.strstart>s.block_start&&(E(s,!1),s.strm.avail_out),c)}),new ie(4,4,8,4,ve),new ie(4,5,16,8,ve),new ie(4,6,32,32,ve),new ie(4,4,16,16,ne),new ie(8,16,32,32,ne),new ie(8,16,128,128,ne),new ie(8,32,128,256,ne),new ie(32,128,258,1024,ne),new ie(32,258,258,4096,ne)],a.deflateInit=function(s,D){return we(s,D,y,15,8,0)},a.deflateInit2=we,a.deflateReset=_e,a.deflateResetKeep=ce,a.deflateSetHeader=function(s,D){return s&&s.state?s.state.wrap!==2?v:(s.state.gzhead=D,f):v},a.deflate=function(s,D){var z,_,g,S;if(!s||!s.state||5>8&255),Q(_,_.gzhead.time>>16&255),Q(_,_.gzhead.time>>24&255),Q(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),Q(_,255&_.gzhead.os),_.gzhead.extra&&_.gzhead.extra.length&&(Q(_,255&_.gzhead.extra.length),Q(_,_.gzhead.extra.length>>8&255)),_.gzhead.hcrc&&(s.adler=h(s.adler,_.pending_buf,_.pending,0)),_.gzindex=0,_.status=69):(Q(_,0),Q(_,0),Q(_,0),Q(_,0),Q(_,0),Q(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),Q(_,3),_.status=R);else{var L=y+(_.w_bits-8<<4)<<8;L|=(2<=_.strategy||_.level<2?0:_.level<6?1:_.level===6?2:3)<<6,_.strstart!==0&&(L|=32),L+=31-L%31,_.status=R,Y(_,L),_.strstart!==0&&(Y(_,s.adler>>>16),Y(_,65535&s.adler)),s.adler=1}if(_.status===69)if(_.gzhead.extra){for(g=_.pending;_.gzindex<(65535&_.gzhead.extra.length)&&(_.pending!==_.pending_buf_size||(_.gzhead.hcrc&&_.pending>g&&(s.adler=h(s.adler,_.pending_buf,_.pending-g,g)),A(s),g=_.pending,_.pending!==_.pending_buf_size));)Q(_,255&_.gzhead.extra[_.gzindex]),_.gzindex++;_.gzhead.hcrc&&_.pending>g&&(s.adler=h(s.adler,_.pending_buf,_.pending-g,g)),_.gzindex===_.gzhead.extra.length&&(_.gzindex=0,_.status=73)}else _.status=73;if(_.status===73)if(_.gzhead.name){g=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>g&&(s.adler=h(s.adler,_.pending_buf,_.pending-g,g)),A(s),g=_.pending,_.pending===_.pending_buf_size)){S=1;break}S=_.gzindex<_.gzhead.name.length?255&_.gzhead.name.charCodeAt(_.gzindex++):0,Q(_,S)}while(S!==0);_.gzhead.hcrc&&_.pending>g&&(s.adler=h(s.adler,_.pending_buf,_.pending-g,g)),S===0&&(_.gzindex=0,_.status=91)}else _.status=91;if(_.status===91)if(_.gzhead.comment){g=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>g&&(s.adler=h(s.adler,_.pending_buf,_.pending-g,g)),A(s),g=_.pending,_.pending===_.pending_buf_size)){S=1;break}S=_.gzindex<_.gzhead.comment.length?255&_.gzhead.comment.charCodeAt(_.gzindex++):0,Q(_,S)}while(S!==0);_.gzhead.hcrc&&_.pending>g&&(s.adler=h(s.adler,_.pending_buf,_.pending-g,g)),S===0&&(_.status=103)}else _.status=103;if(_.status===103&&(_.gzhead.hcrc?(_.pending+2>_.pending_buf_size&&A(s),_.pending+2<=_.pending_buf_size&&(Q(_,255&s.adler),Q(_,s.adler>>8&255),s.adler=0,_.status=R)):_.status=R),_.pending!==0){if(A(s),s.avail_out===0)return _.last_flush=-1,f}else if(s.avail_in===0&&H(D)<=H(z)&&D!==w)return re(s,-5);if(_.status===666&&s.avail_in!==0)return re(s,-5);if(s.avail_in!==0||_.lookahead!==0||D!==m&&_.status!==666){var U=_.strategy===2?function(C,Z){for(var q;;){if(C.lookahead===0&&(ue(C),C.lookahead===0)){if(Z===m)return c;break}if(C.match_length=0,q=u._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++,q&&(E(C,!1),C.strm.avail_out===0))return c}return C.insert=0,Z===w?(E(C,!0),C.strm.avail_out===0?te:W):C.last_lit&&(E(C,!1),C.strm.avail_out===0)?c:F}(_,D):_.strategy===3?function(C,Z){for(var q,V,$,oe,ae=C.window;;){if(C.lookahead<=G){if(ue(C),C.lookahead<=G&&Z===m)return c;if(C.lookahead===0)break}if(C.match_length=0,C.lookahead>=j&&0C.lookahead&&(C.match_length=C.lookahead)}if(C.match_length>=j?(q=u._tr_tally(C,1,C.match_length-j),C.lookahead-=C.match_length,C.strstart+=C.match_length,C.match_length=0):(q=u._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++),q&&(E(C,!1),C.strm.avail_out===0))return c}return C.insert=0,Z===w?(E(C,!0),C.strm.avail_out===0?te:W):C.last_lit&&(E(C,!1),C.strm.avail_out===0)?c:F}(_,D):r[_.level].func(_,D);if(U!==te&&U!==W||(_.status=666),U===c||U===te)return s.avail_out===0&&(_.last_flush=-1),f;if(U===F&&(D===1?u._tr_align(_):D!==5&&(u._tr_stored_block(_,0,0,!1),D===3&&(ee(_.head),_.lookahead===0&&(_.strstart=0,_.block_start=0,_.insert=0))),A(s),s.avail_out===0))return _.last_flush=-1,f}return D!==w?f:_.wrap<=0?1:(_.wrap===2?(Q(_,255&s.adler),Q(_,s.adler>>8&255),Q(_,s.adler>>16&255),Q(_,s.adler>>24&255),Q(_,255&s.total_in),Q(_,s.total_in>>8&255),Q(_,s.total_in>>16&255),Q(_,s.total_in>>24&255)):(Y(_,s.adler>>>16),Y(_,65535&s.adler)),A(s),0<_.wrap&&(_.wrap=-_.wrap),_.pending!==0?f:1)},a.deflateEnd=function(s){var D;return s&&s.state?(D=s.state.status)!==x&&D!==69&&D!==73&&D!==91&&D!==103&&D!==R&&D!==666?re(s,v):(s.state=null,D===R?re(s,-3):f):v},a.deflateSetDictionary=function(s,D){var z,_,g,S,L,U,C,Z,q=D.length;if(!s||!s.state||(S=(z=s.state).wrap)===2||S===1&&z.status!==x||z.lookahead)return v;for(S===1&&(s.adler=l(s.adler,D,q,0)),z.wrap=0,q>=z.w_size&&(S===0&&(ee(z.head),z.strstart=0,z.block_start=0,z.insert=0),Z=new o.Buf8(z.w_size),o.arraySet(Z,D,q-z.w_size,z.w_size,0),D=Z,q=z.w_size),L=s.avail_in,U=s.next_in,C=s.input,s.avail_in=q,s.next_in=0,s.input=D,ue(z);z.lookahead>=j;){for(_=z.strstart,g=z.lookahead-(j-1);z.ins_h=(z.ins_h<>>=j=M>>>24,P-=j,(j=M>>>16&255)===0)F[p++]=65535&M;else{if(!(16&j)){if((64&j)==0){M=N[(65535&M)+(y&(1<>>=j,P-=j),P<15&&(y+=c[l++]<>>=j=M>>>24,P-=j,!(16&(j=M>>>16&255))){if((64&j)==0){M=O[(65535&M)+(y&(1<>>=j,P-=j,(j=p-m)>3,y&=(1<<(P-=G<<3))-1,r.next_in=l,r.next_out=p,r.avail_in=l>>24&255)+(x>>>8&65280)+((65280&x)<<8)+((255&x)<<24)}function y(){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 P(x){var R;return x&&x.state?(R=x.state,x.total_in=x.total_out=R.total=0,x.msg="",R.wrap&&(x.adler=1&R.wrap),R.mode=v,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(k),R.distcode=R.distdyn=new r.Buf32(d),R.sane=1,R.back=-1,w):f}function N(x){var R;return x&&x.state?((R=x.state).wsize=0,R.whave=0,R.wnext=0,P(x)):f}function O(x,R){var c,F;return x&&x.state?(F=x.state,R<0?(c=0,R=-R):(c=1+(R>>4),R<48&&(R&=15)),R&&(R<8||15=W.wsize?(r.arraySet(W.window,R,c-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(F<(te=W.wsize-W.wnext)&&(te=F),r.arraySet(W.window,R,c-F,te,W.wnext),(F-=te)?(r.arraySet(W.window,R,c-F,F,0),W.wnext=F,W.whave=W.wsize):(W.wnext+=te,W.wnext===W.wsize&&(W.wnext=0),W.whave>>8&255,c.check=u(c.check,S,2,0),E=A=0,c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&A)<<8)+(A>>8))%31){x.msg="incorrect header check",c.mode=30;break}if((15&A)!=8){x.msg="unknown compression method",c.mode=30;break}if(E-=4,s=8+(15&(A>>>=4)),c.wbits===0)c.wbits=s;else if(s>c.wbits){x.msg="invalid window size",c.mode=30;break}c.dmax=1<>8&1),512&c.flags&&(S[0]=255&A,S[1]=A>>>8&255,c.check=u(c.check,S,2,0)),E=A=0,c.mode=3;case 3:for(;E<32;){if(H===0)break e;H--,A+=F[W++]<>>8&255,S[2]=A>>>16&255,S[3]=A>>>24&255,c.check=u(c.check,S,4,0)),E=A=0,c.mode=4;case 4:for(;E<16;){if(H===0)break e;H--,A+=F[W++]<>8),512&c.flags&&(S[0]=255&A,S[1]=A>>>8&255,c.check=u(c.check,S,2,0)),E=A=0,c.mode=5;case 5:if(1024&c.flags){for(;E<16;){if(H===0)break e;H--,A+=F[W++]<>>8&255,c.check=u(c.check,S,2,0)),E=A=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(H<(K=c.length)&&(K=H),K&&(c.head&&(s=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,F,W,K,s)),512&c.flags&&(c.check=u(c.check,F,K,W)),H-=K,W+=K,c.length-=K),c.length))break e;c.length=0,c.mode=7;case 7:if(2048&c.flags){if(H===0)break e;for(K=0;s=F[W+K++],c.head&&s&&c.length<65536&&(c.head.name+=String.fromCharCode(s)),s&&K>9&1,c.head.done=!0),x.adler=c.check=0,c.mode=12;break;case 10:for(;E<32;){if(H===0)break e;H--,A+=F[W++]<>>=7&E,E-=7&E,c.mode=27;break}for(;E<3;){if(H===0)break e;H--,A+=F[W++]<>>=1)){case 0:c.mode=14;break;case 1:if(G(c),c.mode=20,R!==6)break;A>>>=2,E-=2;break e;case 2:c.mode=17;break;case 3:x.msg="invalid block type",c.mode=30}A>>>=2,E-=2;break;case 14:for(A>>>=7&E,E-=7&E;E<32;){if(H===0)break e;H--,A+=F[W++]<>>16^65535)){x.msg="invalid stored block lengths",c.mode=30;break}if(c.length=65535&A,E=A=0,c.mode=15,R===6)break e;case 15:c.mode=16;case 16:if(K=c.length){if(H>>=5,E-=5,c.ndist=1+(31&A),A>>>=5,E-=5,c.ncode=4+(15&A),A>>>=4,E-=4,286>>=3,E-=3}for(;c.have<19;)c.lens[L[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,z={bits:c.lenbits},D=h(0,c.lens,0,19,c.lencode,0,c.work,z),c.lenbits=z.bits,D){x.msg="invalid code lengths set",c.mode=30;break}c.have=0,c.mode=19;case 19:for(;c.have>>16&255,pe=65535&g,!((ne=g>>>24)<=E);){if(H===0)break e;H--,A+=F[W++]<>>=ne,E-=ne,c.lens[c.have++]=pe;else{if(pe===16){for(_=ne+2;E<_;){if(H===0)break e;H--,A+=F[W++]<>>=ne,E-=ne,c.have===0){x.msg="invalid bit length repeat",c.mode=30;break}s=c.lens[c.have-1],K=3+(3&A),A>>>=2,E-=2}else if(pe===17){for(_=ne+3;E<_;){if(H===0)break e;H--,A+=F[W++]<>>=ne)),A>>>=3,E-=3}else{for(_=ne+7;E<_;){if(H===0)break e;H--,A+=F[W++]<>>=ne)),A>>>=7,E-=7}if(c.have+K>c.nlen+c.ndist){x.msg="invalid bit length repeat",c.mode=30;break}for(;K--;)c.lens[c.have++]=s}}if(c.mode===30)break;if(c.lens[256]===0){x.msg="invalid code -- missing end-of-block",c.mode=30;break}if(c.lenbits=9,z={bits:c.lenbits},D=h(p,c.lens,0,c.nlen,c.lencode,0,c.work,z),c.lenbits=z.bits,D){x.msg="invalid literal/lengths set",c.mode=30;break}if(c.distbits=6,c.distcode=c.distdyn,z={bits:c.distbits},D=h(m,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,z),c.distbits=z.bits,D){x.msg="invalid distances set",c.mode=30;break}if(c.mode=20,R===6)break e;case 20:c.mode=21;case 21:if(6<=H&&258<=ee){x.next_out=re,x.avail_out=ee,x.next_in=W,x.avail_in=H,c.hold=A,c.bits=E,l(x,Y),re=x.next_out,te=x.output,ee=x.avail_out,W=x.next_in,F=x.input,H=x.avail_in,A=c.hold,E=c.bits,c.mode===12&&(c.back=-1);break}for(c.back=0;ie=(g=c.lencode[A&(1<>>16&255,pe=65535&g,!((ne=g>>>24)<=E);){if(H===0)break e;H--,A+=F[W++]<>ce)])>>>16&255,pe=65535&g,!(ce+(ne=g>>>24)<=E);){if(H===0)break e;H--,A+=F[W++]<>>=ce,E-=ce,c.back+=ce}if(A>>>=ne,E-=ne,c.back+=ne,c.length=pe,ie===0){c.mode=26;break}if(32&ie){c.back=-1,c.mode=12;break}if(64&ie){x.msg="invalid literal/length code",c.mode=30;break}c.extra=15&ie,c.mode=22;case 22:if(c.extra){for(_=c.extra;E<_;){if(H===0)break e;H--,A+=F[W++]<>>=c.extra,E-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=23;case 23:for(;ie=(g=c.distcode[A&(1<>>16&255,pe=65535&g,!((ne=g>>>24)<=E);){if(H===0)break e;H--,A+=F[W++]<>ce)])>>>16&255,pe=65535&g,!(ce+(ne=g>>>24)<=E);){if(H===0)break e;H--,A+=F[W++]<>>=ce,E-=ce,c.back+=ce}if(A>>>=ne,E-=ne,c.back+=ne,64&ie){x.msg="invalid distance code",c.mode=30;break}c.offset=pe,c.extra=15&ie,c.mode=24;case 24:if(c.extra){for(_=c.extra;E<_;){if(H===0)break e;H--,A+=F[W++]<>>=c.extra,E-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){x.msg="invalid distance too far back",c.mode=30;break}c.mode=25;case 25:if(ee===0)break e;if(K=Y-ee,c.offset>K){if((K=c.offset-K)>c.whave&&c.sane){x.msg="invalid distance too far back",c.mode=30;break}ue=K>c.wnext?(K-=c.wnext,c.wsize-K):c.wnext-K,K>c.length&&(K=c.length),ve=c.window}else ve=te,ue=re-c.offset,K=c.length;for(eeT?(j=ue[ve+d[R]],E[Q+d[R]]):(j=96,0),y=1<>re)+(P-=y)]=M<<24|j<<16|G|0,P!==0;);for(y=1<>=1;if(y!==0?(A&=y-1,A+=y):A=0,R++,--Y[x]==0){if(x===F)break;x=m[w+d[R]]}if(te>>7)]}function Q(g,S){g.pending_buf[g.pending++]=255&S,g.pending_buf[g.pending++]=S>>>8&255}function Y(g,S,L){g.bi_valid>b-L?(g.bi_buf|=S<>b-g.bi_valid,g.bi_valid+=L-b):(g.bi_buf|=S<>>=1,L<<=1,0<--S;);return L>>>1}function ve(g,S,L){var U,C,Z=new Array(d+1),q=0;for(U=1;U<=d;U++)Z[U]=q=q+L[U-1]<<1;for(C=0;C<=S;C++){var V=g[2*C+1];V!==0&&(g[2*C]=ue(Z[V]++,V))}}function ne(g){var S;for(S=0;S>1;1<=L;L--)ce(g,Z,L);for(C=$;L=g.heap[1],g.heap[1]=g.heap[g.heap_len--],ce(g,Z,1),U=g.heap[1],g.heap[--g.heap_max]=L,g.heap[--g.heap_max]=U,Z[2*C]=Z[2*L]+Z[2*U],g.depth[C]=(g.depth[L]>=g.depth[U]?g.depth[L]:g.depth[U])+1,Z[2*L+1]=Z[2*U+1]=C,g.heap[1]=C++,ce(g,Z,1),2<=g.heap_len;);g.heap[--g.heap_max]=g.heap[1],function(ae,ge){var Ae,ke,je,fe,Ie,Xe,xe=ge.dyn_tree,_t=ge.max_code,tn=ge.stat_desc.static_tree,rn=ge.stat_desc.has_stree,nn=ge.stat_desc.extra_bits,kt=ge.stat_desc.extra_base,Ne=ge.stat_desc.max_length,Le=0;for(fe=0;fe<=d;fe++)ae.bl_count[fe]=0;for(xe[2*ae.heap[ae.heap_max]+1]=0,Ae=ae.heap_max+1;Ae>=7;C>>=1)if(1&oe&&V.dyn_ltree[2*$]!==0)return o;if(V.dyn_ltree[18]!==0||V.dyn_ltree[20]!==0||V.dyn_ltree[26]!==0)return u;for($=32;$>>3,(Z=g.static_len+3+7>>>3)<=C&&(C=Z)):C=Z=L+5,L+4<=C&&S!==-1?_(g,S,L,U):g.strategy===4||Z===C?(Y(g,2+(U?1:0),3),_e(g,J,x)):(Y(g,4+(U?1:0),3),function(V,$,oe,ae){var ge;for(Y(V,$-257,5),Y(V,oe-1,5),Y(V,ae-4,4),ge=0;ge>>8&255,g.pending_buf[g.d_buf+2*g.last_lit+1]=255&S,g.pending_buf[g.l_buf+g.last_lit]=255&L,g.last_lit++,S===0?g.dyn_ltree[2*L]++:(g.matches++,S--,g.dyn_ltree[2*(c[L]+m+1)]++,g.dyn_dtree[2*E(S)]++),g.last_lit===g.lit_bufsize-1},a._tr_align=function(g){Y(g,2,3),K(g,P,J),function(S){S.bi_valid===16?(Q(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)}(g)}},{"../utils/common":41}],53:[function(e,n,a){n.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(e,n,a){n.exports=typeof setImmediate=="function"?setImmediate:function(){var r=[].slice.apply(arguments);r.splice(1,0,0),setTimeout.apply(null,r)}},{}]},{},[10])(10)})})(rt);function Tt(i){return i==null?void 0:i.replace(/[ .]+/g,"-").replace(/[&]+/g,"and").toLowerCase()}function ze(i){var t=i.lastIndexOf("/")+1,e=t==0?"":i.substring(0,t),n=t==0?i:i.substring(t);return[e,n]}function Ue(i,t){try{var e="http://docx/",n=new URL(i,e+t).toString();return n.substring(e.length)}catch{return"".concat(t).concat(i)}}function Rt(i,t){return i.reduce(function(e,n){return e[t(n)]=n,e},{})}function Dt(i){return new Promise(function(t,e){var n=new FileReader;n.onloadend=function(){return t(n.result.replace(/application\/octet\-stream;/,"image/png;"))},n.readAsDataURL(i)})}function We(i){return i&&typeof i=="object"&&!Array.isArray(i)}function Te(i){for(var t,e=[],n=1;n"u"))return parseInt(i)}var ir=function(i){be(t,i);function t(){var e=i!==null&&i.apply(this,arguments)||this;return Object.defineProperty(e,"props",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),e}return Object.defineProperty(t.prototype,"parseXml",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.props=ar(e,this._package.xmlParser)}}),t}(ye);function or(i,t){for(var e={},n=0,a=t.elements(i);n0&&(e["font-family"]=r)}}),Object.defineProperty(i.prototype,"parseIndentation",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){var n=B.lengthAttr(t,"firstLine"),a=B.lengthAttr(t,"hanging"),r=B.lengthAttr(t,"left"),o=B.lengthAttr(t,"start"),u=B.lengthAttr(t,"right"),l=B.lengthAttr(t,"end");n&&(e["text-indent"]=n),a&&(e["text-indent"]="-".concat(a)),(r||o)&&(e["margin-left"]=r||o),(u||l)&&(e["margin-right"]=u||l)}}),Object.defineProperty(i.prototype,"parseSpacing",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){var n=B.lengthAttr(t,"before"),a=B.lengthAttr(t,"after"),r=B.intAttr(t,"line",null),o=B.attr(t,"lineRule");if(n&&(e["margin-top"]=n),a&&(e["margin-bottom"]=a),r!==null)switch(o){case"auto":e["line-height"]="".concat((r/240).toFixed(2));break;case"atLeast":e["line-height"]="calc(100% + ".concat(Math.ceil(r/15),"px)");break;default:e["line-height"]=e["min-height"]="".concat(Math.ceil(r/15),"px");break}}}),Object.defineProperty(i.prototype,"parseMarginProperties",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){se.foreach(t,function(n){switch(n.localName){case"left":e["padding-left"]=le.valueOfMargin(n);break;case"right":e["padding-right"]=le.valueOfMargin(n);break;case"top":e["padding-top"]=le.valueOfMargin(n);break;case"bottom":e["padding-bottom"]=le.valueOfMargin(n);break}})}}),Object.defineProperty(i.prototype,"parseTrHeight",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){switch(B.attr(t,"hRule")){case"exact":e.height=B.lengthAttr(t,"val");break;case"atLeast":default:e.height=B.lengthAttr(t,"val");break}}}),Object.defineProperty(i.prototype,"parseBorderProperties",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){se.foreach(t,function(n){switch(n.localName){case"start":case"left":e["border-left"]=le.valueOfBorder(n);break;case"end":case"right":e["border-right"]=le.valueOfBorder(n);break;case"top":e["border-top"]=le.valueOfBorder(n);break;case"bottom":e["border-bottom"]=le.valueOfBorder(n);break}})}}),i}(),Cr=["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","none","red","white","yellow"],se=function(){function i(){}return Object.defineProperty(i,"foreach",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){for(var n=0;n0?t.map(function(M){return{pos:bt(M.position),leader:M.leader,style:M.style}}).sort(function(M,j){return M.pos-j.pos}):[pt],h=l[l.length-1],p=o.width*n,m=bt(e),w=h.pos+m;if(wk});if(d!=null){var b=1;if(d.style=="right"||d.style=="center"){var y=Array.from(a.querySelectorAll(".".concat(i.className))),P=y.indexOf(i)+1,N=document.createRange();N.setStart(i,1),P0)return zr(i);if(e==="number"&&isNaN(i)===!1)return t.long?Rr(i):Tr(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function zr(i){if(i=String(i),!(i.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(i);if(t){var e=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return e*Nr;case"days":case"day":case"d":return e*Ee;case"hours":case"hour":case"hrs":case"hr":case"h":return e*Ce;case"minutes":case"minute":case"mins":case"min":case"m":return e*Oe;case"seconds":case"second":case"secs":case"sec":case"s":return e*Se;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function Tr(i){return i>=Ee?Math.round(i/Ee)+"d":i>=Ce?Math.round(i/Ce)+"h":i>=Oe?Math.round(i/Oe)+"m":i>=Se?Math.round(i/Se)+"s":i+"ms"}function Rr(i){return Fe(i,Ee,"day")||Fe(i,Ce,"hour")||Fe(i,Oe,"minute")||Fe(i,Se,"second")||i+" ms"}function Fe(i,t,e){if(!(i=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(l){try{return JSON.stringify(l)}catch(h){return"[UnexpectedJSONParseError]: "+h.message}};function n(l){var h=this.useColors;if(l[0]=(h?"%c":"")+this.namespace+(h?" %c":" ")+l[0]+(h?"%c ":" ")+"+"+t.humanize(this.diff),!!h){var p="color: "+this.color;l.splice(1,0,p,"color: inherit");var m=0,w=0;l[0].replace(/%[a-zA-Z%]/g,function(f){f!=="%%"&&(m++,f==="%c"&&(w=m))}),l.splice(w,0,p)}}function a(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function r(l){try{l==null?t.storage.removeItem("debug"):t.storage.debug=l}catch{}}function o(){var l;try{l=t.storage.debug}catch{}return!l&&typeof process<"u"&&"env"in process&&(l={}.DEBUG),l}t.enable(o());function u(){try{return window.localStorage}catch{}}}(Ze,Ze.exports),function(i){(function(t,e){var n=i.exports;n?i.exports=e(Ze.exports("eventproxy")):this[t]=e()})("EventProxy",function(t){t=t||function(){};var e=Array.prototype.slice,n=Array.prototype.concat,a="__all__",r=function(){if(!(this instanceof r))return new r;this._callbacks={},this._fired={}};r.prototype.addListener=function(l,h){return t("Add listener for %s",l),this._callbacks[l]=this._callbacks[l]||[],this._callbacks[l].push(h),this},r.prototype.bind=r.prototype.addListener,r.prototype.on=r.prototype.addListener,r.prototype.subscribe=r.prototype.addListener,r.prototype.headbind=function(l,h){return t("Add listener for %s",l),this._callbacks[l]=this._callbacks[l]||[],this._callbacks[l].unshift(h),this},r.prototype.removeListener=function(l,h){var p=this._callbacks;if(!l)t("Remove all listeners"),this._callbacks={};else if(!h)t("Remove all listeners of %s",l),p[l]=[];else{var m=p[l];if(m)for(var w=m.length,f=0;f=0;O--)r[O].sectProps==null?r[O].sectProps=N:N=r[O].sectProps;return r}}),Object.defineProperty(i.prototype,"renderWrapper",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.createElement("div",{className:"".concat(this.className,"-wrapper")},t)}}),Object.defineProperty(i.prototype,"renderDefaultStyle",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.className,e=` .`.concat(t,`-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } .`).concat(t,"-wrapper>section.").concat(t,` { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; } .`).concat(t,` { color: black; } section.`).concat(t,` { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; } section.`).concat(t,`>article { margin-bottom: auto; } .`).concat(t,` table { border-collapse: collapse; } .`).concat(t," table td, .").concat(t,` table th { vertical-align: top; } .`).concat(t,` p { margin: 0pt; min-height: 1em; } .`).concat(t,` span { white-space: pre-wrap; overflow-wrap: break-word; } .`).concat(t,` a { color: inherit; text-decoration: inherit; } `);return Ke(e)}}),Object.defineProperty(i.prototype,"renderNotes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e,n){var a=t.map(function(o){return e[o]}).filter(function(o){return o});if(a.length>0){var r=this.createElement("ol",null,this.renderElements(a));n.appendChild(r)}}}),Object.defineProperty(i.prototype,"renderElement",{enumerable:!1,configurable:!0,writable:!0,value:function(t){switch(t.type){case X.Paragraph:return this.renderParagraph(t);case X.BookmarkStart:return this.renderBookmarkStart(t);case X.BookmarkEnd:return null;case X.Run:return this.renderRun(t);case X.Table:return this.renderTable(t);case X.Row:return this.renderTableRow(t);case X.Cell:return this.renderTableCell(t);case X.Hyperlink:return this.renderHyperlink(t);case X.Drawing:return this.renderDrawing(t);case X.Image:return this.renderImage(t);case X.Text:return this.renderText(t);case X.Tab:return this.renderTab(t);case X.Symbol:return this.renderSymbol(t);case X.Break:return this.renderBreak(t);case X.Footer:return this.renderContainer(t,"footer");case X.Header:return this.renderContainer(t,"header");case X.Footnote:case X.Endnote:return this.renderContainer(t,"li");case X.FootnoteReference:return this.renderFootnoteReference(t);case X.EndnoteReference:return this.renderEndnoteReference(t);case X.NoBreakHyphen:return this.createElement("wbr")}return null}}),Object.defineProperty(i.prototype,"renderChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){return this.renderElements(t.children,e)}}),Object.defineProperty(i.prototype,"renderElements",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){var n=this;if(t==null)return null;var a=t.map(function(r){return n.renderElement(r)}).filter(function(r){return r!=null});return e&&Ge(e,a),a}}),Object.defineProperty(i.prototype,"renderContainer",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){return this.createElement(e,null,this.renderChildren(t))}}),Object.defineProperty(i.prototype,"renderParagraph",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e,n,a,r,o=this.createElement("p"),u=this.findStyle(t.styleName);(e=t.tabs)!==null&&e!==void 0||(t.tabs=(n=u==null?void 0:u.paragraphProps)===null||n===void 0?void 0:n.tabs),this.renderClass(t,o),this.renderChildren(t,o),this.renderStyleValues(t.cssStyle,o),this.renderCommonProperties(o.style,t);var l=(a=t.numbering)!==null&&a!==void 0?a:(r=u==null?void 0:u.paragraphProps)===null||r===void 0?void 0:r.numbering;if(l){if(this.domNumberings[l.id]&&this.domNumberings[l.id][l.level]){var h=this.domNumberings[l.id][l.level];if(o.firstChild&&o.firstChild.innerHTML)o.firstChild.innerHTML=this.numLevelTextToContent(h)+o.firstChild.innerHTML;else{var p=this.createElement("span");p.innerHTML=this.numLevelTextToContent(h),o.appendChild(p)}}o.classList.add(this.numberingClass(l.id,l.level))}return o}}),Object.defineProperty(i.prototype,"renderRunProperties",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){this.renderCommonProperties(t,e)}}),Object.defineProperty(i.prototype,"renderCommonProperties",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){e!=null&&(e.color&&(t.color=e.color),e.fontSize&&(t["font-size"]=e.fontSize))}}),Object.defineProperty(i.prototype,"renderHyperlink",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e=this.createElement("a");return this.renderChildren(t,e),this.renderStyleValues(t.cssStyle,e),t.href&&(e.href=t.href),e}}),Object.defineProperty(i.prototype,"renderDrawing",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e,n=this.createElement("p");return n.style.display="inline-block",t.children&&((e=t.children[0])===null||e===void 0?void 0:e.type)!=="image"&&(n.style.position="relative",n.style.textIndent="0px"),this.renderChildren(t,n),this.renderStyleValues(t.cssStyle,n),n}}),Object.defineProperty(i.prototype,"renderImage",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e,n,a=this.createElement("img");!t.cssStyle["max-width"]&&(t.cssStyle["max-width"]="100%"),t.cssStyle.width&&(t.cssStyle.width=parseFloat(t.cssStyle.width)*2+"pt"),t.cssStyle.height&&(t.cssStyle.height=parseFloat(t.cssStyle.height)*2+"pt");var r="";((n=(e=t.parent)===null||e===void 0?void 0:e.parent)===null||n===void 0?void 0:n.parent)&&t.parent.parent.parent.cssStyle&&(r=t.parent.parent.parent.cssStyle["text-align"]),r=="right"&&(t.cssStyle.float="right",t.cssStyle.height.replace(/pt$/,"px")),r=="center"&&(t.cssStyle.display="block",t.cssStyle["margin-left"]="auto",t.cssStyle["margin-right"]="auto"),this.renderStyleValues(t.cssStyle,a);var o=this;return o.renderImageCount++,a.setAttribute("data-tp-src",t.src),this.document&&this.document.loadDocumentImage(t.src,this.currentPart).then(function(u){o.ep2.emit("renderImage",{status:"ok",src:u,rId:t.src}),a.parentNode.style.width="100%",a.parentNode.style.height=null,a.parentNode.style.display="inline-block",a.src=u}),a}}),Object.defineProperty(i.prototype,"renderText",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.htmlDocument.createTextNode(t.text)}}),Object.defineProperty(i.prototype,"renderBreak",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.break=="textWrapping"?this.createElement("br"):null}}),Object.defineProperty(i.prototype,"renderSymbol",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e=this.createElement("span");return e.style.fontFamily=t.font,e.innerHTML="&#x".concat(t.char,";"),e}}),Object.defineProperty(i.prototype,"renderFootnoteReference",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e=this.createElement("sup");return this.currentFootnoteIds.push(t.id),e.textContent="".concat(this.currentFootnoteIds.length),e}}),Object.defineProperty(i.prototype,"renderEndnoteReference",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e=this.createElement("sup");return this.currentEndnoteIds.push(t.id),e.textContent="".concat(this.currentEndnoteIds.length),e}}),Object.defineProperty(i.prototype,"renderTab",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e,n=this.createElement("span");if(n.innerHTML=" ",this.options.experimental){n.className=this.tabStopClass();var a=(e=Mr(t,X.Paragraph))===null||e===void 0?void 0:e.tabs;this.currentTabs.push({stops:a,span:n})}return n}}),Object.defineProperty(i.prototype,"renderBookmarkStart",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e=this.createElement("span");return e.id=t.name,e}}),Object.defineProperty(i.prototype,"renderRun",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.fieldRun)return null;var e=this.createElement("span");if(t.id&&(e.id=t.id),this.renderClass(t,e),this.renderStyleValues(t.cssStyle,e),t.verticalAlign){var n=this.createElement(t.verticalAlign);this.renderChildren(t,n),e.appendChild(n)}else this.renderChildren(t,e);return e}}),Object.defineProperty(i.prototype,"renderTable",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e=this.createElement("table");return this.tableCellPositions.push(this.currentCellPosition),this.tableVerticalMerges.push(this.currentVerticalMerge),this.currentVerticalMerge={},this.currentCellPosition={col:0,row:0},t.columns&&e.appendChild(this.renderTableColumns(t.columns)),!t.cssStyle["border-collapse"]&&(t.cssStyle["border-collapse"]="collapse"),this.renderClass(t,e),this.renderChildren(t,e),this.renderStyleValues(t.cssStyle,e),this.currentVerticalMerge=this.tableVerticalMerges.pop(),this.currentCellPosition=this.tableCellPositions.pop(),e}}),Object.defineProperty(i.prototype,"renderTableColumns",{enumerable:!1,configurable:!0,writable:!0,value:function(t){for(var e=this.createElement("colgroup"),n=0,a=t;n'+t.levelText+""),"".concat(o).concat((n=a[t.suff])!==null&&n!==void 0?n:"")}}),Object.defineProperty(i.prototype,"numFormatToCssValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var e={none:"none",bullet:"disc",decimal:"decimal",lowerLetter:"lower-alpha",upperLetter:"upper-alpha",lowerRoman:"lower-roman",upperRoman:"upper-roman"};return e[t]||t}}),Object.defineProperty(i.prototype,"refreshTabStops",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;!this.options.experimental||(clearTimeout(this.tabsTimeout),this.tabsTimeout=setTimeout(function(){for(var e=Ar(),n=0,a=t.currentTabs;n'};Jr(wt);var en={opt:wt};return en})();