import{c as Tt,g as xe}from"./index-be50c070.js";import{c as Ft}from"./_commonjs-dynamic-modules-302442b1.js";var oe={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files (c) 2009-2016 Stuart Knightley Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE */(function(c,e){(function(t){c.exports=t()})(function(){return function t(r,n,a){function i(k,w){if(!n[k]){if(!r[k]){var y=typeof Ft=="function"&&Ft;if(!w&&y)return y(k,!0);if(l)return l(k,!0);var _=new Error("Cannot find module '"+k+"'");throw _.code="MODULE_NOT_FOUND",_}var d=n[k]={exports:{}};r[k][0].call(d.exports,function(v){var u=r[k][1][v];return i(u||v)},d,d.exports,t,r,n,a)}return n[k].exports}for(var l=typeof Ft=="function"&&Ft,h=0;h>2,d=(3&k)<<4|w>>4,v=1>6:64,u=2>4,w=(15&_)<<4|(d=l.indexOf(h.charAt(u++)))>>2,y=(3&d)<<6|(v=l.indexOf(h.charAt(u++))),b[m++]=k,d!==64&&(b[m++]=w),v!==64&&(b[m++]=y);return b}},{"./support":30,"./utils":32}],2:[function(t,r,n){var a=t("./external"),i=t("./stream/DataWorker"),l=t("./stream/Crc32Probe"),h=t("./stream/DataLengthProbe");function k(w,y,_,d,v){this.compressedSize=w,this.uncompressedSize=y,this.crc32=_,this.compression=d,this.compressedContent=v}k.prototype={getContentWorker:function(){var w=new i(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")),y=this;return w.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),w},getCompressedWorker:function(){return new i(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},k.createWorkerFrom=function(w,y,_){return w.pipe(new l).pipe(new h("uncompressedSize")).pipe(y.compressWorker(_)).pipe(new h("compressedSize")).withStreamInfo("compression",y)},r.exports=k},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,r,n){var a=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,r,n){var a=t("./utils"),i=function(){for(var l,h=[],k=0;k<256;k++){l=k;for(var w=0;w<8;w++)l=1&l?3988292384^l>>>1:l>>>1;h[k]=l}return h}();r.exports=function(l,h){return l!==void 0&&l.length?a.getTypeOf(l)!=="string"?function(k,w,y,_){var d=i,v=_+y;k^=-1;for(var u=_;u>>8^d[255&(k^w[u])];return-1^k}(0|h,l,l.length,0):function(k,w,y,_){var d=i,v=_+y;k^=-1;for(var u=_;u>>8^d[255&(k^w.charCodeAt(u))];return-1^k}(0|h,l,l.length,0):0}},{"./utils":32}],5:[function(t,r,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(t,r,n){var a=null;a=typeof Promise<"u"?Promise:t("lie"),r.exports={Promise:a}},{lie:37}],7:[function(t,r,n){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=t("pako"),l=t("./utils"),h=t("./stream/GenericWorker"),k=a?"uint8array":"array";function w(y,_){h.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=_,this.meta={}}n.magic="\b\0",l.inherits(w,h),w.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(k,y.data),!1)},w.prototype.flush=function(){h.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},w.prototype.cleanUp=function(){h.prototype.cleanUp.call(this),this._pako=null},w.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(_){y.push({data:_,meta:y.meta})}},n.compressWorker=function(y){return new w("Deflate",y)},n.uncompressWorker=function(){return new w("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,r,n){function a(d,v){var u,m="";for(u=0;u>>=8;return m}function i(d,v,u,m,f,b){var x,A,P=d.file,D=d.compression,F=b!==k.utf8encode,H=l.transformTo("string",b(P.name)),T=l.transformTo("string",k.utf8encode(P.name)),X=P.comment,Q=l.transformTo("string",b(X)),S=l.transformTo("string",k.utf8encode(X)),I=T.length!==P.name.length,o=S.length!==X.length,L="",et="",W="",rt=P.dir,$=P.date,tt={crc32:0,compressedSize:0,uncompressedSize:0};v&&!u||(tt.crc32=d.crc32,tt.compressedSize=d.compressedSize,tt.uncompressedSize=d.uncompressedSize);var B=0;v&&(B|=8),F||!I&&!o||(B|=2048);var z=0,J=0;rt&&(z|=16),f==="UNIX"?(J=798,z|=function(G,ut){var bt=G;return G||(bt=ut?16893:33204),(65535&bt)<<16}(P.unixPermissions,rt)):(J=20,z|=function(G){return 63&(G||0)}(P.dosPermissions)),x=$.getUTCHours(),x<<=6,x|=$.getUTCMinutes(),x<<=5,x|=$.getUTCSeconds()/2,A=$.getUTCFullYear()-1980,A<<=4,A|=$.getUTCMonth()+1,A<<=5,A|=$.getUTCDate(),I&&(et=a(1,1)+a(w(H),4)+T,L+="up"+a(et.length,2)+et),o&&(W=a(1,1)+a(w(Q),4)+S,L+="uc"+a(W.length,2)+W);var K="";return K+=` \0`,K+=a(B,2),K+=D.magic,K+=a(x,2),K+=a(A,2),K+=a(tt.crc32,4),K+=a(tt.compressedSize,4),K+=a(tt.uncompressedSize,4),K+=a(H.length,2),K+=a(L.length,2),{fileRecord:y.LOCAL_FILE_HEADER+K+H+L,dirRecord:y.CENTRAL_FILE_HEADER+a(J,2)+K+a(Q.length,2)+"\0\0\0\0"+a(z,4)+a(m,4)+H+L+Q}}var l=t("../utils"),h=t("../stream/GenericWorker"),k=t("../utf8"),w=t("../crc32"),y=t("../signature");function _(d,v,u,m){h.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=u,this.encodeFileName=m,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(_,h),_.prototype.push=function(d){var v=d.meta.percent||0,u=this.entriesCount,m=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,h.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:u?(v+100*(u-m-1))/u:100}}))},_.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var v=this.streamFiles&&!d.file.dir;if(v){var u=i(d,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:u.fileRecord,meta:{percent:0}})}else this.accumulate=!0},_.prototype.closedSource=function(d){this.accumulate=!1;var v=this.streamFiles&&!d.file.dir,u=i(d,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(u.dirRecord),v)this.push({data:function(m){return y.DATA_DESCRIPTOR+a(m.crc32,4)+a(m.compressedSize,4)+a(m.uncompressedSize,4)}(d),meta:{percent:100}});else for(this.push({data:u.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},_.prototype.flush=function(){for(var d=this.bytesWritten,v=0;v=this.index;h--)k=(k<<8)+this.byteAt(h);return this.index+=l,k},readString:function(l){return a.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},r.exports=i},{"../utils":32}],19:[function(t,r,n){var a=t("./Uint8ArrayReader");function i(l){a.call(this,l)}t("../utils").inherits(i,a),i.prototype.readData=function(l){this.checkOffset(l);var h=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,h},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,r,n){var a=t("./DataReader");function i(l){a.call(this,l)}t("../utils").inherits(i,a),i.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},i.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},i.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},i.prototype.readData=function(l){this.checkOffset(l);var h=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,h},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,r,n){var a=t("./ArrayReader");function i(l){a.call(this,l)}t("../utils").inherits(i,a),i.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var h=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,h},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,r,n){var a=t("../utils"),i=t("../support"),l=t("./ArrayReader"),h=t("./StringReader"),k=t("./NodeBufferReader"),w=t("./Uint8ArrayReader");r.exports=function(y){var _=a.getTypeOf(y);return a.checkSupport(_),_!=="string"||i.uint8array?_==="nodebuffer"?new k(y):i.uint8array?new w(a.transformTo("uint8array",y)):new l(a.transformTo("array",y)):new h(y)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,r,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,r,n){var a=t("./GenericWorker"),i=t("../utils");function l(h){a.call(this,"ConvertWorker to "+h),this.destType=h}i.inherits(l,a),l.prototype.processChunk=function(h){this.push({data:i.transformTo(this.destType,h.data),meta:h.meta})},r.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(t,r,n){var a=t("./GenericWorker"),i=t("../crc32");function l(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(l,a),l.prototype.processChunk=function(h){this.streamInfo.crc32=i(h.data,this.streamInfo.crc32||0),this.push(h)},r.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,r,n){var a=t("../utils"),i=t("./GenericWorker");function l(h){i.call(this,"DataLengthProbe for "+h),this.propName=h,this.withStreamInfo(h,0)}a.inherits(l,i),l.prototype.processChunk=function(h){if(h){var k=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=k+h.data.length}i.prototype.processChunk.call(this,h)},r.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(t,r,n){var a=t("../utils"),i=t("./GenericWorker");function l(h){i.call(this,"DataWorker");var k=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,h.then(function(w){k.dataIsReady=!0,k.data=w,k.max=w&&w.length||0,k.type=a.getTypeOf(w),k.isPaused||k._tickAndRepeat()},function(w){k.error(w)})}a.inherits(l,i),l.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var h=null,k=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":h=this.data.substring(this.index,k);break;case"uint8array":h=this.data.subarray(this.index,k);break;case"array":case"nodebuffer":h=this.data.slice(this.index,k)}return this.index=k,this.push({data:h,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(t,r,n){function a(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}a.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,l){return this._listeners[i].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,l){if(this._listeners[i])for(var h=0;h "+i:i}},r.exports=a},{}],29:[function(t,r,n){var a=t("../utils"),i=t("./ConvertWorker"),l=t("./GenericWorker"),h=t("../base64"),k=t("../support"),w=t("../external"),y=null;if(k.nodestream)try{y=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function _(v,u){return new w.Promise(function(m,f){var b=[],x=v._internalType,A=v._outputType,P=v._mimeType;v.on("data",function(D,F){b.push(D),u&&u(F)}).on("error",function(D){b=[],f(D)}).on("end",function(){try{var D=function(F,H,T){switch(F){case"blob":return a.newBlob(a.transformTo("arraybuffer",H),T);case"base64":return h.encode(H);default:return a.transformTo(F,H)}}(A,function(F,H){var T,X=0,Q=null,S=0;for(T=0;T"u")n.blob=!1;else{var a=new ArrayBuffer(0);try{n.blob=new Blob([a],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(a),n.blob=i.getBlob("application/zip").size===0}catch{n.blob=!1}}}try{n.nodestream=!!t("readable-stream").Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(t,r,n){for(var a=t("./utils"),i=t("./support"),l=t("./nodejsUtils"),h=t("./stream/GenericWorker"),k=new Array(256),w=0;w<256;w++)k[w]=252<=w?6:248<=w?5:240<=w?4:224<=w?3:192<=w?2:1;k[254]=k[254]=1;function y(){h.call(this,"utf-8 decode"),this.leftOver=null}function _(){h.call(this,"utf-8 encode")}n.utf8encode=function(d){return i.nodebuffer?l.newBufferFrom(d,"utf-8"):function(v){var u,m,f,b,x,A=v.length,P=0;for(b=0;b>>6:(m<65536?u[x++]=224|m>>>12:(u[x++]=240|m>>>18,u[x++]=128|m>>>12&63),u[x++]=128|m>>>6&63),u[x++]=128|63&m);return u}(d)},n.utf8decode=function(d){return i.nodebuffer?a.transformTo("nodebuffer",d).toString("utf-8"):function(v){var u,m,f,b,x=v.length,A=new Array(2*x);for(u=m=0;u>10&1023,A[m++]=56320|1023&f)}return A.length!==m&&(A.subarray?A=A.subarray(0,m):A.length=m),a.applyFromCharCode(A)}(d=a.transformTo(i.uint8array?"uint8array":"array",d))},a.inherits(y,h),y.prototype.processChunk=function(d){var v=a.transformTo(i.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var u=v;(v=new Uint8Array(u.length+this.leftOver.length)).set(this.leftOver,0),v.set(u,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var m=function(b,x){var A;for((x=x||b.length)>b.length&&(x=b.length),A=x-1;0<=A&&(192&b[A])==128;)A--;return A<0||A===0?x:A+k[b[A]]>x?A:x}(v),f=v;m!==v.length&&(i.uint8array?(f=v.subarray(0,m),this.leftOver=v.subarray(m,v.length)):(f=v.slice(0,m),this.leftOver=v.slice(m,v.length))),this.push({data:n.utf8decode(f),meta:d.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=y,a.inherits(_,h),_.prototype.processChunk=function(d){this.push({data:n.utf8encode(d.data),meta:d.meta})},n.Utf8EncodeWorker=_},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,r,n){var a=t("./support"),i=t("./base64"),l=t("./nodejsUtils"),h=t("./external");function k(u){return u}function w(u,m){for(var f=0;f>8;this.dir=!!(16&this.externalFileAttributes),d==0&&(this.dosPermissions=63&this.externalFileAttributes),d==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=a(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var v,u,m,f=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4>>6:(d<65536?_[m++]=224|d>>>12:(_[m++]=240|d>>>18,_[m++]=128|d>>>12&63),_[m++]=128|d>>>6&63),_[m++]=128|63&d);return _},n.buf2binstring=function(y){return w(y,y.length)},n.binstring2buf=function(y){for(var _=new a.Buf8(y.length),d=0,v=_.length;d>10&1023,b[v++]=56320|1023&u)}return w(b,v)},n.utf8border=function(y,_){var d;for((_=_||y.length)>y.length&&(_=y.length),d=_-1;0<=d&&(192&y[d])==128;)d--;return d<0||d===0?_:d+h[y[d]]>_?d:_}},{"./common":41}],43:[function(t,r,n){r.exports=function(a,i,l,h){for(var k=65535&a|0,w=a>>>16&65535|0,y=0;l!==0;){for(l-=y=2e3>>1:i>>>1;l[h]=i}return l}();r.exports=function(i,l,h,k){var w=a,y=k+h;i^=-1;for(var _=k;_>>8^w[255&(i^l[_])];return-1^i}},{}],46:[function(t,r,n){var a,i=t("../utils/common"),l=t("./trees"),h=t("./adler32"),k=t("./crc32"),w=t("./messages"),y=0,_=4,d=0,v=-2,u=-1,m=4,f=2,b=8,x=9,A=286,P=30,D=19,F=2*A+1,H=15,T=3,X=258,Q=X+T+1,S=42,I=113,o=1,L=2,et=3,W=4;function rt(s,O){return s.msg=w[O],O}function $(s){return(s<<1)-(4s.avail_out&&(M=s.avail_out),M!==0&&(i.arraySet(s.output,O.pending_buf,O.pending_out,M,s.next_out),s.next_out+=M,O.pending_out+=M,s.total_out+=M,s.avail_out-=M,O.pending-=M,O.pending===0&&(O.pending_out=0))}function z(s,O){l._tr_flush_block(s,0<=s.block_start?s.block_start:-1,s.strstart-s.block_start,O),s.block_start=s.strstart,B(s.strm)}function J(s,O){s.pending_buf[s.pending++]=O}function K(s,O){s.pending_buf[s.pending++]=O>>>8&255,s.pending_buf[s.pending++]=255&O}function G(s,O){var M,g,p=s.max_chain_length,C=s.strstart,j=s.prev_length,U=s.nice_match,N=s.strstart>s.w_size-Q?s.strstart-(s.w_size-Q):0,Z=s.window,Y=s.w_mask,V=s.prev,q=s.strstart+X,ot=Z[C+j-1],st=Z[C+j];s.prev_length>=s.good_match&&(p>>=2),U>s.lookahead&&(U=s.lookahead);do if(Z[(M=O)+j]===st&&Z[M+j-1]===ot&&Z[M]===Z[C]&&Z[++M]===Z[C+1]){C+=2,M++;do;while(Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&CN&&--p!=0);return j<=s.lookahead?j:s.lookahead}function ut(s){var O,M,g,p,C,j,U,N,Z,Y,V=s.w_size;do{if(p=s.window_size-s.lookahead-s.strstart,s.strstart>=V+(V-Q)){for(i.arraySet(s.window,s.window,V,V,0),s.match_start-=V,s.strstart-=V,s.block_start-=V,O=M=s.hash_size;g=s.head[--O],s.head[O]=V<=g?g-V:0,--M;);for(O=M=V;g=s.prev[--O],s.prev[O]=V<=g?g-V:0,--M;);p+=V}if(s.strm.avail_in===0)break;if(j=s.strm,U=s.window,N=s.strstart+s.lookahead,Z=p,Y=void 0,Y=j.avail_in,Z=T)for(C=s.strstart-s.insert,s.ins_h=s.window[C],s.ins_h=(s.ins_h<=T&&(s.ins_h=(s.ins_h<=T)if(g=l._tr_tally(s,s.strstart-s.match_start,s.match_length-T),s.lookahead-=s.match_length,s.match_length<=s.max_lazy_match&&s.lookahead>=T){for(s.match_length--;s.strstart++,s.ins_h=(s.ins_h<=T&&(s.ins_h=(s.ins_h<=T&&s.match_length<=s.prev_length){for(p=s.strstart+s.lookahead-T,g=l._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-T),s.lookahead-=s.prev_length-1,s.prev_length-=2;++s.strstart<=p&&(s.ins_h=(s.ins_h<s.pending_buf_size-5&&(M=s.pending_buf_size-5);;){if(s.lookahead<=1){if(ut(s),s.lookahead===0&&O===y)return o;if(s.lookahead===0)break}s.strstart+=s.lookahead,s.lookahead=0;var g=s.block_start+M;if((s.strstart===0||s.strstart>=g)&&(s.lookahead=s.strstart-g,s.strstart=g,z(s,!1),s.strm.avail_out===0)||s.strstart-s.block_start>=s.w_size-Q&&(z(s,!1),s.strm.avail_out===0))return o}return s.insert=0,O===_?(z(s,!0),s.strm.avail_out===0?et:W):(s.strstart>s.block_start&&(z(s,!1),s.strm.avail_out),o)}),new it(4,4,8,4,bt),new it(4,5,16,8,bt),new it(4,6,32,32,bt),new it(4,4,16,16,nt),new it(8,16,32,32,nt),new it(8,16,128,128,nt),new it(8,32,128,256,nt),new it(32,128,258,1024,nt),new it(32,258,258,4096,nt)],n.deflateInit=function(s,O){return kt(s,O,b,15,8,0)},n.deflateInit2=kt,n.deflateReset=_t,n.deflateResetKeep=dt,n.deflateSetHeader=function(s,O){return s&&s.state?s.state.wrap!==2?v:(s.state.gzhead=O,d):v},n.deflate=function(s,O){var M,g,p,C;if(!s||!s.state||5>8&255),J(g,g.gzhead.time>>16&255),J(g,g.gzhead.time>>24&255),J(g,g.level===9?2:2<=g.strategy||g.level<2?4:0),J(g,255&g.gzhead.os),g.gzhead.extra&&g.gzhead.extra.length&&(J(g,255&g.gzhead.extra.length),J(g,g.gzhead.extra.length>>8&255)),g.gzhead.hcrc&&(s.adler=k(s.adler,g.pending_buf,g.pending,0)),g.gzindex=0,g.status=69):(J(g,0),J(g,0),J(g,0),J(g,0),J(g,0),J(g,g.level===9?2:2<=g.strategy||g.level<2?4:0),J(g,3),g.status=I);else{var j=b+(g.w_bits-8<<4)<<8;j|=(2<=g.strategy||g.level<2?0:g.level<6?1:g.level===6?2:3)<<6,g.strstart!==0&&(j|=32),j+=31-j%31,g.status=I,K(g,j),g.strstart!==0&&(K(g,s.adler>>>16),K(g,65535&s.adler)),s.adler=1}if(g.status===69)if(g.gzhead.extra){for(p=g.pending;g.gzindex<(65535&g.gzhead.extra.length)&&(g.pending!==g.pending_buf_size||(g.gzhead.hcrc&&g.pending>p&&(s.adler=k(s.adler,g.pending_buf,g.pending-p,p)),B(s),p=g.pending,g.pending!==g.pending_buf_size));)J(g,255&g.gzhead.extra[g.gzindex]),g.gzindex++;g.gzhead.hcrc&&g.pending>p&&(s.adler=k(s.adler,g.pending_buf,g.pending-p,p)),g.gzindex===g.gzhead.extra.length&&(g.gzindex=0,g.status=73)}else g.status=73;if(g.status===73)if(g.gzhead.name){p=g.pending;do{if(g.pending===g.pending_buf_size&&(g.gzhead.hcrc&&g.pending>p&&(s.adler=k(s.adler,g.pending_buf,g.pending-p,p)),B(s),p=g.pending,g.pending===g.pending_buf_size)){C=1;break}C=g.gzindexp&&(s.adler=k(s.adler,g.pending_buf,g.pending-p,p)),C===0&&(g.gzindex=0,g.status=91)}else g.status=91;if(g.status===91)if(g.gzhead.comment){p=g.pending;do{if(g.pending===g.pending_buf_size&&(g.gzhead.hcrc&&g.pending>p&&(s.adler=k(s.adler,g.pending_buf,g.pending-p,p)),B(s),p=g.pending,g.pending===g.pending_buf_size)){C=1;break}C=g.gzindexp&&(s.adler=k(s.adler,g.pending_buf,g.pending-p,p)),C===0&&(g.status=103)}else g.status=103;if(g.status===103&&(g.gzhead.hcrc?(g.pending+2>g.pending_buf_size&&B(s),g.pending+2<=g.pending_buf_size&&(J(g,255&s.adler),J(g,s.adler>>8&255),s.adler=0,g.status=I)):g.status=I),g.pending!==0){if(B(s),s.avail_out===0)return g.last_flush=-1,d}else if(s.avail_in===0&&$(O)<=$(M)&&O!==_)return rt(s,-5);if(g.status===666&&s.avail_in!==0)return rt(s,-5);if(s.avail_in!==0||g.lookahead!==0||O!==y&&g.status!==666){var U=g.strategy===2?function(N,Z){for(var Y;;){if(N.lookahead===0&&(ut(N),N.lookahead===0)){if(Z===y)return o;break}if(N.match_length=0,Y=l._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++,Y&&(z(N,!1),N.strm.avail_out===0))return o}return N.insert=0,Z===_?(z(N,!0),N.strm.avail_out===0?et:W):N.last_lit&&(z(N,!1),N.strm.avail_out===0)?o:L}(g,O):g.strategy===3?function(N,Z){for(var Y,V,q,ot,st=N.window;;){if(N.lookahead<=X){if(ut(N),N.lookahead<=X&&Z===y)return o;if(N.lookahead===0)break}if(N.match_length=0,N.lookahead>=T&&0N.lookahead&&(N.match_length=N.lookahead)}if(N.match_length>=T?(Y=l._tr_tally(N,1,N.match_length-T),N.lookahead-=N.match_length,N.strstart+=N.match_length,N.match_length=0):(Y=l._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++),Y&&(z(N,!1),N.strm.avail_out===0))return o}return N.insert=0,Z===_?(z(N,!0),N.strm.avail_out===0?et:W):N.last_lit&&(z(N,!1),N.strm.avail_out===0)?o:L}(g,O):a[g.level].func(g,O);if(U!==et&&U!==W||(g.status=666),U===o||U===et)return s.avail_out===0&&(g.last_flush=-1),d;if(U===L&&(O===1?l._tr_align(g):O!==5&&(l._tr_stored_block(g,0,0,!1),O===3&&(tt(g.head),g.lookahead===0&&(g.strstart=0,g.block_start=0,g.insert=0))),B(s),s.avail_out===0))return g.last_flush=-1,d}return O!==_?d:g.wrap<=0?1:(g.wrap===2?(J(g,255&s.adler),J(g,s.adler>>8&255),J(g,s.adler>>16&255),J(g,s.adler>>24&255),J(g,255&s.total_in),J(g,s.total_in>>8&255),J(g,s.total_in>>16&255),J(g,s.total_in>>24&255)):(K(g,s.adler>>>16),K(g,65535&s.adler)),B(s),0=M.w_size&&(C===0&&(tt(M.head),M.strstart=0,M.block_start=0,M.insert=0),Z=new i.Buf8(M.w_size),i.arraySet(Z,O,Y-M.w_size,M.w_size,0),O=Z,Y=M.w_size),j=s.avail_in,U=s.next_in,N=s.input,s.avail_in=Y,s.next_in=0,s.input=O,ut(M);M.lookahead>=T;){for(g=M.strstart,p=M.lookahead-(T-1);M.ins_h=(M.ins_h<>>=T=H>>>24,x-=T,(T=H>>>16&255)===0)L[w++]=65535&H;else{if(!(16&T)){if(!(64&T)){H=A[(65535&H)+(b&(1<>>=T,x-=T),x<15&&(b+=o[h++]<>>=T=H>>>24,x-=T,!(16&(T=H>>>16&255))){if(!(64&T)){H=P[(65535&H)+(b&(1<>>=T,x-=T,(T=w-y)>3,b&=(1<<(x-=X<<3))-1,a.next_in=h,a.next_out=w,a.avail_in=h>>24&255)+(S>>>8&65280)+((65280&S)<<8)+((255&S)<<24)}function b(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function x(S){var I;return S&&S.state?(I=S.state,S.total_in=S.total_out=I.total=0,S.msg="",I.wrap&&(S.adler=1&I.wrap),I.mode=v,I.last=0,I.havedict=0,I.dmax=32768,I.head=null,I.hold=0,I.bits=0,I.lencode=I.lendyn=new a.Buf32(u),I.distcode=I.distdyn=new a.Buf32(m),I.sane=1,I.back=-1,_):d}function A(S){var I;return S&&S.state?((I=S.state).wsize=0,I.whave=0,I.wnext=0,x(S)):d}function P(S,I){var o,L;return S&&S.state?(L=S.state,I<0?(o=0,I=-I):(o=1+(I>>4),I<48&&(I&=15)),I&&(I<8||15=W.wsize?(a.arraySet(W.window,I,o-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(L<(et=W.wsize-W.wnext)&&(et=L),a.arraySet(W.window,I,o-L,et,W.wnext),(L-=et)?(a.arraySet(W.window,I,o-L,L,0),W.wnext=L,W.whave=W.wsize):(W.wnext+=et,W.wnext===W.wsize&&(W.wnext=0),W.whave>>8&255,o.check=l(o.check,C,2,0),z=B=0,o.mode=2;break}if(o.flags=0,o.head&&(o.head.done=!1),!(1&o.wrap)||(((255&B)<<8)+(B>>8))%31){S.msg="incorrect header check",o.mode=30;break}if((15&B)!=8){S.msg="unknown compression method",o.mode=30;break}if(z-=4,s=8+(15&(B>>>=4)),o.wbits===0)o.wbits=s;else if(s>o.wbits){S.msg="invalid window size",o.mode=30;break}o.dmax=1<>8&1),512&o.flags&&(C[0]=255&B,C[1]=B>>>8&255,o.check=l(o.check,C,2,0)),z=B=0,o.mode=3;case 3:for(;z<32;){if($===0)break t;$--,B+=L[W++]<>>8&255,C[2]=B>>>16&255,C[3]=B>>>24&255,o.check=l(o.check,C,4,0)),z=B=0,o.mode=4;case 4:for(;z<16;){if($===0)break t;$--,B+=L[W++]<>8),512&o.flags&&(C[0]=255&B,C[1]=B>>>8&255,o.check=l(o.check,C,2,0)),z=B=0,o.mode=5;case 5:if(1024&o.flags){for(;z<16;){if($===0)break t;$--,B+=L[W++]<>>8&255,o.check=l(o.check,C,2,0)),z=B=0}else o.head&&(o.head.extra=null);o.mode=6;case 6:if(1024&o.flags&&($<(G=o.length)&&(G=$),G&&(o.head&&(s=o.head.extra_len-o.length,o.head.extra||(o.head.extra=new Array(o.head.extra_len)),a.arraySet(o.head.extra,L,W,G,s)),512&o.flags&&(o.check=l(o.check,L,G,W)),$-=G,W+=G,o.length-=G),o.length))break t;o.length=0,o.mode=7;case 7:if(2048&o.flags){if($===0)break t;for(G=0;s=L[W+G++],o.head&&s&&o.length<65536&&(o.head.name+=String.fromCharCode(s)),s&&G<$;);if(512&o.flags&&(o.check=l(o.check,L,G,W)),$-=G,W+=G,s)break t}else o.head&&(o.head.name=null);o.length=0,o.mode=8;case 8:if(4096&o.flags){if($===0)break t;for(G=0;s=L[W+G++],o.head&&s&&o.length<65536&&(o.head.comment+=String.fromCharCode(s)),s&&G<$;);if(512&o.flags&&(o.check=l(o.check,L,G,W)),$-=G,W+=G,s)break t}else o.head&&(o.head.comment=null);o.mode=9;case 9:if(512&o.flags){for(;z<16;){if($===0)break t;$--,B+=L[W++]<>9&1,o.head.done=!0),S.adler=o.check=0,o.mode=12;break;case 10:for(;z<32;){if($===0)break t;$--,B+=L[W++]<>>=7&z,z-=7&z,o.mode=27;break}for(;z<3;){if($===0)break t;$--,B+=L[W++]<>>=1)){case 0:o.mode=14;break;case 1:if(X(o),o.mode=20,I!==6)break;B>>>=2,z-=2;break t;case 2:o.mode=17;break;case 3:S.msg="invalid block type",o.mode=30}B>>>=2,z-=2;break;case 14:for(B>>>=7&z,z-=7&z;z<32;){if($===0)break t;$--,B+=L[W++]<>>16^65535)){S.msg="invalid stored block lengths",o.mode=30;break}if(o.length=65535&B,z=B=0,o.mode=15,I===6)break t;case 15:o.mode=16;case 16:if(G=o.length){if($>>=5,z-=5,o.ndist=1+(31&B),B>>>=5,z-=5,o.ncode=4+(15&B),B>>>=4,z-=4,286>>=3,z-=3}for(;o.have<19;)o.lens[j[o.have++]]=0;if(o.lencode=o.lendyn,o.lenbits=7,M={bits:o.lenbits},O=k(0,o.lens,0,19,o.lencode,0,o.work,M),o.lenbits=M.bits,O){S.msg="invalid code lengths set",o.mode=30;break}o.have=0,o.mode=19;case 19:for(;o.have>>16&255,gt=65535&p,!((nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<>>=nt,z-=nt,o.lens[o.have++]=gt;else{if(gt===16){for(g=nt+2;z>>=nt,z-=nt,o.have===0){S.msg="invalid bit length repeat",o.mode=30;break}s=o.lens[o.have-1],G=3+(3&B),B>>>=2,z-=2}else if(gt===17){for(g=nt+3;z>>=nt)),B>>>=3,z-=3}else{for(g=nt+7;z>>=nt)),B>>>=7,z-=7}if(o.have+G>o.nlen+o.ndist){S.msg="invalid bit length repeat",o.mode=30;break}for(;G--;)o.lens[o.have++]=s}}if(o.mode===30)break;if(o.lens[256]===0){S.msg="invalid code -- missing end-of-block",o.mode=30;break}if(o.lenbits=9,M={bits:o.lenbits},O=k(w,o.lens,0,o.nlen,o.lencode,0,o.work,M),o.lenbits=M.bits,O){S.msg="invalid literal/lengths set",o.mode=30;break}if(o.distbits=6,o.distcode=o.distdyn,M={bits:o.distbits},O=k(y,o.lens,o.nlen,o.ndist,o.distcode,0,o.work,M),o.distbits=M.bits,O){S.msg="invalid distances set",o.mode=30;break}if(o.mode=20,I===6)break t;case 20:o.mode=21;case 21:if(6<=$&&258<=tt){S.next_out=rt,S.avail_out=tt,S.next_in=W,S.avail_in=$,o.hold=B,o.bits=z,h(S,K),rt=S.next_out,et=S.output,tt=S.avail_out,W=S.next_in,L=S.input,$=S.avail_in,B=o.hold,z=o.bits,o.mode===12&&(o.back=-1);break}for(o.back=0;it=(p=o.lencode[B&(1<>>16&255,gt=65535&p,!((nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<>dt)])>>>16&255,gt=65535&p,!(dt+(nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<>>=dt,z-=dt,o.back+=dt}if(B>>>=nt,z-=nt,o.back+=nt,o.length=gt,it===0){o.mode=26;break}if(32&it){o.back=-1,o.mode=12;break}if(64&it){S.msg="invalid literal/length code",o.mode=30;break}o.extra=15&it,o.mode=22;case 22:if(o.extra){for(g=o.extra;z>>=o.extra,z-=o.extra,o.back+=o.extra}o.was=o.length,o.mode=23;case 23:for(;it=(p=o.distcode[B&(1<>>16&255,gt=65535&p,!((nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<>dt)])>>>16&255,gt=65535&p,!(dt+(nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<>>=dt,z-=dt,o.back+=dt}if(B>>>=nt,z-=nt,o.back+=nt,64&it){S.msg="invalid distance code",o.mode=30;break}o.offset=gt,o.extra=15&it,o.mode=24;case 24:if(o.extra){for(g=o.extra;z>>=o.extra,z-=o.extra,o.back+=o.extra}if(o.offset>o.dmax){S.msg="invalid distance too far back",o.mode=30;break}o.mode=25;case 25:if(tt===0)break t;if(G=K-tt,o.offset>G){if((G=o.offset-G)>o.whave&&o.sane){S.msg="invalid distance too far back",o.mode=30;break}ut=G>o.wnext?(G-=o.wnext,o.wsize-G):o.wnext-G,G>o.length&&(G=o.length),bt=o.window}else bt=et,ut=rt-o.offset,G=o.length;for(ttF?(T=ut[bt+m[I]],z[J+m[I]]):(T=96,0),b=1<>rt)+(x-=b)]=H<<24|T<<16|X|0,x!==0;);for(b=1<>=1;if(b!==0?(B&=b-1,B+=b):B=0,I++,--K[S]==0){if(S===L)break;S=y[_+m[I]]}if(et>>7)]}function J(p,C){p.pending_buf[p.pending++]=255&C,p.pending_buf[p.pending++]=C>>>8&255}function K(p,C,j){p.bi_valid>f-j?(p.bi_buf|=C<>f-p.bi_valid,p.bi_valid+=j-f):(p.bi_buf|=C<>>=1,j<<=1,0<--C;);return j>>>1}function bt(p,C,j){var U,N,Z=new Array(m+1),Y=0;for(U=1;U<=m;U++)Z[U]=Y=Y+j[U-1]<<1;for(N=0;N<=C;N++){var V=p[2*N+1];V!==0&&(p[2*N]=ut(Z[V]++,V))}}function nt(p){var C;for(C=0;C<_;C++)p.dyn_ltree[2*C]=0;for(C=0;C>1;1<=j;j--)dt(p,Z,j);for(N=q;j=p.heap[1],p.heap[1]=p.heap[p.heap_len--],dt(p,Z,1),U=p.heap[1],p.heap[--p.heap_max]=j,p.heap[--p.heap_max]=U,Z[2*N]=Z[2*j]+Z[2*U],p.depth[N]=(p.depth[j]>=p.depth[U]?p.depth[j]:p.depth[U])+1,Z[2*j+1]=Z[2*U+1]=N,p.heap[1]=N++,dt(p,Z,1),2<=p.heap_len;);p.heap[--p.heap_max]=p.heap[1],function(st,vt){var Pt,wt,At,ft,Mt,jt,St=vt.dyn_tree,Kt=vt.max_code,_e=vt.stat_desc.static_tree,we=vt.stat_desc.has_stree,Se=vt.stat_desc.extra_bits,Yt=vt.stat_desc.extra_base,Et=vt.stat_desc.max_length,Rt=0;for(ft=0;ft<=m;ft++)st.bl_count[ft]=0;for(St[2*st.heap[st.heap_max]+1]=0,Pt=st.heap_max+1;Pt>=7;N>>=1)if(1&ot&&V.dyn_ltree[2*q]!==0)return i;if(V.dyn_ltree[18]!==0||V.dyn_ltree[20]!==0||V.dyn_ltree[26]!==0)return l;for(q=32;q>>3,(Z=p.static_len+3+7>>>3)<=N&&(N=Z)):N=Z=j+5,j+4<=N&&C!==-1?g(p,C,j,U):p.strategy===4||Z===N?(K(p,2+(U?1:0),3),_t(p,Q,S)):(K(p,4+(U?1:0),3),function(V,q,ot,st){var vt;for(K(V,q-257,5),K(V,ot-1,5),K(V,st-4,4),vt=0;vt>>8&255,p.pending_buf[p.d_buf+2*p.last_lit+1]=255&C,p.pending_buf[p.l_buf+p.last_lit]=255&j,p.last_lit++,C===0?p.dyn_ltree[2*j]++:(p.matches++,C--,p.dyn_ltree[2*(o[j]+y+1)]++,p.dyn_dtree[2*z(C)]++),p.last_lit===p.lit_bufsize-1},n._tr_align=function(p){K(p,2,3),G(p,x,Q),function(C){C.bi_valid===16?(J(C,C.bi_buf),C.bi_buf=0,C.bi_valid=0):8<=C.bi_valid&&(C.pending_buf[C.pending++]=255&C.bi_buf,C.bi_buf>>=8,C.bi_valid-=8)}(p)}},{"../utils/common":41}],53:[function(t,r,n){r.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(t,r,n){(function(a){(function(i,l){if(!i.setImmediate){var h,k,w,y,_=1,d={},v=!1,u=i.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(i);m=m&&m.setTimeout?m:i,h={}.toString.call(i.process)==="[object process]"?function(A){process.nextTick(function(){b(A)})}:function(){if(i.postMessage&&!i.importScripts){var A=!0,P=i.onmessage;return i.onmessage=function(){A=!1},i.postMessage("","*"),i.onmessage=P,A}}()?(y="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",x,!1):i.attachEvent("onmessage",x),function(A){i.postMessage(y+A,"*")}):i.MessageChannel?((w=new MessageChannel).port1.onmessage=function(A){b(A.data)},function(A){w.port2.postMessage(A)}):u&&"onreadystatechange"in u.createElement("script")?(k=u.documentElement,function(A){var P=u.createElement("script");P.onreadystatechange=function(){b(A),P.onreadystatechange=null,k.removeChild(P),P=null},k.appendChild(P)}):function(A){setTimeout(b,0,A)},m.setImmediate=function(A){typeof A!="function"&&(A=new Function(""+A));for(var P=new Array(arguments.length-1),D=0;D"u"?a===void 0?this:a:self)}).call(this,typeof Tt<"u"?Tt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(oe);var Ce=oe.exports;const Pe=xe(Ce);var mt;(function(c){c.OfficeDocument="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",c.FontTable="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",c.Image="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",c.Numbering="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",c.Styles="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",c.StylesWithEffects="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects",c.Theme="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",c.Settings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",c.WebSettings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",c.Hyperlink="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",c.Footnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",c.Endnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",c.Footer="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",c.Header="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",c.ExtendedProperties="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",c.CoreProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",c.CustomProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties"})(mt||(mt={}));function Ae(c,e){return e.elements(c).map(t=>({id:e.attr(t,"Id"),type:e.attr(t,"Type"),target:e.attr(t,"Target"),targetMode:e.attr(t,"TargetMode")}))}const le={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"},pt={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 ce(c,e=pt.Dxa){return c==null||/.+(p[xt]|[%])$/.test(c)?c:`${(parseInt(c)*e.mul).toFixed(2)}${e.unit}`}function Ee(c,e=!1){switch(c){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 he(c,e,t){if(c.namespaceURI!=le.wordml)return!1;switch(c.localName){case"color":e.color=t.attr(c,"val");break;case"sz":e.fontSize=t.lengthAttr(c,"val",pt.FontSize);break;default:return!1}return!0}function Ne(c,e=!1){e&&(c=c.replace(/<[?].*[?]>/,"")),c=Be(c);const t=new DOMParser().parseFromString(c,"application/xml"),r=ze(t);if(r)throw new Error(r);return t}function ze(c){var e;return(e=c.getElementsByTagName("parsererror")[0])==null?void 0:e.textContent}function Be(c){return c.charCodeAt(0)===65279?c.substring(1):c}function Me(c){return new XMLSerializer().serializeToString(c)}class ue{elements(e,t=null){const r=[];for(let n=0,a=e.childNodes.length;nFe(t,e))}function Fe(c,e){let t={name:e.attr(c,"name"),embedFontRefs:[]};for(let r of e.elements(c))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(Ie(r,e));break}return t}function Ie(c,e){return{id:e.attr(c,"id"),key:e.attr(c,"fontKey"),type:Re[c.localName]}}class Oe extends yt{parseXml(e){this.fonts=Te(e,this._package.xmlParser)}}function De(c){return c==null?void 0:c.replace(/[ .]+/g,"-").replace(/[&]+/g,"and").toLowerCase()}function Ot(c){let e=c.lastIndexOf("/")+1,t=e==0?"":c.substring(0,e),r=e==0?c:c.substring(e);return[t,r]}function Ut(c,e){try{const t="http://docx/";return new URL(c,t+e).toString().substring(t.length)}catch{return`${e}${c}`}}function xt(c,e){return c.reduce((t,r)=>(t[e(r)]=r,t),{})}function Le(c){return new Promise((e,t)=>{const r=new FileReader;r.onloadend=()=>e(r.result),r.onerror=()=>t(),r.readAsDataURL(c)})}function Wt(c){return c&&typeof c=="object"&&!Array.isArray(c)}function je(c){return typeof c=="string"||c instanceof String}function Lt(c,...e){if(!e.length)return c;const t=e.shift();if(Wt(c)&&Wt(t))for(const r in t)if(Wt(t[r])){const n=c[r]??(c[r]={});Lt(n,t[r])}else c[r]=t[r];return Lt(c,...e)}function Nt(c){return Array.isArray(c)?c:[c]}class Zt{constructor(e,t){this._zip=e,this.options=t,this.xmlParser=new ue}get(e){return this._zip.files[Ue(e)]}update(e,t){this._zip.file(e,t)}static async load(e,t){const r=await Pe.loadAsync(e);return new Zt(r,t)}save(e="blob"){return this._zip.generateAsync({type:e})}load(e,t="string"){var r;return((r=this.get(e))==null?void 0:r.async(t))??Promise.resolve(null)}async loadRelationships(e=null){let t="_rels/.rels";if(e!=null){const[n,a]=Ot(e);t=`${n}_rels/${a}.rels`}const r=await this.load(t);return r?Ae(this.parseXmlDocument(r).firstElementChild,this.xmlParser):null}parseXmlDocument(e){return Ne(e,this.options.trimXmlDeclaration)}}function Ue(c){return c.startsWith("/")?c.substr(1):c}class We extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.body=this._documentParser.parseDocumentFile(e)}}function It(c,e){return{type:e.attr(c,"val"),color:e.attr(c,"color"),size:e.lengthAttr(c,"sz",pt.Border),offset:e.lengthAttr(c,"space",pt.Point),frame:e.boolAttr(c,"frame"),shadow:e.boolAttr(c,"shadow")}}function He(c,e){var t={};for(let r of e.elements(c))switch(r.localName){case"left":t.left=It(r,e);break;case"top":t.top=It(r,e);break;case"right":t.right=It(r,e);break;case"bottom":t.bottom=It(r,e);break}return t}var qt;(function(c){c.Continuous="continuous",c.NextPage="nextPage",c.NextColumn="nextColumn",c.EvenPage="evenPage",c.OddPage="oddPage"})(qt||(qt={}));function de(c,e=E){var t={};for(let r of e.elements(c))switch(r.localName){case"pgSz":t.pageSize={width:e.lengthAttr(r,"w"),height:e.lengthAttr(r,"h"),orientation:e.attr(r,"orient")};break;case"type":t.type=e.attr(r,"val");break;case"pgMar":t.pageMargins={left:e.lengthAttr(r,"left"),right:e.lengthAttr(r,"right"),top:e.lengthAttr(r,"top"),bottom:e.lengthAttr(r,"bottom"),header:e.lengthAttr(r,"header"),footer:e.lengthAttr(r,"footer"),gutter:e.lengthAttr(r,"gutter")};break;case"cols":t.columns=$e(r,e);break;case"headerReference":(t.headerRefs??(t.headerRefs=[])).push(Jt(r,e));break;case"footerReference":(t.footerRefs??(t.footerRefs=[])).push(Jt(r,e));break;case"titlePg":t.titlePage=e.boolAttr(r,"val",!0);break;case"pgBorders":t.pageBorders=He(r,e);break;case"pgNumType":t.pageNumber=Ze(r,e);break}return t}function $e(c,e){return{numberOfColumns:e.intAttr(c,"num"),space:e.lengthAttr(c,"space"),separator:e.boolAttr(c,"sep"),equalWidth:e.boolAttr(c,"equalWidth",!0),columns:e.elements(c,"col").map(t=>({width:e.lengthAttr(t,"w"),space:e.lengthAttr(t,"space")}))}}function Ze(c,e){return{chapSep:e.attr(c,"chapSep"),chapStyle:e.attr(c,"chapStyle"),format:e.attr(c,"fmt"),start:e.intAttr(c,"start")}}function Jt(c,e){return{id:e.attr(c,"id"),type:e.attr(c,"type")}}function Ve(c,e){return{before:e.lengthAttr(c,"before"),after:e.lengthAttr(c,"after"),line:e.intAttr(c,"line"),lineRule:e.attr(c,"lineRule")}}function Vt(c,e){let t={};for(let r of e.elements(c))Xe(r,t,e);return t}function Xe(c,e,t){return!!he(c,e,t)}function fe(c,e){let t={};for(let r of e.elements(c))pe(r,t,e);return t}function pe(c,e,t){if(c.namespaceURI!=le.wordml)return!1;if(he(c,e,t))return!0;switch(c.localName){case"tabs":e.tabs=Ge(c,t);break;case"sectPr":e.sectionProps=de(c,t);break;case"numPr":e.numbering=Ke(c,t);break;case"spacing":return e.lineSpacing=Ve(c,t),!1;case"textAlignment":return e.textAlignment=t.attr(c,"val"),!1;case"keepLines":e.keepLines=t.boolAttr(c,"val",!0);break;case"keepNext":e.keepNext=t.boolAttr(c,"val",!0);break;case"pageBreakBefore":e.pageBreakBefore=t.boolAttr(c,"val",!0);break;case"outlineLvl":e.outlineLevel=t.intAttr(c,"val");break;case"pStyle":e.styleName=t.attr(c,"val");break;case"rPr":e.runProps=Vt(c,t);break;default:return!1}return!0}function Ge(c,e){return e.elements(c,"tab").map(t=>({position:e.lengthAttr(t,"pos"),leader:e.attr(t,"leader"),style:e.attr(t,"val")}))}function Ke(c,e){var t={};for(let r of e.elements(c))switch(r.localName){case"numId":t.id=e.attr(r,"val");break;case"ilvl":t.level=e.intAttr(r,"val");break}return t}function Ye(c,e){let t={numberings:[],abstractNumberings:[],bulletPictures:[]};for(let r of e.elements(c))switch(r.localName){case"num":t.numberings.push(qe(r,e));break;case"abstractNum":t.abstractNumberings.push(Je(r,e));break;case"numPicBullet":t.bulletPictures.push(tr(r,e));break}return t}function qe(c,e){let t={id:e.attr(c,"numId"),overrides:[]};for(let r of e.elements(c))switch(r.localName){case"abstractNumId":t.abstractId=e.attr(r,"val");break;case"lvlOverride":t.overrides.push(Qe(r,e));break}return t}function Je(c,e){let t={id:e.attr(c,"abstractNumId"),levels:[]};for(let r of e.elements(c))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(me(r,e));break}return t}function me(c,e){let t={level:e.intAttr(c,"ilvl")};for(let r of e.elements(c))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=fe(r,e);break;case"rPr":t.runProps=Vt(r,e);break}return t}function Qe(c,e){let t={level:e.intAttr(c,"ilvl")};for(let r of e.elements(c))switch(r.localName){case"startOverride":t.start=e.intAttr(r,"val");break;case"lvl":t.numberingLevel=me(r,e);break}return t}function tr(c,e){var t=e.element(c,"pict"),r=t&&e.element(t,"shape"),n=r&&e.element(r,"imagedata");return n?{id:e.attr(c,"numPicBulletId"),referenceId:e.attr(n,"id"),style:e.attr(r,"style")}:null}class er extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){Object.assign(this,Ye(e,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(e)}}class rr extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.styles=this._documentParser.parseStylesFile(e)}}var R;(function(c){c.Document="document",c.Paragraph="paragraph",c.Run="run",c.Break="break",c.NoBreakHyphen="noBreakHyphen",c.Table="table",c.Row="row",c.Cell="cell",c.Hyperlink="hyperlink",c.Drawing="drawing",c.Image="image",c.Text="text",c.Tab="tab",c.Symbol="symbol",c.BookmarkStart="bookmarkStart",c.BookmarkEnd="bookmarkEnd",c.Footer="footer",c.Header="header",c.FootnoteReference="footnoteReference",c.EndnoteReference="endnoteReference",c.Footnote="footnote",c.Endnote="endnote",c.SimpleField="simpleField",c.ComplexField="complexField",c.Instruction="instruction",c.VmlPicture="vmlPicture",c.MmlMath="mmlMath",c.MmlMathParagraph="mmlMathParagraph",c.MmlFraction="mmlFraction",c.MmlFunction="mmlFunction",c.MmlFunctionName="mmlFunctionName",c.MmlNumerator="mmlNumerator",c.MmlDenominator="mmlDenominator",c.MmlRadical="mmlRadical",c.MmlBase="mmlBase",c.MmlDegree="mmlDegree",c.MmlSuperscript="mmlSuperscript",c.MmlSubscript="mmlSubscript",c.MmlPreSubSuper="mmlPreSubSuper",c.MmlSubArgument="mmlSubArgument",c.MmlSuperArgument="mmlSuperArgument",c.MmlNary="mmlNary",c.MmlDelimiter="mmlDelimiter",c.MmlRun="mmlRun",c.MmlEquationArray="mmlEquationArray",c.MmlLimit="mmlLimit",c.MmlLimitLower="mmlLimitLower",c.MmlMatrix="mmlMatrix",c.MmlMatrixRow="mmlMatrixRow",c.MmlBox="mmlBox",c.MmlBar="mmlBar",c.MmlGroupChar="mmlGroupChar",c.VmlElement="vmlElement",c.Inserted="inserted",c.Deleted="deleted",c.DeletedText="deletedText"})(R||(R={}));class Xt{constructor(){this.children=[],this.cssStyle={}}}class ar extends Xt{constructor(){super(...arguments),this.type=R.Header}}class nr extends Xt{constructor(){super(...arguments),this.type=R.Footer}}class ge extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.rootElement=this.createRootElement(),this.rootElement.children=this._documentParser.parseBodyElements(e)}}class sr extends ge{createRootElement(){return new ar}}class ir extends ge{createRootElement(){return new nr}}function or(c,e){const t={};for(let r of e.elements(c))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(c){if(!(typeof c>"u"))return parseInt(c)}class lr extends yt{parseXml(e){this.props=or(e,this._package.xmlParser)}}function cr(c,e){const t={};for(let r of e.elements(c))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}class hr extends yt{parseXml(e){this.props=cr(e,this._package.xmlParser)}}class ur{}function dr(c,e){var t=new ur,r=e.element(c,"themeElements");for(let n of e.elements(r))switch(n.localName){case"clrScheme":t.colorScheme=fr(n,e);break;case"fontScheme":t.fontScheme=pr(n,e);break}return t}function fr(c,e){var t={name:e.attr(c,"name"),colors:{}};for(let a of e.elements(c)){var r=e.element(a,"srgbClr"),n=e.element(a,"sysClr");r?t.colors[a.localName]=e.attr(r,"val"):n&&(t.colors[a.localName]=e.attr(n,"lastClr"))}return t}function pr(c,e){var t={name:e.attr(c,"name")};for(let r of e.elements(c))switch(r.localName){case"majorFont":t.majorFont=Qt(r,e);break;case"minorFont":t.minorFont=Qt(r,e);break}return t}function Qt(c,e){return{latinTypeface:e.elementAttr(c,"latin","typeface"),eaTypeface:e.elementAttr(c,"ea","typeface"),csTypeface:e.elementAttr(c,"cs","typeface")}}class mr extends yt{constructor(e,t){super(e,t)}parseXml(e){this.theme=dr(e,this._package.xmlParser)}}class be{}class gr extends be{constructor(){super(...arguments),this.type=R.Footnote}}class br extends be{constructor(){super(...arguments),this.type=R.Endnote}}class ve extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}}class vr extends ve{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"footnote",gr)}}class kr extends ve{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"endnote",br)}}function yr(c,e){var t={};for(let r of e.elements(c))switch(r.localName){case"defaultTabStop":t.defaultTabStop=e.lengthAttr(r,"val");break;case"footnotePr":t.footnoteProps=te(r,e);break;case"endnotePr":t.endnoteProps=te(r,e);break;case"autoHyphenation":t.autoHyphenation=e.boolAttr(r,"val");break}return t}function te(c,e){var t={defaultNoteIds:[]};for(let r of e.elements(c))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}class _r extends yt{constructor(e,t){super(e,t)}parseXml(e){this.settings=yr(e,this._package.xmlParser)}}function wr(c,e){return e.elements(c,"property").map(t=>{const r=t.firstChild;return{formatId:e.attr(t,"fmtid"),name:e.attr(t,"name"),type:r.nodeName,value:r.textContent}})}class Sr extends yt{parseXml(e){this.props=wr(e,this._package.xmlParser)}}const xr=[{type:mt.OfficeDocument,target:"word/document.xml"},{type:mt.ExtendedProperties,target:"docProps/app.xml"},{type:mt.CoreProperties,target:"docProps/core.xml"},{type:mt.CustomProperties,target:"docProps/custom.xml"}];class Gt{constructor(){this.parts=[],this.partsMap={}}static async load(e,t,r){var n=new Gt;return n._options=r,n._parser=t,n._package=await Zt.load(e,r),n.rels=await n._package.loadRelationships(),await Promise.all(xr.map(a=>{const i=n.rels.find(l=>l.type===a.type)??a;return n.loadRelationshipPart(i.target,i.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 mt.OfficeDocument:this.documentPart=r=new We(this._package,e,this._parser);break;case mt.FontTable:this.fontTablePart=r=new Oe(this._package,e);break;case mt.Numbering:this.numberingPart=r=new er(this._package,e,this._parser);break;case mt.Styles:this.stylesPart=r=new rr(this._package,e,this._parser);break;case mt.Theme:this.themePart=r=new mr(this._package,e);break;case mt.Footnotes:this.footnotesPart=r=new vr(this._package,e,this._parser);break;case mt.Endnotes:this.endnotesPart=r=new kr(this._package,e,this._parser);break;case mt.Footer:r=new ir(this._package,e,this._parser);break;case mt.Header:r=new sr(this._package,e,this._parser);break;case mt.CoreProperties:this.corePropsPart=r=new hr(this._package,e);break;case mt.ExtendedProperties:this.extendedPropsPart=r=new lr(this._package,e);break;case mt.CustomProperties:r=new Sr(this._package,e);break;case mt.Settings:this.settingsPart=r=new _r(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){const[a]=Ot(r.path);await Promise.all(r.rels.map(i=>this.loadRelationshipPart(Ut(i.target,a),i.type)))}return r}async loadDocumentImage(e,t){const r=await this.loadResource(t??this.documentPart,e,"blob");return this.blobToURL(r)}async loadNumberingImage(e){const t=await this.loadResource(this.numberingPart,e,"blob");return this.blobToURL(t)}async loadFont(e,t){const r=await this.loadResource(this.fontTablePart,e,"uint8array");return r&&this.blobToURL(new Blob([Cr(r,t)]))}blobToURL(e){return e?this._options.useBase64URL?Le(e):URL.createObjectURL(e):null}findPartByRelId(e,t=null){var r=(t.rels??this.rels).find(a=>a.id==e);const n=t?Ot(t.path)[0]:"";return r?this.partsMap[Ut(r.target,n)]:null}getPathById(e,t){const r=e.rels.find(a=>a.id==t),[n]=Ot(e.path);return r?Ut(r.target,n):null}loadResource(e,t,r){const n=this.getPathById(e,t);return n?this._package.load(n,r):Promise.resolve(null)}}function Cr(c,e){const r=e.replace(/{|}|-/g,""),n=new Array(16);for(let a=0;a<16;a++)n[16-a-1]=parseInt(r.substr(a*2,2),16);for(let a=0;a<32;a++)c[a]=c[a]^n[a%16];return c}function Pr(c,e){return{type:R.BookmarkStart,id:e.attr(c,"id"),name:e.attr(c,"name"),colFirst:e.intAttr(c,"colFirst"),colLast:e.intAttr(c,"colLast")}}function Ar(c,e){return{type:R.BookmarkEnd,id:e.attr(c,"id")}}class Er extends Xt{constructor(){super(...arguments),this.type=R.VmlElement,this.attrs={}}}function ke(c,e){var t=new Er;switch(c.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(const r of E.attrs(c))switch(r.localName){case"style":t.cssStyleText=r.value;break;case"fillcolor":t.attrs.fill=r.value;break;case"from":const[n,a]=ee(r.value);Object.assign(t.attrs,{x1:n,y1:a});break;case"to":const[i,l]=ee(r.value);Object.assign(t.attrs,{x2:i,y2:l});break}for(const r of E.elements(c))switch(r.localName){case"stroke":Object.assign(t.attrs,Nr(r));break;case"fill":Object.assign(t.attrs,zr());break;case"imagedata":t.tagName="image",Object.assign(t.attrs,{width:"100%",height:"100%"}),t.imageHref={id:E.attr(r,"id"),title:E.attr(r,"title")};break;case"txbxContent":t.children.push(...e.parseBodyElements(r));break;default:const n=ke(r,e);n&&t.children.push(n);break}return t}function Nr(c){return{stroke:E.attr(c,"color"),"stroke-width":E.lengthAttr(c,"weight",pt.Emu)??"1px"}}function zr(c){return{}}function ee(c){return c.split(",")}var Dt={shd:"inherit",color:"black",borderColor:"black",highlight:"transparent"};const Br=[],re={oMath:R.MmlMath,oMathPara:R.MmlMathParagraph,f:R.MmlFraction,func:R.MmlFunction,fName:R.MmlFunctionName,num:R.MmlNumerator,den:R.MmlDenominator,rad:R.MmlRadical,deg:R.MmlDegree,e:R.MmlBase,sSup:R.MmlSuperscript,sSub:R.MmlSubscript,sPre:R.MmlPreSubSuper,sup:R.MmlSuperArgument,sub:R.MmlSubArgument,d:R.MmlDelimiter,nary:R.MmlNary,eqArr:R.MmlEquationArray,lim:R.MmlLimit,limLow:R.MmlLimitLower,m:R.MmlMatrix,mr:R.MmlMatrixRow,box:R.MmlBox,bar:R.MmlBar,groupChr:R.MmlGroupChar};class Mr{constructor(e){this.options={ignoreWidth:!1,debug:!1,...e}}parseNotes(e,t,r){var n=[];for(let a of E.elements(e,t)){const i=new r;i.id=E.attr(a,"id"),i.noteType=E.attr(a,"type"),i.children=this.parseBodyElements(a),n.push(i)}return n}parseDocumentFile(e){var t=E.element(e,"body"),r=E.element(e,"background"),n=E.element(t,"sectPr");return{type:R.Document,children:this.parseBodyElements(t),props:n?de(n,E):{},cssStyle:r?this.parseBackground(r):{}}}parseBackground(e){var t={},r=ht.colorAttr(e,"color");return r&&(t["background-color"]=r),t}parseBodyElements(e){var t=[];for(let r of E.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 ht.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 ht.foreach(e,r=>{switch(r.localName){case"rPrDefault":var n=E.element(r,"rPr");n&&t.styles.push({target:"span",values:this.parseDefaultProperties(n,{})});break;case"pPrDefault":var a=E.element(r,"pPr");a&&t.styles.push({target:"p",values:this.parseDefaultProperties(a,{})});break}}),t}parseStyle(e){var t={id:E.attr(e,"styleId"),isDefault:E.boolAttr(e,"default"),name:null,target:null,basedOn:null,styles:[],linked:null};switch(E.attr(e,"type")){case"paragraph":t.target="p";break;case"table":t.target="table";break;case"character":t.target="span";break}return ht.foreach(e,r=>{switch(r.localName){case"basedOn":t.basedOn=E.attr(r,"val");break;case"name":t.name=E.attr(r,"val");break;case"link":t.linked=E.attr(r,"val");break;case"next":t.next=E.attr(r,"val");break;case"aliases":t.aliases=E.attr(r,"val").split(",");break;case"pPr":t.styles.push({target:"p",values:this.parseDefaultProperties(r,{})}),t.paragraphProps=fe(r,E);break;case"rPr":t.styles.push({target:"span",values:this.parseDefaultProperties(r,{})}),t.runProps=Vt(r,E);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: ${r.localName}`)}}),t}parseTableStyle(e){var t=[],r=E.attr(e,"type"),n="",a="";switch(r){case"firstRow":a=".first-row",n="tr.first-row td";break;case"lastRow":a=".last-row",n="tr.last-row td";break;case"firstCol":a=".first-col",n="td.first-col";break;case"lastCol":a=".last-col",n="td.last-col";break;case"band1Vert":a=":not(.no-vband)",n="td.odd-col";break;case"band2Vert":a=":not(.no-vband)",n="td.even-col";break;case"band1Horz":a=":not(.no-hband)",n="tr.odd-row";break;case"band2Horz":a=":not(.no-hband)",n="tr.even-row";break;default:return[]}return ht.foreach(e,i=>{switch(i.localName){case"pPr":t.push({target:`${n} p`,mod:a,values:this.parseDefaultProperties(i,{})});break;case"rPr":t.push({target:`${n} span`,mod:a,values:this.parseDefaultProperties(i,{})});break;case"tblPr":case"tcPr":t.push({target:n,mod:a,values:this.parseDefaultProperties(i,{})});break}}),t}parseNumberingFile(e){var t=[],r={},n=[];return ht.foreach(e,a=>{switch(a.localName){case"abstractNum":this.parseAbstractNumbering(a,n).forEach(h=>t.push(h));break;case"numPicBullet":n.push(this.parseNumberingPicBullet(a));break;case"num":var i=E.attr(a,"numId"),l=E.elementAttr(a,"abstractNumId","val");r[l]=i;break}}),t.forEach(a=>a.id=r[a.id]),t}parseNumberingPicBullet(e){var t=E.element(e,"pict"),r=t&&E.element(t,"shape"),n=r&&E.element(r,"imagedata");return n?{id:E.intAttr(e,"numPicBulletId"),src:E.attr(n,"id"),style:E.attr(r,"style")}:null}parseAbstractNumbering(e,t){var r=[],n=E.attr(e,"abstractNumId");return ht.foreach(e,a=>{switch(a.localName){case"lvl":r.push(this.parseNumberingLevel(n,a,t));break}}),r}parseNumberingLevel(e,t,r){var n={id:e,level:E.intAttr(t,"ilvl"),start:1,pStyleName:void 0,pStyle:{},rStyle:{},suff:"tab"};return ht.foreach(t,a=>{switch(a.localName){case"start":n.start=E.intAttr(a,"val");break;case"pPr":this.parseDefaultProperties(a,n.pStyle);break;case"rPr":this.parseDefaultProperties(a,n.rStyle);break;case"lvlPicBulletId":var i=E.intAttr(a,"val");n.bullet=r.find(l=>l.id==i);break;case"lvlText":n.levelText=E.attr(a,"val");break;case"pStyle":n.pStyleName=E.attr(a,"val");break;case"numFmt":n.format=E.attr(a,"val");break;case"suff":n.suff=E.attr(a,"val");break}}),n}parseSdt(e,t){const r=E.element(e,"sdtContent");return r?t(r):[]}parseInserted(e,t){var r;return{type:R.Inserted,children:((r=t(e))==null?void 0:r.children)??[]}}parseDeleted(e,t){var r;return{type:R.Deleted,children:((r=t(e))==null?void 0:r.children)??[]}}parseParagraph(e){var t={type:R.Paragraph,children:[]};for(let r of E.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(Pr(r,E));break;case"bookmarkEnd":t.children.push(Ar(r,E));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(pe(r,t,E))return!0;switch(r.localName){case"pStyle":t.styleName=E.attr(r,"val");break;case"cnfStyle":t.className=lt.classNameOfCnfStyle(r);break;case"framePr":this.parseFrame(r,t);break;case"rPr":break;default:return!1}return!0})}parseFrame(e,t){var r=E.attr(e,"dropCap");r=="drop"&&(t.cssStyle.float="left")}parseHyperlink(e,t){var r={type:R.Hyperlink,parent:t,children:[]},n=E.attr(e,"anchor"),a=E.attr(e,"id");return n&&(r.href="#"+n),a&&(r.id=a),ht.foreach(e,i=>{switch(i.localName){case"r":r.children.push(this.parseRun(i,r));break}}),r}parseRun(e,t){var r={type:R.Run,parent:t,children:[]};return ht.foreach(e,n=>{switch(n=this.checkAlternateContent(n),n.localName){case"t":r.children.push({type:R.Text,text:n.textContent});break;case"delText":r.children.push({type:R.DeletedText,text:n.textContent});break;case"fldSimple":r.children.push({type:R.SimpleField,instruction:E.attr(n,"instr"),lock:E.boolAttr(n,"lock",!1),dirty:E.boolAttr(n,"dirty",!1)});break;case"instrText":r.fieldRun=!0,r.children.push({type:R.Instruction,text:n.textContent});break;case"fldChar":r.fieldRun=!0,r.children.push({type:R.ComplexField,charType:E.attr(n,"fldCharType"),lock:E.boolAttr(n,"lock",!1),dirty:E.boolAttr(n,"dirty",!1)});break;case"noBreakHyphen":r.children.push({type:R.NoBreakHyphen});break;case"br":r.children.push({type:R.Break,break:E.attr(n,"type")||"textWrapping"});break;case"lastRenderedPageBreak":r.children.push({type:R.Break,break:"lastRenderedPageBreak"});break;case"sym":r.children.push({type:R.Symbol,font:E.attr(n,"font"),char:E.attr(n,"char")});break;case"tab":r.children.push({type:R.Tab});break;case"footnoteReference":r.children.push({type:R.FootnoteReference,id:E.attr(n,"id")});break;case"endnoteReference":r.children.push({type:R.EndnoteReference,id:E.attr(n,"id")});break;case"drawing":let a=this.parseDrawing(n);a&&(r.children=[a]);break;case"pict":r.children.push(this.parseVmlPicture(n));break;case"rPr":this.parseRunProperties(n,r);break}}),r}parseMathElement(e){const t=`${e.localName}Pr`,r={type:re[e.localName],children:[]};for(const a of E.elements(e))if(re[a.localName])r.children.push(this.parseMathElement(a));else if(a.localName=="r"){var n=this.parseRun(a);n.type=R.MmlRun,r.children.push(n)}else a.localName==t&&(r.props=this.parseMathProperies(a));return r}parseMathProperies(e){const t={};for(const r of E.elements(e))switch(r.localName){case"chr":t.char=E.attr(r,"val");break;case"vertJc":t.verticalJustification=E.attr(r,"val");break;case"pos":t.position=E.attr(r,"val");break;case"degHide":t.hideDegree=E.boolAttr(r,"val");break;case"begChr":t.beginChar=E.attr(r,"val");break;case"endChr":t.endChar=E.attr(r,"val");break}return t}parseRunProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,r=>{switch(r.localName){case"rStyle":t.styleName=E.attr(r,"val");break;case"vertAlign":t.verticalAlign=lt.valueOfVertAlign(r,!0);break;default:return!1}return!0})}parseVmlPicture(e){const t={type:R.VmlPicture,children:[]};for(const r of E.elements(e)){const n=ke(r,this);n&&t.children.push(n)}return t}checkAlternateContent(e){var a;if(e.localName!="AlternateContent")return e;var t=E.element(e,"Choice");if(t){var r=E.attr(t,"Requires"),n=e.lookupNamespaceURI(r);if(Br.includes(n))return t.firstElementChild}return(a=E.element(e,"Fallback"))==null?void 0:a.firstElementChild}parseDrawing(e){for(var t of E.elements(e))switch(t.localName){case"inline":case"anchor":return this.parseDrawingWrapper(t)}}parseDrawingWrapper(e){var t={type:R.Drawing,children:[],cssStyle:{}},r=e.localName=="anchor";let n=null,a=E.boolAttr(e,"simplePos"),i={relative:"page",align:"left",offset:"0"},l={relative:"page",align:"top",offset:"0"};for(var h of E.elements(e))switch(h.localName){case"simplePos":a&&(i.offset=E.lengthAttr(h,"x",pt.Emu),l.offset=E.lengthAttr(h,"y",pt.Emu));break;case"extent":t.cssStyle.width=E.lengthAttr(h,"cx",pt.Emu),t.cssStyle.height=E.lengthAttr(h,"cy",pt.Emu);break;case"positionH":case"positionV":if(!a){let _=h.localName=="positionH"?i:l;var k=E.element(h,"align"),w=E.element(h,"posOffset");_.relative=E.attr(h,"relativeFrom")??_.relative,k&&(_.align=k.textContent),w&&(_.offset=ht.sizeValue(w,pt.Emu))}break;case"wrapTopAndBottom":n="wrapTopAndBottom";break;case"wrapNone":n="wrapNone";break;case"graphic":var y=this.parseGraphic(h);y&&t.children.push(y);break}return n=="wrapTopAndBottom"?(t.cssStyle.display="block",i.align&&(t.cssStyle["text-align"]=i.align,t.cssStyle.width="100%")):n=="wrapNone"?(t.cssStyle.display="block",t.cssStyle.position="relative",t.cssStyle.width="0px",t.cssStyle.height="0px",i.offset&&(t.cssStyle.left=i.offset),l.offset&&(t.cssStyle.top=l.offset)):r&&(i.align=="left"||i.align=="right")&&(t.cssStyle.float=i.align),t}parseGraphic(e){var t=E.element(e,"graphicData");for(let r of E.elements(t))switch(r.localName){case"pic":return this.parsePicture(r)}return null}parsePicture(e){var t={type:R.Image,src:"",cssStyle:{}},r=E.element(e,"blipFill"),n=E.element(r,"blip");t.src=E.attr(n,"embed");var a=E.element(e,"spPr"),i=E.element(a,"xfrm");t.cssStyle.position="relative";for(var l of E.elements(i))switch(l.localName){case"ext":t.cssStyle.width=E.lengthAttr(l,"cx",pt.Emu),t.cssStyle.height=E.lengthAttr(l,"cy",pt.Emu);break;case"off":t.cssStyle.left=E.lengthAttr(l,"x",pt.Emu),t.cssStyle.top=E.lengthAttr(l,"y",pt.Emu);break}return t}parseTable(e){var t={type:R.Table,children:[]};return ht.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 ht.foreach(e,r=>{switch(r.localName){case"gridCol":t.push({width:E.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=E.attr(r,"val");break;case"tblLook":t.className=lt.classNameOftblLook(r);break;case"tblpPr":this.parseTablePosition(r,t);break;case"tblStyleColBandSize":t.colBandSize=E.intAttr(r,"val");break;case"tblStyleRowBandSize":t.rowBandSize=E.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=E.lengthAttr(e,"topFromText"),n=E.lengthAttr(e,"bottomFromText"),a=E.lengthAttr(e,"rightFromText"),i=E.lengthAttr(e,"leftFromText");t.cssStyle.float="left",t.cssStyle["margin-bottom"]=lt.addSize(t.cssStyle["margin-bottom"],n),t.cssStyle["margin-left"]=lt.addSize(t.cssStyle["margin-left"],i),t.cssStyle["margin-right"]=lt.addSize(t.cssStyle["margin-right"],a),t.cssStyle["margin-top"]=lt.addSize(t.cssStyle["margin-top"],r)}parseTableRow(e){var t={type:R.Row,children:[]};return ht.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=lt.classNameOfCnfStyle(r);break;case"tblHeader":t.isHeader=E.boolAttr(r,"val");break;default:return!1}return!0})}parseTableCell(e){var t={type:R.Cell,children:[]};return ht.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=>{switch(r.localName){case"gridSpan":t.span=E.intAttr(r,"val",null);break;case"vMerge":t.verticalMerge=E.attr(r,"val")??"continue";break;case"cnfStyle":t.className=lt.classNameOfCnfStyle(r);break;default:return!1}return!0})}parseDefaultProperties(e,t=null,r=null,n=null){return t=t||{},ht.foreach(e,a=>{if(!(n!=null&&n(a)))switch(a.localName){case"jc":t["text-align"]=lt.valueOfJc(a);break;case"textAlignment":t["vertical-align"]=lt.valueOfTextAlignment(a);break;case"color":t.color=ht.colorAttr(a,"val",null,Dt.color);break;case"sz":t["font-size"]=t["min-height"]=E.lengthAttr(a,"val",pt.FontSize);break;case"shd":t["background-color"]=ht.colorAttr(a,"fill",null,Dt.shd);break;case"highlight":t["background-color"]=ht.colorAttr(a,"val",null,Dt.highlight);break;case"vertAlign":break;case"position":t.verticalAlign=E.lengthAttr(a,"val",pt.FontSize);break;case"tcW":if(this.options.ignoreWidth)break;case"tblW":t.width=lt.valueOfSize(a,"w");break;case"trHeight":this.parseTrHeight(a,t);break;case"strike":t["text-decoration"]=E.boolAttr(a,"val",!0)?"line-through":"none";break;case"b":t["font-weight"]=E.boolAttr(a,"val",!0)?"bold":"normal";break;case"i":t["font-style"]=E.boolAttr(a,"val",!0)?"italic":"normal";break;case"caps":t["text-transform"]=E.boolAttr(a,"val",!0)?"uppercase":"none";break;case"smallCaps":t["font-variant"]=E.boolAttr(a,"val",!0)?"small-caps":"none";break;case"u":this.parseUnderline(a,t);break;case"ind":case"tblInd":this.parseIndentation(a,t);break;case"rFonts":this.parseFont(a,t);break;case"tblBorders":this.parseBorderProperties(a,r||t);break;case"tblCellSpacing":t["border-spacing"]=lt.valueOfMargin(a),t["border-collapse"]="separate";break;case"pBdr":this.parseBorderProperties(a,t);break;case"bdr":t.border=lt.valueOfBorder(a);break;case"tcBorders":this.parseBorderProperties(a,t);break;case"vanish":E.boolAttr(a,"val",!0)&&(t.display="none");break;case"kern":break;case"noWrap":break;case"tblCellMar":case"tcMar":this.parseMarginProperties(a,r||t);break;case"tblLayout":t["table-layout"]=lt.valueOfTblLayout(a);break;case"vAlign":t["vertical-align"]=lt.valueOfTextAlignment(a);break;case"spacing":e.localName=="pPr"&&this.parseSpacing(a,t);break;case"wordWrap":E.boolAttr(a,"val")&&(t["overflow-wrap"]="break-word");break;case"suppressAutoHyphens":t.hyphens=E.boolAttr(a,"val",!0)?"none":"auto";break;case"lang":t.$lang=E.attr(a,"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: ${e.localName}.${a.localName}`);break}}),t}parseUnderline(e,t){var r=E.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=ht.colorAttr(e,"color");n&&(t["text-decoration-color"]=n)}}parseFont(e,t){var r=E.attr(e,"ascii"),n=lt.themeValue(e,"asciiTheme"),a=[r,n].filter(i=>i).join(", ");a.length>0&&(t["font-family"]=a)}parseIndentation(e,t){var r=E.lengthAttr(e,"firstLine"),n=E.lengthAttr(e,"hanging"),a=E.lengthAttr(e,"left"),i=E.lengthAttr(e,"start"),l=E.lengthAttr(e,"right"),h=E.lengthAttr(e,"end");r&&(t["text-indent"]=r),n&&(t["text-indent"]=`-${n}`),(a||i)&&(t["margin-left"]=a||i),(l||h)&&(t["margin-right"]=l||h)}parseSpacing(e,t){var r=E.lengthAttr(e,"before"),n=E.lengthAttr(e,"after"),a=E.intAttr(e,"line",null),i=E.attr(e,"lineRule");if(r&&(t["margin-top"]=r),n&&(t["margin-bottom"]=n),a!==null)switch(i){case"auto":t["line-height"]=`${(a/240).toFixed(2)}`;break;case"atLeast":t["line-height"]=`calc(100% + ${a/20}pt)`;break;default:t["line-height"]=t["min-height"]=`${a/20}pt`;break}}parseMarginProperties(e,t){ht.foreach(e,r=>{switch(r.localName){case"left":t["padding-left"]=lt.valueOfMargin(r);break;case"right":t["padding-right"]=lt.valueOfMargin(r);break;case"top":t["padding-top"]=lt.valueOfMargin(r);break;case"bottom":t["padding-bottom"]=lt.valueOfMargin(r);break}})}parseTrHeight(e,t){switch(E.attr(e,"hRule")){case"exact":t.height=E.lengthAttr(e,"val");break;case"atLeast":default:t.height=E.lengthAttr(e,"val");break}}parseBorderProperties(e,t){ht.foreach(e,r=>{switch(r.localName){case"start":case"left":t["border-left"]=lt.valueOfBorder(r);break;case"end":case"right":t["border-right"]=lt.valueOfBorder(r);break;case"top":t["border-top"]=lt.valueOfBorder(r);break;case"bottom":t["border-bottom"]=lt.valueOfBorder(r);break}})}}const Rr=["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","none","red","white","yellow"];class ht{static foreach(e,t){for(var r=0;rt[a]=="1").join(" ")}static valueOfJc(e){var t=E.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=E.attr(e,"val");switch(r){case"subscript":return"sub";case"superscript":return t?"sup":"super"}return t?null:r}static valueOfTextAlignment(e){var t=E.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(${e} + ${t})`}static classNameOftblLook(e){const t=E.hexAttr(e,"val",0);let r="";return(E.boolAttr(e,"firstRow")||t&32)&&(r+=" first-row"),(E.boolAttr(e,"lastRow")||t&64)&&(r+=" last-row"),(E.boolAttr(e,"firstColumn")||t&128)&&(r+=" first-col"),(E.boolAttr(e,"lastColumn")||t&256)&&(r+=" last-col"),(E.boolAttr(e,"noHBand")||t&512)&&(r+=" no-hband"),(E.boolAttr(e,"noVBand")||t&1024)&&(r+=" no-vband"),r.trim()}}const ae={pos:0,leader:"none",style:"left"},Tr=50;function Fr(c=document.body){const e=document.createElement("div");e.style.width="100pt",c.appendChild(e);const t=100/e.offsetWidth;return c.removeChild(e),t}function Ir(c,e,t,r=72/96){const n=c.closest("p"),a=c.getBoundingClientRect(),i=n.getBoundingClientRect(),l=getComputedStyle(n),h=(e==null?void 0:e.length)>0?e.map(b=>({pos:ne(b.position),leader:b.leader,style:b.style})).sort((b,x)=>b.pos-x.pos):[ae],k=h[h.length-1],w=i.width*r,y=ne(t);let _=k.pos+y;if(_b.style!="clear"&&b.pos>u);if(m==null)return;let f=1;if(m.style=="right"||m.style=="center"){const b=Array.from(n.querySelectorAll(`.${c.className}`)),x=b.indexOf(c)+1,A=document.createRange();A.setStart(c,1),xl.id)),e.endnotesPart&&(this.endnoteMap=xt(e.endnotesPart.notes,l=>l.id)),e.settingsPart&&(this.defaultTabSize=(i=e.settingsPart.settings)==null?void 0:i.defaultTabStop),!n.ignoreFonts&&e.fontTablePart&&this.renderFontTable(e.fontTablePart,r);var a=this.renderSections(e.documentPart.body);this.options.inWrapper?t.appendChild(this.renderWrapper(a)):$t(t,a),this.refreshTabStops()}renderTheme(e,t){var l,h;const r={},n=(l=e.theme)==null?void 0:l.fontScheme;n&&(n.majorFont&&(r["--docx-majorHAnsi-font"]=n.majorFont.latinTypeface),n.minorFont&&(r["--docx-minorHAnsi-font"]=n.minorFont.latinTypeface));const a=(h=e.theme)==null?void 0:h.colorScheme;if(a)for(let[k,w]of Object.entries(a.colors))r[`--docx-${k}-color`]=`#${w}`;const i=this.styleToString(`.${this.className}`,r);t.appendChild(Ct(i))}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(a=>{const i={"font-family":r.name,src:`url(${a})`};(n.type=="bold"||n.type=="boldItalic")&&(i["font-weight"]="bold"),(n.type=="italic"||n.type=="boldItalic")&&(i["font-style"]="italic"),Bt(t,`docxjs ${r.name} font`);const l=this.styleToString("@font-face",i);t.appendChild(Ct(l)),this.refreshTabStops()}))}processStyleName(e){return e?`${this.className}_${De(e)}`:this.className}processStyles(e){const t=xt(e.filter(n=>n.id!=null),n=>n.id);for(const n of e.filter(a=>a.basedOn)){var r=t[n.basedOn];if(r){n.paragraphProps=Lt(n.paragraphProps,r.paragraphProps),n.runProps=Lt(n.runProps,r.runProps);for(const a of r.styles){const i=n.styles.find(l=>l.target==a.target);i?this.copyStyleProperties(a.values,i.values):n.styles.push({...a,values:{...a.values}})}}else this.options.debug&&console.warn(`Can't find base style ${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)){const 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==R.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=`${t.columns.numberOfColumns}`,r.style.columnGap=t.columns.space,t.columns.separator&&(r.style.columnRule="1px solid black"))),r}renderSections(e){const t=[];this.processElement(e);const r=this.splitBySection(e.children);let n=null;for(let i=0,l=r.length;ih.type=="first"):null)??(r%2==1?e.find(h=>h.type=="even"):null)??e.find(h=>h.type=="default"),l=i&&this.document.findPartByRelId(i.id,this.document.documentPart);if(l){this.currentPart=l,this.usedHederFooterParts.includes(l.path)||(this.processElement(l.rootElement),this.usedHederFooterParts.push(l.path));const[h]=this.renderElements([l.rootElement],a);t!=null&&t.pageMargins&&(l.rootElement.type===R.Header?(h.style.marginTop=`calc(${t.pageMargins.header} - ${t.pageMargins.top})`,h.style.minHeight=`calc(${t.pageMargins.top} - ${t.pageMargins.header})`):l.rootElement.type===R.Footer&&(h.style.marginBottom=`calc(${t.pageMargins.footer} - ${t.pageMargins.bottom})`,h.style.minHeight=`calc(${t.pageMargins.bottom} - ${t.pageMargins.footer})`)),this.currentPart=null}}}isPageBreakElement(e){return e.type!=R.Break?!1:e.break=="lastRenderedPageBreak"?!this.options.ignoreLastRenderedPageBreak:e.break=="page"}splitBySection(e){var w;var t={sectProps:null,elements:[]},r=[t];for(let y of e){if(y.type==R.Paragraph){const _=this.findStyle(y.styleName);(w=_==null?void 0:_.paragraphProps)!=null&&w.pageBreakBefore&&(t.sectProps=n,t={sectProps:null,elements:[]},r.push(t))}if(t.elements.push(y),y.type==R.Paragraph){const _=y;var n=_.sectionProps,a=-1,i=-1;if(this.options.breakPages&&_.children&&(a=_.children.findIndex(d=>{var v;return i=((v=d.children)==null?void 0:v.findIndex(this.isPageBreakElement.bind(this)))??-1,i!=-1})),(n||a!=-1)&&(t.sectProps=n,t={sectProps:null,elements:[]},r.push(t)),a!=-1){let d=_.children[a],v=i=0;y--)r[y].sectProps==null?r[y].sectProps=k:k=r[y].sectProps;return r}renderWrapper(e){return this.createElement("div",{className:`${this.className}-wrapper`},e)}renderDefaultStyle(){var e=this.className,t=` .${e}-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } .${e}-wrapper>section.${e} { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; } .${e} { color: black; hyphens: auto; text-underline-position: from-font; } section.${e} { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; } section.${e}>article { margin-bottom: auto; z-index: 1; } section.${e}>footer { z-index: 1; } .${e} table { border-collapse: collapse; } .${e} table td, .${e} table th { vertical-align: top; } .${e} p { margin: 0pt; min-height: 1em; } .${e} span { white-space: pre-wrap; overflow-wrap: break-word; } .${e} a { color: inherit; text-decoration: inherit; } `;return Ct(t)}renderNumbering(e,t){var r="",n=[];for(var a of e){var i=`p.${this.numberingClass(a.id,a.level)}`,l="none";if(a.bullet){let h=`--${this.className}-${a.bullet.src}`.toLowerCase();r+=this.styleToString(`${i}:before`,{content:"' '",display:"inline-block",background:`var(${h})`},a.bullet.style),this.tasks.push(this.document.loadNumberingImage(a.bullet.src).then(k=>{var w=`${this.rootSelector} { ${h}: url(${k}) }`;t.appendChild(Ct(w))}))}else if(a.levelText){let h=this.numberingCounter(a.id,a.level);const k=h+" "+(a.start-1);a.level>0&&(r+=this.styleToString(`p.${this.numberingClass(a.id,a.level-1)}`,{"counter-reset":k})),n.push(k),r+=this.styleToString(`${i}:before`,{content:this.levelTextToContent(a.levelText,a.suff,a.id,this.numFormatToCssValue(a.format)),"counter-increment":h,...a.rStyle})}else l=this.numFormatToCssValue(a.format);r+=this.styleToString(i,{display:"list-item","list-style-position":"inside","list-style-type":l,...a.pStyle})}return n.length>0&&(r+=this.styleToString(this.rootSelector,{"counter-reset":n.join(" ")})),Ct(r)}renderStyles(e){var t="";const r=this.styleMap,n=xt(e.filter(h=>h.isDefault),h=>h.target);for(const h of e){var a=h.styles;if(h.linked){var i=h.linked&&r[h.linked];i?a=a.concat(i.styles):this.options.debug&&console.warn(`Can't find linked style ${h.linked}`)}for(const k of a){var l=`${h.target??""}.${h.cssName}`;h.target!=k.target&&(l+=` ${k.target}`),n[h.target]==h&&(l=`.${this.className} ${h.target}, `+l),t+=this.styleToString(l,k.values)}}return Ct(t)}renderNotes(e,t,r){var n=e.map(i=>t[i]).filter(i=>i);if(n.length>0){var a=this.createElement("ol",null,this.renderElements(n));r.appendChild(a)}}renderElement(e){switch(e.type){case R.Paragraph:return this.renderParagraph(e);case R.BookmarkStart:return this.renderBookmarkStart(e);case R.BookmarkEnd:return null;case R.Run:return this.renderRun(e);case R.Table:return this.renderTable(e);case R.Row:return this.renderTableRow(e);case R.Cell:return this.renderTableCell(e);case R.Hyperlink:return this.renderHyperlink(e);case R.Drawing:return this.renderDrawing(e);case R.Image:return this.renderImage(e);case R.Text:return this.renderText(e);case R.Text:return this.renderText(e);case R.DeletedText:return this.renderDeletedText(e);case R.Tab:return this.renderTab(e);case R.Symbol:return this.renderSymbol(e);case R.Break:return this.renderBreak(e);case R.Footer:return this.renderContainer(e,"footer");case R.Header:return this.renderContainer(e,"header");case R.Footnote:case R.Endnote:return this.renderContainer(e,"li");case R.FootnoteReference:return this.renderFootnoteReference(e);case R.EndnoteReference:return this.renderEndnoteReference(e);case R.NoBreakHyphen:return this.createElement("wbr");case R.VmlPicture:return this.renderVmlPicture(e);case R.VmlElement:return this.renderVmlElement(e);case R.MmlMath:return this.renderContainerNS(e,at.mathML,"math",{xmlns:at.mathML});case R.MmlMathParagraph:return this.renderContainer(e,"span");case R.MmlFraction:return this.renderContainerNS(e,at.mathML,"mfrac");case R.MmlBase:return this.renderContainerNS(e,at.mathML,e.parent.type==R.MmlMatrixRow?"mtd":"mrow");case R.MmlNumerator:case R.MmlDenominator:case R.MmlFunction:case R.MmlLimit:case R.MmlBox:return this.renderContainerNS(e,at.mathML,"mrow");case R.MmlGroupChar:return this.renderMmlGroupChar(e);case R.MmlLimitLower:return this.renderContainerNS(e,at.mathML,"munder");case R.MmlMatrix:return this.renderContainerNS(e,at.mathML,"mtable");case R.MmlMatrixRow:return this.renderContainerNS(e,at.mathML,"mtr");case R.MmlRadical:return this.renderMmlRadical(e);case R.MmlSuperscript:return this.renderContainerNS(e,at.mathML,"msup");case R.MmlSubscript:return this.renderContainerNS(e,at.mathML,"msub");case R.MmlDegree:case R.MmlSuperArgument:case R.MmlSubArgument:return this.renderContainerNS(e,at.mathML,"mn");case R.MmlFunctionName:return this.renderContainerNS(e,at.mathML,"ms");case R.MmlDelimiter:return this.renderMmlDelimiter(e);case R.MmlRun:return this.renderMmlRun(e);case R.MmlNary:return this.renderMmlNary(e);case R.MmlPreSubSuper:return this.renderMmlPreSubSuper(e);case R.MmlBar:return this.renderMmlBar(e);case R.MmlEquationArray:return this.renderMllList(e);case R.Inserted:return this.renderInserted(e);case R.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&&$t(t,r),r}renderContainer(e,t,r){return this.createElement(t,r,this.renderChildren(e))}renderContainerNS(e,t,r,n){return ct(t,r,n,this.renderChildren(e))}renderParagraph(e){var a,i;var t=this.createElement("p");const r=this.findStyle(e.styleName);e.tabs??(e.tabs=(a=r==null?void 0:r.paragraphProps)==null?void 0:a.tabs),this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),this.renderCommonProperties(t.style,e);const n=e.numbering??((i=r==null?void 0:r.paragraphProps)==null?void 0:i.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){const 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${e.char};`,t}renderFootnoteReference(e){var t=this.createElement("sup");return this.currentFootnoteIds.push(e.id),t.textContent=`${this.currentFootnoteIds.length}`,t}renderEndnoteReference(e){var t=this.createElement("sup");return this.currentEndnoteIds.push(e.id),t.textContent=`${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=Dr(e,R.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;const t=this.createElement("span");if(e.id&&(t.id=e.id),this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),e.verticalAlign){const 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");const 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=Ht("div");return this.renderChildren(e,t),t}renderVmlElement(e){var n,a;var t=se("svg");t.setAttribute("style",e.cssStyleText);const r=this.renderVmlChildElement(e);return(n=e.imageHref)!=null&&n.id&&this.tasks.push((a=this.document)==null?void 0:a.loadDocumentImage(e.imageHref.id,this.currentPart).then(i=>r.setAttribute("href",i))),t.appendChild(r),requestAnimationFrame(()=>{const i=t.firstElementChild.getBBox();t.setAttribute("width",`${Math.ceil(i.x+i.width)}`),t.setAttribute("height",`${Math.ceil(i.y+i.height)}`)}),t}renderVmlChildElement(e){const t=se(e.tagName);Object.entries(e.attrs).forEach(([r,n])=>t.setAttribute(r,n));for(let r of e.children)r.type==R.VmlElement?t.appendChild(this.renderVmlChildElement(r)):t.appendChild(...Nt(this.renderElement(r)));return t}renderMmlRadical(e){var n;const t=e.children.find(a=>a.type==R.MmlBase);if((n=e.props)!=null&&n.hideDegree)return ct(at.mathML,"msqrt",null,this.renderElements([t]));const r=e.children.find(a=>a.type==R.MmlDegree);return ct(at.mathML,"mroot",null,this.renderElements([t,r]))}renderMmlDelimiter(e){const t=[];return t.push(ct(at.mathML,"mo",null,[e.props.beginChar??"("])),t.push(...this.renderElements(e.children)),t.push(ct(at.mathML,"mo",null,[e.props.endChar??")"])),ct(at.mathML,"mrow",null,t)}renderMmlNary(e){var k;const t=[],r=xt(e.children,w=>w.type),n=r[R.MmlSuperArgument],a=r[R.MmlSubArgument],i=n?ct(at.mathML,"mo",null,Nt(this.renderElement(n))):null,l=a?ct(at.mathML,"mo",null,Nt(this.renderElement(a))):null,h=ct(at.mathML,"mo",null,[((k=e.props)==null?void 0:k.char)??"∫"]);return i||l?t.push(ct(at.mathML,"munderover",null,[h,l,i])):i?t.push(ct(at.mathML,"mover",null,[h,i])):l?t.push(ct(at.mathML,"munder",null,[h,l])):t.push(h),t.push(...this.renderElements(r[R.MmlBase].children)),ct(at.mathML,"mrow",null,t)}renderMmlPreSubSuper(e){const t=[],r=xt(e.children,k=>k.type),n=r[R.MmlSuperArgument],a=r[R.MmlSubArgument],i=n?ct(at.mathML,"mo",null,Nt(this.renderElement(n))):null,l=a?ct(at.mathML,"mo",null,Nt(this.renderElement(a))):null,h=ct(at.mathML,"mo",null);return t.push(ct(at.mathML,"msubsup",null,[h,l,i])),t.push(...this.renderElements(r[R.MmlBase].children)),ct(at.mathML,"mrow",null,t)}renderMmlGroupChar(e){const t=e.props.verticalJustification==="bot"?"mover":"munder",r=this.renderContainerNS(e,at.mathML,t);return e.props.char&&r.appendChild(ct(at.mathML,"mo",null,[e.props.char])),r}renderMmlBar(e){const t=this.renderContainerNS(e,at.mathML,"mrow");switch(e.props.position){case"top":t.style.textDecoration="overline";break;case"bottom":t.style.textDecoration="underline";break}return t}renderMmlRun(e){const t=ct(at.mathML,"ms");return this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.renderChildren(e,t),t}renderMllList(e){const t=ct(at.mathML,"mtable");this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.renderChildren(e);for(let r of this.renderChildren(e))t.appendChild(ct(at.mathML,"mtr",null,[ct(at.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`${this.className}-num-${e}-${t}`}tabStopClass(){return`${this.className}-tab-stop`}styleToString(e,t,r=null){let n=`${e} {\r `;for(const a in t)a.startsWith("$")||(n+=` ${a}: ${t[a]};\r `);return r&&(n+=r),n+`}\r `}numberingCounter(e,t){return`${this.className}-num-${e}-${t}`}levelTextToContent(e,t,r,n){const a={tab:"\\9",space:"\\a0"};var i=e.replace(/%\d*/g,l=>{let h=parseInt(l.substring(1),10)-1;return`"counter(${this.numberingCounter(r,h)}, ${n})"`});return`"${i}${a[t]??""}"`}numFormatToCssValue(e){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 t[e]??e}refreshTabStops(){this.options.experimental&&(clearTimeout(this.tabsTimeout),this.tabsTimeout=setTimeout(()=>{const e=Fr();for(let t of this.currentTabs)Ir(t.span,t.stops,this.defaultTabSize,e)},500))}}function Ht(c,e,t){return ct(void 0,c,e,t)}function se(c,e,t){return ct(at.svg,c,e,t)}function ct(c,e,t,r){var n=c?document.createElementNS(c,e):document.createElement(e);return Object.assign(n,t),r&&$t(n,r),n}function ie(c){c.innerHTML=""}function $t(c,e){e.forEach(t=>c.appendChild(je(t)?document.createTextNode(t):t))}function Ct(c){return Ht("style",{innerHTML:c})}function Bt(c,e){c.appendChild(document.createComment(e))}function Dr(c,e){for(var t=c.parent;t!=null&&t.type!=e;)t=t.parent;return t}const 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 Lr(c,e){const t={...ye,...e};return Gt.load(c,new Mr(t),t)}async function jr(c,e,t,r){const n={...ye,...r},a=new Or(window.document);return a.render(c,e,t,n),Promise.allSettled(a.tasks.filter(i=>i))}async function Hr(c,e,t,r){const n=await Lr(c,r);return await jr(n,e,t,r),n}export{ye as defaultOptions,Lr as praseAsync,Hr as renderAsync,jr as renderDocument};