@coco-vexel/coco-office-oojson 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/oojson.global.js +9 -9
- package/package.json +2 -2
- package/src/json-to-ooxml.mjs +12 -2
- package/src/ooxml-to-json.mjs +25 -4
- package/src/styles-to-ooxml.mjs +2 -1
- package/src/table-width.mjs +10 -0
package/dist/oojson.global.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var oojson=(()=>{var
|
|
2
|
-
\0`,G+=r(I,2),G+=D.magic,G+=r(v,2),G+=r(_,2),G+=r(nt.crc32,4),G+=r(nt.compressedSize,4),G+=r(nt.uncompressedSize,4),G+=r(F.length,2),G+=r(P.length,2),{fileRecord:u.LOCAL_FILE_HEADER+G+F+P,dirRecord:u.CENTRAL_FILE_HEADER+r(tt,2)+G+r(Y.length,2)+"\0\0\0\0"+r(E,4)+r(g,4)+F+P+Y}}var i=t("../utils"),s=t("../stream/GenericWorker"),a=t("../utf8"),l=t("../crc32"),u=t("../signature");function h(d,w,f,g){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=f,this.encodeFileName=g,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(h,s),h.prototype.push=function(d){var w=d.meta.percent||0,f=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,s.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:f?(w+100*(f-g-1))/f:100}}))},h.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var w=this.streamFiles&&!d.file.dir;if(w){var f=o(d,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:f.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(d){this.accumulate=!1;var w=this.streamFiles&&!d.file.dir,f=o(d,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(f.dirRecord),w)this.push({data:(function(g){return u.DATA_DESCRIPTOR+r(g.crc32,4)+r(g.compressedSize,4)+r(g.uncompressedSize,4)})(d),meta:{percent:100}});else for(this.push({data:f.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var d=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var f=this.bytesWritten-d,g=(function(m,y,v,_,k){var D=i.transformTo("string",k(_));return u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(m,2)+r(m,2)+r(y,4)+r(v,4)+r(D.length,2)+D})(this.dirRecords.length,f,d,this.zipComment,this.encodeFileName);this.push({data:g,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(d){this._sources.push(d);var w=this;return d.on("data",function(f){w.processChunk(f)}),d.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),d.on("error",function(f){w.error(f)}),this},h.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(d){var w=this._sources;if(!s.prototype.error.call(this,d))return!1;for(var f=0;f<w.length;f++)try{w[f].error(d)}catch{}return!0},h.prototype.lock=function(){s.prototype.lock.call(this);for(var d=this._sources,w=0;w<d.length;w++)d[w].lock()},e.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,n){"use strict";var r=t("../compressions"),o=t("./ZipFileWorker");n.generateWorker=function(i,s,a){var l=new o(s.streamFiles,a,s.platform,s.encodeFileName),u=0;try{i.forEach(function(h,d){u++;var w=(function(y,v){var _=y||v,k=r[_];if(!k)throw new Error(_+" is not a valid compression method !");return k})(d.options.compression,s.compression),f=d.options.compressionOptions||s.compressionOptions||{},g=d.dir,m=d.date;d._compressWorker(w,f).withStreamInfo("file",{name:h,dir:g,date:m,comment:d.comment||"",unixPermissions:d.unixPermissions,dosPermissions:d.dosPermissions}).pipe(l)}),l.entriesCount=u}catch(h){l.error(h)}return l}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new r;for(var i in this)typeof this[i]!="function"&&(o[i]=this[i]);return o}}(r.prototype=t("./object")).loadAsync=t("./load"),r.support=t("./support"),r.defaults=t("./defaults"),r.version="3.10.2",r.loadAsync=function(o,i){return new r().loadAsync(o,i)},r.external=t("./external"),e.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,n){"use strict";var r=t("./utils"),o=t("./external"),i=t("./utf8"),s=t("./zipEntries"),a=t("./stream/Crc32Probe"),l=t("./nodejsUtils");function u(h){return new o.Promise(function(d,w){var f=h.decompressed.getContentWorker().pipe(new a);f.on("error",function(g){w(g)}).on("end",function(){f.streamInfo.crc32!==h.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):d()}).resume()})}e.exports=function(h,d){var w=this;return d=r.extend(d||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),l.isNode&&l.isStream(h)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",h,!0,d.optimizedBinaryString,d.base64).then(function(f){var g=new s(d);return g.load(f),g}).then(function(f){var g=[o.Promise.resolve(f)],m=f.files;if(d.checkCRC32)for(var y=0;y<m.length;y++)g.push(u(m[y]));return o.Promise.all(g)}).then(function(f){for(var g=f.shift(),m=g.files,y=0;y<m.length;y++){var v=m[y],_=v.fileNameStr,k=r.resolve(v.fileNameStr);w.file(k,v.decompressed,{binary:!0,optimizedBinaryString:!0,date:v.date,dir:v.dir,comment:v.fileCommentStr.length?v.fileCommentStr:null,unixPermissions:v.unixPermissions,dosPermissions:v.dosPermissions,createFolders:d.createFolders}),v.dir||(w.file(k).unsafeOriginalName=_)}return g.zipComment.length&&(w.comment=g.zipComment),w})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,n){"use strict";var r=t("../utils"),o=t("../stream/GenericWorker");function i(s,a){o.call(this,"Nodejs stream input adapter for "+s),this._upstreamEnded=!1,this._bindStream(a)}r.inherits(i,o),i.prototype._bindStream=function(s){var a=this;(this._stream=s).pause(),s.on("data",function(l){a.push({data:l,meta:{percent:0}})}).on("error",function(l){a.isPaused?this.generatedError=l:a.error(l)}).on("end",function(){a.isPaused?a._upstreamEnded=!0:a.end()})},i.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=i},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,n){"use strict";var r=t("readable-stream").Readable;function o(i,s,a){r.call(this,s),this._helper=i;var l=this;i.on("data",function(u,h){l.push(u)||l._helper.pause(),a&&a(h)}).on("error",function(u){l.emit("error",u)}).on("end",function(){l.push(null)})}t("../utils").inherits(o,r),o.prototype._read=function(){this._helper.resume()},e.exports=o},{"../utils":32,"readable-stream":16}],14:[function(t,e,n){"use strict";e.exports={isNode:typeof Buffer<"u",newBufferFrom:function(r,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(r,o);if(typeof r=="number")throw new Error('The "data" argument must not be a number');return new Buffer(r,o)},allocBuffer:function(r){if(Buffer.alloc)return Buffer.alloc(r);var o=new Buffer(r);return o.fill(0),o},isBuffer:function(r){return Buffer.isBuffer(r)},isStream:function(r){return r&&typeof r.on=="function"&&typeof r.pause=="function"&&typeof r.resume=="function"}}},{}],15:[function(t,e,n){"use strict";function r(k,D,C){var F,N=i.getTypeOf(D),L=i.extend(C||{},l);L.date=L.date||new Date,L.compression!==null&&(L.compression=L.compression.toUpperCase()),typeof L.unixPermissions=="string"&&(L.unixPermissions=parseInt(L.unixPermissions,8)),L.unixPermissions&&16384&L.unixPermissions&&(L.dir=!0),L.dosPermissions&&16&L.dosPermissions&&(L.dir=!0),L.dir&&(k=m(k)),L.createFolders&&(F=g(k))&&y.call(this,F,!0);var Y=N==="string"&&L.binary===!1&&L.base64===!1;C&&C.binary!==void 0||(L.binary=!Y),(D instanceof u&&D.uncompressedSize===0||L.dir||!D||D.length===0)&&(L.base64=!1,L.binary=!0,D="",L.compression="STORE",N="string");var S=null;S=D instanceof u||D instanceof s?D:w.isNode&&w.isStream(D)?new f(k,D):i.prepareContent(k,D,L.binary,L.optimizedBinaryString,L.base64);var $=new h(k,S,L);this.files[k]=$}var o=t("./utf8"),i=t("./utils"),s=t("./stream/GenericWorker"),a=t("./stream/StreamHelper"),l=t("./defaults"),u=t("./compressedObject"),h=t("./zipObject"),d=t("./generate"),w=t("./nodejsUtils"),f=t("./nodejs/NodejsStreamInputAdapter"),g=function(k){k.slice(-1)==="/"&&(k=k.substring(0,k.length-1));var D=k.lastIndexOf("/");return 0<D?k.substring(0,D):""},m=function(k){return k.slice(-1)!=="/"&&(k+="/"),k},y=function(k,D){return D=D!==void 0?D:l.createFolders,k=m(k),this.files[k]||r.call(this,k,null,{dir:!0,createFolders:D}),this.files[k]};function v(k){return Object.prototype.toString.call(k)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(k){var D,C,F;for(D in this.files)F=this.files[D],(C=D.slice(this.root.length,D.length))&&D.slice(0,this.root.length)===this.root&&k(C,F)},filter:function(k){var D=[];return this.forEach(function(C,F){k(C,F)&&D.push(F)}),D},file:function(k,D,C){if(arguments.length!==1)return k=this.root+k,r.call(this,k,D,C),this;if(v(k)){var F=k;return this.filter(function(L,Y){return!Y.dir&&F.test(L)})}var N=this.files[this.root+k];return N&&!N.dir?N:null},folder:function(k){if(!k)return this;if(v(k))return this.filter(function(N,L){return L.dir&&k.test(N)});var D=this.root+k,C=y.call(this,D),F=this.clone();return F.root=C.name,F},remove:function(k){k=this.root+k;var D=this.files[k];if(D||(k.slice(-1)!=="/"&&(k+="/"),D=this.files[k]),D&&!D.dir)delete this.files[k];else for(var C=this.filter(function(N,L){return L.name.slice(0,k.length)===k}),F=0;F<C.length;F++)delete this.files[C[F].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(k){var D,C={};try{if((C=i.extend(k||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=C.type.toLowerCase(),C.compression=C.compression.toUpperCase(),C.type==="binarystring"&&(C.type="string"),!C.type)throw new Error("No output type specified.");i.checkSupport(C.type),C.platform!=="darwin"&&C.platform!=="freebsd"&&C.platform!=="linux"&&C.platform!=="sunos"||(C.platform="UNIX"),C.platform==="win32"&&(C.platform="DOS");var F=C.comment||this.comment||"";D=d.generateWorker(this,C,F)}catch(N){(D=new s("error")).error(N)}return new a(D,C.type||"string",C.mimeType)},generateAsync:function(k,D){return this.generateInternalStream(k).accumulate(D)},generateNodeStream:function(k,D){return(k=k||{}).type||(k.type="nodebuffer"),this.generateInternalStream(k).toNodejsStream(D)}};e.exports=_},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,e,n){"use strict";e.exports=t("stream")},{stream:void 0}],17:[function(t,e,n){"use strict";var r=t("./DataReader");function o(i){r.call(this,i);for(var s=0;s<this.data.length;s++)i[s]=255&i[s]}t("../utils").inherits(o,r),o.prototype.byteAt=function(i){return this.data[this.zero+i]},o.prototype.lastIndexOfSignature=function(i){for(var s=i.charCodeAt(0),a=i.charCodeAt(1),l=i.charCodeAt(2),u=i.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===s&&this.data[h+1]===a&&this.data[h+2]===l&&this.data[h+3]===u)return h-this.zero;return-1},o.prototype.readAndCheckSignature=function(i){var s=i.charCodeAt(0),a=i.charCodeAt(1),l=i.charCodeAt(2),u=i.charCodeAt(3),h=this.readData(4);return s===h[0]&&a===h[1]&&l===h[2]&&u===h[3]},o.prototype.readData=function(i){if(this.checkOffset(i),i===0)return[];var s=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},e.exports=o},{"../utils":32,"./DataReader":18}],18:[function(t,e,n){"use strict";var r=t("../utils");function o(i){this.data=i,this.length=i.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(i){this.checkIndex(this.index+i)},checkIndex:function(i){if(this.length<this.zero+i||i<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+i+"). Corrupted zip ?")},setIndex:function(i){this.checkIndex(i),this.index=i},skip:function(i){this.setIndex(this.index+i)},byteAt:function(){},readInt:function(i){var s,a=0;for(this.checkOffset(i),s=this.index+i-1;s>=this.index;s--)a=(a<<8)+this.byteAt(s);return this.index+=i,a},readString:function(i){return r.transformTo("string",this.readData(i))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var i=this.readInt(4);return new Date(Date.UTC(1980+(i>>25&127),(i>>21&15)-1,i>>16&31,i>>11&31,i>>5&63,(31&i)<<1))}},e.exports=o},{"../utils":32}],19:[function(t,e,n){"use strict";var r=t("./Uint8ArrayReader");function o(i){r.call(this,i)}t("../utils").inherits(o,r),o.prototype.readData=function(i){this.checkOffset(i);var s=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},e.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,n){"use strict";var r=t("./DataReader");function o(i){r.call(this,i)}t("../utils").inherits(o,r),o.prototype.byteAt=function(i){return this.data.charCodeAt(this.zero+i)},o.prototype.lastIndexOfSignature=function(i){return this.data.lastIndexOf(i)-this.zero},o.prototype.readAndCheckSignature=function(i){return i===this.readData(4)},o.prototype.readData=function(i){this.checkOffset(i);var s=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},e.exports=o},{"../utils":32,"./DataReader":18}],21:[function(t,e,n){"use strict";var r=t("./ArrayReader");function o(i){r.call(this,i)}t("../utils").inherits(o,r),o.prototype.readData=function(i){if(this.checkOffset(i),i===0)return new Uint8Array(0);var s=this.data.subarray(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},e.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,n){"use strict";var r=t("../utils"),o=t("../support"),i=t("./ArrayReader"),s=t("./StringReader"),a=t("./NodeBufferReader"),l=t("./Uint8ArrayReader");e.exports=function(u){var h=r.getTypeOf(u);return r.checkSupport(h),h!=="string"||o.uint8array?h==="nodebuffer"?new a(u):o.uint8array?new l(r.transformTo("uint8array",u)):new i(r.transformTo("array",u)):new s(u)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,n){"use strict";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,e,n){"use strict";var r=t("./GenericWorker"),o=t("../utils");function i(s){r.call(this,"ConvertWorker to "+s),this.destType=s}o.inherits(i,r),i.prototype.processChunk=function(s){this.push({data:o.transformTo(this.destType,s.data),meta:s.meta})},e.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,n){"use strict";var r=t("./GenericWorker"),o=t("../crc32");function i(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(i,r),i.prototype.processChunk=function(s){this.streamInfo.crc32=o(s.data,this.streamInfo.crc32||0),this.push(s)},e.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,n){"use strict";var r=t("../utils"),o=t("./GenericWorker");function i(s){o.call(this,"DataLengthProbe for "+s),this.propName=s,this.withStreamInfo(s,0)}r.inherits(i,o),i.prototype.processChunk=function(s){if(s){var a=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=a+s.data.length}o.prototype.processChunk.call(this,s)},e.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,n){"use strict";var r=t("../utils"),o=t("./GenericWorker");function i(s){o.call(this,"DataWorker");var a=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,s.then(function(l){a.dataIsReady=!0,a.data=l,a.max=l&&l.length||0,a.type=r.getTypeOf(l),a.isPaused||a._tickAndRepeat()},function(l){a.error(l)})}r.inherits(i,o),i.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var s=null,a=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":s=this.data.substring(this.index,a);break;case"uint8array":s=this.data.subarray(this.index,a);break;case"array":case"nodebuffer":s=this.data.slice(this.index,a)}return this.index=a,this.push({data:s,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,n){"use strict";function r(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,i){return this._listeners[o].push(i),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,i){if(this._listeners[o])for(var s=0;s<this._listeners[o].length;s++)this._listeners[o][s].call(this,i)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var i=this;return o.on("data",function(s){i.processChunk(s)}),o.on("end",function(){i.end()}),o.on("error",function(s){i.error(s)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,i){return this.extraStreamInfo[o]=i,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},e.exports=r},{}],29:[function(t,e,n){"use strict";var r=t("../utils"),o=t("./ConvertWorker"),i=t("./GenericWorker"),s=t("../base64"),a=t("../support"),l=t("../external"),u=null;if(a.nodestream)try{u=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(w,f){return new l.Promise(function(g,m){var y=[],v=w._internalType,_=w._outputType,k=w._mimeType;w.on("data",function(D,C){y.push(D),f&&f(C)}).on("error",function(D){y=[],m(D)}).on("end",function(){try{var D=(function(C,F,N){switch(C){case"blob":return r.newBlob(r.transformTo("arraybuffer",F),N);case"base64":return s.encode(F);default:return r.transformTo(C,F)}})(_,(function(C,F){var N,L=0,Y=null,S=0;for(N=0;N<F.length;N++)S+=F[N].length;switch(C){case"string":return F.join("");case"array":return Array.prototype.concat.apply([],F);case"uint8array":for(Y=new Uint8Array(S),N=0;N<F.length;N++)Y.set(F[N],L),L+=F[N].length;return Y;case"nodebuffer":return Buffer.concat(F);default:throw new Error("concat : unsupported type '"+C+"'")}})(v,y),k);g(D)}catch(C){m(C)}y=[]}).resume()})}function d(w,f,g){var m=f;switch(f){case"blob":case"arraybuffer":m="uint8array";break;case"base64":m="string"}try{this._internalType=m,this._outputType=f,this._mimeType=g,r.checkSupport(m),this._worker=w.pipe(new o(m)),w.lock()}catch(y){this._worker=new i("error"),this._worker.error(y)}}d.prototype={accumulate:function(w){return h(this,w)},on:function(w,f){var g=this;return w==="data"?this._worker.on(w,function(m){f.call(g,m.data,m.meta)}):this._worker.on(w,function(){r.delay(f,arguments,g)}),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(w){if(r.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new u(this,{objectMode:this._outputType!=="nodebuffer"},w)}},e.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,n){"use strict";if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",n.nodebuffer=typeof Buffer<"u",n.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(r),n.blob=o.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,e,n){"use strict";for(var r=t("./utils"),o=t("./support"),i=t("./nodejsUtils"),s=t("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;a[254]=a[254]=1;function u(){s.call(this,"utf-8 decode"),this.leftOver=null}function h(){s.call(this,"utf-8 encode")}n.utf8encode=function(d){return o.nodebuffer?i.newBufferFrom(d,"utf-8"):(function(w){var f,g,m,y,v,_=w.length,k=0;for(y=0;y<_;y++)(64512&(g=w.charCodeAt(y)))==55296&&y+1<_&&(64512&(m=w.charCodeAt(y+1)))==56320&&(g=65536+(g-55296<<10)+(m-56320),y++),k+=g<128?1:g<2048?2:g<65536?3:4;for(f=o.uint8array?new Uint8Array(k):new Array(k),y=v=0;v<k;y++)(64512&(g=w.charCodeAt(y)))==55296&&y+1<_&&(64512&(m=w.charCodeAt(y+1)))==56320&&(g=65536+(g-55296<<10)+(m-56320),y++),g<128?f[v++]=g:(g<2048?f[v++]=192|g>>>6:(g<65536?f[v++]=224|g>>>12:(f[v++]=240|g>>>18,f[v++]=128|g>>>12&63),f[v++]=128|g>>>6&63),f[v++]=128|63&g);return f})(d)},n.utf8decode=function(d){return o.nodebuffer?r.transformTo("nodebuffer",d).toString("utf-8"):(function(w){var f,g,m,y,v=w.length,_=new Array(2*v);for(f=g=0;f<v;)if((m=w[f++])<128)_[g++]=m;else if(4<(y=a[m]))_[g++]=65533,f+=y-1;else{for(m&=y===2?31:y===3?15:7;1<y&&f<v;)m=m<<6|63&w[f++],y--;1<y?_[g++]=65533:m<65536?_[g++]=m:(m-=65536,_[g++]=55296|m>>10&1023,_[g++]=56320|1023&m)}return _.length!==g&&(_.subarray?_=_.subarray(0,g):_.length=g),r.applyFromCharCode(_)})(d=r.transformTo(o.uint8array?"uint8array":"array",d))},r.inherits(u,s),u.prototype.processChunk=function(d){var w=r.transformTo(o.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var f=w;(w=new Uint8Array(f.length+this.leftOver.length)).set(this.leftOver,0),w.set(f,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var g=(function(y,v){var _;for((v=v||y.length)>y.length&&(v=y.length),_=v-1;0<=_&&(192&y[_])==128;)_--;return _<0||_===0?v:_+a[y[_]]>v?_:v})(w),m=w;g!==w.length&&(o.uint8array?(m=w.subarray(0,g),this.leftOver=w.subarray(g,w.length)):(m=w.slice(0,g),this.leftOver=w.slice(g,w.length))),this.push({data:n.utf8decode(m),meta:d.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=u,r.inherits(h,s),h.prototype.processChunk=function(d){this.push({data:n.utf8encode(d.data),meta:d.meta})},n.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,n){"use strict";var r=t("./support"),o=t("./base64"),i=t("./nodejsUtils"),s=t("./external");function a(f){return f}function l(f,g){for(var m=0;m<f.length;++m)g[m]=255&f.charCodeAt(m);return g}t("setimmediate"),n.newBlob=function(f,g){n.checkSupport("blob");try{return new Blob([f],{type:g})}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return m.append(f),m.getBlob(g)}catch{throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(f,g,m){var y=[],v=0,_=f.length;if(_<=m)return String.fromCharCode.apply(null,f);for(;v<_;)g==="array"||g==="nodebuffer"?y.push(String.fromCharCode.apply(null,f.slice(v,Math.min(v+m,_)))):y.push(String.fromCharCode.apply(null,f.subarray(v,Math.min(v+m,_)))),v+=m;return y.join("")},stringifyByChar:function(f){for(var g="",m=0;m<f.length;m++)g+=String.fromCharCode(f[m]);return g},applyCanBeUsed:{uint8array:(function(){try{return r.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return r.nodebuffer&&String.fromCharCode.apply(null,i.allocBuffer(1)).length===1}catch{return!1}})()}};function h(f){var g=65536,m=n.getTypeOf(f),y=!0;if(m==="uint8array"?y=u.applyCanBeUsed.uint8array:m==="nodebuffer"&&(y=u.applyCanBeUsed.nodebuffer),y)for(;1<g;)try{return u.stringifyByChunk(f,m,g)}catch{g=Math.floor(g/2)}return u.stringifyByChar(f)}function d(f,g){for(var m=0;m<f.length;m++)g[m]=f[m];return g}n.applyFromCharCode=h;var w={};w.string={string:a,array:function(f){return l(f,new Array(f.length))},arraybuffer:function(f){return w.string.uint8array(f).buffer},uint8array:function(f){return l(f,new Uint8Array(f.length))},nodebuffer:function(f){return l(f,i.allocBuffer(f.length))}},w.array={string:h,array:a,arraybuffer:function(f){return new Uint8Array(f).buffer},uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return i.newBufferFrom(f)}},w.arraybuffer={string:function(f){return h(new Uint8Array(f))},array:function(f){return d(new Uint8Array(f),new Array(f.byteLength))},arraybuffer:a,uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return i.newBufferFrom(new Uint8Array(f))}},w.uint8array={string:h,array:function(f){return d(f,new Array(f.length))},arraybuffer:function(f){return f.buffer},uint8array:a,nodebuffer:function(f){return i.newBufferFrom(f)}},w.nodebuffer={string:h,array:function(f){return d(f,new Array(f.length))},arraybuffer:function(f){return w.nodebuffer.uint8array(f).buffer},uint8array:function(f){return d(f,new Uint8Array(f.length))},nodebuffer:a},n.transformTo=function(f,g){if(g=g||"",!f)return g;n.checkSupport(f);var m=n.getTypeOf(g);return w[m][f](g)},n.resolve=function(f){for(var g=f.split("/"),m=[],y=0;y<g.length;y++){var v=g[y];v==="."||v===""&&y!==0&&y!==g.length-1||(v===".."?m.pop():m.push(v))}return m.join("/")},n.getTypeOf=function(f){if(typeof f=="string")return"string";var g=Object.prototype.toString.call(f);return g==="[object Array]"?"array":r.nodebuffer&&i.isBuffer(f)?"nodebuffer":r.uint8array&&g==="[object Uint8Array]"?"uint8array":r.arraybuffer&&g==="[object ArrayBuffer]"?"arraybuffer":void 0},n.checkSupport=function(f){if(!r[f.toLowerCase()])throw new Error(f+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(f){var g,m,y="";for(m=0;m<(f||"").length;m++)y+="\\x"+((g=f.charCodeAt(m))<16?"0":"")+g.toString(16).toUpperCase();return y},n.delay=function(f,g,m){setImmediate(function(){f.apply(m||null,g||[])})},n.inherits=function(f,g){function m(){}m.prototype=g.prototype,f.prototype=new m},n.extend=function(){var f,g,m={};for(f=0;f<arguments.length;f++)for(g in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],g)&&m[g]===void 0&&(m[g]=arguments[f][g]);return m},n.prepareContent=function(f,g,m,y,v){return s.Promise.resolve(g).then(function(_){return r.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)?Blob.prototype.arrayBuffer!==void 0?_.arrayBuffer():typeof FileReader<"u"?new s.Promise(function(k,D){var C=new FileReader;C.onload=function(F){k(F.target.result)},C.onerror=function(F){D(F.target.error)},C.readAsArrayBuffer(_)}):s.Promise.reject(new Error(f+" is a Blob, but we have no way of reading it.")):_}).then(function(_){var k=n.getTypeOf(_);return k?(k==="arraybuffer"?_=n.transformTo("uint8array",_):k==="string"&&(v?_=o.decode(_):m&&y!==!0&&(_=(function(D){return l(D,r.uint8array?new Uint8Array(D.length):new Array(D.length))})(_))),_):s.Promise.reject(new Error("Can't read the data of '"+f+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,e,n){"use strict";var r=t("./reader/readerFor"),o=t("./utils"),i=t("./signature"),s=t("./zipEntry"),a=t("./support");function l(u){this.files=[],this.loadOptions=u}l.prototype={checkSignature:function(u){if(!this.reader.readAndCheckSignature(u)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(h)+", expected "+o.pretty(u)+")")}},isSignature:function(u,h){var d=this.reader.index;this.reader.setIndex(u);var w=this.reader.readString(4)===h;return this.reader.setIndex(d),w},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var u=this.reader.readData(this.zipCommentLength),h=a.uint8array?"uint8array":"array",d=o.transformTo(h,u);this.zipComment=this.loadOptions.decodeFileName(d)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var u,h,d,w=this.zip64EndOfCentralSize-44;0<w;)u=this.reader.readInt(2),h=this.reader.readInt(4),d=this.reader.readData(h),this.zip64ExtensibleData[u]={id:u,length:h,value:d}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var u,h;for(u=0;u<this.files.length;u++)h=this.files[u],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(i.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var u;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER);)(u=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(u);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var u=this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);if(u<0)throw this.isSignature(0,i.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(u);var h=u;if(this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(u=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(u),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var d=this.centralDirOffset+this.centralDirSize;this.zip64&&(d+=20,d+=12+this.zip64EndOfCentralSize);var w=h-d;if(0<w)this.isSignature(h,i.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(u){this.reader=r(u)},load:function(u){this.prepareReader(u),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,e,n){"use strict";var r=t("./reader/readerFor"),o=t("./utils"),i=t("./compressedObject"),s=t("./crc32"),a=t("./utf8"),l=t("./compressions"),u=t("./support");function h(d,w){this.options=d,this.loadOptions=w}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(d){var w,f;if(d.skip(22),this.fileNameLength=d.readInt(2),f=d.readInt(2),this.fileName=d.readData(this.fileNameLength),d.skip(f),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((w=(function(g){for(var m in l)if(Object.prototype.hasOwnProperty.call(l,m)&&l[m].magic===g)return l[m];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,w,d.readData(this.compressedSize))},readCentralPart:function(d){this.versionMadeBy=d.readInt(2),d.skip(2),this.bitFlag=d.readInt(2),this.compressionMethod=d.readString(2),this.date=d.readDate(),this.crc32=d.readInt(4),this.compressedSize=d.readInt(4),this.uncompressedSize=d.readInt(4);var w=d.readInt(2);if(this.extraFieldsLength=d.readInt(2),this.fileCommentLength=d.readInt(2),this.diskNumberStart=d.readInt(2),this.internalFileAttributes=d.readInt(2),this.externalFileAttributes=d.readInt(4),this.localHeaderOffset=d.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");d.skip(w),this.readExtraFields(d),this.parseZIP64ExtraField(d),this.fileComment=d.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var d=this.versionMadeBy>>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=r(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var w,f,g,m=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4<m;)w=d.readInt(2),f=d.readInt(2),g=d.readData(f),this.extraFields[w]={id:w,length:f,value:g};d.setIndex(m)},handleUTF8:function(){var d=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var w=this.findExtraFieldUnicodePath();if(w!==null)this.fileNameStr=w;else{var f=o.transformTo(d,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(f)}var g=this.findExtraFieldUnicodeComment();if(g!==null)this.fileCommentStr=g;else{var m=o.transformTo(d,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(m)}}},findExtraFieldUnicodePath:function(){var d=this.extraFields[28789];if(d){var w=r(d.value);return w.readInt(1)!==1||s(this.fileName)!==w.readInt(4)?null:a.utf8decode(w.readData(d.length-5))}return null},findExtraFieldUnicodeComment:function(){var d=this.extraFields[25461];if(d){var w=r(d.value);return w.readInt(1)!==1||s(this.fileComment)!==w.readInt(4)?null:a.utf8decode(w.readData(d.length-5))}return null}},e.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,n){"use strict";function r(w,f,g){this.name=w,this.dir=g.dir,this.date=g.date,this.comment=g.comment,this.unixPermissions=g.unixPermissions,this.dosPermissions=g.dosPermissions,this._data=f,this._dataBinary=g.binary,this.options={compression:g.compression,compressionOptions:g.compressionOptions}}var o=t("./stream/StreamHelper"),i=t("./stream/DataWorker"),s=t("./utf8"),a=t("./compressedObject"),l=t("./stream/GenericWorker");r.prototype={internalStream:function(w){var f=null,g="string";try{if(!w)throw new Error("No output type specified.");var m=(g=w.toLowerCase())==="string"||g==="text";g!=="binarystring"&&g!=="text"||(g="string"),f=this._decompressWorker();var y=!this._dataBinary;y&&!m&&(f=f.pipe(new s.Utf8EncodeWorker)),!y&&m&&(f=f.pipe(new s.Utf8DecodeWorker))}catch(v){(f=new l("error")).error(v)}return new o(f,g,"")},async:function(w,f){return this.internalStream(w).accumulate(f)},nodeStream:function(w,f){return this.internalStream(w||"nodebuffer").toNodejsStream(f)},_compressWorker:function(w,f){if(this._data instanceof a&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var g=this._decompressWorker();return this._dataBinary||(g=g.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(g,w,f)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new i(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<u.length;d++)r.prototype[u[d]]=h;e.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,e,n){(function(r){"use strict";var o,i,s=r.MutationObserver||r.WebKitMutationObserver;if(s){var a=0,l=new s(w),u=r.document.createTextNode("");l.observe(u,{characterData:!0}),o=function(){u.data=a=++a%2}}else if(r.setImmediate||r.MessageChannel===void 0)o="document"in r&&"onreadystatechange"in r.document.createElement("script")?function(){var f=r.document.createElement("script");f.onreadystatechange=function(){w(),f.onreadystatechange=null,f.parentNode.removeChild(f),f=null},r.document.documentElement.appendChild(f)}:function(){setTimeout(w,0)};else{var h=new r.MessageChannel;h.port1.onmessage=w,o=function(){h.port2.postMessage(0)}}var d=[];function w(){var f,g;i=!0;for(var m=d.length;m;){for(g=d,d=[],f=-1;++f<m;)g[f]();m=d.length}i=!1}e.exports=function(f){d.push(f)!==1||i||o()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,e,n){"use strict";var r=t("immediate");function o(){}var i={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function u(m){if(typeof m!="function")throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,m!==o&&f(this,m)}function h(m,y,v){this.promise=m,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof v=="function"&&(this.onRejected=v,this.callRejected=this.otherCallRejected)}function d(m,y,v){r(function(){var _;try{_=y(v)}catch(k){return i.reject(m,k)}_===m?i.reject(m,new TypeError("Cannot resolve promise with itself")):i.resolve(m,_)})}function w(m){var y=m&&m.then;if(m&&(typeof m=="object"||typeof m=="function")&&typeof y=="function")return function(){y.apply(m,arguments)}}function f(m,y){var v=!1;function _(C){v||(v=!0,i.reject(m,C))}function k(C){v||(v=!0,i.resolve(m,C))}var D=g(function(){y(k,_)});D.status==="error"&&_(D.value)}function g(m,y){var v={};try{v.value=m(y),v.status="success"}catch(_){v.status="error",v.value=_}return v}(e.exports=u).prototype.finally=function(m){if(typeof m!="function")return this;var y=this.constructor;return this.then(function(v){return y.resolve(m()).then(function(){return v})},function(v){return y.resolve(m()).then(function(){throw v})})},u.prototype.catch=function(m){return this.then(null,m)},u.prototype.then=function(m,y){if(typeof m!="function"&&this.state===a||typeof y!="function"&&this.state===s)return this;var v=new this.constructor(o);return this.state!==l?d(v,this.state===a?m:y,this.outcome):this.queue.push(new h(v,m,y)),v},h.prototype.callFulfilled=function(m){i.resolve(this.promise,m)},h.prototype.otherCallFulfilled=function(m){d(this.promise,this.onFulfilled,m)},h.prototype.callRejected=function(m){i.reject(this.promise,m)},h.prototype.otherCallRejected=function(m){d(this.promise,this.onRejected,m)},i.resolve=function(m,y){var v=g(w,y);if(v.status==="error")return i.reject(m,v.value);var _=v.value;if(_)f(m,_);else{m.state=a,m.outcome=y;for(var k=-1,D=m.queue.length;++k<D;)m.queue[k].callFulfilled(y)}return m},i.reject=function(m,y){m.state=s,m.outcome=y;for(var v=-1,_=m.queue.length;++v<_;)m.queue[v].callRejected(y);return m},u.resolve=function(m){return m instanceof this?m:i.resolve(new this(o),m)},u.reject=function(m){var y=new this(o);return i.reject(y,m)},u.all=function(m){var y=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var v=m.length,_=!1;if(!v)return this.resolve([]);for(var k=new Array(v),D=0,C=-1,F=new this(o);++C<v;)N(m[C],C);return F;function N(L,Y){y.resolve(L).then(function(S){k[Y]=S,++D!==v||_||(_=!0,i.resolve(F,k))},function(S){_||(_=!0,i.reject(F,S))})}},u.race=function(m){var y=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var v=m.length,_=!1;if(!v)return this.resolve([]);for(var k=-1,D=new this(o);++k<v;)C=m[k],y.resolve(C).then(function(F){_||(_=!0,i.resolve(D,F))},function(F){_||(_=!0,i.reject(D,F))});var C;return D}},{immediate:36}],38:[function(t,e,n){"use strict";var r={};(0,t("./lib/utils/common").assign)(r,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,n){"use strict";var r=t("./zlib/deflate"),o=t("./utils/common"),i=t("./utils/strings"),s=t("./zlib/messages"),a=t("./zlib/zstream"),l=Object.prototype.toString,u=0,h=-1,d=0,w=8;function f(m){if(!(this instanceof f))return new f(m);this.options=o.assign({level:h,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},m||{});var y=this.options;y.raw&&0<y.windowBits?y.windowBits=-y.windowBits:y.gzip&&0<y.windowBits&&y.windowBits<16&&(y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var v=r.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(v!==u)throw new Error(s[v]);if(y.header&&r.deflateSetHeader(this.strm,y.header),y.dictionary){var _;if(_=typeof y.dictionary=="string"?i.string2buf(y.dictionary):l.call(y.dictionary)==="[object ArrayBuffer]"?new Uint8Array(y.dictionary):y.dictionary,(v=r.deflateSetDictionary(this.strm,_))!==u)throw new Error(s[v]);this._dict_set=!0}}function g(m,y){var v=new f(y);if(v.push(m,!0),v.err)throw v.msg||s[v.err];return v.result}f.prototype.push=function(m,y){var v,_,k=this.strm,D=this.options.chunkSize;if(this.ended)return!1;_=y===~~y?y:y===!0?4:0,typeof m=="string"?k.input=i.string2buf(m):l.call(m)==="[object ArrayBuffer]"?k.input=new Uint8Array(m):k.input=m,k.next_in=0,k.avail_in=k.input.length;do{if(k.avail_out===0&&(k.output=new o.Buf8(D),k.next_out=0,k.avail_out=D),(v=r.deflate(k,_))!==1&&v!==u)return this.onEnd(v),!(this.ended=!0);k.avail_out!==0&&(k.avail_in!==0||_!==4&&_!==2)||(this.options.to==="string"?this.onData(i.buf2binstring(o.shrinkBuf(k.output,k.next_out))):this.onData(o.shrinkBuf(k.output,k.next_out)))}while((0<k.avail_in||k.avail_out===0)&&v!==1);return _===4?(v=r.deflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===u):_!==2||(this.onEnd(u),!(k.avail_out=0))},f.prototype.onData=function(m){this.chunks.push(m)},f.prototype.onEnd=function(m){m===u&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},n.Deflate=f,n.deflate=g,n.deflateRaw=function(m,y){return(y=y||{}).raw=!0,g(m,y)},n.gzip=function(m,y){return(y=y||{}).gzip=!0,g(m,y)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,n){"use strict";var r=t("./zlib/inflate"),o=t("./utils/common"),i=t("./utils/strings"),s=t("./zlib/constants"),a=t("./zlib/messages"),l=t("./zlib/zstream"),u=t("./zlib/gzheader"),h=Object.prototype.toString;function d(f){if(!(this instanceof d))return new d(f);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},f||{});var g=this.options;g.raw&&0<=g.windowBits&&g.windowBits<16&&(g.windowBits=-g.windowBits,g.windowBits===0&&(g.windowBits=-15)),!(0<=g.windowBits&&g.windowBits<16)||f&&f.windowBits||(g.windowBits+=32),15<g.windowBits&&g.windowBits<48&&(15&g.windowBits)==0&&(g.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var m=r.inflateInit2(this.strm,g.windowBits);if(m!==s.Z_OK)throw new Error(a[m]);this.header=new u,r.inflateGetHeader(this.strm,this.header)}function w(f,g){var m=new d(g);if(m.push(f,!0),m.err)throw m.msg||a[m.err];return m.result}d.prototype.push=function(f,g){var m,y,v,_,k,D,C=this.strm,F=this.options.chunkSize,N=this.options.dictionary,L=!1;if(this.ended)return!1;y=g===~~g?g:g===!0?s.Z_FINISH:s.Z_NO_FLUSH,typeof f=="string"?C.input=i.binstring2buf(f):h.call(f)==="[object ArrayBuffer]"?C.input=new Uint8Array(f):C.input=f,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new o.Buf8(F),C.next_out=0,C.avail_out=F),(m=r.inflate(C,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&N&&(D=typeof N=="string"?i.string2buf(N):h.call(N)==="[object ArrayBuffer]"?new Uint8Array(N):N,m=r.inflateSetDictionary(this.strm,D)),m===s.Z_BUF_ERROR&&L===!0&&(m=s.Z_OK,L=!1),m!==s.Z_STREAM_END&&m!==s.Z_OK)return this.onEnd(m),!(this.ended=!0);C.next_out&&(C.avail_out!==0&&m!==s.Z_STREAM_END&&(C.avail_in!==0||y!==s.Z_FINISH&&y!==s.Z_SYNC_FLUSH)||(this.options.to==="string"?(v=i.utf8border(C.output,C.next_out),_=C.next_out-v,k=i.buf2string(C.output,v),C.next_out=_,C.avail_out=F-_,_&&o.arraySet(C.output,C.output,v,_,0),this.onData(k)):this.onData(o.shrinkBuf(C.output,C.next_out)))),C.avail_in===0&&C.avail_out===0&&(L=!0)}while((0<C.avail_in||C.avail_out===0)&&m!==s.Z_STREAM_END);return m===s.Z_STREAM_END&&(y=s.Z_FINISH),y===s.Z_FINISH?(m=r.inflateEnd(this.strm),this.onEnd(m),this.ended=!0,m===s.Z_OK):y!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(C.avail_out=0))},d.prototype.onData=function(f){this.chunks.push(f)},d.prototype.onEnd=function(f){f===s.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},n.Inflate=d,n.inflate=w,n.inflateRaw=function(f,g){return(g=g||{}).raw=!0,w(f,g)},n.ungzip=w},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,n){"use strict";var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";n.assign=function(s){for(var a=Array.prototype.slice.call(arguments,1);a.length;){var l=a.shift();if(l){if(typeof l!="object")throw new TypeError(l+"must be non-object");for(var u in l)l.hasOwnProperty(u)&&(s[u]=l[u])}}return s},n.shrinkBuf=function(s,a){return s.length===a?s:s.subarray?s.subarray(0,a):(s.length=a,s)};var o={arraySet:function(s,a,l,u,h){if(a.subarray&&s.subarray)s.set(a.subarray(l,l+u),h);else for(var d=0;d<u;d++)s[h+d]=a[l+d]},flattenChunks:function(s){var a,l,u,h,d,w;for(a=u=0,l=s.length;a<l;a++)u+=s[a].length;for(w=new Uint8Array(u),a=h=0,l=s.length;a<l;a++)d=s[a],w.set(d,h),h+=d.length;return w}},i={arraySet:function(s,a,l,u,h){for(var d=0;d<u;d++)s[h+d]=a[l+d]},flattenChunks:function(s){return[].concat.apply([],s)}};n.setTyped=function(s){s?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,o)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,i))},n.setTyped(r)},{}],42:[function(t,e,n){"use strict";var r=t("./common"),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{i=!1}for(var s=new r.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(u,h){if(h<65537&&(u.subarray&&i||!u.subarray&&o))return String.fromCharCode.apply(null,r.shrinkBuf(u,h));for(var d="",w=0;w<h;w++)d+=String.fromCharCode(u[w]);return d}s[254]=s[254]=1,n.string2buf=function(u){var h,d,w,f,g,m=u.length,y=0;for(f=0;f<m;f++)(64512&(d=u.charCodeAt(f)))==55296&&f+1<m&&(64512&(w=u.charCodeAt(f+1)))==56320&&(d=65536+(d-55296<<10)+(w-56320),f++),y+=d<128?1:d<2048?2:d<65536?3:4;for(h=new r.Buf8(y),f=g=0;g<y;f++)(64512&(d=u.charCodeAt(f)))==55296&&f+1<m&&(64512&(w=u.charCodeAt(f+1)))==56320&&(d=65536+(d-55296<<10)+(w-56320),f++),d<128?h[g++]=d:(d<2048?h[g++]=192|d>>>6:(d<65536?h[g++]=224|d>>>12:(h[g++]=240|d>>>18,h[g++]=128|d>>>12&63),h[g++]=128|d>>>6&63),h[g++]=128|63&d);return h},n.buf2binstring=function(u){return l(u,u.length)},n.binstring2buf=function(u){for(var h=new r.Buf8(u.length),d=0,w=h.length;d<w;d++)h[d]=u.charCodeAt(d);return h},n.buf2string=function(u,h){var d,w,f,g,m=h||u.length,y=new Array(2*m);for(d=w=0;d<m;)if((f=u[d++])<128)y[w++]=f;else if(4<(g=s[f]))y[w++]=65533,d+=g-1;else{for(f&=g===2?31:g===3?15:7;1<g&&d<m;)f=f<<6|63&u[d++],g--;1<g?y[w++]=65533:f<65536?y[w++]=f:(f-=65536,y[w++]=55296|f>>10&1023,y[w++]=56320|1023&f)}return l(y,w)},n.utf8border=function(u,h){var d;for((h=h||u.length)>u.length&&(h=u.length),d=h-1;0<=d&&(192&u[d])==128;)d--;return d<0||d===0?h:d+s[u[d]]>h?d:h}},{"./common":41}],43:[function(t,e,n){"use strict";e.exports=function(r,o,i,s){for(var a=65535&r|0,l=r>>>16&65535|0,u=0;i!==0;){for(i-=u=2e3<i?2e3:i;l=l+(a=a+o[s++]|0)|0,--u;);a%=65521,l%=65521}return a|l<<16|0}},{}],44:[function(t,e,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,e,n){"use strict";var r=(function(){for(var o,i=[],s=0;s<256;s++){o=s;for(var a=0;a<8;a++)o=1&o?3988292384^o>>>1:o>>>1;i[s]=o}return i})();e.exports=function(o,i,s,a){var l=r,u=a+s;o^=-1;for(var h=a;h<u;h++)o=o>>>8^l[255&(o^i[h])];return-1^o}},{}],46:[function(t,e,n){"use strict";var r,o=t("../utils/common"),i=t("./trees"),s=t("./adler32"),a=t("./crc32"),l=t("./messages"),u=0,h=4,d=0,w=-2,f=-1,g=4,m=2,y=8,v=9,_=286,k=30,D=19,C=2*_+1,F=15,N=3,L=258,Y=L+N+1,S=42,$=113,p=1,P=2,st=3,M=4;function lt(c,R){return c.msg=l[R],R}function U(c){return(c<<1)-(4<c?9:0)}function nt(c){for(var R=c.length;0<=--R;)c[R]=0}function I(c){var R=c.state,A=R.pending;A>c.avail_out&&(A=c.avail_out),A!==0&&(o.arraySet(c.output,R.pending_buf,R.pending_out,A,c.next_out),c.next_out+=A,R.pending_out+=A,c.total_out+=A,c.avail_out-=A,R.pending-=A,R.pending===0&&(R.pending_out=0))}function E(c,R){i._tr_flush_block(c,0<=c.block_start?c.block_start:-1,c.strstart-c.block_start,R),c.block_start=c.strstart,I(c.strm)}function tt(c,R){c.pending_buf[c.pending++]=R}function G(c,R){c.pending_buf[c.pending++]=R>>>8&255,c.pending_buf[c.pending++]=255&R}function H(c,R){var A,x,b=c.max_chain_length,T=c.strstart,j=c.prev_length,B=c.nice_match,O=c.strstart>c.w_size-Y?c.strstart-(c.w_size-Y):0,X=c.window,J=c.w_mask,W=c.prev,Q=c.strstart+L,bt=X[T+j-1],dt=X[T+j];c.prev_length>=c.good_match&&(b>>=2),B>c.lookahead&&(B=c.lookahead);do if(X[(A=R)+j]===dt&&X[A+j-1]===bt&&X[A]===X[T]&&X[++A]===X[T+1]){T+=2,A++;do;while(X[++T]===X[++A]&&X[++T]===X[++A]&&X[++T]===X[++A]&&X[++T]===X[++A]&&X[++T]===X[++A]&&X[++T]===X[++A]&&X[++T]===X[++A]&&X[++T]===X[++A]&&T<Q);if(x=L-(Q-T),T=Q-L,j<x){if(c.match_start=R,B<=(j=x))break;bt=X[T+j-1],dt=X[T+j]}}while((R=W[R&J])>O&&--b!=0);return j<=c.lookahead?j:c.lookahead}function kt(c){var R,A,x,b,T,j,B,O,X,J,W=c.w_size;do{if(b=c.window_size-c.lookahead-c.strstart,c.strstart>=W+(W-Y)){for(o.arraySet(c.window,c.window,W,W,0),c.match_start-=W,c.strstart-=W,c.block_start-=W,R=A=c.hash_size;x=c.head[--R],c.head[R]=W<=x?x-W:0,--A;);for(R=A=W;x=c.prev[--R],c.prev[R]=W<=x?x-W:0,--A;);b+=W}if(c.strm.avail_in===0)break;if(j=c.strm,B=c.window,O=c.strstart+c.lookahead,X=b,J=void 0,J=j.avail_in,X<J&&(J=X),A=J===0?0:(j.avail_in-=J,o.arraySet(B,j.input,j.next_in,J,O),j.state.wrap===1?j.adler=s(j.adler,B,J,O):j.state.wrap===2&&(j.adler=a(j.adler,B,J,O)),j.next_in+=J,j.total_in+=J,J),c.lookahead+=A,c.lookahead+c.insert>=N)for(T=c.strstart-c.insert,c.ins_h=c.window[T],c.ins_h=(c.ins_h<<c.hash_shift^c.window[T+1])&c.hash_mask;c.insert&&(c.ins_h=(c.ins_h<<c.hash_shift^c.window[T+N-1])&c.hash_mask,c.prev[T&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=T,T++,c.insert--,!(c.lookahead+c.insert<N)););}while(c.lookahead<Y&&c.strm.avail_in!==0)}function zt(c,R){for(var A,x;;){if(c.lookahead<Y){if(kt(c),c.lookahead<Y&&R===u)return p;if(c.lookahead===0)break}if(A=0,c.lookahead>=N&&(c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+N-1])&c.hash_mask,A=c.prev[c.strstart&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=c.strstart),A!==0&&c.strstart-A<=c.w_size-Y&&(c.match_length=H(c,A)),c.match_length>=N)if(x=i._tr_tally(c,c.strstart-c.match_start,c.match_length-N),c.lookahead-=c.match_length,c.match_length<=c.max_lazy_match&&c.lookahead>=N){for(c.match_length--;c.strstart++,c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+N-1])&c.hash_mask,A=c.prev[c.strstart&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=c.strstart,--c.match_length!=0;);c.strstart++}else c.strstart+=c.match_length,c.match_length=0,c.ins_h=c.window[c.strstart],c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+1])&c.hash_mask;else x=i._tr_tally(c,0,c.window[c.strstart]),c.lookahead--,c.strstart++;if(x&&(E(c,!1),c.strm.avail_out===0))return p}return c.insert=c.strstart<N-1?c.strstart:N-1,R===h?(E(c,!0),c.strm.avail_out===0?st:M):c.last_lit&&(E(c,!1),c.strm.avail_out===0)?p:P}function ft(c,R){for(var A,x,b;;){if(c.lookahead<Y){if(kt(c),c.lookahead<Y&&R===u)return p;if(c.lookahead===0)break}if(A=0,c.lookahead>=N&&(c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+N-1])&c.hash_mask,A=c.prev[c.strstart&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=c.strstart),c.prev_length=c.match_length,c.prev_match=c.match_start,c.match_length=N-1,A!==0&&c.prev_length<c.max_lazy_match&&c.strstart-A<=c.w_size-Y&&(c.match_length=H(c,A),c.match_length<=5&&(c.strategy===1||c.match_length===N&&4096<c.strstart-c.match_start)&&(c.match_length=N-1)),c.prev_length>=N&&c.match_length<=c.prev_length){for(b=c.strstart+c.lookahead-N,x=i._tr_tally(c,c.strstart-1-c.prev_match,c.prev_length-N),c.lookahead-=c.prev_length-1,c.prev_length-=2;++c.strstart<=b&&(c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+N-1])&c.hash_mask,A=c.prev[c.strstart&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=c.strstart),--c.prev_length!=0;);if(c.match_available=0,c.match_length=N-1,c.strstart++,x&&(E(c,!1),c.strm.avail_out===0))return p}else if(c.match_available){if((x=i._tr_tally(c,0,c.window[c.strstart-1]))&&E(c,!1),c.strstart++,c.lookahead--,c.strm.avail_out===0)return p}else c.match_available=1,c.strstart++,c.lookahead--}return c.match_available&&(x=i._tr_tally(c,0,c.window[c.strstart-1]),c.match_available=0),c.insert=c.strstart<N-1?c.strstart:N-1,R===h?(E(c,!0),c.strm.avail_out===0?st:M):c.last_lit&&(E(c,!1),c.strm.avail_out===0)?p:P}function mt(c,R,A,x,b){this.good_length=c,this.max_lazy=R,this.nice_length=A,this.max_chain=x,this.func=b}function Dt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*C),this.dyn_dtree=new o.Buf16(2*(2*k+1)),this.bl_tree=new o.Buf16(2*(2*D+1)),nt(this.dyn_ltree),nt(this.dyn_dtree),nt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(F+1),this.heap=new o.Buf16(2*_+1),nt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*_+1),nt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Tt(c){var R;return c&&c.state?(c.total_in=c.total_out=0,c.data_type=m,(R=c.state).pending=0,R.pending_out=0,R.wrap<0&&(R.wrap=-R.wrap),R.status=R.wrap?S:$,c.adler=R.wrap===2?0:1,R.last_flush=u,i._tr_init(R),d):lt(c,w)}function oe(c){var R=Tt(c);return R===d&&(function(A){A.window_size=2*A.w_size,nt(A.head),A.max_lazy_match=r[A.level].max_lazy,A.good_match=r[A.level].good_length,A.nice_match=r[A.level].nice_length,A.max_chain_length=r[A.level].max_chain,A.strstart=0,A.block_start=0,A.lookahead=0,A.insert=0,A.match_length=A.prev_length=N-1,A.match_available=0,A.ins_h=0})(c.state),R}function ne(c,R,A,x,b,T){if(!c)return w;var j=1;if(R===f&&(R=6),x<0?(j=0,x=-x):15<x&&(j=2,x-=16),b<1||v<b||A!==y||x<8||15<x||R<0||9<R||T<0||g<T)return lt(c,w);x===8&&(x=9);var B=new Dt;return(c.state=B).strm=c,B.wrap=j,B.gzhead=null,B.w_bits=x,B.w_size=1<<B.w_bits,B.w_mask=B.w_size-1,B.hash_bits=b+7,B.hash_size=1<<B.hash_bits,B.hash_mask=B.hash_size-1,B.hash_shift=~~((B.hash_bits+N-1)/N),B.window=new o.Buf8(2*B.w_size),B.head=new o.Buf16(B.hash_size),B.prev=new o.Buf16(B.w_size),B.lit_bufsize=1<<b+6,B.pending_buf_size=4*B.lit_bufsize,B.pending_buf=new o.Buf8(B.pending_buf_size),B.d_buf=1*B.lit_bufsize,B.l_buf=3*B.lit_bufsize,B.level=R,B.strategy=T,B.method=A,oe(c)}r=[new mt(0,0,0,0,function(c,R){var A=65535;for(A>c.pending_buf_size-5&&(A=c.pending_buf_size-5);;){if(c.lookahead<=1){if(kt(c),c.lookahead===0&&R===u)return p;if(c.lookahead===0)break}c.strstart+=c.lookahead,c.lookahead=0;var x=c.block_start+A;if((c.strstart===0||c.strstart>=x)&&(c.lookahead=c.strstart-x,c.strstart=x,E(c,!1),c.strm.avail_out===0)||c.strstart-c.block_start>=c.w_size-Y&&(E(c,!1),c.strm.avail_out===0))return p}return c.insert=0,R===h?(E(c,!0),c.strm.avail_out===0?st:M):(c.strstart>c.block_start&&(E(c,!1),c.strm.avail_out),p)}),new mt(4,4,8,4,zt),new mt(4,5,16,8,zt),new mt(4,6,32,32,zt),new mt(4,4,16,16,ft),new mt(8,16,32,32,ft),new mt(8,16,128,128,ft),new mt(8,32,128,256,ft),new mt(32,128,258,1024,ft),new mt(32,258,258,4096,ft)],n.deflateInit=function(c,R){return ne(c,R,y,15,8,0)},n.deflateInit2=ne,n.deflateReset=oe,n.deflateResetKeep=Tt,n.deflateSetHeader=function(c,R){return c&&c.state?c.state.wrap!==2?w:(c.state.gzhead=R,d):w},n.deflate=function(c,R){var A,x,b,T;if(!c||!c.state||5<R||R<0)return c?lt(c,w):w;if(x=c.state,!c.output||!c.input&&c.avail_in!==0||x.status===666&&R!==h)return lt(c,c.avail_out===0?-5:w);if(x.strm=c,A=x.last_flush,x.last_flush=R,x.status===S)if(x.wrap===2)c.adler=0,tt(x,31),tt(x,139),tt(x,8),x.gzhead?(tt(x,(x.gzhead.text?1:0)+(x.gzhead.hcrc?2:0)+(x.gzhead.extra?4:0)+(x.gzhead.name?8:0)+(x.gzhead.comment?16:0)),tt(x,255&x.gzhead.time),tt(x,x.gzhead.time>>8&255),tt(x,x.gzhead.time>>16&255),tt(x,x.gzhead.time>>24&255),tt(x,x.level===9?2:2<=x.strategy||x.level<2?4:0),tt(x,255&x.gzhead.os),x.gzhead.extra&&x.gzhead.extra.length&&(tt(x,255&x.gzhead.extra.length),tt(x,x.gzhead.extra.length>>8&255)),x.gzhead.hcrc&&(c.adler=a(c.adler,x.pending_buf,x.pending,0)),x.gzindex=0,x.status=69):(tt(x,0),tt(x,0),tt(x,0),tt(x,0),tt(x,0),tt(x,x.level===9?2:2<=x.strategy||x.level<2?4:0),tt(x,3),x.status=$);else{var j=y+(x.w_bits-8<<4)<<8;j|=(2<=x.strategy||x.level<2?0:x.level<6?1:x.level===6?2:3)<<6,x.strstart!==0&&(j|=32),j+=31-j%31,x.status=$,G(x,j),x.strstart!==0&&(G(x,c.adler>>>16),G(x,65535&c.adler)),c.adler=1}if(x.status===69)if(x.gzhead.extra){for(b=x.pending;x.gzindex<(65535&x.gzhead.extra.length)&&(x.pending!==x.pending_buf_size||(x.gzhead.hcrc&&x.pending>b&&(c.adler=a(c.adler,x.pending_buf,x.pending-b,b)),I(c),b=x.pending,x.pending!==x.pending_buf_size));)tt(x,255&x.gzhead.extra[x.gzindex]),x.gzindex++;x.gzhead.hcrc&&x.pending>b&&(c.adler=a(c.adler,x.pending_buf,x.pending-b,b)),x.gzindex===x.gzhead.extra.length&&(x.gzindex=0,x.status=73)}else x.status=73;if(x.status===73)if(x.gzhead.name){b=x.pending;do{if(x.pending===x.pending_buf_size&&(x.gzhead.hcrc&&x.pending>b&&(c.adler=a(c.adler,x.pending_buf,x.pending-b,b)),I(c),b=x.pending,x.pending===x.pending_buf_size)){T=1;break}T=x.gzindex<x.gzhead.name.length?255&x.gzhead.name.charCodeAt(x.gzindex++):0,tt(x,T)}while(T!==0);x.gzhead.hcrc&&x.pending>b&&(c.adler=a(c.adler,x.pending_buf,x.pending-b,b)),T===0&&(x.gzindex=0,x.status=91)}else x.status=91;if(x.status===91)if(x.gzhead.comment){b=x.pending;do{if(x.pending===x.pending_buf_size&&(x.gzhead.hcrc&&x.pending>b&&(c.adler=a(c.adler,x.pending_buf,x.pending-b,b)),I(c),b=x.pending,x.pending===x.pending_buf_size)){T=1;break}T=x.gzindex<x.gzhead.comment.length?255&x.gzhead.comment.charCodeAt(x.gzindex++):0,tt(x,T)}while(T!==0);x.gzhead.hcrc&&x.pending>b&&(c.adler=a(c.adler,x.pending_buf,x.pending-b,b)),T===0&&(x.status=103)}else x.status=103;if(x.status===103&&(x.gzhead.hcrc?(x.pending+2>x.pending_buf_size&&I(c),x.pending+2<=x.pending_buf_size&&(tt(x,255&c.adler),tt(x,c.adler>>8&255),c.adler=0,x.status=$)):x.status=$),x.pending!==0){if(I(c),c.avail_out===0)return x.last_flush=-1,d}else if(c.avail_in===0&&U(R)<=U(A)&&R!==h)return lt(c,-5);if(x.status===666&&c.avail_in!==0)return lt(c,-5);if(c.avail_in!==0||x.lookahead!==0||R!==u&&x.status!==666){var B=x.strategy===2?(function(O,X){for(var J;;){if(O.lookahead===0&&(kt(O),O.lookahead===0)){if(X===u)return p;break}if(O.match_length=0,J=i._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++,J&&(E(O,!1),O.strm.avail_out===0))return p}return O.insert=0,X===h?(E(O,!0),O.strm.avail_out===0?st:M):O.last_lit&&(E(O,!1),O.strm.avail_out===0)?p:P})(x,R):x.strategy===3?(function(O,X){for(var J,W,Q,bt,dt=O.window;;){if(O.lookahead<=L){if(kt(O),O.lookahead<=L&&X===u)return p;if(O.lookahead===0)break}if(O.match_length=0,O.lookahead>=N&&0<O.strstart&&(W=dt[Q=O.strstart-1])===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]){bt=O.strstart+L;do;while(W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&Q<bt);O.match_length=L-(bt-Q),O.match_length>O.lookahead&&(O.match_length=O.lookahead)}if(O.match_length>=N?(J=i._tr_tally(O,1,O.match_length-N),O.lookahead-=O.match_length,O.strstart+=O.match_length,O.match_length=0):(J=i._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++),J&&(E(O,!1),O.strm.avail_out===0))return p}return O.insert=0,X===h?(E(O,!0),O.strm.avail_out===0?st:M):O.last_lit&&(E(O,!1),O.strm.avail_out===0)?p:P})(x,R):r[x.level].func(x,R);if(B!==st&&B!==M||(x.status=666),B===p||B===st)return c.avail_out===0&&(x.last_flush=-1),d;if(B===P&&(R===1?i._tr_align(x):R!==5&&(i._tr_stored_block(x,0,0,!1),R===3&&(nt(x.head),x.lookahead===0&&(x.strstart=0,x.block_start=0,x.insert=0))),I(c),c.avail_out===0))return x.last_flush=-1,d}return R!==h?d:x.wrap<=0?1:(x.wrap===2?(tt(x,255&c.adler),tt(x,c.adler>>8&255),tt(x,c.adler>>16&255),tt(x,c.adler>>24&255),tt(x,255&c.total_in),tt(x,c.total_in>>8&255),tt(x,c.total_in>>16&255),tt(x,c.total_in>>24&255)):(G(x,c.adler>>>16),G(x,65535&c.adler)),I(c),0<x.wrap&&(x.wrap=-x.wrap),x.pending!==0?d:1)},n.deflateEnd=function(c){var R;return c&&c.state?(R=c.state.status)!==S&&R!==69&&R!==73&&R!==91&&R!==103&&R!==$&&R!==666?lt(c,w):(c.state=null,R===$?lt(c,-3):d):w},n.deflateSetDictionary=function(c,R){var A,x,b,T,j,B,O,X,J=R.length;if(!c||!c.state||(T=(A=c.state).wrap)===2||T===1&&A.status!==S||A.lookahead)return w;for(T===1&&(c.adler=s(c.adler,R,J,0)),A.wrap=0,J>=A.w_size&&(T===0&&(nt(A.head),A.strstart=0,A.block_start=0,A.insert=0),X=new o.Buf8(A.w_size),o.arraySet(X,R,J-A.w_size,A.w_size,0),R=X,J=A.w_size),j=c.avail_in,B=c.next_in,O=c.input,c.avail_in=J,c.next_in=0,c.input=R,kt(A);A.lookahead>=N;){for(x=A.strstart,b=A.lookahead-(N-1);A.ins_h=(A.ins_h<<A.hash_shift^A.window[x+N-1])&A.hash_mask,A.prev[x&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=x,x++,--b;);A.strstart=x,A.lookahead=N-1,kt(A)}return A.strstart+=A.lookahead,A.block_start=A.strstart,A.insert=A.lookahead,A.lookahead=0,A.match_length=A.prev_length=N-1,A.match_available=0,c.next_in=B,c.input=O,c.avail_in=j,A.wrap=T,d},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,n){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,e,n){"use strict";e.exports=function(r,o){var i,s,a,l,u,h,d,w,f,g,m,y,v,_,k,D,C,F,N,L,Y,S,$,p,P;i=r.state,s=r.next_in,p=r.input,a=s+(r.avail_in-5),l=r.next_out,P=r.output,u=l-(o-r.avail_out),h=l+(r.avail_out-257),d=i.dmax,w=i.wsize,f=i.whave,g=i.wnext,m=i.window,y=i.hold,v=i.bits,_=i.lencode,k=i.distcode,D=(1<<i.lenbits)-1,C=(1<<i.distbits)-1;t:do{v<15&&(y+=p[s++]<<v,v+=8,y+=p[s++]<<v,v+=8),F=_[y&D];e:for(;;){if(y>>>=N=F>>>24,v-=N,(N=F>>>16&255)===0)P[l++]=65535&F;else{if(!(16&N)){if((64&N)==0){F=_[(65535&F)+(y&(1<<N)-1)];continue e}if(32&N){i.mode=12;break t}r.msg="invalid literal/length code",i.mode=30;break t}L=65535&F,(N&=15)&&(v<N&&(y+=p[s++]<<v,v+=8),L+=y&(1<<N)-1,y>>>=N,v-=N),v<15&&(y+=p[s++]<<v,v+=8,y+=p[s++]<<v,v+=8),F=k[y&C];n:for(;;){if(y>>>=N=F>>>24,v-=N,!(16&(N=F>>>16&255))){if((64&N)==0){F=k[(65535&F)+(y&(1<<N)-1)];continue n}r.msg="invalid distance code",i.mode=30;break t}if(Y=65535&F,v<(N&=15)&&(y+=p[s++]<<v,(v+=8)<N&&(y+=p[s++]<<v,v+=8)),d<(Y+=y&(1<<N)-1)){r.msg="invalid distance too far back",i.mode=30;break t}if(y>>>=N,v-=N,(N=l-u)<Y){if(f<(N=Y-N)&&i.sane){r.msg="invalid distance too far back",i.mode=30;break t}if($=m,(S=0)===g){if(S+=w-N,N<L){for(L-=N;P[l++]=m[S++],--N;);S=l-Y,$=P}}else if(g<N){if(S+=w+g-N,(N-=g)<L){for(L-=N;P[l++]=m[S++],--N;);if(S=0,g<L){for(L-=N=g;P[l++]=m[S++],--N;);S=l-Y,$=P}}}else if(S+=g-N,N<L){for(L-=N;P[l++]=m[S++],--N;);S=l-Y,$=P}for(;2<L;)P[l++]=$[S++],P[l++]=$[S++],P[l++]=$[S++],L-=3;L&&(P[l++]=$[S++],1<L&&(P[l++]=$[S++]))}else{for(S=l-Y;P[l++]=P[S++],P[l++]=P[S++],P[l++]=P[S++],2<(L-=3););L&&(P[l++]=P[S++],1<L&&(P[l++]=P[S++]))}break}}break}}while(s<a&&l<h);s-=L=v>>3,y&=(1<<(v-=L<<3))-1,r.next_in=s,r.next_out=l,r.avail_in=s<a?a-s+5:5-(s-a),r.avail_out=l<h?h-l+257:257-(l-h),i.hold=y,i.bits=v}},{}],49:[function(t,e,n){"use strict";var r=t("../utils/common"),o=t("./adler32"),i=t("./crc32"),s=t("./inffast"),a=t("./inftrees"),l=1,u=2,h=0,d=-2,w=1,f=852,g=592;function m(S){return(S>>>24&255)+(S>>>8&65280)+((65280&S)<<8)+((255&S)<<24)}function y(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(S){var $;return S&&S.state?($=S.state,S.total_in=S.total_out=$.total=0,S.msg="",$.wrap&&(S.adler=1&$.wrap),$.mode=w,$.last=0,$.havedict=0,$.dmax=32768,$.head=null,$.hold=0,$.bits=0,$.lencode=$.lendyn=new r.Buf32(f),$.distcode=$.distdyn=new r.Buf32(g),$.sane=1,$.back=-1,h):d}function _(S){var $;return S&&S.state?(($=S.state).wsize=0,$.whave=0,$.wnext=0,v(S)):d}function k(S,$){var p,P;return S&&S.state?(P=S.state,$<0?(p=0,$=-$):(p=1+($>>4),$<48&&($&=15)),$&&($<8||15<$)?d:(P.window!==null&&P.wbits!==$&&(P.window=null),P.wrap=p,P.wbits=$,_(S))):d}function D(S,$){var p,P;return S?(P=new y,(S.state=P).window=null,(p=k(S,$))!==h&&(S.state=null),p):d}var C,F,N=!0;function L(S){if(N){var $;for(C=new r.Buf32(512),F=new r.Buf32(32),$=0;$<144;)S.lens[$++]=8;for(;$<256;)S.lens[$++]=9;for(;$<280;)S.lens[$++]=7;for(;$<288;)S.lens[$++]=8;for(a(l,S.lens,0,288,C,0,S.work,{bits:9}),$=0;$<32;)S.lens[$++]=5;a(u,S.lens,0,32,F,0,S.work,{bits:5}),N=!1}S.lencode=C,S.lenbits=9,S.distcode=F,S.distbits=5}function Y(S,$,p,P){var st,M=S.state;return M.window===null&&(M.wsize=1<<M.wbits,M.wnext=0,M.whave=0,M.window=new r.Buf8(M.wsize)),P>=M.wsize?(r.arraySet(M.window,$,p-M.wsize,M.wsize,0),M.wnext=0,M.whave=M.wsize):(P<(st=M.wsize-M.wnext)&&(st=P),r.arraySet(M.window,$,p-P,st,M.wnext),(P-=st)?(r.arraySet(M.window,$,p-P,P,0),M.wnext=P,M.whave=M.wsize):(M.wnext+=st,M.wnext===M.wsize&&(M.wnext=0),M.whave<M.wsize&&(M.whave+=st))),0}n.inflateReset=_,n.inflateReset2=k,n.inflateResetKeep=v,n.inflateInit=function(S){return D(S,15)},n.inflateInit2=D,n.inflate=function(S,$){var p,P,st,M,lt,U,nt,I,E,tt,G,H,kt,zt,ft,mt,Dt,Tt,oe,ne,c,R,A,x,b=0,T=new r.Buf8(4),j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!S||!S.state||!S.output||!S.input&&S.avail_in!==0)return d;(p=S.state).mode===12&&(p.mode=13),lt=S.next_out,st=S.output,nt=S.avail_out,M=S.next_in,P=S.input,U=S.avail_in,I=p.hold,E=p.bits,tt=U,G=nt,R=h;t:for(;;)switch(p.mode){case w:if(p.wrap===0){p.mode=13;break}for(;E<16;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(2&p.wrap&&I===35615){T[p.check=0]=255&I,T[1]=I>>>8&255,p.check=i(p.check,T,2,0),E=I=0,p.mode=2;break}if(p.flags=0,p.head&&(p.head.done=!1),!(1&p.wrap)||(((255&I)<<8)+(I>>8))%31){S.msg="incorrect header check",p.mode=30;break}if((15&I)!=8){S.msg="unknown compression method",p.mode=30;break}if(E-=4,c=8+(15&(I>>>=4)),p.wbits===0)p.wbits=c;else if(c>p.wbits){S.msg="invalid window size",p.mode=30;break}p.dmax=1<<c,S.adler=p.check=1,p.mode=512&I?10:12,E=I=0;break;case 2:for(;E<16;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(p.flags=I,(255&p.flags)!=8){S.msg="unknown compression method",p.mode=30;break}if(57344&p.flags){S.msg="unknown header flags set",p.mode=30;break}p.head&&(p.head.text=I>>8&1),512&p.flags&&(T[0]=255&I,T[1]=I>>>8&255,p.check=i(p.check,T,2,0)),E=I=0,p.mode=3;case 3:for(;E<32;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}p.head&&(p.head.time=I),512&p.flags&&(T[0]=255&I,T[1]=I>>>8&255,T[2]=I>>>16&255,T[3]=I>>>24&255,p.check=i(p.check,T,4,0)),E=I=0,p.mode=4;case 4:for(;E<16;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}p.head&&(p.head.xflags=255&I,p.head.os=I>>8),512&p.flags&&(T[0]=255&I,T[1]=I>>>8&255,p.check=i(p.check,T,2,0)),E=I=0,p.mode=5;case 5:if(1024&p.flags){for(;E<16;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}p.length=I,p.head&&(p.head.extra_len=I),512&p.flags&&(T[0]=255&I,T[1]=I>>>8&255,p.check=i(p.check,T,2,0)),E=I=0}else p.head&&(p.head.extra=null);p.mode=6;case 6:if(1024&p.flags&&(U<(H=p.length)&&(H=U),H&&(p.head&&(c=p.head.extra_len-p.length,p.head.extra||(p.head.extra=new Array(p.head.extra_len)),r.arraySet(p.head.extra,P,M,H,c)),512&p.flags&&(p.check=i(p.check,P,H,M)),U-=H,M+=H,p.length-=H),p.length))break t;p.length=0,p.mode=7;case 7:if(2048&p.flags){if(U===0)break t;for(H=0;c=P[M+H++],p.head&&c&&p.length<65536&&(p.head.name+=String.fromCharCode(c)),c&&H<U;);if(512&p.flags&&(p.check=i(p.check,P,H,M)),U-=H,M+=H,c)break t}else p.head&&(p.head.name=null);p.length=0,p.mode=8;case 8:if(4096&p.flags){if(U===0)break t;for(H=0;c=P[M+H++],p.head&&c&&p.length<65536&&(p.head.comment+=String.fromCharCode(c)),c&&H<U;);if(512&p.flags&&(p.check=i(p.check,P,H,M)),U-=H,M+=H,c)break t}else p.head&&(p.head.comment=null);p.mode=9;case 9:if(512&p.flags){for(;E<16;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(I!==(65535&p.check)){S.msg="header crc mismatch",p.mode=30;break}E=I=0}p.head&&(p.head.hcrc=p.flags>>9&1,p.head.done=!0),S.adler=p.check=0,p.mode=12;break;case 10:for(;E<32;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}S.adler=p.check=m(I),E=I=0,p.mode=11;case 11:if(p.havedict===0)return S.next_out=lt,S.avail_out=nt,S.next_in=M,S.avail_in=U,p.hold=I,p.bits=E,2;S.adler=p.check=1,p.mode=12;case 12:if($===5||$===6)break t;case 13:if(p.last){I>>>=7&E,E-=7&E,p.mode=27;break}for(;E<3;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}switch(p.last=1&I,E-=1,3&(I>>>=1)){case 0:p.mode=14;break;case 1:if(L(p),p.mode=20,$!==6)break;I>>>=2,E-=2;break t;case 2:p.mode=17;break;case 3:S.msg="invalid block type",p.mode=30}I>>>=2,E-=2;break;case 14:for(I>>>=7&E,E-=7&E;E<32;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if((65535&I)!=(I>>>16^65535)){S.msg="invalid stored block lengths",p.mode=30;break}if(p.length=65535&I,E=I=0,p.mode=15,$===6)break t;case 15:p.mode=16;case 16:if(H=p.length){if(U<H&&(H=U),nt<H&&(H=nt),H===0)break t;r.arraySet(st,P,M,H,lt),U-=H,M+=H,nt-=H,lt+=H,p.length-=H;break}p.mode=12;break;case 17:for(;E<14;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(p.nlen=257+(31&I),I>>>=5,E-=5,p.ndist=1+(31&I),I>>>=5,E-=5,p.ncode=4+(15&I),I>>>=4,E-=4,286<p.nlen||30<p.ndist){S.msg="too many length or distance symbols",p.mode=30;break}p.have=0,p.mode=18;case 18:for(;p.have<p.ncode;){for(;E<3;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}p.lens[j[p.have++]]=7&I,I>>>=3,E-=3}for(;p.have<19;)p.lens[j[p.have++]]=0;if(p.lencode=p.lendyn,p.lenbits=7,A={bits:p.lenbits},R=a(0,p.lens,0,19,p.lencode,0,p.work,A),p.lenbits=A.bits,R){S.msg="invalid code lengths set",p.mode=30;break}p.have=0,p.mode=19;case 19:for(;p.have<p.nlen+p.ndist;){for(;mt=(b=p.lencode[I&(1<<p.lenbits)-1])>>>16&255,Dt=65535&b,!((ft=b>>>24)<=E);){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(Dt<16)I>>>=ft,E-=ft,p.lens[p.have++]=Dt;else{if(Dt===16){for(x=ft+2;E<x;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(I>>>=ft,E-=ft,p.have===0){S.msg="invalid bit length repeat",p.mode=30;break}c=p.lens[p.have-1],H=3+(3&I),I>>>=2,E-=2}else if(Dt===17){for(x=ft+3;E<x;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}E-=ft,c=0,H=3+(7&(I>>>=ft)),I>>>=3,E-=3}else{for(x=ft+7;E<x;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}E-=ft,c=0,H=11+(127&(I>>>=ft)),I>>>=7,E-=7}if(p.have+H>p.nlen+p.ndist){S.msg="invalid bit length repeat",p.mode=30;break}for(;H--;)p.lens[p.have++]=c}}if(p.mode===30)break;if(p.lens[256]===0){S.msg="invalid code -- missing end-of-block",p.mode=30;break}if(p.lenbits=9,A={bits:p.lenbits},R=a(l,p.lens,0,p.nlen,p.lencode,0,p.work,A),p.lenbits=A.bits,R){S.msg="invalid literal/lengths set",p.mode=30;break}if(p.distbits=6,p.distcode=p.distdyn,A={bits:p.distbits},R=a(u,p.lens,p.nlen,p.ndist,p.distcode,0,p.work,A),p.distbits=A.bits,R){S.msg="invalid distances set",p.mode=30;break}if(p.mode=20,$===6)break t;case 20:p.mode=21;case 21:if(6<=U&&258<=nt){S.next_out=lt,S.avail_out=nt,S.next_in=M,S.avail_in=U,p.hold=I,p.bits=E,s(S,G),lt=S.next_out,st=S.output,nt=S.avail_out,M=S.next_in,P=S.input,U=S.avail_in,I=p.hold,E=p.bits,p.mode===12&&(p.back=-1);break}for(p.back=0;mt=(b=p.lencode[I&(1<<p.lenbits)-1])>>>16&255,Dt=65535&b,!((ft=b>>>24)<=E);){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(mt&&(240&mt)==0){for(Tt=ft,oe=mt,ne=Dt;mt=(b=p.lencode[ne+((I&(1<<Tt+oe)-1)>>Tt)])>>>16&255,Dt=65535&b,!(Tt+(ft=b>>>24)<=E);){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}I>>>=Tt,E-=Tt,p.back+=Tt}if(I>>>=ft,E-=ft,p.back+=ft,p.length=Dt,mt===0){p.mode=26;break}if(32&mt){p.back=-1,p.mode=12;break}if(64&mt){S.msg="invalid literal/length code",p.mode=30;break}p.extra=15&mt,p.mode=22;case 22:if(p.extra){for(x=p.extra;E<x;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}p.length+=I&(1<<p.extra)-1,I>>>=p.extra,E-=p.extra,p.back+=p.extra}p.was=p.length,p.mode=23;case 23:for(;mt=(b=p.distcode[I&(1<<p.distbits)-1])>>>16&255,Dt=65535&b,!((ft=b>>>24)<=E);){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if((240&mt)==0){for(Tt=ft,oe=mt,ne=Dt;mt=(b=p.distcode[ne+((I&(1<<Tt+oe)-1)>>Tt)])>>>16&255,Dt=65535&b,!(Tt+(ft=b>>>24)<=E);){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}I>>>=Tt,E-=Tt,p.back+=Tt}if(I>>>=ft,E-=ft,p.back+=ft,64&mt){S.msg="invalid distance code",p.mode=30;break}p.offset=Dt,p.extra=15&mt,p.mode=24;case 24:if(p.extra){for(x=p.extra;E<x;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}p.offset+=I&(1<<p.extra)-1,I>>>=p.extra,E-=p.extra,p.back+=p.extra}if(p.offset>p.dmax){S.msg="invalid distance too far back",p.mode=30;break}p.mode=25;case 25:if(nt===0)break t;if(H=G-nt,p.offset>H){if((H=p.offset-H)>p.whave&&p.sane){S.msg="invalid distance too far back",p.mode=30;break}kt=H>p.wnext?(H-=p.wnext,p.wsize-H):p.wnext-H,H>p.length&&(H=p.length),zt=p.window}else zt=st,kt=lt-p.offset,H=p.length;for(nt<H&&(H=nt),nt-=H,p.length-=H;st[lt++]=zt[kt++],--H;);p.length===0&&(p.mode=21);break;case 26:if(nt===0)break t;st[lt++]=p.length,nt--,p.mode=21;break;case 27:if(p.wrap){for(;E<32;){if(U===0)break t;U--,I|=P[M++]<<E,E+=8}if(G-=nt,S.total_out+=G,p.total+=G,G&&(S.adler=p.check=p.flags?i(p.check,st,G,lt-G):o(p.check,st,G,lt-G)),G=nt,(p.flags?I:m(I))!==p.check){S.msg="incorrect data check",p.mode=30;break}E=I=0}p.mode=28;case 28:if(p.wrap&&p.flags){for(;E<32;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(I!==(4294967295&p.total)){S.msg="incorrect length check",p.mode=30;break}E=I=0}p.mode=29;case 29:R=1;break t;case 30:R=-3;break t;case 31:return-4;default:return d}return S.next_out=lt,S.avail_out=nt,S.next_in=M,S.avail_in=U,p.hold=I,p.bits=E,(p.wsize||G!==S.avail_out&&p.mode<30&&(p.mode<27||$!==4))&&Y(S,S.output,S.next_out,G-S.avail_out)?(p.mode=31,-4):(tt-=S.avail_in,G-=S.avail_out,S.total_in+=tt,S.total_out+=G,p.total+=G,p.wrap&&G&&(S.adler=p.check=p.flags?i(p.check,st,G,S.next_out-G):o(p.check,st,G,S.next_out-G)),S.data_type=p.bits+(p.last?64:0)+(p.mode===12?128:0)+(p.mode===20||p.mode===15?256:0),(tt==0&&G===0||$===4)&&R===h&&(R=-5),R)},n.inflateEnd=function(S){if(!S||!S.state)return d;var $=S.state;return $.window&&($.window=null),S.state=null,h},n.inflateGetHeader=function(S,$){var p;return S&&S.state?(2&(p=S.state).wrap)==0?d:((p.head=$).done=!1,h):d},n.inflateSetDictionary=function(S,$){var p,P=$.length;return S&&S.state?(p=S.state).wrap!==0&&p.mode!==11?d:p.mode===11&&o(1,$,P,0)!==p.check?-3:Y(S,$,P,P)?(p.mode=31,-4):(p.havedict=1,h):d},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,n){"use strict";var r=t("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(l,u,h,d,w,f,g,m){var y,v,_,k,D,C,F,N,L,Y=m.bits,S=0,$=0,p=0,P=0,st=0,M=0,lt=0,U=0,nt=0,I=0,E=null,tt=0,G=new r.Buf16(16),H=new r.Buf16(16),kt=null,zt=0;for(S=0;S<=15;S++)G[S]=0;for($=0;$<d;$++)G[u[h+$]]++;for(st=Y,P=15;1<=P&&G[P]===0;P--);if(P<st&&(st=P),P===0)return w[f++]=20971520,w[f++]=20971520,m.bits=1,0;for(p=1;p<P&&G[p]===0;p++);for(st<p&&(st=p),S=U=1;S<=15;S++)if(U<<=1,(U-=G[S])<0)return-1;if(0<U&&(l===0||P!==1))return-1;for(H[1]=0,S=1;S<15;S++)H[S+1]=H[S]+G[S];for($=0;$<d;$++)u[h+$]!==0&&(g[H[u[h+$]]++]=$);if(C=l===0?(E=kt=g,19):l===1?(E=o,tt-=257,kt=i,zt-=257,256):(E=s,kt=a,-1),S=p,D=f,lt=$=I=0,_=-1,k=(nt=1<<(M=st))-1,l===1&&852<nt||l===2&&592<nt)return 1;for(;;){for(F=S-lt,L=g[$]<C?(N=0,g[$]):g[$]>C?(N=kt[zt+g[$]],E[tt+g[$]]):(N=96,0),y=1<<S-lt,p=v=1<<M;w[D+(I>>lt)+(v-=y)]=F<<24|N<<16|L|0,v!==0;);for(y=1<<S-1;I&y;)y>>=1;if(y!==0?(I&=y-1,I+=y):I=0,$++,--G[S]==0){if(S===P)break;S=u[h+g[$]]}if(st<S&&(I&k)!==_){for(lt===0&&(lt=st),D+=p,U=1<<(M=S-lt);M+lt<P&&!((U-=G[M+lt])<=0);)M++,U<<=1;if(nt+=1<<M,l===1&&852<nt||l===2&&592<nt)return 1;w[_=I&k]=st<<24|M<<16|D-f|0}}return I!==0&&(w[D+I]=S-lt<<24|64<<16|0),m.bits=st,0}},{"../utils/common":41}],51:[function(t,e,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,e,n){"use strict";var r=t("../utils/common"),o=0,i=1;function s(b){for(var T=b.length;0<=--T;)b[T]=0}var a=0,l=29,u=256,h=u+1+l,d=30,w=19,f=2*h+1,g=15,m=16,y=7,v=256,_=16,k=17,D=18,C=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],F=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=new Array(2*(h+2));s(Y);var S=new Array(2*d);s(S);var $=new Array(512);s($);var p=new Array(256);s(p);var P=new Array(l);s(P);var st,M,lt,U=new Array(d);function nt(b,T,j,B,O){this.static_tree=b,this.extra_bits=T,this.extra_base=j,this.elems=B,this.max_length=O,this.has_stree=b&&b.length}function I(b,T){this.dyn_tree=b,this.max_code=0,this.stat_desc=T}function E(b){return b<256?$[b]:$[256+(b>>>7)]}function tt(b,T){b.pending_buf[b.pending++]=255&T,b.pending_buf[b.pending++]=T>>>8&255}function G(b,T,j){b.bi_valid>m-j?(b.bi_buf|=T<<b.bi_valid&65535,tt(b,b.bi_buf),b.bi_buf=T>>m-b.bi_valid,b.bi_valid+=j-m):(b.bi_buf|=T<<b.bi_valid&65535,b.bi_valid+=j)}function H(b,T,j){G(b,j[2*T],j[2*T+1])}function kt(b,T){for(var j=0;j|=1&b,b>>>=1,j<<=1,0<--T;);return j>>>1}function zt(b,T,j){var B,O,X=new Array(g+1),J=0;for(B=1;B<=g;B++)X[B]=J=J+j[B-1]<<1;for(O=0;O<=T;O++){var W=b[2*O+1];W!==0&&(b[2*O]=kt(X[W]++,W))}}function ft(b){var T;for(T=0;T<h;T++)b.dyn_ltree[2*T]=0;for(T=0;T<d;T++)b.dyn_dtree[2*T]=0;for(T=0;T<w;T++)b.bl_tree[2*T]=0;b.dyn_ltree[2*v]=1,b.opt_len=b.static_len=0,b.last_lit=b.matches=0}function mt(b){8<b.bi_valid?tt(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf),b.bi_buf=0,b.bi_valid=0}function Dt(b,T,j,B){var O=2*T,X=2*j;return b[O]<b[X]||b[O]===b[X]&&B[T]<=B[j]}function Tt(b,T,j){for(var B=b.heap[j],O=j<<1;O<=b.heap_len&&(O<b.heap_len&&Dt(T,b.heap[O+1],b.heap[O],b.depth)&&O++,!Dt(T,B,b.heap[O],b.depth));)b.heap[j]=b.heap[O],j=O,O<<=1;b.heap[j]=B}function oe(b,T,j){var B,O,X,J,W=0;if(b.last_lit!==0)for(;B=b.pending_buf[b.d_buf+2*W]<<8|b.pending_buf[b.d_buf+2*W+1],O=b.pending_buf[b.l_buf+W],W++,B===0?H(b,O,T):(H(b,(X=p[O])+u+1,T),(J=C[X])!==0&&G(b,O-=P[X],J),H(b,X=E(--B),j),(J=F[X])!==0&&G(b,B-=U[X],J)),W<b.last_lit;);H(b,v,T)}function ne(b,T){var j,B,O,X=T.dyn_tree,J=T.stat_desc.static_tree,W=T.stat_desc.has_stree,Q=T.stat_desc.elems,bt=-1;for(b.heap_len=0,b.heap_max=f,j=0;j<Q;j++)X[2*j]!==0?(b.heap[++b.heap_len]=bt=j,b.depth[j]=0):X[2*j+1]=0;for(;b.heap_len<2;)X[2*(O=b.heap[++b.heap_len]=bt<2?++bt:0)]=1,b.depth[O]=0,b.opt_len--,W&&(b.static_len-=J[2*O+1]);for(T.max_code=bt,j=b.heap_len>>1;1<=j;j--)Tt(b,X,j);for(O=Q;j=b.heap[1],b.heap[1]=b.heap[b.heap_len--],Tt(b,X,1),B=b.heap[1],b.heap[--b.heap_max]=j,b.heap[--b.heap_max]=B,X[2*O]=X[2*j]+X[2*B],b.depth[O]=(b.depth[j]>=b.depth[B]?b.depth[j]:b.depth[B])+1,X[2*j+1]=X[2*B+1]=O,b.heap[1]=O++,Tt(b,X,1),2<=b.heap_len;);b.heap[--b.heap_max]=b.heap[1],(function(dt,Yt){var xn,ie,vn,Ct,Hn,Dr,ge=Yt.dyn_tree,hi=Yt.max_code,za=Yt.stat_desc.static_tree,ja=Yt.stat_desc.has_stree,Ba=Yt.stat_desc.extra_bits,mi=Yt.stat_desc.extra_base,_n=Yt.stat_desc.max_length,Zn=0;for(Ct=0;Ct<=g;Ct++)dt.bl_count[Ct]=0;for(ge[2*dt.heap[dt.heap_max]+1]=0,xn=dt.heap_max+1;xn<f;xn++)_n<(Ct=ge[2*ge[2*(ie=dt.heap[xn])+1]+1]+1)&&(Ct=_n,Zn++),ge[2*ie+1]=Ct,hi<ie||(dt.bl_count[Ct]++,Hn=0,mi<=ie&&(Hn=Ba[ie-mi]),Dr=ge[2*ie],dt.opt_len+=Dr*(Ct+Hn),ja&&(dt.static_len+=Dr*(za[2*ie+1]+Hn)));if(Zn!==0){do{for(Ct=_n-1;dt.bl_count[Ct]===0;)Ct--;dt.bl_count[Ct]--,dt.bl_count[Ct+1]+=2,dt.bl_count[_n]--,Zn-=2}while(0<Zn);for(Ct=_n;Ct!==0;Ct--)for(ie=dt.bl_count[Ct];ie!==0;)hi<(vn=dt.heap[--xn])||(ge[2*vn+1]!==Ct&&(dt.opt_len+=(Ct-ge[2*vn+1])*ge[2*vn],ge[2*vn+1]=Ct),ie--)}})(b,T),zt(X,bt,b.bl_count)}function c(b,T,j){var B,O,X=-1,J=T[1],W=0,Q=7,bt=4;for(J===0&&(Q=138,bt=3),T[2*(j+1)+1]=65535,B=0;B<=j;B++)O=J,J=T[2*(B+1)+1],++W<Q&&O===J||(W<bt?b.bl_tree[2*O]+=W:O!==0?(O!==X&&b.bl_tree[2*O]++,b.bl_tree[2*_]++):W<=10?b.bl_tree[2*k]++:b.bl_tree[2*D]++,X=O,bt=(W=0)===J?(Q=138,3):O===J?(Q=6,3):(Q=7,4))}function R(b,T,j){var B,O,X=-1,J=T[1],W=0,Q=7,bt=4;for(J===0&&(Q=138,bt=3),B=0;B<=j;B++)if(O=J,J=T[2*(B+1)+1],!(++W<Q&&O===J)){if(W<bt)for(;H(b,O,b.bl_tree),--W!=0;);else O!==0?(O!==X&&(H(b,O,b.bl_tree),W--),H(b,_,b.bl_tree),G(b,W-3,2)):W<=10?(H(b,k,b.bl_tree),G(b,W-3,3)):(H(b,D,b.bl_tree),G(b,W-11,7));X=O,bt=(W=0)===J?(Q=138,3):O===J?(Q=6,3):(Q=7,4)}}s(U);var A=!1;function x(b,T,j,B){G(b,(a<<1)+(B?1:0),3),(function(O,X,J,W){mt(O),W&&(tt(O,J),tt(O,~J)),r.arraySet(O.pending_buf,O.window,X,J,O.pending),O.pending+=J})(b,T,j,!0)}n._tr_init=function(b){A||((function(){var T,j,B,O,X,J=new Array(g+1);for(O=B=0;O<l-1;O++)for(P[O]=B,T=0;T<1<<C[O];T++)p[B++]=O;for(p[B-1]=O,O=X=0;O<16;O++)for(U[O]=X,T=0;T<1<<F[O];T++)$[X++]=O;for(X>>=7;O<d;O++)for(U[O]=X<<7,T=0;T<1<<F[O]-7;T++)$[256+X++]=O;for(j=0;j<=g;j++)J[j]=0;for(T=0;T<=143;)Y[2*T+1]=8,T++,J[8]++;for(;T<=255;)Y[2*T+1]=9,T++,J[9]++;for(;T<=279;)Y[2*T+1]=7,T++,J[7]++;for(;T<=287;)Y[2*T+1]=8,T++,J[8]++;for(zt(Y,h+1,J),T=0;T<d;T++)S[2*T+1]=5,S[2*T]=kt(T,5);st=new nt(Y,C,u+1,h,g),M=new nt(S,F,0,d,g),lt=new nt(new Array(0),N,0,w,y)})(),A=!0),b.l_desc=new I(b.dyn_ltree,st),b.d_desc=new I(b.dyn_dtree,M),b.bl_desc=new I(b.bl_tree,lt),b.bi_buf=0,b.bi_valid=0,ft(b)},n._tr_stored_block=x,n._tr_flush_block=function(b,T,j,B){var O,X,J=0;0<b.level?(b.strm.data_type===2&&(b.strm.data_type=(function(W){var Q,bt=4093624447;for(Q=0;Q<=31;Q++,bt>>>=1)if(1&bt&&W.dyn_ltree[2*Q]!==0)return o;if(W.dyn_ltree[18]!==0||W.dyn_ltree[20]!==0||W.dyn_ltree[26]!==0)return i;for(Q=32;Q<u;Q++)if(W.dyn_ltree[2*Q]!==0)return i;return o})(b)),ne(b,b.l_desc),ne(b,b.d_desc),J=(function(W){var Q;for(c(W,W.dyn_ltree,W.l_desc.max_code),c(W,W.dyn_dtree,W.d_desc.max_code),ne(W,W.bl_desc),Q=w-1;3<=Q&&W.bl_tree[2*L[Q]+1]===0;Q--);return W.opt_len+=3*(Q+1)+5+5+4,Q})(b),O=b.opt_len+3+7>>>3,(X=b.static_len+3+7>>>3)<=O&&(O=X)):O=X=j+5,j+4<=O&&T!==-1?x(b,T,j,B):b.strategy===4||X===O?(G(b,2+(B?1:0),3),oe(b,Y,S)):(G(b,4+(B?1:0),3),(function(W,Q,bt,dt){var Yt;for(G(W,Q-257,5),G(W,bt-1,5),G(W,dt-4,4),Yt=0;Yt<dt;Yt++)G(W,W.bl_tree[2*L[Yt]+1],3);R(W,W.dyn_ltree,Q-1),R(W,W.dyn_dtree,bt-1)})(b,b.l_desc.max_code+1,b.d_desc.max_code+1,J+1),oe(b,b.dyn_ltree,b.dyn_dtree)),ft(b),B&&mt(b)},n._tr_tally=function(b,T,j){return b.pending_buf[b.d_buf+2*b.last_lit]=T>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&T,b.pending_buf[b.l_buf+b.last_lit]=255&j,b.last_lit++,T===0?b.dyn_ltree[2*j]++:(b.matches++,T--,b.dyn_ltree[2*(p[j]+u+1)]++,b.dyn_dtree[2*E(T)]++),b.last_lit===b.lit_bufsize-1},n._tr_align=function(b){G(b,2,3),H(b,v,Y),(function(T){T.bi_valid===16?(tt(T,T.bi_buf),T.bi_buf=0,T.bi_valid=0):8<=T.bi_valid&&(T.pending_buf[T.pending++]=255&T.bi_buf,T.bi_buf>>=8,T.bi_valid-=8)})(b)}},{"../utils/common":41}],53:[function(t,e,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,n){(function(r){(function(o,i){"use strict";if(!o.setImmediate){var s,a,l,u,h=1,d={},w=!1,f=o.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(o);g=g&&g.setTimeout?g:o,s={}.toString.call(o.process)==="[object process]"?function(_){process.nextTick(function(){y(_)})}:(function(){if(o.postMessage&&!o.importScripts){var _=!0,k=o.onmessage;return o.onmessage=function(){_=!1},o.postMessage("","*"),o.onmessage=k,_}})()?(u="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",v,!1):o.attachEvent("onmessage",v),function(_){o.postMessage(u+_,"*")}):o.MessageChannel?((l=new MessageChannel).port1.onmessage=function(_){y(_.data)},function(_){l.port2.postMessage(_)}):f&&"onreadystatechange"in f.createElement("script")?(a=f.documentElement,function(_){var k=f.createElement("script");k.onreadystatechange=function(){y(_),k.onreadystatechange=null,a.removeChild(k),k=null},a.appendChild(k)}):function(_){setTimeout(y,0,_)},g.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var k=new Array(arguments.length-1),D=0;D<k.length;D++)k[D]=arguments[D+1];var C={callback:_,args:k};return d[h]=C,s(h),h++},g.clearImmediate=m}function m(_){delete d[_]}function y(_){if(w)setTimeout(y,0,_);else{var k=d[_];if(k){w=!0;try{(function(D){var C=D.callback,F=D.args;switch(F.length){case 0:C();break;case 1:C(F[0]);break;case 2:C(F[0],F[1]);break;case 3:C(F[0],F[1],F[2]);break;default:C.apply(i,F)}})(k)}finally{m(_),w=!1}}}}function v(_){_.source===o&&typeof _.data=="string"&&_.data.indexOf(u)===0&&y(+_.data.slice(u.length))}})(typeof self>"u"?r===void 0?this:r:self)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})});var rd={};Za(rd,{Gaps:()=>Cn,applyPptModelToOnlyOfficePptDeck:()=>pi,applyPptTextMutationToOnlyOfficeContent:()=>$a,attrStr:()=>rt,buildDefaultWordParts:()=>no,buildFontTableXml:()=>Qr,buildNumberingXml:()=>Vi,buildSettingsXml:()=>to,buildStylesXml:()=>Qn,buildThemeXml:()=>Kr,buildWebSettingsXml:()=>eo,colorToJson:()=>ke,colorToOoxml:()=>$t,esc:()=>z,extraAttr:()=>et,flatOpcToOnlyOfficeWriteback:()=>Oa,highlightToJson:()=>yi,highlightToOoxml:()=>Ge,jsonToFlatOpc:()=>ro,jsonToFlatOpcWithStyles:()=>Qi,jsonToOoxml:()=>qn,kid:()=>ht,kidsOf:()=>Jt,onlyKeys:()=>je,onlyOfficePptContentToTextBody:()=>Ir,onlyOfficePptDeckToPptModel:()=>di,ooOutlineToOoxml:()=>Jr,ooxmlToJson:()=>Ve,parseXml:()=>Et,readExtra:()=>Pt,replaceOnlyOfficePptContentText:()=>ci,setOnlyOfficePptContentParagraphs:()=>Xn,setOnlyOfficePptContentRunStyle:()=>li,setOnlyOfficePptContentStyle:()=>Wn,setOnlyOfficePptContentText:()=>Un,styleToXml:()=>Vr,unesc:()=>Jn,updateOnlyOfficePptDeckTextShape:()=>Fa,withPackageLongTailParts:()=>ls});function Et(t){let e=0,n=t.length;function r(){for(;e<n&&/\s/.test(t[e]);)e++;if(t[e]!=="<")return null;if(t.startsWith("<?",e)||t.startsWith("<!",e))return e=t.indexOf(">",e)+1,r();e++;let o="";for(;e<n&&!/[\s/>]/.test(t[e]);)o+=t[e++];let i={};for(;e<n&&t[e]!==">"&&t[e]!=="/";){for(;/\s/.test(t[e]);)e++;if(t[e]==="/"||t[e]===">")break;let a="";for(;e<n&&!/[\s=/>]/.test(t[e]);)a+=t[e++];for(;/\s/.test(t[e]);)e++;let l="";if(t[e]==="="){for(e++;/\s/.test(t[e]);)e++;let u=t[e++];for(;e<n&&t[e]!==u;)l+=t[e++];e++}i[a]=Jn(l)}if(t[e]==="/")return e+=2,{tag:o,attrs:i,kids:[]};e++;let s=[];for(;e<n;){if(t.startsWith("</",e)){e=t.indexOf(">",e)+1;break}if(t[e]==="<"){let a=r();a&&s.push(a)}else{let a="";for(;e<n&&t[e]!=="<";)a+=t[e++];a&&s.push({text:Jn(a)})}}return{tag:o,attrs:i,kids:s}}for(;e<n&&t[e]!=="<";)e++;return r()}var ht=(t,e)=>t&&t.kids?t.kids.find(n=>n.tag===e):void 0,Jt=(t,e)=>t&&t.kids?t.kids.filter(n=>n.tag===e):[],z=t=>String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),Jn=t=>String(t).replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&");function rt(t){let e="";for(let n of Object.keys(t))t[n]!=null&&(e+=` ${n}="${z(t[n])}"`);return e}var $r=t=>(t&255).toString(16).padStart(2,"0").toUpperCase(),$t=t=>!t||t.auto?"auto":$r(t.r)+$r(t.g)+$r(t.b),ke=t=>!t||t==="auto"?{auto:!0,r:0,g:0,b:0}:{auto:!1,r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)},qt=(t,e)=>{let n=e&&e.auto&&(e.r||e.g||e.b)?`${e.r},${e.g},${e.b}`:null;return n?` ${t}="${n}"`:""},kn=(t,e)=>{if(e&&t&&t.auto){let n=String(e).split(",").map(Number);t.r=n[0],t.g=n[1],t.b=n[2]}return t},Vn={"000000":"black","0000FF":"blue","00FFFF":"cyan","000080":"darkBlue","008080":"darkCyan",808080:"darkGray","008000":"darkGreen",800080:"darkMagenta",8e5:"darkRed",808e3:"darkYellow","00FF00":"green",C0C0C0:"lightGray",FF00FF:"magenta",FF0000:"red",FFFFFF:"white",FFFF00:"yellow"},wi=Object.fromEntries(Object.entries(Vn).map(([t,e])=>[e,t]));function Ge(t){if(!t||t.auto)return null;let e=$t(t);if(Vn[e])return Vn[e];let n="none",r=1/0;for(let[o,i]of Object.entries(Vn)){let s=parseInt(o.slice(0,2),16)-t.r,a=parseInt(o.slice(2,4),16)-t.g,l=parseInt(o.slice(4,6),16)-t.b,u=s*s+a*a+l*l;u<r&&(r=u,n=i)}return n}function yi(t){if(!(!t||t==="none"))return wi[t]?{auto:!1,...ke(wi[t])}:void 0}var bi=new Set(["type","bFromDocument","bPresentation"]);function et(t,e,n="oo:x"){if(!t||typeof t!="object")return"";let r=e?new Set([...e,...bi]):bi,o={},i=!1;for(let s of Object.keys(t))r.has(s)||(o[s]=t[s],i=!0);return i?` ${n}="${z(JSON.stringify(o))}"`:""}function Pt(t,e="oo:x"){let n=t&&t.attrs?t.attrs[e]:null;if(!n)return{};try{return JSON.parse(n)}catch{return{}}}function je(t,e){let n=new Set(e);for(let r of Object.keys(t))if(!n.has(r))return!1;return!0}function Br(t){if(!t)return"";let e=t.fill?` w:fill="${$t(t.fill)}"${qt("oo:frgb",t.fill)}`:"";return`<w:shd w:val="${t.val||"clear"}" w:color="${$t(t.color)}"${qt("oo:crgb",t.color)}${e}${et(t,["val","color","fill"])}/>`}function Va(t){if(!t)return"";let e="";t.pStyle!=null&&(e+=`<w:pStyle w:val="${z(t.pStyle)}"/>`);for(let n of["keepNext","keepLines","pageBreakBefore","widowControl","contextualSpacing","suppressLineNumbers"])t[n]===!0&&(e+=`<w:${n}/>`);if(e+=Br(t.shd),t.spacing){let n=t.spacing,r={};n.before!=null&&(r["w:before"]=n.before),n.after!=null&&(r["w:after"]=n.after),n.line!=null&&(r["w:line"]=n.line),n.lineRule!=null&&(r["w:lineRule"]=n.lineRule),n.beforeAutoSpacing!=null&&(r["w:beforeAutospacing"]=n.beforeAutoSpacing==="off"?0:1),n.afterAutoSpacing!=null&&(r["w:afterAutospacing"]=n.afterAutoSpacing==="off"?0:1),e+=`<w:spacing${rt(r)}/>`}if(t.ind){let n=t.ind,r={};n.left!=null&&(r["w:left"]=n.left),n.right!=null&&(r["w:right"]=n.right),n.firstLine!=null&&(r["w:firstLine"]=n.firstLine),e+=`<w:ind${rt(r)}/>`}return t.jc!=null&&(e+=`<w:jc w:val="${t.jc}"/>`),e}function Ya(t){let e="";if(t.rFonts){let r=t.rFonts,o={};for(let i of["ascii","hAnsi","eastAsia","cs","hint","asciiTheme","hAnsiTheme","eastAsiaTheme","cstheme"])r[i]!=null&&(o["w:"+i]=r[i]);e+=`<w:rFonts${rt(o)}/>`}let n=(r,o)=>o===!0?`<w:${r}/>`:o===!1?`<w:${r} w:val="false"/>`:"";if(e+=n("b",t.b)+n("bCs",t.bCs)+n("i",t.i)+n("iCs",t.iCs),t.color&&(e+=`<w:color w:val="${$t(t.color)}"${qt("oo:rgb",t.color)}/>`),t.spacing!=null&&(e+=`<w:spacing w:val="${t.spacing}"/>`),t.sz!=null&&(e+=`<w:sz w:val="${t.sz}"/>`),t.szCs!=null&&(e+=`<w:szCs w:val="${t.szCs}"/>`),t.highlight){let r=Ge(t.highlight);r&&(e+=`<w:highlight w:val="${r}"/>`)}if(t.vertAlign!=null&&(e+=`<w:vertAlign w:val="${typeof t.vertAlign=="object"?t.vertAlign.val||t.vertAlign.value:t.vertAlign}"/>`),e+=Br(t.shd),t.lang){let r={};for(let o of["val","eastAsia","bidi"])t.lang[o]!=null&&(r["w:"+o]=t.lang[o]);e+=`<w:lang${rt(r)}/>`}return e}function Ti(t){if(!t)return"";let e=Ya(t),n=et(t);return e||n?`<w:rPr${n}>${e}</w:rPr>`:""}function qa(t){let e=t?.docPr||{},n={id:e.id??1,name:e.name??"Picture"};return e.descr!=null&&(n.descr=e.descr),e.title!=null&&(n.title=e.title),rt(n)}function Ka(t){let e=t?.srcRect;if(!e||typeof e!="object")return"";let n={};for(let r of["l","t","r","b"])e[r]!=null&&(n[r]=e[r]);return Object.keys(n).length?`<a:srcRect${rt(n)}/>`:""}function Ci(t){let e=t?.prstGeom?.prst??t?.custGeom?.preset??t?.geometry?.prst??t?.geometry?.preset??t?.prstGeom;return`<a:prstGeom prst="${z(typeof e=="string"?e:"rect")}"><a:avLst/></a:prstGeom>`}function xi(t){if(!t||typeof t!="object")return"";let e={};for(let n of["l","t","r","b"])t[n]!=null&&(e[n]=t[n]);return Object.keys(e).length?`<wp:effectExtent${rt(e)}/>`:""}function vi(t,e,n){if(!e||typeof e!="object")return`<wp:${t} relativeFrom="${n}"><wp:posOffset>0</wp:posOffset></wp:${t}>`;let r=e.relativeFrom||n,o=e.align!=null?`<wp:align>${z(e.align)}</wp:align>`:`<wp:posOffset>${z(e.posOffset??e.offset??0)}</wp:posOffset>`;return`<wp:${t} relativeFrom="${z(r)}">${o}</wp:${t}>`}function Qa(t){let e=t?.wrapType||t?.wrap?.type||t?.wrappingType,n=t?.wrapText||t?.wrap?.wrapText||"bothSides";if(e==="none")return"<wp:wrapNone/>";if(e==="topAndBottom"||e==="topBottom")return"<wp:wrapTopAndBottom/>";if(e==="tight")return`<wp:wrapTight wrapText="${z(n)}"><wp:wrapPolygon edited="0"><wp:start x="0" y="0"/></wp:wrapPolygon></wp:wrapTight>`;if(e==="through"){let r=se(t?.wrapThrough?.edited??t?.wrap?.edited??!1);return`<wp:wrapThrough wrapText="${z(n)}"><wp:wrapPolygon edited="${z(r)}"><wp:start x="0" y="0"/></wp:wrapPolygon></wp:wrapThrough>`}return`<wp:wrapSquare wrapText="${z(n)}"/>`}function Rr(t,e,n,r,o){let i={distT:t?.distT??0,distB:t?.distB??0,distL:t?.distL??0,distR:t?.distR??0};if(t?.drawingType!=="anchor"&&t?.inline!==!1&&t?.anchor!==!0)return`<wp:inline${rt(i)}><wp:extent cx="${z(e)}" cy="${z(n)}"/>`+xi(t?.effectExtent)+`<wp:docPr${r}/>`+o+"</wp:inline>";let s=t?.simplePos&&typeof t.simplePos=="object"?t.simplePos:{},a={...i,simplePos:se(t?.simplePos===!0||t?.simplePos?.enabled===!0),relativeHeight:t?.relativeHeight??0,behindDoc:se(t?.behindDoc??!1),locked:se(t?.locked??!1),layoutInCell:se(t?.layoutInCell??!0),allowOverlap:se(t?.allowOverlap??!0)};return`<wp:anchor${rt(a)}><wp:simplePos x="${z(s.x??0)}" y="${z(s.y??0)}"/>`+vi("positionH",t?.positionH,"column")+vi("positionV",t?.positionV,"paragraph")+`<wp:extent cx="${z(e)}" cy="${z(n)}"/>`+xi(t?.effectExtent)+Qa(t)+`<wp:docPr${r}/><wp:cNvGraphicFramePr/>`+o+"</wp:anchor>"}function tl(t){let e=t?.graphic,n=e?.blipFill||{},r=e?.spPr||{},o=n.rasterImageId,i=t?.extent?.cx??r?.xfrm?.ext?.cx??1,s=t?.extent?.cy??r?.xfrm?.ext?.cy??1,a=qa(t);if((e?.type==="shape"||e?.type==="connectShape")&&!o){let u=t?.content||e?.content,d=(Array.isArray(u?.content)?u.content:[]).map(Ni).join(""),w=`<a:graphic><a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"><wps:wsp>${Di(e)}<wps:spPr>${Ai(t,i,s)}</wps:spPr>${Fr(d,"wps")}</wps:wsp></a:graphicData></a:graphic>`;return`<w:drawing>${Rr(t,i,s,a,w)}</w:drawing>`}if(!o||!String(o).startsWith("rId"))return null;let l=`<a:graphic><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:pic><pic:nvPicPr><pic:cNvPr${a}/><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip r:embed="${z(o)}"/>${Ka(n)}<a:stretch><a:fillRect/></a:stretch></pic:blipFill><pic:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="${z(i)}" cy="${z(s)}"/></a:xfrm>${Ci(r)}</pic:spPr></pic:pic></a:graphicData></a:graphic>`;return`<w:drawing>${Rr(t,i,s,a,l)}</w:drawing>`}function _i(t,e){let n=e.customMarkFollows===!0?' w:customMarkFollows="1"':"";return`<w:${t} w:id="${z(e.footnote)}"${n}/>`}function el(t){if(typeof t=="string")return`<w:t xml:space="preserve">${z(t)}</w:t>`;if(t&&t.type==="break"&&je(t,["type","breakType"])&&(t.breakType==="page"||t.breakType==="column"))return`<w:br w:type="${t.breakType}"/>`;if(t&&t.type==="tab"&&je(t,["type"]))return"<w:tab/>";if(t&&t.type==="separator"&&je(t,["type"]))return"<w:separator/>";if(t&&t.type==="continuationSeparator"&&je(t,["type"]))return"<w:continuationSeparator/>";if(t&&t.type==="footnoteRef"&&t.footnote!=null)return _i("footnoteReference",t);if(t&&t.type==="endnoteRef"&&t.footnote!=null)return _i("endnoteReference",t);if(t&&t.type==="paraDrawing"){let e=tl(t);if(e)return e}return`<oo:ci oo:v="${z(JSON.stringify(t))}"/>`}function Oi(t){let e=(t.content||[]).map(el).join("");return`<w:r${et(t,["rPr","content","footnotes","endnotes"])}>${Ti(t.rPr)}${e}</w:r>`}function nl(t){let e=[],n=t.rId||t.id||t["r:id"];n?e.push(`r:id="${z(n)}"`):t.value&&e.push(`w:anchor="${z(String(t.value).replace(/^#/,""))}"`),t.tooltip&&e.push(`w:tooltip="${z(t.tooltip)}"`);let r=(t.content||[]).map(o=>o?.type==="run"?Oi(o):`<oo:pi oo:v="${z(JSON.stringify(o))}"/>`).join("");return`<w:hyperlink${e.length?" "+e.join(" "):""}>${r}</w:hyperlink>`}function rl(t){return t.type==="endRun"?"":t.type==="run"?Oi(t):t.type==="hyperlink"?nl(t):t.type==="commentRangeStart"&&t.id!=null?`<w:commentRangeStart w:id="${z(t.id)}"/>`:t.type==="commentRangeEnd"&&t.id!=null?`<w:commentRangeEnd w:id="${z(t.id)}"/><w:r><w:commentReference w:id="${z(t.id)}"/></w:r>`:t.type==="commentReference"&&t.id!=null?`<w:r><w:commentReference w:id="${z(t.id)}"/></w:r>`:`<oo:pi oo:v="${z(JSON.stringify(t))}"/>`}function ol(t){let e=Va(t.pPr)+Ti(t.rPr),n=et(t.pPr),r=e||n?`<w:pPr${n}>${e}</w:pPr>`:"",o=et(t,["pPr","rPr","content"]),i=(t.content||[]).find(a=>a.type==="endRun"),s=i?et(i,["rPr","content"],"oo:er"):"";return`<w:p${o}${s}>${r}${(t.content||[]).map(rl).join("")}</w:p>`}function Tn(t){return(t||[]).map(e=>e.type==="table"?fl(e):e.type==="paragraph"?ol(e):`<oo:blk oo:v="${z(JSON.stringify(e))}"/>`).join("")}function il(t,e){if(!e)return"";let n={},r=e.val!=null?e.val:e.value;return r!=null&&(n["w:val"]=r),e.sz!=null&&(n["w:sz"]=e.sz),e.space!=null&&(n["w:space"]=e.space),e.color&&(n["w:color"]=$t(e.color)),`<w:${t}${rt(n)}${e.color?qt("oo:rgb",e.color):""}${et(e,["color","sz","space","value","val"])}/>`}var sl=["top","left","bottom","right","insideH","insideV","start","end","between","bar"];function Ei(t,e){if(!e)return"";let n="";for(let r of sl)e[r]&&(n+=il(r,e[r]));return Object.keys(e).length?`<w:${t}>${n}</w:${t}>`:`<w:${t}/>`}function Lr(t,e){if(!e)return"";let n={};e.type!=null&&(n["w:type"]=e.type);let r=e.w!=null?e.w:e.value;return r!=null&&(n["w:w"]=r),`<w:${t}${rt(n)}/>`}function al(t,e){if(!e)return"";let n="";for(let r of["top","left","bottom","right","start","end"])e[r]&&(n+=Lr(r,e[r]));return n?`<w:${t}>${n}</w:${t}>`:""}function ll(t){if(!t)return"<w:tblPr/>";let e="";if(t.tblStyle!=null&&(e+=`<w:tblStyle w:val="${z(t.tblStyle)}"/>`),e+=Lr("tblW",t.tblW),t.jc!=null&&(e+=`<w:jc w:val="${t.jc}"/>`),e+=Ei("tblBorders",t.tblBorders),e+=al("tblCellMar",t.tblCellMar),t.tblLayout!=null&&(e+=`<w:tblLayout w:type="${typeof t.tblLayout=="object"?t.tblLayout.type:t.tblLayout}"/>`),t.tblLook!=null&&typeof t.tblLook=="object"){let n={};for(let r of Object.keys(t.tblLook))r!=="type"&&(n["w:"+r]=t.tblLook[r]===!0?1:t.tblLook[r]===!1?0:t.tblLook[r]);e+=`<w:tblLook${rt(n)}/>`}return`<w:tblPr${et(t)}>${e}</w:tblPr>`}function cl(t){let e=t.tcPr||{},n="";n+=Lr("tcW",e.tcW),e.gridSpan!=null&&(n+=`<w:gridSpan w:val="${e.gridSpan}"/>`),e.vMerge!=null&&(n+=`<w:vMerge${e.vMerge&&e.vMerge!=="continue"?` w:val="${e.vMerge}"`:""}/>`),e.tcBorders&&(n+=Ei("tcBorders",e.tcBorders)),n+=Br(e.shd),e.vAlign!=null&&(n+=`<w:vAlign w:val="${typeof e.vAlign=="object"?e.vAlign.val||e.vAlign.value:e.vAlign}"/>`);let r=`<w:tcPr${et(e)}>${n}</w:tcPr>`,o=t.content&&Array.isArray(t.content.content)?t.content.content:Array.isArray(t.content)?t.content:[],i=Tn(o)||"<w:p/>";return`<w:tc${et(t,["tcPr","content"])}>${r}${i}</w:tc>`}function ul(t){let e=t.trPr||{},n="";e.tblHeader&&(n+="<w:tblHeader/>"),e.jc!=null&&(n+=`<w:jc w:val="${e.jc}"/>`),e.trHeight&&(n+=`<w:trHeight${rt({"w:val":e.trHeight.value!=null?e.trHeight.value:e.trHeight.val,"w:hRule":e.trHeight.hRule})}/>`);let r=n||et(e)?`<w:trPr${et(e)}>${n}</w:trPr>`:"",o=Array.isArray(t.content)?t.content:[];return`<w:tr${et(t,["trPr","content"])}>${r}${o.map(cl).join("")}</w:tr>`}function fl(t){let e=(t.tblGrid||[]).map(o=>`<w:gridCol w:w="${o.w}"/>`).join(""),n=Array.isArray(t.content)?t.content:[];return`<w:tbl${et(t,["tblPr","tblGrid","content"])}>${ll(t.tblPr)}<w:tblGrid>${e}</w:tblGrid>${n.map(ul).join("")}</w:tbl>`}function Ni(t){let e=[],n=r=>{typeof r=="string"?e.push(r):Array.isArray(r)?r.forEach(n):r&&typeof r=="object"&&(r.type==="run"||r.type==="paragraph")&&n(r.content)};return n(t),e.join("")}function Fr(t,e){return t?`<${e}:txbx><w:txbxContent><w:p><w:r><w:t xml:space="preserve">${z(t)}</w:t></w:r></w:p></w:txbxContent></${e}:txbx>`:""}function dl(t){return t?.graphic?.type!=="image"&&!t?.graphic?.blipFill?.rasterImageId}function Pr(t){let e=Number(t);return Number.isFinite(e)?Math.max(0,e/12700).toFixed(2).replace(/\.00$/,""):null}function zr(t){let e=t?.color?.color?.rgba??t?.fill?.color?.color?.rgba??t?.fill?.fill?.color?.color?.rgba??t?.rgba??t?.color?.rgba??t?.fill?.color?.rgba??t?.fill?.fill?.color?.rgba;return!e||typeof e!="object"?null:{auto:!1,r:e.red??e.r??0,g:e.green??e.g??0,b:e.blue??e.b??0}}function jr(t){return t?.type??t?.fill?.type??t?.fill?.fill?.type}function Ii(t){if(jr(t)==="noFill")return"<a:noFill/>";let e=zr(t);return e?`<a:solidFill><a:srgbClr val="${$t(e)}"/></a:solidFill>`:""}function pl(t){if(!t||typeof t!="object")return"";let e={};t.w!=null&&(e.w=t.w),t.cap!=null&&(e.cap=t.cap),t.cmpd!=null&&(e.cmpd=t.cmpd);let n=Ii(t.fill),r=t.prstDash?`<a:prstDash val="${z(t.prstDash)}"/>`:"",o=t.lineJoin?.type==="round"?"<a:round/>":"";return`<a:ln${rt(e)}>${n}${r}${o}</a:ln>`}function Ai(t,e,n){let r=t?.graphic?.spPr??{},o=r.xfrm??{},i={};for(let l of["flipH","flipV","rot"])o[l]!=null&&(i[l]=se(o[l]));let s=o.off??{},a=o.ext??{};return`<a:xfrm${rt(i)}><a:off x="${z(s.x??0)}" y="${z(s.y??0)}"/><a:ext cx="${z(a.cx??e)}" cy="${z(a.cy??n)}"/></a:xfrm>`+Ci(r)+Ii(r.fill)+pl(r.ln)}function Di(t){if(t?.nvCxnSpPr){let e=t.nvCxnSpPr?.cNvCxnSpPr?.cxnSpLocks??{};return`<wps:cNvCnPr><a:cxnSpLocks${rt({noChangeShapeType:e.noChangeShapeType==null?void 0:se(e.noChangeShapeType)})}/></wps:cNvCnPr>`}return"<wps:cNvSpPr/>"}function hl(t,e,n,r){let o=Pr(e),i=Pr(n),s={id:t};o!=null&&i!=null&&(s.style=`width:${o}pt;height:${i}pt`);let a=r?.fill;if(jr(a)==="noFill")s.filled="f";else{let u=zr(a);u&&(s.fillcolor=`#${$t(u)}`)}let l=r?.ln;if(jr(l?.fill)==="noFill")s.stroked="f";else{let u=zr(l?.fill);u&&(s.strokecolor=`#${$t(u)}`);let h=Pr(l?.w);h!=null&&(s.strokeweight=`${h}pt`)}return rt(s)}function ml(t,e){let n=t&&(t.content||t.graphic?.content),o=(Array.isArray(n?.content)?n.content:[]).map(Ni).join(""),i=t?.docPr?.id??e+1,s=t?.docPr?.name??`Drawing ${e+1}`,a=t?.extent?.cx??t?.graphic?.spPr?.xfrm?.ext?.cx??1,l=t?.extent?.cy??t?.graphic?.spPr?.xfrm?.ext?.cy??1,u=Fr(o,"wps"),h=Fr(o,"v"),d=`<a:graphic><a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"><wps:wsp>${Di(t?.graphic)}<wps:spPr>${Ai(t,a,l)}</wps:spPr>${u}</wps:wsp></a:graphicData></a:graphic>`;return`<w:p oo:drawingObject="${z(e)}"><w:r><w:drawing>${Rr(t,a,l,rt({id:i,name:s}),d)}</w:drawing><w:pict><v:shape${hl(s,a,l,t?.graphic?.spPr)}>${h}</v:shape></w:pict></w:r></w:p>`}function gl(t){let e=Array.isArray(t?.drawingObjects)?t.drawingObjects:[],n=new Set,r=o=>{if(!(!o||typeof o!="object")){if(o.type==="paraDrawing"&&o.docPr?.id!=null&&n.add(String(o.docPr.id)),Array.isArray(o)){o.forEach(r);return}Object.values(o).forEach(r)}};return r(t?.content),e.filter(o=>dl(o)&&(o?.docPr?.id==null||!n.has(String(o.docPr.id)))).map((o,i)=>ml(o,i)).join("")}function se(t){return t===!0?1:t===!1?0:t}function Si(t,e){if(!e||typeof e!="object")return"";let n="";for(let r of["first","default","even"]){let o=e[r];if(!o)continue;let i=typeof o=="string"?o:o.id||o.rId||o["r:id"];i&&(n+=`<w:${t} w:type="${r}" r:id="${z(i)}"/>`)}return n}function wl(t,e){if(!e)return"";let n={},r=e.val!=null?e.val:e.value;return r!=null&&(n["w:val"]=r),e.sz!=null&&(n["w:sz"]=e.sz),e.space!=null&&(n["w:space"]=e.space),e.color&&(n["w:color"]=$t(e.color)),`<w:${t}${rt(n)}${e.color?qt("oo:rgb",e.color):""}${et(e,["color","sz","space","value","val"])}/>`}function yl(t){return t&&typeof t=="object"?t.val??t.value??t.type:t}function Yn(t,e){let n=yl(e);return n==null?"":`<w:${t} w:val="${z(String(n))}"/>`}function ki(t,e){if(!e||typeof e!="object"||!Object.keys(e).length)return"";let n="";return n+=Yn("pos",e.pos??e.position),n+=Yn("numFmt",e.numFmt),n+=Yn("numStart",e.numStart??e.start),n+=Yn("numRestart",e.numRestart??e.restart),`<w:${t}${et(e,["pos","position","numFmt","numStart","start","numRestart","restart"])}>${n}</w:${t}>`}function bl(t){if(!t||typeof t!="object")return"";let e="";if(e+=Si("headerReference",t.headerReference),e+=Si("footerReference",t.footerReference),e+=ki("footnotePr",t.footnotePr),e+=ki("endnotePr",t.endnotePr),t.type!=null&&(e+=`<w:type w:val="${z(t.type)}"/>`),t.pgSz){let n=t.pgSz,r={};n.w!=null&&(r["w:w"]=n.w),n.h!=null&&(r["w:h"]=n.h);let o=n.orient??n.orinet;o!=null&&(r["w:orient"]=o),e+=`<w:pgSz${rt(r)}${et(n,["w","h","orient","orinet"])}/>`}if(t.pgMar){let n=t.pgMar,r={};for(let o of["top","right","bottom","left","header","footer","gutter"])n[o]!=null&&(r["w:"+o]=n[o]);e+=`<w:pgMar${rt(r)}${et(n,["top","right","bottom","left","header","footer","gutter"])}/>`}if(t.pgBorders){let n=t.pgBorders,r="";for(let i of["top","left","bottom","right"])r+=wl(i,n[i]);let o={};for(let i of["display","offsetFrom","zOrder"])n[i]!=null&&(o["w:"+i]=n[i]);e+=`<w:pgBorders${rt(o)}${et(n,["top","left","bottom","right","display","offsetFrom","zOrder"])}>${r}</w:pgBorders>`}if(t.cols){let n=t.cols,r={};for(let i of["equalWidth","num","sep","space"])n[i]!=null&&(r["w:"+i]=se(n[i]));let o=Array.isArray(n.col)?n.col.map(i=>{let s={};for(let[a,l]of Object.entries(i))s["w:"+a]=se(l);return`<w:col${rt(s)}/>`}).join(""):"";e+=`<w:cols${rt(r)}${et(n,["col","equalWidth","num","sep","space"])}>${o}</w:cols>`}if(t.titlePg&&(e+="<w:titlePg/>"),t.pgNumType){let n=t.pgNumType,r={};for(let o of["start","fmt","chapStyle","chapSep"])n[o]!=null&&n[o]!==-1&&(r["w:"+o]=n[o]);(Object.keys(r).length||Object.keys(n).some(o=>!["start","fmt","chapStyle","chapSep"].includes(o)))&&(e+=`<w:pgNumType${rt(r)}${et(n,["start","fmt","chapStyle","chapSep"])}/>`)}return t.rtlGutter&&(e+="<w:rtlGutter/>"),`<w:sectPr${et(t,["headerReference","footerReference","footnotePr","endnotePr","type","pgSz","pgMar","pgBorders","cols","titlePg","pgNumType","rtlGutter"])}>${e}</w:sectPr>`}function qn(t){let e=gl(t)+Tn(t.content)+bl(t.sectPr||t.sectionPr);return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:oo="urn:coco:oojson"><w:body${et(t,["content","sectPr","sectionPr","drawingObjects","commentMetadata","theme","styles","numbering"])}>${e}</w:body></w:document>`}var xl=new Set(["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"]);function Rt(t,e){if(!t||typeof t!="object")return null;if(t.tag===e)return t;for(let n of t.kids||[]){let r=Rt(n,e);if(r)return r}return null}function Ri(t){return!t||typeof t!="object"?"":t.text!=null?String(t.text):(t.kids||[]).map(Ri).join("")}function Nt(t){let e=Number(t);return Number.isFinite(e)?e:void 0}function Te(t,e=!1){return t==null||t===""?e:["1","true","t","on"].includes(String(t).toLowerCase())}function vl(t,e){let n=Rt(t,e);return{x:Nt(n?.attrs?.x)??0,y:Nt(n?.attrs?.y)??0}}function $i(t,e){let n=Rt(t,e);return{cx:Nt(n?.attrs?.cx)??0,cy:Nt(n?.attrs?.cy)??0}}function Pi(t,e,n){let r=Rt(t,e);return{relativeFrom:String(r?.attrs?.relativeFrom??n),posOffset:Nt(Ri(Rt(r,"wp:posOffset")))??0,percent:!1}}function _l(t){let e=String(Rt(t,"a:srgbClr")?.attrs?.val??"").trim();if(!/^[0-9a-f]{6}$/i.test(e))return null;let n={red:Number.parseInt(e.slice(0,2),16),green:Number.parseInt(e.slice(2,4),16),blue:Number.parseInt(e.slice(4,6),16),alpha:255};return{fill:{color:{rgba:n,color:{rgba:n,type:"srgb"},mods:[],type:"uniColor"},type:"solid"},transparent:null,type:"fill",fillType:"solid"}}function Sl(t){return{ahLst:{ahPolar:[],ahXY:[]},avLst:{},adjLst:{},cnxLst:[{pos:{x:"l",y:"t"},ang:"cd4"},{pos:{x:"r",y:"b"},ang:"_3cd4"}],gdLst:[],pathLst:[{commands:[{id:"moveTo",pt:{x:"l",y:"t"}},{id:"lnTo",pt:{x:"r",y:"b"}}],extrusionOk:!1,fill:"norm",stroke:!0}],rect:null,preset:t}}function kl(t){let e=String(Rt(t,"a:prstGeom")?.attrs?.prst??"");if(!xl.has(e))return null;let n=Rt(t,"wp:anchor"),r=Rt(t,"wp:inline"),o=n||r;if(!o)return null;let i=Rt(o,"wp:docPr"),s=Rt(o,"wp:effectExtent"),a=$i(o,"wp:extent"),l=Rt(t,"a:xfrm"),u=$i(l,"a:ext"),h=Rt(t,"a:ln"),d=Rt(o,"wp:simplePos"),w=Nt(i?.attrs?.id)??1,f={id:w,name:String(i?.attrs?.name??`Line ${w}`),descr:i?.attrs?.descr==null?null:String(i.attrs.descr),title:i?.attrs?.title==null?null:String(i.attrs.title),hidden:null},g={id:-1,name:"",descr:null,title:null,hidden:null},m=Rt(t,"a:cxnSpLocks");return{type:"paraDrawing",docPr:f,effectExtent:{l:Nt(s?.attrs?.l)??0,t:Nt(s?.attrs?.t)??0,r:Nt(s?.attrs?.r)??0,b:Nt(s?.attrs?.b)??0},extent:a,graphic:{bWordShape:!0,extX:u.cx||a.cx,extY:u.cy||a.cy,nvCxnSpPr:{cNvPr:g,nvPr:{isPhoto:null,userDrawn:null},cNvCxnSpPr:{cxnSpLocks:{noChangeShapeType:Te(m?.attrs?.noChangeShapeType,!0)}}},spPr:{custGeom:Sl(e),effectDag:null,effectLst:null,ln:{fill:_l(h),lineJoin:Rt(h,"a:round")?{type:"round",lim:null}:null,algn:null,cap:h?.attrs?.cap??null,cmpd:h?.attrs?.cmpd??null,w:Nt(h?.attrs?.w)??0,headEnd:null,prstDash:String(Rt(h,"a:prstDash")?.attrs?.val??"solid"),tailEnd:null,type:"stroke"},fill:{fill:{type:"noFill"},transparent:null,type:"fill",fillType:"noFill"},xfrm:{ext:{cx:u.cx||a.cx,cy:u.cy},off:vl(l,"a:off"),flipH:l?.attrs?.flipH==null?null:Te(l.attrs.flipH),flipV:l?.attrs?.flipV==null?null:Te(l.attrs.flipV),rot:Nt(l?.attrs?.rot)??null,chOffX:null,chOffY:null,chExtX:null,chExtY:null},bwMode:0},content:null,modelId:null,type:"connectShape",id:String(w)},cNvGraphicFramePr:{graphicFrameLocks:{}},positionH:Pi(o,"wp:positionH","column"),positionV:Pi(o,"wp:positionV","paragraph"),simplePos:{x:Nt(d?.attrs?.x)??0,y:Nt(d?.attrs?.y)??0,use:Te(o.attrs?.simplePos,!1)},distB:Nt(o.attrs?.distB)??0,distL:Nt(o.attrs?.distL)??0,distR:Nt(o.attrs?.distR)??0,distT:Nt(o.attrs?.distT)??0,allowOverlap:Te(o.attrs?.allowOverlap,!0),behindDoc:Te(o.attrs?.behindDoc,!1),hidden:null,layoutInCell:Te(o.attrs?.layoutInCell,!0),locked:Te(o.attrs?.locked,!1),relativeHeight:Nt(o.attrs?.relativeHeight)??0,wrapType:"none",drawingType:n?"anchor":"inline"}}function Fi(t){let e=t?.tag==="w:drawing"?t:Rt(t,"w:drawing");return e?kl(e):null}var jt=t=>t==null||t===""?null:Number(t),Cn=class{constructor(){this.counts=new Map}add(e){this.counts.set(e,(this.counts.get(e)||0)+1)}merge(e){for(let[n,r]of e.counts)this.counts.set(n,(this.counts.get(n)||0)+r)}top(e=50){return[...this.counts.entries()].sort((n,r)=>r[1]-n[1]).slice(0,e)}get size(){return this.counts.size}};function Mr(t){if(!t)return;let e={val:t.attrs["w:val"],color:kn(ke(t.attrs["w:color"]),t.attrs["oo:crgb"])};return t.attrs["w:fill"]&&(e.fill=kn(ke(t.attrs["w:fill"]),t.attrs["oo:frgb"])),{...Pt(t),...e}}function Tl(t,e){let n={bFromDocument:!0,type:"paraPr"};if(!t)return n;let r=s=>ht(t,s);r("w:pStyle")&&(n.pStyle=r("w:pStyle").attrs["w:val"]);for(let s of["widowControl","keepNext","keepLines","pageBreakBefore","contextualSpacing","suppressLineNumbers"])r("w:"+s)&&(n[s]=!0);r("w:shd")&&(n.shd=Mr(r("w:shd")));let o=r("w:spacing");o&&(n.spacing={},o.attrs["w:before"]&&(n.spacing.before=jt(o.attrs["w:before"])),o.attrs["w:after"]&&(n.spacing.after=jt(o.attrs["w:after"])),o.attrs["w:line"]&&(n.spacing.line=jt(o.attrs["w:line"])),o.attrs["w:lineRule"]&&(n.spacing.lineRule=o.attrs["w:lineRule"]),o.attrs["w:beforeAutospacing"]&&(n.spacing.beforeAutoSpacing=o.attrs["w:beforeAutospacing"]==="1"?"on":"off"),o.attrs["w:afterAutospacing"]&&(n.spacing.afterAutoSpacing=o.attrs["w:afterAutospacing"]==="1"?"on":"off"));let i=r("w:ind");return i&&(n.ind={},i.attrs["w:left"]&&(n.ind.left=jt(i.attrs["w:left"])),i.attrs["w:right"]&&(n.ind.right=jt(i.attrs["w:right"])),i.attrs["w:firstLine"]&&(n.ind.firstLine=jt(i.attrs["w:firstLine"]))),r("w:jc")&&(n.jc=r("w:jc").attrs["w:val"]),{...Pt(t),...n}}function zi(t,e){let n={bFromDocument:!0,type:"textPr"};if(!t)return n;let r=a=>ht(t,a),o=r("w:rFonts");if(o){n.rFonts={};for(let a of["ascii","hAnsi","eastAsia","cs","hint","asciiTheme","hAnsiTheme","eastAsiaTheme","cstheme"])o.attrs["w:"+a]&&(n.rFonts[a]=o.attrs["w:"+a])}let i=a=>{let l=r("w:"+a);if(!l)return;let u=l.attrs["w:val"];return!(u==="false"||u==="0")};for(let a of["b","bCs","i","iCs"]){let l=i(a);l!==void 0&&(n[a]=l)}r("w:color")&&(n.color=kn(ke(r("w:color").attrs["w:val"]),r("w:color").attrs["oo:rgb"])),r("w:spacing")&&(n.spacing=jt(r("w:spacing").attrs["w:val"])),r("w:sz")&&(n.sz=jt(r("w:sz").attrs["w:val"])),r("w:szCs")&&(n.szCs=jt(r("w:szCs").attrs["w:val"])),r("w:shd")&&(n.shd=Mr(r("w:shd"))),r("w:vertAlign")&&(n.vertAlign=r("w:vertAlign").attrs["w:val"]);let s=r("w:lang");if(s){n.lang={};for(let a of["val","eastAsia","bidi"])s.attrs["w:"+a]&&(n.lang[a]=s.attrs["w:"+a])}return{...Pt(t),...n}}function Ur(t,e){let n=[];for(let o of t.kids)if(o.tag==="w:t"||o.tag==="w:delText")n.push((o.kids||[]).filter(i=>i.text!=null).map(i=>i.text).join(""));else if(o.tag==="w:br"){let i=o.attrs["w:type"];n.push({type:"break",breakType:i==="column"?"column":"page"})}else if(o.tag==="w:tab")n.push({type:"tab"});else if(o.tag==="oo:ci")try{n.push(JSON.parse(o.attrs["oo:v"]))}catch{}else if(o.tag==="w:drawing"||o.tag==="mc:AlternateContent"){let i=Fi(o);i?n.push(i):e&&e.add("w:r>"+o.tag)}else o.tag&&o.tag!=="w:rPr"&&e&&e.add("w:r>"+o.tag);let r=Pt(t);return{...r,bFromDocument:!0,rPr:zi(ht(t,"w:rPr"),e),content:n,footnotes:r.footnotes||[],endnotes:r.endnotes||[],reviewType:r.reviewType||"common",type:"run"}}var Je={"w:ins":"add","w:del":"remove","w:moveTo":"add","w:moveFrom":"remove"};function Xr(t){return{userId:"",author:t.attrs["w:author"]||"",date:t.attrs["w:date"]||"",moveType:"noMove",prevType:-1}}function Wr(t,e,n,r,o){for(let i of t.kids)i.tag==="w:r"?r.push({...Ur(i,o),reviewType:e,reviewInfo:n}):Je[i.tag]?Wr(i,Je[i.tag],Xr(i),r,o):i.tag&&o&&o.add(t.tag+">"+i.tag)}function Cl(t,e,n){let r=[];for(let l of t.kids||[])if(l.tag==="w:r")r.push(Ur(l,e));else if(Je[l.tag])Wr(l,Je[l.tag],Xr(l),r,e);else if(l.tag==="oo:pi")try{r.push(JSON.parse(l.attrs["oo:v"]))}catch{}else l.tag&&e&&e.add("w:hyperlink>"+l.tag);let o=t.attrs["r:id"],s=(o&&n&&typeof n.get=="function"?n.get(o):null)?.target||t.attrs["w:anchor"]||"",a=t.attrs["w:tooltip"]||"";return{...Pt(t),...a?{tooltip:a}:{},...s?{value:s}:{},content:r,type:"hyperlink"}}function ji(t,e){return!t||!e?t:t.type==="run"?{...t,rPr:{...t.rPr||{},...e,rFonts:{...t.rPr?.rFonts||{},...e.rFonts||{}}}}:t.type==="hyperlink"&&Array.isArray(t.content)?{...t,content:t.content.map(n=>ji(n,e))}:t}function Bi(t,e,n){let r=ht(t,"w:pPr"),o=zi(r&&ht(r,"w:rPr"),e),i=[];for(let l of t.kids)if(l.tag==="w:r")i.push(Ur(l,e));else if(l.tag==="w:hyperlink")i.push(Cl(l,e,n));else if(Je[l.tag])Wr(l,Je[l.tag],Xr(l),i,e);else if(l.tag==="oo:pi")try{i.push(JSON.parse(l.attrs["oo:v"]))}catch{}else l.tag==="w:commentRangeStart"?i.push({type:"commentRangeStart",id:Number(l.attrs["w:id"])}):l.tag==="w:commentRangeEnd"?i.push({type:"commentRangeEnd",id:Number(l.attrs["w:id"])}):l.tag==="w:commentReference"?i.push({type:"commentReference",id:Number(l.attrs["w:id"])}):l.tag&&l.tag!=="w:pPr"&&e&&e.add("w:p>"+l.tag);for(let l=0;l<i.length;l+=1)i[l]=ji(i[l],o);let s=Pt(t,"oo:er");i.push({bFromDocument:!0,footnotes:[],endnotes:[],reviewType:"common",...s,rPr:o,content:[],type:"endRun"});let a=Pt(t);return{...a,bFromDocument:!0,pPr:Tl(r,e),rPr:o,content:i,changes:a.changes||[],type:"paragraph"}}function Li(t,e,n){let r=[];for(let o of t||[])if(o.tag==="w:p")r.push(Bi(o,e,n));else if(o.tag==="w:tbl")r.push(Rl(o,e,n));else if(o.tag==="oo:blk")try{r.push(JSON.parse(o.attrs["oo:v"]))}catch{}else o.tag&&o.tag!=="w:sectPr"&&o.tag!=="w:tcPr"&&o.tag!=="w:trPr"&&o.tag!=="w:tblPr"&&o.tag!=="w:tblGrid"&&e&&e.add("blk>"+o.tag);return r}var Ol=["top","left","bottom","right","insideH","insideV","start","end","between","bar"];function El(t){let e={color:kn(ke(t.attrs["w:color"]),t.attrs["oo:rgb"]),sz:jt(t.attrs["w:sz"])||0,space:jt(t.attrs["w:space"])||0,value:t.attrs["w:val"]};return{...Pt(t),...e}}function Mi(t){if(!t)return;let e={};for(let n of t.kids){let r=(n.tag||"").replace(/^w:/,"");Ol.includes(r)&&(e[r]=El(n))}return e}function Hr(t){if(t)return{type:t.attrs["w:type"]||"auto",w:jt(t.attrs["w:w"])||0}}function Nl(t){if(!t)return;let e={};for(let n of t.kids){let r=(n.tag||"").replace(/^w:/,"");["top","left","bottom","right","start","end"].includes(r)&&(e[r]=Hr(n))}return Object.keys(e).length?e:void 0}function Il(t,e){let n={type:"tablePr"};if(!t)return n;let r=o=>ht(t,o);if(r("w:tblStyle")&&(n.tblStyle=r("w:tblStyle").attrs["w:val"]),r("w:tblW")&&(n.tblW=Hr(r("w:tblW"))),r("w:jc")&&(n.jc=r("w:jc").attrs["w:val"]),r("w:tblBorders")&&(n.tblBorders=Mi(r("w:tblBorders"))),r("w:tblCellMar")&&(n.tblCellMar=Nl(r("w:tblCellMar"))),r("w:tblLayout")&&(n.tblLayout=r("w:tblLayout").attrs["w:type"]),r("w:tblLook")){let o=r("w:tblLook").attrs;n.tblLook={};for(let i of["firstColumn","firstRow","lastColumn","lastRow","noHBand","noVBand"])o["w:"+i]!=null&&(n.tblLook[i]=o["w:"+i]==="1"||o["w:"+i]==="true")}return{...Pt(t),...n}}function Al(t,e){let n={type:"tableCellPr"};if(!t)return n;let r=o=>ht(t,o);return r("w:tcW")&&(n.tcW=Hr(r("w:tcW"))),r("w:gridSpan")&&(n.gridSpan=jt(r("w:gridSpan").attrs["w:val"])),r("w:vMerge")&&(n.vMerge=r("w:vMerge").attrs["w:val"]||"continue"),r("w:tcBorders")&&(n.tcBorders=Mi(r("w:tcBorders"))),r("w:shd")&&(n.shd=Mr(r("w:shd"))),r("w:vAlign")&&(n.vAlign=r("w:vAlign").attrs["w:val"]),{...Pt(t),...n}}function Dl(t,e){let n={type:"tableRowPr"};if(!t)return n;let r=o=>ht(t,o);return r("w:tblHeader")&&(n.tblHeader=!0),r("w:jc")&&(n.jc=r("w:jc").attrs["w:val"]),r("w:trHeight")&&(n.trHeight={val:jt(r("w:trHeight").attrs["w:val"]),hRule:r("w:trHeight").attrs["w:hRule"]}),{...Pt(t),...n}}var Ui=1;function $l(t,e,n){let r=Li(t.kids,e,n),o=r.length?r:[Bi({tag:"w:p",attrs:{},kids:[]},e,n)],i=Pt(t);return{...i,content:{bPresentation:!1,content:o,type:"docContent"},tcPr:Al(ht(t,"w:tcPr"),e),id:i.id!=null?i.id:String(Ui++),type:"tblCell"}}function Pl(t,e,n){let r=Pt(t);return{...r,content:Jt(t,"w:tc").map(o=>$l(o,e,n)),reviewInfo:r.reviewInfo||{userId:"",author:"",date:"",moveType:"noMove",prevType:-1},reviewType:r.reviewType||"common",trPr:Dl(ht(t,"w:trPr"),e),type:"tblRow"}}function Rl(t,e,n){let r=Jt(ht(t,"w:tblGrid"),"w:gridCol").map(i=>({w:jt(i.attrs["w:w"]),type:"gridCol"})),o=Pt(t);return{...o,bPresentation:!1,tblGrid:r,tblPr:Il(ht(t,"w:tblPr"),e),content:Jt(t,"w:tr").map(i=>Pl(i,e,n)),changes:o.changes||[],type:"table"}}function Ve(t,e=new Cn,n={}){Ui=1;let r=Et(t),o=ht(r,"w:body"),i={type:"document",paraPr:{bFromDocument:!0,type:"paraPr"},content:[]};if(!o)return{doc:i,gaps:e};let s=Li(o.kids,e,n.relationships||n.rels),a=Pt(o);return{doc:{type:"document",paraPr:{bFromDocument:!0,type:"paraPr"},...a,content:s},gaps:e}}function Kn(t){if(!t)return"";let e=t.fill?` w:fill="${$t(t.fill)}"${qt("oo:frgb",t.fill)}`:"";return`<w:shd w:val="${t.val||"clear"}" w:color="${$t(t.color)}"${qt("oo:crgb",t.color)}${e}${et(t,["val","color","fill"])}/>`}function Fl(t,e){if(!e)return"";let n={},r=e.val!=null?e.val:e.value;return r!=null&&(n["w:val"]=r),e.sz!=null&&(n["w:sz"]=e.sz),e.space!=null&&(n["w:space"]=e.space),e.color&&(n["w:color"]=$t(e.color)),`<w:${t}${rt(n)}${e.color?qt("oo:rgb",e.color):""}${et(e,["color","sz","space","value","val"])}/>`}var zl=["top","left","bottom","right","insideH","insideV","start","end","between","bar","tl2br","tr2bl"];function Zr(t,e){if(!e)return"";let n="";for(let r of zl)e[r]&&(n+=Fl(r,e[r]));return Object.keys(e).length?`<w:${t}>${n}</w:${t}>`:`<w:${t}/>`}function Gr(t,e){if(!e)return"";let n={};e.type!=null&&(n["w:type"]=e.type);let r=e.w!=null?e.w:e.value;return r!=null&&(n["w:w"]=r),`<w:${t}${rt(n)}${et(e,["type","w","value"])}/>`}function Xi(t,e){if(!e)return"";let n="";for(let r of["top","left","bottom","right","start","end"])e[r]&&(n+=Gr(r,e[r]));return n?`<w:${t}>${n}</w:${t}>`:""}function Ye(t){return typeof t=="object"&&t!==null?t.val??t.value??t.type:t}function Jr(t){if(t==null)return null;let e=Number(t);if(!Number.isFinite(e))return null;let n=e-1;return n<0?0:n>9?9:n}function jl(t){if(!t)return"";let e="",n=Ye(t.ilvl),r=Ye(t.numId);return n!=null&&(e+=`<w:ilvl w:val="${z(String(n))}"/>`),r!=null&&(e+=`<w:numId w:val="${z(String(r))}"/>`),e||et(t,["ilvl","numId"])?`<w:numPr${et(t,["ilvl","numId"])}>${e}</w:numPr>`:""}function Bl(t){if(!t)return"";let e=Array.isArray(t)?t:Array.isArray(t.tabs)?t.tabs:Array.isArray(t.list)?t.list:[],n="";for(let r of e){if(!r)continue;let o={},i=r.val??r.value??r.type;i!=null&&(o["w:val"]=i),r.pos!=null&&(o["w:pos"]=r.pos),r.leader!=null&&(o["w:leader"]=r.leader),n+=`<w:tab${rt(o)}${et(r,["val","value","type","pos","leader"])}/>`}return n?`<w:tabs>${n}</w:tabs>`:""}function Ll(t,e={}){if(!t)return"";let n="";e.includeStyleRef&&t.pStyle!=null&&(n+=`<w:pStyle w:val="${z(String(t.pStyle))}"/>`);for(let o of["keepNext","keepLines","pageBreakBefore","widowControl","contextualSpacing","suppressLineNumbers"])t[o]===!0&&(n+=`<w:${o}/>`);if(n+=jl(t.numPr),n+=Bl(t.tabs),n+=Zr("pBdr",t.pBdr),n+=Kn(t.shd),t.spacing){let o=t.spacing,i={};o.before!=null&&(i["w:before"]=o.before),o.after!=null&&(i["w:after"]=o.after),o.line!=null&&(i["w:line"]=o.line),o.lineRule!=null&&(i["w:lineRule"]=o.lineRule),o.beforeAutoSpacing!=null&&(i["w:beforeAutospacing"]=o.beforeAutoSpacing==="off"?0:1),o.afterAutoSpacing!=null&&(i["w:afterAutospacing"]=o.afterAutoSpacing==="off"?0:1),n+=`<w:spacing${rt(i)}${et(o,["before","after","line","lineRule","beforeAutoSpacing","afterAutoSpacing"])}/>`}if(t.ind){let o=t.ind,i={};for(let s of["left","right","firstLine","hanging","start","end","firstLineChars","hangingChars"])o[s]!=null&&(i["w:"+s]=o[s]);n+=`<w:ind${rt(i)}${et(o,Object.keys(i).map(s=>s.slice(2)))}/>`}t.jc!=null&&(n+=`<w:jc w:val="${z(String(t.jc))}"/>`),t.textAlignment!=null&&(n+=`<w:textAlignment w:val="${z(String(Ye(t.textAlignment)))}"/>`),t.bidi===!0&&(n+="<w:bidi/>");let r=Jr(t.outlineLvl);return r!=null&&(n+=`<w:outlineLvl w:val="${r}"/>`),n}function On(t){let e=Ll(t),n=t?et(t,["pStyle","keepNext","keepLines","pageBreakBefore","widowControl","contextualSpacing","suppressLineNumbers","numPr","tabs","pBdr","shd","spacing","ind","jc","textAlignment","bidi","outlineLvl","type","bFromDocument"]):"";return e||n?`<w:pPr${n}>${e}</w:pPr>`:""}function Ml(t){if(t==null)return"";if(t===!1)return'<w:u w:val="none"/>';if(t===!0)return'<w:u w:val="single"/>';if(typeof t!="object")return`<w:u w:val="${z(String(t))}"/>`;let e={},n=t.val??t.value??t.type;return n!=null&&(e["w:val"]=n),t.color&&(e["w:color"]=$t(t.color)),`<w:u${rt(e)}${t.color?qt("oo:rgb",t.color):""}${et(t,["val","value","type","color"])}/>`}function Ul(t){if(!t)return"";let e="";if(t.rFonts){let r=t.rFonts,o={};for(let i of["ascii","hAnsi","eastAsia","cs","hint","asciiTheme","hAnsiTheme","eastAsiaTheme","cstheme","csTheme"])r[i]!=null&&(o["w:"+i]=r[i]);e+=`<w:rFonts${rt(o)}${et(r,Object.keys(o).map(i=>i.slice(2)))}/>`}let n=(r,o)=>o===!0?`<w:${r}/>`:o===!1?`<w:${r} w:val="false"/>`:"";for(let r of["b","bCs","i","iCs","strike","dstrike","caps","smallCaps","vanish","rtl","noProof"])e+=n(r,t[r]);if(e+=Ml(t.u),t.color&&(e+=`<w:color w:val="${$t(t.color)}"${qt("oo:rgb",t.color)}/>`),t.spacing!=null&&(e+=`<w:spacing w:val="${t.spacing}"/>`),t.position!=null&&(e+=`<w:position w:val="${t.position}"/>`),t.kern!=null&&(e+=`<w:kern w:val="${t.kern}"/>`),t.sz!=null&&(e+=`<w:sz w:val="${t.sz}"/>`),t.szCs!=null&&(e+=`<w:szCs w:val="${t.szCs}"/>`),t.highlight){let r=Ge(t.highlight);r&&(e+=`<w:highlight w:val="${r}"/>`)}if(t.vertAlign!=null&&(e+=`<w:vertAlign w:val="${z(String(Ye(t.vertAlign)))}"/>`),e+=Kn(t.shd),t.lang){let r={};for(let o of["val","eastAsia","bidi"])t.lang[o]!=null&&(r["w:"+o]=t.lang[o]);e+=`<w:lang${rt(r)}${et(t.lang,["val","eastAsia","bidi"])}/>`}return e}function En(t){let e=Ul(t),n=t?et(t,["rFonts","b","bCs","i","iCs","strike","dstrike","caps","smallCaps","vanish","rtl","noProof","u","color","spacing","position","kern","sz","szCs","highlight","vertAlign","shd","lang","type","bFromDocument"]):"";return e||n?`<w:rPr${n}>${e}</w:rPr>`:""}function Wi(t){if(!t)return"";let e="";if(t.tblStyle!=null&&(e+=`<w:tblStyle w:val="${z(String(t.tblStyle))}"/>`),e+=Gr("tblW",t.tblW),t.jc!=null&&(e+=`<w:jc w:val="${z(String(t.jc))}"/>`),e+=Zr("tblBorders",t.tblBorders),e+=Kn(t.shd),e+=Xi("tblCellMar",t.tblCellMar),t.tblLayout!=null&&(e+=`<w:tblLayout w:type="${z(String(Ye(t.tblLayout)))}"/>`),t.tblLook!=null&&typeof t.tblLook=="object"){let r={};for(let o of Object.keys(t.tblLook))o!=="type"&&(r["w:"+o]=t.tblLook[o]===!0?1:t.tblLook[o]===!1?0:t.tblLook[o]);e+=`<w:tblLook${rt(r)}/>`}let n=et(t,["tblStyle","tblW","jc","tblBorders","shd","tblCellMar","tblLayout","tblLook","type"]);return e||n?`<w:tblPr${n}>${e}</w:tblPr>`:""}function Hi(t){if(!t)return"";let e="";t.tblHeader===!0&&(e+="<w:tblHeader/>"),t.cantSplit===!0&&(e+="<w:cantSplit/>"),t.jc!=null&&(e+=`<w:jc w:val="${z(String(t.jc))}"/>`),t.trHeight&&(e+=`<w:trHeight${rt({"w:val":t.trHeight.value!=null?t.trHeight.value:t.trHeight.val,"w:hRule":t.trHeight.hRule})}${et(t.trHeight,["value","val","hRule"])}/>`);let n=et(t,["tblHeader","cantSplit","jc","trHeight","type"]);return e||n?`<w:trPr${n}>${e}</w:trPr>`:""}function Zi(t){if(!t)return"";let e="";e+=Gr("tcW",t.tcW),t.gridSpan!=null&&(e+=`<w:gridSpan w:val="${t.gridSpan}"/>`),t.vMerge!=null&&(e+=`<w:vMerge${t.vMerge&&t.vMerge!=="continue"?` w:val="${z(String(t.vMerge))}"`:""}/>`),e+=Zr("tcBorders",t.tcBorders),e+=Kn(t.shd),e+=Xi("tcMar",t.tcMar),t.vAlign!=null&&(e+=`<w:vAlign w:val="${z(String(Ye(t.vAlign)))}"/>`),t.noWrap===!0&&(e+="<w:noWrap/>");let n=et(t,["tcW","gridSpan","vMerge","tcBorders","shd","tcMar","vAlign","noWrap","type"]);return e||n?`<w:tcPr${n}>${e}</w:tcPr>`:""}function Xl(t){switch(t){case"paragraphStyle":return"paragraph";case"characterStyle":return"character";case"tableStyle":return"table";case"numberingStyle":return"numbering";case"character":case"table":case"numbering":case"paragraph":return t;default:return"paragraph"}}function Wl(t){switch(t){case"topLeftCell":return"nwCell";case"topRightCell":return"neCell";case"bottomLeftCell":return"swCell";case"bottomRightCell":return"seCell";default:return t}}function Hl(t,e){if(!e)return"";let n=Wl(e.styleType??t);if(!n)return"";let r=On(e.pPr)+En(e.rPr)+Wi(e.tblPr)+Hi(e.trPr)+Zi(e.tcPr),o=et(e,["styleType","pPr","rPr","tblPr","trPr","tcPr","type"]);return r||o?`<w:tblStylePr w:type="${z(String(n))}"${o}>${r}</w:tblStylePr>`:""}function Zl(t){if(!t||typeof t!="object")return"";let e="";for(let n of Object.keys(t))e+=Hl(n,t[n]);return e}function Vr(t,e){if(!e||t==null)return"";let r={"w:type":Xl(e.styleType??e.type),"w:styleId":String(t)};e.default===!0&&(r["w:default"]="1"),e.customStyle===!0&&(r["w:customStyle"]="1");let o="";return e.name!=null&&(o+=`<w:name w:val="${z(String(e.name))}"/>`),e.basedOn!=null&&e.basedOn!==""&&(o+=`<w:basedOn w:val="${z(String(e.basedOn))}"/>`),e.next!=null&&e.next!==""&&(o+=`<w:next w:val="${z(String(e.next))}"/>`),e.link!=null&&e.link!==""&&(o+=`<w:link w:val="${z(String(e.link))}"/>`),e.hidden===!0&&(o+="<w:hidden/>"),e.uiPriority!=null&&(o+=`<w:uiPriority w:val="${e.uiPriority}"/>`),e.semiHidden===!0&&(o+="<w:semiHidden/>"),e.unhideWhenUsed===!0&&(o+="<w:unhideWhenUsed/>"),e.qFormat===!0&&(o+="<w:qFormat/>"),o+=On(e.pPr),o+=En(e.rPr),o+=Wi(e.tblPr),o+=Hi(e.trPr),o+=Zi(e.tcPr),o+=Zl(e.tblStylePr),`<w:style${rt(r)}>${o}</w:style>`}function Qn(t,e){let n="";if(e&&(e.paraPr||e.textPr)){let o=En(e.textPr),i=On(e.paraPr);n=`<w:docDefaults><w:rPrDefault>${o}</w:rPrDefault><w:pPrDefault>${i}</w:pPrDefault></w:docDefaults>`}let r=(t||[]).map(o=>Vr(o.styleId,o.def)).join("");return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:oo="urn:coco:oojson">'+n+r+"</w:styles>"}function Gl(t){return typeof t=="object"&&t!==null?t.val??t.value??t.type:t}function Gi(t){return!t||typeof t!="object"?[]:Array.isArray(t)?t.map((e,n)=>[String(e?.abstractNumId??e?.numId??n),e]):Object.keys(t).map(e=>[e,t[e]])}function Jl(t,e){for(let n of e)if(t&&t[n]!=null)return t[n]}function Mt(t,e){let n=Gl(e);return n==null?"":`<w:${t} w:val="${z(String(n))}"/>`}function Yr(t,e){if(!t||typeof t!="object")return"";let n=Jl(t,["ilvl","level","lvl"]),r={"w:ilvl":String(n??e??0)},o="";o+=Mt("start",t.start),o+=Mt("numFmt",t.numFmt),o+=Mt("lvlRestart",t.lvlRestart??t.restart),o+=Mt("pStyle",t.pStyle),(t.isLgl===!0||t.legal===!0||t.isLegal===!0)&&(o+="<w:isLgl/>"),o+=Mt("suff",t.suff),o+=Mt("lvlPicBulletId",t.lvlPicBulletId??t.picBulletId),t.lvlText!=null&&(o+=`<w:lvlText w:val="${z(String(t.lvlText))}"/>`),o+=Mt("lvlJc",t.lvlJc),o+=On(t.pPr),o+=En(t.rPr);let i=et(t,["ilvl","level","lvl","start","numFmt","lvlRestart","restart","pStyle","isLgl","legal","isLegal","suff","lvlPicBulletId","picBulletId","lvlText","lvlJc","pPr","rPr","type"]);return`<w:lvl${rt(r)}${i}>${o}</w:lvl>`}function Vl(t){return t?Array.isArray(t)?t.map((e,n)=>Yr(e,n)).join(""):typeof t!="object"?"":Object.keys(t).map(e=>Yr(t[e],Number(e))).join(""):""}function Yl(t,e){if(!e||typeof e!="object")return"";let n=e.abstractNumId??e.id??t;if(n==null||n==="")return"";let r="";r+=Mt("nsid",e.nsid),r+=Mt("multiLevelType",e.multiLevelType),r+=Mt("tmpl",e.tmpl),r+=Mt("name",e.name),r+=Mt("styleLink",e.styleLink),r+=Mt("numStyleLink",e.numStyleLink),r+=Vl(e.lvl??e.levels??e.Ec);let o=et(e,["abstractNumId","id","nsid","multiLevelType","tmpl","name","styleLink","numStyleLink","lvl","levels","Ec","type"]);return`<w:abstractNum w:abstractNumId="${z(String(n))}"${o}>${r}</w:abstractNum>`}function Ji(t,e){if(!t||typeof t!="object")return"";let n=t.ilvl??t.level??e??0,r="";r+=Mt("startOverride",t.startOverride),r+=Yr(t.lvl??t.levelDef,n);let o=et(t,["ilvl","level","startOverride","lvl","levelDef","type"]);return`<w:lvlOverride w:ilvl="${z(String(n))}"${o}>${r}</w:lvlOverride>`}function ql(t){return t?Array.isArray(t)?t.map((e,n)=>Ji(e,n)).join(""):typeof t!="object"?"":Object.keys(t).map(e=>Ji(t[e],Number(e))).join(""):""}function Kl(t,e){if(!e||typeof e!="object")return"";let n=e.numId??e.id??t;if(n==null||n==="")return"";let r=e.abstractNumId??e.abstractId??e.numStyleLink,o="";r!=null&&(o+=`<w:abstractNumId w:val="${z(String(r))}"/>`),o+=ql(e.lvlOverride??e.overrides);let i=et(e,["numId","id","abstractNumId","abstractId","numStyleLink","lvlOverride","overrides","type"]);return`<w:num w:numId="${z(String(n))}"${i}>${o}</w:num>`}function Vi(t){if(!t||typeof t!="object")return;let e=t.abstractNum??t.abstractNums,n=t.num??t.nums,r=Gi(e).map(([i,s])=>Yl(i,s)).join(""),o=Gi(n).map(([i,s])=>Kl(i,s)).join("");if(!(!r&&!o))return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:numbering xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:oo="urn:coco:oojson">'+r+o+"</w:numbering>"}var Bt={document:"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml",styles:"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml",numbering:"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml",theme:"application/vnd.openxmlformats-officedocument.theme+xml",fontTable:"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml",settings:"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml",webSettings:"application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml",rels:"application/vnd.openxmlformats-package.relationships+xml",contentTypes:"application/vnd.openxmlformats-package.content-types+xml"},Oe={officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",numbering:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",fontTable:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",settings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",webSettings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"};function Ce(t,e,n){let r=n.replace(/^<\?xml[^>]*\?>/,"");return`<pkg:part pkg:name="${z(t)}" pkg:contentType="${z(e)}"><pkg:xmlData>${r}</pkg:xmlData></pkg:part>`}function Ql(t,e,n){return`<pkg:part pkg:name="${z(t)}" pkg:contentType="${z(e)}" pkg:compression="store"><pkg:binaryData>${String(n).replace(/\s+/g,"")}</pkg:binaryData></pkg:part>`}function qi({id:t,type:e,target:n,targetMode:r}){let o=r?` TargetMode="${z(r)}"`:"";return`<Relationship Id="${z(t)}" Type="${z(e)}" Target="${z(n)}"${o}/>`}function tc(t){let e=String(t||"").replace(/^\//,""),n=e.lastIndexOf("/");return n===-1?`/_rels/${e}.rels`:`/${e.slice(0,n)}/_rels/${e.slice(n+1)}.rels`}function ec(t,e){if(!e.startsWith("/"))return e;let n=String(t||"").replace(/^\//,"").split("/").slice(0,-1),r=e.replace(/^\//,"").split("/");for(;n.length&&r[0]===n[0];)n.shift(),r.shift();return"../".repeat(n.length)+r.join("/")}function nc(t,e){if(!t||typeof t!="object")return null;let n=String(t.name??"").trim(),r=String(t.contentType??"").trim();return!n||!r?null:{name:n.startsWith("/")?n:`/${n}`,contentType:r,xml:t.xml,binary:t.binary,rel:t.rel?{source:t.rel.source??"/word/document.xml",id:t.rel.id??`rIdExtra${e}`,type:t.rel.type,target:t.rel.target,targetMode:t.rel.targetMode}:void 0}}function rc(t){return/^(https?:|mailto:|ftp:)/i.test(String(t||""))}function tr(t,e,n={index:1}){if(Array.isArray(t))return t.map(o=>tr(o,e,n));if(!t||typeof t!="object")return t;let r={...t};if(r.type==="hyperlink"&&rc(r.value)&&!r.rId&&!r.id&&!r["r:id"]){let o=`rIdCocoHyperlink${n.index++}`;r.rId=o,e.push(qi({id:o,type:Oe.hyperlink,target:String(r.value),targetMode:"External"}))}return Array.isArray(r.content)&&(r.content=tr(r.content,e,n)),r.content&&typeof r.content=="object"&&!Array.isArray(r.content)&&(r.content=tr(r.content,e,n)),r}function qr(t){let e=Number.isFinite(Number(t))?Math.max(0,Math.min(255,Number(t))):0;return Math.round(e).toString(16).toUpperCase().padStart(2,"0")}function er(t,e){return!t||typeof t!="object"?e:qr(t.red)+qr(t.green)+qr(t.blue)}function Kt(t,e,n){let r=e?.color||e;if(r?.type==="sys"){let o=er(r.rgba,n.lastClr||n.val||"000000");return`<a:${t}><a:sysClr val="${z(r.id||n.sys||"windowText")}" lastClr="${z(o)}"/></a:${t}>`}return`<a:${t}><a:srgbClr val="${z(er(r?.rgba,n.val))}"/></a:${t}>`}function Qt(t,e,n,r){return t?.themeElements?.fontScheme?.[e]?.[n]||r}function oc(t){let n=t?.themeElements?.fontScheme?.name||"Office",r=Qt(t,"majorFont","latin","Cambria"),o=Qt(t,"majorFont","ea","\u5B8B\u4F53"),i=Qt(t,"majorFont","cs","Times New Roman"),s=Qt(t,"minorFont","latin","Calibri"),a=Qt(t,"minorFont","ea","\u5B8B\u4F53"),l=Qt(t,"minorFont","cs","Arial");return`<a:fontScheme name="${z(n)}"><a:majorFont><a:latin typeface="${z(r)}"/><a:ea typeface="${z(o)}"/><a:cs typeface="${z(i)}"/></a:majorFont><a:minorFont><a:latin typeface="${z(s)}"/><a:ea typeface="${z(a)}"/><a:cs typeface="${z(l)}"/></a:minorFont></a:fontScheme>`}function Ki(t,e="phClr"){let n=t?.solidFill??t,r=n?.schemeClr??n?.schemeColor??n?.color;if(typeof r=="string")return`<a:solidFill><a:schemeClr val="${z(r)}"/></a:solidFill>`;if(r?.val||r?.id)return`<a:solidFill><a:schemeClr val="${z(r.val||r.id)}"/></a:solidFill>`;let o=n?.srgbClr??n?.rgb??er(r?.rgba,null);return o?`<a:solidFill><a:srgbClr val="${z(String(o).replace(/^#/,"").toUpperCase())}"/></a:solidFill>`:`<a:solidFill><a:schemeClr val="${z(e)}"/></a:solidFill>`}function ic(t,e="phClr"){let n=t?.schemeClr??t?.schemeColor??t?.color??t;if(typeof n=="string")return`<a:schemeClr val="${z(n)}"/>`;if(n?.val||n?.id)return`<a:schemeClr val="${z(n.val||n.id)}"/>`;let r=t?.srgbClr??t?.rgb??er(n?.rgba??t?.rgba,null);return r?`<a:srgbClr val="${z(String(r).replace(/^#/,"").toUpperCase())}"/>`:`<a:schemeClr val="${z(e)}"/>`}function sc(t){if(!t||typeof t!="object")return"";let e={};for(let n of["blurRad","dist","dir","sx","sy","kx","ky","algn","rotWithShape"])t[n]!=null&&(e[n]=t[n]);return`<a:outerShdw${rt(e)}>${ic(t.solidFill??t.fill??t.color)}</a:outerShdw>`}function ac(t){let e=Array.isArray(t)?t:t?[t]:[];return`<a:effectStyleLst>${(e.length?e:[{effectLst:{}}]).map(r=>{let o=r.effectLst??r.effects??r,i=o.outerShdw??o.outerShadow;return`<a:effectStyle><a:effectLst>${sc(i)}</a:effectLst></a:effectStyle>`}).join("")}</a:effectStyleLst>`}function Yi(t,e){let n=Array.isArray(e)?e:e?[e]:[],r=(n.length?n:[{solidFill:{schemeClr:"phClr"}}]).map(o=>Ki(o)).join("");return`<a:${t}>${r}</a:${t}>`}function lc(t){let e=Array.isArray(t)?t:t?[t]:[];return`<a:lnStyleLst>${(e.length?e:[{w:9525,cap:"flat",cmpd:"sng",algn:"ctr",solidFill:{schemeClr:"phClr"}}]).map(r=>{let o={w:r.w??r.width??9525,cap:r.cap??"flat",cmpd:r.cmpd??"sng",algn:r.algn??r.align??"ctr"};return`<a:ln${rt(o)}>${Ki(r.solidFill?r:r.fill??r)}</a:ln>`}).join("")}</a:lnStyleLst>`}function cc(t){let e=t?.themeElements?.fmtScheme,n=e?.name||"Office";return`<a:fmtScheme name="${z(n)}">`+Yi("fillStyleLst",e?.fillStyleLst??e?.fillStyles)+lc(e?.lnStyleLst??e?.lineStyleLst??e?.lineStyles)+ac(e?.effectStyleLst??e?.effectStyles)+Yi("bgFillStyleLst",e?.bgFillStyleLst??e?.bgFillStyles)+"</a:fmtScheme>"}function Kr(t){let e=t?.themeElements?.clrScheme,n=t?.name||"Office Theme",r=e?.name||"Office";return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="${z(n)}"><a:themeElements><a:clrScheme name="${z(r)}">`+Kt("dk1",e?.dk1,{sys:"windowText",lastClr:"000000"})+Kt("lt1",e?.lt1,{sys:"window",lastClr:"FFFFFF"})+Kt("dk2",e?.dk2,{val:"1F497D"})+Kt("lt2",e?.lt2,{val:"EEECE1"})+Kt("accent1",e?.accent1,{val:"4F81BD"})+Kt("accent2",e?.accent2,{val:"C0504D"})+Kt("accent3",e?.accent3,{val:"9BBB59"})+Kt("accent4",e?.accent4,{val:"8064A2"})+Kt("accent5",e?.accent5,{val:"4BACC6"})+Kt("accent6",e?.accent6,{val:"F79646"})+Kt("hlink",e?.hlink,{val:"0000FF"})+Kt("folHlink",e?.folHlink,{val:"800080"})+"</a:clrScheme>"+oc(t)+cc(t)+"</a:themeElements></a:theme>"}function Qr(t){return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:fonts xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">'+[...new Set(["Calibri","Cambria","Arial","Times New Roman","\u5B8B\u4F53",Qt(t,"majorFont","latin",null),Qt(t,"majorFont","ea",null),Qt(t,"majorFont","cs",null),Qt(t,"minorFont","latin",null),Qt(t,"minorFont","ea",null),Qt(t,"minorFont","cs",null)].filter(Boolean))].map(r=>{let o=/[\u3400-\u9fff]/.test(r)?"86":"00",i=/Times|Cambria|宋体/i.test(r)?"roman":"swiss";return`<w:font w:name="${z(r)}"><w:charset w:val="${o}"/><w:family w:val="${i}"/></w:font>`}).join("")+"</w:fonts>"}function to(){return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:settings xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:zoom w:percent="100"/><w:defaultTabStop w:val="720"/><w:compat><w:compatSetting w:name="compatibilityMode" w:uri="http://schemas.microsoft.com/office/word" w:val="15"/></w:compat></w:settings>'}function eo(){return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:webSettings xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:optimizeForBrowser/></w:webSettings>'}function no(t){let e=t?.theme;return[{name:"/word/theme/theme1.xml",contentType:Bt.theme,xml:Kr(e),rel:{type:Oe.theme,target:"theme/theme1.xml"}},{name:"/word/fontTable.xml",contentType:Bt.fontTable,xml:Qr(e),rel:{type:Oe.fontTable,target:"fontTable.xml"}},{name:"/word/settings.xml",contentType:Bt.settings,xml:to(),rel:{type:Oe.settings,target:"settings.xml"}},{name:"/word/webSettings.xml",contentType:Bt.webSettings,xml:eo(),rel:{type:Oe.webSettings,target:"webSettings.xml"}}]}function ro(t,e={}){let n=[],r=tr(t,n),o=qn(r),{stylesXml:i,numberingXml:s}=e,l=[...e.includeDefaultParts!==!1?no(t):[],...e.extraParts??[]].map((v,_)=>nc(v,_+1)).filter(Boolean),u=[`<Override PartName="/word/document.xml" ContentType="${Bt.document}"/>`];i&&u.push(`<Override PartName="/word/styles.xml" ContentType="${Bt.styles}"/>`),s&&u.push(`<Override PartName="/word/numbering.xml" ContentType="${Bt.numbering}"/>`);for(let v of l)u.push(`<Override PartName="${z(v.name)}" ContentType="${z(v.contentType)}"/>`);let h=`<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="${Bt.rels}"/><Default Extension="xml" ContentType="application/xml"/>`+u.join("")+"</Types>",d=`<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${Oe.officeDocument}" Target="word/document.xml"/></Relationships>`,w=[],f=1;i&&w.push(`<Relationship Id="rId${f++}" Type="${Oe.styles}" Target="styles.xml"/>`),s&&w.push(`<Relationship Id="rId${f++}" Type="${Oe.numbering}" Target="numbering.xml"/>`),w.push(...n);let g=new Map;for(let v of l){if(!v.rel||!v.rel.type)continue;let _=v.rel.source||"/word/document.xml",k=v.rel.target??ec(_,v.name),D=qi({id:v.rel.id??`rId${f}`,type:v.rel.type,target:k,targetMode:v.rel.targetMode});if(_==="/word/document.xml")w.push(D),f++;else{let C=g.get(_)??[];C.push(D),g.set(_,C)}}let m='<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'+w.join("")+"</Relationships>",y=[Ce("/[Content_Types].xml",Bt.contentTypes,h),Ce("/_rels/.rels",Bt.rels,d),Ce("/word/_rels/document.xml.rels",Bt.rels,m)];for(let[v,_]of g.entries()){let k='<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'+_.join("")+"</Relationships>";y.push(Ce(tc(v),Bt.rels,k))}i&&y.push(Ce("/word/styles.xml",Bt.styles,i)),s&&y.push(Ce("/word/numbering.xml",Bt.numbering,s));for(let v of l)v.xml!=null?y.push(Ce(v.name,v.contentType,String(v.xml))):v.binary!=null&&y.push(Ql(v.name,v.contentType,v.binary));return y.push(Ce("/word/document.xml",Bt.document,o)),'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><?mso-application progid="Word.Document"?><pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">'+y.join("")+"</pkg:package>"}function Qi(t,e,n,r,o={}){let i=e&&e.length?Qn(e,n):void 0;return ro(t,{...o,stylesXml:i,numberingXml:r})}var Qe={header:"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",footer:"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",comments:"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",commentsExtended:"application/vnd.ms-word.commentsExtended+xml",footnotes:"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml",endnotes:"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"},Be={header:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",footer:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",commentsExtended:"http://schemas.microsoft.com/office/2011/relationships/commentsExtended",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",footnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",endnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes"};function uc(t){return t==null?t:JSON.parse(JSON.stringify(t))}function fc(t){let e=t?.content;return Array.isArray(e?.content)?e.content:Array.isArray(e)?e:null}function dc(t,e){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:${t} xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:oo="urn:coco:oojson">`+Tn(e)+`</w:${t}>`}function nr(t,e){for(let n of t||[]){if(!n||typeof n!="object")continue;if(Array.isArray(n.content))for(let o of n.content)e(o);let r=n.content?.content;Array.isArray(r)&&nr(r,e)}}function is(t){return Array.isArray(t?.commentMetadata)?t.commentMetadata:[]}function ts(t){if(t==null||t==="")return"";let e=typeof t=="number"?new Date(t):new Date(String(t));return Number.isNaN(e.getTime())?"":e.toISOString()}function pc(t,e){let n=is(t);if(e.id!=null&&e.id!==""){let r=n.find(o=>String(o?.id??"")===String(e.id));if(r)return r}return n.find(r=>String(r?.author??r?.authorName??"")===String(e.author??"")&&String(r?.text??"")===String(e.text??""))||null}function hc(t){let e=new Map;if(nr(t?.content,n=>{if(!n||typeof n!="object"||n.type!=="commentRangeStart"&&n.type!=="commentRangeEnd"&&n.type!=="commentReference"||n.id==null)return;let r=String(n.id),o=e.get(r)||{id:r,author:"",text:"",date:"",solved:void 0},i={id:r,author:n.author??o.author??"",text:n.text??o.text??"",date:n.date??o.date??"",solved:o.solved},s=pc(t,i);(s?.time!=null||s?.date!=null)&&(i.date=ts(s.time??s.date)),typeof s?.solved=="boolean"&&(i.solved=s.solved),e.set(r,i)}),e.size===0){let n=is(t);for(let r of n){let o=String(r.id??"");o&&e.set(o,{id:o,author:r.author??r.authorName??"",text:r.text??"",date:ts(r.time??r.date),solved:typeof r.solved=="boolean"?r.solved:void 0})}n.length>0&&t?.content&&mc(t,n)}return[...e.values()].sort((n,r)=>Number(n.id)-Number(r.id))}function mc(t,e){let n=t.content;if(Array.isArray(n))for(let r of e){let o=r.quote??r.anchorText??"";if(!o||String(o).trim().length===0)continue;let i=String(r.id??"");if(i)for(let s=0;s<n.length;s++){let a=n[s];if(a?.type!=="paragraph"||!Array.isArray(a.content))continue;let l=a.content,u="",h=[];for(let g=0;g<l.length;g++){let m=l[g];if(m?.type==="run"&&Array.isArray(m.content))for(let y of m.content)typeof y=="string"&&(u+=y,h.push(g))}if(u.indexOf(o)<0){let g=o.slice(0,40);if((g.length>=5?u.indexOf(g):-1)<0)continue}let w=-1,f=-1;for(let g=0;g<l.length;g++)l[g]?.type==="run"&&(w<0&&(w=g),f=g);if(!(w<0)){l.splice(w,0,{type:"commentRangeStart",id:i}),l.splice(f+2,0,{type:"commentRangeEnd",id:i});break}}}}function gc(t){let e=t.date?` w:date="${Ke(t.date)}"`:"";return`w:id="${Ke(t.id)}" w:author="${Ke(t.author||"")}"${e}`}function ss(t){let e=Number(t.id);if(Number.isFinite(e))return(e>>>0).toString(16).toUpperCase().padStart(8,"0").slice(-8);let n=0;for(let r of String(t.id))n=n*31+r.charCodeAt(0)>>>0;return n.toString(16).toUpperCase().padStart(8,"0")}function wc(t){return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml">'+t.map(e=>`<w:comment ${gc(e)}><w:p w14:paraId="${ss(e)}"><w:r><w:t xml:space="preserve">${Ke(e.text||"")}</w:t></w:r></w:p></w:comment>`).join("")+"</w:comments>"}function yc(t){let e=t.filter(n=>n.solved===!0);return e.length?'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w15:commentsEx xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml">'+e.map(n=>`<w15:commentEx w15:paraId="${ss(n)}" w15:done="1"/>`).join("")+"</w15:commentsEx>":""}function Ke(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function bc(t,e,n){let r=hc(t);if(!r.length)return;n.comments=r.length,e.push({name:"/word/comments.xml",contentType:Qe.comments,xml:wc(r),rel:{id:"rIdCocoComments",type:Be.comments,target:"comments.xml"}});let o=yc(r);o&&e.push({name:"/word/commentsExtended.xml",contentType:Qe.commentsExtended,xml:o,rel:{id:"rIdCocoCommentsExtended",type:Be.commentsExtended,target:"commentsExtended.xml"}})}function xc(t){let e=/^data:([^;,]+);base64,([A-Za-z0-9+/=\s]+)$/.exec(String(t||""));if(!e)return null;let n=e[1],r=n==="image/jpeg"?"jpg":n==="image/png"?"png":n.split("/")[1]||"bin";return{contentType:n,ext:r,data:e[2].replace(/\s+/g,"")}}function es(t,e){let n=new Map;return nr(t?.content,r=>{if(!(!r||r.type!=="run"||!Array.isArray(r[e])))for(let o of r[e])!o||o.id==null||!Array.isArray(o.content)||n.set(String(o.id),{id:String(o.id),type:o.type,content:o.content})}),[...n.values()].sort((r,o)=>Number(r.id)-Number(o.id))}function vc(t){let e=t.type?` w:type="${Ke(t.type)}"`:"";return`w:id="${Ke(t.id)}"${e}`}function qe(t,e,n){return t?.type===e||String(t?.id)===String(n)}function ns(t,e,n){return`<w:${t} w:type="${e}" w:id="${n}"><w:p><w:r><w:${e==="separator"?"separator":"continuationSeparator"}/></w:r></w:p></w:${t}>`}function rs(t){return t.filter(e=>!qe(e,"separator",-1)&&!qe(e,"continuationSeparator",0)).length}function oo(t,e){return`<w:${t} ${vc(e)}>${Tn(e.content)}</w:${t}>`}function os(t,e,n){let r=n.find(s=>qe(s,"separator",-1)),o=n.find(s=>qe(s,"continuationSeparator",0)),i=n.filter(s=>!qe(s,"separator",-1)&&!qe(s,"continuationSeparator",0));return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:${t} xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:oo="urn:coco:oojson">`+(r?oo(e,r):ns(e,"separator",-1))+(o?oo(e,o):ns(e,"continuationSeparator",0))+i.map(s=>oo(e,s)).join("")+`</w:${t}>`}function _c(t,e,n){let r=es(t,"footnotes");r.length&&(n.footnotes=rs(r),e.push({name:"/word/footnotes.xml",contentType:Qe.footnotes,xml:os("footnotes","footnote",r),rel:{id:"rIdCocoFootnotes",type:Be.footnotes,target:"footnotes.xml"}}));let o=es(t,"endnotes");o.length&&(n.endnotes=rs(o),e.push({name:"/word/endnotes.xml",contentType:Qe.endnotes,xml:os("endnotes","endnote",o),rel:{id:"rIdCocoEndnotes",type:Be.endnotes,target:"endnotes.xml"}}))}function as(t,e,n,r="/word/document.xml"){nr(t,o=>{if(!(!o||o.type!=="run"||!Array.isArray(o.content)))for(let i of o.content){if(!i||i.type!=="paraDrawing")continue;let s=xc(i.graphic?.blipFill?.rasterImageId);if(!s)continue;let a=n.media+1,l=`rIdCocoImage${a}`;i.graphic.blipFill.rasterImageId=l,n.media=a;let u={id:l,type:Be.image,target:`media/image${a}.${s.ext}`};r!=="/word/document.xml"&&(u.source=r),e.push({name:`/word/media/image${a}.${s.ext}`,contentType:s.contentType,binary:s.data,rel:u})}})}function Sc(t,e,n){as(t?.content,e,n)}function kc(t,e,n){let r=t?.sectPr||t?.sectionPr;if(!r||typeof r!="object")return;let o=[{key:"headerReference",part:"header",root:"hdr",contentType:Qe.header,relType:Be.header},{key:"footerReference",part:"footer",root:"ftr",contentType:Qe.footer,relType:Be.footer}];for(let i of o){let s=r[i.key];if(!(!s||typeof s!="object"))for(let a of["first","default","even"]){let l=s[a],u=fc(l);if(!u)continue;let h=n[i.part]+1;n[i.part]=h;let d=`rIdCoco${i.part[0].toUpperCase()}${i.part.slice(1)}${h}`,w=`/word/${i.part}${h}.xml`;as(u,e,n,w),e.push({name:w,contentType:i.contentType,xml:dc(i.root,u),rel:{id:d,type:i.relType,target:`${i.part}${h}.xml`}}),s[a]={id:d}}}}function ls(t){let e=uc(t),n=[],r={header:0,footer:0,comments:0,media:0,footnotes:0,endnotes:0};return kc(e,n,r),bc(e,n,r),_c(e,n,r),Sc(e,n,r),{doc:e,extraParts:n,summary:r}}var nf=Ga(us(),1);var ar=class{constructor(e,n,r,o){this.source=null,this.observer=e,this.node=n,this.options=r,this.source=o||null,o&&e.t.push(this)}collectInterestedObservers(e,n,r,o,i){if(this.node!==n&&!this.options.subtree||e==="attributes"&&!this.options.attributes||e==="characterData"&&!this.options.characterData||e==="childList"&&!this.options.childList)return;let s=o.indexOf(this.observer);s<0&&(s=o.length,o.push(this.observer),i.push(void 0)),(e==="attributes"&&this.options.attributeOldValue||e==="characterData"&&this.options.characterDataOldValue)&&(i[s]=r.oldValue)}},uo=class{constructor(e){this.o=[],this.i=e}register(e,n){let r=this.o,o=!1;r.forEach((i=>{i.observer===e&&(o=!0,(function(s){for(let a=s.observer.t.length-1;a>=0;--a){let l=s.observer.t[a];if(l.source!==s)return;l.node.o.removeTransientRegisteredObserver(l),s.observer.t.splice(a,1)}})(i),i.options=n)})),o||(this.o.push(new ar(e,this.i,n)),e.u.push(this.i))}removeTransientRegisteredObserver(e){this.o.splice(this.o.indexOf(e),1)}removeForObserver(e){let n=0;for(let r=0,o=this.o.length;r<o;++r){let i=this.o[r];i.observer!==e&&(r!==n&&(this.o[n]=i),++n)}this.o.length=n}collectInterestedObservers(e,n,r,o,i){this.o.forEach((s=>{s.collectInterestedObservers(e,n,r,o,i)}))}appendTransientRegisteredObservers(e){this.o.forEach((n=>{n.options.subtree&&e.o.registerTransient(n)}))}registerTransient(e){this.o.push(new ar(e.observer,this.i,e.options,e))}};function fs(t,e,...n){typeof queueMicrotask!="function"?Promise.resolve().then((()=>t.apply(e,n))):queueMicrotask((()=>t.apply(e,n)))}var fo=class{constructor(){this.l=new Set,this.h=!1}appendRecord(e,n){e.m.push(n),this.l.add(e)}queueMutationObserverMicrotask(){this.h||(this.h=!0,fs((()=>{this.p()}),this))}p(){this.h=!1;let e=Array.from(this.l);this.l.clear(),e.forEach((n=>{fs((r=>{let o=r.takeRecords();var i;(i=r).t.forEach((s=>{s.node.o.removeTransientRegisteredObserver(s)})),i.t.length=0,o.length>0&&r.g(o,r)}),this,n)}))}},po=class{constructor(e){this.v=e}deref(){return this.v}},Ut=new class{constructor(){this.l=new fo,this.N=[],this.S=new WeakSet}forEachRange(t){let e=this.N.length;for(let n=e-1;n>=0;--n){let r=this.N[n].deref(),o=r==null,i=!o&&!this.S.has(r);o||i?(this.N[n]=this.N[e-1],this.N.pop(),e-=1):t(r)}}addRange(t){let e=(n=t,typeof WeakRef=="function"?new WeakRef(n):new po(n));var n;this.N.push(e),this.S.add(t)}removeRange(t){this.S.delete(t)}};function at(t){return Ut}function ot(t,...e){return e.some((n=>t.nodeType===n))}function ho(t){return t.nodeType===2}function an(t){return t.nodeType===3||t.nodeType===4||t.nodeType===8||t.nodeType===7}function Ne(t){return t.nodeType===3||t.nodeType===4}function De(t){return t.nodeType===1}function ds(t){return t.nodeType===10}function Ie(t){switch(t.nodeType){case 3:case 7:case 8:return t.data.length;default:return t.childNodes.length}}function ue(t){let e=t,n=[];for(;e;)n.unshift(e),e=e.parentNode;return n}function Zt(t){return ot(t,9)?t:t.ownerDocument}function wt(t){return t.parentNode.childNodes.indexOf(t)}function en(t){for(;t.parentNode;)t=t.parentNode;return t}function hn(t,e){e(t);for(let n=t.firstChild;n;n=n.nextSibling)hn(n,e)}function Ns(t,e){let n=[];return hn(e,(r=>{if(r===e||r.nodeType!==1)return;let o=r;t!=="*"&&o.nodeName!==t||n.push(o)})),n}function Is(t,e,n){t===""&&(t=null);let r=[];return hn(n,(o=>{if(o===n||o.nodeType!==1)return;let i=o;t!=="*"&&i.namespaceURI!==t||e!=="*"&&i.localName!==e||r.push(i)})),r}function $o(t,e,n){n||(n=Zt(t));let r=t.T(n);if(e)for(let o=t.firstChild;o;o=o.nextSibling)r.appendChild($o(o,!0,n));return r}function Z(t,e){if(t.length<e)throw new TypeError(`Function should be called with at least ${e} arguments`)}var Tc={IndexSizeError:1,HierarchyRequestError:3,WrongDocumentError:4,InvalidCharacterError:5,NotFoundError:8,NotSupportedError:9,InUseAttributeError:10,InvalidStateError:11,NamespaceError:14,InvalidNodeTypeError:24},mo=class extends Error{constructor(e="",n="Error"){super(e),this.message=e,this.name=n,this.code=Tc[n]||0,this.stack=new Error(e).stack}};function de(t,e){return new mo(`${t}: ${e}`,t)}function vt(t){throw de("HierarchyRequestError",t)}function Me(t){throw de("IndexSizeError",t)}function Ae(t){throw de("InvalidCharacterError",t)}function re(t){throw de("InvalidNodeTypeError",t)}function As(t){throw de("InvalidStateError",t)}function rr(t){throw de("NamespaceError",t)}function wr(t){throw de("NotFoundError",t)}function go(t){throw de("NotSupportedError",t)}function ps(t){throw de("WrongDocumentError",t)}var wo=class{constructor(e,n){this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null,this.type=e,this.target=n}};function We(t,e,n){let r=[],o=[];for(let s=e;s;s=s.parentNode)s.o.collectInterestedObservers(t,e,n,r,o);let i=at();r.forEach(((s,a)=>{let l=o[a],u=new wo(t,e);n.name!==void 0&&n.namespace!==void 0&&(u.attributeName=n.name,u.attributeNamespace=n.namespace),l!==void 0&&(u.oldValue=l),n.addedNodes!==void 0&&(u.addedNodes=n.addedNodes),n.removedNodes!==void 0&&(u.removedNodes=n.removedNodes),n.previousSibling!==void 0&&(u.previousSibling=n.previousSibling),n.nextSibling!==void 0&&(u.nextSibling=n.nextSibling),i.l.appendRecord(s,u)})),i.l.queueMutationObserverMicrotask()}function Po(t){let e=[];for(let n=t.firstElementChild;n;n=n.nextElementSibling)e.push(n);return e}function Ds(t){for(let e=t.previousSibling;e;e=e.previousSibling)if(De(e))return e;return null}function $s(t){for(let e=t.nextSibling;e;e=e.nextSibling)if(De(e))return e;return null}function Cc(t,e){let n=t.previousSibling,r=t.nextSibling,o=ot(t,1),i=o?t.previousElementSibling:null,s=o?t.nextElementSibling:null;if(t.parentNode=null,t.previousSibling=null,t.nextSibling=null,n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,e.childNodes.splice(e.childNodes.indexOf(t),1),o){let a=(function(l){return ot(l,1,9,11)?l:null})(e);a&&(a.firstElementChild===t&&(a.firstElementChild=s),a.lastElementChild===t&&(a.lastElementChild=i),a.childElementCount-=1)}if(ot(e,9)){let a=e;ot(t,1)?a.documentElement=null:ot(t,10)&&(a.doctype=null)}}function Ro(t,e,n){if(ot(e,9,11,1)||vt("parent must be a Document, DocumentFragment or Element node"),t.contains(e)&&vt("node must not be an inclusive ancestor of parent"),n&&n.parentNode!==e&&wr("child is not a child of parent"),ot(t,11,10,1,3,4,7,8)||vt("node must be a DocumentFragment, DocumentType, Element, Text, ProcessingInstruction or Comment node"),ot(t,3)&&ot(e,9)&&vt("can not insert a Text node under a Document"),ot(t,10)&&!ot(e,9)&&vt("can only insert a DocumentType node under a Document"),ot(e,9)){let r=e;switch(t.nodeType){case 11:let o=t;o.firstElementChild!==o.lastElementChild&&vt("can not insert more than one element under a Document"),Array.from(o.childNodes).some((i=>ot(i,3)))&&vt("can not insert a Text node under a Document"),o.firstElementChild&&(r.documentElement||n&&ot(n,10)||n&&r.doctype&&wt(n)<wt(r.doctype))&&vt("Document should contain at most one doctype, followed by at most one element");break;case 1:(r.documentElement||n&&ot(n,10)||n&&r.doctype&&wt(n)<wt(r.doctype))&&vt("Document should contain at most one doctype, followed by at most one element");break;case 10:(r.doctype||n&&r.documentElement&&wt(r.documentElement)<wt(n)||!n&&r.documentElement)&&vt("Document should contain at most one doctype, followed by at most one element")}}}function He(t,e,n){Ro(t,e,n);let r=n;return r===t&&(r=t.nextSibling),yr(t,Zt(e)),Bn(t,e,r),t}function Bn(t,e,n,r=!1){let o=(function(l){return l.nodeType===11})(t),i=o?Array.from(t.childNodes):[t],s=i.length;if(s===0)return;if(o&&(i.forEach((l=>ce(l,!0))),We("childList",t,{removedNodes:i})),n!==null){let l=wt(n);at().forEachRange((u=>{u.startContainer===e&&u.startOffset>l&&(u.startOffset+=s),u.endContainer===e&&u.endOffset>l&&(u.endOffset+=s)}))}let a=n===null?e.lastChild:n.previousSibling;i.forEach((l=>{(function(u,h,d){u.parentNode=h;let w=d===null?h.lastChild:d.previousSibling,f=d===null?null:d;if(u.previousSibling=w,u.nextSibling=f,w?w.nextSibling=u:h.firstChild=u,f?(f.previousSibling=u,h.childNodes.splice(h.childNodes.indexOf(f),0,u)):(h.lastChild=u,h.childNodes.push(u)),De(u)){let g=h,m=null;for(let v=w;v;v=v.previousSibling){if(De(v)){m=v;break}let _=v;if(!ds(_)){m=_.previousElementSibling;break}}let y=null;for(let v=f;v;v=v.nextSibling){if(De(v)){y=v;break}y=v.nextElementSibling;break}m||(g.firstElementChild=u),y||(g.lastElementChild=u),g.childElementCount+=1}(function(g){return g.nodeType===9})(h)&&(De(u)?h.documentElement=u:ds(u)&&(h.doctype=u))})(l,e,n)})),r||We("childList",e,{addedNodes:i,nextSibling:n,previousSibling:a})}function ee(t,e){return He(t,e,null)}function Ps(t,e,n){if(ot(n,9,11,1)||vt("Can not replace under a non-parent node"),e.contains(n)&&vt("Can not insert a node under its own descendant"),t.parentNode!==n&&wr("child is not a child of parent"),ot(e,11,10,1,3,4,7,8)||vt("Can not insert a node that isn't a DocumentFragment, DocumentType, Element, Text, ProcessingInstruction or Comment"),ot(e,3)&&ot(n,9)&&vt("can not insert a Text node under a Document"),ot(e,10)&&!ot(n,9)&&vt("can only insert a DocumentType node under a Document"),ot(n,9)){let a=n;switch(e.nodeType){case 11:let l=e;l.firstElementChild!==l.lastElementChild&&vt("can not insert more than one element under a Document"),Array.from(l.childNodes).some((u=>ot(u,3)))&&vt("can not insert a Text node under a Document"),l.firstElementChild&&(a.documentElement&&a.documentElement!==t||t&&a.doctype&&wt(t)<wt(a.doctype))&&vt("Document should contain at most one doctype, followed by at most one element");break;case 1:(a.documentElement&&a.documentElement!==t||a.doctype&&wt(t)<wt(a.doctype))&&vt("Document should contain at most one doctype, followed by at most one element");break;case 10:(a.doctype&&a.doctype!==t||a.documentElement&&wt(a.documentElement)<wt(t))&&vt("Document should contain at most one doctype, followed by at most one element")}}let r=t.nextSibling;r===e&&(r=e.nextSibling);let o=t.previousSibling;yr(e,Zt(n));let i=[];t.parentNode!==null&&(i.push(t),ce(t,!0));let s=ot(e,11)?Array.from(e.childNodes):[e];return Bn(e,n,r,!0),We("childList",n,{addedNodes:s,removedNodes:i,nextSibling:r,previousSibling:o}),t}function Fo(t,e){t!==null&&yr(t,Zt(e));let n=Array.from(e.childNodes),r=[];t!==null&&(ot(t,11)?t.childNodes.forEach((o=>{r.push(o)})):r.push(t)),n.forEach((o=>{ce(o,!0)})),t!==null&&Bn(t,e,null,!0),(r.length>0||n.length>0)&&We("childList",e,{addedNodes:r,removedNodes:n})}function ce(t,e=!1){let n=t.parentNode,r=wt(t);at().forEachRange((s=>{t.contains(s.startContainer)&&(s.startContainer=n,s.startOffset=r),t.contains(s.endContainer)&&(s.endContainer=n,s.endOffset=r),s.startContainer===n&&s.startOffset>r&&(s.startOffset-=1),s.endContainer===n&&s.endOffset>r&&(s.endOffset-=1)}));let o=t.previousSibling,i=t.nextSibling;Cc(t,n);for(let s=n;s;s=s.parentNode)s.o.appendTransientRegisteredObservers(t);e||We("childList",n,{removedNodes:[t],nextSibling:i,previousSibling:o})}function yr(t,e){let n=Zt(t);t.parentNode&&ce(t),e!==n&&hn(t,(r=>{if(r.ownerDocument=e,ot(r,1))for(let o of r.attributes)o.ownerDocument=e}))}function Rs(t){let e=[];return hn(t,(n=>{ot(n,3,4)&&e.push(n.data)})),e.join("")}function Fs(t,e){let n=null;e!==""&&(n=new(at()).Text(e)),Fo(n,t)}function mn(t,e){let n=t.map((r=>r instanceof K?r:e.createTextNode(String(r))));if(n.length===1)return n[0];{let r=e.createDocumentFragment();return n.forEach((o=>{r.appendChild(o)})),r}}function zo(t,e){He(mn(e,Zt(t)),t,t.firstChild)}function jo(t,e){ee(mn(e,Zt(t)),t)}function Bo(t,e){let n=mn(e,Zt(t));Ro(n,t,null),Fo(n,t)}function Lo(t,e){let n=t.parentNode;if(n===null)return;let r=t.previousSibling;for(;r!==null&&e.indexOf(r)>=0;)r=r.previousSibling;He(mn(e,Zt(t)),n,r===null?n.firstChild:r.nextSibling)}function Mo(t,e){let n=t.parentNode;if(n===null)return;let r=t.nextSibling;for(;r!==null&&e.indexOf(r)>=0;)r=r.nextSibling;He(mn(e,Zt(t)),n,r)}function Uo(t,e){let n=t.parentNode;if(n===null)return;let r=t.nextSibling;for(;r!==null&&e.indexOf(r)>=0;)r=r.nextSibling;let o=mn(e,Zt(t));t.parentNode===n?Ps(t,o,n):He(o,n,r)}function Xo(t){t.parentNode!==null&&ce(t)}function hs(t,e){let n=e.startContainer;ot(n,7)&&vt("Can not insert into a processing instruction"),ot(n,8)&&vt("Can not insert into a comment"),Ne(n)&&n.parentNode===null&&vt("Can not insert into a text node without a parent");let r=null;r=Ne(n)?n:n.childNodes[e.startOffset]||null;let o=r===null?n:r.parentNode;Ro(t,o,r),Ne(n)&&(r=n.splitText(e.startOffset)),t===r&&(r=r.nextSibling),t.parentNode!==null&&ce(t);let i=r===null?Ie(o):wt(r);ot(t,11)?i+=Ie(t):i+=1,He(t,o,r),e.collapsed&&e.setEnd(o,i)}function we(t){return t>>>0}function zs(t){return t===null?"":String(t)}function un(t){return t==null?"":String(t)}function yt(t,e){return(function(n,r){if(!(n instanceof r))throw new TypeError(`Value should be an instance of ${r.name}`)})(t,e),t}function yo(t,e){return t==null?null:yt(t,e)}function Xt(t){return t===void 0?null:t}var ms=new WeakMap;function or(t){let e=ms.get(t);return e===void 0&&(e=Math.random(),ms.set(t,e)),e}var K=class t{constructor(){this.ownerDocument=null,this.parentNode=null,this.childNodes=[],this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.o=new uo(this)}get parentElement(){return this.parentNode&&ot(this.parentNode,1)?this.parentNode:null}hasChildNodes(){return!!this.childNodes.length}normalize(){let e=this.firstChild,n=0;for(Zt(this);e;){let r=e.nextSibling;if(!ot(e,3)){e.normalize(),e=r;continue}let o=e,i=o.length;if(i===0){ce(e),--n,e=r;continue}let s="",a=[];for(let u=o.nextSibling;u&&ot(u,3);u=u.nextSibling)s+=u.data,a.push(u);s&&o.replaceData(i,0,s);let l=at();for(let u=0,h=a.length;u<h;++u){let d=a[u],w=n+u+1;l.forEachRange((f=>{f.startContainer===d&&(f.startOffset+=i,f.startContainer=o),f.endContainer===d&&(f.endOffset+=i,f.endContainer=o),f.startContainer===this&&f.startOffset===w&&(f.startContainer=o,f.startOffset=i),f.endContainer===this&&f.endOffset===w&&(f.endContainer=o,f.endOffset=i)})),i+=d.length}for(;a.length;)ce(a.shift());e=e.nextSibling,++n}}cloneNode(e=!1){return $o(this,e)}compareDocumentPosition(e){if(Z(arguments,1),this===(e=yt(e,t)))return 0;let n=e,r=this,o=null,i=null;if(ho(n)&&(o=n,n=o.ownerElement),ho(r)&&(i=r,r=i.ownerElement,o!==null&&n!==null&&r===n))for(let d of r.attributes){if(d===o)return t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_PRECEDING;if(d===i)return t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_FOLLOWING}if(n===null||r===null)return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|(or(n||o)>or(r||i)?t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_PRECEDING);let s=ue(n),a=ue(r);if(s[0]!==a[0])return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|(or(s[0])>or(a[0])?t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_PRECEDING);let l=0;for(;l<s.length&&l<a.length&&s[l]===a[l];)++l;let u=n!==r&&l===s.length,h=n!==r&&l===a.length;return u&&o===null||n===r&&i!==null?t.DOCUMENT_POSITION_CONTAINS|t.DOCUMENT_POSITION_PRECEDING:h&&i===null||n===r&&o!==null?t.DOCUMENT_POSITION_CONTAINED_BY|t.DOCUMENT_POSITION_FOLLOWING:u||wt(s[l])<wt(a[l])?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING}contains(e){for(Z(arguments,1),e=yo(e,t);e&&e!=this;)e=e.parentNode;return e===this}isDefaultNamespace(e){return Z(arguments,1),(e=Xt(e))===""&&(e=null),this.lookupNamespaceURI(null)===e}insertBefore(e,n){return Z(arguments,2),He(e=yt(e,t),this,n=yo(n,t))}appendChild(e){return Z(arguments,1),ee(e=yt(e,t),this)}replaceChild(e,n){return Z(arguments,2),e=yt(e,t),Ps(n=yt(n,t),e,this)}removeChild(e){return Z(arguments,1),(function(n,r){return n.parentNode!==r&&wr("child is not a child of parent"),ce(n),n})(e=yt(e,t),this)}};function br(t,e,n,r){We("attributes",e,{name:t.localName,namespace:t.namespaceURI,oldValue:n})}function bo(t,e){br(t,t.ownerElement,t.value),t.C=e}function ln(t,e,n=!1){n||br(t,e,null,t.value),e.attributes.push(t),t.ownerElement=e}function xo(t){let e=t.ownerElement;br(t,e,t.value),e.attributes.splice(e.attributes.indexOf(t),1),t.ownerElement=null}K.ELEMENT_NODE=1,K.ATTRIBUTE_NODE=2,K.TEXT_NODE=3,K.CDATA_SECTION_NODE=4,K.ENTITY_REFERENCE_NODE=5,K.ENTITY_NODE=6,K.PROCESSING_INSTRUCTION_NODE=7,K.COMMENT_NODE=8,K.DOCUMENT_NODE=9,K.DOCUMENT_TYPE_NODE=10,K.DOCUMENT_FRAGMENT_NODE=11,K.NOTATION_NODE=12,K.DOCUMENT_POSITION_DISCONNECTED=1,K.DOCUMENT_POSITION_PRECEDING=2,K.DOCUMENT_POSITION_FOLLOWING=4,K.DOCUMENT_POSITION_CONTAINS=8,K.DOCUMENT_POSITION_CONTAINED_BY=16,K.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,K.prototype.ELEMENT_NODE=1,K.prototype.ATTRIBUTE_NODE=2,K.prototype.TEXT_NODE=3,K.prototype.CDATA_SECTION_NODE=4,K.prototype.ENTITY_REFERENCE_NODE=5,K.prototype.ENTITY_NODE=6,K.prototype.PROCESSING_INSTRUCTION_NODE=7,K.prototype.COMMENT_NODE=8,K.prototype.DOCUMENT_NODE=9,K.prototype.DOCUMENT_TYPE_NODE=10,K.prototype.DOCUMENT_FRAGMENT_NODE=11,K.prototype.NOTATION_NODE=12;var Xe=class extends K{get nodeType(){return 2}get nodeName(){return this.name}get nodeValue(){return this.C}set nodeValue(e){so(this,e=un(e))}get textContent(){return this.C}set textContent(e){so(this,e=un(e))}lookupPrefix(e){return Z(arguments,1),this.ownerElement!==null?this.ownerElement.lookupPrefix(e):null}lookupNamespaceURI(e){return Z(arguments,1),this.ownerElement===null?null:this.ownerElement.lookupNamespaceURI(e)}get value(){return this.C}set value(e){so(this,e)}constructor(e,n,r,o,i){super(),this.namespaceURI=e,this.prefix=n,this.localName=r,this.name=n===null?r:`${n}:${r}`,this.C=o,this.ownerElement=i,this.ownerDocument=i?i.ownerDocument:at().document}T(e){let n=new(at()).Attr(this.namespaceURI,this.prefix,this.localName,this.value,null);return n.ownerDocument=e,n}};function so(t,e){e=String(e),t.ownerElement===null?t.C=e:bo(t,e)}var Dn=class extends K{get nodeValue(){return this.D}set nodeValue(e){e=un(e),Ee(this,0,this.length,e)}get textContent(){return this.D}set textContent(e){e=un(e),Ee(this,0,this.length,e)}lookupPrefix(e){Z(arguments,1);let n=this.parentElement;return n!==null?n.lookupPrefix(e):null}lookupNamespaceURI(e){Z(arguments,1);let n=this.parentElement;return n===null?null:n.lookupNamespaceURI(e)}before(...e){Lo(this,e)}after(...e){Mo(this,e)}replaceWith(...e){Uo(this,e)}remove(){Xo(this)}get previousElementSibling(){return Ds(this)}get nextElementSibling(){return $s(this)}get data(){return this.D}set data(e){e=zs(e),Ee(this,0,this.length,e)}get length(){return this.data.length}constructor(e){super(),this.D=String(e)}substringData(e,n){return Z(arguments,2),js(this,e,n)}appendData(e){Z(arguments,1),Ee(this,this.length,0,e)}insertData(e,n){Z(arguments,1),Ee(this,e,0,n)}deleteData(e,n){Z(arguments,2),Ee(this,e,n,"")}replaceData(e,n,r){Z(arguments,3),Ee(this,e,n,r)}};function Ee(t,e,n,r){e=we(e),n=we(n);let o=t.length;e>o&&Me("can not replace data past the node's length"),e+n>o&&(n=o-e),We("characterData",t,{oldValue:t.data});let i=t.data,s=i.substring(0,e)+r+i.substring(e+n);t.D=s,at().forEachRange((a=>{a.startContainer===t&&a.startOffset>e&&a.startOffset<=e+n&&(a.startOffset=e),a.endContainer===t&&a.endOffset>e&&a.endOffset<=e+n&&(a.endOffset=e),a.startContainer===t&&a.startOffset>e+n&&(a.startOffset=a.startOffset+r.length-n),a.endContainer===t&&a.endOffset>e+n&&(a.endOffset=a.endOffset+r.length-n)}))}function js(t,e,n){e=we(e),n=we(n);let r=t.length;return e>r&&Me("can not substring data past the node's length"),e+n>r?t.data.substring(e):t.data.substring(e,e+n)}var lr=class extends Dn{get nodeType(){return 3}get nodeName(){return"#text"}constructor(e=""){super(e);let n=at();this.ownerDocument=n.document}splitText(e){return Z(arguments,1),(function(n,r){let o=n.length;r>o&&Me("can not split past the node's length");let i=o-r,s=js(n,r,i),a=new(at()).Text(s);a.ownerDocument=n.ownerDocument;let l=n.parentNode;if(l!==null){Bn(a,l,n.nextSibling);let u=wt(n)+1;at().forEachRange((h=>{h.startContainer===n&&h.startOffset>r&&(h.startContainer=a,h.startOffset-=r),h.endContainer===n&&h.endOffset>r&&(h.endContainer=a,h.endOffset-=r),h.startContainer===l&&h.startOffset===u&&(h.startOffset+=1),h.endContainer===l&&h.endOffset===u&&(h.endOffset+=1)}))}return Ee(n,r,i,""),a})(this,e=we(e))}T(e){let n=new(at()).Text(this.data);return n.ownerDocument=e,n}get wholeText(){let e=[this.data],n=this.previousSibling;for(;n!==null&&ot(n,3,4);){let o=n.data;e.unshift(o),n=n.previousSibling}let r=this.nextSibling;for(;r!==null&&ot(r,3,4);){let o=r.data;e.push(o),r=r.nextSibling}return e.join("")}},vo=class extends lr{get nodeType(){return 4}get nodeName(){return"#cdata-section"}constructor(e){super(e)}T(e){let n=new(at()).CDATASection(this.data);return n.ownerDocument=e,n}},_o=class extends Dn{get nodeType(){return 8}get nodeName(){return"#comment"}constructor(e=""){super(e);let n=at();this.ownerDocument=n.document}T(e){let n=new(at()).Comment(this.data);return n.ownerDocument=e,n}},cr=class extends K{get nodeType(){return 10}get nodeName(){return this.name}get nodeValue(){return null}set nodeValue(e){}get textContent(){return null}set textContent(e){}lookupPrefix(e){return Z(arguments,1),null}lookupNamespaceURI(e){return Z(arguments,1),null}before(...e){Lo(this,e)}after(...e){Mo(this,e)}replaceWith(...e){Uo(this,e)}remove(){Xo(this)}constructor(e,n="",r=""){super(),this.name=e,this.publicId=n,this.systemId=r}T(e){let n=new(at()).DocumentType(this.name,this.publicId,this.systemId);return n.ownerDocument=e,n}};function gs(t,e,n,r,o){return new Xe(t,e,n,r,o)}function Oc(t,e,n,r=null){return $e(t,e,n,r)}var on="http://www.w3.org/1999/xhtml",ae="http://www.w3.org/XML/1998/namespace",Lt="http://www.w3.org/2000/xmlns/";function Bs(t){(function(e){let n=e.split(":");return!(n.length>2)&&n.every((r=>Pe(r)))})(t)||Ae("The qualified name is not a valid QName")}function Wo(t,e){t===""&&(t=null),Bs(e);let n=null,r=e,o=e.indexOf(":");return o>=0&&(n=e.substring(0,o),r=e.substring(o+1)),n!==null&&t===null&&rr("Qualified name with prefix can not have a null namespace"),n==="xml"&&t!==ae&&rr("xml prefix can only be used for the XML namespace"),e!=="xmlns"&&n!=="xmlns"||t===Lt||rr("xmlns prefix or qualifiedName must use the XMLNS namespace"),t===Lt&&e!=="xmlns"&&n!=="xmlns"&&rr("xmlns prefix or qualifiedName must be used for the XMLNS namespace"),{namespace:t,prefix:n,localName:r}}function Ls(t,e){if(t.namespaceURI===e&&t.prefix!==null)return t.prefix;let n=Array.from(t.attributes).find((r=>r.prefix==="xmlns"&&r.value===e));return n?n.localName:t.parentElement!==null?Ls(t.parentElement,e):null}var So=class{constructor(e,n,r){this.$=null,this.A=0,this.I=e,this.k=e,this.M=n,this.R=r}enter(e,n){var r;let o=(r=this.$)!==null&&r!==void 0?r:e;this.k+=n,this.k>this.M&&this.k/this.I>this.R&>("too much entity expansion",o),this.$=o,this.A+=1}exit(){this.A-=1,this.A===0&&(this.$=null)}};function pe(t,e){return{success:!0,offset:t,value:e}}function gn(t){return pe(t,void 0)}function fe(t,e,n=!1){return{success:!1,offset:t,expected:e,fatal:n}}function q(t){return(e,n)=>{let r=n+t.length;return e.slice(n,r)===t?pe(r,t):fe(n,[t])}}function Ms(t,e){return(n,r)=>{let o=n.codePointAt(r);return o!==void 0&&t(o)?gn(r+(function(i){return i>65535?2:1})(o)):fe(r,e)}}function It(t,e){return(n,r)=>{let o=r;for(;;){let i=n.codePointAt(r);if(i===void 0||!t(i))break;r+=i>65535?2:1}return e!==void 0&&r===o?fe(r,e):gn(r)}}function $n(t,e,n){return Ms((r=>t<=r&&r<=e),n||[`${String.fromCodePoint(t)}-${String.fromCodePoint(e)}`])}function xt(t,e){return(n,r)=>{let o=t(n,r);return o.success?pe(o.offset,e(o.value)):o}}function _t(t){return xt(t,(()=>{}))}function xr(t,e,n,r){return(o,i)=>{let s=t(o,i);return s.success?e(s.value)?s:fe(i,n,r):s}}function ut(t,e){return(n,r)=>{let o=null;for(let i of t){let s=i(n,r);if(s.success||(o===null||s.offset>o.offset?o=s:s.offset===o.offset&&e===void 0&&(o.expected=o.expected.concat(s.expected)),s.fatal))return s}return e=e||o?.expected||[],o&&(o.expected=e),o||fe(r,e)}}function it(t){return(e,n)=>{let r=t(e,n);return r.success||r.fatal?r:pe(n,null)}}function Re(t){return(e,n)=>{let r=[],o=n;for(;;){let i=t(e,o);if(!i.success){if(i.fatal)return i;break}if(r.push(i.value),i.offset===o)break;o=i.offset}return pe(o,r)}}function ye(t){return(e,n)=>{let r=n;for(;;){let o=t(e,r);if(!o.success){if(o.fatal)return o;break}if(o.offset===r)break;r=o.offset}return gn(r)}}function Ft(t,e,n){return(r,o)=>{let i=t(r,o);if(!i.success)return i;let s=e(r,i.offset);return s.success?pe(s.offset,n(i.value,s.value)):s}}function vr(...t){return(e,n)=>{let r=[];for(let o of t){let i=o(e,n);if(!i.success)return i;n=i.offset,r.push(i.value)}return pe(n,r)}}function le(...t){return(e,n)=>{for(let r of t){let o=r(e,n);if(!o.success)return o;n=o.offset}return gn(n)}}function Us(t,e){return t}function Xs(t,e){return e}function Pn(t){return Ft(t,ye(t),Xs)}function ct(t,e){return Ft(t,e,Xs)}function St(t,e){return Ft(t,e,Us)}function pt(t,e,n,r=!1){return ct(t,r?Ot(St(e,n)):St(e,n))}function At(t){return(e,n)=>{let r=t(e,n);return r.success?pe(r.offset,e.slice(n,r.offset)):r}}function Ho(t){return(e,n)=>{let r=t(e,n);return r.success?pe(n,r.value):r}}function Zo(t,e){return(n,r)=>t(n,r).success?fe(r,e):gn(r)}function Ws(t,e,n){return ct(Zo(e,n),t)}function cn(t,e,n=0,r=[]){return(o,i)=>{let s=o.codePointAt(i+n);if(s===void 0)return fe(i,r);let a=t[s];return a===void 0?e===void 0?fe(i,r):e(o,i):a(o,i)}}function Ot(t){return(e,n)=>{let r=t(e,n);return r.success?r:fe(r.offset,r.expected,!0)}}var Hs=(t,e)=>t.length===e?gn(e):fe(e,["end of input"]);function Ln(t){return Ft(t,Hs,Us)}var ur=class{constructor(e,n){this.P=0,this.L=0,this.O=e,this.V=n}next(){if(this.P>=this.V.length)return{done:!0,value:Hs(this.O,this.L)};let{parser:e,type:n}=this.V[this.P],r=e(this.O,this.L);return r.success?(this.L=r.offset,n!==1&&(this.P+=1),r.value===void 0?this.next():{done:!1,value:r.value}):n===0||r.fatal?{done:!0,value:r}:(this.P+=1,this.next())}};function wn(t){return(e,n)=>{let r=n,o=t(e,n);return o.success?pe(o.offset,Object.assign({input:e,start:r,end:o.offset},o.value)):o}}var Ec=q("_"),ko=q("-"),Nc=q("."),Wt=q('"'),Ht=q("'"),Ic=q("<"),xe=q(">"),Ac=q("&"),Dc=q("="),$c=q("["),Go=q("]"),fr=q(";"),Zs=q("%"),Rn=q("("),fn=q(")"),Pc=q("+"),Rc=q(","),Gs=q("?"),Js=q("*"),dr=q("|"),Jo=q("]]>"),Fc=q("<!--"),zc=q("-->"),jc=q("<?"),Vo=q("?>"),Bc=q("1."),Lc=q("version"),Mc=q("encoding"),Uc=q("standalone"),Xc=q("yes"),Wc=q("no"),Vs=q("<?xml"),Hc=q("<!DOCTYPE"),Zc=q("SYSTEM"),Ys=q("PUBLIC"),Gc=q("</"),Jc=q("/>"),Vc=q("&#"),Yc=q("&#x"),qc=q("<!ELEMENT"),Kc=q("EMPTY"),Qc=q("ANY"),tu=q("#PCDATA"),eu=q("<!ATTLIST"),nu=q("NOTATION"),ru=q("#REQUIRED"),ou=q("#IMPLIED"),iu=q("#FIXED"),Yo=q("<!ENTITY"),su=q("NDATA"),au=q("<!NOTATION"),ws=$n(65,90),ys=$n(97,122),_r=$n(48,57),lu=ut([_r,$n(65,70),$n(97,102)],["hexadecimal digit"]);function Vt(t){return t===9||t===10||t===13||32<=t&&t<=55295||57344<=t&&t<=65533||65536<=t&&t<=1114111}var cu=Ln(It(Vt));function qs(t){return t===32||t===9||t===13||t===10}var V=It(qs,["whitespace"]),uu=Ln(It(qs));function Ks(t){return t===58||65<=t&&t<=90||t===95||97<=t&&t<=122||192<=t&&t<=214||216<=t&&t<=246||248<=t&&t<=767||880<=t&&t<=893||895<=t&&t<=8191||8204<=t&&t<=8205||8304<=t&&t<=8591||11264<=t&&t<=12271||12289<=t&&t<=55295||63744<=t&&t<=64975||65008<=t&&t<=65533||65536<=t&&t<=983039}var fu=Ms(Ks,["valid name start character"]);function Qs(t){return Ks(t)||t===45||t===46||48<=t&&t<=57||t===183||768<=t&&t<=879||8255<=t&&t<=8256}var ve=At(ct(fu,It(Qs))),du=Ln(ve),be=xr(ve,(t=>!t.includes(":")),["name must not contain colon"],!0),bs=At(It(Qs,["valid name character"])),pu=wn(xt(xr(ut([xt(pt(Yc,At(Pn(lu)),fr,!0),(t=>parseInt(t,16))),xt(pt(Vc,At(Pn(_r)),fr,!0),(t=>parseInt(t,10)))]),(t=>Vt(t)),["character reference must reference a valid character"],!0),(t=>({type:0,cp:t})))),dn=ut([wn(xt(pt(Ac,be,Ot(fr)),(t=>({type:1,name:t})))),pu]),To=wn(xt(pt(Zs,be,fr),(t=>({type:2,name:t})))),ta=ut([pt(Wt,Re(ut([At(It((t=>t!==37&&t!==38&&t!==Fn&&Vt(t)),[])),To,dn])),Wt,!0),pt(Ht,Re(ut([At(It((t=>t!==37&&t!==38&&t!==zn&&Vt(t)),[])),To,dn])),Ht,!0)]),Fn=34,zn=39,ea=cn({[Fn]:pt(Wt,Re(cn({38:dn},At(It((t=>t!==jn&&t!==38&&t!==Fn&&Vt(t)),[])))),Wt,!0),[zn]:pt(Ht,Re(cn({38:dn},At(It((t=>t!==jn&&t!==38&&t!==zn&&Vt(t)),[])))),Ht,!0)},void 0,0,["quoted attribute value"]),hu=Ln(Re(ut([At(It((t=>t!==jn&&t!==38&&Vt(t)),[])),dn]))),xs=xr(ut([pt(Wt,At(It((t=>t!==Fn&&Vt(t)))),Wt),pt(Ht,At(It((t=>t!==zn&&Vt(t)))),Ht)]),(t=>!t.includes("#")),["system identifier must not contain a fragment identifier"],!0);function Co(t){return t===32||t===13||t===10||97<=t&&t<=122||65<=t&&t<=90||48<=t&&t<=57||33<=t&&t<=47&&t!==34&&t!==38||58<=t&&t<=64&&t!==60&&t!==62||t===95}var mu=Ln(It(Co)),na=ut([pt(Wt,At(It((t=>t!==Fn&&Co(t)))),Wt,!0),pt(Ht,At(It((t=>t!==zn&&Co(t)))),Ht,!0)]),jn=60,gu=At(Pn(ut([It((t=>t!==jn&&t!==38&&t!==93&&Vt(t)),[]),Ws(_t(Go),Jo,[])],["character data"]))),qo=xt(pt(Fc,At(ye(ut([It((t=>t!==45&&Vt(t)),[]),St(_t(ko),Zo(ko,["comment content may not contain --"]))]))),zc,!0),(t=>({type:3,data:t}))),wu=xr(be,(t=>t.toLowerCase()!=="xml"),['processing instruction target must not be "xml"'],!0),Ko=pt(jc,Ft(wu,it(ct(V,At(ye(ut([It((t=>t!==63&&Vt(t)),[]),St(_t(Gs),Zo(xe,["PI data"]))]))))),((t,e)=>({type:4,target:t,data:e}))),Vo,!0),yu=q("<![CDATA["),bu=At(ye(ut([It((t=>t!==93&&Vt(t)),[]),Ws(_t(Go),Jo,["CData"])]))),xu=wn(xt(pt(yu,bu,Jo,!0),(t=>({type:5,data:t})))),Sr=pt(it(V),Dc,it(V)),vs=At(ct(Bc,Pn(_r))),ra=ct(V,ct(Lc,ct(Sr,ut([pt(Wt,vs,Wt,!0),pt(Ht,vs,Ht,!0)])))),_s=At(ct(ut([ws,ys]),ye(ut([ws,ys,_r,_t(Nc),_t(Ec),_t(ko)])))),oa=ct(V,ct(Mc,ct(Sr,ut([pt(Wt,_s,Wt,!0),pt(Ht,_s,Ht,!0)])))),Ss=ut([xt(Xc,(()=>!0)),xt(Wc,(()=>!1))]),vu=ct(V,ct(Uc,Ot(ct(Sr,ut([pt(Wt,Ss,Wt,!0),pt(Ht,Ss,Ht,!0)]))))),_u=pt(St(Vs,Ho(V)),St(Ft(ra,Ft(it(oa),it(vu),((t,e)=>[t,e])),((t,[e,n])=>({type:6,version:t,encoding:e,standalone:n}))),it(V)),Vo,!0),Qo=wn(xt(ve,(t=>({name:t})))),Su=Ft(Qo,ct(Ot(Sr),Ot(ea)),((t,e)=>({name:t,value:e}))),ia=xt(vr(Ic,Qo,Ot(St(Re(ct(V,Su)),it(V))),Ot(cn({47:xt(Jc,(()=>!0))},xt(xe,(()=>!1)),0,[">","/>"]))),(([t,e,n,r])=>({type:r?9:7,name:e,attributes:n}))),ku=wn(xt(pt(Gc,St(ve,it(V)),xe,!0),(t=>({type:8,name:t})))),sa=ut([Gs,Js,Pc]),pr=St(ut([_t(ve),function(t,e){return aa(t,e)},function(t,e){return la(t,e)}]),_t(it(sa))),aa=le(Rn,it(V),pr,Pn(vr(it(V),dr,it(V),Ot(pr))),it(V),fn),la=le(Rn,it(V),pr,ye(vr(it(V),Rc,it(V),Ot(pr))),it(V),fn),Tu=St(ut([aa,la]),it(sa)),Cu=le(Rn,it(V),tu,ut([le(ye(le(it(V),dr,it(V),ve)),it(V),fn,Js),_t(St(it(V),fn))])),Ou=St(qc,Ot(le(V,ve,V,ut([_t(Kc),_t(Qc),_t(Cu),_t(Tu)]),it(V),xe))),Eu=q("CDATA"),Nu=ut([q("IDREFS"),q("IDREF"),q("ID"),q("ENTITY"),q("ENTITIES"),q("NMTOKENS"),q("NMTOKEN")]),Iu=ut([St(nu,Ot(le(V,Rn,it(V),be,ye(le(it(V),dr,it(V),be)),it(V),fn))),St(Rn,Ot(le(it(V),bs,ye(le(it(V),dr,it(V),bs)),it(V),fn)))]),Au=ut([xt(Eu,(()=>!0)),xt(Nu,(()=>!1)),xt(Iu,(()=>!1))]),Du=ut([xt(ru,(()=>({type:0}))),xt(ou,(()=>({type:1}))),Ft(xt(it(St(iu,V)),(t=>t!==null)),ea,((t,e)=>({type:2,fixed:t,value:e})))]),$u=Ft(ct(V,Qo),Ot(Ft(ct(V,Au),ct(V,Du),((t,e)=>({isCData:t,def:e})))),((t,{isCData:e,def:n})=>({name:t,isCData:e,def:n}))),Pu=pt(St(eu,V),Ft(ve,Ot(Re($u)),((t,e)=>({type:0,name:t,attdefs:e}))),ct(it(V),xe),!0),kr=ut([xt(ct(Zc,Ot(ct(V,xs))),(t=>({publicId:null,systemId:t}))),ct(Ys,Ft(Ot(ct(V,na)),ct(V,xs),((t,e)=>({publicId:t,systemId:e}))))]),Ru=ut([ta,Ft(kr,it(ct(pt(V,su,V),be)),((t,e)=>({ids:t,ndata:e})))]),Fu=pt(Yo,Ft(ct(V,be),Ot(ct(V,Ru)),((t,e)=>({type:1,name:t,value:e}))),ct(it(V),xe)),zu=ut([ta,_t(kr)]),ju=pt(St(Yo,ct(V,Zs)),Ft(ct(V,be),Ot(ct(V,zu)),((t,e)=>e?{type:2,name:t,value:e}:void 0)),ct(it(V),xe),!0),Bu=ct(Ho(Yo),Ot(ut([Fu,ju]))),Rd=pt(St(Vs,Ho(V)),St(Ft(it(ra),oa,((t,e)=>({type:6,version:t,encoding:e,standalone:null}))),it(V)),Vo,!0),Lu=xt(St(St(Ys,V),Ot(na)),(t=>({publicId:t,systemId:null}))),Mu=pt(au,Ft(pt(V,be,V),ut([_t(kr),_t(Lu)]),(()=>{})),ct(it(V),xe),!0),Uu=ut([_t(Ou),Pu,Bu,_t(Mu),_t(Ko),_t(qo)]),Xu=ut([_t(To),_t(V)]),Wu=(function(t){return xt(t,(e=>e.filter((n=>n!==void 0))))})(Re(ut([Uu,Xu]))),Hu=ct(Hc,Ot(xt(vr(V,ve,it(ct(V,kr)),it(V),it(St(pt($c,Wu,Go,!0),it(V))),xe),(([t,e,n,r,o,i])=>({type:10,name:e,ids:n,intSubset:o}))))),ca={parser:cn({[jn]:cn({47:ku,33:ut([qo,xu]),63:Ko},ia,1),38:dn},gu),type:1};function Zu(t){return new ur(t,[ca])}var ks=ut([qo,Ko,V]),Gu=[{parser:_u,type:2},{parser:ks,type:1},{parser:Hu,type:2},{parser:ks,type:1},{parser:ia,type:0},ca];function Ju(t){return new ur(t,Gu)}function ao(t){return Array.from(t,(e=>sn(e)?e:"[invalid character]")).join("")}function lo(t,e,n){let r=Array.from(t);if(r.length<n)return t;switch(e){case 0:return"\u2026"+r.slice(-n).join("");case 1:return r.slice(0,n).join("")+"\u2026"}let o=0|Math.min(r.length/2,n/2);return r.slice(0,o).join("")+"\u2026"+r.slice(-o).join("")}function gt(t,e){let{line:n,char:r}=(function(o,i){let s=1,a=1,l=0;for(;l<i;){let u=o.codePointAt(l);a++,l+=u>65535?2:1,u===10&&(s++,a=1)}return{line:s,char:a}})(e.input,e.start);throw new Error(`${t}
|
|
1
|
+
var oojson=(()=>{var Ua=Object.create;var Gn=Object.defineProperty;var Xa=Object.getOwnPropertyDescriptor;var Wa=Object.getOwnPropertyNames;var Ha=Object.getPrototypeOf,Za=Object.prototype.hasOwnProperty;var Sn=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Ga=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},Ja=(t,e)=>{for(var n in e)Gn(t,n,{get:e[n],enumerable:!0})},wi=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Wa(e))!Za.call(t,o)&&o!==n&&Gn(t,o,{get:()=>e[o],enumerable:!(r=Xa(e,o))||r.enumerable});return t};var Va=(t,e,n)=>(n=t!=null?Ua(Ha(t)):{},wi(e||!t||!t.__esModule?Gn(n,"default",{value:t,enumerable:!0}):n,t)),Ya=t=>wi(Gn({},"__esModule",{value:!0}),t);var ds=Ga((fs,so)=>{(function(t){typeof fs=="object"&&typeof so<"u"?so.exports=t():typeof define=="function"&&define.amd?define([],t):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).JSZip=t()})(function(){return(function t(e,n,r){function o(a,l){if(!n[a]){if(!e[a]){var u=typeof Sn=="function"&&Sn;if(!l&&u)return u(a,!0);if(i)return i(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var d=n[a]={exports:{}};e[a][0].call(d.exports,function(w){var f=e[a][1][w];return o(f||w)},d,d.exports,t,e,n,r)}return n[a].exports}for(var i=typeof Sn=="function"&&Sn,s=0;s<r.length;s++)o(r[s]);return o})({1:[function(t,e,n){"use strict";var r=t("./utils"),o=t("./support"),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(s){for(var a,l,u,h,d,w,f,g=[],m=0,y=s.length,v=y,_=r.getTypeOf(s)!=="string";m<s.length;)v=y-m,u=_?(a=s[m++],l=m<y?s[m++]:0,m<y?s[m++]:0):(a=s.charCodeAt(m++),l=m<y?s.charCodeAt(m++):0,m<y?s.charCodeAt(m++):0),h=a>>2,d=(3&a)<<4|l>>4,w=1<v?(15&l)<<2|u>>6:64,f=2<v?63&u:64,g.push(i.charAt(h)+i.charAt(d)+i.charAt(w)+i.charAt(f));return g.join("")},n.decode=function(s){var a,l,u,h,d,w,f=0,g=0,m="data:";if(s.substr(0,m.length)===m)throw new Error("Invalid base64 input, it looks like a data url.");var y,v=3*(s=s.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(s.charAt(s.length-1)===i.charAt(64)&&v--,s.charAt(s.length-2)===i.charAt(64)&&v--,v%1!=0)throw new Error("Invalid base64 input, bad content length.");for(y=o.uint8array?new Uint8Array(0|v):new Array(0|v);f<s.length;)a=i.indexOf(s.charAt(f++))<<2|(h=i.indexOf(s.charAt(f++)))>>4,l=(15&h)<<4|(d=i.indexOf(s.charAt(f++)))>>2,u=(3&d)<<6|(w=i.indexOf(s.charAt(f++))),y[g++]=a,d!==64&&(y[g++]=l),w!==64&&(y[g++]=u);return y}},{"./support":30,"./utils":32}],2:[function(t,e,n){"use strict";var r=t("./external"),o=t("./stream/DataWorker"),i=t("./stream/Crc32Probe"),s=t("./stream/DataLengthProbe");function a(l,u,h,d,w){this.compressedSize=l,this.uncompressedSize=u,this.crc32=h,this.compression=d,this.compressedContent=w}a.prototype={getContentWorker:function(){var l=new o(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),u=this;return l.on("end",function(){if(this.streamInfo.data_length!==u.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),l},getCompressedWorker:function(){return new o(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(l,u,h){return l.pipe(new i).pipe(new s("uncompressedSize")).pipe(u.compressWorker(h)).pipe(new s("compressedSize")).withStreamInfo("compression",u)},e.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,n){"use strict";var r=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,n){"use strict";var r=t("./utils"),o=(function(){for(var i,s=[],a=0;a<256;a++){i=a;for(var l=0;l<8;l++)i=1&i?3988292384^i>>>1:i>>>1;s[a]=i}return s})();e.exports=function(i,s){return i!==void 0&&i.length?r.getTypeOf(i)!=="string"?(function(a,l,u,h){var d=o,w=h+u;a^=-1;for(var f=h;f<w;f++)a=a>>>8^d[255&(a^l[f])];return-1^a})(0|s,i,i.length,0):(function(a,l,u,h){var d=o,w=h+u;a^=-1;for(var f=h;f<w;f++)a=a>>>8^d[255&(a^l.charCodeAt(f))];return-1^a})(0|s,i,i.length,0):0}},{"./utils":32}],5:[function(t,e,n){"use strict";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,e,n){"use strict";var r=null;r=typeof Promise<"u"?Promise:t("lie"),e.exports={Promise:r}},{lie:37}],7:[function(t,e,n){"use strict";var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=t("pako"),i=t("./utils"),s=t("./stream/GenericWorker"),a=r?"uint8array":"array";function l(u,h){s.call(this,"FlateWorker/"+u),this._pako=null,this._pakoAction=u,this._pakoOptions=h,this.meta={}}n.magic="\b\0",i.inherits(l,s),l.prototype.processChunk=function(u){this.meta=u.meta,this._pako===null&&this._createPako(),this._pako.push(i.transformTo(a,u.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var u=this;this._pako.onData=function(h){u.push({data:h,meta:u.meta})}},n.compressWorker=function(u){return new l("Deflate",u)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,n){"use strict";function r(d,w){var f,g="";for(f=0;f<w;f++)g+=String.fromCharCode(255&d),d>>>=8;return g}function o(d,w,f,g,m,y){var v,_,T=d.file,D=d.compression,C=y!==a.utf8encode,F=i.transformTo("string",y(T.name)),N=i.transformTo("string",a.utf8encode(T.name)),B=T.comment,Y=i.transformTo("string",y(B)),S=i.transformTo("string",a.utf8encode(B)),$=N.length!==T.name.length,p=S.length!==B.length,P="",st="",M="",lt=T.dir,U=T.date,nt={crc32:0,compressedSize:0,uncompressedSize:0};w&&!f||(nt.crc32=d.crc32,nt.compressedSize=d.compressedSize,nt.uncompressedSize=d.uncompressedSize);var I=0;w&&(I|=8),C||!$&&!p||(I|=2048);var E=0,tt=0;lt&&(E|=16),m==="UNIX"?(tt=798,E|=(function(H,Tt){var jt=H;return H||(jt=Tt?16893:33204),(65535&jt)<<16})(T.unixPermissions,lt)):(tt=20,E|=(function(H){return 63&(H||0)})(T.dosPermissions)),v=U.getUTCHours(),v<<=6,v|=U.getUTCMinutes(),v<<=5,v|=U.getUTCSeconds()/2,_=U.getUTCFullYear()-1980,_<<=4,_|=U.getUTCMonth()+1,_<<=5,_|=U.getUTCDate(),$&&(st=r(1,1)+r(l(F),4)+N,P+="up"+r(st.length,2)+st),p&&(M=r(1,1)+r(l(Y),4)+S,P+="uc"+r(M.length,2)+M);var G="";return G+=`
|
|
2
|
+
\0`,G+=r(I,2),G+=D.magic,G+=r(v,2),G+=r(_,2),G+=r(nt.crc32,4),G+=r(nt.compressedSize,4),G+=r(nt.uncompressedSize,4),G+=r(F.length,2),G+=r(P.length,2),{fileRecord:u.LOCAL_FILE_HEADER+G+F+P,dirRecord:u.CENTRAL_FILE_HEADER+r(tt,2)+G+r(Y.length,2)+"\0\0\0\0"+r(E,4)+r(g,4)+F+P+Y}}var i=t("../utils"),s=t("../stream/GenericWorker"),a=t("../utf8"),l=t("../crc32"),u=t("../signature");function h(d,w,f,g){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=f,this.encodeFileName=g,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(h,s),h.prototype.push=function(d){var w=d.meta.percent||0,f=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,s.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:f?(w+100*(f-g-1))/f:100}}))},h.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var w=this.streamFiles&&!d.file.dir;if(w){var f=o(d,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:f.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(d){this.accumulate=!1;var w=this.streamFiles&&!d.file.dir,f=o(d,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(f.dirRecord),w)this.push({data:(function(g){return u.DATA_DESCRIPTOR+r(g.crc32,4)+r(g.compressedSize,4)+r(g.uncompressedSize,4)})(d),meta:{percent:100}});else for(this.push({data:f.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var d=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var f=this.bytesWritten-d,g=(function(m,y,v,_,T){var D=i.transformTo("string",T(_));return u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(m,2)+r(m,2)+r(y,4)+r(v,4)+r(D.length,2)+D})(this.dirRecords.length,f,d,this.zipComment,this.encodeFileName);this.push({data:g,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(d){this._sources.push(d);var w=this;return d.on("data",function(f){w.processChunk(f)}),d.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),d.on("error",function(f){w.error(f)}),this},h.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(d){var w=this._sources;if(!s.prototype.error.call(this,d))return!1;for(var f=0;f<w.length;f++)try{w[f].error(d)}catch{}return!0},h.prototype.lock=function(){s.prototype.lock.call(this);for(var d=this._sources,w=0;w<d.length;w++)d[w].lock()},e.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,n){"use strict";var r=t("../compressions"),o=t("./ZipFileWorker");n.generateWorker=function(i,s,a){var l=new o(s.streamFiles,a,s.platform,s.encodeFileName),u=0;try{i.forEach(function(h,d){u++;var w=(function(y,v){var _=y||v,T=r[_];if(!T)throw new Error(_+" is not a valid compression method !");return T})(d.options.compression,s.compression),f=d.options.compressionOptions||s.compressionOptions||{},g=d.dir,m=d.date;d._compressWorker(w,f).withStreamInfo("file",{name:h,dir:g,date:m,comment:d.comment||"",unixPermissions:d.unixPermissions,dosPermissions:d.dosPermissions}).pipe(l)}),l.entriesCount=u}catch(h){l.error(h)}return l}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new r;for(var i in this)typeof this[i]!="function"&&(o[i]=this[i]);return o}}(r.prototype=t("./object")).loadAsync=t("./load"),r.support=t("./support"),r.defaults=t("./defaults"),r.version="3.10.2",r.loadAsync=function(o,i){return new r().loadAsync(o,i)},r.external=t("./external"),e.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,n){"use strict";var r=t("./utils"),o=t("./external"),i=t("./utf8"),s=t("./zipEntries"),a=t("./stream/Crc32Probe"),l=t("./nodejsUtils");function u(h){return new o.Promise(function(d,w){var f=h.decompressed.getContentWorker().pipe(new a);f.on("error",function(g){w(g)}).on("end",function(){f.streamInfo.crc32!==h.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):d()}).resume()})}e.exports=function(h,d){var w=this;return d=r.extend(d||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),l.isNode&&l.isStream(h)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",h,!0,d.optimizedBinaryString,d.base64).then(function(f){var g=new s(d);return g.load(f),g}).then(function(f){var g=[o.Promise.resolve(f)],m=f.files;if(d.checkCRC32)for(var y=0;y<m.length;y++)g.push(u(m[y]));return o.Promise.all(g)}).then(function(f){for(var g=f.shift(),m=g.files,y=0;y<m.length;y++){var v=m[y],_=v.fileNameStr,T=r.resolve(v.fileNameStr);w.file(T,v.decompressed,{binary:!0,optimizedBinaryString:!0,date:v.date,dir:v.dir,comment:v.fileCommentStr.length?v.fileCommentStr:null,unixPermissions:v.unixPermissions,dosPermissions:v.dosPermissions,createFolders:d.createFolders}),v.dir||(w.file(T).unsafeOriginalName=_)}return g.zipComment.length&&(w.comment=g.zipComment),w})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,n){"use strict";var r=t("../utils"),o=t("../stream/GenericWorker");function i(s,a){o.call(this,"Nodejs stream input adapter for "+s),this._upstreamEnded=!1,this._bindStream(a)}r.inherits(i,o),i.prototype._bindStream=function(s){var a=this;(this._stream=s).pause(),s.on("data",function(l){a.push({data:l,meta:{percent:0}})}).on("error",function(l){a.isPaused?this.generatedError=l:a.error(l)}).on("end",function(){a.isPaused?a._upstreamEnded=!0:a.end()})},i.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=i},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,n){"use strict";var r=t("readable-stream").Readable;function o(i,s,a){r.call(this,s),this._helper=i;var l=this;i.on("data",function(u,h){l.push(u)||l._helper.pause(),a&&a(h)}).on("error",function(u){l.emit("error",u)}).on("end",function(){l.push(null)})}t("../utils").inherits(o,r),o.prototype._read=function(){this._helper.resume()},e.exports=o},{"../utils":32,"readable-stream":16}],14:[function(t,e,n){"use strict";e.exports={isNode:typeof Buffer<"u",newBufferFrom:function(r,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(r,o);if(typeof r=="number")throw new Error('The "data" argument must not be a number');return new Buffer(r,o)},allocBuffer:function(r){if(Buffer.alloc)return Buffer.alloc(r);var o=new Buffer(r);return o.fill(0),o},isBuffer:function(r){return Buffer.isBuffer(r)},isStream:function(r){return r&&typeof r.on=="function"&&typeof r.pause=="function"&&typeof r.resume=="function"}}},{}],15:[function(t,e,n){"use strict";function r(T,D,C){var F,N=i.getTypeOf(D),B=i.extend(C||{},l);B.date=B.date||new Date,B.compression!==null&&(B.compression=B.compression.toUpperCase()),typeof B.unixPermissions=="string"&&(B.unixPermissions=parseInt(B.unixPermissions,8)),B.unixPermissions&&16384&B.unixPermissions&&(B.dir=!0),B.dosPermissions&&16&B.dosPermissions&&(B.dir=!0),B.dir&&(T=m(T)),B.createFolders&&(F=g(T))&&y.call(this,F,!0);var Y=N==="string"&&B.binary===!1&&B.base64===!1;C&&C.binary!==void 0||(B.binary=!Y),(D instanceof u&&D.uncompressedSize===0||B.dir||!D||D.length===0)&&(B.base64=!1,B.binary=!0,D="",B.compression="STORE",N="string");var S=null;S=D instanceof u||D instanceof s?D:w.isNode&&w.isStream(D)?new f(T,D):i.prepareContent(T,D,B.binary,B.optimizedBinaryString,B.base64);var $=new h(T,S,B);this.files[T]=$}var o=t("./utf8"),i=t("./utils"),s=t("./stream/GenericWorker"),a=t("./stream/StreamHelper"),l=t("./defaults"),u=t("./compressedObject"),h=t("./zipObject"),d=t("./generate"),w=t("./nodejsUtils"),f=t("./nodejs/NodejsStreamInputAdapter"),g=function(T){T.slice(-1)==="/"&&(T=T.substring(0,T.length-1));var D=T.lastIndexOf("/");return 0<D?T.substring(0,D):""},m=function(T){return T.slice(-1)!=="/"&&(T+="/"),T},y=function(T,D){return D=D!==void 0?D:l.createFolders,T=m(T),this.files[T]||r.call(this,T,null,{dir:!0,createFolders:D}),this.files[T]};function v(T){return Object.prototype.toString.call(T)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(T){var D,C,F;for(D in this.files)F=this.files[D],(C=D.slice(this.root.length,D.length))&&D.slice(0,this.root.length)===this.root&&T(C,F)},filter:function(T){var D=[];return this.forEach(function(C,F){T(C,F)&&D.push(F)}),D},file:function(T,D,C){if(arguments.length!==1)return T=this.root+T,r.call(this,T,D,C),this;if(v(T)){var F=T;return this.filter(function(B,Y){return!Y.dir&&F.test(B)})}var N=this.files[this.root+T];return N&&!N.dir?N:null},folder:function(T){if(!T)return this;if(v(T))return this.filter(function(N,B){return B.dir&&T.test(N)});var D=this.root+T,C=y.call(this,D),F=this.clone();return F.root=C.name,F},remove:function(T){T=this.root+T;var D=this.files[T];if(D||(T.slice(-1)!=="/"&&(T+="/"),D=this.files[T]),D&&!D.dir)delete this.files[T];else for(var C=this.filter(function(N,B){return B.name.slice(0,T.length)===T}),F=0;F<C.length;F++)delete this.files[C[F].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(T){var D,C={};try{if((C=i.extend(T||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=C.type.toLowerCase(),C.compression=C.compression.toUpperCase(),C.type==="binarystring"&&(C.type="string"),!C.type)throw new Error("No output type specified.");i.checkSupport(C.type),C.platform!=="darwin"&&C.platform!=="freebsd"&&C.platform!=="linux"&&C.platform!=="sunos"||(C.platform="UNIX"),C.platform==="win32"&&(C.platform="DOS");var F=C.comment||this.comment||"";D=d.generateWorker(this,C,F)}catch(N){(D=new s("error")).error(N)}return new a(D,C.type||"string",C.mimeType)},generateAsync:function(T,D){return this.generateInternalStream(T).accumulate(D)},generateNodeStream:function(T,D){return(T=T||{}).type||(T.type="nodebuffer"),this.generateInternalStream(T).toNodejsStream(D)}};e.exports=_},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,e,n){"use strict";e.exports=t("stream")},{stream:void 0}],17:[function(t,e,n){"use strict";var r=t("./DataReader");function o(i){r.call(this,i);for(var s=0;s<this.data.length;s++)i[s]=255&i[s]}t("../utils").inherits(o,r),o.prototype.byteAt=function(i){return this.data[this.zero+i]},o.prototype.lastIndexOfSignature=function(i){for(var s=i.charCodeAt(0),a=i.charCodeAt(1),l=i.charCodeAt(2),u=i.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===s&&this.data[h+1]===a&&this.data[h+2]===l&&this.data[h+3]===u)return h-this.zero;return-1},o.prototype.readAndCheckSignature=function(i){var s=i.charCodeAt(0),a=i.charCodeAt(1),l=i.charCodeAt(2),u=i.charCodeAt(3),h=this.readData(4);return s===h[0]&&a===h[1]&&l===h[2]&&u===h[3]},o.prototype.readData=function(i){if(this.checkOffset(i),i===0)return[];var s=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},e.exports=o},{"../utils":32,"./DataReader":18}],18:[function(t,e,n){"use strict";var r=t("../utils");function o(i){this.data=i,this.length=i.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(i){this.checkIndex(this.index+i)},checkIndex:function(i){if(this.length<this.zero+i||i<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+i+"). Corrupted zip ?")},setIndex:function(i){this.checkIndex(i),this.index=i},skip:function(i){this.setIndex(this.index+i)},byteAt:function(){},readInt:function(i){var s,a=0;for(this.checkOffset(i),s=this.index+i-1;s>=this.index;s--)a=(a<<8)+this.byteAt(s);return this.index+=i,a},readString:function(i){return r.transformTo("string",this.readData(i))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var i=this.readInt(4);return new Date(Date.UTC(1980+(i>>25&127),(i>>21&15)-1,i>>16&31,i>>11&31,i>>5&63,(31&i)<<1))}},e.exports=o},{"../utils":32}],19:[function(t,e,n){"use strict";var r=t("./Uint8ArrayReader");function o(i){r.call(this,i)}t("../utils").inherits(o,r),o.prototype.readData=function(i){this.checkOffset(i);var s=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},e.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,n){"use strict";var r=t("./DataReader");function o(i){r.call(this,i)}t("../utils").inherits(o,r),o.prototype.byteAt=function(i){return this.data.charCodeAt(this.zero+i)},o.prototype.lastIndexOfSignature=function(i){return this.data.lastIndexOf(i)-this.zero},o.prototype.readAndCheckSignature=function(i){return i===this.readData(4)},o.prototype.readData=function(i){this.checkOffset(i);var s=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},e.exports=o},{"../utils":32,"./DataReader":18}],21:[function(t,e,n){"use strict";var r=t("./ArrayReader");function o(i){r.call(this,i)}t("../utils").inherits(o,r),o.prototype.readData=function(i){if(this.checkOffset(i),i===0)return new Uint8Array(0);var s=this.data.subarray(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},e.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,n){"use strict";var r=t("../utils"),o=t("../support"),i=t("./ArrayReader"),s=t("./StringReader"),a=t("./NodeBufferReader"),l=t("./Uint8ArrayReader");e.exports=function(u){var h=r.getTypeOf(u);return r.checkSupport(h),h!=="string"||o.uint8array?h==="nodebuffer"?new a(u):o.uint8array?new l(r.transformTo("uint8array",u)):new i(r.transformTo("array",u)):new s(u)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,n){"use strict";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,e,n){"use strict";var r=t("./GenericWorker"),o=t("../utils");function i(s){r.call(this,"ConvertWorker to "+s),this.destType=s}o.inherits(i,r),i.prototype.processChunk=function(s){this.push({data:o.transformTo(this.destType,s.data),meta:s.meta})},e.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,n){"use strict";var r=t("./GenericWorker"),o=t("../crc32");function i(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(i,r),i.prototype.processChunk=function(s){this.streamInfo.crc32=o(s.data,this.streamInfo.crc32||0),this.push(s)},e.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,n){"use strict";var r=t("../utils"),o=t("./GenericWorker");function i(s){o.call(this,"DataLengthProbe for "+s),this.propName=s,this.withStreamInfo(s,0)}r.inherits(i,o),i.prototype.processChunk=function(s){if(s){var a=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=a+s.data.length}o.prototype.processChunk.call(this,s)},e.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,n){"use strict";var r=t("../utils"),o=t("./GenericWorker");function i(s){o.call(this,"DataWorker");var a=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,s.then(function(l){a.dataIsReady=!0,a.data=l,a.max=l&&l.length||0,a.type=r.getTypeOf(l),a.isPaused||a._tickAndRepeat()},function(l){a.error(l)})}r.inherits(i,o),i.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var s=null,a=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":s=this.data.substring(this.index,a);break;case"uint8array":s=this.data.subarray(this.index,a);break;case"array":case"nodebuffer":s=this.data.slice(this.index,a)}return this.index=a,this.push({data:s,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,n){"use strict";function r(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,i){return this._listeners[o].push(i),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,i){if(this._listeners[o])for(var s=0;s<this._listeners[o].length;s++)this._listeners[o][s].call(this,i)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var i=this;return o.on("data",function(s){i.processChunk(s)}),o.on("end",function(){i.end()}),o.on("error",function(s){i.error(s)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,i){return this.extraStreamInfo[o]=i,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},e.exports=r},{}],29:[function(t,e,n){"use strict";var r=t("../utils"),o=t("./ConvertWorker"),i=t("./GenericWorker"),s=t("../base64"),a=t("../support"),l=t("../external"),u=null;if(a.nodestream)try{u=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(w,f){return new l.Promise(function(g,m){var y=[],v=w._internalType,_=w._outputType,T=w._mimeType;w.on("data",function(D,C){y.push(D),f&&f(C)}).on("error",function(D){y=[],m(D)}).on("end",function(){try{var D=(function(C,F,N){switch(C){case"blob":return r.newBlob(r.transformTo("arraybuffer",F),N);case"base64":return s.encode(F);default:return r.transformTo(C,F)}})(_,(function(C,F){var N,B=0,Y=null,S=0;for(N=0;N<F.length;N++)S+=F[N].length;switch(C){case"string":return F.join("");case"array":return Array.prototype.concat.apply([],F);case"uint8array":for(Y=new Uint8Array(S),N=0;N<F.length;N++)Y.set(F[N],B),B+=F[N].length;return Y;case"nodebuffer":return Buffer.concat(F);default:throw new Error("concat : unsupported type '"+C+"'")}})(v,y),T);g(D)}catch(C){m(C)}y=[]}).resume()})}function d(w,f,g){var m=f;switch(f){case"blob":case"arraybuffer":m="uint8array";break;case"base64":m="string"}try{this._internalType=m,this._outputType=f,this._mimeType=g,r.checkSupport(m),this._worker=w.pipe(new o(m)),w.lock()}catch(y){this._worker=new i("error"),this._worker.error(y)}}d.prototype={accumulate:function(w){return h(this,w)},on:function(w,f){var g=this;return w==="data"?this._worker.on(w,function(m){f.call(g,m.data,m.meta)}):this._worker.on(w,function(){r.delay(f,arguments,g)}),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(w){if(r.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new u(this,{objectMode:this._outputType!=="nodebuffer"},w)}},e.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,n){"use strict";if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",n.nodebuffer=typeof Buffer<"u",n.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(r),n.blob=o.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,e,n){"use strict";for(var r=t("./utils"),o=t("./support"),i=t("./nodejsUtils"),s=t("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;a[254]=a[254]=1;function u(){s.call(this,"utf-8 decode"),this.leftOver=null}function h(){s.call(this,"utf-8 encode")}n.utf8encode=function(d){return o.nodebuffer?i.newBufferFrom(d,"utf-8"):(function(w){var f,g,m,y,v,_=w.length,T=0;for(y=0;y<_;y++)(64512&(g=w.charCodeAt(y)))==55296&&y+1<_&&(64512&(m=w.charCodeAt(y+1)))==56320&&(g=65536+(g-55296<<10)+(m-56320),y++),T+=g<128?1:g<2048?2:g<65536?3:4;for(f=o.uint8array?new Uint8Array(T):new Array(T),y=v=0;v<T;y++)(64512&(g=w.charCodeAt(y)))==55296&&y+1<_&&(64512&(m=w.charCodeAt(y+1)))==56320&&(g=65536+(g-55296<<10)+(m-56320),y++),g<128?f[v++]=g:(g<2048?f[v++]=192|g>>>6:(g<65536?f[v++]=224|g>>>12:(f[v++]=240|g>>>18,f[v++]=128|g>>>12&63),f[v++]=128|g>>>6&63),f[v++]=128|63&g);return f})(d)},n.utf8decode=function(d){return o.nodebuffer?r.transformTo("nodebuffer",d).toString("utf-8"):(function(w){var f,g,m,y,v=w.length,_=new Array(2*v);for(f=g=0;f<v;)if((m=w[f++])<128)_[g++]=m;else if(4<(y=a[m]))_[g++]=65533,f+=y-1;else{for(m&=y===2?31:y===3?15:7;1<y&&f<v;)m=m<<6|63&w[f++],y--;1<y?_[g++]=65533:m<65536?_[g++]=m:(m-=65536,_[g++]=55296|m>>10&1023,_[g++]=56320|1023&m)}return _.length!==g&&(_.subarray?_=_.subarray(0,g):_.length=g),r.applyFromCharCode(_)})(d=r.transformTo(o.uint8array?"uint8array":"array",d))},r.inherits(u,s),u.prototype.processChunk=function(d){var w=r.transformTo(o.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var f=w;(w=new Uint8Array(f.length+this.leftOver.length)).set(this.leftOver,0),w.set(f,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var g=(function(y,v){var _;for((v=v||y.length)>y.length&&(v=y.length),_=v-1;0<=_&&(192&y[_])==128;)_--;return _<0||_===0?v:_+a[y[_]]>v?_:v})(w),m=w;g!==w.length&&(o.uint8array?(m=w.subarray(0,g),this.leftOver=w.subarray(g,w.length)):(m=w.slice(0,g),this.leftOver=w.slice(g,w.length))),this.push({data:n.utf8decode(m),meta:d.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=u,r.inherits(h,s),h.prototype.processChunk=function(d){this.push({data:n.utf8encode(d.data),meta:d.meta})},n.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,n){"use strict";var r=t("./support"),o=t("./base64"),i=t("./nodejsUtils"),s=t("./external");function a(f){return f}function l(f,g){for(var m=0;m<f.length;++m)g[m]=255&f.charCodeAt(m);return g}t("setimmediate"),n.newBlob=function(f,g){n.checkSupport("blob");try{return new Blob([f],{type:g})}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return m.append(f),m.getBlob(g)}catch{throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(f,g,m){var y=[],v=0,_=f.length;if(_<=m)return String.fromCharCode.apply(null,f);for(;v<_;)g==="array"||g==="nodebuffer"?y.push(String.fromCharCode.apply(null,f.slice(v,Math.min(v+m,_)))):y.push(String.fromCharCode.apply(null,f.subarray(v,Math.min(v+m,_)))),v+=m;return y.join("")},stringifyByChar:function(f){for(var g="",m=0;m<f.length;m++)g+=String.fromCharCode(f[m]);return g},applyCanBeUsed:{uint8array:(function(){try{return r.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return r.nodebuffer&&String.fromCharCode.apply(null,i.allocBuffer(1)).length===1}catch{return!1}})()}};function h(f){var g=65536,m=n.getTypeOf(f),y=!0;if(m==="uint8array"?y=u.applyCanBeUsed.uint8array:m==="nodebuffer"&&(y=u.applyCanBeUsed.nodebuffer),y)for(;1<g;)try{return u.stringifyByChunk(f,m,g)}catch{g=Math.floor(g/2)}return u.stringifyByChar(f)}function d(f,g){for(var m=0;m<f.length;m++)g[m]=f[m];return g}n.applyFromCharCode=h;var w={};w.string={string:a,array:function(f){return l(f,new Array(f.length))},arraybuffer:function(f){return w.string.uint8array(f).buffer},uint8array:function(f){return l(f,new Uint8Array(f.length))},nodebuffer:function(f){return l(f,i.allocBuffer(f.length))}},w.array={string:h,array:a,arraybuffer:function(f){return new Uint8Array(f).buffer},uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return i.newBufferFrom(f)}},w.arraybuffer={string:function(f){return h(new Uint8Array(f))},array:function(f){return d(new Uint8Array(f),new Array(f.byteLength))},arraybuffer:a,uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return i.newBufferFrom(new Uint8Array(f))}},w.uint8array={string:h,array:function(f){return d(f,new Array(f.length))},arraybuffer:function(f){return f.buffer},uint8array:a,nodebuffer:function(f){return i.newBufferFrom(f)}},w.nodebuffer={string:h,array:function(f){return d(f,new Array(f.length))},arraybuffer:function(f){return w.nodebuffer.uint8array(f).buffer},uint8array:function(f){return d(f,new Uint8Array(f.length))},nodebuffer:a},n.transformTo=function(f,g){if(g=g||"",!f)return g;n.checkSupport(f);var m=n.getTypeOf(g);return w[m][f](g)},n.resolve=function(f){for(var g=f.split("/"),m=[],y=0;y<g.length;y++){var v=g[y];v==="."||v===""&&y!==0&&y!==g.length-1||(v===".."?m.pop():m.push(v))}return m.join("/")},n.getTypeOf=function(f){if(typeof f=="string")return"string";var g=Object.prototype.toString.call(f);return g==="[object Array]"?"array":r.nodebuffer&&i.isBuffer(f)?"nodebuffer":r.uint8array&&g==="[object Uint8Array]"?"uint8array":r.arraybuffer&&g==="[object ArrayBuffer]"?"arraybuffer":void 0},n.checkSupport=function(f){if(!r[f.toLowerCase()])throw new Error(f+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(f){var g,m,y="";for(m=0;m<(f||"").length;m++)y+="\\x"+((g=f.charCodeAt(m))<16?"0":"")+g.toString(16).toUpperCase();return y},n.delay=function(f,g,m){setImmediate(function(){f.apply(m||null,g||[])})},n.inherits=function(f,g){function m(){}m.prototype=g.prototype,f.prototype=new m},n.extend=function(){var f,g,m={};for(f=0;f<arguments.length;f++)for(g in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],g)&&m[g]===void 0&&(m[g]=arguments[f][g]);return m},n.prepareContent=function(f,g,m,y,v){return s.Promise.resolve(g).then(function(_){return r.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)?Blob.prototype.arrayBuffer!==void 0?_.arrayBuffer():typeof FileReader<"u"?new s.Promise(function(T,D){var C=new FileReader;C.onload=function(F){T(F.target.result)},C.onerror=function(F){D(F.target.error)},C.readAsArrayBuffer(_)}):s.Promise.reject(new Error(f+" is a Blob, but we have no way of reading it.")):_}).then(function(_){var T=n.getTypeOf(_);return T?(T==="arraybuffer"?_=n.transformTo("uint8array",_):T==="string"&&(v?_=o.decode(_):m&&y!==!0&&(_=(function(D){return l(D,r.uint8array?new Uint8Array(D.length):new Array(D.length))})(_))),_):s.Promise.reject(new Error("Can't read the data of '"+f+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,e,n){"use strict";var r=t("./reader/readerFor"),o=t("./utils"),i=t("./signature"),s=t("./zipEntry"),a=t("./support");function l(u){this.files=[],this.loadOptions=u}l.prototype={checkSignature:function(u){if(!this.reader.readAndCheckSignature(u)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(h)+", expected "+o.pretty(u)+")")}},isSignature:function(u,h){var d=this.reader.index;this.reader.setIndex(u);var w=this.reader.readString(4)===h;return this.reader.setIndex(d),w},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var u=this.reader.readData(this.zipCommentLength),h=a.uint8array?"uint8array":"array",d=o.transformTo(h,u);this.zipComment=this.loadOptions.decodeFileName(d)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var u,h,d,w=this.zip64EndOfCentralSize-44;0<w;)u=this.reader.readInt(2),h=this.reader.readInt(4),d=this.reader.readData(h),this.zip64ExtensibleData[u]={id:u,length:h,value:d}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var u,h;for(u=0;u<this.files.length;u++)h=this.files[u],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(i.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var u;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER);)(u=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(u);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var u=this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);if(u<0)throw this.isSignature(0,i.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(u);var h=u;if(this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(u=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(u),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var d=this.centralDirOffset+this.centralDirSize;this.zip64&&(d+=20,d+=12+this.zip64EndOfCentralSize);var w=h-d;if(0<w)this.isSignature(h,i.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(u){this.reader=r(u)},load:function(u){this.prepareReader(u),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,e,n){"use strict";var r=t("./reader/readerFor"),o=t("./utils"),i=t("./compressedObject"),s=t("./crc32"),a=t("./utf8"),l=t("./compressions"),u=t("./support");function h(d,w){this.options=d,this.loadOptions=w}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(d){var w,f;if(d.skip(22),this.fileNameLength=d.readInt(2),f=d.readInt(2),this.fileName=d.readData(this.fileNameLength),d.skip(f),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((w=(function(g){for(var m in l)if(Object.prototype.hasOwnProperty.call(l,m)&&l[m].magic===g)return l[m];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,w,d.readData(this.compressedSize))},readCentralPart:function(d){this.versionMadeBy=d.readInt(2),d.skip(2),this.bitFlag=d.readInt(2),this.compressionMethod=d.readString(2),this.date=d.readDate(),this.crc32=d.readInt(4),this.compressedSize=d.readInt(4),this.uncompressedSize=d.readInt(4);var w=d.readInt(2);if(this.extraFieldsLength=d.readInt(2),this.fileCommentLength=d.readInt(2),this.diskNumberStart=d.readInt(2),this.internalFileAttributes=d.readInt(2),this.externalFileAttributes=d.readInt(4),this.localHeaderOffset=d.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");d.skip(w),this.readExtraFields(d),this.parseZIP64ExtraField(d),this.fileComment=d.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var d=this.versionMadeBy>>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=r(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var w,f,g,m=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4<m;)w=d.readInt(2),f=d.readInt(2),g=d.readData(f),this.extraFields[w]={id:w,length:f,value:g};d.setIndex(m)},handleUTF8:function(){var d=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var w=this.findExtraFieldUnicodePath();if(w!==null)this.fileNameStr=w;else{var f=o.transformTo(d,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(f)}var g=this.findExtraFieldUnicodeComment();if(g!==null)this.fileCommentStr=g;else{var m=o.transformTo(d,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(m)}}},findExtraFieldUnicodePath:function(){var d=this.extraFields[28789];if(d){var w=r(d.value);return w.readInt(1)!==1||s(this.fileName)!==w.readInt(4)?null:a.utf8decode(w.readData(d.length-5))}return null},findExtraFieldUnicodeComment:function(){var d=this.extraFields[25461];if(d){var w=r(d.value);return w.readInt(1)!==1||s(this.fileComment)!==w.readInt(4)?null:a.utf8decode(w.readData(d.length-5))}return null}},e.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,n){"use strict";function r(w,f,g){this.name=w,this.dir=g.dir,this.date=g.date,this.comment=g.comment,this.unixPermissions=g.unixPermissions,this.dosPermissions=g.dosPermissions,this._data=f,this._dataBinary=g.binary,this.options={compression:g.compression,compressionOptions:g.compressionOptions}}var o=t("./stream/StreamHelper"),i=t("./stream/DataWorker"),s=t("./utf8"),a=t("./compressedObject"),l=t("./stream/GenericWorker");r.prototype={internalStream:function(w){var f=null,g="string";try{if(!w)throw new Error("No output type specified.");var m=(g=w.toLowerCase())==="string"||g==="text";g!=="binarystring"&&g!=="text"||(g="string"),f=this._decompressWorker();var y=!this._dataBinary;y&&!m&&(f=f.pipe(new s.Utf8EncodeWorker)),!y&&m&&(f=f.pipe(new s.Utf8DecodeWorker))}catch(v){(f=new l("error")).error(v)}return new o(f,g,"")},async:function(w,f){return this.internalStream(w).accumulate(f)},nodeStream:function(w,f){return this.internalStream(w||"nodebuffer").toNodejsStream(f)},_compressWorker:function(w,f){if(this._data instanceof a&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var g=this._decompressWorker();return this._dataBinary||(g=g.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(g,w,f)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new i(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<u.length;d++)r.prototype[u[d]]=h;e.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,e,n){(function(r){"use strict";var o,i,s=r.MutationObserver||r.WebKitMutationObserver;if(s){var a=0,l=new s(w),u=r.document.createTextNode("");l.observe(u,{characterData:!0}),o=function(){u.data=a=++a%2}}else if(r.setImmediate||r.MessageChannel===void 0)o="document"in r&&"onreadystatechange"in r.document.createElement("script")?function(){var f=r.document.createElement("script");f.onreadystatechange=function(){w(),f.onreadystatechange=null,f.parentNode.removeChild(f),f=null},r.document.documentElement.appendChild(f)}:function(){setTimeout(w,0)};else{var h=new r.MessageChannel;h.port1.onmessage=w,o=function(){h.port2.postMessage(0)}}var d=[];function w(){var f,g;i=!0;for(var m=d.length;m;){for(g=d,d=[],f=-1;++f<m;)g[f]();m=d.length}i=!1}e.exports=function(f){d.push(f)!==1||i||o()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,e,n){"use strict";var r=t("immediate");function o(){}var i={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function u(m){if(typeof m!="function")throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,m!==o&&f(this,m)}function h(m,y,v){this.promise=m,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof v=="function"&&(this.onRejected=v,this.callRejected=this.otherCallRejected)}function d(m,y,v){r(function(){var _;try{_=y(v)}catch(T){return i.reject(m,T)}_===m?i.reject(m,new TypeError("Cannot resolve promise with itself")):i.resolve(m,_)})}function w(m){var y=m&&m.then;if(m&&(typeof m=="object"||typeof m=="function")&&typeof y=="function")return function(){y.apply(m,arguments)}}function f(m,y){var v=!1;function _(C){v||(v=!0,i.reject(m,C))}function T(C){v||(v=!0,i.resolve(m,C))}var D=g(function(){y(T,_)});D.status==="error"&&_(D.value)}function g(m,y){var v={};try{v.value=m(y),v.status="success"}catch(_){v.status="error",v.value=_}return v}(e.exports=u).prototype.finally=function(m){if(typeof m!="function")return this;var y=this.constructor;return this.then(function(v){return y.resolve(m()).then(function(){return v})},function(v){return y.resolve(m()).then(function(){throw v})})},u.prototype.catch=function(m){return this.then(null,m)},u.prototype.then=function(m,y){if(typeof m!="function"&&this.state===a||typeof y!="function"&&this.state===s)return this;var v=new this.constructor(o);return this.state!==l?d(v,this.state===a?m:y,this.outcome):this.queue.push(new h(v,m,y)),v},h.prototype.callFulfilled=function(m){i.resolve(this.promise,m)},h.prototype.otherCallFulfilled=function(m){d(this.promise,this.onFulfilled,m)},h.prototype.callRejected=function(m){i.reject(this.promise,m)},h.prototype.otherCallRejected=function(m){d(this.promise,this.onRejected,m)},i.resolve=function(m,y){var v=g(w,y);if(v.status==="error")return i.reject(m,v.value);var _=v.value;if(_)f(m,_);else{m.state=a,m.outcome=y;for(var T=-1,D=m.queue.length;++T<D;)m.queue[T].callFulfilled(y)}return m},i.reject=function(m,y){m.state=s,m.outcome=y;for(var v=-1,_=m.queue.length;++v<_;)m.queue[v].callRejected(y);return m},u.resolve=function(m){return m instanceof this?m:i.resolve(new this(o),m)},u.reject=function(m){var y=new this(o);return i.reject(y,m)},u.all=function(m){var y=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var v=m.length,_=!1;if(!v)return this.resolve([]);for(var T=new Array(v),D=0,C=-1,F=new this(o);++C<v;)N(m[C],C);return F;function N(B,Y){y.resolve(B).then(function(S){T[Y]=S,++D!==v||_||(_=!0,i.resolve(F,T))},function(S){_||(_=!0,i.reject(F,S))})}},u.race=function(m){var y=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var v=m.length,_=!1;if(!v)return this.resolve([]);for(var T=-1,D=new this(o);++T<v;)C=m[T],y.resolve(C).then(function(F){_||(_=!0,i.resolve(D,F))},function(F){_||(_=!0,i.reject(D,F))});var C;return D}},{immediate:36}],38:[function(t,e,n){"use strict";var r={};(0,t("./lib/utils/common").assign)(r,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,n){"use strict";var r=t("./zlib/deflate"),o=t("./utils/common"),i=t("./utils/strings"),s=t("./zlib/messages"),a=t("./zlib/zstream"),l=Object.prototype.toString,u=0,h=-1,d=0,w=8;function f(m){if(!(this instanceof f))return new f(m);this.options=o.assign({level:h,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},m||{});var y=this.options;y.raw&&0<y.windowBits?y.windowBits=-y.windowBits:y.gzip&&0<y.windowBits&&y.windowBits<16&&(y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var v=r.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(v!==u)throw new Error(s[v]);if(y.header&&r.deflateSetHeader(this.strm,y.header),y.dictionary){var _;if(_=typeof y.dictionary=="string"?i.string2buf(y.dictionary):l.call(y.dictionary)==="[object ArrayBuffer]"?new Uint8Array(y.dictionary):y.dictionary,(v=r.deflateSetDictionary(this.strm,_))!==u)throw new Error(s[v]);this._dict_set=!0}}function g(m,y){var v=new f(y);if(v.push(m,!0),v.err)throw v.msg||s[v.err];return v.result}f.prototype.push=function(m,y){var v,_,T=this.strm,D=this.options.chunkSize;if(this.ended)return!1;_=y===~~y?y:y===!0?4:0,typeof m=="string"?T.input=i.string2buf(m):l.call(m)==="[object ArrayBuffer]"?T.input=new Uint8Array(m):T.input=m,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new o.Buf8(D),T.next_out=0,T.avail_out=D),(v=r.deflate(T,_))!==1&&v!==u)return this.onEnd(v),!(this.ended=!0);T.avail_out!==0&&(T.avail_in!==0||_!==4&&_!==2)||(this.options.to==="string"?this.onData(i.buf2binstring(o.shrinkBuf(T.output,T.next_out))):this.onData(o.shrinkBuf(T.output,T.next_out)))}while((0<T.avail_in||T.avail_out===0)&&v!==1);return _===4?(v=r.deflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===u):_!==2||(this.onEnd(u),!(T.avail_out=0))},f.prototype.onData=function(m){this.chunks.push(m)},f.prototype.onEnd=function(m){m===u&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},n.Deflate=f,n.deflate=g,n.deflateRaw=function(m,y){return(y=y||{}).raw=!0,g(m,y)},n.gzip=function(m,y){return(y=y||{}).gzip=!0,g(m,y)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,n){"use strict";var r=t("./zlib/inflate"),o=t("./utils/common"),i=t("./utils/strings"),s=t("./zlib/constants"),a=t("./zlib/messages"),l=t("./zlib/zstream"),u=t("./zlib/gzheader"),h=Object.prototype.toString;function d(f){if(!(this instanceof d))return new d(f);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},f||{});var g=this.options;g.raw&&0<=g.windowBits&&g.windowBits<16&&(g.windowBits=-g.windowBits,g.windowBits===0&&(g.windowBits=-15)),!(0<=g.windowBits&&g.windowBits<16)||f&&f.windowBits||(g.windowBits+=32),15<g.windowBits&&g.windowBits<48&&(15&g.windowBits)==0&&(g.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var m=r.inflateInit2(this.strm,g.windowBits);if(m!==s.Z_OK)throw new Error(a[m]);this.header=new u,r.inflateGetHeader(this.strm,this.header)}function w(f,g){var m=new d(g);if(m.push(f,!0),m.err)throw m.msg||a[m.err];return m.result}d.prototype.push=function(f,g){var m,y,v,_,T,D,C=this.strm,F=this.options.chunkSize,N=this.options.dictionary,B=!1;if(this.ended)return!1;y=g===~~g?g:g===!0?s.Z_FINISH:s.Z_NO_FLUSH,typeof f=="string"?C.input=i.binstring2buf(f):h.call(f)==="[object ArrayBuffer]"?C.input=new Uint8Array(f):C.input=f,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new o.Buf8(F),C.next_out=0,C.avail_out=F),(m=r.inflate(C,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&N&&(D=typeof N=="string"?i.string2buf(N):h.call(N)==="[object ArrayBuffer]"?new Uint8Array(N):N,m=r.inflateSetDictionary(this.strm,D)),m===s.Z_BUF_ERROR&&B===!0&&(m=s.Z_OK,B=!1),m!==s.Z_STREAM_END&&m!==s.Z_OK)return this.onEnd(m),!(this.ended=!0);C.next_out&&(C.avail_out!==0&&m!==s.Z_STREAM_END&&(C.avail_in!==0||y!==s.Z_FINISH&&y!==s.Z_SYNC_FLUSH)||(this.options.to==="string"?(v=i.utf8border(C.output,C.next_out),_=C.next_out-v,T=i.buf2string(C.output,v),C.next_out=_,C.avail_out=F-_,_&&o.arraySet(C.output,C.output,v,_,0),this.onData(T)):this.onData(o.shrinkBuf(C.output,C.next_out)))),C.avail_in===0&&C.avail_out===0&&(B=!0)}while((0<C.avail_in||C.avail_out===0)&&m!==s.Z_STREAM_END);return m===s.Z_STREAM_END&&(y=s.Z_FINISH),y===s.Z_FINISH?(m=r.inflateEnd(this.strm),this.onEnd(m),this.ended=!0,m===s.Z_OK):y!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(C.avail_out=0))},d.prototype.onData=function(f){this.chunks.push(f)},d.prototype.onEnd=function(f){f===s.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},n.Inflate=d,n.inflate=w,n.inflateRaw=function(f,g){return(g=g||{}).raw=!0,w(f,g)},n.ungzip=w},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,n){"use strict";var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";n.assign=function(s){for(var a=Array.prototype.slice.call(arguments,1);a.length;){var l=a.shift();if(l){if(typeof l!="object")throw new TypeError(l+"must be non-object");for(var u in l)l.hasOwnProperty(u)&&(s[u]=l[u])}}return s},n.shrinkBuf=function(s,a){return s.length===a?s:s.subarray?s.subarray(0,a):(s.length=a,s)};var o={arraySet:function(s,a,l,u,h){if(a.subarray&&s.subarray)s.set(a.subarray(l,l+u),h);else for(var d=0;d<u;d++)s[h+d]=a[l+d]},flattenChunks:function(s){var a,l,u,h,d,w;for(a=u=0,l=s.length;a<l;a++)u+=s[a].length;for(w=new Uint8Array(u),a=h=0,l=s.length;a<l;a++)d=s[a],w.set(d,h),h+=d.length;return w}},i={arraySet:function(s,a,l,u,h){for(var d=0;d<u;d++)s[h+d]=a[l+d]},flattenChunks:function(s){return[].concat.apply([],s)}};n.setTyped=function(s){s?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,o)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,i))},n.setTyped(r)},{}],42:[function(t,e,n){"use strict";var r=t("./common"),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{i=!1}for(var s=new r.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(u,h){if(h<65537&&(u.subarray&&i||!u.subarray&&o))return String.fromCharCode.apply(null,r.shrinkBuf(u,h));for(var d="",w=0;w<h;w++)d+=String.fromCharCode(u[w]);return d}s[254]=s[254]=1,n.string2buf=function(u){var h,d,w,f,g,m=u.length,y=0;for(f=0;f<m;f++)(64512&(d=u.charCodeAt(f)))==55296&&f+1<m&&(64512&(w=u.charCodeAt(f+1)))==56320&&(d=65536+(d-55296<<10)+(w-56320),f++),y+=d<128?1:d<2048?2:d<65536?3:4;for(h=new r.Buf8(y),f=g=0;g<y;f++)(64512&(d=u.charCodeAt(f)))==55296&&f+1<m&&(64512&(w=u.charCodeAt(f+1)))==56320&&(d=65536+(d-55296<<10)+(w-56320),f++),d<128?h[g++]=d:(d<2048?h[g++]=192|d>>>6:(d<65536?h[g++]=224|d>>>12:(h[g++]=240|d>>>18,h[g++]=128|d>>>12&63),h[g++]=128|d>>>6&63),h[g++]=128|63&d);return h},n.buf2binstring=function(u){return l(u,u.length)},n.binstring2buf=function(u){for(var h=new r.Buf8(u.length),d=0,w=h.length;d<w;d++)h[d]=u.charCodeAt(d);return h},n.buf2string=function(u,h){var d,w,f,g,m=h||u.length,y=new Array(2*m);for(d=w=0;d<m;)if((f=u[d++])<128)y[w++]=f;else if(4<(g=s[f]))y[w++]=65533,d+=g-1;else{for(f&=g===2?31:g===3?15:7;1<g&&d<m;)f=f<<6|63&u[d++],g--;1<g?y[w++]=65533:f<65536?y[w++]=f:(f-=65536,y[w++]=55296|f>>10&1023,y[w++]=56320|1023&f)}return l(y,w)},n.utf8border=function(u,h){var d;for((h=h||u.length)>u.length&&(h=u.length),d=h-1;0<=d&&(192&u[d])==128;)d--;return d<0||d===0?h:d+s[u[d]]>h?d:h}},{"./common":41}],43:[function(t,e,n){"use strict";e.exports=function(r,o,i,s){for(var a=65535&r|0,l=r>>>16&65535|0,u=0;i!==0;){for(i-=u=2e3<i?2e3:i;l=l+(a=a+o[s++]|0)|0,--u;);a%=65521,l%=65521}return a|l<<16|0}},{}],44:[function(t,e,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,e,n){"use strict";var r=(function(){for(var o,i=[],s=0;s<256;s++){o=s;for(var a=0;a<8;a++)o=1&o?3988292384^o>>>1:o>>>1;i[s]=o}return i})();e.exports=function(o,i,s,a){var l=r,u=a+s;o^=-1;for(var h=a;h<u;h++)o=o>>>8^l[255&(o^i[h])];return-1^o}},{}],46:[function(t,e,n){"use strict";var r,o=t("../utils/common"),i=t("./trees"),s=t("./adler32"),a=t("./crc32"),l=t("./messages"),u=0,h=4,d=0,w=-2,f=-1,g=4,m=2,y=8,v=9,_=286,T=30,D=19,C=2*_+1,F=15,N=3,B=258,Y=B+N+1,S=42,$=113,p=1,P=2,st=3,M=4;function lt(c,R){return c.msg=l[R],R}function U(c){return(c<<1)-(4<c?9:0)}function nt(c){for(var R=c.length;0<=--R;)c[R]=0}function I(c){var R=c.state,A=R.pending;A>c.avail_out&&(A=c.avail_out),A!==0&&(o.arraySet(c.output,R.pending_buf,R.pending_out,A,c.next_out),c.next_out+=A,R.pending_out+=A,c.total_out+=A,c.avail_out-=A,R.pending-=A,R.pending===0&&(R.pending_out=0))}function E(c,R){i._tr_flush_block(c,0<=c.block_start?c.block_start:-1,c.strstart-c.block_start,R),c.block_start=c.strstart,I(c.strm)}function tt(c,R){c.pending_buf[c.pending++]=R}function G(c,R){c.pending_buf[c.pending++]=R>>>8&255,c.pending_buf[c.pending++]=255&R}function H(c,R){var A,x,b=c.max_chain_length,k=c.strstart,j=c.prev_length,L=c.nice_match,O=c.strstart>c.w_size-Y?c.strstart-(c.w_size-Y):0,X=c.window,J=c.w_mask,W=c.prev,Q=c.strstart+B,bt=X[k+j-1],dt=X[k+j];c.prev_length>=c.good_match&&(b>>=2),L>c.lookahead&&(L=c.lookahead);do if(X[(A=R)+j]===dt&&X[A+j-1]===bt&&X[A]===X[k]&&X[++A]===X[k+1]){k+=2,A++;do;while(X[++k]===X[++A]&&X[++k]===X[++A]&&X[++k]===X[++A]&&X[++k]===X[++A]&&X[++k]===X[++A]&&X[++k]===X[++A]&&X[++k]===X[++A]&&X[++k]===X[++A]&&k<Q);if(x=B-(Q-k),k=Q-B,j<x){if(c.match_start=R,L<=(j=x))break;bt=X[k+j-1],dt=X[k+j]}}while((R=W[R&J])>O&&--b!=0);return j<=c.lookahead?j:c.lookahead}function Tt(c){var R,A,x,b,k,j,L,O,X,J,W=c.w_size;do{if(b=c.window_size-c.lookahead-c.strstart,c.strstart>=W+(W-Y)){for(o.arraySet(c.window,c.window,W,W,0),c.match_start-=W,c.strstart-=W,c.block_start-=W,R=A=c.hash_size;x=c.head[--R],c.head[R]=W<=x?x-W:0,--A;);for(R=A=W;x=c.prev[--R],c.prev[R]=W<=x?x-W:0,--A;);b+=W}if(c.strm.avail_in===0)break;if(j=c.strm,L=c.window,O=c.strstart+c.lookahead,X=b,J=void 0,J=j.avail_in,X<J&&(J=X),A=J===0?0:(j.avail_in-=J,o.arraySet(L,j.input,j.next_in,J,O),j.state.wrap===1?j.adler=s(j.adler,L,J,O):j.state.wrap===2&&(j.adler=a(j.adler,L,J,O)),j.next_in+=J,j.total_in+=J,J),c.lookahead+=A,c.lookahead+c.insert>=N)for(k=c.strstart-c.insert,c.ins_h=c.window[k],c.ins_h=(c.ins_h<<c.hash_shift^c.window[k+1])&c.hash_mask;c.insert&&(c.ins_h=(c.ins_h<<c.hash_shift^c.window[k+N-1])&c.hash_mask,c.prev[k&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=k,k++,c.insert--,!(c.lookahead+c.insert<N)););}while(c.lookahead<Y&&c.strm.avail_in!==0)}function jt(c,R){for(var A,x;;){if(c.lookahead<Y){if(Tt(c),c.lookahead<Y&&R===u)return p;if(c.lookahead===0)break}if(A=0,c.lookahead>=N&&(c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+N-1])&c.hash_mask,A=c.prev[c.strstart&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=c.strstart),A!==0&&c.strstart-A<=c.w_size-Y&&(c.match_length=H(c,A)),c.match_length>=N)if(x=i._tr_tally(c,c.strstart-c.match_start,c.match_length-N),c.lookahead-=c.match_length,c.match_length<=c.max_lazy_match&&c.lookahead>=N){for(c.match_length--;c.strstart++,c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+N-1])&c.hash_mask,A=c.prev[c.strstart&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=c.strstart,--c.match_length!=0;);c.strstart++}else c.strstart+=c.match_length,c.match_length=0,c.ins_h=c.window[c.strstart],c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+1])&c.hash_mask;else x=i._tr_tally(c,0,c.window[c.strstart]),c.lookahead--,c.strstart++;if(x&&(E(c,!1),c.strm.avail_out===0))return p}return c.insert=c.strstart<N-1?c.strstart:N-1,R===h?(E(c,!0),c.strm.avail_out===0?st:M):c.last_lit&&(E(c,!1),c.strm.avail_out===0)?p:P}function ft(c,R){for(var A,x,b;;){if(c.lookahead<Y){if(Tt(c),c.lookahead<Y&&R===u)return p;if(c.lookahead===0)break}if(A=0,c.lookahead>=N&&(c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+N-1])&c.hash_mask,A=c.prev[c.strstart&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=c.strstart),c.prev_length=c.match_length,c.prev_match=c.match_start,c.match_length=N-1,A!==0&&c.prev_length<c.max_lazy_match&&c.strstart-A<=c.w_size-Y&&(c.match_length=H(c,A),c.match_length<=5&&(c.strategy===1||c.match_length===N&&4096<c.strstart-c.match_start)&&(c.match_length=N-1)),c.prev_length>=N&&c.match_length<=c.prev_length){for(b=c.strstart+c.lookahead-N,x=i._tr_tally(c,c.strstart-1-c.prev_match,c.prev_length-N),c.lookahead-=c.prev_length-1,c.prev_length-=2;++c.strstart<=b&&(c.ins_h=(c.ins_h<<c.hash_shift^c.window[c.strstart+N-1])&c.hash_mask,A=c.prev[c.strstart&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=c.strstart),--c.prev_length!=0;);if(c.match_available=0,c.match_length=N-1,c.strstart++,x&&(E(c,!1),c.strm.avail_out===0))return p}else if(c.match_available){if((x=i._tr_tally(c,0,c.window[c.strstart-1]))&&E(c,!1),c.strstart++,c.lookahead--,c.strm.avail_out===0)return p}else c.match_available=1,c.strstart++,c.lookahead--}return c.match_available&&(x=i._tr_tally(c,0,c.window[c.strstart-1]),c.match_available=0),c.insert=c.strstart<N-1?c.strstart:N-1,R===h?(E(c,!0),c.strm.avail_out===0?st:M):c.last_lit&&(E(c,!1),c.strm.avail_out===0)?p:P}function mt(c,R,A,x,b){this.good_length=c,this.max_lazy=R,this.nice_length=A,this.max_chain=x,this.func=b}function Dt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*C),this.dyn_dtree=new o.Buf16(2*(2*T+1)),this.bl_tree=new o.Buf16(2*(2*D+1)),nt(this.dyn_ltree),nt(this.dyn_dtree),nt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(F+1),this.heap=new o.Buf16(2*_+1),nt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*_+1),nt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function kt(c){var R;return c&&c.state?(c.total_in=c.total_out=0,c.data_type=m,(R=c.state).pending=0,R.pending_out=0,R.wrap<0&&(R.wrap=-R.wrap),R.status=R.wrap?S:$,c.adler=R.wrap===2?0:1,R.last_flush=u,i._tr_init(R),d):lt(c,w)}function oe(c){var R=kt(c);return R===d&&(function(A){A.window_size=2*A.w_size,nt(A.head),A.max_lazy_match=r[A.level].max_lazy,A.good_match=r[A.level].good_length,A.nice_match=r[A.level].nice_length,A.max_chain_length=r[A.level].max_chain,A.strstart=0,A.block_start=0,A.lookahead=0,A.insert=0,A.match_length=A.prev_length=N-1,A.match_available=0,A.ins_h=0})(c.state),R}function ne(c,R,A,x,b,k){if(!c)return w;var j=1;if(R===f&&(R=6),x<0?(j=0,x=-x):15<x&&(j=2,x-=16),b<1||v<b||A!==y||x<8||15<x||R<0||9<R||k<0||g<k)return lt(c,w);x===8&&(x=9);var L=new Dt;return(c.state=L).strm=c,L.wrap=j,L.gzhead=null,L.w_bits=x,L.w_size=1<<L.w_bits,L.w_mask=L.w_size-1,L.hash_bits=b+7,L.hash_size=1<<L.hash_bits,L.hash_mask=L.hash_size-1,L.hash_shift=~~((L.hash_bits+N-1)/N),L.window=new o.Buf8(2*L.w_size),L.head=new o.Buf16(L.hash_size),L.prev=new o.Buf16(L.w_size),L.lit_bufsize=1<<b+6,L.pending_buf_size=4*L.lit_bufsize,L.pending_buf=new o.Buf8(L.pending_buf_size),L.d_buf=1*L.lit_bufsize,L.l_buf=3*L.lit_bufsize,L.level=R,L.strategy=k,L.method=A,oe(c)}r=[new mt(0,0,0,0,function(c,R){var A=65535;for(A>c.pending_buf_size-5&&(A=c.pending_buf_size-5);;){if(c.lookahead<=1){if(Tt(c),c.lookahead===0&&R===u)return p;if(c.lookahead===0)break}c.strstart+=c.lookahead,c.lookahead=0;var x=c.block_start+A;if((c.strstart===0||c.strstart>=x)&&(c.lookahead=c.strstart-x,c.strstart=x,E(c,!1),c.strm.avail_out===0)||c.strstart-c.block_start>=c.w_size-Y&&(E(c,!1),c.strm.avail_out===0))return p}return c.insert=0,R===h?(E(c,!0),c.strm.avail_out===0?st:M):(c.strstart>c.block_start&&(E(c,!1),c.strm.avail_out),p)}),new mt(4,4,8,4,jt),new mt(4,5,16,8,jt),new mt(4,6,32,32,jt),new mt(4,4,16,16,ft),new mt(8,16,32,32,ft),new mt(8,16,128,128,ft),new mt(8,32,128,256,ft),new mt(32,128,258,1024,ft),new mt(32,258,258,4096,ft)],n.deflateInit=function(c,R){return ne(c,R,y,15,8,0)},n.deflateInit2=ne,n.deflateReset=oe,n.deflateResetKeep=kt,n.deflateSetHeader=function(c,R){return c&&c.state?c.state.wrap!==2?w:(c.state.gzhead=R,d):w},n.deflate=function(c,R){var A,x,b,k;if(!c||!c.state||5<R||R<0)return c?lt(c,w):w;if(x=c.state,!c.output||!c.input&&c.avail_in!==0||x.status===666&&R!==h)return lt(c,c.avail_out===0?-5:w);if(x.strm=c,A=x.last_flush,x.last_flush=R,x.status===S)if(x.wrap===2)c.adler=0,tt(x,31),tt(x,139),tt(x,8),x.gzhead?(tt(x,(x.gzhead.text?1:0)+(x.gzhead.hcrc?2:0)+(x.gzhead.extra?4:0)+(x.gzhead.name?8:0)+(x.gzhead.comment?16:0)),tt(x,255&x.gzhead.time),tt(x,x.gzhead.time>>8&255),tt(x,x.gzhead.time>>16&255),tt(x,x.gzhead.time>>24&255),tt(x,x.level===9?2:2<=x.strategy||x.level<2?4:0),tt(x,255&x.gzhead.os),x.gzhead.extra&&x.gzhead.extra.length&&(tt(x,255&x.gzhead.extra.length),tt(x,x.gzhead.extra.length>>8&255)),x.gzhead.hcrc&&(c.adler=a(c.adler,x.pending_buf,x.pending,0)),x.gzindex=0,x.status=69):(tt(x,0),tt(x,0),tt(x,0),tt(x,0),tt(x,0),tt(x,x.level===9?2:2<=x.strategy||x.level<2?4:0),tt(x,3),x.status=$);else{var j=y+(x.w_bits-8<<4)<<8;j|=(2<=x.strategy||x.level<2?0:x.level<6?1:x.level===6?2:3)<<6,x.strstart!==0&&(j|=32),j+=31-j%31,x.status=$,G(x,j),x.strstart!==0&&(G(x,c.adler>>>16),G(x,65535&c.adler)),c.adler=1}if(x.status===69)if(x.gzhead.extra){for(b=x.pending;x.gzindex<(65535&x.gzhead.extra.length)&&(x.pending!==x.pending_buf_size||(x.gzhead.hcrc&&x.pending>b&&(c.adler=a(c.adler,x.pending_buf,x.pending-b,b)),I(c),b=x.pending,x.pending!==x.pending_buf_size));)tt(x,255&x.gzhead.extra[x.gzindex]),x.gzindex++;x.gzhead.hcrc&&x.pending>b&&(c.adler=a(c.adler,x.pending_buf,x.pending-b,b)),x.gzindex===x.gzhead.extra.length&&(x.gzindex=0,x.status=73)}else x.status=73;if(x.status===73)if(x.gzhead.name){b=x.pending;do{if(x.pending===x.pending_buf_size&&(x.gzhead.hcrc&&x.pending>b&&(c.adler=a(c.adler,x.pending_buf,x.pending-b,b)),I(c),b=x.pending,x.pending===x.pending_buf_size)){k=1;break}k=x.gzindex<x.gzhead.name.length?255&x.gzhead.name.charCodeAt(x.gzindex++):0,tt(x,k)}while(k!==0);x.gzhead.hcrc&&x.pending>b&&(c.adler=a(c.adler,x.pending_buf,x.pending-b,b)),k===0&&(x.gzindex=0,x.status=91)}else x.status=91;if(x.status===91)if(x.gzhead.comment){b=x.pending;do{if(x.pending===x.pending_buf_size&&(x.gzhead.hcrc&&x.pending>b&&(c.adler=a(c.adler,x.pending_buf,x.pending-b,b)),I(c),b=x.pending,x.pending===x.pending_buf_size)){k=1;break}k=x.gzindex<x.gzhead.comment.length?255&x.gzhead.comment.charCodeAt(x.gzindex++):0,tt(x,k)}while(k!==0);x.gzhead.hcrc&&x.pending>b&&(c.adler=a(c.adler,x.pending_buf,x.pending-b,b)),k===0&&(x.status=103)}else x.status=103;if(x.status===103&&(x.gzhead.hcrc?(x.pending+2>x.pending_buf_size&&I(c),x.pending+2<=x.pending_buf_size&&(tt(x,255&c.adler),tt(x,c.adler>>8&255),c.adler=0,x.status=$)):x.status=$),x.pending!==0){if(I(c),c.avail_out===0)return x.last_flush=-1,d}else if(c.avail_in===0&&U(R)<=U(A)&&R!==h)return lt(c,-5);if(x.status===666&&c.avail_in!==0)return lt(c,-5);if(c.avail_in!==0||x.lookahead!==0||R!==u&&x.status!==666){var L=x.strategy===2?(function(O,X){for(var J;;){if(O.lookahead===0&&(Tt(O),O.lookahead===0)){if(X===u)return p;break}if(O.match_length=0,J=i._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++,J&&(E(O,!1),O.strm.avail_out===0))return p}return O.insert=0,X===h?(E(O,!0),O.strm.avail_out===0?st:M):O.last_lit&&(E(O,!1),O.strm.avail_out===0)?p:P})(x,R):x.strategy===3?(function(O,X){for(var J,W,Q,bt,dt=O.window;;){if(O.lookahead<=B){if(Tt(O),O.lookahead<=B&&X===u)return p;if(O.lookahead===0)break}if(O.match_length=0,O.lookahead>=N&&0<O.strstart&&(W=dt[Q=O.strstart-1])===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]){bt=O.strstart+B;do;while(W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&Q<bt);O.match_length=B-(bt-Q),O.match_length>O.lookahead&&(O.match_length=O.lookahead)}if(O.match_length>=N?(J=i._tr_tally(O,1,O.match_length-N),O.lookahead-=O.match_length,O.strstart+=O.match_length,O.match_length=0):(J=i._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++),J&&(E(O,!1),O.strm.avail_out===0))return p}return O.insert=0,X===h?(E(O,!0),O.strm.avail_out===0?st:M):O.last_lit&&(E(O,!1),O.strm.avail_out===0)?p:P})(x,R):r[x.level].func(x,R);if(L!==st&&L!==M||(x.status=666),L===p||L===st)return c.avail_out===0&&(x.last_flush=-1),d;if(L===P&&(R===1?i._tr_align(x):R!==5&&(i._tr_stored_block(x,0,0,!1),R===3&&(nt(x.head),x.lookahead===0&&(x.strstart=0,x.block_start=0,x.insert=0))),I(c),c.avail_out===0))return x.last_flush=-1,d}return R!==h?d:x.wrap<=0?1:(x.wrap===2?(tt(x,255&c.adler),tt(x,c.adler>>8&255),tt(x,c.adler>>16&255),tt(x,c.adler>>24&255),tt(x,255&c.total_in),tt(x,c.total_in>>8&255),tt(x,c.total_in>>16&255),tt(x,c.total_in>>24&255)):(G(x,c.adler>>>16),G(x,65535&c.adler)),I(c),0<x.wrap&&(x.wrap=-x.wrap),x.pending!==0?d:1)},n.deflateEnd=function(c){var R;return c&&c.state?(R=c.state.status)!==S&&R!==69&&R!==73&&R!==91&&R!==103&&R!==$&&R!==666?lt(c,w):(c.state=null,R===$?lt(c,-3):d):w},n.deflateSetDictionary=function(c,R){var A,x,b,k,j,L,O,X,J=R.length;if(!c||!c.state||(k=(A=c.state).wrap)===2||k===1&&A.status!==S||A.lookahead)return w;for(k===1&&(c.adler=s(c.adler,R,J,0)),A.wrap=0,J>=A.w_size&&(k===0&&(nt(A.head),A.strstart=0,A.block_start=0,A.insert=0),X=new o.Buf8(A.w_size),o.arraySet(X,R,J-A.w_size,A.w_size,0),R=X,J=A.w_size),j=c.avail_in,L=c.next_in,O=c.input,c.avail_in=J,c.next_in=0,c.input=R,Tt(A);A.lookahead>=N;){for(x=A.strstart,b=A.lookahead-(N-1);A.ins_h=(A.ins_h<<A.hash_shift^A.window[x+N-1])&A.hash_mask,A.prev[x&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=x,x++,--b;);A.strstart=x,A.lookahead=N-1,Tt(A)}return A.strstart+=A.lookahead,A.block_start=A.strstart,A.insert=A.lookahead,A.lookahead=0,A.match_length=A.prev_length=N-1,A.match_available=0,c.next_in=L,c.input=O,c.avail_in=j,A.wrap=k,d},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,n){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,e,n){"use strict";e.exports=function(r,o){var i,s,a,l,u,h,d,w,f,g,m,y,v,_,T,D,C,F,N,B,Y,S,$,p,P;i=r.state,s=r.next_in,p=r.input,a=s+(r.avail_in-5),l=r.next_out,P=r.output,u=l-(o-r.avail_out),h=l+(r.avail_out-257),d=i.dmax,w=i.wsize,f=i.whave,g=i.wnext,m=i.window,y=i.hold,v=i.bits,_=i.lencode,T=i.distcode,D=(1<<i.lenbits)-1,C=(1<<i.distbits)-1;t:do{v<15&&(y+=p[s++]<<v,v+=8,y+=p[s++]<<v,v+=8),F=_[y&D];e:for(;;){if(y>>>=N=F>>>24,v-=N,(N=F>>>16&255)===0)P[l++]=65535&F;else{if(!(16&N)){if((64&N)==0){F=_[(65535&F)+(y&(1<<N)-1)];continue e}if(32&N){i.mode=12;break t}r.msg="invalid literal/length code",i.mode=30;break t}B=65535&F,(N&=15)&&(v<N&&(y+=p[s++]<<v,v+=8),B+=y&(1<<N)-1,y>>>=N,v-=N),v<15&&(y+=p[s++]<<v,v+=8,y+=p[s++]<<v,v+=8),F=T[y&C];n:for(;;){if(y>>>=N=F>>>24,v-=N,!(16&(N=F>>>16&255))){if((64&N)==0){F=T[(65535&F)+(y&(1<<N)-1)];continue n}r.msg="invalid distance code",i.mode=30;break t}if(Y=65535&F,v<(N&=15)&&(y+=p[s++]<<v,(v+=8)<N&&(y+=p[s++]<<v,v+=8)),d<(Y+=y&(1<<N)-1)){r.msg="invalid distance too far back",i.mode=30;break t}if(y>>>=N,v-=N,(N=l-u)<Y){if(f<(N=Y-N)&&i.sane){r.msg="invalid distance too far back",i.mode=30;break t}if($=m,(S=0)===g){if(S+=w-N,N<B){for(B-=N;P[l++]=m[S++],--N;);S=l-Y,$=P}}else if(g<N){if(S+=w+g-N,(N-=g)<B){for(B-=N;P[l++]=m[S++],--N;);if(S=0,g<B){for(B-=N=g;P[l++]=m[S++],--N;);S=l-Y,$=P}}}else if(S+=g-N,N<B){for(B-=N;P[l++]=m[S++],--N;);S=l-Y,$=P}for(;2<B;)P[l++]=$[S++],P[l++]=$[S++],P[l++]=$[S++],B-=3;B&&(P[l++]=$[S++],1<B&&(P[l++]=$[S++]))}else{for(S=l-Y;P[l++]=P[S++],P[l++]=P[S++],P[l++]=P[S++],2<(B-=3););B&&(P[l++]=P[S++],1<B&&(P[l++]=P[S++]))}break}}break}}while(s<a&&l<h);s-=B=v>>3,y&=(1<<(v-=B<<3))-1,r.next_in=s,r.next_out=l,r.avail_in=s<a?a-s+5:5-(s-a),r.avail_out=l<h?h-l+257:257-(l-h),i.hold=y,i.bits=v}},{}],49:[function(t,e,n){"use strict";var r=t("../utils/common"),o=t("./adler32"),i=t("./crc32"),s=t("./inffast"),a=t("./inftrees"),l=1,u=2,h=0,d=-2,w=1,f=852,g=592;function m(S){return(S>>>24&255)+(S>>>8&65280)+((65280&S)<<8)+((255&S)<<24)}function y(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(S){var $;return S&&S.state?($=S.state,S.total_in=S.total_out=$.total=0,S.msg="",$.wrap&&(S.adler=1&$.wrap),$.mode=w,$.last=0,$.havedict=0,$.dmax=32768,$.head=null,$.hold=0,$.bits=0,$.lencode=$.lendyn=new r.Buf32(f),$.distcode=$.distdyn=new r.Buf32(g),$.sane=1,$.back=-1,h):d}function _(S){var $;return S&&S.state?(($=S.state).wsize=0,$.whave=0,$.wnext=0,v(S)):d}function T(S,$){var p,P;return S&&S.state?(P=S.state,$<0?(p=0,$=-$):(p=1+($>>4),$<48&&($&=15)),$&&($<8||15<$)?d:(P.window!==null&&P.wbits!==$&&(P.window=null),P.wrap=p,P.wbits=$,_(S))):d}function D(S,$){var p,P;return S?(P=new y,(S.state=P).window=null,(p=T(S,$))!==h&&(S.state=null),p):d}var C,F,N=!0;function B(S){if(N){var $;for(C=new r.Buf32(512),F=new r.Buf32(32),$=0;$<144;)S.lens[$++]=8;for(;$<256;)S.lens[$++]=9;for(;$<280;)S.lens[$++]=7;for(;$<288;)S.lens[$++]=8;for(a(l,S.lens,0,288,C,0,S.work,{bits:9}),$=0;$<32;)S.lens[$++]=5;a(u,S.lens,0,32,F,0,S.work,{bits:5}),N=!1}S.lencode=C,S.lenbits=9,S.distcode=F,S.distbits=5}function Y(S,$,p,P){var st,M=S.state;return M.window===null&&(M.wsize=1<<M.wbits,M.wnext=0,M.whave=0,M.window=new r.Buf8(M.wsize)),P>=M.wsize?(r.arraySet(M.window,$,p-M.wsize,M.wsize,0),M.wnext=0,M.whave=M.wsize):(P<(st=M.wsize-M.wnext)&&(st=P),r.arraySet(M.window,$,p-P,st,M.wnext),(P-=st)?(r.arraySet(M.window,$,p-P,P,0),M.wnext=P,M.whave=M.wsize):(M.wnext+=st,M.wnext===M.wsize&&(M.wnext=0),M.whave<M.wsize&&(M.whave+=st))),0}n.inflateReset=_,n.inflateReset2=T,n.inflateResetKeep=v,n.inflateInit=function(S){return D(S,15)},n.inflateInit2=D,n.inflate=function(S,$){var p,P,st,M,lt,U,nt,I,E,tt,G,H,Tt,jt,ft,mt,Dt,kt,oe,ne,c,R,A,x,b=0,k=new r.Buf8(4),j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!S||!S.state||!S.output||!S.input&&S.avail_in!==0)return d;(p=S.state).mode===12&&(p.mode=13),lt=S.next_out,st=S.output,nt=S.avail_out,M=S.next_in,P=S.input,U=S.avail_in,I=p.hold,E=p.bits,tt=U,G=nt,R=h;t:for(;;)switch(p.mode){case w:if(p.wrap===0){p.mode=13;break}for(;E<16;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(2&p.wrap&&I===35615){k[p.check=0]=255&I,k[1]=I>>>8&255,p.check=i(p.check,k,2,0),E=I=0,p.mode=2;break}if(p.flags=0,p.head&&(p.head.done=!1),!(1&p.wrap)||(((255&I)<<8)+(I>>8))%31){S.msg="incorrect header check",p.mode=30;break}if((15&I)!=8){S.msg="unknown compression method",p.mode=30;break}if(E-=4,c=8+(15&(I>>>=4)),p.wbits===0)p.wbits=c;else if(c>p.wbits){S.msg="invalid window size",p.mode=30;break}p.dmax=1<<c,S.adler=p.check=1,p.mode=512&I?10:12,E=I=0;break;case 2:for(;E<16;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(p.flags=I,(255&p.flags)!=8){S.msg="unknown compression method",p.mode=30;break}if(57344&p.flags){S.msg="unknown header flags set",p.mode=30;break}p.head&&(p.head.text=I>>8&1),512&p.flags&&(k[0]=255&I,k[1]=I>>>8&255,p.check=i(p.check,k,2,0)),E=I=0,p.mode=3;case 3:for(;E<32;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}p.head&&(p.head.time=I),512&p.flags&&(k[0]=255&I,k[1]=I>>>8&255,k[2]=I>>>16&255,k[3]=I>>>24&255,p.check=i(p.check,k,4,0)),E=I=0,p.mode=4;case 4:for(;E<16;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}p.head&&(p.head.xflags=255&I,p.head.os=I>>8),512&p.flags&&(k[0]=255&I,k[1]=I>>>8&255,p.check=i(p.check,k,2,0)),E=I=0,p.mode=5;case 5:if(1024&p.flags){for(;E<16;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}p.length=I,p.head&&(p.head.extra_len=I),512&p.flags&&(k[0]=255&I,k[1]=I>>>8&255,p.check=i(p.check,k,2,0)),E=I=0}else p.head&&(p.head.extra=null);p.mode=6;case 6:if(1024&p.flags&&(U<(H=p.length)&&(H=U),H&&(p.head&&(c=p.head.extra_len-p.length,p.head.extra||(p.head.extra=new Array(p.head.extra_len)),r.arraySet(p.head.extra,P,M,H,c)),512&p.flags&&(p.check=i(p.check,P,H,M)),U-=H,M+=H,p.length-=H),p.length))break t;p.length=0,p.mode=7;case 7:if(2048&p.flags){if(U===0)break t;for(H=0;c=P[M+H++],p.head&&c&&p.length<65536&&(p.head.name+=String.fromCharCode(c)),c&&H<U;);if(512&p.flags&&(p.check=i(p.check,P,H,M)),U-=H,M+=H,c)break t}else p.head&&(p.head.name=null);p.length=0,p.mode=8;case 8:if(4096&p.flags){if(U===0)break t;for(H=0;c=P[M+H++],p.head&&c&&p.length<65536&&(p.head.comment+=String.fromCharCode(c)),c&&H<U;);if(512&p.flags&&(p.check=i(p.check,P,H,M)),U-=H,M+=H,c)break t}else p.head&&(p.head.comment=null);p.mode=9;case 9:if(512&p.flags){for(;E<16;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(I!==(65535&p.check)){S.msg="header crc mismatch",p.mode=30;break}E=I=0}p.head&&(p.head.hcrc=p.flags>>9&1,p.head.done=!0),S.adler=p.check=0,p.mode=12;break;case 10:for(;E<32;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}S.adler=p.check=m(I),E=I=0,p.mode=11;case 11:if(p.havedict===0)return S.next_out=lt,S.avail_out=nt,S.next_in=M,S.avail_in=U,p.hold=I,p.bits=E,2;S.adler=p.check=1,p.mode=12;case 12:if($===5||$===6)break t;case 13:if(p.last){I>>>=7&E,E-=7&E,p.mode=27;break}for(;E<3;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}switch(p.last=1&I,E-=1,3&(I>>>=1)){case 0:p.mode=14;break;case 1:if(B(p),p.mode=20,$!==6)break;I>>>=2,E-=2;break t;case 2:p.mode=17;break;case 3:S.msg="invalid block type",p.mode=30}I>>>=2,E-=2;break;case 14:for(I>>>=7&E,E-=7&E;E<32;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if((65535&I)!=(I>>>16^65535)){S.msg="invalid stored block lengths",p.mode=30;break}if(p.length=65535&I,E=I=0,p.mode=15,$===6)break t;case 15:p.mode=16;case 16:if(H=p.length){if(U<H&&(H=U),nt<H&&(H=nt),H===0)break t;r.arraySet(st,P,M,H,lt),U-=H,M+=H,nt-=H,lt+=H,p.length-=H;break}p.mode=12;break;case 17:for(;E<14;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(p.nlen=257+(31&I),I>>>=5,E-=5,p.ndist=1+(31&I),I>>>=5,E-=5,p.ncode=4+(15&I),I>>>=4,E-=4,286<p.nlen||30<p.ndist){S.msg="too many length or distance symbols",p.mode=30;break}p.have=0,p.mode=18;case 18:for(;p.have<p.ncode;){for(;E<3;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}p.lens[j[p.have++]]=7&I,I>>>=3,E-=3}for(;p.have<19;)p.lens[j[p.have++]]=0;if(p.lencode=p.lendyn,p.lenbits=7,A={bits:p.lenbits},R=a(0,p.lens,0,19,p.lencode,0,p.work,A),p.lenbits=A.bits,R){S.msg="invalid code lengths set",p.mode=30;break}p.have=0,p.mode=19;case 19:for(;p.have<p.nlen+p.ndist;){for(;mt=(b=p.lencode[I&(1<<p.lenbits)-1])>>>16&255,Dt=65535&b,!((ft=b>>>24)<=E);){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(Dt<16)I>>>=ft,E-=ft,p.lens[p.have++]=Dt;else{if(Dt===16){for(x=ft+2;E<x;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(I>>>=ft,E-=ft,p.have===0){S.msg="invalid bit length repeat",p.mode=30;break}c=p.lens[p.have-1],H=3+(3&I),I>>>=2,E-=2}else if(Dt===17){for(x=ft+3;E<x;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}E-=ft,c=0,H=3+(7&(I>>>=ft)),I>>>=3,E-=3}else{for(x=ft+7;E<x;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}E-=ft,c=0,H=11+(127&(I>>>=ft)),I>>>=7,E-=7}if(p.have+H>p.nlen+p.ndist){S.msg="invalid bit length repeat",p.mode=30;break}for(;H--;)p.lens[p.have++]=c}}if(p.mode===30)break;if(p.lens[256]===0){S.msg="invalid code -- missing end-of-block",p.mode=30;break}if(p.lenbits=9,A={bits:p.lenbits},R=a(l,p.lens,0,p.nlen,p.lencode,0,p.work,A),p.lenbits=A.bits,R){S.msg="invalid literal/lengths set",p.mode=30;break}if(p.distbits=6,p.distcode=p.distdyn,A={bits:p.distbits},R=a(u,p.lens,p.nlen,p.ndist,p.distcode,0,p.work,A),p.distbits=A.bits,R){S.msg="invalid distances set",p.mode=30;break}if(p.mode=20,$===6)break t;case 20:p.mode=21;case 21:if(6<=U&&258<=nt){S.next_out=lt,S.avail_out=nt,S.next_in=M,S.avail_in=U,p.hold=I,p.bits=E,s(S,G),lt=S.next_out,st=S.output,nt=S.avail_out,M=S.next_in,P=S.input,U=S.avail_in,I=p.hold,E=p.bits,p.mode===12&&(p.back=-1);break}for(p.back=0;mt=(b=p.lencode[I&(1<<p.lenbits)-1])>>>16&255,Dt=65535&b,!((ft=b>>>24)<=E);){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(mt&&(240&mt)==0){for(kt=ft,oe=mt,ne=Dt;mt=(b=p.lencode[ne+((I&(1<<kt+oe)-1)>>kt)])>>>16&255,Dt=65535&b,!(kt+(ft=b>>>24)<=E);){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}I>>>=kt,E-=kt,p.back+=kt}if(I>>>=ft,E-=ft,p.back+=ft,p.length=Dt,mt===0){p.mode=26;break}if(32&mt){p.back=-1,p.mode=12;break}if(64&mt){S.msg="invalid literal/length code",p.mode=30;break}p.extra=15&mt,p.mode=22;case 22:if(p.extra){for(x=p.extra;E<x;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}p.length+=I&(1<<p.extra)-1,I>>>=p.extra,E-=p.extra,p.back+=p.extra}p.was=p.length,p.mode=23;case 23:for(;mt=(b=p.distcode[I&(1<<p.distbits)-1])>>>16&255,Dt=65535&b,!((ft=b>>>24)<=E);){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if((240&mt)==0){for(kt=ft,oe=mt,ne=Dt;mt=(b=p.distcode[ne+((I&(1<<kt+oe)-1)>>kt)])>>>16&255,Dt=65535&b,!(kt+(ft=b>>>24)<=E);){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}I>>>=kt,E-=kt,p.back+=kt}if(I>>>=ft,E-=ft,p.back+=ft,64&mt){S.msg="invalid distance code",p.mode=30;break}p.offset=Dt,p.extra=15&mt,p.mode=24;case 24:if(p.extra){for(x=p.extra;E<x;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}p.offset+=I&(1<<p.extra)-1,I>>>=p.extra,E-=p.extra,p.back+=p.extra}if(p.offset>p.dmax){S.msg="invalid distance too far back",p.mode=30;break}p.mode=25;case 25:if(nt===0)break t;if(H=G-nt,p.offset>H){if((H=p.offset-H)>p.whave&&p.sane){S.msg="invalid distance too far back",p.mode=30;break}Tt=H>p.wnext?(H-=p.wnext,p.wsize-H):p.wnext-H,H>p.length&&(H=p.length),jt=p.window}else jt=st,Tt=lt-p.offset,H=p.length;for(nt<H&&(H=nt),nt-=H,p.length-=H;st[lt++]=jt[Tt++],--H;);p.length===0&&(p.mode=21);break;case 26:if(nt===0)break t;st[lt++]=p.length,nt--,p.mode=21;break;case 27:if(p.wrap){for(;E<32;){if(U===0)break t;U--,I|=P[M++]<<E,E+=8}if(G-=nt,S.total_out+=G,p.total+=G,G&&(S.adler=p.check=p.flags?i(p.check,st,G,lt-G):o(p.check,st,G,lt-G)),G=nt,(p.flags?I:m(I))!==p.check){S.msg="incorrect data check",p.mode=30;break}E=I=0}p.mode=28;case 28:if(p.wrap&&p.flags){for(;E<32;){if(U===0)break t;U--,I+=P[M++]<<E,E+=8}if(I!==(4294967295&p.total)){S.msg="incorrect length check",p.mode=30;break}E=I=0}p.mode=29;case 29:R=1;break t;case 30:R=-3;break t;case 31:return-4;default:return d}return S.next_out=lt,S.avail_out=nt,S.next_in=M,S.avail_in=U,p.hold=I,p.bits=E,(p.wsize||G!==S.avail_out&&p.mode<30&&(p.mode<27||$!==4))&&Y(S,S.output,S.next_out,G-S.avail_out)?(p.mode=31,-4):(tt-=S.avail_in,G-=S.avail_out,S.total_in+=tt,S.total_out+=G,p.total+=G,p.wrap&&G&&(S.adler=p.check=p.flags?i(p.check,st,G,S.next_out-G):o(p.check,st,G,S.next_out-G)),S.data_type=p.bits+(p.last?64:0)+(p.mode===12?128:0)+(p.mode===20||p.mode===15?256:0),(tt==0&&G===0||$===4)&&R===h&&(R=-5),R)},n.inflateEnd=function(S){if(!S||!S.state)return d;var $=S.state;return $.window&&($.window=null),S.state=null,h},n.inflateGetHeader=function(S,$){var p;return S&&S.state?(2&(p=S.state).wrap)==0?d:((p.head=$).done=!1,h):d},n.inflateSetDictionary=function(S,$){var p,P=$.length;return S&&S.state?(p=S.state).wrap!==0&&p.mode!==11?d:p.mode===11&&o(1,$,P,0)!==p.check?-3:Y(S,$,P,P)?(p.mode=31,-4):(p.havedict=1,h):d},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,n){"use strict";var r=t("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(l,u,h,d,w,f,g,m){var y,v,_,T,D,C,F,N,B,Y=m.bits,S=0,$=0,p=0,P=0,st=0,M=0,lt=0,U=0,nt=0,I=0,E=null,tt=0,G=new r.Buf16(16),H=new r.Buf16(16),Tt=null,jt=0;for(S=0;S<=15;S++)G[S]=0;for($=0;$<d;$++)G[u[h+$]]++;for(st=Y,P=15;1<=P&&G[P]===0;P--);if(P<st&&(st=P),P===0)return w[f++]=20971520,w[f++]=20971520,m.bits=1,0;for(p=1;p<P&&G[p]===0;p++);for(st<p&&(st=p),S=U=1;S<=15;S++)if(U<<=1,(U-=G[S])<0)return-1;if(0<U&&(l===0||P!==1))return-1;for(H[1]=0,S=1;S<15;S++)H[S+1]=H[S]+G[S];for($=0;$<d;$++)u[h+$]!==0&&(g[H[u[h+$]]++]=$);if(C=l===0?(E=Tt=g,19):l===1?(E=o,tt-=257,Tt=i,jt-=257,256):(E=s,Tt=a,-1),S=p,D=f,lt=$=I=0,_=-1,T=(nt=1<<(M=st))-1,l===1&&852<nt||l===2&&592<nt)return 1;for(;;){for(F=S-lt,B=g[$]<C?(N=0,g[$]):g[$]>C?(N=Tt[jt+g[$]],E[tt+g[$]]):(N=96,0),y=1<<S-lt,p=v=1<<M;w[D+(I>>lt)+(v-=y)]=F<<24|N<<16|B|0,v!==0;);for(y=1<<S-1;I&y;)y>>=1;if(y!==0?(I&=y-1,I+=y):I=0,$++,--G[S]==0){if(S===P)break;S=u[h+g[$]]}if(st<S&&(I&T)!==_){for(lt===0&&(lt=st),D+=p,U=1<<(M=S-lt);M+lt<P&&!((U-=G[M+lt])<=0);)M++,U<<=1;if(nt+=1<<M,l===1&&852<nt||l===2&&592<nt)return 1;w[_=I&T]=st<<24|M<<16|D-f|0}}return I!==0&&(w[D+I]=S-lt<<24|64<<16|0),m.bits=st,0}},{"../utils/common":41}],51:[function(t,e,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,e,n){"use strict";var r=t("../utils/common"),o=0,i=1;function s(b){for(var k=b.length;0<=--k;)b[k]=0}var a=0,l=29,u=256,h=u+1+l,d=30,w=19,f=2*h+1,g=15,m=16,y=7,v=256,_=16,T=17,D=18,C=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],F=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=new Array(2*(h+2));s(Y);var S=new Array(2*d);s(S);var $=new Array(512);s($);var p=new Array(256);s(p);var P=new Array(l);s(P);var st,M,lt,U=new Array(d);function nt(b,k,j,L,O){this.static_tree=b,this.extra_bits=k,this.extra_base=j,this.elems=L,this.max_length=O,this.has_stree=b&&b.length}function I(b,k){this.dyn_tree=b,this.max_code=0,this.stat_desc=k}function E(b){return b<256?$[b]:$[256+(b>>>7)]}function tt(b,k){b.pending_buf[b.pending++]=255&k,b.pending_buf[b.pending++]=k>>>8&255}function G(b,k,j){b.bi_valid>m-j?(b.bi_buf|=k<<b.bi_valid&65535,tt(b,b.bi_buf),b.bi_buf=k>>m-b.bi_valid,b.bi_valid+=j-m):(b.bi_buf|=k<<b.bi_valid&65535,b.bi_valid+=j)}function H(b,k,j){G(b,j[2*k],j[2*k+1])}function Tt(b,k){for(var j=0;j|=1&b,b>>>=1,j<<=1,0<--k;);return j>>>1}function jt(b,k,j){var L,O,X=new Array(g+1),J=0;for(L=1;L<=g;L++)X[L]=J=J+j[L-1]<<1;for(O=0;O<=k;O++){var W=b[2*O+1];W!==0&&(b[2*O]=Tt(X[W]++,W))}}function ft(b){var k;for(k=0;k<h;k++)b.dyn_ltree[2*k]=0;for(k=0;k<d;k++)b.dyn_dtree[2*k]=0;for(k=0;k<w;k++)b.bl_tree[2*k]=0;b.dyn_ltree[2*v]=1,b.opt_len=b.static_len=0,b.last_lit=b.matches=0}function mt(b){8<b.bi_valid?tt(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf),b.bi_buf=0,b.bi_valid=0}function Dt(b,k,j,L){var O=2*k,X=2*j;return b[O]<b[X]||b[O]===b[X]&&L[k]<=L[j]}function kt(b,k,j){for(var L=b.heap[j],O=j<<1;O<=b.heap_len&&(O<b.heap_len&&Dt(k,b.heap[O+1],b.heap[O],b.depth)&&O++,!Dt(k,L,b.heap[O],b.depth));)b.heap[j]=b.heap[O],j=O,O<<=1;b.heap[j]=L}function oe(b,k,j){var L,O,X,J,W=0;if(b.last_lit!==0)for(;L=b.pending_buf[b.d_buf+2*W]<<8|b.pending_buf[b.d_buf+2*W+1],O=b.pending_buf[b.l_buf+W],W++,L===0?H(b,O,k):(H(b,(X=p[O])+u+1,k),(J=C[X])!==0&&G(b,O-=P[X],J),H(b,X=E(--L),j),(J=F[X])!==0&&G(b,L-=U[X],J)),W<b.last_lit;);H(b,v,k)}function ne(b,k){var j,L,O,X=k.dyn_tree,J=k.stat_desc.static_tree,W=k.stat_desc.has_stree,Q=k.stat_desc.elems,bt=-1;for(b.heap_len=0,b.heap_max=f,j=0;j<Q;j++)X[2*j]!==0?(b.heap[++b.heap_len]=bt=j,b.depth[j]=0):X[2*j+1]=0;for(;b.heap_len<2;)X[2*(O=b.heap[++b.heap_len]=bt<2?++bt:0)]=1,b.depth[O]=0,b.opt_len--,W&&(b.static_len-=J[2*O+1]);for(k.max_code=bt,j=b.heap_len>>1;1<=j;j--)kt(b,X,j);for(O=Q;j=b.heap[1],b.heap[1]=b.heap[b.heap_len--],kt(b,X,1),L=b.heap[1],b.heap[--b.heap_max]=j,b.heap[--b.heap_max]=L,X[2*O]=X[2*j]+X[2*L],b.depth[O]=(b.depth[j]>=b.depth[L]?b.depth[j]:b.depth[L])+1,X[2*j+1]=X[2*L+1]=O,b.heap[1]=O++,kt(b,X,1),2<=b.heap_len;);b.heap[--b.heap_max]=b.heap[1],(function(dt,Yt){var xn,ie,vn,Ct,Hn,$r,ge=Yt.dyn_tree,mi=Yt.max_code,La=Yt.stat_desc.static_tree,Ba=Yt.stat_desc.has_stree,Ma=Yt.stat_desc.extra_bits,gi=Yt.stat_desc.extra_base,_n=Yt.stat_desc.max_length,Zn=0;for(Ct=0;Ct<=g;Ct++)dt.bl_count[Ct]=0;for(ge[2*dt.heap[dt.heap_max]+1]=0,xn=dt.heap_max+1;xn<f;xn++)_n<(Ct=ge[2*ge[2*(ie=dt.heap[xn])+1]+1]+1)&&(Ct=_n,Zn++),ge[2*ie+1]=Ct,mi<ie||(dt.bl_count[Ct]++,Hn=0,gi<=ie&&(Hn=Ma[ie-gi]),$r=ge[2*ie],dt.opt_len+=$r*(Ct+Hn),Ba&&(dt.static_len+=$r*(La[2*ie+1]+Hn)));if(Zn!==0){do{for(Ct=_n-1;dt.bl_count[Ct]===0;)Ct--;dt.bl_count[Ct]--,dt.bl_count[Ct+1]+=2,dt.bl_count[_n]--,Zn-=2}while(0<Zn);for(Ct=_n;Ct!==0;Ct--)for(ie=dt.bl_count[Ct];ie!==0;)mi<(vn=dt.heap[--xn])||(ge[2*vn+1]!==Ct&&(dt.opt_len+=(Ct-ge[2*vn+1])*ge[2*vn],ge[2*vn+1]=Ct),ie--)}})(b,k),jt(X,bt,b.bl_count)}function c(b,k,j){var L,O,X=-1,J=k[1],W=0,Q=7,bt=4;for(J===0&&(Q=138,bt=3),k[2*(j+1)+1]=65535,L=0;L<=j;L++)O=J,J=k[2*(L+1)+1],++W<Q&&O===J||(W<bt?b.bl_tree[2*O]+=W:O!==0?(O!==X&&b.bl_tree[2*O]++,b.bl_tree[2*_]++):W<=10?b.bl_tree[2*T]++:b.bl_tree[2*D]++,X=O,bt=(W=0)===J?(Q=138,3):O===J?(Q=6,3):(Q=7,4))}function R(b,k,j){var L,O,X=-1,J=k[1],W=0,Q=7,bt=4;for(J===0&&(Q=138,bt=3),L=0;L<=j;L++)if(O=J,J=k[2*(L+1)+1],!(++W<Q&&O===J)){if(W<bt)for(;H(b,O,b.bl_tree),--W!=0;);else O!==0?(O!==X&&(H(b,O,b.bl_tree),W--),H(b,_,b.bl_tree),G(b,W-3,2)):W<=10?(H(b,T,b.bl_tree),G(b,W-3,3)):(H(b,D,b.bl_tree),G(b,W-11,7));X=O,bt=(W=0)===J?(Q=138,3):O===J?(Q=6,3):(Q=7,4)}}s(U);var A=!1;function x(b,k,j,L){G(b,(a<<1)+(L?1:0),3),(function(O,X,J,W){mt(O),W&&(tt(O,J),tt(O,~J)),r.arraySet(O.pending_buf,O.window,X,J,O.pending),O.pending+=J})(b,k,j,!0)}n._tr_init=function(b){A||((function(){var k,j,L,O,X,J=new Array(g+1);for(O=L=0;O<l-1;O++)for(P[O]=L,k=0;k<1<<C[O];k++)p[L++]=O;for(p[L-1]=O,O=X=0;O<16;O++)for(U[O]=X,k=0;k<1<<F[O];k++)$[X++]=O;for(X>>=7;O<d;O++)for(U[O]=X<<7,k=0;k<1<<F[O]-7;k++)$[256+X++]=O;for(j=0;j<=g;j++)J[j]=0;for(k=0;k<=143;)Y[2*k+1]=8,k++,J[8]++;for(;k<=255;)Y[2*k+1]=9,k++,J[9]++;for(;k<=279;)Y[2*k+1]=7,k++,J[7]++;for(;k<=287;)Y[2*k+1]=8,k++,J[8]++;for(jt(Y,h+1,J),k=0;k<d;k++)S[2*k+1]=5,S[2*k]=Tt(k,5);st=new nt(Y,C,u+1,h,g),M=new nt(S,F,0,d,g),lt=new nt(new Array(0),N,0,w,y)})(),A=!0),b.l_desc=new I(b.dyn_ltree,st),b.d_desc=new I(b.dyn_dtree,M),b.bl_desc=new I(b.bl_tree,lt),b.bi_buf=0,b.bi_valid=0,ft(b)},n._tr_stored_block=x,n._tr_flush_block=function(b,k,j,L){var O,X,J=0;0<b.level?(b.strm.data_type===2&&(b.strm.data_type=(function(W){var Q,bt=4093624447;for(Q=0;Q<=31;Q++,bt>>>=1)if(1&bt&&W.dyn_ltree[2*Q]!==0)return o;if(W.dyn_ltree[18]!==0||W.dyn_ltree[20]!==0||W.dyn_ltree[26]!==0)return i;for(Q=32;Q<u;Q++)if(W.dyn_ltree[2*Q]!==0)return i;return o})(b)),ne(b,b.l_desc),ne(b,b.d_desc),J=(function(W){var Q;for(c(W,W.dyn_ltree,W.l_desc.max_code),c(W,W.dyn_dtree,W.d_desc.max_code),ne(W,W.bl_desc),Q=w-1;3<=Q&&W.bl_tree[2*B[Q]+1]===0;Q--);return W.opt_len+=3*(Q+1)+5+5+4,Q})(b),O=b.opt_len+3+7>>>3,(X=b.static_len+3+7>>>3)<=O&&(O=X)):O=X=j+5,j+4<=O&&k!==-1?x(b,k,j,L):b.strategy===4||X===O?(G(b,2+(L?1:0),3),oe(b,Y,S)):(G(b,4+(L?1:0),3),(function(W,Q,bt,dt){var Yt;for(G(W,Q-257,5),G(W,bt-1,5),G(W,dt-4,4),Yt=0;Yt<dt;Yt++)G(W,W.bl_tree[2*B[Yt]+1],3);R(W,W.dyn_ltree,Q-1),R(W,W.dyn_dtree,bt-1)})(b,b.l_desc.max_code+1,b.d_desc.max_code+1,J+1),oe(b,b.dyn_ltree,b.dyn_dtree)),ft(b),L&&mt(b)},n._tr_tally=function(b,k,j){return b.pending_buf[b.d_buf+2*b.last_lit]=k>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&k,b.pending_buf[b.l_buf+b.last_lit]=255&j,b.last_lit++,k===0?b.dyn_ltree[2*j]++:(b.matches++,k--,b.dyn_ltree[2*(p[j]+u+1)]++,b.dyn_dtree[2*E(k)]++),b.last_lit===b.lit_bufsize-1},n._tr_align=function(b){G(b,2,3),H(b,v,Y),(function(k){k.bi_valid===16?(tt(k,k.bi_buf),k.bi_buf=0,k.bi_valid=0):8<=k.bi_valid&&(k.pending_buf[k.pending++]=255&k.bi_buf,k.bi_buf>>=8,k.bi_valid-=8)})(b)}},{"../utils/common":41}],53:[function(t,e,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,n){(function(r){(function(o,i){"use strict";if(!o.setImmediate){var s,a,l,u,h=1,d={},w=!1,f=o.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(o);g=g&&g.setTimeout?g:o,s={}.toString.call(o.process)==="[object process]"?function(_){process.nextTick(function(){y(_)})}:(function(){if(o.postMessage&&!o.importScripts){var _=!0,T=o.onmessage;return o.onmessage=function(){_=!1},o.postMessage("","*"),o.onmessage=T,_}})()?(u="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",v,!1):o.attachEvent("onmessage",v),function(_){o.postMessage(u+_,"*")}):o.MessageChannel?((l=new MessageChannel).port1.onmessage=function(_){y(_.data)},function(_){l.port2.postMessage(_)}):f&&"onreadystatechange"in f.createElement("script")?(a=f.documentElement,function(_){var T=f.createElement("script");T.onreadystatechange=function(){y(_),T.onreadystatechange=null,a.removeChild(T),T=null},a.appendChild(T)}):function(_){setTimeout(y,0,_)},g.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var T=new Array(arguments.length-1),D=0;D<T.length;D++)T[D]=arguments[D+1];var C={callback:_,args:T};return d[h]=C,s(h),h++},g.clearImmediate=m}function m(_){delete d[_]}function y(_){if(w)setTimeout(y,0,_);else{var T=d[_];if(T){w=!0;try{(function(D){var C=D.callback,F=D.args;switch(F.length){case 0:C();break;case 1:C(F[0]);break;case 2:C(F[0],F[1]);break;case 3:C(F[0],F[1],F[2]);break;default:C.apply(i,F)}})(T)}finally{m(_),w=!1}}}}function v(_){_.source===o&&typeof _.data=="string"&&_.data.indexOf(u)===0&&y(+_.data.slice(u.length))}})(typeof self>"u"?r===void 0?this:r:self)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})});var id={};Ja(id,{Gaps:()=>Cn,applyPptModelToOnlyOfficePptDeck:()=>hi,applyPptTextMutationToOnlyOfficeContent:()=>Ra,attrStr:()=>rt,buildDefaultWordParts:()=>ro,buildFontTableXml:()=>to,buildNumberingXml:()=>qi,buildSettingsXml:()=>eo,buildStylesXml:()=>tr,buildThemeXml:()=>Qr,buildWebSettingsXml:()=>no,colorToJson:()=>Te,colorToOoxml:()=>$t,esc:()=>z,extraAttr:()=>et,flatOpcToOnlyOfficeWriteback:()=>Na,highlightToJson:()=>bi,highlightToOoxml:()=>Ge,jsonToFlatOpc:()=>oo,jsonToFlatOpcWithStyles:()=>es,jsonToOoxml:()=>Kn,kid:()=>ht,kidsOf:()=>Jt,onlyKeys:()=>je,onlyOfficePptContentToTextBody:()=>Ar,onlyOfficePptDeckToPptModel:()=>pi,ooOutlineToOoxml:()=>Vr,ooxmlToJson:()=>Ve,parseXml:()=>Et,readExtra:()=>Pt,replaceOnlyOfficePptContentText:()=>ui,setOnlyOfficePptContentParagraphs:()=>Xn,setOnlyOfficePptContentRunStyle:()=>ci,setOnlyOfficePptContentStyle:()=>Wn,setOnlyOfficePptContentText:()=>Un,styleToXml:()=>Yr,unesc:()=>Jn,updateOnlyOfficePptDeckTextShape:()=>ja,withPackageLongTailParts:()=>us});function Et(t){let e=0,n=t.length;function r(){for(;e<n&&/\s/.test(t[e]);)e++;if(t[e]!=="<")return null;if(t.startsWith("<?",e)||t.startsWith("<!",e))return e=t.indexOf(">",e)+1,r();e++;let o="";for(;e<n&&!/[\s/>]/.test(t[e]);)o+=t[e++];let i={};for(;e<n&&t[e]!==">"&&t[e]!=="/";){for(;/\s/.test(t[e]);)e++;if(t[e]==="/"||t[e]===">")break;let a="";for(;e<n&&!/[\s=/>]/.test(t[e]);)a+=t[e++];for(;/\s/.test(t[e]);)e++;let l="";if(t[e]==="="){for(e++;/\s/.test(t[e]);)e++;let u=t[e++];for(;e<n&&t[e]!==u;)l+=t[e++];e++}i[a]=Jn(l)}if(t[e]==="/")return e+=2,{tag:o,attrs:i,kids:[]};e++;let s=[];for(;e<n;){if(t.startsWith("</",e)){e=t.indexOf(">",e)+1;break}if(t[e]==="<"){let a=r();a&&s.push(a)}else{let a="";for(;e<n&&t[e]!=="<";)a+=t[e++];a&&s.push({text:Jn(a)})}}return{tag:o,attrs:i,kids:s}}for(;e<n&&t[e]!=="<";)e++;return r()}var ht=(t,e)=>t&&t.kids?t.kids.find(n=>n.tag===e):void 0,Jt=(t,e)=>t&&t.kids?t.kids.filter(n=>n.tag===e):[],z=t=>String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),Jn=t=>String(t).replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&");function rt(t){let e="";for(let n of Object.keys(t))t[n]!=null&&(e+=` ${n}="${z(t[n])}"`);return e}var Pr=t=>(t&255).toString(16).padStart(2,"0").toUpperCase(),$t=t=>!t||t.auto?"auto":Pr(t.r)+Pr(t.g)+Pr(t.b),Te=t=>!t||t==="auto"?{auto:!0,r:0,g:0,b:0}:{auto:!1,r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)},qt=(t,e)=>{let n=e&&e.auto&&(e.r||e.g||e.b)?`${e.r},${e.g},${e.b}`:null;return n?` ${t}="${n}"`:""},Tn=(t,e)=>{if(e&&t&&t.auto){let n=String(e).split(",").map(Number);t.r=n[0],t.g=n[1],t.b=n[2]}return t},Vn={"000000":"black","0000FF":"blue","00FFFF":"cyan","000080":"darkBlue","008080":"darkCyan",808080:"darkGray","008000":"darkGreen",800080:"darkMagenta",8e5:"darkRed",808e3:"darkYellow","00FF00":"green",C0C0C0:"lightGray",FF00FF:"magenta",FF0000:"red",FFFFFF:"white",FFFF00:"yellow"},yi=Object.fromEntries(Object.entries(Vn).map(([t,e])=>[e,t]));function Ge(t){if(!t||t.auto)return null;let e=$t(t);if(Vn[e])return Vn[e];let n="none",r=1/0;for(let[o,i]of Object.entries(Vn)){let s=parseInt(o.slice(0,2),16)-t.r,a=parseInt(o.slice(2,4),16)-t.g,l=parseInt(o.slice(4,6),16)-t.b,u=s*s+a*a+l*l;u<r&&(r=u,n=i)}return n}function bi(t){if(!(!t||t==="none"))return yi[t]?{auto:!1,...Te(yi[t])}:void 0}var xi=new Set(["type","bFromDocument","bPresentation"]);function et(t,e,n="oo:x"){if(!t||typeof t!="object")return"";let r=e?new Set([...e,...xi]):xi,o={},i=!1;for(let s of Object.keys(t))r.has(s)||(o[s]=t[s],i=!0);return i?` ${n}="${z(JSON.stringify(o))}"`:""}function Pt(t,e="oo:x"){let n=t&&t.attrs?t.attrs[e]:null;if(!n)return{};try{return JSON.parse(n)}catch{return{}}}function je(t,e){let n=new Set(e);for(let r of Object.keys(t))if(!n.has(r))return!1;return!0}function Yn(t,e){return t==="pct"?Math.round(e*50):e}function vi(t,e){return t!=="pct"?Number(e)||0:e?.endsWith("%")?Number(e.slice(0,-1))||0:(Number(e)||0)/50}function Br(t){if(!t)return"";let e=t.fill?` w:fill="${$t(t.fill)}"${qt("oo:frgb",t.fill)}`:"";return`<w:shd w:val="${t.val||"clear"}" w:color="${$t(t.color)}"${qt("oo:crgb",t.color)}${e}${et(t,["val","color","fill"])}/>`}function qa(t){if(!t)return"";let e="";t.pStyle!=null&&(e+=`<w:pStyle w:val="${z(t.pStyle)}"/>`);for(let n of["keepNext","keepLines","pageBreakBefore","widowControl","contextualSpacing","suppressLineNumbers"])t[n]===!0&&(e+=`<w:${n}/>`);if(e+=Br(t.shd),t.spacing){let n=t.spacing,r={};n.before!=null&&(r["w:before"]=n.before),n.after!=null&&(r["w:after"]=n.after),n.line!=null&&(r["w:line"]=n.line),n.lineRule!=null&&(r["w:lineRule"]=n.lineRule),n.beforeAutoSpacing!=null&&(r["w:beforeAutospacing"]=n.beforeAutoSpacing==="off"?0:1),n.afterAutoSpacing!=null&&(r["w:afterAutospacing"]=n.afterAutoSpacing==="off"?0:1),e+=`<w:spacing${rt(r)}/>`}if(t.ind){let n=t.ind,r={};n.left!=null&&(r["w:left"]=n.left),n.right!=null&&(r["w:right"]=n.right),n.firstLine!=null&&(r["w:firstLine"]=n.firstLine),e+=`<w:ind${rt(r)}/>`}return t.jc!=null&&(e+=`<w:jc w:val="${t.jc}"/>`),Number.isInteger(t.outlineLvl)&&(e+=`<w:outlineLvl w:val="${t.outlineLvl}"/>`),e}function Ka(t){let e="";if(t.rFonts){let r=t.rFonts,o={};for(let i of["ascii","hAnsi","eastAsia","cs","hint","asciiTheme","hAnsiTheme","eastAsiaTheme","cstheme"])r[i]!=null&&(o["w:"+i]=r[i]);e+=`<w:rFonts${rt(o)}/>`}let n=(r,o)=>o===!0?`<w:${r}/>`:o===!1?`<w:${r} w:val="false"/>`:"";if(e+=n("b",t.b)+n("bCs",t.bCs)+n("i",t.i)+n("iCs",t.iCs),t.color&&(e+=`<w:color w:val="${$t(t.color)}"${qt("oo:rgb",t.color)}/>`),t.spacing!=null&&(e+=`<w:spacing w:val="${t.spacing}"/>`),t.sz!=null&&(e+=`<w:sz w:val="${t.sz}"/>`),t.szCs!=null&&(e+=`<w:szCs w:val="${t.szCs}"/>`),t.highlight){let r=Ge(t.highlight);r&&(e+=`<w:highlight w:val="${r}"/>`)}if(t.vertAlign!=null&&(e+=`<w:vertAlign w:val="${typeof t.vertAlign=="object"?t.vertAlign.val||t.vertAlign.value:t.vertAlign}"/>`),e+=Br(t.shd),t.lang){let r={};for(let o of["val","eastAsia","bidi"])t.lang[o]!=null&&(r["w:"+o]=t.lang[o]);e+=`<w:lang${rt(r)}/>`}return e}function Oi(t){if(!t)return"";let e=Ka(t),n=et(t);return e||n?`<w:rPr${n}>${e}</w:rPr>`:""}function Qa(t){let e=t?.docPr||{},n={id:e.id??1,name:e.name??"Picture"};return e.descr!=null&&(n.descr=e.descr),e.title!=null&&(n.title=e.title),rt(n)}function tl(t){let e=t?.srcRect;if(!e||typeof e!="object")return"";let n={};for(let r of["l","t","r","b"])e[r]!=null&&(n[r]=e[r]);return Object.keys(n).length?`<a:srcRect${rt(n)}/>`:""}function Ei(t){let e=t?.prstGeom?.prst??t?.custGeom?.preset??t?.geometry?.prst??t?.geometry?.preset??t?.prstGeom;return`<a:prstGeom prst="${z(typeof e=="string"?e:"rect")}"><a:avLst/></a:prstGeom>`}function _i(t){if(!t||typeof t!="object")return"";let e={};for(let n of["l","t","r","b"])t[n]!=null&&(e[n]=t[n]);return Object.keys(e).length?`<wp:effectExtent${rt(e)}/>`:""}function Si(t,e,n){if(!e||typeof e!="object")return`<wp:${t} relativeFrom="${n}"><wp:posOffset>0</wp:posOffset></wp:${t}>`;let r=e.relativeFrom||n,o=e.align!=null?`<wp:align>${z(e.align)}</wp:align>`:`<wp:posOffset>${z(e.posOffset??e.offset??0)}</wp:posOffset>`;return`<wp:${t} relativeFrom="${z(r)}">${o}</wp:${t}>`}function el(t){let e=t?.wrapType||t?.wrap?.type||t?.wrappingType,n=t?.wrapText||t?.wrap?.wrapText||"bothSides";if(e==="none")return"<wp:wrapNone/>";if(e==="topAndBottom"||e==="topBottom")return"<wp:wrapTopAndBottom/>";if(e==="tight")return`<wp:wrapTight wrapText="${z(n)}"><wp:wrapPolygon edited="0"><wp:start x="0" y="0"/></wp:wrapPolygon></wp:wrapTight>`;if(e==="through"){let r=se(t?.wrapThrough?.edited??t?.wrap?.edited??!1);return`<wp:wrapThrough wrapText="${z(n)}"><wp:wrapPolygon edited="${z(r)}"><wp:start x="0" y="0"/></wp:wrapPolygon></wp:wrapThrough>`}return`<wp:wrapSquare wrapText="${z(n)}"/>`}function Fr(t,e,n,r,o){let i={distT:t?.distT??0,distB:t?.distB??0,distL:t?.distL??0,distR:t?.distR??0};if(t?.drawingType!=="anchor"&&t?.inline!==!1&&t?.anchor!==!0)return`<wp:inline${rt(i)}><wp:extent cx="${z(e)}" cy="${z(n)}"/>`+_i(t?.effectExtent)+`<wp:docPr${r}/>`+o+"</wp:inline>";let s=t?.simplePos&&typeof t.simplePos=="object"?t.simplePos:{},a={...i,simplePos:se(t?.simplePos===!0||t?.simplePos?.enabled===!0),relativeHeight:t?.relativeHeight??0,behindDoc:se(t?.behindDoc??!1),locked:se(t?.locked??!1),layoutInCell:se(t?.layoutInCell??!0),allowOverlap:se(t?.allowOverlap??!0)};return`<wp:anchor${rt(a)}><wp:simplePos x="${z(s.x??0)}" y="${z(s.y??0)}"/>`+Si("positionH",t?.positionH,"column")+Si("positionV",t?.positionV,"paragraph")+`<wp:extent cx="${z(e)}" cy="${z(n)}"/>`+_i(t?.effectExtent)+el(t)+`<wp:docPr${r}/><wp:cNvGraphicFramePr/>`+o+"</wp:anchor>"}function nl(t){let e=t?.graphic,n=e?.blipFill||{},r=e?.spPr||{},o=n.rasterImageId,i=t?.extent?.cx??r?.xfrm?.ext?.cx??1,s=t?.extent?.cy??r?.xfrm?.ext?.cy??1,a=Qa(t);if((e?.type==="shape"||e?.type==="connectShape")&&!o){let u=t?.content||e?.content,d=(Array.isArray(u?.content)?u.content:[]).map(Ai).join(""),w=`<a:graphic><a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"><wps:wsp>${Pi(e)}<wps:spPr>${$i(t,i,s)}</wps:spPr>${zr(d,"wps")}</wps:wsp></a:graphicData></a:graphic>`;return`<w:drawing>${Fr(t,i,s,a,w)}</w:drawing>`}if(!o||!String(o).startsWith("rId"))return null;let l=`<a:graphic><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:pic><pic:nvPicPr><pic:cNvPr${a}/><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip r:embed="${z(o)}"/>${tl(n)}<a:stretch><a:fillRect/></a:stretch></pic:blipFill><pic:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="${z(i)}" cy="${z(s)}"/></a:xfrm>${Ei(r)}</pic:spPr></pic:pic></a:graphicData></a:graphic>`;return`<w:drawing>${Fr(t,i,s,a,l)}</w:drawing>`}function Ti(t,e){let n=e.customMarkFollows===!0?' w:customMarkFollows="1"':"";return`<w:${t} w:id="${z(e.footnote)}"${n}/>`}function rl(t){if(typeof t=="string")return`<w:t xml:space="preserve">${z(t)}</w:t>`;if(t&&t.type==="break"&&je(t,["type","breakType"])&&(t.breakType==="page"||t.breakType==="column"))return`<w:br w:type="${t.breakType}"/>`;if(t&&t.type==="tab"&&je(t,["type"]))return"<w:tab/>";if(t&&t.type==="separator"&&je(t,["type"]))return"<w:separator/>";if(t&&t.type==="continuationSeparator"&&je(t,["type"]))return"<w:continuationSeparator/>";if(t&&t.type==="footnoteRef"&&t.footnote!=null)return Ti("footnoteReference",t);if(t&&t.type==="endnoteRef"&&t.footnote!=null)return Ti("endnoteReference",t);if(t&&t.type==="paraDrawing"){let e=nl(t);if(e)return e}return`<oo:ci oo:v="${z(JSON.stringify(t))}"/>`}function Ni(t){let e=(t.content||[]).map(rl).join("");return`<w:r${et(t,["rPr","content","footnotes","endnotes"])}>${Oi(t.rPr)}${e}</w:r>`}function ol(t){let e=[],n=t.rId||t.id||t["r:id"];n?e.push(`r:id="${z(n)}"`):t.value&&e.push(`w:anchor="${z(String(t.value).replace(/^#/,""))}"`),t.tooltip&&e.push(`w:tooltip="${z(t.tooltip)}"`);let r=(t.content||[]).map(o=>o?.type==="run"?Ni(o):`<oo:pi oo:v="${z(JSON.stringify(o))}"/>`).join("");return`<w:hyperlink${e.length?" "+e.join(" "):""}>${r}</w:hyperlink>`}function il(t){return t.type==="endRun"?"":t.type==="run"?Ni(t):t.type==="hyperlink"?ol(t):t.type==="commentRangeStart"&&t.id!=null?`<w:commentRangeStart w:id="${z(t.id)}"/>`:t.type==="commentRangeEnd"&&t.id!=null?`<w:commentRangeEnd w:id="${z(t.id)}"/><w:r><w:commentReference w:id="${z(t.id)}"/></w:r>`:t.type==="commentReference"&&t.id!=null?`<w:r><w:commentReference w:id="${z(t.id)}"/></w:r>`:`<oo:pi oo:v="${z(JSON.stringify(t))}"/>`}function sl(t){let e=qa(t.pPr)+Oi(t.rPr),n=et(t.pPr),r=e||n?`<w:pPr${n}>${e}</w:pPr>`:"",o=et(t,["pPr","rPr","content"]),i=(t.content||[]).find(a=>a.type==="endRun"),s=i?et(i,["rPr","content"],"oo:er"):"";return`<w:p${o}${s}>${r}${(t.content||[]).map(il).join("")}</w:p>`}function kn(t){return(t||[]).map(e=>e.type==="table"?pl(e):e.type==="paragraph"?sl(e):`<oo:blk oo:v="${z(JSON.stringify(e))}"/>`).join("")}function al(t,e){if(!e)return"";let n={},r=e.val!=null?e.val:e.value;return r!=null&&(n["w:val"]=r),e.sz!=null&&(n["w:sz"]=e.sz),e.space!=null&&(n["w:space"]=e.space),e.color&&(n["w:color"]=$t(e.color)),`<w:${t}${rt(n)}${e.color?qt("oo:rgb",e.color):""}${et(e,["color","sz","space","value","val"])}/>`}var ll=["top","left","bottom","right","insideH","insideV","start","end","between","bar"];function Ii(t,e){if(!e)return"";let n="";for(let r of ll)e[r]&&(n+=al(r,e[r]));return Object.keys(e).length?`<w:${t}>${n}</w:${t}>`:`<w:${t}/>`}function Mr(t,e){if(!e)return"";let n={};e.type!=null&&(n["w:type"]=e.type);let r=e.w??e.value;return r!=null&&(n["w:w"]=Yn(e.type,r)),`<w:${t}${rt(n)}/>`}function cl(t,e){if(!e)return"";let n="";for(let r of["top","left","bottom","right","start","end"])e[r]&&(n+=Mr(r,e[r]));return n?`<w:${t}>${n}</w:${t}>`:""}function ul(t){if(!t)return"<w:tblPr/>";let e="";if(t.tblStyle!=null&&(e+=`<w:tblStyle w:val="${z(t.tblStyle)}"/>`),t.inline===!1){let n={};for(let r of["horzAnchor","vertAnchor","tblpXSpec","tblpYSpec","tblpX","tblpY","leftFromText","rightFromText","topFromText","bottomFromText"])t.tblpPr?.[r]!=null&&(n["w:"+r]=t.tblpPr[r]);e+=`<w:tblpPr${rt(n)}/>`}if(e+=Mr("tblW",t.tblW),t.jc!=null&&(e+=`<w:jc w:val="${t.jc}"/>`),e+=Ii("tblBorders",t.tblBorders),e+=cl("tblCellMar",t.tblCellMar),t.tblLayout!=null&&(e+=`<w:tblLayout w:type="${typeof t.tblLayout=="object"?t.tblLayout.type:t.tblLayout}"/>`),t.tblLook!=null&&typeof t.tblLook=="object"){let n={};for(let r of Object.keys(t.tblLook))r!=="type"&&(n["w:"+r]=t.tblLook[r]===!0?1:t.tblLook[r]===!1?0:t.tblLook[r]);e+=`<w:tblLook${rt(n)}/>`}return`<w:tblPr${et(t)}>${e}</w:tblPr>`}function fl(t){let e=t.tcPr||{},n="";n+=Mr("tcW",e.tcW),e.gridSpan!=null&&(n+=`<w:gridSpan w:val="${e.gridSpan}"/>`),e.vMerge!=null&&(n+=`<w:vMerge${e.vMerge&&e.vMerge!=="continue"?` w:val="${e.vMerge}"`:""}/>`),e.tcBorders&&(n+=Ii("tcBorders",e.tcBorders)),n+=Br(e.shd),e.vAlign!=null&&(n+=`<w:vAlign w:val="${typeof e.vAlign=="object"?e.vAlign.val||e.vAlign.value:e.vAlign}"/>`);let r=`<w:tcPr${et(e)}>${n}</w:tcPr>`,o=t.content&&Array.isArray(t.content.content)?t.content.content:Array.isArray(t.content)?t.content:[],i=kn(o)||"<w:p/>";return`<w:tc${et(t,["tcPr","content"])}>${r}${i}</w:tc>`}function dl(t){let e=t.trPr||{},n="";e.tblHeader&&(n+="<w:tblHeader/>"),e.jc!=null&&(n+=`<w:jc w:val="${e.jc}"/>`),e.trHeight&&(n+=`<w:trHeight${rt({"w:val":e.trHeight.value!=null?e.trHeight.value:e.trHeight.val,"w:hRule":e.trHeight.hRule})}/>`);let r=n||et(e)?`<w:trPr${et(e)}>${n}</w:trPr>`:"",o=Array.isArray(t.content)?t.content:[];return`<w:tr${et(t,["trPr","content"])}>${r}${o.map(fl).join("")}</w:tr>`}function pl(t){let e=(t.tblGrid||[]).map(o=>`<w:gridCol w:w="${o.w}"/>`).join(""),n=Array.isArray(t.content)?t.content:[];return`<w:tbl${et(t,["tblPr","tblGrid","content"])}>${ul(t.tblPr)}<w:tblGrid>${e}</w:tblGrid>${n.map(dl).join("")}</w:tbl>`}function Ai(t){let e=[],n=r=>{typeof r=="string"?e.push(r):Array.isArray(r)?r.forEach(n):r&&typeof r=="object"&&(r.type==="run"||r.type==="paragraph")&&n(r.content)};return n(t),e.join("")}function zr(t,e){return t?`<${e}:txbx><w:txbxContent><w:p><w:r><w:t xml:space="preserve">${z(t)}</w:t></w:r></w:p></w:txbxContent></${e}:txbx>`:""}function hl(t){return t?.graphic?.type!=="image"&&!t?.graphic?.blipFill?.rasterImageId}function Rr(t){let e=Number(t);return Number.isFinite(e)?Math.max(0,e/12700).toFixed(2).replace(/\.00$/,""):null}function jr(t){let e=t?.color?.color?.rgba??t?.fill?.color?.color?.rgba??t?.fill?.fill?.color?.color?.rgba??t?.rgba??t?.color?.rgba??t?.fill?.color?.rgba??t?.fill?.fill?.color?.rgba;return!e||typeof e!="object"?null:{auto:!1,r:e.red??e.r??0,g:e.green??e.g??0,b:e.blue??e.b??0}}function Lr(t){return t?.type??t?.fill?.type??t?.fill?.fill?.type}function Di(t){if(Lr(t)==="noFill")return"<a:noFill/>";let e=jr(t);return e?`<a:solidFill><a:srgbClr val="${$t(e)}"/></a:solidFill>`:""}function ml(t){if(!t||typeof t!="object")return"";let e={};t.w!=null&&(e.w=t.w),t.cap!=null&&(e.cap=t.cap),t.cmpd!=null&&(e.cmpd=t.cmpd);let n=Di(t.fill),r=t.prstDash?`<a:prstDash val="${z(t.prstDash)}"/>`:"",o=t.lineJoin?.type==="round"?"<a:round/>":"";return`<a:ln${rt(e)}>${n}${r}${o}</a:ln>`}function $i(t,e,n){let r=t?.graphic?.spPr??{},o=r.xfrm??{},i={};for(let l of["flipH","flipV","rot"])o[l]!=null&&(i[l]=se(o[l]));let s=o.off??{},a=o.ext??{};return`<a:xfrm${rt(i)}><a:off x="${z(s.x??0)}" y="${z(s.y??0)}"/><a:ext cx="${z(a.cx??e)}" cy="${z(a.cy??n)}"/></a:xfrm>`+Ei(r)+Di(r.fill)+ml(r.ln)}function Pi(t){if(t?.nvCxnSpPr){let e=t.nvCxnSpPr?.cNvCxnSpPr?.cxnSpLocks??{};return`<wps:cNvCnPr><a:cxnSpLocks${rt({noChangeShapeType:e.noChangeShapeType==null?void 0:se(e.noChangeShapeType)})}/></wps:cNvCnPr>`}return"<wps:cNvSpPr/>"}function gl(t,e,n,r){let o=Rr(e),i=Rr(n),s={id:t};o!=null&&i!=null&&(s.style=`width:${o}pt;height:${i}pt`);let a=r?.fill;if(Lr(a)==="noFill")s.filled="f";else{let u=jr(a);u&&(s.fillcolor=`#${$t(u)}`)}let l=r?.ln;if(Lr(l?.fill)==="noFill")s.stroked="f";else{let u=jr(l?.fill);u&&(s.strokecolor=`#${$t(u)}`);let h=Rr(l?.w);h!=null&&(s.strokeweight=`${h}pt`)}return rt(s)}function wl(t,e){let n=t&&(t.content||t.graphic?.content),o=(Array.isArray(n?.content)?n.content:[]).map(Ai).join(""),i=t?.docPr?.id??e+1,s=t?.docPr?.name??`Drawing ${e+1}`,a=t?.extent?.cx??t?.graphic?.spPr?.xfrm?.ext?.cx??1,l=t?.extent?.cy??t?.graphic?.spPr?.xfrm?.ext?.cy??1,u=zr(o,"wps"),h=zr(o,"v"),d=`<a:graphic><a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"><wps:wsp>${Pi(t?.graphic)}<wps:spPr>${$i(t,a,l)}</wps:spPr>${u}</wps:wsp></a:graphicData></a:graphic>`;return`<w:p oo:drawingObject="${z(e)}"><w:r><w:drawing>${Fr(t,a,l,rt({id:i,name:s}),d)}</w:drawing><w:pict><v:shape${gl(s,a,l,t?.graphic?.spPr)}>${h}</v:shape></w:pict></w:r></w:p>`}function yl(t){let e=Array.isArray(t?.drawingObjects)?t.drawingObjects:[],n=new Set,r=o=>{if(!(!o||typeof o!="object")){if(o.type==="paraDrawing"&&o.docPr?.id!=null&&n.add(String(o.docPr.id)),Array.isArray(o)){o.forEach(r);return}Object.values(o).forEach(r)}};return r(t?.content),e.filter(o=>hl(o)&&(o?.docPr?.id==null||!n.has(String(o.docPr.id)))).map((o,i)=>wl(o,i)).join("")}function se(t){return t===!0?1:t===!1?0:t}function ki(t,e){if(!e||typeof e!="object")return"";let n="";for(let r of["first","default","even"]){let o=e[r];if(!o)continue;let i=typeof o=="string"?o:o.id||o.rId||o["r:id"];i&&(n+=`<w:${t} w:type="${r}" r:id="${z(i)}"/>`)}return n}function bl(t,e){if(!e)return"";let n={},r=e.val!=null?e.val:e.value;return r!=null&&(n["w:val"]=r),e.sz!=null&&(n["w:sz"]=e.sz),e.space!=null&&(n["w:space"]=e.space),e.color&&(n["w:color"]=$t(e.color)),`<w:${t}${rt(n)}${e.color?qt("oo:rgb",e.color):""}${et(e,["color","sz","space","value","val"])}/>`}function xl(t){return t&&typeof t=="object"?t.val??t.value??t.type:t}function qn(t,e){let n=xl(e);return n==null?"":`<w:${t} w:val="${z(String(n))}"/>`}function Ci(t,e){if(!e||typeof e!="object"||!Object.keys(e).length)return"";let n="";return n+=qn("pos",e.pos??e.position),n+=qn("numFmt",e.numFmt),n+=qn("numStart",e.numStart??e.start),n+=qn("numRestart",e.numRestart??e.restart),`<w:${t}${et(e,["pos","position","numFmt","numStart","start","numRestart","restart"])}>${n}</w:${t}>`}function vl(t){if(!t||typeof t!="object")return"";let e="";if(e+=ki("headerReference",t.headerReference),e+=ki("footerReference",t.footerReference),e+=Ci("footnotePr",t.footnotePr),e+=Ci("endnotePr",t.endnotePr),t.type!=null&&(e+=`<w:type w:val="${z(t.type)}"/>`),t.pgSz){let n=t.pgSz,r={};n.w!=null&&(r["w:w"]=n.w),n.h!=null&&(r["w:h"]=n.h);let o=n.orient??n.orinet;o!=null&&(r["w:orient"]=o),e+=`<w:pgSz${rt(r)}${et(n,["w","h","orient","orinet"])}/>`}if(t.pgMar){let n=t.pgMar,r={};for(let o of["top","right","bottom","left","header","footer","gutter"])n[o]!=null&&(r["w:"+o]=n[o]);e+=`<w:pgMar${rt(r)}${et(n,["top","right","bottom","left","header","footer","gutter"])}/>`}if(t.pgBorders){let n=t.pgBorders,r="";for(let i of["top","left","bottom","right"])r+=bl(i,n[i]);let o={};for(let i of["display","offsetFrom","zOrder"])n[i]!=null&&(o["w:"+i]=n[i]);e+=`<w:pgBorders${rt(o)}${et(n,["top","left","bottom","right","display","offsetFrom","zOrder"])}>${r}</w:pgBorders>`}if(t.cols){let n=t.cols,r={};for(let i of["equalWidth","num","sep","space"])n[i]!=null&&(r["w:"+i]=se(n[i]));let o=Array.isArray(n.col)?n.col.map(i=>{let s={};for(let[a,l]of Object.entries(i))s["w:"+a]=se(l);return`<w:col${rt(s)}/>`}).join(""):"";e+=`<w:cols${rt(r)}${et(n,["col","equalWidth","num","sep","space"])}>${o}</w:cols>`}if(t.titlePg&&(e+="<w:titlePg/>"),t.pgNumType){let n=t.pgNumType,r={};for(let o of["start","fmt","chapStyle","chapSep"])n[o]!=null&&n[o]!==-1&&(r["w:"+o]=n[o]);(Object.keys(r).length||Object.keys(n).some(o=>!["start","fmt","chapStyle","chapSep"].includes(o)))&&(e+=`<w:pgNumType${rt(r)}${et(n,["start","fmt","chapStyle","chapSep"])}/>`)}return t.rtlGutter&&(e+="<w:rtlGutter/>"),`<w:sectPr${et(t,["headerReference","footerReference","footnotePr","endnotePr","type","pgSz","pgMar","pgBorders","cols","titlePg","pgNumType","rtlGutter"])}>${e}</w:sectPr>`}function Kn(t){let e=yl(t)+kn(t.content)+vl(t.sectPr||t.sectionPr);return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:oo="urn:coco:oojson"><w:body${et(t,["content","sectPr","sectionPr","drawingObjects","commentMetadata","theme","styles","numbering"])}>${e}</w:body></w:document>`}var _l=new Set(["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"]);function Rt(t,e){if(!t||typeof t!="object")return null;if(t.tag===e)return t;for(let n of t.kids||[]){let r=Rt(n,e);if(r)return r}return null}function zi(t){return!t||typeof t!="object"?"":t.text!=null?String(t.text):(t.kids||[]).map(zi).join("")}function Nt(t){let e=Number(t);return Number.isFinite(e)?e:void 0}function ke(t,e=!1){return t==null||t===""?e:["1","true","t","on"].includes(String(t).toLowerCase())}function Sl(t,e){let n=Rt(t,e);return{x:Nt(n?.attrs?.x)??0,y:Nt(n?.attrs?.y)??0}}function Ri(t,e){let n=Rt(t,e);return{cx:Nt(n?.attrs?.cx)??0,cy:Nt(n?.attrs?.cy)??0}}function Fi(t,e,n){let r=Rt(t,e);return{relativeFrom:String(r?.attrs?.relativeFrom??n),posOffset:Nt(zi(Rt(r,"wp:posOffset")))??0,percent:!1}}function Tl(t){let e=String(Rt(t,"a:srgbClr")?.attrs?.val??"").trim();if(!/^[0-9a-f]{6}$/i.test(e))return null;let n={red:Number.parseInt(e.slice(0,2),16),green:Number.parseInt(e.slice(2,4),16),blue:Number.parseInt(e.slice(4,6),16),alpha:255};return{fill:{color:{rgba:n,color:{rgba:n,type:"srgb"},mods:[],type:"uniColor"},type:"solid"},transparent:null,type:"fill",fillType:"solid"}}function kl(t){return{ahLst:{ahPolar:[],ahXY:[]},avLst:{},adjLst:{},cnxLst:[{pos:{x:"l",y:"t"},ang:"cd4"},{pos:{x:"r",y:"b"},ang:"_3cd4"}],gdLst:[],pathLst:[{commands:[{id:"moveTo",pt:{x:"l",y:"t"}},{id:"lnTo",pt:{x:"r",y:"b"}}],extrusionOk:!1,fill:"norm",stroke:!0}],rect:null,preset:t}}function Cl(t){let e=String(Rt(t,"a:prstGeom")?.attrs?.prst??"");if(!_l.has(e))return null;let n=Rt(t,"wp:anchor"),r=Rt(t,"wp:inline"),o=n||r;if(!o)return null;let i=Rt(o,"wp:docPr"),s=Rt(o,"wp:effectExtent"),a=Ri(o,"wp:extent"),l=Rt(t,"a:xfrm"),u=Ri(l,"a:ext"),h=Rt(t,"a:ln"),d=Rt(o,"wp:simplePos"),w=Nt(i?.attrs?.id)??1,f={id:w,name:String(i?.attrs?.name??`Line ${w}`),descr:i?.attrs?.descr==null?null:String(i.attrs.descr),title:i?.attrs?.title==null?null:String(i.attrs.title),hidden:null},g={id:-1,name:"",descr:null,title:null,hidden:null},m=Rt(t,"a:cxnSpLocks");return{type:"paraDrawing",docPr:f,effectExtent:{l:Nt(s?.attrs?.l)??0,t:Nt(s?.attrs?.t)??0,r:Nt(s?.attrs?.r)??0,b:Nt(s?.attrs?.b)??0},extent:a,graphic:{bWordShape:!0,extX:u.cx||a.cx,extY:u.cy||a.cy,nvCxnSpPr:{cNvPr:g,nvPr:{isPhoto:null,userDrawn:null},cNvCxnSpPr:{cxnSpLocks:{noChangeShapeType:ke(m?.attrs?.noChangeShapeType,!0)}}},spPr:{custGeom:kl(e),effectDag:null,effectLst:null,ln:{fill:Tl(h),lineJoin:Rt(h,"a:round")?{type:"round",lim:null}:null,algn:null,cap:h?.attrs?.cap??null,cmpd:h?.attrs?.cmpd??null,w:Nt(h?.attrs?.w)??0,headEnd:null,prstDash:String(Rt(h,"a:prstDash")?.attrs?.val??"solid"),tailEnd:null,type:"stroke"},fill:{fill:{type:"noFill"},transparent:null,type:"fill",fillType:"noFill"},xfrm:{ext:{cx:u.cx||a.cx,cy:u.cy},off:Sl(l,"a:off"),flipH:l?.attrs?.flipH==null?null:ke(l.attrs.flipH),flipV:l?.attrs?.flipV==null?null:ke(l.attrs.flipV),rot:Nt(l?.attrs?.rot)??null,chOffX:null,chOffY:null,chExtX:null,chExtY:null},bwMode:0},content:null,modelId:null,type:"connectShape",id:String(w)},cNvGraphicFramePr:{graphicFrameLocks:{}},positionH:Fi(o,"wp:positionH","column"),positionV:Fi(o,"wp:positionV","paragraph"),simplePos:{x:Nt(d?.attrs?.x)??0,y:Nt(d?.attrs?.y)??0,use:ke(o.attrs?.simplePos,!1)},distB:Nt(o.attrs?.distB)??0,distL:Nt(o.attrs?.distL)??0,distR:Nt(o.attrs?.distR)??0,distT:Nt(o.attrs?.distT)??0,allowOverlap:ke(o.attrs?.allowOverlap,!0),behindDoc:ke(o.attrs?.behindDoc,!1),hidden:null,layoutInCell:ke(o.attrs?.layoutInCell,!0),locked:ke(o.attrs?.locked,!1),relativeHeight:Nt(o.attrs?.relativeHeight)??0,wrapType:"none",drawingType:n?"anchor":"inline"}}function ji(t){let e=t?.tag==="w:drawing"?t:Rt(t,"w:drawing");return e?Cl(e):null}var zt=t=>t==null||t===""?null:Number(t),Cn=class{constructor(){this.counts=new Map}add(e){this.counts.set(e,(this.counts.get(e)||0)+1)}merge(e){for(let[n,r]of e.counts)this.counts.set(n,(this.counts.get(n)||0)+r)}top(e=50){return[...this.counts.entries()].sort((n,r)=>r[1]-n[1]).slice(0,e)}get size(){return this.counts.size}};function Ur(t){if(!t)return;let e={val:t.attrs["w:val"],color:Tn(Te(t.attrs["w:color"]),t.attrs["oo:crgb"])};return t.attrs["w:fill"]&&(e.fill=Tn(Te(t.attrs["w:fill"]),t.attrs["oo:frgb"])),{...Pt(t),...e}}function Ol(t,e){let n={bFromDocument:!0,type:"paraPr"};if(!t)return n;let r=a=>ht(t,a);r("w:pStyle")&&(n.pStyle=r("w:pStyle").attrs["w:val"]);for(let a of["widowControl","keepNext","keepLines","pageBreakBefore","contextualSpacing","suppressLineNumbers"])r("w:"+a)&&(n[a]=!0);r("w:shd")&&(n.shd=Ur(r("w:shd")));let o=r("w:spacing");o&&(n.spacing={},o.attrs["w:before"]&&(n.spacing.before=zt(o.attrs["w:before"])),o.attrs["w:after"]&&(n.spacing.after=zt(o.attrs["w:after"])),o.attrs["w:line"]&&(n.spacing.line=zt(o.attrs["w:line"])),o.attrs["w:lineRule"]&&(n.spacing.lineRule=o.attrs["w:lineRule"]),o.attrs["w:beforeAutospacing"]&&(n.spacing.beforeAutoSpacing=o.attrs["w:beforeAutospacing"]==="1"?"on":"off"),o.attrs["w:afterAutospacing"]&&(n.spacing.afterAutoSpacing=o.attrs["w:afterAutospacing"]==="1"?"on":"off"));let i=r("w:ind");i&&(n.ind={},i.attrs["w:left"]&&(n.ind.left=zt(i.attrs["w:left"])),i.attrs["w:right"]&&(n.ind.right=zt(i.attrs["w:right"])),i.attrs["w:firstLine"]&&(n.ind.firstLine=zt(i.attrs["w:firstLine"])));let s=zt(r("w:outlineLvl")?.attrs["w:val"]);return Number.isInteger(s)&&s>=0&&s<=9&&(n.outlineLvl=s),r("w:jc")&&(n.jc=r("w:jc").attrs["w:val"]),{...Pt(t),...n}}function Li(t,e){let n={bFromDocument:!0,type:"textPr"};if(!t)return n;let r=a=>ht(t,a),o=r("w:rFonts");if(o){n.rFonts={};for(let a of["ascii","hAnsi","eastAsia","cs","hint","asciiTheme","hAnsiTheme","eastAsiaTheme","cstheme"])o.attrs["w:"+a]&&(n.rFonts[a]=o.attrs["w:"+a])}let i=a=>{let l=r("w:"+a);if(!l)return;let u=l.attrs["w:val"];return!(u==="false"||u==="0")};for(let a of["b","bCs","i","iCs"]){let l=i(a);l!==void 0&&(n[a]=l)}r("w:color")&&(n.color=Tn(Te(r("w:color").attrs["w:val"]),r("w:color").attrs["oo:rgb"])),r("w:spacing")&&(n.spacing=zt(r("w:spacing").attrs["w:val"])),r("w:sz")&&(n.sz=zt(r("w:sz").attrs["w:val"])),r("w:szCs")&&(n.szCs=zt(r("w:szCs").attrs["w:val"])),r("w:shd")&&(n.shd=Ur(r("w:shd"))),r("w:vertAlign")&&(n.vertAlign=r("w:vertAlign").attrs["w:val"]);let s=r("w:lang");if(s){n.lang={};for(let a of["val","eastAsia","bidi"])s.attrs["w:"+a]&&(n.lang[a]=s.attrs["w:"+a])}return{...Pt(t),...n}}function Xr(t,e){let n=[];for(let o of t.kids)if(o.tag==="w:t"||o.tag==="w:delText")n.push((o.kids||[]).filter(i=>i.text!=null).map(i=>i.text).join(""));else if(o.tag==="w:br"){let i=o.attrs["w:type"];n.push({type:"break",breakType:i==="column"?"column":"page"})}else if(o.tag==="w:tab")n.push({type:"tab"});else if(o.tag==="oo:ci")try{n.push(JSON.parse(o.attrs["oo:v"]))}catch{}else if(o.tag==="w:drawing"||o.tag==="mc:AlternateContent"){let i=ji(o);i?n.push(i):e&&e.add("w:r>"+o.tag)}else o.tag&&o.tag!=="w:rPr"&&e&&e.add("w:r>"+o.tag);let r=Pt(t);return{...r,bFromDocument:!0,rPr:Li(ht(t,"w:rPr"),e),content:n,footnotes:r.footnotes||[],endnotes:r.endnotes||[],reviewType:r.reviewType||"common",type:"run"}}var Je={"w:ins":"add","w:del":"remove","w:moveTo":"add","w:moveFrom":"remove"};function Wr(t){return{userId:"",author:t.attrs["w:author"]||"",date:t.attrs["w:date"]||"",moveType:"noMove",prevType:-1}}function Hr(t,e,n,r,o){for(let i of t.kids)i.tag==="w:r"?r.push({...Xr(i,o),reviewType:e,reviewInfo:n}):Je[i.tag]?Hr(i,Je[i.tag],Wr(i),r,o):i.tag&&o&&o.add(t.tag+">"+i.tag)}function El(t,e,n){let r=[];for(let l of t.kids||[])if(l.tag==="w:r")r.push(Xr(l,e));else if(Je[l.tag])Hr(l,Je[l.tag],Wr(l),r,e);else if(l.tag==="oo:pi")try{r.push(JSON.parse(l.attrs["oo:v"]))}catch{}else l.tag&&e&&e.add("w:hyperlink>"+l.tag);let o=t.attrs["r:id"],s=(o&&n&&typeof n.get=="function"?n.get(o):null)?.target||t.attrs["w:anchor"]||"",a=t.attrs["w:tooltip"]||"";return{...Pt(t),...a?{tooltip:a}:{},...s?{value:s}:{},content:r,type:"hyperlink"}}function Bi(t,e){return!t||!e?t:t.type==="run"?{...t,rPr:{...t.rPr||{},...e,rFonts:{...t.rPr?.rFonts||{},...e.rFonts||{}}}}:t.type==="hyperlink"&&Array.isArray(t.content)?{...t,content:t.content.map(n=>Bi(n,e))}:t}function Mi(t,e,n){let r=ht(t,"w:pPr"),o=Li(r&&ht(r,"w:rPr"),e),i=[];for(let l of t.kids)if(l.tag==="w:r")i.push(Xr(l,e));else if(l.tag==="w:hyperlink")i.push(El(l,e,n));else if(Je[l.tag])Hr(l,Je[l.tag],Wr(l),i,e);else if(l.tag==="oo:pi")try{i.push(JSON.parse(l.attrs["oo:v"]))}catch{}else l.tag==="w:commentRangeStart"?i.push({type:"commentRangeStart",id:Number(l.attrs["w:id"])}):l.tag==="w:commentRangeEnd"?i.push({type:"commentRangeEnd",id:Number(l.attrs["w:id"])}):l.tag==="w:commentReference"?i.push({type:"commentReference",id:Number(l.attrs["w:id"])}):l.tag&&l.tag!=="w:pPr"&&e&&e.add("w:p>"+l.tag);for(let l=0;l<i.length;l+=1)i[l]=Bi(i[l],o);let s=Pt(t,"oo:er");i.push({bFromDocument:!0,footnotes:[],endnotes:[],reviewType:"common",...s,rPr:o,content:[],type:"endRun"});let a=Pt(t);return{...a,bFromDocument:!0,pPr:Ol(r,e),rPr:o,content:i,changes:a.changes||[],type:"paragraph"}}function Ui(t,e,n){let r=[];for(let o of t||[])if(o.tag==="w:p")r.push(Mi(o,e,n));else if(o.tag==="w:tbl")r.push(zl(o,e,n));else if(o.tag==="oo:blk")try{r.push(JSON.parse(o.attrs["oo:v"]))}catch{}else o.tag&&o.tag!=="w:sectPr"&&o.tag!=="w:tcPr"&&o.tag!=="w:trPr"&&o.tag!=="w:tblPr"&&o.tag!=="w:tblGrid"&&e&&e.add("blk>"+o.tag);return r}var Nl=["top","left","bottom","right","insideH","insideV","start","end","between","bar"];function Il(t){let e={color:Tn(Te(t.attrs["w:color"]),t.attrs["oo:rgb"]),sz:zt(t.attrs["w:sz"])||0,space:zt(t.attrs["w:space"])||0,value:t.attrs["w:val"]};return{...Pt(t),...e}}function Xi(t){if(!t)return;let e={};for(let n of t.kids){let r=(n.tag||"").replace(/^w:/,"");Nl.includes(r)&&(e[r]=Il(n))}return e}function Zr(t){if(!t)return;let e=t.attrs["w:type"]||"auto";return{type:e,w:vi(e,t.attrs["w:w"])}}function Al(t){if(!t)return;let e={};for(let n of t.kids){let r=(n.tag||"").replace(/^w:/,"");["top","left","bottom","right","start","end"].includes(r)&&(e[r]=Zr(n))}return Object.keys(e).length?e:void 0}function Dl(t,e){let n={type:"tablePr",...Pt(t)};if(n.inline??=!0,!t)return n;let r=s=>ht(t,s);r("w:tblStyle")&&(n.tblStyle=r("w:tblStyle").attrs["w:val"]),r("w:tblW")&&(n.tblW=Zr(r("w:tblW")));let o=zt(r("w:outlineLvl")?.attrs["w:val"]);if(Number.isInteger(o)&&o>=0&&o<=9&&(n.outlineLvl=o),r("w:jc")&&(n.jc=r("w:jc").attrs["w:val"]),r("w:tblBorders")&&(n.tblBorders=Xi(r("w:tblBorders"))),r("w:tblCellMar")&&(n.tblCellMar=Al(r("w:tblCellMar"))),r("w:tblLayout")&&(n.tblLayout=r("w:tblLayout").attrs["w:type"]),r("w:tblLook")){let s=r("w:tblLook").attrs;n.tblLook={};for(let a of["firstColumn","firstRow","lastColumn","lastRow","noHBand","noVBand"])s["w:"+a]!=null&&(n.tblLook[a]=s["w:"+a]==="1"||s["w:"+a]==="true")}let i=r("w:tblpPr");if(i){n.inline=!1;let s={...n.tblpPr};for(let a of["horzAnchor","vertAnchor","tblpXSpec","tblpYSpec"])i.attrs["w:"+a]!=null&&(s[a]=i.attrs["w:"+a]);for(let a of["tblpX","tblpY","leftFromText","rightFromText","topFromText","bottomFromText"])i.attrs["w:"+a]!=null&&(s[a]=Number(i.attrs["w:"+a]));n.tblpPr=s}return n}function $l(t,e){let n={type:"tableCellPr"};if(!t)return n;let r=o=>ht(t,o);return r("w:tcW")&&(n.tcW=Zr(r("w:tcW"))),r("w:gridSpan")&&(n.gridSpan=zt(r("w:gridSpan").attrs["w:val"])),r("w:vMerge")&&(n.vMerge=r("w:vMerge").attrs["w:val"]||"continue"),r("w:tcBorders")&&(n.tcBorders=Xi(r("w:tcBorders"))),r("w:shd")&&(n.shd=Ur(r("w:shd"))),r("w:vAlign")&&(n.vAlign=r("w:vAlign").attrs["w:val"]),{...Pt(t),...n}}function Pl(t,e){let n={type:"tableRowPr"};if(!t)return n;let r=i=>ht(t,i);r("w:tblHeader")&&(n.tblHeader=!0);let o=zt(r("w:outlineLvl")?.attrs["w:val"]);return Number.isInteger(o)&&o>=0&&o<=9&&(n.outlineLvl=o),r("w:jc")&&(n.jc=r("w:jc").attrs["w:val"]),r("w:trHeight")&&(n.trHeight={val:zt(r("w:trHeight").attrs["w:val"]),hRule:r("w:trHeight").attrs["w:hRule"]}),{...Pt(t),...n}}var Wi=1;function Rl(t,e,n){let r=Ui(t.kids,e,n),o=r.length?r:[Mi({tag:"w:p",attrs:{},kids:[]},e,n)],i=Pt(t);return{...i,content:{bPresentation:!1,content:o,type:"docContent"},tcPr:$l(ht(t,"w:tcPr"),e),id:i.id!=null?i.id:String(Wi++),type:"tblCell"}}function Fl(t,e,n){let r=Pt(t);return{...r,content:Jt(t,"w:tc").map(o=>Rl(o,e,n)),reviewInfo:r.reviewInfo||{userId:"",author:"",date:"",moveType:"noMove",prevType:-1},reviewType:r.reviewType||"common",trPr:Pl(ht(t,"w:trPr"),e),type:"tblRow"}}function zl(t,e,n){let r=Jt(ht(t,"w:tblGrid"),"w:gridCol").map(i=>({w:zt(i.attrs["w:w"]),type:"gridCol"})),o=Pt(t);return{...o,bPresentation:!1,tblGrid:r,tblPr:Dl(ht(t,"w:tblPr"),e),content:Jt(t,"w:tr").map(i=>Fl(i,e,n)),changes:o.changes||[],type:"table"}}function Ve(t,e=new Cn,n={}){Wi=1;let r=Et(t),o=ht(r,"w:body"),i={type:"document",paraPr:{bFromDocument:!0,type:"paraPr"},content:[]};if(!o)return{doc:i,gaps:e};let s=Ui(o.kids,e,n.relationships||n.rels),a=Pt(o);return{doc:{type:"document",paraPr:{bFromDocument:!0,type:"paraPr"},...a,content:s},gaps:e}}function Qn(t){if(!t)return"";let e=t.fill?` w:fill="${$t(t.fill)}"${qt("oo:frgb",t.fill)}`:"";return`<w:shd w:val="${t.val||"clear"}" w:color="${$t(t.color)}"${qt("oo:crgb",t.color)}${e}${et(t,["val","color","fill"])}/>`}function jl(t,e){if(!e)return"";let n={},r=e.val!=null?e.val:e.value;return r!=null&&(n["w:val"]=r),e.sz!=null&&(n["w:sz"]=e.sz),e.space!=null&&(n["w:space"]=e.space),e.color&&(n["w:color"]=$t(e.color)),`<w:${t}${rt(n)}${e.color?qt("oo:rgb",e.color):""}${et(e,["color","sz","space","value","val"])}/>`}var Ll=["top","left","bottom","right","insideH","insideV","start","end","between","bar","tl2br","tr2bl"];function Gr(t,e){if(!e)return"";let n="";for(let r of Ll)e[r]&&(n+=jl(r,e[r]));return Object.keys(e).length?`<w:${t}>${n}</w:${t}>`:`<w:${t}/>`}function Jr(t,e){if(!e)return"";let n={};e.type!=null&&(n["w:type"]=e.type);let r=e.w!=null?e.w:e.value;return r!=null&&(n["w:w"]=Yn(e.type,r)),`<w:${t}${rt(n)}${et(e,["type","w","value"])}/>`}function Hi(t,e){if(!e)return"";let n="";for(let r of["top","left","bottom","right","start","end"])e[r]&&(n+=Jr(r,e[r]));return n?`<w:${t}>${n}</w:${t}>`:""}function Ye(t){return typeof t=="object"&&t!==null?t.val??t.value??t.type:t}function Vr(t){if(t==null)return null;let e=Number(t);if(!Number.isFinite(e))return null;let n=e-1;return n<0?0:n>9?9:n}function Bl(t){if(!t)return"";let e="",n=Ye(t.ilvl),r=Ye(t.numId);return n!=null&&(e+=`<w:ilvl w:val="${z(String(n))}"/>`),r!=null&&(e+=`<w:numId w:val="${z(String(r))}"/>`),e||et(t,["ilvl","numId"])?`<w:numPr${et(t,["ilvl","numId"])}>${e}</w:numPr>`:""}function Ml(t){if(!t)return"";let e=Array.isArray(t)?t:Array.isArray(t.tabs)?t.tabs:Array.isArray(t.list)?t.list:[],n="";for(let r of e){if(!r)continue;let o={},i=r.val??r.value??r.type;i!=null&&(o["w:val"]=i),r.pos!=null&&(o["w:pos"]=r.pos),r.leader!=null&&(o["w:leader"]=r.leader),n+=`<w:tab${rt(o)}${et(r,["val","value","type","pos","leader"])}/>`}return n?`<w:tabs>${n}</w:tabs>`:""}function Ul(t,e={}){if(!t)return"";let n="";e.includeStyleRef&&t.pStyle!=null&&(n+=`<w:pStyle w:val="${z(String(t.pStyle))}"/>`);for(let o of["keepNext","keepLines","pageBreakBefore","widowControl","contextualSpacing","suppressLineNumbers"])t[o]===!0&&(n+=`<w:${o}/>`);if(n+=Bl(t.numPr),n+=Ml(t.tabs),n+=Gr("pBdr",t.pBdr),n+=Qn(t.shd),t.spacing){let o=t.spacing,i={};o.before!=null&&(i["w:before"]=o.before),o.after!=null&&(i["w:after"]=o.after),o.line!=null&&(i["w:line"]=o.line),o.lineRule!=null&&(i["w:lineRule"]=o.lineRule),o.beforeAutoSpacing!=null&&(i["w:beforeAutospacing"]=o.beforeAutoSpacing==="off"?0:1),o.afterAutoSpacing!=null&&(i["w:afterAutospacing"]=o.afterAutoSpacing==="off"?0:1),n+=`<w:spacing${rt(i)}${et(o,["before","after","line","lineRule","beforeAutoSpacing","afterAutoSpacing"])}/>`}if(t.ind){let o=t.ind,i={};for(let s of["left","right","firstLine","hanging","start","end","firstLineChars","hangingChars"])o[s]!=null&&(i["w:"+s]=o[s]);n+=`<w:ind${rt(i)}${et(o,Object.keys(i).map(s=>s.slice(2)))}/>`}t.jc!=null&&(n+=`<w:jc w:val="${z(String(t.jc))}"/>`),t.textAlignment!=null&&(n+=`<w:textAlignment w:val="${z(String(Ye(t.textAlignment)))}"/>`),t.bidi===!0&&(n+="<w:bidi/>");let r=Vr(t.outlineLvl);return r!=null&&(n+=`<w:outlineLvl w:val="${r}"/>`),n}function On(t){let e=Ul(t),n=t?et(t,["pStyle","keepNext","keepLines","pageBreakBefore","widowControl","contextualSpacing","suppressLineNumbers","numPr","tabs","pBdr","shd","spacing","ind","jc","textAlignment","bidi","outlineLvl","type","bFromDocument"]):"";return e||n?`<w:pPr${n}>${e}</w:pPr>`:""}function Xl(t){if(t==null)return"";if(t===!1)return'<w:u w:val="none"/>';if(t===!0)return'<w:u w:val="single"/>';if(typeof t!="object")return`<w:u w:val="${z(String(t))}"/>`;let e={},n=t.val??t.value??t.type;return n!=null&&(e["w:val"]=n),t.color&&(e["w:color"]=$t(t.color)),`<w:u${rt(e)}${t.color?qt("oo:rgb",t.color):""}${et(t,["val","value","type","color"])}/>`}function Wl(t){if(!t)return"";let e="";if(t.rFonts){let r=t.rFonts,o={};for(let i of["ascii","hAnsi","eastAsia","cs","hint","asciiTheme","hAnsiTheme","eastAsiaTheme","cstheme","csTheme"])r[i]!=null&&(o["w:"+i]=r[i]);e+=`<w:rFonts${rt(o)}${et(r,Object.keys(o).map(i=>i.slice(2)))}/>`}let n=(r,o)=>o===!0?`<w:${r}/>`:o===!1?`<w:${r} w:val="false"/>`:"";for(let r of["b","bCs","i","iCs","strike","dstrike","caps","smallCaps","vanish","rtl","noProof"])e+=n(r,t[r]);if(e+=Xl(t.u),t.color&&(e+=`<w:color w:val="${$t(t.color)}"${qt("oo:rgb",t.color)}/>`),t.spacing!=null&&(e+=`<w:spacing w:val="${t.spacing}"/>`),t.position!=null&&(e+=`<w:position w:val="${t.position}"/>`),t.kern!=null&&(e+=`<w:kern w:val="${t.kern}"/>`),t.sz!=null&&(e+=`<w:sz w:val="${t.sz}"/>`),t.szCs!=null&&(e+=`<w:szCs w:val="${t.szCs}"/>`),t.highlight){let r=Ge(t.highlight);r&&(e+=`<w:highlight w:val="${r}"/>`)}if(t.vertAlign!=null&&(e+=`<w:vertAlign w:val="${z(String(Ye(t.vertAlign)))}"/>`),e+=Qn(t.shd),t.lang){let r={};for(let o of["val","eastAsia","bidi"])t.lang[o]!=null&&(r["w:"+o]=t.lang[o]);e+=`<w:lang${rt(r)}${et(t.lang,["val","eastAsia","bidi"])}/>`}return e}function En(t){let e=Wl(t),n=t?et(t,["rFonts","b","bCs","i","iCs","strike","dstrike","caps","smallCaps","vanish","rtl","noProof","u","color","spacing","position","kern","sz","szCs","highlight","vertAlign","shd","lang","type","bFromDocument"]):"";return e||n?`<w:rPr${n}>${e}</w:rPr>`:""}function Zi(t){if(!t)return"";let e="";if(t.tblStyle!=null&&(e+=`<w:tblStyle w:val="${z(String(t.tblStyle))}"/>`),e+=Jr("tblW",t.tblW),t.jc!=null&&(e+=`<w:jc w:val="${z(String(t.jc))}"/>`),e+=Gr("tblBorders",t.tblBorders),e+=Qn(t.shd),e+=Hi("tblCellMar",t.tblCellMar),t.tblLayout!=null&&(e+=`<w:tblLayout w:type="${z(String(Ye(t.tblLayout)))}"/>`),t.tblLook!=null&&typeof t.tblLook=="object"){let r={};for(let o of Object.keys(t.tblLook))o!=="type"&&(r["w:"+o]=t.tblLook[o]===!0?1:t.tblLook[o]===!1?0:t.tblLook[o]);e+=`<w:tblLook${rt(r)}/>`}let n=et(t,["tblStyle","tblW","jc","tblBorders","shd","tblCellMar","tblLayout","tblLook","type"]);return e||n?`<w:tblPr${n}>${e}</w:tblPr>`:""}function Gi(t){if(!t)return"";let e="";t.tblHeader===!0&&(e+="<w:tblHeader/>"),t.cantSplit===!0&&(e+="<w:cantSplit/>"),t.jc!=null&&(e+=`<w:jc w:val="${z(String(t.jc))}"/>`),t.trHeight&&(e+=`<w:trHeight${rt({"w:val":t.trHeight.value!=null?t.trHeight.value:t.trHeight.val,"w:hRule":t.trHeight.hRule})}${et(t.trHeight,["value","val","hRule"])}/>`);let n=et(t,["tblHeader","cantSplit","jc","trHeight","type"]);return e||n?`<w:trPr${n}>${e}</w:trPr>`:""}function Ji(t){if(!t)return"";let e="";e+=Jr("tcW",t.tcW),t.gridSpan!=null&&(e+=`<w:gridSpan w:val="${t.gridSpan}"/>`),t.vMerge!=null&&(e+=`<w:vMerge${t.vMerge&&t.vMerge!=="continue"?` w:val="${z(String(t.vMerge))}"`:""}/>`),e+=Gr("tcBorders",t.tcBorders),e+=Qn(t.shd),e+=Hi("tcMar",t.tcMar),t.vAlign!=null&&(e+=`<w:vAlign w:val="${z(String(Ye(t.vAlign)))}"/>`),t.noWrap===!0&&(e+="<w:noWrap/>");let n=et(t,["tcW","gridSpan","vMerge","tcBorders","shd","tcMar","vAlign","noWrap","type"]);return e||n?`<w:tcPr${n}>${e}</w:tcPr>`:""}function Hl(t){switch(t){case"paragraphStyle":return"paragraph";case"characterStyle":return"character";case"tableStyle":return"table";case"numberingStyle":return"numbering";case"character":case"table":case"numbering":case"paragraph":return t;default:return"paragraph"}}function Zl(t){switch(t){case"topLeftCell":return"nwCell";case"topRightCell":return"neCell";case"bottomLeftCell":return"swCell";case"bottomRightCell":return"seCell";default:return t}}function Gl(t,e){if(!e)return"";let n=Zl(e.styleType??t);if(!n)return"";let r=On(e.pPr)+En(e.rPr)+Zi(e.tblPr)+Gi(e.trPr)+Ji(e.tcPr),o=et(e,["styleType","pPr","rPr","tblPr","trPr","tcPr","type"]);return r||o?`<w:tblStylePr w:type="${z(String(n))}"${o}>${r}</w:tblStylePr>`:""}function Jl(t){if(!t||typeof t!="object")return"";let e="";for(let n of Object.keys(t))e+=Gl(n,t[n]);return e}function Yr(t,e){if(!e||t==null)return"";let r={"w:type":Hl(e.styleType??e.type),"w:styleId":String(t)};e.default===!0&&(r["w:default"]="1"),e.customStyle===!0&&(r["w:customStyle"]="1");let o="";return e.name!=null&&(o+=`<w:name w:val="${z(String(e.name))}"/>`),e.basedOn!=null&&e.basedOn!==""&&(o+=`<w:basedOn w:val="${z(String(e.basedOn))}"/>`),e.next!=null&&e.next!==""&&(o+=`<w:next w:val="${z(String(e.next))}"/>`),e.link!=null&&e.link!==""&&(o+=`<w:link w:val="${z(String(e.link))}"/>`),e.hidden===!0&&(o+="<w:hidden/>"),e.uiPriority!=null&&(o+=`<w:uiPriority w:val="${e.uiPriority}"/>`),e.semiHidden===!0&&(o+="<w:semiHidden/>"),e.unhideWhenUsed===!0&&(o+="<w:unhideWhenUsed/>"),e.qFormat===!0&&(o+="<w:qFormat/>"),o+=On(e.pPr),o+=En(e.rPr),o+=Zi(e.tblPr),o+=Gi(e.trPr),o+=Ji(e.tcPr),o+=Jl(e.tblStylePr),`<w:style${rt(r)}>${o}</w:style>`}function tr(t,e){let n="";if(e&&(e.paraPr||e.textPr)){let o=En(e.textPr),i=On(e.paraPr);n=`<w:docDefaults><w:rPrDefault>${o}</w:rPrDefault><w:pPrDefault>${i}</w:pPrDefault></w:docDefaults>`}let r=(t||[]).map(o=>Yr(o.styleId,o.def)).join("");return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:oo="urn:coco:oojson">'+n+r+"</w:styles>"}function Vl(t){return typeof t=="object"&&t!==null?t.val??t.value??t.type:t}function Vi(t){return!t||typeof t!="object"?[]:Array.isArray(t)?t.map((e,n)=>[String(e?.abstractNumId??e?.numId??n),e]):Object.keys(t).map(e=>[e,t[e]])}function Yl(t,e){for(let n of e)if(t&&t[n]!=null)return t[n]}function Mt(t,e){let n=Vl(e);return n==null?"":`<w:${t} w:val="${z(String(n))}"/>`}function qr(t,e){if(!t||typeof t!="object")return"";let n=Yl(t,["ilvl","level","lvl"]),r={"w:ilvl":String(n??e??0)},o="";o+=Mt("start",t.start),o+=Mt("numFmt",t.numFmt),o+=Mt("lvlRestart",t.lvlRestart??t.restart),o+=Mt("pStyle",t.pStyle),(t.isLgl===!0||t.legal===!0||t.isLegal===!0)&&(o+="<w:isLgl/>"),o+=Mt("suff",t.suff),o+=Mt("lvlPicBulletId",t.lvlPicBulletId??t.picBulletId),t.lvlText!=null&&(o+=`<w:lvlText w:val="${z(String(t.lvlText))}"/>`),o+=Mt("lvlJc",t.lvlJc),o+=On(t.pPr),o+=En(t.rPr);let i=et(t,["ilvl","level","lvl","start","numFmt","lvlRestart","restart","pStyle","isLgl","legal","isLegal","suff","lvlPicBulletId","picBulletId","lvlText","lvlJc","pPr","rPr","type"]);return`<w:lvl${rt(r)}${i}>${o}</w:lvl>`}function ql(t){return t?Array.isArray(t)?t.map((e,n)=>qr(e,n)).join(""):typeof t!="object"?"":Object.keys(t).map(e=>qr(t[e],Number(e))).join(""):""}function Kl(t,e){if(!e||typeof e!="object")return"";let n=e.abstractNumId??e.id??t;if(n==null||n==="")return"";let r="";r+=Mt("nsid",e.nsid),r+=Mt("multiLevelType",e.multiLevelType),r+=Mt("tmpl",e.tmpl),r+=Mt("name",e.name),r+=Mt("styleLink",e.styleLink),r+=Mt("numStyleLink",e.numStyleLink),r+=ql(e.lvl??e.levels??e.Ec);let o=et(e,["abstractNumId","id","nsid","multiLevelType","tmpl","name","styleLink","numStyleLink","lvl","levels","Ec","type"]);return`<w:abstractNum w:abstractNumId="${z(String(n))}"${o}>${r}</w:abstractNum>`}function Yi(t,e){if(!t||typeof t!="object")return"";let n=t.ilvl??t.level??e??0,r="";r+=Mt("startOverride",t.startOverride),r+=qr(t.lvl??t.levelDef,n);let o=et(t,["ilvl","level","startOverride","lvl","levelDef","type"]);return`<w:lvlOverride w:ilvl="${z(String(n))}"${o}>${r}</w:lvlOverride>`}function Ql(t){return t?Array.isArray(t)?t.map((e,n)=>Yi(e,n)).join(""):typeof t!="object"?"":Object.keys(t).map(e=>Yi(t[e],Number(e))).join(""):""}function tc(t,e){if(!e||typeof e!="object")return"";let n=e.numId??e.id??t;if(n==null||n==="")return"";let r=e.abstractNumId??e.abstractId??e.numStyleLink,o="";r!=null&&(o+=`<w:abstractNumId w:val="${z(String(r))}"/>`),o+=Ql(e.lvlOverride??e.overrides);let i=et(e,["numId","id","abstractNumId","abstractId","numStyleLink","lvlOverride","overrides","type"]);return`<w:num w:numId="${z(String(n))}"${i}>${o}</w:num>`}function qi(t){if(!t||typeof t!="object")return;let e=t.abstractNum??t.abstractNums,n=t.num??t.nums,r=Vi(e).map(([i,s])=>Kl(i,s)).join(""),o=Vi(n).map(([i,s])=>tc(i,s)).join("");if(!(!r&&!o))return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:numbering xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:oo="urn:coco:oojson">'+r+o+"</w:numbering>"}var Lt={document:"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml",styles:"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml",numbering:"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml",theme:"application/vnd.openxmlformats-officedocument.theme+xml",fontTable:"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml",settings:"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml",webSettings:"application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml",rels:"application/vnd.openxmlformats-package.relationships+xml",contentTypes:"application/vnd.openxmlformats-package.content-types+xml"},Oe={officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",numbering:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",fontTable:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",settings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",webSettings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"};function Ce(t,e,n){let r=n.replace(/^<\?xml[^>]*\?>/,"");return`<pkg:part pkg:name="${z(t)}" pkg:contentType="${z(e)}"><pkg:xmlData>${r}</pkg:xmlData></pkg:part>`}function ec(t,e,n){return`<pkg:part pkg:name="${z(t)}" pkg:contentType="${z(e)}" pkg:compression="store"><pkg:binaryData>${String(n).replace(/\s+/g,"")}</pkg:binaryData></pkg:part>`}function Qi({id:t,type:e,target:n,targetMode:r}){let o=r?` TargetMode="${z(r)}"`:"";return`<Relationship Id="${z(t)}" Type="${z(e)}" Target="${z(n)}"${o}/>`}function nc(t){let e=String(t||"").replace(/^\//,""),n=e.lastIndexOf("/");return n===-1?`/_rels/${e}.rels`:`/${e.slice(0,n)}/_rels/${e.slice(n+1)}.rels`}function rc(t,e){if(!e.startsWith("/"))return e;let n=String(t||"").replace(/^\//,"").split("/").slice(0,-1),r=e.replace(/^\//,"").split("/");for(;n.length&&r[0]===n[0];)n.shift(),r.shift();return"../".repeat(n.length)+r.join("/")}function oc(t,e){if(!t||typeof t!="object")return null;let n=String(t.name??"").trim(),r=String(t.contentType??"").trim();return!n||!r?null:{name:n.startsWith("/")?n:`/${n}`,contentType:r,xml:t.xml,binary:t.binary,rel:t.rel?{source:t.rel.source??"/word/document.xml",id:t.rel.id??`rIdExtra${e}`,type:t.rel.type,target:t.rel.target,targetMode:t.rel.targetMode}:void 0}}function ic(t){return/^(https?:|mailto:|ftp:)/i.test(String(t||""))}function er(t,e,n={index:1}){if(Array.isArray(t))return t.map(o=>er(o,e,n));if(!t||typeof t!="object")return t;let r={...t};if(r.type==="hyperlink"&&ic(r.value)&&!r.rId&&!r.id&&!r["r:id"]){let o=`rIdCocoHyperlink${n.index++}`;r.rId=o,e.push(Qi({id:o,type:Oe.hyperlink,target:String(r.value),targetMode:"External"}))}return Array.isArray(r.content)&&(r.content=er(r.content,e,n)),r.content&&typeof r.content=="object"&&!Array.isArray(r.content)&&(r.content=er(r.content,e,n)),r}function Kr(t){let e=Number.isFinite(Number(t))?Math.max(0,Math.min(255,Number(t))):0;return Math.round(e).toString(16).toUpperCase().padStart(2,"0")}function nr(t,e){return!t||typeof t!="object"?e:Kr(t.red)+Kr(t.green)+Kr(t.blue)}function Kt(t,e,n){let r=e?.color||e;if(r?.type==="sys"){let o=nr(r.rgba,n.lastClr||n.val||"000000");return`<a:${t}><a:sysClr val="${z(r.id||n.sys||"windowText")}" lastClr="${z(o)}"/></a:${t}>`}return`<a:${t}><a:srgbClr val="${z(nr(r?.rgba,n.val))}"/></a:${t}>`}function Qt(t,e,n,r){return t?.themeElements?.fontScheme?.[e]?.[n]||r}function sc(t){let n=t?.themeElements?.fontScheme?.name||"Office",r=Qt(t,"majorFont","latin","Cambria"),o=Qt(t,"majorFont","ea","\u5B8B\u4F53"),i=Qt(t,"majorFont","cs","Times New Roman"),s=Qt(t,"minorFont","latin","Calibri"),a=Qt(t,"minorFont","ea","\u5B8B\u4F53"),l=Qt(t,"minorFont","cs","Arial");return`<a:fontScheme name="${z(n)}"><a:majorFont><a:latin typeface="${z(r)}"/><a:ea typeface="${z(o)}"/><a:cs typeface="${z(i)}"/></a:majorFont><a:minorFont><a:latin typeface="${z(s)}"/><a:ea typeface="${z(a)}"/><a:cs typeface="${z(l)}"/></a:minorFont></a:fontScheme>`}function ts(t,e="phClr"){let n=t?.solidFill??t,r=n?.schemeClr??n?.schemeColor??n?.color;if(typeof r=="string")return`<a:solidFill><a:schemeClr val="${z(r)}"/></a:solidFill>`;if(r?.val||r?.id)return`<a:solidFill><a:schemeClr val="${z(r.val||r.id)}"/></a:solidFill>`;let o=n?.srgbClr??n?.rgb??nr(r?.rgba,null);return o?`<a:solidFill><a:srgbClr val="${z(String(o).replace(/^#/,"").toUpperCase())}"/></a:solidFill>`:`<a:solidFill><a:schemeClr val="${z(e)}"/></a:solidFill>`}function ac(t,e="phClr"){let n=t?.schemeClr??t?.schemeColor??t?.color??t;if(typeof n=="string")return`<a:schemeClr val="${z(n)}"/>`;if(n?.val||n?.id)return`<a:schemeClr val="${z(n.val||n.id)}"/>`;let r=t?.srgbClr??t?.rgb??nr(n?.rgba??t?.rgba,null);return r?`<a:srgbClr val="${z(String(r).replace(/^#/,"").toUpperCase())}"/>`:`<a:schemeClr val="${z(e)}"/>`}function lc(t){if(!t||typeof t!="object")return"";let e={};for(let n of["blurRad","dist","dir","sx","sy","kx","ky","algn","rotWithShape"])t[n]!=null&&(e[n]=t[n]);return`<a:outerShdw${rt(e)}>${ac(t.solidFill??t.fill??t.color)}</a:outerShdw>`}function cc(t){let e=Array.isArray(t)?t:t?[t]:[];return`<a:effectStyleLst>${(e.length?e:[{effectLst:{}}]).map(r=>{let o=r.effectLst??r.effects??r,i=o.outerShdw??o.outerShadow;return`<a:effectStyle><a:effectLst>${lc(i)}</a:effectLst></a:effectStyle>`}).join("")}</a:effectStyleLst>`}function Ki(t,e){let n=Array.isArray(e)?e:e?[e]:[],r=(n.length?n:[{solidFill:{schemeClr:"phClr"}}]).map(o=>ts(o)).join("");return`<a:${t}>${r}</a:${t}>`}function uc(t){let e=Array.isArray(t)?t:t?[t]:[];return`<a:lnStyleLst>${(e.length?e:[{w:9525,cap:"flat",cmpd:"sng",algn:"ctr",solidFill:{schemeClr:"phClr"}}]).map(r=>{let o={w:r.w??r.width??9525,cap:r.cap??"flat",cmpd:r.cmpd??"sng",algn:r.algn??r.align??"ctr"};return`<a:ln${rt(o)}>${ts(r.solidFill?r:r.fill??r)}</a:ln>`}).join("")}</a:lnStyleLst>`}function fc(t){let e=t?.themeElements?.fmtScheme,n=e?.name||"Office";return`<a:fmtScheme name="${z(n)}">`+Ki("fillStyleLst",e?.fillStyleLst??e?.fillStyles)+uc(e?.lnStyleLst??e?.lineStyleLst??e?.lineStyles)+cc(e?.effectStyleLst??e?.effectStyles)+Ki("bgFillStyleLst",e?.bgFillStyleLst??e?.bgFillStyles)+"</a:fmtScheme>"}function Qr(t){let e=t?.themeElements?.clrScheme,n=t?.name||"Office Theme",r=e?.name||"Office";return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="${z(n)}"><a:themeElements><a:clrScheme name="${z(r)}">`+Kt("dk1",e?.dk1,{sys:"windowText",lastClr:"000000"})+Kt("lt1",e?.lt1,{sys:"window",lastClr:"FFFFFF"})+Kt("dk2",e?.dk2,{val:"1F497D"})+Kt("lt2",e?.lt2,{val:"EEECE1"})+Kt("accent1",e?.accent1,{val:"4F81BD"})+Kt("accent2",e?.accent2,{val:"C0504D"})+Kt("accent3",e?.accent3,{val:"9BBB59"})+Kt("accent4",e?.accent4,{val:"8064A2"})+Kt("accent5",e?.accent5,{val:"4BACC6"})+Kt("accent6",e?.accent6,{val:"F79646"})+Kt("hlink",e?.hlink,{val:"0000FF"})+Kt("folHlink",e?.folHlink,{val:"800080"})+"</a:clrScheme>"+sc(t)+fc(t)+"</a:themeElements></a:theme>"}function to(t){return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:fonts xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">'+[...new Set(["Calibri","Cambria","Arial","Times New Roman","\u5B8B\u4F53",Qt(t,"majorFont","latin",null),Qt(t,"majorFont","ea",null),Qt(t,"majorFont","cs",null),Qt(t,"minorFont","latin",null),Qt(t,"minorFont","ea",null),Qt(t,"minorFont","cs",null)].filter(Boolean))].map(r=>{let o=/[\u3400-\u9fff]/.test(r)?"86":"00",i=/Times|Cambria|宋体/i.test(r)?"roman":"swiss";return`<w:font w:name="${z(r)}"><w:charset w:val="${o}"/><w:family w:val="${i}"/></w:font>`}).join("")+"</w:fonts>"}function eo(){return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:settings xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:zoom w:percent="100"/><w:defaultTabStop w:val="720"/><w:compat><w:compatSetting w:name="compatibilityMode" w:uri="http://schemas.microsoft.com/office/word" w:val="15"/></w:compat></w:settings>'}function no(){return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:webSettings xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:optimizeForBrowser/></w:webSettings>'}function ro(t){let e=t?.theme;return[{name:"/word/theme/theme1.xml",contentType:Lt.theme,xml:Qr(e),rel:{type:Oe.theme,target:"theme/theme1.xml"}},{name:"/word/fontTable.xml",contentType:Lt.fontTable,xml:to(e),rel:{type:Oe.fontTable,target:"fontTable.xml"}},{name:"/word/settings.xml",contentType:Lt.settings,xml:eo(),rel:{type:Oe.settings,target:"settings.xml"}},{name:"/word/webSettings.xml",contentType:Lt.webSettings,xml:no(),rel:{type:Oe.webSettings,target:"webSettings.xml"}}]}function oo(t,e={}){let n=[],r=er(t,n),o=Kn(r),{stylesXml:i,numberingXml:s}=e,l=[...e.includeDefaultParts!==!1?ro(t):[],...e.extraParts??[]].map((v,_)=>oc(v,_+1)).filter(Boolean),u=[`<Override PartName="/word/document.xml" ContentType="${Lt.document}"/>`];i&&u.push(`<Override PartName="/word/styles.xml" ContentType="${Lt.styles}"/>`),s&&u.push(`<Override PartName="/word/numbering.xml" ContentType="${Lt.numbering}"/>`);for(let v of l)u.push(`<Override PartName="${z(v.name)}" ContentType="${z(v.contentType)}"/>`);let h=`<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="${Lt.rels}"/><Default Extension="xml" ContentType="application/xml"/>`+u.join("")+"</Types>",d=`<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${Oe.officeDocument}" Target="word/document.xml"/></Relationships>`,w=[],f=1;i&&w.push(`<Relationship Id="rId${f++}" Type="${Oe.styles}" Target="styles.xml"/>`),s&&w.push(`<Relationship Id="rId${f++}" Type="${Oe.numbering}" Target="numbering.xml"/>`),w.push(...n);let g=new Map;for(let v of l){if(!v.rel||!v.rel.type)continue;let _=v.rel.source||"/word/document.xml",T=v.rel.target??rc(_,v.name),D=Qi({id:v.rel.id??`rId${f}`,type:v.rel.type,target:T,targetMode:v.rel.targetMode});if(_==="/word/document.xml")w.push(D),f++;else{let C=g.get(_)??[];C.push(D),g.set(_,C)}}let m='<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'+w.join("")+"</Relationships>",y=[Ce("/[Content_Types].xml",Lt.contentTypes,h),Ce("/_rels/.rels",Lt.rels,d),Ce("/word/_rels/document.xml.rels",Lt.rels,m)];for(let[v,_]of g.entries()){let T='<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'+_.join("")+"</Relationships>";y.push(Ce(nc(v),Lt.rels,T))}i&&y.push(Ce("/word/styles.xml",Lt.styles,i)),s&&y.push(Ce("/word/numbering.xml",Lt.numbering,s));for(let v of l)v.xml!=null?y.push(Ce(v.name,v.contentType,String(v.xml))):v.binary!=null&&y.push(ec(v.name,v.contentType,v.binary));return y.push(Ce("/word/document.xml",Lt.document,o)),'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><?mso-application progid="Word.Document"?><pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">'+y.join("")+"</pkg:package>"}function es(t,e,n,r,o={}){let i=e&&e.length?tr(e,n):void 0;return oo(t,{...o,stylesXml:i,numberingXml:r})}var Qe={header:"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",footer:"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",comments:"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",commentsExtended:"application/vnd.ms-word.commentsExtended+xml",footnotes:"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml",endnotes:"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"},Le={header:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",footer:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",commentsExtended:"http://schemas.microsoft.com/office/2011/relationships/commentsExtended",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",footnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",endnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes"};function dc(t){return t==null?t:JSON.parse(JSON.stringify(t))}function pc(t){let e=t?.content;return Array.isArray(e?.content)?e.content:Array.isArray(e)?e:null}function hc(t,e){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:${t} xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:oo="urn:coco:oojson">`+kn(e)+`</w:${t}>`}function rr(t,e){for(let n of t||[]){if(!n||typeof n!="object")continue;if(Array.isArray(n.content))for(let o of n.content)e(o);let r=n.content?.content;Array.isArray(r)&&rr(r,e)}}function as(t){return Array.isArray(t?.commentMetadata)?t.commentMetadata:[]}function ns(t){if(t==null||t==="")return"";let e=typeof t=="number"?new Date(t):new Date(String(t));return Number.isNaN(e.getTime())?"":e.toISOString()}function mc(t,e){let n=as(t);if(e.id!=null&&e.id!==""){let r=n.find(o=>String(o?.id??"")===String(e.id));if(r)return r}return n.find(r=>String(r?.author??r?.authorName??"")===String(e.author??"")&&String(r?.text??"")===String(e.text??""))||null}function gc(t){let e=new Map;if(rr(t?.content,n=>{if(!n||typeof n!="object"||n.type!=="commentRangeStart"&&n.type!=="commentRangeEnd"&&n.type!=="commentReference"||n.id==null)return;let r=String(n.id),o=e.get(r)||{id:r,author:"",text:"",date:"",solved:void 0},i={id:r,author:n.author??o.author??"",text:n.text??o.text??"",date:n.date??o.date??"",solved:o.solved},s=mc(t,i);(s?.time!=null||s?.date!=null)&&(i.date=ns(s.time??s.date)),typeof s?.solved=="boolean"&&(i.solved=s.solved),e.set(r,i)}),e.size===0){let n=as(t);for(let r of n){let o=String(r.id??"");o&&e.set(o,{id:o,author:r.author??r.authorName??"",text:r.text??"",date:ns(r.time??r.date),solved:typeof r.solved=="boolean"?r.solved:void 0})}n.length>0&&t?.content&&wc(t,n)}return[...e.values()].sort((n,r)=>Number(n.id)-Number(r.id))}function wc(t,e){let n=t.content;if(Array.isArray(n))for(let r of e){let o=r.quote??r.anchorText??"";if(!o||String(o).trim().length===0)continue;let i=String(r.id??"");if(i)for(let s=0;s<n.length;s++){let a=n[s];if(a?.type!=="paragraph"||!Array.isArray(a.content))continue;let l=a.content,u="",h=[];for(let g=0;g<l.length;g++){let m=l[g];if(m?.type==="run"&&Array.isArray(m.content))for(let y of m.content)typeof y=="string"&&(u+=y,h.push(g))}if(u.indexOf(o)<0){let g=o.slice(0,40);if((g.length>=5?u.indexOf(g):-1)<0)continue}let w=-1,f=-1;for(let g=0;g<l.length;g++)l[g]?.type==="run"&&(w<0&&(w=g),f=g);if(!(w<0)){l.splice(w,0,{type:"commentRangeStart",id:i}),l.splice(f+2,0,{type:"commentRangeEnd",id:i});break}}}}function yc(t){let e=t.date?` w:date="${Ke(t.date)}"`:"";return`w:id="${Ke(t.id)}" w:author="${Ke(t.author||"")}"${e}`}function ls(t){let e=Number(t.id);if(Number.isFinite(e))return(e>>>0).toString(16).toUpperCase().padStart(8,"0").slice(-8);let n=0;for(let r of String(t.id))n=n*31+r.charCodeAt(0)>>>0;return n.toString(16).toUpperCase().padStart(8,"0")}function bc(t){return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml">'+t.map(e=>`<w:comment ${yc(e)}><w:p w14:paraId="${ls(e)}"><w:r><w:t xml:space="preserve">${Ke(e.text||"")}</w:t></w:r></w:p></w:comment>`).join("")+"</w:comments>"}function xc(t){let e=t.filter(n=>n.solved===!0);return e.length?'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w15:commentsEx xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml">'+e.map(n=>`<w15:commentEx w15:paraId="${ls(n)}" w15:done="1"/>`).join("")+"</w15:commentsEx>":""}function Ke(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function vc(t,e,n){let r=gc(t);if(!r.length)return;n.comments=r.length,e.push({name:"/word/comments.xml",contentType:Qe.comments,xml:bc(r),rel:{id:"rIdCocoComments",type:Le.comments,target:"comments.xml"}});let o=xc(r);o&&e.push({name:"/word/commentsExtended.xml",contentType:Qe.commentsExtended,xml:o,rel:{id:"rIdCocoCommentsExtended",type:Le.commentsExtended,target:"commentsExtended.xml"}})}function _c(t){let e=/^data:([^;,]+);base64,([A-Za-z0-9+/=\s]+)$/.exec(String(t||""));if(!e)return null;let n=e[1],r=n==="image/jpeg"?"jpg":n==="image/png"?"png":n.split("/")[1]||"bin";return{contentType:n,ext:r,data:e[2].replace(/\s+/g,"")}}function rs(t,e){let n=new Map;return rr(t?.content,r=>{if(!(!r||r.type!=="run"||!Array.isArray(r[e])))for(let o of r[e])!o||o.id==null||!Array.isArray(o.content)||n.set(String(o.id),{id:String(o.id),type:o.type,content:o.content})}),[...n.values()].sort((r,o)=>Number(r.id)-Number(o.id))}function Sc(t){let e=t.type?` w:type="${Ke(t.type)}"`:"";return`w:id="${Ke(t.id)}"${e}`}function qe(t,e,n){return t?.type===e||String(t?.id)===String(n)}function os(t,e,n){return`<w:${t} w:type="${e}" w:id="${n}"><w:p><w:r><w:${e==="separator"?"separator":"continuationSeparator"}/></w:r></w:p></w:${t}>`}function is(t){return t.filter(e=>!qe(e,"separator",-1)&&!qe(e,"continuationSeparator",0)).length}function io(t,e){return`<w:${t} ${Sc(e)}>${kn(e.content)}</w:${t}>`}function ss(t,e,n){let r=n.find(s=>qe(s,"separator",-1)),o=n.find(s=>qe(s,"continuationSeparator",0)),i=n.filter(s=>!qe(s,"separator",-1)&&!qe(s,"continuationSeparator",0));return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:${t} xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:oo="urn:coco:oojson">`+(r?io(e,r):os(e,"separator",-1))+(o?io(e,o):os(e,"continuationSeparator",0))+i.map(s=>io(e,s)).join("")+`</w:${t}>`}function Tc(t,e,n){let r=rs(t,"footnotes");r.length&&(n.footnotes=is(r),e.push({name:"/word/footnotes.xml",contentType:Qe.footnotes,xml:ss("footnotes","footnote",r),rel:{id:"rIdCocoFootnotes",type:Le.footnotes,target:"footnotes.xml"}}));let o=rs(t,"endnotes");o.length&&(n.endnotes=is(o),e.push({name:"/word/endnotes.xml",contentType:Qe.endnotes,xml:ss("endnotes","endnote",o),rel:{id:"rIdCocoEndnotes",type:Le.endnotes,target:"endnotes.xml"}}))}function cs(t,e,n,r="/word/document.xml"){rr(t,o=>{if(!(!o||o.type!=="run"||!Array.isArray(o.content)))for(let i of o.content){if(!i||i.type!=="paraDrawing")continue;let s=_c(i.graphic?.blipFill?.rasterImageId);if(!s)continue;let a=n.media+1,l=`rIdCocoImage${a}`;i.graphic.blipFill.rasterImageId=l,n.media=a;let u={id:l,type:Le.image,target:`media/image${a}.${s.ext}`};r!=="/word/document.xml"&&(u.source=r),e.push({name:`/word/media/image${a}.${s.ext}`,contentType:s.contentType,binary:s.data,rel:u})}})}function kc(t,e,n){cs(t?.content,e,n)}function Cc(t,e,n){let r=t?.sectPr||t?.sectionPr;if(!r||typeof r!="object")return;let o=[{key:"headerReference",part:"header",root:"hdr",contentType:Qe.header,relType:Le.header},{key:"footerReference",part:"footer",root:"ftr",contentType:Qe.footer,relType:Le.footer}];for(let i of o){let s=r[i.key];if(!(!s||typeof s!="object"))for(let a of["first","default","even"]){let l=s[a],u=pc(l);if(!u)continue;let h=n[i.part]+1;n[i.part]=h;let d=`rIdCoco${i.part[0].toUpperCase()}${i.part.slice(1)}${h}`,w=`/word/${i.part}${h}.xml`;cs(u,e,n,w),e.push({name:w,contentType:i.contentType,xml:hc(i.root,u),rel:{id:d,type:i.relType,target:`${i.part}${h}.xml`}}),s[a]={id:d}}}}function us(t){let e=dc(t),n=[],r={header:0,footer:0,comments:0,media:0,footnotes:0,endnotes:0};return Cc(e,n,r),vc(e,n,r),Tc(e,n,r),kc(e,n,r),{doc:e,extraParts:n,summary:r}}var of=Va(ds(),1);var lr=class{constructor(e,n,r,o){this.source=null,this.observer=e,this.node=n,this.options=r,this.source=o||null,o&&e.t.push(this)}collectInterestedObservers(e,n,r,o,i){if(this.node!==n&&!this.options.subtree||e==="attributes"&&!this.options.attributes||e==="characterData"&&!this.options.characterData||e==="childList"&&!this.options.childList)return;let s=o.indexOf(this.observer);s<0&&(s=o.length,o.push(this.observer),i.push(void 0)),(e==="attributes"&&this.options.attributeOldValue||e==="characterData"&&this.options.characterDataOldValue)&&(i[s]=r.oldValue)}},fo=class{constructor(e){this.o=[],this.i=e}register(e,n){let r=this.o,o=!1;r.forEach((i=>{i.observer===e&&(o=!0,(function(s){for(let a=s.observer.t.length-1;a>=0;--a){let l=s.observer.t[a];if(l.source!==s)return;l.node.o.removeTransientRegisteredObserver(l),s.observer.t.splice(a,1)}})(i),i.options=n)})),o||(this.o.push(new lr(e,this.i,n)),e.u.push(this.i))}removeTransientRegisteredObserver(e){this.o.splice(this.o.indexOf(e),1)}removeForObserver(e){let n=0;for(let r=0,o=this.o.length;r<o;++r){let i=this.o[r];i.observer!==e&&(r!==n&&(this.o[n]=i),++n)}this.o.length=n}collectInterestedObservers(e,n,r,o,i){this.o.forEach((s=>{s.collectInterestedObservers(e,n,r,o,i)}))}appendTransientRegisteredObservers(e){this.o.forEach((n=>{n.options.subtree&&e.o.registerTransient(n)}))}registerTransient(e){this.o.push(new lr(e.observer,this.i,e.options,e))}};function ps(t,e,...n){typeof queueMicrotask!="function"?Promise.resolve().then((()=>t.apply(e,n))):queueMicrotask((()=>t.apply(e,n)))}var po=class{constructor(){this.l=new Set,this.h=!1}appendRecord(e,n){e.m.push(n),this.l.add(e)}queueMutationObserverMicrotask(){this.h||(this.h=!0,ps((()=>{this.p()}),this))}p(){this.h=!1;let e=Array.from(this.l);this.l.clear(),e.forEach((n=>{ps((r=>{let o=r.takeRecords();var i;(i=r).t.forEach((s=>{s.node.o.removeTransientRegisteredObserver(s)})),i.t.length=0,o.length>0&&r.g(o,r)}),this,n)}))}},ho=class{constructor(e){this.v=e}deref(){return this.v}},Ut=new class{constructor(){this.l=new po,this.N=[],this.S=new WeakSet}forEachRange(t){let e=this.N.length;for(let n=e-1;n>=0;--n){let r=this.N[n].deref(),o=r==null,i=!o&&!this.S.has(r);o||i?(this.N[n]=this.N[e-1],this.N.pop(),e-=1):t(r)}}addRange(t){let e=(n=t,typeof WeakRef=="function"?new WeakRef(n):new ho(n));var n;this.N.push(e),this.S.add(t)}removeRange(t){this.S.delete(t)}};function at(t){return Ut}function ot(t,...e){return e.some((n=>t.nodeType===n))}function mo(t){return t.nodeType===2}function an(t){return t.nodeType===3||t.nodeType===4||t.nodeType===8||t.nodeType===7}function Ne(t){return t.nodeType===3||t.nodeType===4}function De(t){return t.nodeType===1}function hs(t){return t.nodeType===10}function Ie(t){switch(t.nodeType){case 3:case 7:case 8:return t.data.length;default:return t.childNodes.length}}function ue(t){let e=t,n=[];for(;e;)n.unshift(e),e=e.parentNode;return n}function Zt(t){return ot(t,9)?t:t.ownerDocument}function wt(t){return t.parentNode.childNodes.indexOf(t)}function en(t){for(;t.parentNode;)t=t.parentNode;return t}function hn(t,e){e(t);for(let n=t.firstChild;n;n=n.nextSibling)hn(n,e)}function As(t,e){let n=[];return hn(e,(r=>{if(r===e||r.nodeType!==1)return;let o=r;t!=="*"&&o.nodeName!==t||n.push(o)})),n}function Ds(t,e,n){t===""&&(t=null);let r=[];return hn(n,(o=>{if(o===n||o.nodeType!==1)return;let i=o;t!=="*"&&i.namespaceURI!==t||e!=="*"&&i.localName!==e||r.push(i)})),r}function Po(t,e,n){n||(n=Zt(t));let r=t.T(n);if(e)for(let o=t.firstChild;o;o=o.nextSibling)r.appendChild(Po(o,!0,n));return r}function Z(t,e){if(t.length<e)throw new TypeError(`Function should be called with at least ${e} arguments`)}var Oc={IndexSizeError:1,HierarchyRequestError:3,WrongDocumentError:4,InvalidCharacterError:5,NotFoundError:8,NotSupportedError:9,InUseAttributeError:10,InvalidStateError:11,NamespaceError:14,InvalidNodeTypeError:24},go=class extends Error{constructor(e="",n="Error"){super(e),this.message=e,this.name=n,this.code=Oc[n]||0,this.stack=new Error(e).stack}};function de(t,e){return new go(`${t}: ${e}`,t)}function vt(t){throw de("HierarchyRequestError",t)}function Me(t){throw de("IndexSizeError",t)}function Ae(t){throw de("InvalidCharacterError",t)}function re(t){throw de("InvalidNodeTypeError",t)}function $s(t){throw de("InvalidStateError",t)}function or(t){throw de("NamespaceError",t)}function yr(t){throw de("NotFoundError",t)}function wo(t){throw de("NotSupportedError",t)}function ms(t){throw de("WrongDocumentError",t)}var yo=class{constructor(e,n){this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null,this.type=e,this.target=n}};function We(t,e,n){let r=[],o=[];for(let s=e;s;s=s.parentNode)s.o.collectInterestedObservers(t,e,n,r,o);let i=at();r.forEach(((s,a)=>{let l=o[a],u=new yo(t,e);n.name!==void 0&&n.namespace!==void 0&&(u.attributeName=n.name,u.attributeNamespace=n.namespace),l!==void 0&&(u.oldValue=l),n.addedNodes!==void 0&&(u.addedNodes=n.addedNodes),n.removedNodes!==void 0&&(u.removedNodes=n.removedNodes),n.previousSibling!==void 0&&(u.previousSibling=n.previousSibling),n.nextSibling!==void 0&&(u.nextSibling=n.nextSibling),i.l.appendRecord(s,u)})),i.l.queueMutationObserverMicrotask()}function Ro(t){let e=[];for(let n=t.firstElementChild;n;n=n.nextElementSibling)e.push(n);return e}function Ps(t){for(let e=t.previousSibling;e;e=e.previousSibling)if(De(e))return e;return null}function Rs(t){for(let e=t.nextSibling;e;e=e.nextSibling)if(De(e))return e;return null}function Ec(t,e){let n=t.previousSibling,r=t.nextSibling,o=ot(t,1),i=o?t.previousElementSibling:null,s=o?t.nextElementSibling:null;if(t.parentNode=null,t.previousSibling=null,t.nextSibling=null,n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,e.childNodes.splice(e.childNodes.indexOf(t),1),o){let a=(function(l){return ot(l,1,9,11)?l:null})(e);a&&(a.firstElementChild===t&&(a.firstElementChild=s),a.lastElementChild===t&&(a.lastElementChild=i),a.childElementCount-=1)}if(ot(e,9)){let a=e;ot(t,1)?a.documentElement=null:ot(t,10)&&(a.doctype=null)}}function Fo(t,e,n){if(ot(e,9,11,1)||vt("parent must be a Document, DocumentFragment or Element node"),t.contains(e)&&vt("node must not be an inclusive ancestor of parent"),n&&n.parentNode!==e&&yr("child is not a child of parent"),ot(t,11,10,1,3,4,7,8)||vt("node must be a DocumentFragment, DocumentType, Element, Text, ProcessingInstruction or Comment node"),ot(t,3)&&ot(e,9)&&vt("can not insert a Text node under a Document"),ot(t,10)&&!ot(e,9)&&vt("can only insert a DocumentType node under a Document"),ot(e,9)){let r=e;switch(t.nodeType){case 11:let o=t;o.firstElementChild!==o.lastElementChild&&vt("can not insert more than one element under a Document"),Array.from(o.childNodes).some((i=>ot(i,3)))&&vt("can not insert a Text node under a Document"),o.firstElementChild&&(r.documentElement||n&&ot(n,10)||n&&r.doctype&&wt(n)<wt(r.doctype))&&vt("Document should contain at most one doctype, followed by at most one element");break;case 1:(r.documentElement||n&&ot(n,10)||n&&r.doctype&&wt(n)<wt(r.doctype))&&vt("Document should contain at most one doctype, followed by at most one element");break;case 10:(r.doctype||n&&r.documentElement&&wt(r.documentElement)<wt(n)||!n&&r.documentElement)&&vt("Document should contain at most one doctype, followed by at most one element")}}}function He(t,e,n){Fo(t,e,n);let r=n;return r===t&&(r=t.nextSibling),br(t,Zt(e)),Ln(t,e,r),t}function Ln(t,e,n,r=!1){let o=(function(l){return l.nodeType===11})(t),i=o?Array.from(t.childNodes):[t],s=i.length;if(s===0)return;if(o&&(i.forEach((l=>ce(l,!0))),We("childList",t,{removedNodes:i})),n!==null){let l=wt(n);at().forEachRange((u=>{u.startContainer===e&&u.startOffset>l&&(u.startOffset+=s),u.endContainer===e&&u.endOffset>l&&(u.endOffset+=s)}))}let a=n===null?e.lastChild:n.previousSibling;i.forEach((l=>{(function(u,h,d){u.parentNode=h;let w=d===null?h.lastChild:d.previousSibling,f=d===null?null:d;if(u.previousSibling=w,u.nextSibling=f,w?w.nextSibling=u:h.firstChild=u,f?(f.previousSibling=u,h.childNodes.splice(h.childNodes.indexOf(f),0,u)):(h.lastChild=u,h.childNodes.push(u)),De(u)){let g=h,m=null;for(let v=w;v;v=v.previousSibling){if(De(v)){m=v;break}let _=v;if(!hs(_)){m=_.previousElementSibling;break}}let y=null;for(let v=f;v;v=v.nextSibling){if(De(v)){y=v;break}y=v.nextElementSibling;break}m||(g.firstElementChild=u),y||(g.lastElementChild=u),g.childElementCount+=1}(function(g){return g.nodeType===9})(h)&&(De(u)?h.documentElement=u:hs(u)&&(h.doctype=u))})(l,e,n)})),r||We("childList",e,{addedNodes:i,nextSibling:n,previousSibling:a})}function ee(t,e){return He(t,e,null)}function Fs(t,e,n){if(ot(n,9,11,1)||vt("Can not replace under a non-parent node"),e.contains(n)&&vt("Can not insert a node under its own descendant"),t.parentNode!==n&&yr("child is not a child of parent"),ot(e,11,10,1,3,4,7,8)||vt("Can not insert a node that isn't a DocumentFragment, DocumentType, Element, Text, ProcessingInstruction or Comment"),ot(e,3)&&ot(n,9)&&vt("can not insert a Text node under a Document"),ot(e,10)&&!ot(n,9)&&vt("can only insert a DocumentType node under a Document"),ot(n,9)){let a=n;switch(e.nodeType){case 11:let l=e;l.firstElementChild!==l.lastElementChild&&vt("can not insert more than one element under a Document"),Array.from(l.childNodes).some((u=>ot(u,3)))&&vt("can not insert a Text node under a Document"),l.firstElementChild&&(a.documentElement&&a.documentElement!==t||t&&a.doctype&&wt(t)<wt(a.doctype))&&vt("Document should contain at most one doctype, followed by at most one element");break;case 1:(a.documentElement&&a.documentElement!==t||a.doctype&&wt(t)<wt(a.doctype))&&vt("Document should contain at most one doctype, followed by at most one element");break;case 10:(a.doctype&&a.doctype!==t||a.documentElement&&wt(a.documentElement)<wt(t))&&vt("Document should contain at most one doctype, followed by at most one element")}}let r=t.nextSibling;r===e&&(r=e.nextSibling);let o=t.previousSibling;br(e,Zt(n));let i=[];t.parentNode!==null&&(i.push(t),ce(t,!0));let s=ot(e,11)?Array.from(e.childNodes):[e];return Ln(e,n,r,!0),We("childList",n,{addedNodes:s,removedNodes:i,nextSibling:r,previousSibling:o}),t}function zo(t,e){t!==null&&br(t,Zt(e));let n=Array.from(e.childNodes),r=[];t!==null&&(ot(t,11)?t.childNodes.forEach((o=>{r.push(o)})):r.push(t)),n.forEach((o=>{ce(o,!0)})),t!==null&&Ln(t,e,null,!0),(r.length>0||n.length>0)&&We("childList",e,{addedNodes:r,removedNodes:n})}function ce(t,e=!1){let n=t.parentNode,r=wt(t);at().forEachRange((s=>{t.contains(s.startContainer)&&(s.startContainer=n,s.startOffset=r),t.contains(s.endContainer)&&(s.endContainer=n,s.endOffset=r),s.startContainer===n&&s.startOffset>r&&(s.startOffset-=1),s.endContainer===n&&s.endOffset>r&&(s.endOffset-=1)}));let o=t.previousSibling,i=t.nextSibling;Ec(t,n);for(let s=n;s;s=s.parentNode)s.o.appendTransientRegisteredObservers(t);e||We("childList",n,{removedNodes:[t],nextSibling:i,previousSibling:o})}function br(t,e){let n=Zt(t);t.parentNode&&ce(t),e!==n&&hn(t,(r=>{if(r.ownerDocument=e,ot(r,1))for(let o of r.attributes)o.ownerDocument=e}))}function zs(t){let e=[];return hn(t,(n=>{ot(n,3,4)&&e.push(n.data)})),e.join("")}function js(t,e){let n=null;e!==""&&(n=new(at()).Text(e)),zo(n,t)}function mn(t,e){let n=t.map((r=>r instanceof K?r:e.createTextNode(String(r))));if(n.length===1)return n[0];{let r=e.createDocumentFragment();return n.forEach((o=>{r.appendChild(o)})),r}}function jo(t,e){He(mn(e,Zt(t)),t,t.firstChild)}function Lo(t,e){ee(mn(e,Zt(t)),t)}function Bo(t,e){let n=mn(e,Zt(t));Fo(n,t,null),zo(n,t)}function Mo(t,e){let n=t.parentNode;if(n===null)return;let r=t.previousSibling;for(;r!==null&&e.indexOf(r)>=0;)r=r.previousSibling;He(mn(e,Zt(t)),n,r===null?n.firstChild:r.nextSibling)}function Uo(t,e){let n=t.parentNode;if(n===null)return;let r=t.nextSibling;for(;r!==null&&e.indexOf(r)>=0;)r=r.nextSibling;He(mn(e,Zt(t)),n,r)}function Xo(t,e){let n=t.parentNode;if(n===null)return;let r=t.nextSibling;for(;r!==null&&e.indexOf(r)>=0;)r=r.nextSibling;let o=mn(e,Zt(t));t.parentNode===n?Fs(t,o,n):He(o,n,r)}function Wo(t){t.parentNode!==null&&ce(t)}function gs(t,e){let n=e.startContainer;ot(n,7)&&vt("Can not insert into a processing instruction"),ot(n,8)&&vt("Can not insert into a comment"),Ne(n)&&n.parentNode===null&&vt("Can not insert into a text node without a parent");let r=null;r=Ne(n)?n:n.childNodes[e.startOffset]||null;let o=r===null?n:r.parentNode;Fo(t,o,r),Ne(n)&&(r=n.splitText(e.startOffset)),t===r&&(r=r.nextSibling),t.parentNode!==null&&ce(t);let i=r===null?Ie(o):wt(r);ot(t,11)?i+=Ie(t):i+=1,He(t,o,r),e.collapsed&&e.setEnd(o,i)}function we(t){return t>>>0}function Ls(t){return t===null?"":String(t)}function un(t){return t==null?"":String(t)}function yt(t,e){return(function(n,r){if(!(n instanceof r))throw new TypeError(`Value should be an instance of ${r.name}`)})(t,e),t}function bo(t,e){return t==null?null:yt(t,e)}function Xt(t){return t===void 0?null:t}var ws=new WeakMap;function ir(t){let e=ws.get(t);return e===void 0&&(e=Math.random(),ws.set(t,e)),e}var K=class t{constructor(){this.ownerDocument=null,this.parentNode=null,this.childNodes=[],this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.o=new fo(this)}get parentElement(){return this.parentNode&&ot(this.parentNode,1)?this.parentNode:null}hasChildNodes(){return!!this.childNodes.length}normalize(){let e=this.firstChild,n=0;for(Zt(this);e;){let r=e.nextSibling;if(!ot(e,3)){e.normalize(),e=r;continue}let o=e,i=o.length;if(i===0){ce(e),--n,e=r;continue}let s="",a=[];for(let u=o.nextSibling;u&&ot(u,3);u=u.nextSibling)s+=u.data,a.push(u);s&&o.replaceData(i,0,s);let l=at();for(let u=0,h=a.length;u<h;++u){let d=a[u],w=n+u+1;l.forEachRange((f=>{f.startContainer===d&&(f.startOffset+=i,f.startContainer=o),f.endContainer===d&&(f.endOffset+=i,f.endContainer=o),f.startContainer===this&&f.startOffset===w&&(f.startContainer=o,f.startOffset=i),f.endContainer===this&&f.endOffset===w&&(f.endContainer=o,f.endOffset=i)})),i+=d.length}for(;a.length;)ce(a.shift());e=e.nextSibling,++n}}cloneNode(e=!1){return Po(this,e)}compareDocumentPosition(e){if(Z(arguments,1),this===(e=yt(e,t)))return 0;let n=e,r=this,o=null,i=null;if(mo(n)&&(o=n,n=o.ownerElement),mo(r)&&(i=r,r=i.ownerElement,o!==null&&n!==null&&r===n))for(let d of r.attributes){if(d===o)return t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_PRECEDING;if(d===i)return t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_FOLLOWING}if(n===null||r===null)return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|(ir(n||o)>ir(r||i)?t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_PRECEDING);let s=ue(n),a=ue(r);if(s[0]!==a[0])return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|(ir(s[0])>ir(a[0])?t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_PRECEDING);let l=0;for(;l<s.length&&l<a.length&&s[l]===a[l];)++l;let u=n!==r&&l===s.length,h=n!==r&&l===a.length;return u&&o===null||n===r&&i!==null?t.DOCUMENT_POSITION_CONTAINS|t.DOCUMENT_POSITION_PRECEDING:h&&i===null||n===r&&o!==null?t.DOCUMENT_POSITION_CONTAINED_BY|t.DOCUMENT_POSITION_FOLLOWING:u||wt(s[l])<wt(a[l])?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING}contains(e){for(Z(arguments,1),e=bo(e,t);e&&e!=this;)e=e.parentNode;return e===this}isDefaultNamespace(e){return Z(arguments,1),(e=Xt(e))===""&&(e=null),this.lookupNamespaceURI(null)===e}insertBefore(e,n){return Z(arguments,2),He(e=yt(e,t),this,n=bo(n,t))}appendChild(e){return Z(arguments,1),ee(e=yt(e,t),this)}replaceChild(e,n){return Z(arguments,2),e=yt(e,t),Fs(n=yt(n,t),e,this)}removeChild(e){return Z(arguments,1),(function(n,r){return n.parentNode!==r&&yr("child is not a child of parent"),ce(n),n})(e=yt(e,t),this)}};function xr(t,e,n,r){We("attributes",e,{name:t.localName,namespace:t.namespaceURI,oldValue:n})}function xo(t,e){xr(t,t.ownerElement,t.value),t.C=e}function ln(t,e,n=!1){n||xr(t,e,null,t.value),e.attributes.push(t),t.ownerElement=e}function vo(t){let e=t.ownerElement;xr(t,e,t.value),e.attributes.splice(e.attributes.indexOf(t),1),t.ownerElement=null}K.ELEMENT_NODE=1,K.ATTRIBUTE_NODE=2,K.TEXT_NODE=3,K.CDATA_SECTION_NODE=4,K.ENTITY_REFERENCE_NODE=5,K.ENTITY_NODE=6,K.PROCESSING_INSTRUCTION_NODE=7,K.COMMENT_NODE=8,K.DOCUMENT_NODE=9,K.DOCUMENT_TYPE_NODE=10,K.DOCUMENT_FRAGMENT_NODE=11,K.NOTATION_NODE=12,K.DOCUMENT_POSITION_DISCONNECTED=1,K.DOCUMENT_POSITION_PRECEDING=2,K.DOCUMENT_POSITION_FOLLOWING=4,K.DOCUMENT_POSITION_CONTAINS=8,K.DOCUMENT_POSITION_CONTAINED_BY=16,K.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,K.prototype.ELEMENT_NODE=1,K.prototype.ATTRIBUTE_NODE=2,K.prototype.TEXT_NODE=3,K.prototype.CDATA_SECTION_NODE=4,K.prototype.ENTITY_REFERENCE_NODE=5,K.prototype.ENTITY_NODE=6,K.prototype.PROCESSING_INSTRUCTION_NODE=7,K.prototype.COMMENT_NODE=8,K.prototype.DOCUMENT_NODE=9,K.prototype.DOCUMENT_TYPE_NODE=10,K.prototype.DOCUMENT_FRAGMENT_NODE=11,K.prototype.NOTATION_NODE=12;var Xe=class extends K{get nodeType(){return 2}get nodeName(){return this.name}get nodeValue(){return this.C}set nodeValue(e){ao(this,e=un(e))}get textContent(){return this.C}set textContent(e){ao(this,e=un(e))}lookupPrefix(e){return Z(arguments,1),this.ownerElement!==null?this.ownerElement.lookupPrefix(e):null}lookupNamespaceURI(e){return Z(arguments,1),this.ownerElement===null?null:this.ownerElement.lookupNamespaceURI(e)}get value(){return this.C}set value(e){ao(this,e)}constructor(e,n,r,o,i){super(),this.namespaceURI=e,this.prefix=n,this.localName=r,this.name=n===null?r:`${n}:${r}`,this.C=o,this.ownerElement=i,this.ownerDocument=i?i.ownerDocument:at().document}T(e){let n=new(at()).Attr(this.namespaceURI,this.prefix,this.localName,this.value,null);return n.ownerDocument=e,n}};function ao(t,e){e=String(e),t.ownerElement===null?t.C=e:xo(t,e)}var Dn=class extends K{get nodeValue(){return this.D}set nodeValue(e){e=un(e),Ee(this,0,this.length,e)}get textContent(){return this.D}set textContent(e){e=un(e),Ee(this,0,this.length,e)}lookupPrefix(e){Z(arguments,1);let n=this.parentElement;return n!==null?n.lookupPrefix(e):null}lookupNamespaceURI(e){Z(arguments,1);let n=this.parentElement;return n===null?null:n.lookupNamespaceURI(e)}before(...e){Mo(this,e)}after(...e){Uo(this,e)}replaceWith(...e){Xo(this,e)}remove(){Wo(this)}get previousElementSibling(){return Ps(this)}get nextElementSibling(){return Rs(this)}get data(){return this.D}set data(e){e=Ls(e),Ee(this,0,this.length,e)}get length(){return this.data.length}constructor(e){super(),this.D=String(e)}substringData(e,n){return Z(arguments,2),Bs(this,e,n)}appendData(e){Z(arguments,1),Ee(this,this.length,0,e)}insertData(e,n){Z(arguments,1),Ee(this,e,0,n)}deleteData(e,n){Z(arguments,2),Ee(this,e,n,"")}replaceData(e,n,r){Z(arguments,3),Ee(this,e,n,r)}};function Ee(t,e,n,r){e=we(e),n=we(n);let o=t.length;e>o&&Me("can not replace data past the node's length"),e+n>o&&(n=o-e),We("characterData",t,{oldValue:t.data});let i=t.data,s=i.substring(0,e)+r+i.substring(e+n);t.D=s,at().forEachRange((a=>{a.startContainer===t&&a.startOffset>e&&a.startOffset<=e+n&&(a.startOffset=e),a.endContainer===t&&a.endOffset>e&&a.endOffset<=e+n&&(a.endOffset=e),a.startContainer===t&&a.startOffset>e+n&&(a.startOffset=a.startOffset+r.length-n),a.endContainer===t&&a.endOffset>e+n&&(a.endOffset=a.endOffset+r.length-n)}))}function Bs(t,e,n){e=we(e),n=we(n);let r=t.length;return e>r&&Me("can not substring data past the node's length"),e+n>r?t.data.substring(e):t.data.substring(e,e+n)}var cr=class extends Dn{get nodeType(){return 3}get nodeName(){return"#text"}constructor(e=""){super(e);let n=at();this.ownerDocument=n.document}splitText(e){return Z(arguments,1),(function(n,r){let o=n.length;r>o&&Me("can not split past the node's length");let i=o-r,s=Bs(n,r,i),a=new(at()).Text(s);a.ownerDocument=n.ownerDocument;let l=n.parentNode;if(l!==null){Ln(a,l,n.nextSibling);let u=wt(n)+1;at().forEachRange((h=>{h.startContainer===n&&h.startOffset>r&&(h.startContainer=a,h.startOffset-=r),h.endContainer===n&&h.endOffset>r&&(h.endContainer=a,h.endOffset-=r),h.startContainer===l&&h.startOffset===u&&(h.startOffset+=1),h.endContainer===l&&h.endOffset===u&&(h.endOffset+=1)}))}return Ee(n,r,i,""),a})(this,e=we(e))}T(e){let n=new(at()).Text(this.data);return n.ownerDocument=e,n}get wholeText(){let e=[this.data],n=this.previousSibling;for(;n!==null&&ot(n,3,4);){let o=n.data;e.unshift(o),n=n.previousSibling}let r=this.nextSibling;for(;r!==null&&ot(r,3,4);){let o=r.data;e.push(o),r=r.nextSibling}return e.join("")}},_o=class extends cr{get nodeType(){return 4}get nodeName(){return"#cdata-section"}constructor(e){super(e)}T(e){let n=new(at()).CDATASection(this.data);return n.ownerDocument=e,n}},So=class extends Dn{get nodeType(){return 8}get nodeName(){return"#comment"}constructor(e=""){super(e);let n=at();this.ownerDocument=n.document}T(e){let n=new(at()).Comment(this.data);return n.ownerDocument=e,n}},ur=class extends K{get nodeType(){return 10}get nodeName(){return this.name}get nodeValue(){return null}set nodeValue(e){}get textContent(){return null}set textContent(e){}lookupPrefix(e){return Z(arguments,1),null}lookupNamespaceURI(e){return Z(arguments,1),null}before(...e){Mo(this,e)}after(...e){Uo(this,e)}replaceWith(...e){Xo(this,e)}remove(){Wo(this)}constructor(e,n="",r=""){super(),this.name=e,this.publicId=n,this.systemId=r}T(e){let n=new(at()).DocumentType(this.name,this.publicId,this.systemId);return n.ownerDocument=e,n}};function ys(t,e,n,r,o){return new Xe(t,e,n,r,o)}function Nc(t,e,n,r=null){return $e(t,e,n,r)}var on="http://www.w3.org/1999/xhtml",ae="http://www.w3.org/XML/1998/namespace",Bt="http://www.w3.org/2000/xmlns/";function Ms(t){(function(e){let n=e.split(":");return!(n.length>2)&&n.every((r=>Pe(r)))})(t)||Ae("The qualified name is not a valid QName")}function Ho(t,e){t===""&&(t=null),Ms(e);let n=null,r=e,o=e.indexOf(":");return o>=0&&(n=e.substring(0,o),r=e.substring(o+1)),n!==null&&t===null&&or("Qualified name with prefix can not have a null namespace"),n==="xml"&&t!==ae&&or("xml prefix can only be used for the XML namespace"),e!=="xmlns"&&n!=="xmlns"||t===Bt||or("xmlns prefix or qualifiedName must use the XMLNS namespace"),t===Bt&&e!=="xmlns"&&n!=="xmlns"&&or("xmlns prefix or qualifiedName must be used for the XMLNS namespace"),{namespace:t,prefix:n,localName:r}}function Us(t,e){if(t.namespaceURI===e&&t.prefix!==null)return t.prefix;let n=Array.from(t.attributes).find((r=>r.prefix==="xmlns"&&r.value===e));return n?n.localName:t.parentElement!==null?Us(t.parentElement,e):null}var To=class{constructor(e,n,r){this.$=null,this.A=0,this.I=e,this.k=e,this.M=n,this.R=r}enter(e,n){var r;let o=(r=this.$)!==null&&r!==void 0?r:e;this.k+=n,this.k>this.M&&this.k/this.I>this.R&>("too much entity expansion",o),this.$=o,this.A+=1}exit(){this.A-=1,this.A===0&&(this.$=null)}};function pe(t,e){return{success:!0,offset:t,value:e}}function gn(t){return pe(t,void 0)}function fe(t,e,n=!1){return{success:!1,offset:t,expected:e,fatal:n}}function q(t){return(e,n)=>{let r=n+t.length;return e.slice(n,r)===t?pe(r,t):fe(n,[t])}}function Xs(t,e){return(n,r)=>{let o=n.codePointAt(r);return o!==void 0&&t(o)?gn(r+(function(i){return i>65535?2:1})(o)):fe(r,e)}}function It(t,e){return(n,r)=>{let o=r;for(;;){let i=n.codePointAt(r);if(i===void 0||!t(i))break;r+=i>65535?2:1}return e!==void 0&&r===o?fe(r,e):gn(r)}}function $n(t,e,n){return Xs((r=>t<=r&&r<=e),n||[`${String.fromCodePoint(t)}-${String.fromCodePoint(e)}`])}function xt(t,e){return(n,r)=>{let o=t(n,r);return o.success?pe(o.offset,e(o.value)):o}}function _t(t){return xt(t,(()=>{}))}function vr(t,e,n,r){return(o,i)=>{let s=t(o,i);return s.success?e(s.value)?s:fe(i,n,r):s}}function ut(t,e){return(n,r)=>{let o=null;for(let i of t){let s=i(n,r);if(s.success||(o===null||s.offset>o.offset?o=s:s.offset===o.offset&&e===void 0&&(o.expected=o.expected.concat(s.expected)),s.fatal))return s}return e=e||o?.expected||[],o&&(o.expected=e),o||fe(r,e)}}function it(t){return(e,n)=>{let r=t(e,n);return r.success||r.fatal?r:pe(n,null)}}function Re(t){return(e,n)=>{let r=[],o=n;for(;;){let i=t(e,o);if(!i.success){if(i.fatal)return i;break}if(r.push(i.value),i.offset===o)break;o=i.offset}return pe(o,r)}}function ye(t){return(e,n)=>{let r=n;for(;;){let o=t(e,r);if(!o.success){if(o.fatal)return o;break}if(o.offset===r)break;r=o.offset}return gn(r)}}function Ft(t,e,n){return(r,o)=>{let i=t(r,o);if(!i.success)return i;let s=e(r,i.offset);return s.success?pe(s.offset,n(i.value,s.value)):s}}function _r(...t){return(e,n)=>{let r=[];for(let o of t){let i=o(e,n);if(!i.success)return i;n=i.offset,r.push(i.value)}return pe(n,r)}}function le(...t){return(e,n)=>{for(let r of t){let o=r(e,n);if(!o.success)return o;n=o.offset}return gn(n)}}function Ws(t,e){return t}function Hs(t,e){return e}function Pn(t){return Ft(t,ye(t),Hs)}function ct(t,e){return Ft(t,e,Hs)}function St(t,e){return Ft(t,e,Ws)}function pt(t,e,n,r=!1){return ct(t,r?Ot(St(e,n)):St(e,n))}function At(t){return(e,n)=>{let r=t(e,n);return r.success?pe(r.offset,e.slice(n,r.offset)):r}}function Zo(t){return(e,n)=>{let r=t(e,n);return r.success?pe(n,r.value):r}}function Go(t,e){return(n,r)=>t(n,r).success?fe(r,e):gn(r)}function Zs(t,e,n){return ct(Go(e,n),t)}function cn(t,e,n=0,r=[]){return(o,i)=>{let s=o.codePointAt(i+n);if(s===void 0)return fe(i,r);let a=t[s];return a===void 0?e===void 0?fe(i,r):e(o,i):a(o,i)}}function Ot(t){return(e,n)=>{let r=t(e,n);return r.success?r:fe(r.offset,r.expected,!0)}}var Gs=(t,e)=>t.length===e?gn(e):fe(e,["end of input"]);function Bn(t){return Ft(t,Gs,Ws)}var fr=class{constructor(e,n){this.P=0,this.L=0,this.O=e,this.V=n}next(){if(this.P>=this.V.length)return{done:!0,value:Gs(this.O,this.L)};let{parser:e,type:n}=this.V[this.P],r=e(this.O,this.L);return r.success?(this.L=r.offset,n!==1&&(this.P+=1),r.value===void 0?this.next():{done:!1,value:r.value}):n===0||r.fatal?{done:!0,value:r}:(this.P+=1,this.next())}};function wn(t){return(e,n)=>{let r=n,o=t(e,n);return o.success?pe(o.offset,Object.assign({input:e,start:r,end:o.offset},o.value)):o}}var Ic=q("_"),ko=q("-"),Ac=q("."),Wt=q('"'),Ht=q("'"),Dc=q("<"),xe=q(">"),$c=q("&"),Pc=q("="),Rc=q("["),Jo=q("]"),dr=q(";"),Js=q("%"),Rn=q("("),fn=q(")"),Fc=q("+"),zc=q(","),Vs=q("?"),Ys=q("*"),pr=q("|"),Vo=q("]]>"),jc=q("<!--"),Lc=q("-->"),Bc=q("<?"),Yo=q("?>"),Mc=q("1."),Uc=q("version"),Xc=q("encoding"),Wc=q("standalone"),Hc=q("yes"),Zc=q("no"),qs=q("<?xml"),Gc=q("<!DOCTYPE"),Jc=q("SYSTEM"),Ks=q("PUBLIC"),Vc=q("</"),Yc=q("/>"),qc=q("&#"),Kc=q("&#x"),Qc=q("<!ELEMENT"),tu=q("EMPTY"),eu=q("ANY"),nu=q("#PCDATA"),ru=q("<!ATTLIST"),ou=q("NOTATION"),iu=q("#REQUIRED"),su=q("#IMPLIED"),au=q("#FIXED"),qo=q("<!ENTITY"),lu=q("NDATA"),cu=q("<!NOTATION"),bs=$n(65,90),xs=$n(97,122),Sr=$n(48,57),uu=ut([Sr,$n(65,70),$n(97,102)],["hexadecimal digit"]);function Vt(t){return t===9||t===10||t===13||32<=t&&t<=55295||57344<=t&&t<=65533||65536<=t&&t<=1114111}var fu=Bn(It(Vt));function Qs(t){return t===32||t===9||t===13||t===10}var V=It(Qs,["whitespace"]),du=Bn(It(Qs));function ta(t){return t===58||65<=t&&t<=90||t===95||97<=t&&t<=122||192<=t&&t<=214||216<=t&&t<=246||248<=t&&t<=767||880<=t&&t<=893||895<=t&&t<=8191||8204<=t&&t<=8205||8304<=t&&t<=8591||11264<=t&&t<=12271||12289<=t&&t<=55295||63744<=t&&t<=64975||65008<=t&&t<=65533||65536<=t&&t<=983039}var pu=Xs(ta,["valid name start character"]);function ea(t){return ta(t)||t===45||t===46||48<=t&&t<=57||t===183||768<=t&&t<=879||8255<=t&&t<=8256}var ve=At(ct(pu,It(ea))),hu=Bn(ve),be=vr(ve,(t=>!t.includes(":")),["name must not contain colon"],!0),vs=At(It(ea,["valid name character"])),mu=wn(xt(vr(ut([xt(pt(Kc,At(Pn(uu)),dr,!0),(t=>parseInt(t,16))),xt(pt(qc,At(Pn(Sr)),dr,!0),(t=>parseInt(t,10)))]),(t=>Vt(t)),["character reference must reference a valid character"],!0),(t=>({type:0,cp:t})))),dn=ut([wn(xt(pt($c,be,Ot(dr)),(t=>({type:1,name:t})))),mu]),Co=wn(xt(pt(Js,be,dr),(t=>({type:2,name:t})))),na=ut([pt(Wt,Re(ut([At(It((t=>t!==37&&t!==38&&t!==Fn&&Vt(t)),[])),Co,dn])),Wt,!0),pt(Ht,Re(ut([At(It((t=>t!==37&&t!==38&&t!==zn&&Vt(t)),[])),Co,dn])),Ht,!0)]),Fn=34,zn=39,ra=cn({[Fn]:pt(Wt,Re(cn({38:dn},At(It((t=>t!==jn&&t!==38&&t!==Fn&&Vt(t)),[])))),Wt,!0),[zn]:pt(Ht,Re(cn({38:dn},At(It((t=>t!==jn&&t!==38&&t!==zn&&Vt(t)),[])))),Ht,!0)},void 0,0,["quoted attribute value"]),gu=Bn(Re(ut([At(It((t=>t!==jn&&t!==38&&Vt(t)),[])),dn]))),_s=vr(ut([pt(Wt,At(It((t=>t!==Fn&&Vt(t)))),Wt),pt(Ht,At(It((t=>t!==zn&&Vt(t)))),Ht)]),(t=>!t.includes("#")),["system identifier must not contain a fragment identifier"],!0);function Oo(t){return t===32||t===13||t===10||97<=t&&t<=122||65<=t&&t<=90||48<=t&&t<=57||33<=t&&t<=47&&t!==34&&t!==38||58<=t&&t<=64&&t!==60&&t!==62||t===95}var wu=Bn(It(Oo)),oa=ut([pt(Wt,At(It((t=>t!==Fn&&Oo(t)))),Wt,!0),pt(Ht,At(It((t=>t!==zn&&Oo(t)))),Ht,!0)]),jn=60,yu=At(Pn(ut([It((t=>t!==jn&&t!==38&&t!==93&&Vt(t)),[]),Zs(_t(Jo),Vo,[])],["character data"]))),Ko=xt(pt(jc,At(ye(ut([It((t=>t!==45&&Vt(t)),[]),St(_t(ko),Go(ko,["comment content may not contain --"]))]))),Lc,!0),(t=>({type:3,data:t}))),bu=vr(be,(t=>t.toLowerCase()!=="xml"),['processing instruction target must not be "xml"'],!0),Qo=pt(Bc,Ft(bu,it(ct(V,At(ye(ut([It((t=>t!==63&&Vt(t)),[]),St(_t(Vs),Go(xe,["PI data"]))]))))),((t,e)=>({type:4,target:t,data:e}))),Yo,!0),xu=q("<![CDATA["),vu=At(ye(ut([It((t=>t!==93&&Vt(t)),[]),Zs(_t(Jo),Vo,["CData"])]))),_u=wn(xt(pt(xu,vu,Vo,!0),(t=>({type:5,data:t})))),Tr=pt(it(V),Pc,it(V)),Ss=At(ct(Mc,Pn(Sr))),ia=ct(V,ct(Uc,ct(Tr,ut([pt(Wt,Ss,Wt,!0),pt(Ht,Ss,Ht,!0)])))),Ts=At(ct(ut([bs,xs]),ye(ut([bs,xs,Sr,_t(Ac),_t(Ic),_t(ko)])))),sa=ct(V,ct(Xc,ct(Tr,ut([pt(Wt,Ts,Wt,!0),pt(Ht,Ts,Ht,!0)])))),ks=ut([xt(Hc,(()=>!0)),xt(Zc,(()=>!1))]),Su=ct(V,ct(Wc,Ot(ct(Tr,ut([pt(Wt,ks,Wt,!0),pt(Ht,ks,Ht,!0)]))))),Tu=pt(St(qs,Zo(V)),St(Ft(ia,Ft(it(sa),it(Su),((t,e)=>[t,e])),((t,[e,n])=>({type:6,version:t,encoding:e,standalone:n}))),it(V)),Yo,!0),ti=wn(xt(ve,(t=>({name:t})))),ku=Ft(ti,ct(Ot(Tr),Ot(ra)),((t,e)=>({name:t,value:e}))),aa=xt(_r(Dc,ti,Ot(St(Re(ct(V,ku)),it(V))),Ot(cn({47:xt(Yc,(()=>!0))},xt(xe,(()=>!1)),0,[">","/>"]))),(([t,e,n,r])=>({type:r?9:7,name:e,attributes:n}))),Cu=wn(xt(pt(Vc,St(ve,it(V)),xe,!0),(t=>({type:8,name:t})))),la=ut([Vs,Ys,Fc]),hr=St(ut([_t(ve),function(t,e){return ca(t,e)},function(t,e){return ua(t,e)}]),_t(it(la))),ca=le(Rn,it(V),hr,Pn(_r(it(V),pr,it(V),Ot(hr))),it(V),fn),ua=le(Rn,it(V),hr,ye(_r(it(V),zc,it(V),Ot(hr))),it(V),fn),Ou=St(ut([ca,ua]),it(la)),Eu=le(Rn,it(V),nu,ut([le(ye(le(it(V),pr,it(V),ve)),it(V),fn,Ys),_t(St(it(V),fn))])),Nu=St(Qc,Ot(le(V,ve,V,ut([_t(tu),_t(eu),_t(Eu),_t(Ou)]),it(V),xe))),Iu=q("CDATA"),Au=ut([q("IDREFS"),q("IDREF"),q("ID"),q("ENTITY"),q("ENTITIES"),q("NMTOKENS"),q("NMTOKEN")]),Du=ut([St(ou,Ot(le(V,Rn,it(V),be,ye(le(it(V),pr,it(V),be)),it(V),fn))),St(Rn,Ot(le(it(V),vs,ye(le(it(V),pr,it(V),vs)),it(V),fn)))]),$u=ut([xt(Iu,(()=>!0)),xt(Au,(()=>!1)),xt(Du,(()=>!1))]),Pu=ut([xt(iu,(()=>({type:0}))),xt(su,(()=>({type:1}))),Ft(xt(it(St(au,V)),(t=>t!==null)),ra,((t,e)=>({type:2,fixed:t,value:e})))]),Ru=Ft(ct(V,ti),Ot(Ft(ct(V,$u),ct(V,Pu),((t,e)=>({isCData:t,def:e})))),((t,{isCData:e,def:n})=>({name:t,isCData:e,def:n}))),Fu=pt(St(ru,V),Ft(ve,Ot(Re(Ru)),((t,e)=>({type:0,name:t,attdefs:e}))),ct(it(V),xe),!0),kr=ut([xt(ct(Jc,Ot(ct(V,_s))),(t=>({publicId:null,systemId:t}))),ct(Ks,Ft(Ot(ct(V,oa)),ct(V,_s),((t,e)=>({publicId:t,systemId:e}))))]),zu=ut([na,Ft(kr,it(ct(pt(V,lu,V),be)),((t,e)=>({ids:t,ndata:e})))]),ju=pt(qo,Ft(ct(V,be),Ot(ct(V,zu)),((t,e)=>({type:1,name:t,value:e}))),ct(it(V),xe)),Lu=ut([na,_t(kr)]),Bu=pt(St(qo,ct(V,Js)),Ft(ct(V,be),Ot(ct(V,Lu)),((t,e)=>e?{type:2,name:t,value:e}:void 0)),ct(it(V),xe),!0),Mu=ct(Zo(qo),Ot(ut([ju,Bu]))),Md=pt(St(qs,Zo(V)),St(Ft(it(ia),sa,((t,e)=>({type:6,version:t,encoding:e,standalone:null}))),it(V)),Yo,!0),Uu=xt(St(St(Ks,V),Ot(oa)),(t=>({publicId:t,systemId:null}))),Xu=pt(cu,Ft(pt(V,be,V),ut([_t(kr),_t(Uu)]),(()=>{})),ct(it(V),xe),!0),Wu=ut([_t(Nu),Fu,Mu,_t(Xu),_t(Qo),_t(Ko)]),Hu=ut([_t(Co),_t(V)]),Zu=(function(t){return xt(t,(e=>e.filter((n=>n!==void 0))))})(Re(ut([Wu,Hu]))),Gu=ct(Gc,Ot(xt(_r(V,ve,it(ct(V,kr)),it(V),it(St(pt(Rc,Zu,Jo,!0),it(V))),xe),(([t,e,n,r,o,i])=>({type:10,name:e,ids:n,intSubset:o}))))),fa={parser:cn({[jn]:cn({47:Cu,33:ut([Ko,_u]),63:Qo},aa,1),38:dn},yu),type:1};function Ju(t){return new fr(t,[fa])}var Cs=ut([Ko,Qo,V]),Vu=[{parser:Tu,type:2},{parser:Cs,type:1},{parser:Gu,type:2},{parser:Cs,type:1},{parser:aa,type:0},fa];function Yu(t){return new fr(t,Vu)}function lo(t){return Array.from(t,(e=>sn(e)?e:"[invalid character]")).join("")}function co(t,e,n){let r=Array.from(t);if(r.length<n)return t;switch(e){case 0:return"\u2026"+r.slice(-n).join("");case 1:return r.slice(0,n).join("")+"\u2026"}let o=0|Math.min(r.length/2,n/2);return r.slice(0,o).join("")+"\u2026"+r.slice(-o).join("")}function gt(t,e){let{line:n,char:r}=(function(o,i){let s=1,a=1,l=0;for(;l<i;){let u=o.codePointAt(l);a++,l+=u>65535?2:1,u===10&&(s++,a=1)}return{line:s,char:a}})(e.input,e.start);throw new Error(`${t}
|
|
3
3
|
${`At line ${n}, character ${r}:`}
|
|
4
4
|
|
|
5
|
-
${(function(o,i,s){let a=lo(
|
|
6
|
-
`,i),u=lo(
|
|
7
|
-
`,s),d=lo(
|
|
8
|
-
${w}${"^".repeat(Math.max(Array.from(a).length,1))}`})(e.input,e.start,e.end)}`)}function
|
|
9
|
-
`)})(t=t.replace(/^\ufeff/,""));let m=new So(t.length,i,o),y={parent:null,entity:null,iterator:e(t)};for(;y;){let v=y.iterator.next();for(;!v.done;v=y.iterator.next()){let _=v.value;if(typeof _!="string"){switch(_.type){case 0:h.root===u&&u.documentElement!==null&>("character reference must not appear after the document element",_),f.push(String.fromCodePoint(_.cp));continue;case 1:{h.root===u&&u.documentElement!==null&>(`reference to entity "${_.name}" must not appear after the document element`,_);for(let D=y;D;D=D.parent)D.entity===_.name&>(`reference to entity "${_.name}" must not be recursive`,_);let k=da.get(_.name);k===void 0&&d!==null&&(k=d.getEntityReplacementText(_,!0)),k===void 0&>(`reference to unknown entity "${_.name}" in content`,_),m.enter(_,k.length),h={parent:h,root:h.root,namespaces:h.namespaces,entityRoot:!0},y={parent:y,entity:_.name,iterator:Zu(k)};continue}case 5:if(s){f.push(_.data);continue}}switch(g(),_.type){case 5:h.root===u&&u.documentElement!==null&>("CData section must not appear after the document element",_),tn(h.root,u.createCDATASection(_.data));continue;case 3:tn(h.root,u.createComment(_.data));continue;case 10:d=new Oo(_),tn(h.root,u.implementation.createDocumentType(_.name,((a=_.ids)===null||a===void 0?void 0:a.publicId)||"",((l=_.ids)===null||l===void 0?void 0:l.systemId)||""));continue;case 4:tn(h.root,u.createProcessingInstruction(_.target,_.data||""));continue;case 7:case 9:{h.root===u&&u.documentElement!==null&>(`document must contain a single root element, but found "${u.documentElement.nodeName}" and "${_.name.name}"`,_.name);let k=d?d.getAttlist(_.name):void 0,D=mr.fromAttrs(h.namespaces,_,k,d,w,m),{prefix:C,localName:F}=ir(_.name,w),N=D.getForElement(C,_.name),L=Oc(u,F,N,C);for(let Y of _.attributes){let{prefix:S,localName:$}=ir(Y.name,w),p=D.getForAttribute(S,$,Y.name),P=k?.get(Y.name.name);L.hasAttributeNS(p,$)&>(`attribute "${Y.name.name}" must not appear multiple times on element "${_.name.name}"`,Y.name),ln(gs(p,S,$,hr(Y.value,P,d,m),L),L,!0)}if(k)for(let Y of k.values()){let S=Y.def;if(S.type!==2)continue;let{prefix:$,localName:p}=ir(Y.name,w),P=D.getForAttribute($,p,Y.name);L.hasAttributeNS(P,p)||ln(gs(P,$,p,hr(S.value,Y,d,m),L),L,!0)}tn(h.root,L),_.type===7&&(h={parent:h,root:L,namespaces:D,entityRoot:!1,event:_});continue}case 8:De(h.root)&&h.root.nodeName===_.name||gt(`non-well-formed element: found end tag "${_.name}" but expected ${De(h.root)?`"${h.root.nodeName}"`:"no such tag"}`,_),h=h.parent;continue}}else f.push(_)}v.value.success||ua(y.entity?`replacement text for entity ${y.entity}`:r===u?"document":"fragment",t,v.value.expected,v.value.offset),h.entityRoot||gt(`${y.entity?`replacement text for entity "${y.entity}"`:r===u?"document":"fragment"} is not well-formed - element "${h.root.nodeName}" is missing a closing tag`,h.event.name),y=y.parent,y&&(m.exit(),h=h.parent)}g()}function Mn(t,e={}){let n=new pn;return qu(t,Ju,Yu,n,e),n}var Eo=class t{constructor(e){this.Y=new Map,this.H=new Map,this.X=e}static new(){let e=new t(null);return e.add(null,null),e.add("xml",ae),e.add("xmlns",Lt),e}add(e,n){let r=this.H.get(n);r===void 0?this.H.set(n,[e]):r.push(e),this.Y.set(e,n)}recordNamespaceInformation(e){let n=new t(this);for(let r of e.attributes){if(r.namespaceURI!==Lt)continue;let o=r.value===""?null:r.value,i=r.prefix===null?null:r.localName;n.add(i,o)}return n}j(e){return this.Y.get(e)}K(e){var n;return(n=this.X)===null||n===void 0?void 0:n.prefixToNamespace(e)}prefixToNamespace(e){let n=this.j(e);return n!==void 0?n:this.K(e)}shouldSerializeDeclaration(e,n){return this.prefixToNamespace(e)===n&&this.K(e)!==n}G(e,n){let r=this;for(;r;){let o=r.H.get(e);if(o!==void 0)for(let i=o.length-1;i>=0;--i){let s=o[i];if((n||s!==null)&&this.prefixToNamespace(s)===e)return s}r=r.X}}getPreferredPrefix(e,n){var r;if(e.namespaceURI===ae)return"xml";let o=ho(e);if(e.namespaceURI===Lt)return o&&e.prefix===null?null:"xmlns";if(o&&e.namespaceURI===null)return null;if(!o){let s=(r=this.K(null))!==null&&r!==void 0?r:null;if(e.namespaceURI===s)return null}if((!o||e.prefix!==null)&&this.prefixToNamespace(e.prefix)===e.namespaceURI)return e.prefix;let i=this.G(e.namespaceURI,!o);if(i!==void 0)return i;if(o){let s=this.j(e.prefix);if(!(e.prefix!==null&&(s===void 0||s===e.namespaceURI)))for(;;){let a=`ns${n.value}`;if(n.value+=1,this.j(a)===void 0)return a}}return e.prefix}},Ku=["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function Ts(t,e,n=!1){let r=n?[t]:t.childNodes,o=[];for(let i of r)ha(i,e,o);return o.join("")}function ha(t,e,n){let r=Eo.new(),o={value:1};try{sr(t,r,o,e,n)}catch(i){return As(i.message)}}function sr(t,e,n,r,o){switch(t.nodeType){case 1:return void(function(i,s,a,l,u){let h=i;if(l&&(h.localName.indexOf(":")>=0||!Pe(h.localName)))throw new Error(`Can not serialize an element because the localName "${h.localName}" is not allowed.`);u.push("<");let d="",w=!1,f=s.recordNamespaceInformation(h);if(h.prefix==="xmlns"&&l)throw new Error('Can not serialize an element with prefix "xmlns" because it will not legally round-trip in a conforming XML parser.');let g=f.getPreferredPrefix(h,a);if(g!==null&&(d+=`${g}:`),d+=h.localName,u.push(d),f.prefixToNamespace(g)!==h.namespaceURI&&(f.add(g,h.namespaceURI),g===null?u.push(' xmlns="'):u.push(" xmlns:",g,'="'),u.push(co(h.namespaceURI,l),'"')),(function(m,y,v,_,k){let D=[];for(let C of m.attributes){let F=y.getPreferredPrefix(C,v);if(C.namespaceURI===Lt){let N=C.value===""?null:C.value;if(_&&N===Lt)throw new Error("The serialization of this attribute would produce invalid XML because the XMLNS namespace is reserved and cannot be applied as an element's namespace via XML parsing.");if(N===ae||N===Lt)continue;let L=C.prefix===null?null:C.localName;if(_&&C.prefix!==null&&C.value==="")throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace. Use a default namespace declaration instead.");if(!y.shouldSerializeDeclaration(L,N))continue}if(_&&D.find((N=>N.localName===C.localName&&N.namespaceURI===C.namespaceURI)))throw new Error(`Can not serialize a duplicate attribute for namespaceURI "${C.namespaceURI}", localName "${C.localName}".`);if(D.push({namespaceURI:C.namespaceURI,localName:C.localName}),_&&(C.localName.indexOf(":")>=0||!Pe(C.localName)||C.localName==="xmlns"&&C.namespaceURI===null))throw new Error(`Can not serialize an attribute because the localName "${C.localName}" is not allowed.`);F!==null&&y.prefixToNamespace(F)!==C.namespaceURI&&(k.push(" xmlns:",F,'="',co(C.namespaceURI,_),'"'),y.add(F,C.namespaceURI)),k.push(" "),F!==null&&k.push(F,":"),k.push(C.localName,'="',co(C.value,_),'"')}})(h,f,a,l,u),h.namespaceURI===on&&!h.hasChildNodes()&&Ku.indexOf(h.localName)>=0&&(u.push(" /"),w=!0),h.namespaceURI===on||h.hasChildNodes()||(u.push("/"),w=!0),u.push(">"),!w){for(let m of i.childNodes)sr(m,f,a,l,u);u.push("</",d,">")}})(t,e,n,r,o);case 9:return void(function(i,s,a,l,u){let h=i;if(l&&h.documentElement===null)throw new Error("Can not serialize a document with no documentElement.");for(let d of h.childNodes)sr(d,s,a,l,u)})(t,e,n,r,o);case 8:return void(function(i,s,a){let l=i;if(s&&(!sn(l.data)||l.data.indexOf("--")>=0||l.data.endsWith("-")))throw new Error("Can not serialize a comment because it contains invalid characters.");a.push("<!--",l.data,"-->")})(t,r,o);case 4:return void(function(i,s,a){let l=i;a.push("<![CDATA[",l.data,"]]>")})(t,0,o);case 3:return void(function(i,s,a){let l=i;if(s&&!sn(l.data))throw new Error("Can not serialize a text node because it contains invalid characters.");let u=l.data;u=u.replace(/&/g,"&"),u=u.replace(/</g,"<"),u=u.replace(/>/g,">"),a.push(u)})(t,r,o);case 11:return void(function(i,s,a,l,u){for(let h of i.childNodes)sr(h,s,a,l,u)})(t,e,n,r,o);case 10:return void(function(i,s,a){let l=i;if(s&&(u=l.publicId,!mu(u,0).success))throw new Error("Can not serialize a document type because the publicId contains invalid characters.");var u;if(s&&(!sn(l.systemId)||l.systemId.indexOf('"')>=0&&l.systemId.indexOf("'")>=0))throw new Error("Can not serialize a document type because the systemId contains invalid characters.");a.push("<!DOCTYPE"),a.push(" "),a.push(l.name),l.publicId!==""&&a.push(' PUBLIC "',l.publicId,'"'),l.systemId!==""&&l.publicId===""&&a.push(" SYSTEM"),l.systemId!==""&&a.push(' "',l.systemId,'"'),a.push(">")})(t,r,o);case 7:return void(function(i,s,a){let l=i;if(s){if(l.target.indexOf(":")>=0)throw new Error(`Can not serialize a processing instruction because the target "${l.target}" may not contain ":".`);if(l.target.toLowerCase()==="xml")throw new Error('Can not serialize a processing instruction because "xml" may not be used as target.')}if(s&&(!sn(l.data)||l.data.indexOf("?>")>=0))throw new Error("Can not serialize a processing instruction because the data contains invalid characters.");a.push("<?",l.target," ",l.data,"?>")})(t,r,o);case 2:return;default:throw new TypeError("Only Nodes and Attr objects can be serialized by this algorithm.")}}function co(t,e){if(e&&t!==null&&!sn(t))throw new Error("Can not serialize an attribute value because it contains invalid characters.");return t===null?"":t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">").replace(/\t/g,"	").replace(/\n/g," ").replace(/\r/g," ")}var No=class extends K{get nodeType(){return 1}get nodeName(){return this.tagName}get nodeValue(){return null}set nodeValue(e){}get textContent(){return Rs(this)}set textContent(e){Fs(this,e=un(e))}lookupPrefix(e){return Z(arguments,1),(e=Xt(e))===null||e===""?null:Ls(this,e)}lookupNamespaceURI(e){if(Z(arguments,1),(e=Xt(e))===""&&(e=null),this.namespaceURI!==null&&this.prefix===e)return this.namespaceURI;let n=null;if(e!==null){let o=this.getAttributeNodeNS(Lt,e);o&&o.prefix==="xmlns"&&(n=o.value)}else{let o=this.getAttributeNodeNS(Lt,"xmlns");o&&o.prefix===null&&(n=o.value)}if(n!==null)return n!==""?n:null;let r=this.parentElement;return r===null?null:r.lookupNamespaceURI(e)}before(...e){Lo(this,e)}after(...e){Mo(this,e)}replaceWith(...e){Uo(this,e)}remove(){Xo(this)}get children(){return Po(this)}prepend(...e){zo(this,e)}append(...e){jo(this,e)}replaceChildren(...e){Bo(this,e)}get previousElementSibling(){return Ds(this)}get nextElementSibling(){return $s(this)}constructor(e,n,r){super(),this.firstElementChild=null,this.lastElementChild=null,this.childElementCount=0,this.attributes=[],this.namespaceURI=e,this.prefix=n,this.localName=r,this.tagName=n===null?r:`${n}:${r}`}hasAttributes(){return this.attributes.length>0}getAttribute(e){Z(arguments,1);let n=nn(e=String(e),this);return n===null?null:n.value}getAttributeNS(e,n){Z(arguments,2);let r=rn(e=Xt(e),n=String(n),this);return r===null?null:r.value}setAttribute(e,n){Z(arguments,2),e=String(e),n=String(n),Pe(e)||Ae("The qualified name does not match the Name production");let r=nn(e,this);if(r===null){let o=new(at()).Attr(null,null,e,n,this);return o.ownerDocument=this.ownerDocument,void ln(o,this)}bo(r,n)}setAttributeNS(e,n,r){Z(arguments,3),e=Xt(e),n=String(n),r=String(r);let{namespace:o,prefix:i,localName:s}=Wo(e,n);(function(a,l,u,h,d){let w=rn(d,l,a);if(w===null){let f=new(at()).Attr(d,h,l,u,a);return f.ownerDocument=a.ownerDocument,void ln(f,a)}bo(w,u)})(this,s,r,i,o)}removeAttribute(e){Z(arguments,1),Os(e=String(e),this)}removeAttributeNS(e,n){Z(arguments,2),(function(r,o,i){let s=rn(r,o,i);s!==null&&xo(s)})(e=Xt(e),n=String(n),this)}toggleAttribute(e,n){if(Pe(e)||Ae("The qualified name does not match the Name production"),nn(e,this)===null){if(n===void 0||n===!0){let r=new(at()).Attr(null,null,e,"",this);return r.ownerDocument=this.ownerDocument,ln(r,this),!0}return!1}return n!==void 0&&n!==!1||(Os(e,this),!1)}hasAttribute(e){return Z(arguments,1),nn(e=String(e),this)!==null}hasAttributeNS(e,n){return Z(arguments,2),rn(e=Xt(e),n=String(n),this)!==null}getAttributeNode(e){return Z(arguments,1),nn(e=String(e),this)}getAttributeNodeNS(e,n){return Z(arguments,2),rn(e=Xt(e),n=String(n),this)}setAttributeNode(e){return Z(arguments,1),Cs(e=yt(e,Xe),this)}setAttributeNodeNS(e){return Z(arguments,1),Cs(e=yt(e,Xe),this)}removeAttributeNode(e){return Z(arguments,1),e=yt(e,Xe),this.attributes.indexOf(e)<0&&wr("the specified attribute does not exist"),xo(e),e}getElementsByTagName(e){return Z(arguments,1),Ns(e=String(e),this)}getElementsByTagNameNS(e,n){return Z(arguments,2),Is(e=Xt(e),n=String(n),this)}T(e){let n=$e(e,this.localName,this.namespaceURI,this.prefix);for(let r of this.attributes){let o=r.T(e);n.setAttributeNode(o)}return n}get innerHTML(){return Ts(this,!0)}get outerHTML(){return Ts(this,!0,!0)}};function $e(t,e,n,r=null){let o=null;return o=new(at()).Element(n,r,e),o.ownerDocument=t,o}function nn(t,e){return e.attributes.find((n=>n.name===t))||null}function rn(t,e,n){return t===""&&(t=null),n.attributes.find((r=>r.namespaceURI===t&&r.localName===e))||null}function Cs(t,e){t.ownerElement!==null&&t.ownerElement!==e&&(function(r){throw de("InUseAttributeError",r)})("attribute is in use by another element");let n=rn(t.namespaceURI,t.localName,e);return n===t?t:(n!==null?(function(r,o){let i=r.ownerElement;br(r,i,r.value,o.value),i.attributes.splice(i.attributes.indexOf(r),1,o),o.ownerElement=i,r.ownerElement=null})(n,t):ln(t,e),n)}function Os(t,e){let n=nn(t,e);return n!==null&&xo(n),n}function ma(t,e,n){let{namespace:r,prefix:o,localName:i}=Wo(e,n);return $e(t,i,r,o)}var gr=class{constructor(e){this.J=e}createDocumentType(e,n,r){Z(arguments,3),e=String(e),n=String(n),r=String(r),Bs(e);let o=new(at(this.J)).DocumentType(e,n,r);return o.ownerDocument=this.J,o}createDocument(e,n,r=null){Z(arguments,2),e=Xt(e),n=zs(n),r=yo(r,cr);let o=new(at(this.J)).XMLDocument,i=null;return n!==""&&(i=ma(o,e,n)),r&&o.appendChild(r),i&&o.appendChild(i),o}createHTMLDocument(e){e=Xt(e);let n=at(this.J),r=new n.Document,o=new n.DocumentType("html");o.ownerDocument=r,r.appendChild(o);let i=$e(r,"html",on);r.appendChild(i);let s=$e(r,"head",on);if(i.appendChild(s),e!==null){let a=$e(r,"title",on);s.appendChild(a),a.appendChild(r.createTextNode(e))}return i.appendChild($e(r,"body",on)),r}},pn=class extends K{get nodeType(){return 9}get nodeName(){return"#document"}get nodeValue(){return null}set nodeValue(e){}get textContent(){return null}set textContent(e){}lookupPrefix(e){return Z(arguments,1),this.documentElement!==null?this.documentElement.lookupPrefix(e):null}lookupNamespaceURI(e){return Z(arguments,1),this.documentElement===null?null:this.documentElement.lookupNamespaceURI(e)}get children(){return Po(this)}prepend(...e){zo(this,e)}append(...e){jo(this,e)}replaceChildren(...e){Bo(this,e)}constructor(){super(),this.firstElementChild=null,this.lastElementChild=null,this.childElementCount=0,this.implementation=new gr(this),this.doctype=null,this.documentElement=null}getElementsByTagName(e){return Z(arguments,1),Ns(e=String(e),this)}getElementsByTagNameNS(e,n){return Z(arguments,2),Is(e=Xt(e),n=String(n),this)}createElement(e){return Z(arguments,1),Pe(e=String(e))||Ae("The local name is not a valid Name"),$e(this,e,null,null)}createElementNS(e,n){return Z(arguments,2),ma(this,e=Xt(e),n=String(n))}createDocumentFragment(){let e=new(at()).DocumentFragment;return e.ownerDocument=this,e}createTextNode(e){Z(arguments,1),e=String(e);let n=new(at()).Text(e);return n.ownerDocument=this,n}createCDATASection(e){Z(arguments,1),(e=String(e)).indexOf("]]>")>=0&&Ae('Data must not contain the string "]]>"');let n=new(at()).CDATASection(e);return n.ownerDocument=this,n}createComment(e){Z(arguments,1),e=String(e);let n=new(at()).Comment(e);return n.ownerDocument=this,n}createProcessingInstruction(e,n){Z(arguments,2),e=String(e),n=String(n),Pe(e)||Ae("The target is not a valid Name"),n.indexOf("?>")>=0&&Ae('Data must not contain the string "?>"');let r=new(at()).ProcessingInstruction(e,n);return r.ownerDocument=this,r}importNode(e,n=!1){return Z(arguments,1),ot(e=yt(e,K),9)&&go("importing a Document node is not supported"),$o(e,n,this)}adoptNode(e){return Z(arguments,1),ot(e=yt(e,K),9)&&go("adopting a Document node is not supported"),yr(e,this),e}createAttribute(e){Z(arguments,1),Pe(e=String(e))||Ae("The local name is not a valid Name");let n=new(at()).Attr(null,null,e,"",null);return n.ownerDocument=this,n}createAttributeNS(e,n){Z(arguments,2),e=Xt(e),n=String(n);let{namespace:r,prefix:o,localName:i}=Wo(e,n),s=new(at()).Attr(r,o,i,"",null);return s.ownerDocument=this,s}createRange(){let e=new(at()).Range;return e.startContainer=this,e.startOffset=0,e.endContainer=this,e.endOffset=0,e}T(e){return new(at()).Document}},Io=class extends K{get nodeType(){return 11}get nodeName(){return"#document-fragment"}get nodeValue(){return null}set nodeValue(e){}get textContent(){return Rs(this)}set textContent(e){Fs(this,e=un(e))}lookupPrefix(e){return Z(arguments,1),null}lookupNamespaceURI(e){return Z(arguments,1),null}get children(){return Po(this)}prepend(...e){zo(this,e)}append(...e){jo(this,e)}replaceChildren(...e){Bo(this,e)}constructor(){super(),this.firstElementChild=null,this.lastElementChild=null,this.childElementCount=0;let e=at();this.ownerDocument=e.document}T(e){let n=new(at()).DocumentFragment;return n.ownerDocument=e,n}},Ao=class extends Dn{get nodeType(){return 7}get nodeName(){return this.target}constructor(e,n){super(n),this.target=e}T(e){let n=new(at()).ProcessingInstruction(this.target,this.data);return n.ownerDocument=e,n}};function Es(t,e){if(t.collapsed)return;let n=ue(t.startContainer),r=ue(t.endContainer),o=0;for(;o<n.length&&o<r.length&&n[o]===r[o];)++o;let i=t.endContainer.childNodes[t.endOffset]||null;for(let s=t.startContainer.childNodes[t.startOffset]||null;s&&s!==i&&s!==r[n.length];s=s.nextSibling)e(s);for(let s=n.length-1;s>=o;--s)for(let a=n[s].nextSibling;a&&a!==i&&a!==r[s];a=a.nextSibling)e(a);for(let s=o;s<r.length;++s)for(let a=r[s].firstChild;a&&a!==i&&a!==r[s+1];a=a.nextSibling)e(a)}function An(t,e){let n=Zt(t.startContainer),r=n.createDocumentFragment();if(t.collapsed)return r;let o=t.startContainer,i=t.startOffset,s=t.endContainer,a=t.endOffset;if(o===s&&an(o)){let C=o.cloneNode();return C.data=o.substringData(i,a-i),ee(C,r),e||o.replaceData(i,a-i,""),r}let l=ue(t.startContainer),u=ue(t.endContainer),h=0;for(;h<l.length&&h<u.length&&l[h]===u[h];)++h;let d=h===l.length,w=h===u.length,f=null;d||(f=l[h]);let g=null;w||(g=u[h]);let m=[],y=f?f.nextSibling:o.childNodes[i],v=g||s.childNodes[a]||null;for(var _=y;_&&_!==v;_=_.nextSibling)ot(_,10)&&vt(e?"Can not clone a doctype using cloneContents":"Can not extract a doctype using extractContents"),m.push(_);let k,D;if(d||e)k=o,D=i;else{let C=l[h];k=C.parentNode,D=1+wt(C)}if(f!==null&&an(f)){let C=f.cloneNode();C.data=f.substringData(i,f.length-i),ee(C,r),e||f.replaceData(i,f.length-i,"")}else if(f!==null){let C=f.cloneNode();ee(C,r);let F=n.createRange();F.setStart(o,i),F.setEnd(f,Ie(f));let N=An(F,e);F.detach(),ee(N,C)}if(m.forEach((C=>{ee(e?C.cloneNode(!0):C,r)})),g&&an(g)){let C=g.cloneNode();C.data=g.substringData(0,a),ee(C,r),e||g.replaceData(0,a,"")}else if(g!==null){let C=g.cloneNode();ee(C,r);let F=n.createRange();F.setStart(g,0),F.setEnd(s,a);let N=An(F,e);F.detach(),ee(N,C)}return e||(t.setStart(k,D),t.collapse(!0)),r}var Ue=class t{get collapsed(){return(e=this).startContainer===e.endContainer&&e.startOffset===e.endOffset;var e}constructor(){let e=at();this.startContainer=e.document,this.startOffset=0,this.endContainer=e.document,this.endOffset=0,e.addRange(this)}get commonAncestorContainer(){let e=ue(this.startContainer),n=ue(this.endContainer),r=e[0],o=0;for(;o<e.length&&o<n.length&&e[o]===n[o];)r=e[o],++o;return r}setStart(e,n){Z(arguments,2),e=yt(e,K),n=we(n),ot(e,10)&&re("Can not set a range under a doctype node"),n>Ie(e)&&Me("Can not set a range past the end of the node"),Le(this)===en(e)&&te(e,n,this.endContainer,this.endOffset)!==In||(this.endContainer=e,this.endOffset=n),this.startContainer=e,this.startOffset=n}setEnd(e,n){Z(arguments,2),e=yt(e,K),n=we(n),ot(e,10)&&re("Can not set a range under a doctype node"),n>Ie(e)&&Me("Can not set a range past the end of the node"),Le(this)===en(e)&&te(e,n,this.startContainer,this.startOffset)!==Nn||(this.startContainer=e,this.startOffset=n),this.endContainer=e,this.endOffset=n}setStartBefore(e){Z(arguments,1);let n=(e=yt(e,K)).parentNode;if(n===null)return re("Can not set range before node without a parent");this.setStart(n,wt(e))}setStartAfter(e){Z(arguments,1);let n=(e=yt(e,K)).parentNode;if(n===null)return re("Can not set range before node without a parent");this.setStart(n,wt(e)+1)}setEndBefore(e){Z(arguments,1);let n=(e=yt(e,K)).parentNode;if(n===null)return re("Can not set range before node without a parent");this.setEnd(n,wt(e))}setEndAfter(e){Z(arguments,1);let n=(e=yt(e,K)).parentNode;if(n===null)return re("Can not set range before node without a parent");this.setEnd(n,wt(e)+1)}collapse(e=!1){e?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=this.endOffset)}selectNode(e){Z(arguments,1);let n=(e=yt(e,K)).parentNode;if(n===null)return re("Can not select node with null parent");let r=wt(e);this.startContainer=n,this.startOffset=r,this.endContainer=n,this.endOffset=r+1}selectNodeContents(e){Z(arguments,1),ot(e=yt(e,K),10)&&re("Can not place range inside a doctype node");let n=Ie(e);this.startContainer=e,this.startOffset=0,this.endContainer=e,this.endOffset=n}compareBoundaryPoints(e,n){switch(Z(arguments,2),n=yt(n,t),e!==t.START_TO_START&&e!==t.START_TO_END&&e!==t.END_TO_END&&e!==t.END_TO_START&&go("Unsupported comparison type"),Le(this)!==Le(n)&&ps("Can not compare positions of ranges in different trees"),e){case t.START_TO_START:return te(this.startContainer,this.startOffset,n.startContainer,n.startOffset);case t.START_TO_END:return te(this.endContainer,this.endOffset,n.startContainer,n.startOffset);case t.END_TO_END:return te(this.endContainer,this.endOffset,n.endContainer,n.endOffset);default:return te(this.startContainer,this.startOffset,n.endContainer,n.endOffset)}}deleteContents(){if(this.collapsed)return;let e=this.startContainer,n=this.startOffset,r=this.endContainer,o=this.endOffset;if(e===r&&an(e))return void e.replaceData(n,o-n,"");let i=[],s,a;if(Es(this,(l=>{i.push(l)})),e.contains(r))s=e,a=n;else{let l=e;for(;l.parentNode!==null&&!l.parentNode.contains(r);)l=l.parentNode;s=l.parentNode,a=1+wt(l)}an(e)&&e.replaceData(n,e.length-n,""),i.forEach((l=>{ce(l)})),an(r)&&r.replaceData(0,o,""),this.setStart(s,a),this.collapse(!0)}extractContents(){return An(this,!1)}cloneContents(){return An(this,!0)}insertNode(e){Z(arguments,1),hs(e=yt(e,K),this)}surroundContents(e){Z(arguments,1),e=yt(e,K),(Ne(this.startContainer)?this.startContainer.parentNode:this.startContainer)!==(Ne(this.endContainer)?this.endContainer.parentNode:this.endContainer)&&As("Can not use surroundContents on a range that has partially selected a non-Text node"),ot(e,9,10,11)&&re("Can not use Document, DocumentType, or DocumentFragment as a parent node in surroundContents");let n=An(this,!1);e.firstChild&&Fo(null,e),hs(e,this),ee(n,e),this.selectNode(e)}cloneRange(){let e=new(at()).Range;return e.startContainer=this.startContainer,e.startOffset=this.startOffset,e.endContainer=this.endContainer,e.endOffset=this.endOffset,e}detach(){at().removeRange(this)}isPointInRange(e,n){return Z(arguments,2),e=yt(e,K),n=we(n),en(e)===Le(this)&&(ot(e,10)&&re("Point can not be under a doctype"),n>Ie(e)&&Me("Offset should not be past the end of node"),te(e,n,this.startContainer,this.startOffset)!==Nn&&te(e,n,this.endContainer,this.endOffset)!==In)}comparePoint(e,n){return Z(arguments,2),e=yt(e,K),n=we(n),en(e)!==Le(this)&&ps("Can not compare point to range in different trees"),ot(e,10)&&re("Point can not be under a doctype"),n>Ie(e)&&Me("Offset should not be past the end of node"),te(e,n,this.startContainer,this.startOffset)===Nn?-1:te(e,n,this.endContainer,this.endOffset)===In?1:0}intersectsNode(e){if(Z(arguments,1),en(e=yt(e,K))!==Le(this))return!1;let n=e.parentNode;if(n===null)return!0;let r=wt(e);return te(n,r,this.endContainer,this.endOffset)===Nn&&te(n,r+1,this.startContainer,this.startOffset)===In}toString(){let e=[],n=this.startContainer;if(Ne(n)){if(this.startContainer===this.endContainer)return n.substringData(this.startOffset,this.endOffset-this.startOffset);e.push(n.substringData(this.startOffset,n.length-this.startOffset))}Es(this,(o=>{hn(o,(i=>{Ne(i)&&e.push(i.data)}))}));let r=this.endContainer;return Ne(r)&&e.push(r.substringData(0,this.endOffset)),e.join("")}};Ue.START_TO_START=0,Ue.START_TO_END=1,Ue.END_TO_END=2,Ue.END_TO_START=3;var Nn=-1,In=1;function te(t,e,n,r){if(t!==n){let o=ue(t),i=ue(n);for(;o[0]&&i[0]&&o[0]===i[0];)o.shift(),i.shift();o.length&&(e=wt(o[0])+.5),i.length&&(r=wt(i[0])+.5)}return e===r?0:e<r?Nn:In}function Le(t){return en(t.startContainer)}var Do=class extends pn{T(e){return new(at()).XMLDocument}};function ti(t){let e=[];return ha(t=yt(t,K),!0,e),e.join("")}var Qu=new pn;Ut.document=Qu,Ut.Attr=Xe,Ut.CDATASection=vo,Ut.Comment=_o,Ut.Document=pn,Ut.DocumentFragment=Io,Ut.DocumentType=cr,Ut.DOMImplementation=gr,Ut.Element=No,Ut.ProcessingInstruction=Ao,Ut.Range=Ue,Ut.Text=lr,Ut.XMLDocument=Do;function wa(t){if(typeof t!="string"||t.length===0)throw new Error(`invalid part path: must be non-empty string, got: ${JSON.stringify(t)}`);if(t.startsWith("/"))throw new Error(`invalid part path: must not start with '/', got: ${t}`)}function ya(t){if(typeof t!="string"||t.length===0)throw new Error("invalid contentType: must be non-empty string")}function tf(t){if(wa(t.path),ya(t.contentType),!t.xmlDom)throw new Error(`createXmlPart: xmlDom required for ${t.path}`);return{path:t.path,contentType:t.contentType,xmlDom:t.xmlDom,_originalBytes:t.originalBytes,_dirty:t.originalBytes===void 0}}function ga(t){var e;if(wa(t.path),ya(t.contentType),!t.bytes)throw new Error(`createBinaryPart: bytes required for ${t.path}`);return{path:t.path,contentType:t.contentType,bytes:t.bytes,_originalBytes:(e=t.originalBytes)!=null?e:t.bytes,_dirty:!1}}function ef(){return{parts:new Map}}function ei(t,e){t.parts.set(e.path,e)}var Tr="http://schemas.microsoft.com/office/2006/xmlPackage",rf="[Content_Types].xml";function of(t){return t.endsWith("+xml")||t==="application/xml"||t==="text/xml"}function sf(t){let e=t.replace(/\s+/g,""),n=atob(e),r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r}function af(t){let e=t.childNodes;for(let n=0;n<e.length;n++){let r=e[n];if(r&&r.nodeType===1)return r}return null}function ba(t){var e;let n=Mn(t),r=ef(),o=n.getElementsByTagNameNS(Tr,"part");for(let i=0;i<o.length;i++){let s=o[i];if(!s)continue;let a=s.getAttributeNS(Tr,"name"),l=s.getAttributeNS(Tr,"contentType");if(!a||!l)throw new Error("fromFlatOpc: <pkg:part> missing name or contentType");let u=a.replace(/^\//,"");if(!u||u===rf)continue;let h=null,d=null,w=s.childNodes;for(let f=0;f<w.length;f++){let g=w[f];if(!g||g.nodeType!==1)continue;let m=g;m.namespaceURI===Tr&&(m.localName==="xmlData"&&!h?h=m:m.localName==="binaryData"&&!d&&(d=m))}if(h){let f=af(h);if(!f)throw new Error(`fromFlatOpc: empty <pkg:xmlData> for part '${u}'`);let g=ti(f),m=new TextEncoder().encode(g),y=Mn(g);ei(r,tf({path:u,contentType:l,xmlDom:y,originalBytes:m}))}else if(d){let f=(e=d.textContent)!=null?e:"",g=sf(f);ei(r,ga({path:u,contentType:l,bytes:g}))}else{if(of(l))throw new Error(`fromFlatOpc: XML part '${u}' has no <pkg:xmlData>`);ei(r,ga({path:u,contentType:l,bytes:new Uint8Array}))}}return r}var he={header:"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",footer:"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",footnotes:"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml",endnotes:"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml",comments:"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",commentsExtended:"application/vnd.ms-word.commentsExtended+xml"},Or={header:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",footer:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"},xa=["comments","headersFooters","notes","bookmarks","media","drawings"];function ka(t){if(t?._originalBytes)return new TextDecoder().decode(t._originalBytes);if(!t?.xmlDom?.documentElement)throw new Error("flatOpcToOnlyOfficeWriteback: missing XML DOM for word/document.xml");if(typeof XMLSerializer!="function")throw new Error("flatOpcToOnlyOfficeWriteback: XMLSerializer is unavailable and part has no original bytes");return new XMLSerializer().serializeToString(t.xmlDom.documentElement)}function lf(t){return{domain:t,present:!1,count:0,parts:[],status:"pending"}}function ze(t){return t?ka(t):""}function me(t){return t?typeof t.text=="string"?t.text:(t.kids||[]).map(me).join(""):""}function cf(t){if(!t)return new Map;let e=Et(t),n=new Map;for(let r of Jt(e,"w:comment")){let o=String(r.attrs?.["w:id"]??"");o&&n.set(o,{id:o,author:String(r.attrs?.["w:author"]??""),date:String(r.attrs?.["w:date"]??""),text:me(r)})}return n}function uf(t){if(!t)return new Map;let e=Et(t),n=ht(e,"w:body"),r=new Map,o=new Map;function i(s,a=""){if(!(!s||typeof s!="object")){if(s.tag==="w:p"){let l=me(s);for(let u of s.kids||[])i(u,l);return}if(s.tag==="w:commentRangeStart"){let l=String(s.attrs?.["w:id"]??"");l&&o.set(l,{anchorText:"",paragraphText:a});return}if(s.tag==="w:commentRangeEnd"){let l=String(s.attrs?.["w:id"]??"");l&&o.has(l)&&(r.set(l,o.get(l)),o.delete(l));return}if(s.tag==="w:t"){let l=me(s);for(let u of o.values())u.anchorText+=l;return}for(let l of s.kids||[])i(l,a)}}return i(n||e),r}function ff(t,e){let n=t.parts.get("word/comments.xml");if(!n)return[];let r=cf(ze(n)),o=uf(e);return[...r.values()].map(i=>{let s=o.get(i.id);return{...i,anchorText:s?.anchorText??"",paragraphText:s?.paragraphText??""}})}function va(t,e,n,r){if(!n)return new Map;let o=Et(ii(t,e,n)),i=r==="endnote"?"w:endnote":"w:footnote",s=new Map;for(let a of Jt(o,i)){let l=String(a.attrs?.["w:id"]??"");if(!l)continue;let u=String(a.attrs?.["w:type"]??"");if(u==="separator"||u==="continuationSeparator"||Number(l)<1)continue;let d=(a?.kids||[]).filter(w=>w?.tag==="w:p"||w?.tag==="w:tbl").map(w=>si(w)).join("");s.set(l,{kind:r,id:l,type:u,text:me(a),bodyJson:Ve(`<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><w:body>${d}</w:body></w:document>`).doc})}return s}function df(t){if(!t)return new Map;let e=Et(t),n=ht(e,"w:body"),r=new Map;function o(s){let a="";function l(u){if(!(!u||typeof u!="object")){if(u.tag==="w:t"||u.tag==="w:delText"){a+=me(u);return}if(u.tag==="w:footnoteReference"||u.tag==="w:endnoteReference"){let h=String(u.attrs?.["w:id"]??""),d=u.tag==="w:endnoteReference"?"endnote":"footnote";h&&r.set(`${d}:${h}`,a.trim());return}for(let h of u.kids||[])l(h)}}l(s)}function i(s){if(!(!s||typeof s!="object")){if(s.tag==="w:p"){o(s);return}for(let a of s.kids||[])i(a)}}return i(n||e),r}function pf(t,e){let n=df(e);return[...va(t,"word/footnotes.xml",ze(t.parts.get("word/footnotes.xml")),"footnote").values(),...va(t,"word/endnotes.xml",ze(t.parts.get("word/endnotes.xml")),"endnote").values()].map(o=>({...o,anchorText:n.get(`${o.kind}:${o.id}`)??""}))}function hf(t){if(!t)return[];let e=Et(t),n=ht(e,"w:body"),r=new Map,o=[];function i(s){if(!(!s||typeof s!="object")){if(s.tag==="w:bookmarkStart"){let a=String(s.attrs?.["w:id"]??""),l=String(s.attrs?.["w:name"]??"");a&&l&&!l.startsWith("_")&&r.set(a,{id:a,name:l,anchorText:""});return}if(s.tag==="w:bookmarkEnd"){let a=String(s.attrs?.["w:id"]??""),l=r.get(a);l&&(o.push({...l,anchorText:l.anchorText.trim()}),r.delete(a));return}if(s.tag==="w:t"||s.tag==="w:delText"){let a=me(s);for(let l of r.values())l.anchorText+=a;return}for(let a of s.kids||[])i(a)}}return i(n||e),o.filter(s=>s.name&&s.anchorText)}function _e(t){return String(t||"").replace(/^\/+/,"")}function mf(t){let e=String(t||"").replace(/^\/+/,"");return e?e.startsWith("word/")?e:`word/${e}`:""}function oi(t){let e=t.parts.get("word/_rels/document.xml.rels");if(!e)return new Map;let n=Et(ze(e)),r=new Map;for(let o of Jt(n,"Relationship")){let i=String(o.attrs?.Id??"");i&&r.set(i,{id:i,type:String(o.attrs?.Type??""),target:String(o.attrs?.TargetMode??"")==="External"?String(o.attrs?.Target??""):mf(o.attrs?.Target),targetMode:String(o.attrs?.TargetMode??"")})}return r}function gf(t,e){let n=Et(t),r=ht(n,"w:body"),o=[];function i(s){if(!(!s||typeof s!="object")){if(s.tag==="w:headerReference"||s.tag==="w:footerReference"){let a=String(s.attrs?.["r:id"]??""),l=e.get(a);l&&o.push({kind:l.type===Or.footer?"footer":"header",type:String(s.attrs?.["w:type"]??"default"),relId:a,partPath:l.target});return}for(let a of s.kids||[])i(a)}}return i(r||n),o}function wf(t){let e=Et(t),n=ht(e,"w:body"),r=[],o=n?.kids||[],i=-1;for(let a of o){if(!a||typeof a!="object"||a.tag==="w:sectPr"||a.tag!=="w:p"&&a.tag!=="w:tbl")continue;i++;let l=ht(a,"w:pPr"),u=ht(l,"w:sectPr");u&&r.push({node:u,boundary:"paragraph",endBlockIndex:i})}let s=ht(n,"w:sectPr");return s&&r.push({node:s,boundary:"body",endBlockIndex:Math.max(0,i)}),r}function _a(t,e,n){let r=n==="footer"?"w:footerReference":"w:headerReference",o=n==="footer"?Or.footer:Or.header,i=new Map;for(let s of Jt(t,r)){let a=String(s.attrs?.["w:type"]??"default"),l=String(s.attrs?.["r:id"]??""),u=e.get(l);i.set(a,{kind:n,type:a,relId:l,partPath:u?u.target:"",relFound:!!u,relTypeMatches:!!u&&u.type===o})}return i}function Sa(t,e,n,r){let o=e.get(n);if(!o)return r===0?{state:"empty",type:n}:{state:"inherited",type:n,inheritedFrom:r-1};let i=_e(o.partPath),s=i?t.parts.get(i):null,a=ze(s),l=s?me(Et(a)):"";return{state:l?"own":"empty",type:n,relId:o.relId,partPath:i,text:l,bodyJson:s?bf(t,i,a):void 0,unsupportedFields:s?yf(a):[],relFound:o.relFound,relTypeMatches:o.relTypeMatches,partFound:!!s}}function yf(t){if(!t)return[];let e=Et(t),n=[],r=0;function o(i){if(!(!i||typeof i!="object")){if(i.tag==="w:instrText"){let s=me(i).trim().replace(/\s+/g," "),a=s.split(/\s+/)[0]?.toUpperCase()??"";["DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE"].includes(a)&&n.push({index:r++,fieldType:a,instruction:s,unsupportedReason:"dynamic-date-field"})}for(let s of i.kids||[])o(s)}}return o(e),n}function bf(t,e,n){if(!n)return;let i=(Et(ii(t,e,n))?.kids||[]).filter(s=>s?.tag==="w:p"||s?.tag==="w:tbl").map(s=>si(s)).join("");return Ve(`<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><w:body>${i}</w:body></w:document>`).doc}function ii(t,e,n){let r=Ta(t,e);return String(n).replace(/<w:drawing[\s\S]*?<\/w:drawing>/g,o=>{let i=_f(t,r,o);return i?`<oo:ci oo:v="${z(JSON.stringify(i))}"/>`:o})}function Ta(t,e){let n=xf(e),r=t.parts.get(n);if(!r)return new Map;let o=Et(ze(r)),i=new Map;for(let s of Jt(o,"Relationship")){let a=String(s.attrs?.Id??"");if(!a)continue;let l=String(s.attrs?.TargetMode??"");i.set(a,{id:a,type:String(s.attrs?.Type??""),target:l==="External"?String(s.attrs?.Target??""):vf(e,s.attrs?.Target),targetMode:l})}return i}function xf(t){let e=_e(t),n=e.lastIndexOf("/");return n<0?`_rels/${e}.rels`:`${e.slice(0,n)}/_rels/${e.slice(n+1)}.rels`}function vf(t,e){let n=String(e||"").trim();if(!n)return"";if(n.startsWith("/"))return _e(n);let r=_e(t).split("/").slice(0,-1);for(let o of n.split("/"))!o||o==="."||(o===".."?r.pop():r.push(o));return r.join("/")}function _f(t,e,n){let r=Ca(t,"unknown",0,e,n);if(r.status!=="inlined")return null;let o=Et(n),i=Fe(o,"wp:extent")||Fe(o,"a:ext"),s=Fe(o,"wp:docPr"),a=Cr(i?.attrs?.cx)||1,l=Cr(i?.attrs?.cy)||1;return{type:"paraDrawing",docPr:{id:Cr(s?.attrs?.id)||1,name:String(s?.attrs?.name??"Picture"),descr:s?.attrs?.descr==null?void 0:String(s.attrs.descr),title:s?.attrs?.title==null?void 0:String(s.attrs.title)},effectExtent:{l:0,t:0,r:0,b:0},extent:{cx:a,cy:l},graphic:{type:"image",id:"",extX:0,extY:0,nvPicPr:{cNvPr:{id:Cr(s?.attrs?.id)||1,name:String(s?.attrs?.name??"Picture"),descr:s?.attrs?.descr==null?null:String(s.attrs.descr),title:s?.attrs?.title==null?null:String(s.attrs.title),hidden:null},nvPr:{isPhoto:null,userDrawn:null},cNvPicPr:{picLocks:{noChangeAspect:!0}}},blipFill:{type:"blipFill",blip:[],srcRect:null,tile:null,stretch:{fillRect:null},rotWithShape:null,rasterImageId:r.rasterImageId},spPr:{fill:null,ln:null,effectDag:null,effectLst:null,xfrm:{ext:{cx:a,cy:l},off:{x:0,y:0},flipH:null,flipV:null,rot:null,chOffX:null,chOffY:null,chExtX:null,chExtY:null},bwMode:0}},cNvGraphicFramePr:{graphicFrameLocks:{noChangeAspect:!0}},positionH:{relativeFrom:"column",posOffset:0,percent:!1},positionV:{relativeFrom:"paragraph",posOffset:0,percent:!1},simplePos:{x:0,y:0,use:!1},distB:0,distL:0,distR:0,distT:0,allowOverlap:!0,behindDoc:!1,hidden:null,layoutInCell:!0,locked:!1,relativeHeight:0,wrapType:"none",drawingType:"inline"}}function Ca(t,e,n,r,o){let i=Et(o),s=Fe(i,"wp:inline"),a=Fe(i,"wp:anchor"),l=Fe(i,"a:graphicData"),u=Fe(i,"a:blip"),h=String(u?.attrs?.["r:embed"]??""),d=String(u?.attrs?.["r:link"]??""),w=h||d,f=w?r.get(w):null,g=f?.target?t.parts.get(f.target):null,m={partPath:_e(e),index:n,drawingType:a?"anchor":s?"inline":"unknown",relationshipId:w,relationshipType:f?.type??"",target:f?.target??"",targetMode:f?.targetMode??"",contentType:g?.contentType??"",graphicDataUri:String(l?.attrs?.uri??"")};if(a)return{...m,status:"unsupported",unsupportedReason:"floating-anchor"};if(!s)return{...m,status:"unsupported",unsupportedReason:"unknown-drawing-layout"};let y=Sf(m.graphicDataUri,o);return y?{...m,status:"unsupported",unsupportedReason:y}:u?d||f?.targetMode==="External"?{...m,status:"unsupported",unsupportedReason:"external-image"}:f?f.type&&f.type!==Or.image?{...m,status:"unsupported",unsupportedReason:"non-image-relationship"}:g?.bytes?String(g.contentType||"").startsWith("image/")?m.graphicDataUri&&!m.graphicDataUri.includes("/picture")?{...m,status:"unsupported",unsupportedReason:"non-picture-graphic"}:{...m,status:"inlined",rasterImageId:`data:${g.contentType};base64,${kf(g.bytes)}`}:{...m,status:"unsupported",unsupportedReason:"non-image-media"}:{...m,status:"unsupported",unsupportedReason:"missing-media-part"}:{...m,status:"unsupported",unsupportedReason:"missing-relationship"}:{...m,status:"unsupported",unsupportedReason:"missing-blip"}}function Sf(t,e){let n=String(t||""),r=String(e||"");return!n||n.includes("/picture")?"":n.includes("/chart")?"chart-drawing":n.includes("/diagram")?"diagram-drawing":r.includes(":txbx")||r.includes("<w:txbxContent")?"text-box-drawing":n.includes("wordprocessingShape")||n.includes("/shape")?"shape-drawing":"non-picture-graphic"}function Fe(t,e){if(!t||typeof t!="object")return null;if(t.tag===e)return t;for(let n of t.kids||[]){let r=Fe(n,e);if(r)return r}return null}function Cr(t){let e=Number(t);return Number.isFinite(e)?e:void 0}function kf(t){if(typeof Buffer<"u")return Buffer.from(t).toString("base64");let e="";for(let n of t)e+=String.fromCharCode(n);return btoa(e)}function si(t){if(!t||typeof t!="object")return"";if(typeof t.text=="string")return t.text.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");let e=Object.entries(t.attrs||{}).map(([r,o])=>` ${r}="${String(o).replace(/&/g,"&").replace(/"/g,""")}"`).join(""),n=(t.kids||[]).map(si).join("");return`<${t.tag}${e}>${n}</${t.tag}>`}function Gt(t,e){if(!t?.attrs||t.attrs[e]==null)return;let n=Number(t.attrs[e]);return Number.isFinite(n)?n:void 0}function Tf(t){let e=ht(t,"w:pgSz");if(!e)return;let n=Gt(e,"w:w"),r=Gt(e,"w:h");if(!(n==null&&r==null))return{width:n,height:r,orient:String(e.attrs?.["w:orient"]??"")}}function Cf(t){let e=ht(t,"w:pgMar");if(!e)return;let n={top:Gt(e,"w:top"),right:Gt(e,"w:right"),bottom:Gt(e,"w:bottom"),left:Gt(e,"w:left"),header:Gt(e,"w:header"),footer:Gt(e,"w:footer"),gutter:Gt(e,"w:gutter")};return Object.values(n).some(r=>r!=null)?n:void 0}function Of(t){let e=ht(t,"w:pgNumType");if(!e)return;let r={start:Gt(e,"w:start"),fmt:String(e.attrs?.["w:fmt"]??""),chapStyle:String(e.attrs?.["w:chapStyle"]??""),chapSep:String(e.attrs?.["w:chapSep"]??"")};return Object.values(r).some(o=>o!==""&&o!=null)?r:void 0}function Ef(t){let e=ht(t,"w:cols");if(!e)return;let r=Jt(e,"w:col").map(i=>({width:Gt(i,"w:w"),space:Gt(i,"w:space")})),o={equalWidth:String(e.attrs?.["w:equalWidth"]??"1")!=="0",count:Gt(e,"w:num"),space:Gt(e,"w:space"),sep:String(e.attrs?.["w:sep"]??""),col:r};return o.count!=null||o.space!=null||r.length>0?o:void 0}function Nf(t,e){let n=oi(t),r=wf(e),o=["default","first","even"];return r.map((i,s)=>{let a=i.node,l=_a(a,n,"header"),u=_a(a,n,"footer"),h=s>0?r[s-1].endBlockIndex:-1;return{index:s,startBlockIndex:Math.max(0,h+1),endBlockIndex:i.endBlockIndex,boundary:i.boundary,type:String(ht(a,"w:type")?.attrs?.["w:val"]??"nextPage"),titlePage:!!ht(a,"w:titlePg"),pageSize:Tf(a),pageMargins:Cf(a),pageNumbering:Of(a),columns:Ef(a),headers:Object.fromEntries(o.map(d=>[d,Sa(t,l,d,s)])),footers:Object.fromEntries(o.map(d=>[d,Sa(t,u,d,s)]))}})}function If(t,e){let n=oi(t),r=gf(e,n),o=new Set,i=[];for(let s of r){let a=`${s.kind}|${s.type}|${s.partPath}`;if(o.has(a))continue;o.add(a);let l=t.parts.get(_e(s.partPath));l&&i.push({kind:s.kind,type:s.type,partPath:_e(s.partPath),text:me(Et(ze(l)))})}return i}function ni(t){if(Array.isArray(t))return t.filter(n=>!["commentRangeStart","commentRangeEnd","commentReference"].includes(n?.type)).map(ni);if(!t||typeof t!="object")return t;let e={};for(let[n,r]of Object.entries(t))e[n]=ni(r);return e}function ri(t){if(Array.isArray(t))return t.filter(n=>!["bookmarkStart","bookmarkEnd"].includes(n?.type)).map(ri);if(!t||typeof t!="object")return t;let e={};for(let[n,r]of Object.entries(t))e[n]=ri(r);return e}function yn(t,e,n){let r=t[e];r.present=!0,r.count+=1,r.parts.push({path:n.path,contentType:n.contentType})}function Af(t){return[...String(t||"").matchAll(/<w:drawing[\s\S]*?<\/w:drawing>/g)].map(e=>e[0])}function Df(t){return t?.path==="word/document.xml"||t?.contentType===he.header||t?.contentType===he.footer||t?.contentType===he.footnotes||t?.contentType===he.endnotes}function $f(t){let e=[];for(let n of t.parts.values()){if(!Df(n))continue;let r=_e(n.path),o=Ta(t,r),i=ze(n);Af(i).forEach((s,a)=>{e.push(Ca(t,r,a,o,s))})}return e}function Pf(t){let{rasterImageId:e,...n}=t;return n}function Rf(t,e){let n=$f(t);n.length>0&&(e.drawings.present=!0,e.drawings.count=n.length,e.drawings.items=n.map(Pf),e.drawings.inlinedCount=n.filter(o=>o.status==="inlined").length,e.drawings.unsupportedCount=n.filter(o=>o.status==="unsupported").length,e.drawings.status=e.drawings.unsupportedCount>0?"pending":"payload-ready");let r=[...t.parts.values()].filter(o=>o.path.startsWith("word/media/")).map(o=>{let i=_e(o.path),s=n.filter(u=>u.target===i),a=s.filter(u=>u.status==="unsupported"),l=s.filter(u=>u.status==="inlined");return{path:i,contentType:o.contentType,status:s.length===0?"unreferenced":a.length>0?"referenced-by-unsupported-drawing":"inlined",references:s.map(u=>({partPath:u.partPath,index:u.index,drawingType:u.drawingType,status:u.status,unsupportedReason:u.unsupportedReason})),inlinedReferences:l.length,unsupportedReferences:a.length}});r.length>0&&(e.media.items=r,e.media.inlinedCount=r.filter(o=>o.status==="inlined").length,e.media.unsupportedCount=r.filter(o=>o.status!=="inlined").length,e.media.status=e.media.unsupportedCount>0?"pending":"payload-ready")}function Ff(t,e){return e.present?t==="media"||t==="drawings"?Number(e.unsupportedCount||0)>0:!0:!1}function zf(t){let e=[];for(let n of t.drawings.items||[])n.status==="unsupported"&&e.push({domain:"drawings",partPath:n.partPath,index:n.index,status:n.status,reason:n.unsupportedReason,drawingType:n.drawingType,relationshipId:n.relationshipId,target:n.target,targetMode:n.targetMode,contentType:n.contentType,graphicDataUri:n.graphicDataUri});for(let n of t.media.items||[])n.status!=="inlined"&&e.push({domain:"media",partPath:n.path,status:n.status,reason:n.status,contentType:n.contentType,references:n.references});for(let n of t.headersFooters.sections||[]){let r=n.pageNumbering;r&&(r.fmt||r.chapStyle||r.chapSep)&&e.push({domain:"headersFooters",index:n.index,status:"unsupported",reason:"page-numbering-format",property:"pageNumbering",value:{fmt:r.fmt,chapStyle:r.chapStyle,chapSep:r.chapSep}});for(let o of["headers","footers"])for(let i of Object.values(n[o]||{}))for(let s of i.unsupportedFields||[])e.push({domain:"headersFooters",partPath:i.partPath,index:s.index,status:"unsupported",reason:s.unsupportedReason,fieldType:s.fieldType,instruction:s.instruction})}return e}function jf(t){if(t.length===0)return"";let e=new Map;for(let n of t){let r=`${n.domain}:${n.reason||n.status||"unsupported"}`;e.set(r,(e.get(r)||0)+1)}return[...e.entries()].map(([n,r])=>`${n}=${r}`).join(", ")}function Bf(t){let e=Object.fromEntries(xa.map(r=>[r,lf(r)]));for(let r of t.parts.values())r.contentType===he.comments&&yn(e,"comments",r),r.contentType===he.commentsExtended&&yn(e,"comments",r),(r.contentType===he.header||r.contentType===he.footer)&&yn(e,"headersFooters",r),(r.contentType===he.footnotes||r.contentType===he.endnotes)&&yn(e,"notes",r),r.path.startsWith("word/media/")&&yn(e,"media",r),(r.path.startsWith("word/drawings/")||r.path.includes("/drawings/"))&&yn(e,"drawings",r);Rf(t,e);let n=xa.filter(r=>Ff(r,e[r]));return{gaps:e,unsupportedDomains:n}}function Oa(t,e={}){let n=ba(t),r=n.parts.get("word/document.xml"),o=ka(r),{gaps:i,unsupportedDomains:s}=Bf(n),a=ff(n,o);a.length>0&&(i.comments.items=a,i.comments.status="payload-ready");let l=pf(n,o);l.length>0&&(i.notes.items=l,i.notes.status="payload-ready");let u=hf(o);u.length>0&&(i.bookmarks.present=!0,i.bookmarks.count=u.length,i.bookmarks.items=u,i.bookmarks.status="payload-ready");let h=If(n,o),d=Nf(n,o);h.length>0&&(i.headersFooters.items=h,i.headersFooters.status="payload-ready"),d.length>0&&(i.headersFooters.sections=d,i.headersFooters.status="payload-ready");let w=[];s.length>0&&w.push(`OnlyOffice writeback adapter produced bodyJson only; gap domains pending rehydration: ${s.join(", ")}`);let f=zf(i),g=jf(f);g&&w.push(`OnlyOffice writeback unsupported items: ${g}`);let m=ii(n,"word/document.xml",o),y=ri(ni(Ve(m,void 0,{relationships:oi(n)}).doc));if(e.failOnUnsupported===!0&&s.length>0)throw new Error(`OnlyOffice writeback has unsupported gap domains: ${s.join(", ")}`);return{bodyJson:y,gaps:i,diagnostics:{warnings:w,unsupportedDomains:s,unsupportedItems:f}}}function Er(t){return t==null?t:JSON.parse(JSON.stringify(t))}function Lf(t,e="ONLYOFFICE PPT content JSON"){if(typeof t=="string")try{return JSON.parse(t)}catch(n){throw new Error(`${e}: invalid JSON string: ${n?.message||n}`)}if(!t||typeof t!="object")throw new Error(`${e}: expected object or JSON string`);return Er(t)}function Mf(t){if(typeof t!="string")return;let e=t.trim().replace(/^#/,"");if(/^[0-9a-fA-F]{6}$/.test(e))return`#${e.toUpperCase()}`}function Uf(t){if(!t||t.auto)return;let e=t.fill?.color?.color?.rgba||t.color?.rgba||t.rgba||t.fill?.color?.rgba,n=Number(t.r??e?.red),r=Number(t.g??e?.green),o=Number(t.b??e?.blue);if(![n,r,o].every(s=>Number.isFinite(s)))return;let i=s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0").toUpperCase();return`#${i(n)}${i(r)}${i(o)}`}function Na(t){let e=Mf(t);if(e)return{auto:!1,r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}}function Xf(t,e){let n=Na(t);if(!n)return;let r={red:n.r,green:n.g,blue:n.b,alpha:255};return{fill:{color:{rgba:r,color:{rgba:r,type:"srgb"},type:"uniColor"},type:"solid"},transparent:e&&Object.prototype.hasOwnProperty.call(e,"transparent")?e.transparent:null,type:e?.type||"fill"}}function Wf(t={}){let e={},n=Uf(t.uniFill||t.color||t.fill?.color);n&&(e.color=n),typeof t.b=="boolean"&&(e.bold=t.b),typeof t.i=="boolean"&&(e.italic=t.i),t.u!=null&&(e.underline=t.u!==!1&&t.u!=="none"),typeof t.spacing=="number"&&(e.characterSpacing=t.spacing),typeof t.sz=="number"&&(e.fontSize=t.sz/2);let r=t.rFonts,o=r?.ascii||r?.hAnsi||r?.eastAsia||r?.cs;return o&&(e.fontFamily=o),e}function Se(t={},e={}){let n={...t,type:t.type||"textPr"},r=Na(e.color);return r&&(n.color=r,n.uniFill=Xf(e.color,n.uniFill)),typeof e.bold=="boolean"&&(n.b=e.bold,n.bCs=e.bold),typeof e.italic=="boolean"&&(n.i=e.italic,n.iCs=e.italic),typeof e.underline=="boolean"&&(n.u=e.underline?"single":!1),typeof e.characterSpacing=="number"&&(n.spacing=e.characterSpacing),typeof e.fontSize=="number"&&(n.sz=e.fontSize*2,n.szCs=e.fontSize*2),e.fontFamily&&(n.rFonts={...n.rFonts||{},ascii:e.fontFamily,hAnsi:e.fontFamily,eastAsia:e.fontFamily,cs:e.fontFamily}),n}function bn(t){return t&&t.type==="paragraph"&&Array.isArray(t.content)}function ai(t){return t&&t.type==="run"&&Array.isArray(t.content)}function Ia(t){return Array.isArray(t)?t.map(e=>typeof e=="string"?e:e?.type==="tab"?" ":e?.type==="break"?`
|
|
10
|
-
`:"").join(""):""}function
|
|
11
|
-
`),style:r[0]?.style,paragraphs:n}}function Un(t,e,n={}){let r=Ze(t),o=r.content.find(bn);return r.content=[
|
|
5
|
+
${(function(o,i,s){let a=co(lo(o.substring(i,s)),2,30),l=o.lastIndexOf(`
|
|
6
|
+
`,i),u=co(lo(o.substring(l+1,i)),0,55-a.length),h=o.indexOf(`
|
|
7
|
+
`,s),d=co(lo(h>0?o.substring(s,h):o.substring(s)),1,80-a.length-u.length),w=Array.from(u,(f=>pa(f)?f:" ")).join("");return`${u}${a}${d}
|
|
8
|
+
${w}${"^".repeat(Math.max(Array.from(a).length,1))}`})(e.input,e.start,e.end)}`)}function da(t,e,n,r){let o=Array.from(new Set(n),(a=>a.includes('"')?`'${a}'`:`"${a}"`)),i=e.codePointAt(r),s=i?String.fromCodePoint(i):"";gt(`Parsing ${t} failed, expected ${o.length>1?"one of "+o.join(", "):o[0]}`,{input:e,start:r,end:r+Math.max(s.length,1)})}function sn(t){return fu(t,0).success}function Pe(t){return hu(t,0).success}function pa(t){return du(t,0).success}function qu(t){let e=[];for(let n of t)if(typeof n!="string")switch(n.type){case 0:e.push(String.fromCodePoint(n.cp));break;case 1:e.push(`&${n.name};`);break;case 2:gt(`reference to parameter entity "${n.name}" must not occur in an entity declaration in the internal subset`,n)}else e.push(n);return e.join("")}var Eo=class{constructor(e){if(this.F=new Map,this.U=new Map,this._=new Set,this.q=new Set,e.intSubset)for(let n of e.intSubset)switch(n.type){case 0:{for(let o of n.attdefs)if(o.def.type===2)for(let i of o.def.value)typeof i!="string"&&i.type===1&&(this.U.has(i.name)||this._.has(i.name)||this.q.has(i.name)||gt(`default value of attribute "${o.name.name}" contains reference to undefined entity "${i.name}"`,i),this._.has(i.name)&>(`default value of attribute "${o.name.name}" must not contain reference to external entity "${i.name}"`,i));let r=this.F.get(n.name);r===void 0&&(r=new Map,this.F.set(n.name,r));for(let o of n.attdefs)r.has(o.name.name)||r.set(o.name.name,o);break}case 2:if(Array.isArray(n.value))for(let r of n.value)typeof r!="string"&&r.type===2&>(`reference to parameter entity "${r.name}" must not occur in an entity declaration in the internal subset`,r);break;case 1:if(this.U.has(n.name)||this._.has(n.name))continue;Array.isArray(n.value)?this.U.set(n.name,qu(n.value)):n.value.ndata===null?this._.add(n.name):this.q.add(n.name)}}getAttlist(e){return this.F.get(e.name)}getEntityReplacementText(e,n){let r=this.U.get(e.name);if(r===void 0&&(this.q.has(e.name)&>(`reference to binary entity "${e.name}" is not allowed`,e),this._.has(e.name))){if(n)return"";gt(`reference to external entity "${e.name}" is not allowed in attribute value`,e)}return r}},ha=new Map([["lt","<"],["gt",">"],["amp","&"],["apos","'"],["quot",'"']]);function ma(t,e,n,r,o){for(let i of e){if(typeof i=="string"){t.push(i.replace(/[\r\n\t]/g," "));continue}if(i.type===0){t.push(String.fromCodePoint(i.cp));continue}r!==null&&r.includes(i.name)&>(`reference to entity "${i.name}" must not be recursive`,i);let s=ha.get(i.name);s===void 0&&n!==null&&(s=n.getEntityReplacementText(i,!1)),s===void 0&>(`reference to unknown entity "${i.name}" in attribute value`,i),o.enter(i,s.length);let a=gu(s,0);a.success||da(`replacement text for entity "${i.name}"`,s,a.expected,a.offset),ma(t,a.value,n,r?[i.name,...r]:[i.name],o),o.exit()}}function mr(t,e,n,r){let o=[];return ma(o,t,n,null,r),e&&!e.isCData?o.join("").replace(/[ ]+/g," ").replace(/^[ ]+|[ ]+$/g,""):o.join("")}function sr(t,e){let n=t.name,r=e.get(n);if(r!==void 0)return r;let o=null,i=n,s=n.indexOf(":");s>=0&&(o=n.substring(0,s),i=n.substring(s+1)),(o===""||i===""||i.includes(":"))&>(`the name "${n}" is not a valid qualified name`,t);let a={prefix:o,localName:i};return e.set(n,a),a}var gr=class t{constructor(e,n=null){var r;this.B=new Map,this.W=null,this.X=e,this.W=(r=n??e?.W)!==null&&r!==void 0?r:null}getForElement(e,n){e==="xmlns"&>('element names must not have the prefix "xmlns"',n);for(let r=this;r!==null;r=r.X){let o=r.B.get(e);if(o!==void 0)return o}if(e!==null&&this.W){let r=this.W(e);if(r!==void 0)return r}gt(`use of undeclared element prefix "${e}"`,n)}getForAttribute(e,n,r){if(e===null)return n==="xmlns"?Bt:null;for(let o=this;o!==null;o=o.X){let i=o.B.get(e);if(i!==void 0)return i}if(this.W){let o=this.W(e);if(o!==void 0)return o}gt(`use of undeclared attribute prefix ${e}`,r)}static fromAttrs(e,n,r,o,i,s){let a=e,l=!1,u=(d,w,f)=>{d!==null||w!==ae&&w!==Bt||gt(`the namespace "${w}" must not be used as the default namespace`,f),w===Bt&>(`the namespace "${Bt}" must not be bound to a prefix`,f),w===ae&&d!=="xml"&>(`the namespace "${ae}" must be bound only to the prefix "xml"`,f),w!==ae&&d==="xml"&>(`the xml namespace prefix must not be bound to any namespace other than "${ae}"`,f),d!==null&&w===null&>(`the prefix "${d}" must not be undeclared`,f),l||(a=new t(e),l=!0),a.B.set(d,w)},h=(d,w)=>{let{prefix:f,localName:g}=sr(d,i),m=r?.get(d.name);if(f!==null||g!=="xmlns"||l&&a.B.has(null)){if(!(f!=="xmlns"||l&&a.B.has(g))){g==="xmlns"&>('the "xmlns" namespace prefix must not be declared',d);let y=mr(w,m,o,s)||null;u(g,y,d)}}else{let y=mr(w,m,o,s)||null;u(null,y,d)}};for(let d of n.attributes)h(d.name,d.value);if(r)for(let d of r.values()){let w=d.def;w.type===2&&h(d.name,w.value)}return a}static default(e){let n=new t(null,e);return n.B.set(null,null),n.B.set("xml",ae),n.B.set("xmlns",Bt),n}},Ku=gr.default(null);function tn(t,e){Ln(e,t,null,!0)}function Qu(t,e,n,r,{entityExpansionMaxAmplification:o=100,entityExpansionThreshold:i=4194304,treatCDataAsText:s=!1}){var a,l;let u=Zt(r),h={parent:null,root:r,namespaces:n,entityRoot:!0},d=null,w=new Map,f=[];function g(){if(f.length>0){let v=f.join("");if(h.root===u){if(!pa(v))throw new Error("document must not contain text outside of elements")}else tn(h.root,u.createTextNode(f.join("")));f.length=0}}t=(function(v){return v.replace(/\r\n?/g,`
|
|
9
|
+
`)})(t=t.replace(/^\ufeff/,""));let m=new To(t.length,i,o),y={parent:null,entity:null,iterator:e(t)};for(;y;){let v=y.iterator.next();for(;!v.done;v=y.iterator.next()){let _=v.value;if(typeof _!="string"){switch(_.type){case 0:h.root===u&&u.documentElement!==null&>("character reference must not appear after the document element",_),f.push(String.fromCodePoint(_.cp));continue;case 1:{h.root===u&&u.documentElement!==null&>(`reference to entity "${_.name}" must not appear after the document element`,_);for(let D=y;D;D=D.parent)D.entity===_.name&>(`reference to entity "${_.name}" must not be recursive`,_);let T=ha.get(_.name);T===void 0&&d!==null&&(T=d.getEntityReplacementText(_,!0)),T===void 0&>(`reference to unknown entity "${_.name}" in content`,_),m.enter(_,T.length),h={parent:h,root:h.root,namespaces:h.namespaces,entityRoot:!0},y={parent:y,entity:_.name,iterator:Ju(T)};continue}case 5:if(s){f.push(_.data);continue}}switch(g(),_.type){case 5:h.root===u&&u.documentElement!==null&>("CData section must not appear after the document element",_),tn(h.root,u.createCDATASection(_.data));continue;case 3:tn(h.root,u.createComment(_.data));continue;case 10:d=new Eo(_),tn(h.root,u.implementation.createDocumentType(_.name,((a=_.ids)===null||a===void 0?void 0:a.publicId)||"",((l=_.ids)===null||l===void 0?void 0:l.systemId)||""));continue;case 4:tn(h.root,u.createProcessingInstruction(_.target,_.data||""));continue;case 7:case 9:{h.root===u&&u.documentElement!==null&>(`document must contain a single root element, but found "${u.documentElement.nodeName}" and "${_.name.name}"`,_.name);let T=d?d.getAttlist(_.name):void 0,D=gr.fromAttrs(h.namespaces,_,T,d,w,m),{prefix:C,localName:F}=sr(_.name,w),N=D.getForElement(C,_.name),B=Nc(u,F,N,C);for(let Y of _.attributes){let{prefix:S,localName:$}=sr(Y.name,w),p=D.getForAttribute(S,$,Y.name),P=T?.get(Y.name.name);B.hasAttributeNS(p,$)&>(`attribute "${Y.name.name}" must not appear multiple times on element "${_.name.name}"`,Y.name),ln(ys(p,S,$,mr(Y.value,P,d,m),B),B,!0)}if(T)for(let Y of T.values()){let S=Y.def;if(S.type!==2)continue;let{prefix:$,localName:p}=sr(Y.name,w),P=D.getForAttribute($,p,Y.name);B.hasAttributeNS(P,p)||ln(ys(P,$,p,mr(S.value,Y,d,m),B),B,!0)}tn(h.root,B),_.type===7&&(h={parent:h,root:B,namespaces:D,entityRoot:!1,event:_});continue}case 8:De(h.root)&&h.root.nodeName===_.name||gt(`non-well-formed element: found end tag "${_.name}" but expected ${De(h.root)?`"${h.root.nodeName}"`:"no such tag"}`,_),h=h.parent;continue}}else f.push(_)}v.value.success||da(y.entity?`replacement text for entity ${y.entity}`:r===u?"document":"fragment",t,v.value.expected,v.value.offset),h.entityRoot||gt(`${y.entity?`replacement text for entity "${y.entity}"`:r===u?"document":"fragment"} is not well-formed - element "${h.root.nodeName}" is missing a closing tag`,h.event.name),y=y.parent,y&&(m.exit(),h=h.parent)}g()}function Mn(t,e={}){let n=new pn;return Qu(t,Yu,Ku,n,e),n}var No=class t{constructor(e){this.Y=new Map,this.H=new Map,this.X=e}static new(){let e=new t(null);return e.add(null,null),e.add("xml",ae),e.add("xmlns",Bt),e}add(e,n){let r=this.H.get(n);r===void 0?this.H.set(n,[e]):r.push(e),this.Y.set(e,n)}recordNamespaceInformation(e){let n=new t(this);for(let r of e.attributes){if(r.namespaceURI!==Bt)continue;let o=r.value===""?null:r.value,i=r.prefix===null?null:r.localName;n.add(i,o)}return n}j(e){return this.Y.get(e)}K(e){var n;return(n=this.X)===null||n===void 0?void 0:n.prefixToNamespace(e)}prefixToNamespace(e){let n=this.j(e);return n!==void 0?n:this.K(e)}shouldSerializeDeclaration(e,n){return this.prefixToNamespace(e)===n&&this.K(e)!==n}G(e,n){let r=this;for(;r;){let o=r.H.get(e);if(o!==void 0)for(let i=o.length-1;i>=0;--i){let s=o[i];if((n||s!==null)&&this.prefixToNamespace(s)===e)return s}r=r.X}}getPreferredPrefix(e,n){var r;if(e.namespaceURI===ae)return"xml";let o=mo(e);if(e.namespaceURI===Bt)return o&&e.prefix===null?null:"xmlns";if(o&&e.namespaceURI===null)return null;if(!o){let s=(r=this.K(null))!==null&&r!==void 0?r:null;if(e.namespaceURI===s)return null}if((!o||e.prefix!==null)&&this.prefixToNamespace(e.prefix)===e.namespaceURI)return e.prefix;let i=this.G(e.namespaceURI,!o);if(i!==void 0)return i;if(o){let s=this.j(e.prefix);if(!(e.prefix!==null&&(s===void 0||s===e.namespaceURI)))for(;;){let a=`ns${n.value}`;if(n.value+=1,this.j(a)===void 0)return a}}return e.prefix}},tf=["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function Os(t,e,n=!1){let r=n?[t]:t.childNodes,o=[];for(let i of r)ga(i,e,o);return o.join("")}function ga(t,e,n){let r=No.new(),o={value:1};try{ar(t,r,o,e,n)}catch(i){return $s(i.message)}}function ar(t,e,n,r,o){switch(t.nodeType){case 1:return void(function(i,s,a,l,u){let h=i;if(l&&(h.localName.indexOf(":")>=0||!Pe(h.localName)))throw new Error(`Can not serialize an element because the localName "${h.localName}" is not allowed.`);u.push("<");let d="",w=!1,f=s.recordNamespaceInformation(h);if(h.prefix==="xmlns"&&l)throw new Error('Can not serialize an element with prefix "xmlns" because it will not legally round-trip in a conforming XML parser.');let g=f.getPreferredPrefix(h,a);if(g!==null&&(d+=`${g}:`),d+=h.localName,u.push(d),f.prefixToNamespace(g)!==h.namespaceURI&&(f.add(g,h.namespaceURI),g===null?u.push(' xmlns="'):u.push(" xmlns:",g,'="'),u.push(uo(h.namespaceURI,l),'"')),(function(m,y,v,_,T){let D=[];for(let C of m.attributes){let F=y.getPreferredPrefix(C,v);if(C.namespaceURI===Bt){let N=C.value===""?null:C.value;if(_&&N===Bt)throw new Error("The serialization of this attribute would produce invalid XML because the XMLNS namespace is reserved and cannot be applied as an element's namespace via XML parsing.");if(N===ae||N===Bt)continue;let B=C.prefix===null?null:C.localName;if(_&&C.prefix!==null&&C.value==="")throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace. Use a default namespace declaration instead.");if(!y.shouldSerializeDeclaration(B,N))continue}if(_&&D.find((N=>N.localName===C.localName&&N.namespaceURI===C.namespaceURI)))throw new Error(`Can not serialize a duplicate attribute for namespaceURI "${C.namespaceURI}", localName "${C.localName}".`);if(D.push({namespaceURI:C.namespaceURI,localName:C.localName}),_&&(C.localName.indexOf(":")>=0||!Pe(C.localName)||C.localName==="xmlns"&&C.namespaceURI===null))throw new Error(`Can not serialize an attribute because the localName "${C.localName}" is not allowed.`);F!==null&&y.prefixToNamespace(F)!==C.namespaceURI&&(T.push(" xmlns:",F,'="',uo(C.namespaceURI,_),'"'),y.add(F,C.namespaceURI)),T.push(" "),F!==null&&T.push(F,":"),T.push(C.localName,'="',uo(C.value,_),'"')}})(h,f,a,l,u),h.namespaceURI===on&&!h.hasChildNodes()&&tf.indexOf(h.localName)>=0&&(u.push(" /"),w=!0),h.namespaceURI===on||h.hasChildNodes()||(u.push("/"),w=!0),u.push(">"),!w){for(let m of i.childNodes)ar(m,f,a,l,u);u.push("</",d,">")}})(t,e,n,r,o);case 9:return void(function(i,s,a,l,u){let h=i;if(l&&h.documentElement===null)throw new Error("Can not serialize a document with no documentElement.");for(let d of h.childNodes)ar(d,s,a,l,u)})(t,e,n,r,o);case 8:return void(function(i,s,a){let l=i;if(s&&(!sn(l.data)||l.data.indexOf("--")>=0||l.data.endsWith("-")))throw new Error("Can not serialize a comment because it contains invalid characters.");a.push("<!--",l.data,"-->")})(t,r,o);case 4:return void(function(i,s,a){let l=i;a.push("<![CDATA[",l.data,"]]>")})(t,0,o);case 3:return void(function(i,s,a){let l=i;if(s&&!sn(l.data))throw new Error("Can not serialize a text node because it contains invalid characters.");let u=l.data;u=u.replace(/&/g,"&"),u=u.replace(/</g,"<"),u=u.replace(/>/g,">"),a.push(u)})(t,r,o);case 11:return void(function(i,s,a,l,u){for(let h of i.childNodes)ar(h,s,a,l,u)})(t,e,n,r,o);case 10:return void(function(i,s,a){let l=i;if(s&&(u=l.publicId,!wu(u,0).success))throw new Error("Can not serialize a document type because the publicId contains invalid characters.");var u;if(s&&(!sn(l.systemId)||l.systemId.indexOf('"')>=0&&l.systemId.indexOf("'")>=0))throw new Error("Can not serialize a document type because the systemId contains invalid characters.");a.push("<!DOCTYPE"),a.push(" "),a.push(l.name),l.publicId!==""&&a.push(' PUBLIC "',l.publicId,'"'),l.systemId!==""&&l.publicId===""&&a.push(" SYSTEM"),l.systemId!==""&&a.push(' "',l.systemId,'"'),a.push(">")})(t,r,o);case 7:return void(function(i,s,a){let l=i;if(s){if(l.target.indexOf(":")>=0)throw new Error(`Can not serialize a processing instruction because the target "${l.target}" may not contain ":".`);if(l.target.toLowerCase()==="xml")throw new Error('Can not serialize a processing instruction because "xml" may not be used as target.')}if(s&&(!sn(l.data)||l.data.indexOf("?>")>=0))throw new Error("Can not serialize a processing instruction because the data contains invalid characters.");a.push("<?",l.target," ",l.data,"?>")})(t,r,o);case 2:return;default:throw new TypeError("Only Nodes and Attr objects can be serialized by this algorithm.")}}function uo(t,e){if(e&&t!==null&&!sn(t))throw new Error("Can not serialize an attribute value because it contains invalid characters.");return t===null?"":t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">").replace(/\t/g,"	").replace(/\n/g," ").replace(/\r/g," ")}var Io=class extends K{get nodeType(){return 1}get nodeName(){return this.tagName}get nodeValue(){return null}set nodeValue(e){}get textContent(){return zs(this)}set textContent(e){js(this,e=un(e))}lookupPrefix(e){return Z(arguments,1),(e=Xt(e))===null||e===""?null:Us(this,e)}lookupNamespaceURI(e){if(Z(arguments,1),(e=Xt(e))===""&&(e=null),this.namespaceURI!==null&&this.prefix===e)return this.namespaceURI;let n=null;if(e!==null){let o=this.getAttributeNodeNS(Bt,e);o&&o.prefix==="xmlns"&&(n=o.value)}else{let o=this.getAttributeNodeNS(Bt,"xmlns");o&&o.prefix===null&&(n=o.value)}if(n!==null)return n!==""?n:null;let r=this.parentElement;return r===null?null:r.lookupNamespaceURI(e)}before(...e){Mo(this,e)}after(...e){Uo(this,e)}replaceWith(...e){Xo(this,e)}remove(){Wo(this)}get children(){return Ro(this)}prepend(...e){jo(this,e)}append(...e){Lo(this,e)}replaceChildren(...e){Bo(this,e)}get previousElementSibling(){return Ps(this)}get nextElementSibling(){return Rs(this)}constructor(e,n,r){super(),this.firstElementChild=null,this.lastElementChild=null,this.childElementCount=0,this.attributes=[],this.namespaceURI=e,this.prefix=n,this.localName=r,this.tagName=n===null?r:`${n}:${r}`}hasAttributes(){return this.attributes.length>0}getAttribute(e){Z(arguments,1);let n=nn(e=String(e),this);return n===null?null:n.value}getAttributeNS(e,n){Z(arguments,2);let r=rn(e=Xt(e),n=String(n),this);return r===null?null:r.value}setAttribute(e,n){Z(arguments,2),e=String(e),n=String(n),Pe(e)||Ae("The qualified name does not match the Name production");let r=nn(e,this);if(r===null){let o=new(at()).Attr(null,null,e,n,this);return o.ownerDocument=this.ownerDocument,void ln(o,this)}xo(r,n)}setAttributeNS(e,n,r){Z(arguments,3),e=Xt(e),n=String(n),r=String(r);let{namespace:o,prefix:i,localName:s}=Ho(e,n);(function(a,l,u,h,d){let w=rn(d,l,a);if(w===null){let f=new(at()).Attr(d,h,l,u,a);return f.ownerDocument=a.ownerDocument,void ln(f,a)}xo(w,u)})(this,s,r,i,o)}removeAttribute(e){Z(arguments,1),Ns(e=String(e),this)}removeAttributeNS(e,n){Z(arguments,2),(function(r,o,i){let s=rn(r,o,i);s!==null&&vo(s)})(e=Xt(e),n=String(n),this)}toggleAttribute(e,n){if(Pe(e)||Ae("The qualified name does not match the Name production"),nn(e,this)===null){if(n===void 0||n===!0){let r=new(at()).Attr(null,null,e,"",this);return r.ownerDocument=this.ownerDocument,ln(r,this),!0}return!1}return n!==void 0&&n!==!1||(Ns(e,this),!1)}hasAttribute(e){return Z(arguments,1),nn(e=String(e),this)!==null}hasAttributeNS(e,n){return Z(arguments,2),rn(e=Xt(e),n=String(n),this)!==null}getAttributeNode(e){return Z(arguments,1),nn(e=String(e),this)}getAttributeNodeNS(e,n){return Z(arguments,2),rn(e=Xt(e),n=String(n),this)}setAttributeNode(e){return Z(arguments,1),Es(e=yt(e,Xe),this)}setAttributeNodeNS(e){return Z(arguments,1),Es(e=yt(e,Xe),this)}removeAttributeNode(e){return Z(arguments,1),e=yt(e,Xe),this.attributes.indexOf(e)<0&&yr("the specified attribute does not exist"),vo(e),e}getElementsByTagName(e){return Z(arguments,1),As(e=String(e),this)}getElementsByTagNameNS(e,n){return Z(arguments,2),Ds(e=Xt(e),n=String(n),this)}T(e){let n=$e(e,this.localName,this.namespaceURI,this.prefix);for(let r of this.attributes){let o=r.T(e);n.setAttributeNode(o)}return n}get innerHTML(){return Os(this,!0)}get outerHTML(){return Os(this,!0,!0)}};function $e(t,e,n,r=null){let o=null;return o=new(at()).Element(n,r,e),o.ownerDocument=t,o}function nn(t,e){return e.attributes.find((n=>n.name===t))||null}function rn(t,e,n){return t===""&&(t=null),n.attributes.find((r=>r.namespaceURI===t&&r.localName===e))||null}function Es(t,e){t.ownerElement!==null&&t.ownerElement!==e&&(function(r){throw de("InUseAttributeError",r)})("attribute is in use by another element");let n=rn(t.namespaceURI,t.localName,e);return n===t?t:(n!==null?(function(r,o){let i=r.ownerElement;xr(r,i,r.value,o.value),i.attributes.splice(i.attributes.indexOf(r),1,o),o.ownerElement=i,r.ownerElement=null})(n,t):ln(t,e),n)}function Ns(t,e){let n=nn(t,e);return n!==null&&vo(n),n}function wa(t,e,n){let{namespace:r,prefix:o,localName:i}=Ho(e,n);return $e(t,i,r,o)}var wr=class{constructor(e){this.J=e}createDocumentType(e,n,r){Z(arguments,3),e=String(e),n=String(n),r=String(r),Ms(e);let o=new(at(this.J)).DocumentType(e,n,r);return o.ownerDocument=this.J,o}createDocument(e,n,r=null){Z(arguments,2),e=Xt(e),n=Ls(n),r=bo(r,ur);let o=new(at(this.J)).XMLDocument,i=null;return n!==""&&(i=wa(o,e,n)),r&&o.appendChild(r),i&&o.appendChild(i),o}createHTMLDocument(e){e=Xt(e);let n=at(this.J),r=new n.Document,o=new n.DocumentType("html");o.ownerDocument=r,r.appendChild(o);let i=$e(r,"html",on);r.appendChild(i);let s=$e(r,"head",on);if(i.appendChild(s),e!==null){let a=$e(r,"title",on);s.appendChild(a),a.appendChild(r.createTextNode(e))}return i.appendChild($e(r,"body",on)),r}},pn=class extends K{get nodeType(){return 9}get nodeName(){return"#document"}get nodeValue(){return null}set nodeValue(e){}get textContent(){return null}set textContent(e){}lookupPrefix(e){return Z(arguments,1),this.documentElement!==null?this.documentElement.lookupPrefix(e):null}lookupNamespaceURI(e){return Z(arguments,1),this.documentElement===null?null:this.documentElement.lookupNamespaceURI(e)}get children(){return Ro(this)}prepend(...e){jo(this,e)}append(...e){Lo(this,e)}replaceChildren(...e){Bo(this,e)}constructor(){super(),this.firstElementChild=null,this.lastElementChild=null,this.childElementCount=0,this.implementation=new wr(this),this.doctype=null,this.documentElement=null}getElementsByTagName(e){return Z(arguments,1),As(e=String(e),this)}getElementsByTagNameNS(e,n){return Z(arguments,2),Ds(e=Xt(e),n=String(n),this)}createElement(e){return Z(arguments,1),Pe(e=String(e))||Ae("The local name is not a valid Name"),$e(this,e,null,null)}createElementNS(e,n){return Z(arguments,2),wa(this,e=Xt(e),n=String(n))}createDocumentFragment(){let e=new(at()).DocumentFragment;return e.ownerDocument=this,e}createTextNode(e){Z(arguments,1),e=String(e);let n=new(at()).Text(e);return n.ownerDocument=this,n}createCDATASection(e){Z(arguments,1),(e=String(e)).indexOf("]]>")>=0&&Ae('Data must not contain the string "]]>"');let n=new(at()).CDATASection(e);return n.ownerDocument=this,n}createComment(e){Z(arguments,1),e=String(e);let n=new(at()).Comment(e);return n.ownerDocument=this,n}createProcessingInstruction(e,n){Z(arguments,2),e=String(e),n=String(n),Pe(e)||Ae("The target is not a valid Name"),n.indexOf("?>")>=0&&Ae('Data must not contain the string "?>"');let r=new(at()).ProcessingInstruction(e,n);return r.ownerDocument=this,r}importNode(e,n=!1){return Z(arguments,1),ot(e=yt(e,K),9)&&wo("importing a Document node is not supported"),Po(e,n,this)}adoptNode(e){return Z(arguments,1),ot(e=yt(e,K),9)&&wo("adopting a Document node is not supported"),br(e,this),e}createAttribute(e){Z(arguments,1),Pe(e=String(e))||Ae("The local name is not a valid Name");let n=new(at()).Attr(null,null,e,"",null);return n.ownerDocument=this,n}createAttributeNS(e,n){Z(arguments,2),e=Xt(e),n=String(n);let{namespace:r,prefix:o,localName:i}=Ho(e,n),s=new(at()).Attr(r,o,i,"",null);return s.ownerDocument=this,s}createRange(){let e=new(at()).Range;return e.startContainer=this,e.startOffset=0,e.endContainer=this,e.endOffset=0,e}T(e){return new(at()).Document}},Ao=class extends K{get nodeType(){return 11}get nodeName(){return"#document-fragment"}get nodeValue(){return null}set nodeValue(e){}get textContent(){return zs(this)}set textContent(e){js(this,e=un(e))}lookupPrefix(e){return Z(arguments,1),null}lookupNamespaceURI(e){return Z(arguments,1),null}get children(){return Ro(this)}prepend(...e){jo(this,e)}append(...e){Lo(this,e)}replaceChildren(...e){Bo(this,e)}constructor(){super(),this.firstElementChild=null,this.lastElementChild=null,this.childElementCount=0;let e=at();this.ownerDocument=e.document}T(e){let n=new(at()).DocumentFragment;return n.ownerDocument=e,n}},Do=class extends Dn{get nodeType(){return 7}get nodeName(){return this.target}constructor(e,n){super(n),this.target=e}T(e){let n=new(at()).ProcessingInstruction(this.target,this.data);return n.ownerDocument=e,n}};function Is(t,e){if(t.collapsed)return;let n=ue(t.startContainer),r=ue(t.endContainer),o=0;for(;o<n.length&&o<r.length&&n[o]===r[o];)++o;let i=t.endContainer.childNodes[t.endOffset]||null;for(let s=t.startContainer.childNodes[t.startOffset]||null;s&&s!==i&&s!==r[n.length];s=s.nextSibling)e(s);for(let s=n.length-1;s>=o;--s)for(let a=n[s].nextSibling;a&&a!==i&&a!==r[s];a=a.nextSibling)e(a);for(let s=o;s<r.length;++s)for(let a=r[s].firstChild;a&&a!==i&&a!==r[s+1];a=a.nextSibling)e(a)}function An(t,e){let n=Zt(t.startContainer),r=n.createDocumentFragment();if(t.collapsed)return r;let o=t.startContainer,i=t.startOffset,s=t.endContainer,a=t.endOffset;if(o===s&&an(o)){let C=o.cloneNode();return C.data=o.substringData(i,a-i),ee(C,r),e||o.replaceData(i,a-i,""),r}let l=ue(t.startContainer),u=ue(t.endContainer),h=0;for(;h<l.length&&h<u.length&&l[h]===u[h];)++h;let d=h===l.length,w=h===u.length,f=null;d||(f=l[h]);let g=null;w||(g=u[h]);let m=[],y=f?f.nextSibling:o.childNodes[i],v=g||s.childNodes[a]||null;for(var _=y;_&&_!==v;_=_.nextSibling)ot(_,10)&&vt(e?"Can not clone a doctype using cloneContents":"Can not extract a doctype using extractContents"),m.push(_);let T,D;if(d||e)T=o,D=i;else{let C=l[h];T=C.parentNode,D=1+wt(C)}if(f!==null&&an(f)){let C=f.cloneNode();C.data=f.substringData(i,f.length-i),ee(C,r),e||f.replaceData(i,f.length-i,"")}else if(f!==null){let C=f.cloneNode();ee(C,r);let F=n.createRange();F.setStart(o,i),F.setEnd(f,Ie(f));let N=An(F,e);F.detach(),ee(N,C)}if(m.forEach((C=>{ee(e?C.cloneNode(!0):C,r)})),g&&an(g)){let C=g.cloneNode();C.data=g.substringData(0,a),ee(C,r),e||g.replaceData(0,a,"")}else if(g!==null){let C=g.cloneNode();ee(C,r);let F=n.createRange();F.setStart(g,0),F.setEnd(s,a);let N=An(F,e);F.detach(),ee(N,C)}return e||(t.setStart(T,D),t.collapse(!0)),r}var Ue=class t{get collapsed(){return(e=this).startContainer===e.endContainer&&e.startOffset===e.endOffset;var e}constructor(){let e=at();this.startContainer=e.document,this.startOffset=0,this.endContainer=e.document,this.endOffset=0,e.addRange(this)}get commonAncestorContainer(){let e=ue(this.startContainer),n=ue(this.endContainer),r=e[0],o=0;for(;o<e.length&&o<n.length&&e[o]===n[o];)r=e[o],++o;return r}setStart(e,n){Z(arguments,2),e=yt(e,K),n=we(n),ot(e,10)&&re("Can not set a range under a doctype node"),n>Ie(e)&&Me("Can not set a range past the end of the node"),Be(this)===en(e)&&te(e,n,this.endContainer,this.endOffset)!==In||(this.endContainer=e,this.endOffset=n),this.startContainer=e,this.startOffset=n}setEnd(e,n){Z(arguments,2),e=yt(e,K),n=we(n),ot(e,10)&&re("Can not set a range under a doctype node"),n>Ie(e)&&Me("Can not set a range past the end of the node"),Be(this)===en(e)&&te(e,n,this.startContainer,this.startOffset)!==Nn||(this.startContainer=e,this.startOffset=n),this.endContainer=e,this.endOffset=n}setStartBefore(e){Z(arguments,1);let n=(e=yt(e,K)).parentNode;if(n===null)return re("Can not set range before node without a parent");this.setStart(n,wt(e))}setStartAfter(e){Z(arguments,1);let n=(e=yt(e,K)).parentNode;if(n===null)return re("Can not set range before node without a parent");this.setStart(n,wt(e)+1)}setEndBefore(e){Z(arguments,1);let n=(e=yt(e,K)).parentNode;if(n===null)return re("Can not set range before node without a parent");this.setEnd(n,wt(e))}setEndAfter(e){Z(arguments,1);let n=(e=yt(e,K)).parentNode;if(n===null)return re("Can not set range before node without a parent");this.setEnd(n,wt(e)+1)}collapse(e=!1){e?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=this.endOffset)}selectNode(e){Z(arguments,1);let n=(e=yt(e,K)).parentNode;if(n===null)return re("Can not select node with null parent");let r=wt(e);this.startContainer=n,this.startOffset=r,this.endContainer=n,this.endOffset=r+1}selectNodeContents(e){Z(arguments,1),ot(e=yt(e,K),10)&&re("Can not place range inside a doctype node");let n=Ie(e);this.startContainer=e,this.startOffset=0,this.endContainer=e,this.endOffset=n}compareBoundaryPoints(e,n){switch(Z(arguments,2),n=yt(n,t),e!==t.START_TO_START&&e!==t.START_TO_END&&e!==t.END_TO_END&&e!==t.END_TO_START&&wo("Unsupported comparison type"),Be(this)!==Be(n)&&ms("Can not compare positions of ranges in different trees"),e){case t.START_TO_START:return te(this.startContainer,this.startOffset,n.startContainer,n.startOffset);case t.START_TO_END:return te(this.endContainer,this.endOffset,n.startContainer,n.startOffset);case t.END_TO_END:return te(this.endContainer,this.endOffset,n.endContainer,n.endOffset);default:return te(this.startContainer,this.startOffset,n.endContainer,n.endOffset)}}deleteContents(){if(this.collapsed)return;let e=this.startContainer,n=this.startOffset,r=this.endContainer,o=this.endOffset;if(e===r&&an(e))return void e.replaceData(n,o-n,"");let i=[],s,a;if(Is(this,(l=>{i.push(l)})),e.contains(r))s=e,a=n;else{let l=e;for(;l.parentNode!==null&&!l.parentNode.contains(r);)l=l.parentNode;s=l.parentNode,a=1+wt(l)}an(e)&&e.replaceData(n,e.length-n,""),i.forEach((l=>{ce(l)})),an(r)&&r.replaceData(0,o,""),this.setStart(s,a),this.collapse(!0)}extractContents(){return An(this,!1)}cloneContents(){return An(this,!0)}insertNode(e){Z(arguments,1),gs(e=yt(e,K),this)}surroundContents(e){Z(arguments,1),e=yt(e,K),(Ne(this.startContainer)?this.startContainer.parentNode:this.startContainer)!==(Ne(this.endContainer)?this.endContainer.parentNode:this.endContainer)&&$s("Can not use surroundContents on a range that has partially selected a non-Text node"),ot(e,9,10,11)&&re("Can not use Document, DocumentType, or DocumentFragment as a parent node in surroundContents");let n=An(this,!1);e.firstChild&&zo(null,e),gs(e,this),ee(n,e),this.selectNode(e)}cloneRange(){let e=new(at()).Range;return e.startContainer=this.startContainer,e.startOffset=this.startOffset,e.endContainer=this.endContainer,e.endOffset=this.endOffset,e}detach(){at().removeRange(this)}isPointInRange(e,n){return Z(arguments,2),e=yt(e,K),n=we(n),en(e)===Be(this)&&(ot(e,10)&&re("Point can not be under a doctype"),n>Ie(e)&&Me("Offset should not be past the end of node"),te(e,n,this.startContainer,this.startOffset)!==Nn&&te(e,n,this.endContainer,this.endOffset)!==In)}comparePoint(e,n){return Z(arguments,2),e=yt(e,K),n=we(n),en(e)!==Be(this)&&ms("Can not compare point to range in different trees"),ot(e,10)&&re("Point can not be under a doctype"),n>Ie(e)&&Me("Offset should not be past the end of node"),te(e,n,this.startContainer,this.startOffset)===Nn?-1:te(e,n,this.endContainer,this.endOffset)===In?1:0}intersectsNode(e){if(Z(arguments,1),en(e=yt(e,K))!==Be(this))return!1;let n=e.parentNode;if(n===null)return!0;let r=wt(e);return te(n,r,this.endContainer,this.endOffset)===Nn&&te(n,r+1,this.startContainer,this.startOffset)===In}toString(){let e=[],n=this.startContainer;if(Ne(n)){if(this.startContainer===this.endContainer)return n.substringData(this.startOffset,this.endOffset-this.startOffset);e.push(n.substringData(this.startOffset,n.length-this.startOffset))}Is(this,(o=>{hn(o,(i=>{Ne(i)&&e.push(i.data)}))}));let r=this.endContainer;return Ne(r)&&e.push(r.substringData(0,this.endOffset)),e.join("")}};Ue.START_TO_START=0,Ue.START_TO_END=1,Ue.END_TO_END=2,Ue.END_TO_START=3;var Nn=-1,In=1;function te(t,e,n,r){if(t!==n){let o=ue(t),i=ue(n);for(;o[0]&&i[0]&&o[0]===i[0];)o.shift(),i.shift();o.length&&(e=wt(o[0])+.5),i.length&&(r=wt(i[0])+.5)}return e===r?0:e<r?Nn:In}function Be(t){return en(t.startContainer)}var $o=class extends pn{T(e){return new(at()).XMLDocument}};function ei(t){let e=[];return ga(t=yt(t,K),!0,e),e.join("")}var ef=new pn;Ut.document=ef,Ut.Attr=Xe,Ut.CDATASection=_o,Ut.Comment=So,Ut.Document=pn,Ut.DocumentFragment=Ao,Ut.DocumentType=ur,Ut.DOMImplementation=wr,Ut.Element=Io,Ut.ProcessingInstruction=Do,Ut.Range=Ue,Ut.Text=cr,Ut.XMLDocument=$o;function ba(t){if(typeof t!="string"||t.length===0)throw new Error(`invalid part path: must be non-empty string, got: ${JSON.stringify(t)}`);if(t.startsWith("/"))throw new Error(`invalid part path: must not start with '/', got: ${t}`)}function xa(t){if(typeof t!="string"||t.length===0)throw new Error("invalid contentType: must be non-empty string")}function nf(t){if(ba(t.path),xa(t.contentType),!t.xmlDom)throw new Error(`createXmlPart: xmlDom required for ${t.path}`);return{path:t.path,contentType:t.contentType,xmlDom:t.xmlDom,_originalBytes:t.originalBytes,_dirty:t.originalBytes===void 0}}function ya(t){var e;if(ba(t.path),xa(t.contentType),!t.bytes)throw new Error(`createBinaryPart: bytes required for ${t.path}`);return{path:t.path,contentType:t.contentType,bytes:t.bytes,_originalBytes:(e=t.originalBytes)!=null?e:t.bytes,_dirty:!1}}function rf(){return{parts:new Map}}function ni(t,e){t.parts.set(e.path,e)}var Cr="http://schemas.microsoft.com/office/2006/xmlPackage",sf="[Content_Types].xml";function af(t){return t.endsWith("+xml")||t==="application/xml"||t==="text/xml"}function lf(t){let e=t.replace(/\s+/g,""),n=atob(e),r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r}function cf(t){let e=t.childNodes;for(let n=0;n<e.length;n++){let r=e[n];if(r&&r.nodeType===1)return r}return null}function va(t){var e;let n=Mn(t),r=rf(),o=n.getElementsByTagNameNS(Cr,"part");for(let i=0;i<o.length;i++){let s=o[i];if(!s)continue;let a=s.getAttributeNS(Cr,"name"),l=s.getAttributeNS(Cr,"contentType");if(!a||!l)throw new Error("fromFlatOpc: <pkg:part> missing name or contentType");let u=a.replace(/^\//,"");if(!u||u===sf)continue;let h=null,d=null,w=s.childNodes;for(let f=0;f<w.length;f++){let g=w[f];if(!g||g.nodeType!==1)continue;let m=g;m.namespaceURI===Cr&&(m.localName==="xmlData"&&!h?h=m:m.localName==="binaryData"&&!d&&(d=m))}if(h){let f=cf(h);if(!f)throw new Error(`fromFlatOpc: empty <pkg:xmlData> for part '${u}'`);let g=ei(f),m=new TextEncoder().encode(g),y=Mn(g);ni(r,nf({path:u,contentType:l,xmlDom:y,originalBytes:m}))}else if(d){let f=(e=d.textContent)!=null?e:"",g=lf(f);ni(r,ya({path:u,contentType:l,bytes:g}))}else{if(af(l))throw new Error(`fromFlatOpc: XML part '${u}' has no <pkg:xmlData>`);ni(r,ya({path:u,contentType:l,bytes:new Uint8Array}))}}return r}var he={header:"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",footer:"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",footnotes:"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml",endnotes:"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml",comments:"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",commentsExtended:"application/vnd.ms-word.commentsExtended+xml"},Er={header:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",footer:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"},_a=["comments","headersFooters","notes","bookmarks","media","drawings"];function Ca(t){if(t?._originalBytes)return new TextDecoder().decode(t._originalBytes);if(!t?.xmlDom?.documentElement)throw new Error("flatOpcToOnlyOfficeWriteback: missing XML DOM for word/document.xml");if(typeof XMLSerializer!="function")throw new Error("flatOpcToOnlyOfficeWriteback: XMLSerializer is unavailable and part has no original bytes");return new XMLSerializer().serializeToString(t.xmlDom.documentElement)}function uf(t){return{domain:t,present:!1,count:0,parts:[],status:"pending"}}function ze(t){return t?Ca(t):""}function me(t){return t?typeof t.text=="string"?t.text:(t.kids||[]).map(me).join(""):""}function ff(t){if(!t)return new Map;let e=Et(t),n=new Map;for(let r of Jt(e,"w:comment")){let o=String(r.attrs?.["w:id"]??"");o&&n.set(o,{id:o,author:String(r.attrs?.["w:author"]??""),date:String(r.attrs?.["w:date"]??""),text:me(r)})}return n}function df(t){if(!t)return new Map;let e=Et(t),n=ht(e,"w:body"),r=new Map,o=new Map;function i(s,a=""){if(!(!s||typeof s!="object")){if(s.tag==="w:p"){let l=me(s);for(let u of s.kids||[])i(u,l);return}if(s.tag==="w:commentRangeStart"){let l=String(s.attrs?.["w:id"]??"");l&&o.set(l,{anchorText:"",paragraphText:a});return}if(s.tag==="w:commentRangeEnd"){let l=String(s.attrs?.["w:id"]??"");l&&o.has(l)&&(r.set(l,o.get(l)),o.delete(l));return}if(s.tag==="w:t"){let l=me(s);for(let u of o.values())u.anchorText+=l;return}for(let l of s.kids||[])i(l,a)}}return i(n||e),r}function pf(t,e){let n=t.parts.get("word/comments.xml");if(!n)return[];let r=ff(ze(n)),o=df(e);return[...r.values()].map(i=>{let s=o.get(i.id);return{...i,anchorText:s?.anchorText??"",paragraphText:s?.paragraphText??""}})}function Sa(t,e,n,r){if(!n)return new Map;let o=Et(si(t,e,n)),i=r==="endnote"?"w:endnote":"w:footnote",s=new Map;for(let a of Jt(o,i)){let l=String(a.attrs?.["w:id"]??"");if(!l)continue;let u=String(a.attrs?.["w:type"]??"");if(u==="separator"||u==="continuationSeparator"||Number(l)<1)continue;let d=(a?.kids||[]).filter(w=>w?.tag==="w:p"||w?.tag==="w:tbl").map(w=>ai(w)).join("");s.set(l,{kind:r,id:l,type:u,text:me(a),bodyJson:Ve(`<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><w:body>${d}</w:body></w:document>`).doc})}return s}function hf(t){if(!t)return new Map;let e=Et(t),n=ht(e,"w:body"),r=new Map;function o(s){let a="";function l(u){if(!(!u||typeof u!="object")){if(u.tag==="w:t"||u.tag==="w:delText"){a+=me(u);return}if(u.tag==="w:footnoteReference"||u.tag==="w:endnoteReference"){let h=String(u.attrs?.["w:id"]??""),d=u.tag==="w:endnoteReference"?"endnote":"footnote";h&&r.set(`${d}:${h}`,a.trim());return}for(let h of u.kids||[])l(h)}}l(s)}function i(s){if(!(!s||typeof s!="object")){if(s.tag==="w:p"){o(s);return}for(let a of s.kids||[])i(a)}}return i(n||e),r}function mf(t,e){let n=hf(e);return[...Sa(t,"word/footnotes.xml",ze(t.parts.get("word/footnotes.xml")),"footnote").values(),...Sa(t,"word/endnotes.xml",ze(t.parts.get("word/endnotes.xml")),"endnote").values()].map(o=>({...o,anchorText:n.get(`${o.kind}:${o.id}`)??""}))}function gf(t){if(!t)return[];let e=Et(t),n=ht(e,"w:body"),r=new Map,o=[];function i(s){if(!(!s||typeof s!="object")){if(s.tag==="w:bookmarkStart"){let a=String(s.attrs?.["w:id"]??""),l=String(s.attrs?.["w:name"]??"");a&&l&&!l.startsWith("_")&&r.set(a,{id:a,name:l,anchorText:""});return}if(s.tag==="w:bookmarkEnd"){let a=String(s.attrs?.["w:id"]??""),l=r.get(a);l&&(o.push({...l,anchorText:l.anchorText.trim()}),r.delete(a));return}if(s.tag==="w:t"||s.tag==="w:delText"){let a=me(s);for(let l of r.values())l.anchorText+=a;return}for(let a of s.kids||[])i(a)}}return i(n||e),o.filter(s=>s.name&&s.anchorText)}function _e(t){return String(t||"").replace(/^\/+/,"")}function wf(t){let e=String(t||"").replace(/^\/+/,"");return e?e.startsWith("word/")?e:`word/${e}`:""}function ii(t){let e=t.parts.get("word/_rels/document.xml.rels");if(!e)return new Map;let n=Et(ze(e)),r=new Map;for(let o of Jt(n,"Relationship")){let i=String(o.attrs?.Id??"");i&&r.set(i,{id:i,type:String(o.attrs?.Type??""),target:String(o.attrs?.TargetMode??"")==="External"?String(o.attrs?.Target??""):wf(o.attrs?.Target),targetMode:String(o.attrs?.TargetMode??"")})}return r}function yf(t,e){let n=Et(t),r=ht(n,"w:body"),o=[];function i(s){if(!(!s||typeof s!="object")){if(s.tag==="w:headerReference"||s.tag==="w:footerReference"){let a=String(s.attrs?.["r:id"]??""),l=e.get(a);l&&o.push({kind:l.type===Er.footer?"footer":"header",type:String(s.attrs?.["w:type"]??"default"),relId:a,partPath:l.target});return}for(let a of s.kids||[])i(a)}}return i(r||n),o}function bf(t){let e=Et(t),n=ht(e,"w:body"),r=[],o=n?.kids||[],i=-1;for(let a of o){if(!a||typeof a!="object"||a.tag==="w:sectPr"||a.tag!=="w:p"&&a.tag!=="w:tbl")continue;i++;let l=ht(a,"w:pPr"),u=ht(l,"w:sectPr");u&&r.push({node:u,boundary:"paragraph",endBlockIndex:i})}let s=ht(n,"w:sectPr");return s&&r.push({node:s,boundary:"body",endBlockIndex:Math.max(0,i)}),r}function Ta(t,e,n){let r=n==="footer"?"w:footerReference":"w:headerReference",o=n==="footer"?Er.footer:Er.header,i=new Map;for(let s of Jt(t,r)){let a=String(s.attrs?.["w:type"]??"default"),l=String(s.attrs?.["r:id"]??""),u=e.get(l);i.set(a,{kind:n,type:a,relId:l,partPath:u?u.target:"",relFound:!!u,relTypeMatches:!!u&&u.type===o})}return i}function ka(t,e,n,r){let o=e.get(n);if(!o)return r===0?{state:"empty",type:n}:{state:"inherited",type:n,inheritedFrom:r-1};let i=_e(o.partPath),s=i?t.parts.get(i):null,a=ze(s),l=s?me(Et(a)):"";return{state:l?"own":"empty",type:n,relId:o.relId,partPath:i,text:l,bodyJson:s?vf(t,i,a):void 0,unsupportedFields:s?xf(a):[],relFound:o.relFound,relTypeMatches:o.relTypeMatches,partFound:!!s}}function xf(t){if(!t)return[];let e=Et(t),n=[],r=0;function o(i){if(!(!i||typeof i!="object")){if(i.tag==="w:instrText"){let s=me(i).trim().replace(/\s+/g," "),a=s.split(/\s+/)[0]?.toUpperCase()??"";["DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE"].includes(a)&&n.push({index:r++,fieldType:a,instruction:s,unsupportedReason:"dynamic-date-field"})}for(let s of i.kids||[])o(s)}}return o(e),n}function vf(t,e,n){if(!n)return;let i=(Et(si(t,e,n))?.kids||[]).filter(s=>s?.tag==="w:p"||s?.tag==="w:tbl").map(s=>ai(s)).join("");return Ve(`<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><w:body>${i}</w:body></w:document>`).doc}function si(t,e,n){let r=Oa(t,e);return String(n).replace(/<w:drawing[\s\S]*?<\/w:drawing>/g,o=>{let i=Tf(t,r,o);return i?`<oo:ci oo:v="${z(JSON.stringify(i))}"/>`:o})}function Oa(t,e){let n=_f(e),r=t.parts.get(n);if(!r)return new Map;let o=Et(ze(r)),i=new Map;for(let s of Jt(o,"Relationship")){let a=String(s.attrs?.Id??"");if(!a)continue;let l=String(s.attrs?.TargetMode??"");i.set(a,{id:a,type:String(s.attrs?.Type??""),target:l==="External"?String(s.attrs?.Target??""):Sf(e,s.attrs?.Target),targetMode:l})}return i}function _f(t){let e=_e(t),n=e.lastIndexOf("/");return n<0?`_rels/${e}.rels`:`${e.slice(0,n)}/_rels/${e.slice(n+1)}.rels`}function Sf(t,e){let n=String(e||"").trim();if(!n)return"";if(n.startsWith("/"))return _e(n);let r=_e(t).split("/").slice(0,-1);for(let o of n.split("/"))!o||o==="."||(o===".."?r.pop():r.push(o));return r.join("/")}function Tf(t,e,n){let r=Ea(t,"unknown",0,e,n);if(r.status!=="inlined")return null;let o=Et(n),i=Fe(o,"wp:extent")||Fe(o,"a:ext"),s=Fe(o,"wp:docPr"),a=Or(i?.attrs?.cx)||1,l=Or(i?.attrs?.cy)||1;return{type:"paraDrawing",docPr:{id:Or(s?.attrs?.id)||1,name:String(s?.attrs?.name??"Picture"),descr:s?.attrs?.descr==null?void 0:String(s.attrs.descr),title:s?.attrs?.title==null?void 0:String(s.attrs.title)},effectExtent:{l:0,t:0,r:0,b:0},extent:{cx:a,cy:l},graphic:{type:"image",id:"",extX:0,extY:0,nvPicPr:{cNvPr:{id:Or(s?.attrs?.id)||1,name:String(s?.attrs?.name??"Picture"),descr:s?.attrs?.descr==null?null:String(s.attrs.descr),title:s?.attrs?.title==null?null:String(s.attrs.title),hidden:null},nvPr:{isPhoto:null,userDrawn:null},cNvPicPr:{picLocks:{noChangeAspect:!0}}},blipFill:{type:"blipFill",blip:[],srcRect:null,tile:null,stretch:{fillRect:null},rotWithShape:null,rasterImageId:r.rasterImageId},spPr:{fill:null,ln:null,effectDag:null,effectLst:null,xfrm:{ext:{cx:a,cy:l},off:{x:0,y:0},flipH:null,flipV:null,rot:null,chOffX:null,chOffY:null,chExtX:null,chExtY:null},bwMode:0}},cNvGraphicFramePr:{graphicFrameLocks:{noChangeAspect:!0}},positionH:{relativeFrom:"column",posOffset:0,percent:!1},positionV:{relativeFrom:"paragraph",posOffset:0,percent:!1},simplePos:{x:0,y:0,use:!1},distB:0,distL:0,distR:0,distT:0,allowOverlap:!0,behindDoc:!1,hidden:null,layoutInCell:!0,locked:!1,relativeHeight:0,wrapType:"none",drawingType:"inline"}}function Ea(t,e,n,r,o){let i=Et(o),s=Fe(i,"wp:inline"),a=Fe(i,"wp:anchor"),l=Fe(i,"a:graphicData"),u=Fe(i,"a:blip"),h=String(u?.attrs?.["r:embed"]??""),d=String(u?.attrs?.["r:link"]??""),w=h||d,f=w?r.get(w):null,g=f?.target?t.parts.get(f.target):null,m={partPath:_e(e),index:n,drawingType:a?"anchor":s?"inline":"unknown",relationshipId:w,relationshipType:f?.type??"",target:f?.target??"",targetMode:f?.targetMode??"",contentType:g?.contentType??"",graphicDataUri:String(l?.attrs?.uri??"")};if(a)return{...m,status:"unsupported",unsupportedReason:"floating-anchor"};if(!s)return{...m,status:"unsupported",unsupportedReason:"unknown-drawing-layout"};let y=kf(m.graphicDataUri,o);return y?{...m,status:"unsupported",unsupportedReason:y}:u?d||f?.targetMode==="External"?{...m,status:"unsupported",unsupportedReason:"external-image"}:f?f.type&&f.type!==Er.image?{...m,status:"unsupported",unsupportedReason:"non-image-relationship"}:g?.bytes?String(g.contentType||"").startsWith("image/")?m.graphicDataUri&&!m.graphicDataUri.includes("/picture")?{...m,status:"unsupported",unsupportedReason:"non-picture-graphic"}:{...m,status:"inlined",rasterImageId:`data:${g.contentType};base64,${Cf(g.bytes)}`}:{...m,status:"unsupported",unsupportedReason:"non-image-media"}:{...m,status:"unsupported",unsupportedReason:"missing-media-part"}:{...m,status:"unsupported",unsupportedReason:"missing-relationship"}:{...m,status:"unsupported",unsupportedReason:"missing-blip"}}function kf(t,e){let n=String(t||""),r=String(e||"");return!n||n.includes("/picture")?"":n.includes("/chart")?"chart-drawing":n.includes("/diagram")?"diagram-drawing":r.includes(":txbx")||r.includes("<w:txbxContent")?"text-box-drawing":n.includes("wordprocessingShape")||n.includes("/shape")?"shape-drawing":"non-picture-graphic"}function Fe(t,e){if(!t||typeof t!="object")return null;if(t.tag===e)return t;for(let n of t.kids||[]){let r=Fe(n,e);if(r)return r}return null}function Or(t){let e=Number(t);return Number.isFinite(e)?e:void 0}function Cf(t){if(typeof Buffer<"u")return Buffer.from(t).toString("base64");let e="";for(let n of t)e+=String.fromCharCode(n);return btoa(e)}function ai(t){if(!t||typeof t!="object")return"";if(typeof t.text=="string")return t.text.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");let e=Object.entries(t.attrs||{}).map(([r,o])=>` ${r}="${String(o).replace(/&/g,"&").replace(/"/g,""")}"`).join(""),n=(t.kids||[]).map(ai).join("");return`<${t.tag}${e}>${n}</${t.tag}>`}function Gt(t,e){if(!t?.attrs||t.attrs[e]==null)return;let n=Number(t.attrs[e]);return Number.isFinite(n)?n:void 0}function Of(t){let e=ht(t,"w:pgSz");if(!e)return;let n=Gt(e,"w:w"),r=Gt(e,"w:h");if(!(n==null&&r==null))return{width:n,height:r,orient:String(e.attrs?.["w:orient"]??"")}}function Ef(t){let e=ht(t,"w:pgMar");if(!e)return;let n={top:Gt(e,"w:top"),right:Gt(e,"w:right"),bottom:Gt(e,"w:bottom"),left:Gt(e,"w:left"),header:Gt(e,"w:header"),footer:Gt(e,"w:footer"),gutter:Gt(e,"w:gutter")};return Object.values(n).some(r=>r!=null)?n:void 0}function Nf(t){let e=ht(t,"w:pgNumType");if(!e)return;let r={start:Gt(e,"w:start"),fmt:String(e.attrs?.["w:fmt"]??""),chapStyle:String(e.attrs?.["w:chapStyle"]??""),chapSep:String(e.attrs?.["w:chapSep"]??"")};return Object.values(r).some(o=>o!==""&&o!=null)?r:void 0}function If(t){let e=ht(t,"w:cols");if(!e)return;let r=Jt(e,"w:col").map(i=>({width:Gt(i,"w:w"),space:Gt(i,"w:space")})),o={equalWidth:String(e.attrs?.["w:equalWidth"]??"1")!=="0",count:Gt(e,"w:num"),space:Gt(e,"w:space"),sep:String(e.attrs?.["w:sep"]??""),col:r};return o.count!=null||o.space!=null||r.length>0?o:void 0}function Af(t,e){let n=ii(t),r=bf(e),o=["default","first","even"];return r.map((i,s)=>{let a=i.node,l=Ta(a,n,"header"),u=Ta(a,n,"footer"),h=s>0?r[s-1].endBlockIndex:-1;return{index:s,startBlockIndex:Math.max(0,h+1),endBlockIndex:i.endBlockIndex,boundary:i.boundary,type:String(ht(a,"w:type")?.attrs?.["w:val"]??"nextPage"),titlePage:!!ht(a,"w:titlePg"),pageSize:Of(a),pageMargins:Ef(a),pageNumbering:Nf(a),columns:If(a),headers:Object.fromEntries(o.map(d=>[d,ka(t,l,d,s)])),footers:Object.fromEntries(o.map(d=>[d,ka(t,u,d,s)]))}})}function Df(t,e){let n=ii(t),r=yf(e,n),o=new Set,i=[];for(let s of r){let a=`${s.kind}|${s.type}|${s.partPath}`;if(o.has(a))continue;o.add(a);let l=t.parts.get(_e(s.partPath));l&&i.push({kind:s.kind,type:s.type,partPath:_e(s.partPath),text:me(Et(ze(l)))})}return i}function ri(t){if(Array.isArray(t))return t.filter(n=>!["commentRangeStart","commentRangeEnd","commentReference"].includes(n?.type)).map(ri);if(!t||typeof t!="object")return t;let e={};for(let[n,r]of Object.entries(t))e[n]=ri(r);return e}function oi(t){if(Array.isArray(t))return t.filter(n=>!["bookmarkStart","bookmarkEnd"].includes(n?.type)).map(oi);if(!t||typeof t!="object")return t;let e={};for(let[n,r]of Object.entries(t))e[n]=oi(r);return e}function yn(t,e,n){let r=t[e];r.present=!0,r.count+=1,r.parts.push({path:n.path,contentType:n.contentType})}function $f(t){return[...String(t||"").matchAll(/<w:drawing[\s\S]*?<\/w:drawing>/g)].map(e=>e[0])}function Pf(t){return t?.path==="word/document.xml"||t?.contentType===he.header||t?.contentType===he.footer||t?.contentType===he.footnotes||t?.contentType===he.endnotes}function Rf(t){let e=[];for(let n of t.parts.values()){if(!Pf(n))continue;let r=_e(n.path),o=Oa(t,r),i=ze(n);$f(i).forEach((s,a)=>{e.push(Ea(t,r,a,o,s))})}return e}function Ff(t){let{rasterImageId:e,...n}=t;return n}function zf(t,e){let n=Rf(t);n.length>0&&(e.drawings.present=!0,e.drawings.count=n.length,e.drawings.items=n.map(Ff),e.drawings.inlinedCount=n.filter(o=>o.status==="inlined").length,e.drawings.unsupportedCount=n.filter(o=>o.status==="unsupported").length,e.drawings.status=e.drawings.unsupportedCount>0?"pending":"payload-ready");let r=[...t.parts.values()].filter(o=>o.path.startsWith("word/media/")).map(o=>{let i=_e(o.path),s=n.filter(u=>u.target===i),a=s.filter(u=>u.status==="unsupported"),l=s.filter(u=>u.status==="inlined");return{path:i,contentType:o.contentType,status:s.length===0?"unreferenced":a.length>0?"referenced-by-unsupported-drawing":"inlined",references:s.map(u=>({partPath:u.partPath,index:u.index,drawingType:u.drawingType,status:u.status,unsupportedReason:u.unsupportedReason})),inlinedReferences:l.length,unsupportedReferences:a.length}});r.length>0&&(e.media.items=r,e.media.inlinedCount=r.filter(o=>o.status==="inlined").length,e.media.unsupportedCount=r.filter(o=>o.status!=="inlined").length,e.media.status=e.media.unsupportedCount>0?"pending":"payload-ready")}function jf(t,e){return e.present?t==="media"||t==="drawings"?Number(e.unsupportedCount||0)>0:!0:!1}function Lf(t){let e=[];for(let n of t.drawings.items||[])n.status==="unsupported"&&e.push({domain:"drawings",partPath:n.partPath,index:n.index,status:n.status,reason:n.unsupportedReason,drawingType:n.drawingType,relationshipId:n.relationshipId,target:n.target,targetMode:n.targetMode,contentType:n.contentType,graphicDataUri:n.graphicDataUri});for(let n of t.media.items||[])n.status!=="inlined"&&e.push({domain:"media",partPath:n.path,status:n.status,reason:n.status,contentType:n.contentType,references:n.references});for(let n of t.headersFooters.sections||[]){let r=n.pageNumbering;r&&(r.fmt||r.chapStyle||r.chapSep)&&e.push({domain:"headersFooters",index:n.index,status:"unsupported",reason:"page-numbering-format",property:"pageNumbering",value:{fmt:r.fmt,chapStyle:r.chapStyle,chapSep:r.chapSep}});for(let o of["headers","footers"])for(let i of Object.values(n[o]||{}))for(let s of i.unsupportedFields||[])e.push({domain:"headersFooters",partPath:i.partPath,index:s.index,status:"unsupported",reason:s.unsupportedReason,fieldType:s.fieldType,instruction:s.instruction})}return e}function Bf(t){if(t.length===0)return"";let e=new Map;for(let n of t){let r=`${n.domain}:${n.reason||n.status||"unsupported"}`;e.set(r,(e.get(r)||0)+1)}return[...e.entries()].map(([n,r])=>`${n}=${r}`).join(", ")}function Mf(t){let e=Object.fromEntries(_a.map(r=>[r,uf(r)]));for(let r of t.parts.values())r.contentType===he.comments&&yn(e,"comments",r),r.contentType===he.commentsExtended&&yn(e,"comments",r),(r.contentType===he.header||r.contentType===he.footer)&&yn(e,"headersFooters",r),(r.contentType===he.footnotes||r.contentType===he.endnotes)&&yn(e,"notes",r),r.path.startsWith("word/media/")&&yn(e,"media",r),(r.path.startsWith("word/drawings/")||r.path.includes("/drawings/"))&&yn(e,"drawings",r);zf(t,e);let n=_a.filter(r=>jf(r,e[r]));return{gaps:e,unsupportedDomains:n}}function Na(t,e={}){let n=va(t),r=n.parts.get("word/document.xml"),o=Ca(r),{gaps:i,unsupportedDomains:s}=Mf(n),a=pf(n,o);a.length>0&&(i.comments.items=a,i.comments.status="payload-ready");let l=mf(n,o);l.length>0&&(i.notes.items=l,i.notes.status="payload-ready");let u=gf(o);u.length>0&&(i.bookmarks.present=!0,i.bookmarks.count=u.length,i.bookmarks.items=u,i.bookmarks.status="payload-ready");let h=Df(n,o),d=Af(n,o);h.length>0&&(i.headersFooters.items=h,i.headersFooters.status="payload-ready"),d.length>0&&(i.headersFooters.sections=d,i.headersFooters.status="payload-ready");let w=[];s.length>0&&w.push(`OnlyOffice writeback adapter produced bodyJson only; gap domains pending rehydration: ${s.join(", ")}`);let f=Lf(i),g=Bf(f);g&&w.push(`OnlyOffice writeback unsupported items: ${g}`);let m=si(n,"word/document.xml",o),y=oi(ri(Ve(m,void 0,{relationships:ii(n)}).doc));if(e.failOnUnsupported===!0&&s.length>0)throw new Error(`OnlyOffice writeback has unsupported gap domains: ${s.join(", ")}`);return{bodyJson:y,gaps:i,diagnostics:{warnings:w,unsupportedDomains:s,unsupportedItems:f}}}function Nr(t){return t==null?t:JSON.parse(JSON.stringify(t))}function Uf(t,e="ONLYOFFICE PPT content JSON"){if(typeof t=="string")try{return JSON.parse(t)}catch(n){throw new Error(`${e}: invalid JSON string: ${n?.message||n}`)}if(!t||typeof t!="object")throw new Error(`${e}: expected object or JSON string`);return Nr(t)}function Xf(t){if(typeof t!="string")return;let e=t.trim().replace(/^#/,"");if(/^[0-9a-fA-F]{6}$/.test(e))return`#${e.toUpperCase()}`}function Wf(t){if(!t||t.auto)return;let e=t.fill?.color?.color?.rgba||t.color?.rgba||t.rgba||t.fill?.color?.rgba,n=Number(t.r??e?.red),r=Number(t.g??e?.green),o=Number(t.b??e?.blue);if(![n,r,o].every(s=>Number.isFinite(s)))return;let i=s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0").toUpperCase();return`#${i(n)}${i(r)}${i(o)}`}function Aa(t){let e=Xf(t);if(e)return{auto:!1,r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}}function Hf(t,e){let n=Aa(t);if(!n)return;let r={red:n.r,green:n.g,blue:n.b,alpha:255};return{fill:{color:{rgba:r,color:{rgba:r,type:"srgb"},type:"uniColor"},type:"solid"},transparent:e&&Object.prototype.hasOwnProperty.call(e,"transparent")?e.transparent:null,type:e?.type||"fill"}}function Zf(t={}){let e={},n=Wf(t.uniFill||t.color||t.fill?.color);n&&(e.color=n),typeof t.b=="boolean"&&(e.bold=t.b),typeof t.i=="boolean"&&(e.italic=t.i),t.u!=null&&(e.underline=t.u!==!1&&t.u!=="none"),typeof t.spacing=="number"&&(e.characterSpacing=t.spacing),typeof t.sz=="number"&&(e.fontSize=t.sz/2);let r=t.rFonts,o=r?.ascii||r?.hAnsi||r?.eastAsia||r?.cs;return o&&(e.fontFamily=o),e}function Se(t={},e={}){let n={...t,type:t.type||"textPr"},r=Aa(e.color);return r&&(n.color=r,n.uniFill=Hf(e.color,n.uniFill)),typeof e.bold=="boolean"&&(n.b=e.bold,n.bCs=e.bold),typeof e.italic=="boolean"&&(n.i=e.italic,n.iCs=e.italic),typeof e.underline=="boolean"&&(n.u=e.underline?"single":!1),typeof e.characterSpacing=="number"&&(n.spacing=e.characterSpacing),typeof e.fontSize=="number"&&(n.sz=e.fontSize*2,n.szCs=e.fontSize*2),e.fontFamily&&(n.rFonts={...n.rFonts||{},ascii:e.fontFamily,hAnsi:e.fontFamily,eastAsia:e.fontFamily,cs:e.fontFamily}),n}function bn(t){return t&&t.type==="paragraph"&&Array.isArray(t.content)}function li(t){return t&&t.type==="run"&&Array.isArray(t.content)}function Da(t){return Array.isArray(t)?t.map(e=>typeof e=="string"?e:e?.type==="tab"?" ":e?.type==="break"?`
|
|
10
|
+
`:"").join(""):""}function $a(t,e){for(let n of t.content||[])if(li(n)&&e(n,t),n?.type==="hyperlink"&&Array.isArray(n.content))for(let r of n.content)li(r)&&e(r,t)}function Ir(t){let e=[];for(let n of t.content||[])bn(n)&&$a(n,(r,o)=>{let i=Da(r.content);i&&e.push({run:r,paragraph:o,text:i})});return e}function Ia(t,e={},n){return{bFromDocument:!0,footnotes:[],endnotes:[],reviewType:"common",...n?Nr(n):{},rPr:Se(n?.rPr||{bFromDocument:!0,type:"textPr"},e),content:[t||""],type:"run"}}function Gf(t,e={}){return{bFromDocument:!0,footnotes:[],endnotes:[],reviewType:"common",...t?Nr(t):{},rPr:Se(t?.rPr||{bFromDocument:!0,type:"textPr"},e),content:[],type:"endRun"}}function Pa(t={},e){let n=e&&bn(e)?Nr(e):void 0,r=n?.content?.find(li),o=n?.content?.find(s=>s?.type==="endRun"),i=Array.isArray(t.runs)&&t.runs.length?t.runs.map(s=>Ia(s.text||"",s.style||t.style||{},r)):[Ia(t.text||"",t.style||{},r)];return{bFromDocument:!0,...n||{},pPr:{bFromDocument:!0,type:"paraPr",...n?.pPr||{}},rPr:Se(n?.rPr||{bFromDocument:!0,type:"textPr"},t.style||{}),content:[...i,Gf(o,t.style||{})],changes:n?.changes||[],type:"paragraph"}}function Ze(t){let e=Uf(t);if(e.type!=="docContent"&&e.type!=="documentContent")throw new Error(`ONLYOFFICE PPT content JSON: expected docContent/documentContent, got ${e.type||"unknown"}`);return Array.isArray(e.content)||(e.content=[]),e}function Ar(t){let e=Ze(t),n=[],r=[];for(let o of e.content||[]){if(!bn(o))continue;let i=[];$a(o,s=>{let a=Da(s.content);if(!a)return;let l={text:a,style:Zf(s.rPr||{})};i.push(l),r.push(l)}),n.push({text:i.map(s=>s.text).join(""),style:o.pPr?.jc?{alignment:o.pPr.jc}:void 0,runs:i})}return{text:n.map(o=>o.text).join(`
|
|
11
|
+
`),style:r[0]?.style,paragraphs:n}}function Un(t,e,n={}){let r=Ze(t),o=r.content.find(bn);return r.content=[Pa({text:String(e??""),style:n.style||{}},o)],r}function Xn(t,e){let n=Ze(t),r=n.content.filter(bn),o=Array.isArray(e)&&e.length?e:[{text:""}];return n.content=o.map((i,s)=>Pa(i||{},r[s]||r[0])),n}function Wn(t,e){let n=Ze(t);for(let r of n.content||[])if(bn(r)){r.rPr=Se(r.rPr||{bFromDocument:!0,type:"textPr"},e||{});for(let o of r.content||[])o?.type==="endRun"&&(o.rPr=Se(o.rPr||{bFromDocument:!0,type:"textPr"},e||{}))}for(let{run:r,paragraph:o}of Ir(n))o.rPr=Se(o.rPr||{bFromDocument:!0,type:"textPr"},e||{}),r.rPr=Se(r.rPr||{bFromDocument:!0,type:"textPr"},e||{});return n}function ci(t,e,n){let r=Ze(t),o=Ir(r);if(!Number.isInteger(e)||e<0||e>=o.length)throw new Error(`ONLYOFFICE PPT content JSON: runIndex out of range: ${e}`);let i=o[e].run,s=o[e].paragraph;return s.rPr=Se(s.rPr||{bFromDocument:!0,type:"textPr"},n||{}),i.rPr=Se(i.rPr||{bFromDocument:!0,type:"textPr"},n||{}),r}function ui(t,e,n,r=Number.POSITIVE_INFINITY){let o=Ze(t);if(e==null||e==="")return{content:o,count:0};let i=0;for(let{run:s}of Ir(o))s.content=(s.content||[]).map(a=>{if(typeof a!="string"||i>=r)return a;let l=a;for(;l.includes(e)&&i<r;)l=l.replace(e,n??""),i+=1;return l});return{content:o,count:i}}function Ra(t,e){if(!e||typeof e!="object")throw new Error("PPT mutation is required");switch(e.type){case"shape.text.set":return{content:Un(t,e.text),changedCount:1};case"shape.text.paragraphs.set":return{content:Xn(t,e.paragraphs),changedCount:Array.isArray(e.paragraphs)?e.paragraphs.length:0};case"shape.text.style.set":return{content:Wn(t,e.style),changedCount:Ir(Ze(t)).length};case"shape.text.run.style.set":return{content:ci(t,e.runIndex,e.style),changedCount:1};case"shape.text.replace":{let n=ui(t,e.search,e.replacement,e.count);return{content:n.content,changedCount:n.count}}default:throw new Error(`Unsupported PPT text mutation for ONLYOFFICE content bridge: ${e.type}`)}}function Jf(t){return t==null?t:JSON.parse(JSON.stringify(t))}function Vf(t,e="ONLYOFFICE PPT JSON"){if(typeof t=="string")try{return JSON.parse(t)}catch(n){throw new Error(`${e}: invalid JSON string: ${n?.message||n}`)}if(!t||typeof t!="object")throw new Error(`${e}: expected object or JSON string`);return Jf(t)}function Dr(t){let e=Vf(t,"ONLYOFFICE PPT deck JSON");if(!Array.isArray(e.slides))throw new Error("ONLYOFFICE PPT deck JSON: expected slides[]");return e}function Fa(t,e){return String(t?.id??t?.nvSpPr?.cNvPr?.id??e)}function fi(t){return t?.nvSpPr?.cNvPr?.name}function Yf(t={}){let e=t.spPr?.xfrm||{},n=e.off||{},r=e.ext||{};return{left:Number.isFinite(Number(n.x))?Number(n.x):void 0,top:Number.isFinite(Number(n.y))?Number(n.y):void 0,width:Number.isFinite(Number(r.cx??t.extX))?Number(r.cx??t.extX):void 0,height:Number.isFinite(Number(r.cy??t.extY))?Number(r.cy??t.extY):void 0,rotation:Number.isFinite(Number(e.rot))?Number(e.rot):void 0,flipHorizontal:e.flipH===!0?!0:void 0,flipVertical:e.flipV===!0?!0:void 0}}function qf(t={}){return t.type==="group"?"group":t.type==="image"||t.blipFill?"picture":t.graphicObject?.table||t.table?"table":t.graphicObject?.chart||t.chart?"chart":di(t)?"textBox":t.spPr?.custGeom||t.spPr?.prstGeom||t.spPr?.geometry?"geometricShape":"unknown"}function Kf(t){let e=t.sldSz||{},n=Number(e.cx??e.w??e.width),r=Number(e.cy??e.h??e.height);if(!(!Number.isFinite(n)||!Number.isFinite(r)))return{width:n,height:r}}function Qf(t){let e=di(t);if(e)try{return Ar(e)}catch{return}}function di(t){let e=t?.content;if(!e||typeof e!="object")return;if(e.type==="docContent"||e.type==="documentContent")return e;let n=e.content;if(n&&typeof n=="object"&&(n.type==="docContent"||n.type==="documentContent"))return n;if(n&&typeof n=="object"&&Array.isArray(n.content))return{...n,type:"docContent",bPresentation:n.bPresentation??!0}}function td(t,e){return!t?.content||!e?!1:t.content.type==="docContent"||t.content.type==="documentContent"?(t.content=e,!0):(t.content={...t.content,content:e},!0)}function ed(t){for(let e of t){let n=e.text?.text?.trim();if(n)return n}}function za(t,e){let n=Qf(t),r=Array.isArray(t.spTree)?t.spTree.map((o,i)=>za(o,i)):void 0;return{id:Fa(t,e),name:fi(t),kind:qf(t),geometry:Yf(t),text:n,children:r,raw:{hostType:"onlyoffice-ppt-oojson",presetGeometry:t.spPr?.prstGeom?.prst||t.spPr?.custGeom?.preset}}}function pi(t,e={}){let n=Dr(t),r=n.slides.map((o,i)=>{let a=(Array.isArray(o?.cSld?.spTree)?o.cSld.spTree:[]).map((l,u)=>za(l,u));return{id:String(o?.id??i),index:i,name:o?.name,title:ed(a),shapes:a}});return{id:e.id,title:e.title,slideSize:Kf(n),slides:r}}function nd(t,e){return Number.isInteger(e?.index)&&t.slides[e.index]?t.slides[e.index]:t.slides.find(n=>String(n?.id)===String(e?.id))}function rd(t,e){if(!Array.isArray(t))return;let n=String(e?.id??""),r=n.includes("/shape:")?n.slice(n.lastIndexOf("/shape:")+7):n;return t.find((o,i)=>{let s=Fa(o,i);return s===n||s===r||fi(o)&&fi(o)===e?.name})}function od(t,e){let n=di(t);if(!t||!e||!n)return!1;let r=n;return Array.isArray(e.paragraphs)&&e.paragraphs.length?r=Xn(r,e.paragraphs):typeof e.text=="string"&&(r=Un(r,e.text,{style:e.style})),e.style&&(r=Wn(r,e.style)),td(t,r)}function hi(t,e){let n=Dr(t),r=0,o=[];for(let i of e?.slides||[]){let a=nd(n,i)?.cSld?.spTree;if(Array.isArray(a))for(let l of i.shapes||[]){let u=rd(a,l);!u||!l.text||od(u,l.text)&&(r+=1,o.push({slideIndex:i.index,shapeId:l.id,shapeName:l.name}))}}return{deck:n,changedCount:r,changed:o}}function ja(t,e,n){let o=pi(t).slides[e?.slideIndex??0];if(!o)return{deck:Dr(t),changedCount:0,changed:[]};let i=o.shapes.find(a=>{let l=a.id.includes("/shape:")?a.id.slice(a.id.lastIndexOf("/shape:")+7):a.id,u=e?.shapeId==null?void 0:String(e.shapeId),h=u?.includes("/shape:")?u.slice(u.lastIndexOf("/shape:")+7):u;return a.id===u||l===h||e?.shapeName&&a.name===e.shapeName||e?.text&&a.text?.text===e.text});if(!i)return{deck:Dr(t),changedCount:0,changed:[]};let s={...i.text||{text:""},...n||{}};return typeof n?.text=="string"&&!Array.isArray(n.paragraphs)&&delete s.paragraphs,i.text=s,hi(t,{slides:[o]})}return Ya(id);})();
|
|
12
12
|
/*! Bundled license information:
|
|
13
13
|
|
|
14
14
|
jszip/dist/jszip.min.js:
|